diff --git a/archiving-common-collector/pom.xml b/archiving-common-collector/pom.xml
new file mode 100644
index 0000000000000000000000000000000000000000..ef89e901da8899a1f55953be425beeb47d1d5028
--- /dev/null
+++ b/archiving-common-collector/pom.xml
@@ -0,0 +1,40 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"
+  xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+  <modelVersion>4.0.0</modelVersion>
+
+  <parent>
+    <groupId>fr.soleil.deviceservers</groupId>
+    <artifactId>historicalarchivingservers</artifactId>
+    <version>2.6.1</version>
+  </parent>
+
+  <groupId>fr.soleil.deviceservers</groupId>
+  <artifactId>archiving-common-collector</artifactId>
+
+  <developers>
+    <developer>
+      <id>girardot</id>
+      <name>Raphaël GIRARDOT</name>
+      <email>raphael.girardot@synchrotron-soleil.fr</email>
+      <organization>Synchrotron Soleil</organization>
+      <organizationUrl>http://www.synchrotron-soleil.fr</organizationUrl>
+      <roles>
+        <role>Java Developer</role>
+      </roles>
+      <timezone>1</timezone>
+    </developer>
+  </developers>
+
+  <dependencies>
+    <dependency>
+      <groupId>fr.esrf.atk</groupId>
+      <artifactId>ATKCore</artifactId>
+    </dependency>
+  </dependencies>
+
+  <properties>
+    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
+  </properties>
+
+</project>
diff --git a/src/main/java/Common/Archiver/Collector/ArchiverCollector.java b/archiving-common-collector/src/main/java/Common/Archiver/Collector/ArchiverCollector.java
similarity index 97%
rename from src/main/java/Common/Archiver/Collector/ArchiverCollector.java
rename to archiving-common-collector/src/main/java/Common/Archiver/Collector/ArchiverCollector.java
index 9520e8bcde2f82cff1845855d824b8953dccd0df..98ad4df2d9010cdec75204cb8d4012f2e5186611 100644
--- a/src/main/java/Common/Archiver/Collector/ArchiverCollector.java
+++ b/archiving-common-collector/src/main/java/Common/Archiver/Collector/ArchiverCollector.java
@@ -1,330 +1,330 @@
-package Common.Archiver.Collector;
-
-import java.text.SimpleDateFormat;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.Collection;
-import java.util.Date;
-import java.util.Enumeration;
-import java.util.Map;
-import java.util.concurrent.ConcurrentHashMap;
-
-import org.slf4j.Logger;
-
-import fr.esrf.TangoDs.Util;
-import fr.esrf.tangoatk.core.AttributePolledList;
-import fr.esrf.tangoatk.core.ErrorEvent;
-import fr.esrf.tangoatk.core.IAttribute;
-import fr.esrf.tangoatk.core.IErrorListener;
-import fr.soleil.archiving.common.api.tools.ArchivingEvent;
-import fr.soleil.archiving.hdbtdb.api.tools.DBTools;
-import fr.soleil.archiving.hdbtdb.api.tools.ScalarEvent;
-
-public abstract class ArchiverCollector implements IErrorListener {
-
-    private static final long serialVersionUID = -1493388817049590482L;
-
-    /**
-     * This list is the list used by the refresher of the Collector
-     */
-    protected final AttributePolledList attributeList;
-
-    // This Map contains the mode counters by attribute
-    private final Map<String, ModesCounters> attributeModeCounterMap;
-
-    // This Map contains the error messages
-    private final Map<String, String> errorMessageMap;
-
-    // Diary file
-    protected final Logger logger;
-
-    /**
-     * An ModeHandler is associated to each Collector to handle the archiving
-     * mode
-     */
-    protected ModeHandler m_modeHandler;
-
-    /**
-     * This field represent the refreshing rate of the Collector
-     */
-    private boolean refreshing;
-
-    protected final SimpleDateFormat dateFormat;
-
-    public ArchiverCollector(ModeHandler modeHandler, Logger logger) {
-        dateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss.SSS");
-        attributeList = new AttributePolledList();
-        attributeModeCounterMap = new ConcurrentHashMap<String, ModesCounters>();
-        errorMessageMap = new ConcurrentHashMap<String, String>();
-        m_modeHandler = modeHandler;
-        this.logger = logger;
-    }
-
-    /* Allows to indicate to the collector that a new attribute must be managed */
-    protected void addAttribute(String name) {
-        if (name != null) {
-            String lower = name.toLowerCase();
-            ModesCounters counters = attributeModeCounterMap.get(lower);
-            if (counters == null) {
-                attributeModeCounterMap.put(lower, new ModesCounters());
-            } else {
-                logger.debug("ArchiverCollector.addAttribute : The attribute " + name
-                        + "already exists in the map ==> Counter Re-init");
-                counters.init();
-            }
-        }
-    }
-
-    /* Allows to indicate to the collector that an attribute has been stopped */
-    protected void removeAttribute(String name) {
-        if (name != null) {
-            name = name.toLowerCase();
-            attributeModeCounterMap.remove(name);
-            removeErrorMessage(name);
-        }
-    }
-
-    /* Allows to retrieve the ModesCounters object of one attribute */
-    protected ModesCounters getModeCounter(String name) {
-        ModesCounters result;
-        if (name == null) {
-            result = null;
-        } else {
-            result = attributeModeCounterMap.get(name.toLowerCase());
-        }
-        return result;
-    }
-
-    /* Creates a ScalarEvent object from the ErrorEvent with a null value */
-    protected ScalarEvent getNullValueScalarEvent(ErrorEvent errorEvent, int data_type, int writable) {
-        return new ScalarEvent(errorEvent.getSource().toString(), data_type, writable, errorEvent.getTimeStamp(), null,
-                null);
-    }
-
-    /* Return true if the value must be archived, false otherwise */
-    protected boolean doArchiveEvent(ModesCounters mc, int dataType, Object readValueObject, Object lastValueObject,
-            String attCompleteName) {
-        boolean doArchive = false;
-
-        try {
-            doArchive = m_modeHandler.isDataArchivable(mc, dataType, readValueObject, lastValueObject);
-        } catch (Exception e) {
-            e.printStackTrace();
-            logger.error(this.getClass().getSimpleName() + "/doArchiveEvent/catch " + e + " with the value of "
-                    + attCompleteName);
-        }
-
-        return doArchive;
-    }
-
-    /**
-     * Triggers the collecting action of this HdbCollector.
-     */
-    protected synchronized void startCollecting() {
-        if (!attributeList.isEmpty()) {
-            if (!attributeList.isRefresherStarted()) {
-                attributeList.setRefreshInterval(m_modeHandler.getRefreshInterval());
-                attributeList.setSynchronizedPeriod(true);
-                attributeList.startRefresher();
-                refreshing = true;
-                logger.debug(this.getClass() + " start refresh for " + attributeList.getSize() + " attributes");
-            } else {
-                // force a refresh for newly added attributes
-                attributeList.refresh();
-                logger.debug("FORCING refresh for " + this.getClass());
-            }
-        }
-    }
-
-    /**
-     * Stops the collecting action of this TdbCollector.
-     */
-    protected synchronized void stopCollecting() {
-        try {
-            logger.debug(this.getClass() + " stop refresh on " + attributeList.getSize() + " attributes");
-            attributeList.stopRefresher();
-            refreshing = false;
-        } catch (final Exception e) {
-            Util.out2.println("ERROR !! " + "\r\n" + "\t Origin : \t " + "TdbCollector.stopCollecting" + "\r\n"
-                    + "\t Reason : \t " + e.getClass().getName() + "\r\n" + "\t Description : \t " + e.getMessage()
-                    + "\r\n" + "\t Additional information : \t " + "" + "\r\n");
-            e.printStackTrace();
-        }
-    }
-
-    /**
-     * Returns a boolean to know whether the attribute list is empty or not
-     * 
-     * @return A boolean to know whether the attribute list is empty or not
-     */
-    public boolean hasEmptyList() {
-        return attributeList.isEmpty();
-    }
-
-    public synchronized int[] loadAssessment() {
-        final int[] ret = new int[3];
-        final Enumeration<?> myAttList = attributeList.elements();
-        while (myAttList.hasMoreElements()) {
-            final IAttribute nextAttr = (IAttribute) myAttList.nextElement();
-            final int X = nextAttr.getMaxXDimension();
-            final int Y = nextAttr.getMaxYDimension();
-
-            int type = 0;
-            if (X > 1) {
-                type++;
-            }
-            if (Y > 1) {
-                type++;
-            }
-
-            ret[type]++;
-        }
-
-        return ret;
-    }
-
-    public Collection<String> getAttributeList() {
-        final Collection<String> attributeListResult = new ArrayList<String>();
-        final Enumeration<?> myAttList = attributeList.elements();
-        while (myAttList.hasMoreElements()) {
-            final IAttribute attr = (IAttribute) myAttList.nextElement();
-            attributeListResult.add(attr.getName());
-        }
-        return attributeListResult;
-    }
-
-    public synchronized boolean isCollected(String attributeName) {
-        boolean isCollected = false;
-        final Enumeration<?> myAttList = attributeList.elements();
-        while (myAttList.hasMoreElements()) {
-            final IAttribute attr = (IAttribute) myAttList.nextElement();
-            if (attr.getName().equalsIgnoreCase(attributeName)) {
-                isCollected = true;
-                break;
-            }
-        }
-        return isCollected;
-    }
-
-    public boolean isPotentiallyCollected(String attributeName) {
-        boolean collected;
-        if (attributeName == null) {
-            collected = false;
-        } else {
-            collected = (attributeModeCounterMap.get(attributeName.toLowerCase()) != null);
-        }
-        return collected;
-    }
-
-    public synchronized String assessment() {
-        final StringBuilder ass = new StringBuilder();
-        ass.append("Collector Reference : " + toString() + "\r\n");
-        ass.append("Activity (refreshing) : " + isRefreshing() + "\r\n");
-        ass.append("Mode : " + "\r\n" + m_modeHandler.getMode().toString() + "\r\n");
-        ass.append("Attribute list (" + attributeList.getSize() + "): " + "\r\n");
-        final Enumeration<?> myAttList = attributeList.elements();
-        int i = 1;
-        while (myAttList.hasMoreElements()) {
-            final IAttribute iNumberScalar = (IAttribute) myAttList.nextElement();
-            ass.append("\t" + i++ + "\t" + iNumberScalar.getName() + "\r\n");
-        }
-        return ass.toString();
-    }
-
-    public boolean isRefreshing() {
-        return refreshing;
-    }
-
-    protected void transmitBooleanArray(ArchivingEvent<boolean[]> event, int dim, boolean[] bval, boolean[] nullElements) {
-        final boolean[] bvalue = Arrays.copyOf(bval, dim);
-        event.setValue(bvalue, nullElements);
-    }
-
-    protected void transmitByteArray(ArchivingEvent<boolean[]> event, int dim, byte[] bval, boolean[] nullElements) {
-        final byte[] bvalue = Arrays.copyOf(bval, dim);
-        event.setValue(bvalue, nullElements);
-    }
-
-    protected void transmitShortArray(ArchivingEvent<boolean[]> event, int dim, short[] sval, boolean[] nullElements) {
-        final short[] svalue = Arrays.copyOf(sval, dim);
-        event.setValue(svalue, nullElements);
-    }
-
-    protected void transmitIntArray(ArchivingEvent<boolean[]> event, int dim, int[] ival, boolean[] nullElements) {
-        final int[] ivalue = Arrays.copyOf(ival, dim);
-        event.setValue(ivalue, nullElements);
-    }
-
-    protected void transmitLongArray(ArchivingEvent<boolean[]> event, int dim, long[] lval, boolean[] nullElements) {
-        final long[] lvalue = Arrays.copyOf(lval, dim);
-        event.setValue(lvalue, nullElements);
-    }
-
-    protected void transmitFloatArray(ArchivingEvent<boolean[]> event, int dim, float[] fval, boolean[] nullElements) {
-        final float[] fvalue = Arrays.copyOf(fval, dim);
-        event.setValue(fvalue, nullElements);
-    }
-
-    protected void transmitDoubleArray(ArchivingEvent<boolean[]> event, int dim, double[] dval, boolean[] nullElements) {
-        final double[] dvalue = Arrays.copyOf(dval, dim);
-        event.setValue(dvalue, nullElements);
-    }
-
-    protected void transmitObjectArray(ArchivingEvent<boolean[]> event, int dim, Object[] oval, boolean[] nullElements) {
-        final Object[] ovalue = Arrays.copyOf(oval, dim);
-        event.setValue(ovalue, nullElements);
-    }
-
-    @Override
-    public void errorChange(ErrorEvent errorEvent) {
-        String attributeName = String.valueOf(errorEvent.getSource());
-        StringBuilder builder = new StringBuilder(getClass().getSimpleName());
-        builder.append(".errorChange : Unable to read the attribute named ").append(attributeName);
-        builder.append("\n\tTime: ").append(dateFormat.format(new Date(errorEvent.getTimeStamp())));
-        Throwable error = errorEvent.getError();
-        if (error != null) {
-            builder.append("\n\tReason: ");
-            DBTools.appendErrorToStringBuilder(builder, error);
-        }
-        String errorMess = builder.toString();
-        logger.error(errorMess);
-        registerErrorMessage(attributeName, errorMess);
-        treatErrorEventAfterLogging(errorEvent);
-    }
-
-    protected abstract void treatErrorEventAfterLogging(ErrorEvent errorEvent);
-
-    protected void registerErrorMessage(String name, String message) {
-        if ((name != null) && (message != null)) {
-            errorMessageMap.put(name.toLowerCase(), message);
-        }
-    }
-
-    protected void registerErrorMessage(String name, Throwable error) {
-        registerErrorMessage(name, DBTools.appendErrorToStringBuilder(new StringBuilder(), error).toString());
-    }
-
-    protected void removeErrorMessage(String name) {
-        if (name != null) {
-            errorMessageMap.remove(name.toLowerCase());
-        }
-    }
-
-    public String getErrorMessage(String attributeName) {
-        String result;
-        if (attributeName == null) {
-            result = null;
-        } else {
-            result = errorMessageMap.get(attributeName.toLowerCase());
-        }
-        return result;
-    }
-
-    // synchronized because of attribute list
-    public synchronized void clear() {
-        attributeList.clear();
-        attributeModeCounterMap.clear();
-        errorMessageMap.clear();
-    }
-
-}
+package Common.Archiver.Collector;
+
+import java.text.SimpleDateFormat;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Collection;
+import java.util.Date;
+import java.util.Enumeration;
+import java.util.Map;
+import java.util.concurrent.ConcurrentHashMap;
+
+import org.slf4j.Logger;
+
+import fr.esrf.TangoDs.Util;
+import fr.esrf.tangoatk.core.AttributePolledList;
+import fr.esrf.tangoatk.core.ErrorEvent;
+import fr.esrf.tangoatk.core.IAttribute;
+import fr.esrf.tangoatk.core.IErrorListener;
+import fr.soleil.archiving.common.api.tools.ArchivingEvent;
+import fr.soleil.archiving.hdbtdb.api.tools.DBTools;
+import fr.soleil.archiving.hdbtdb.api.tools.ScalarEvent;
+
+public abstract class ArchiverCollector implements IErrorListener {
+
+    private static final long serialVersionUID = -1493388817049590482L;
+
+    /**
+     * This list is the list used by the refresher of the Collector
+     */
+    protected final AttributePolledList attributeList;
+
+    // This Map contains the mode counters by attribute
+    private final Map<String, ModesCounters> attributeModeCounterMap;
+
+    // This Map contains the error messages
+    private final Map<String, String> errorMessageMap;
+
+    // Diary file
+    protected final Logger logger;
+
+    /**
+     * An ModeHandler is associated to each Collector to handle the archiving
+     * mode
+     */
+    protected ModeHandler m_modeHandler;
+
+    /**
+     * This field represent the refreshing rate of the Collector
+     */
+    private boolean refreshing;
+
+    protected final SimpleDateFormat dateFormat;
+
+    public ArchiverCollector(ModeHandler modeHandler, Logger logger) {
+        dateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss.SSS");
+        attributeList = new AttributePolledList();
+        attributeModeCounterMap = new ConcurrentHashMap<String, ModesCounters>();
+        errorMessageMap = new ConcurrentHashMap<String, String>();
+        m_modeHandler = modeHandler;
+        this.logger = logger;
+    }
+
+    /* Allows to indicate to the collector that a new attribute must be managed */
+    protected void addAttribute(String name) {
+        if (name != null) {
+            String lower = name.toLowerCase();
+            ModesCounters counters = attributeModeCounterMap.get(lower);
+            if (counters == null) {
+                attributeModeCounterMap.put(lower, new ModesCounters());
+            } else {
+                logger.debug("ArchiverCollector.addAttribute : The attribute " + name
+                        + "already exists in the map ==> Counter Re-init");
+                counters.init();
+            }
+        }
+    }
+
+    /* Allows to indicate to the collector that an attribute has been stopped */
+    protected void removeAttribute(String name) {
+        if (name != null) {
+            name = name.toLowerCase();
+            attributeModeCounterMap.remove(name);
+            removeErrorMessage(name);
+        }
+    }
+
+    /* Allows to retrieve the ModesCounters object of one attribute */
+    protected ModesCounters getModeCounter(String name) {
+        ModesCounters result;
+        if (name == null) {
+            result = null;
+        } else {
+            result = attributeModeCounterMap.get(name.toLowerCase());
+        }
+        return result;
+    }
+
+    /* Creates a ScalarEvent object from the ErrorEvent with a null value */
+    protected ScalarEvent getNullValueScalarEvent(ErrorEvent errorEvent, int data_type, int writable) {
+        return new ScalarEvent(errorEvent.getSource().toString(), data_type, writable, errorEvent.getTimeStamp(), null,
+                null);
+    }
+
+    /* Return true if the value must be archived, false otherwise */
+    protected boolean doArchiveEvent(ModesCounters mc, int dataType, Object readValueObject, Object lastValueObject,
+            String attCompleteName) {
+        boolean doArchive = false;
+
+        try {
+            doArchive = m_modeHandler.isDataArchivable(mc, dataType, readValueObject, lastValueObject);
+        } catch (Exception e) {
+            e.printStackTrace();
+            logger.error(this.getClass().getSimpleName() + "/doArchiveEvent/catch " + e + " with the value of "
+                    + attCompleteName);
+        }
+
+        return doArchive;
+    }
+
+    /**
+     * Triggers the collecting action of this HdbCollector.
+     */
+    protected synchronized void startCollecting() {
+        if (!attributeList.isEmpty()) {
+            if (!attributeList.isRefresherStarted()) {
+                attributeList.setRefreshInterval(m_modeHandler.getRefreshInterval());
+                attributeList.setSynchronizedPeriod(true);
+                attributeList.startRefresher();
+                refreshing = true;
+                logger.debug(this.getClass() + " start refresh for " + attributeList.getSize() + " attributes");
+            } else {
+                // force a refresh for newly added attributes
+                attributeList.refresh();
+                logger.debug("FORCING refresh for " + this.getClass());
+            }
+        }
+    }
+
+    /**
+     * Stops the collecting action of this TdbCollector.
+     */
+    protected synchronized void stopCollecting() {
+        try {
+            logger.debug(this.getClass() + " stop refresh on " + attributeList.getSize() + " attributes");
+            attributeList.stopRefresher();
+            refreshing = false;
+        } catch (final Exception e) {
+            Util.out2.println("ERROR !! " + "\r\n" + "\t Origin : \t " + "TdbCollector.stopCollecting" + "\r\n"
+                    + "\t Reason : \t " + e.getClass().getName() + "\r\n" + "\t Description : \t " + e.getMessage()
+                    + "\r\n" + "\t Additional information : \t " + "" + "\r\n");
+            e.printStackTrace();
+        }
+    }
+
+    /**
+     * Returns a boolean to know whether the attribute list is empty or not
+     * 
+     * @return A boolean to know whether the attribute list is empty or not
+     */
+    public boolean hasEmptyList() {
+        return attributeList.isEmpty();
+    }
+
+    public synchronized int[] loadAssessment() {
+        final int[] ret = new int[3];
+        final Enumeration<?> myAttList = attributeList.elements();
+        while (myAttList.hasMoreElements()) {
+            final IAttribute nextAttr = (IAttribute) myAttList.nextElement();
+            final int X = nextAttr.getMaxXDimension();
+            final int Y = nextAttr.getMaxYDimension();
+
+            int type = 0;
+            if (X > 1) {
+                type++;
+            }
+            if (Y > 1) {
+                type++;
+            }
+
+            ret[type]++;
+        }
+
+        return ret;
+    }
+
+    public Collection<String> getAttributeList() {
+        final Collection<String> attributeListResult = new ArrayList<String>();
+        final Enumeration<?> myAttList = attributeList.elements();
+        while (myAttList.hasMoreElements()) {
+            final IAttribute attr = (IAttribute) myAttList.nextElement();
+            attributeListResult.add(attr.getName());
+        }
+        return attributeListResult;
+    }
+
+    public synchronized boolean isCollected(String attributeName) {
+        boolean isCollected = false;
+        final Enumeration<?> myAttList = attributeList.elements();
+        while (myAttList.hasMoreElements()) {
+            final IAttribute attr = (IAttribute) myAttList.nextElement();
+            if (attr.getName().equalsIgnoreCase(attributeName)) {
+                isCollected = true;
+                break;
+            }
+        }
+        return isCollected;
+    }
+
+    public boolean isPotentiallyCollected(String attributeName) {
+        boolean collected;
+        if (attributeName == null) {
+            collected = false;
+        } else {
+            collected = (attributeModeCounterMap.get(attributeName.toLowerCase()) != null);
+        }
+        return collected;
+    }
+
+    public synchronized String assessment() {
+        final StringBuilder ass = new StringBuilder();
+        ass.append("Collector Reference : " + toString() + "\r\n");
+        ass.append("Activity (refreshing) : " + isRefreshing() + "\r\n");
+        ass.append("Mode : " + "\r\n" + m_modeHandler.getMode().toString() + "\r\n");
+        ass.append("Attribute list (" + attributeList.getSize() + "): " + "\r\n");
+        final Enumeration<?> myAttList = attributeList.elements();
+        int i = 1;
+        while (myAttList.hasMoreElements()) {
+            final IAttribute iNumberScalar = (IAttribute) myAttList.nextElement();
+            ass.append("\t" + i++ + "\t" + iNumberScalar.getName() + "\r\n");
+        }
+        return ass.toString();
+    }
+
+    public boolean isRefreshing() {
+        return refreshing;
+    }
+
+    protected void transmitBooleanArray(ArchivingEvent<boolean[]> event, int dim, boolean[] bval, boolean[] nullElements) {
+        final boolean[] bvalue = Arrays.copyOf(bval, dim);
+        event.setValue(bvalue, nullElements);
+    }
+
+    protected void transmitByteArray(ArchivingEvent<boolean[]> event, int dim, byte[] bval, boolean[] nullElements) {
+        final byte[] bvalue = Arrays.copyOf(bval, dim);
+        event.setValue(bvalue, nullElements);
+    }
+
+    protected void transmitShortArray(ArchivingEvent<boolean[]> event, int dim, short[] sval, boolean[] nullElements) {
+        final short[] svalue = Arrays.copyOf(sval, dim);
+        event.setValue(svalue, nullElements);
+    }
+
+    protected void transmitIntArray(ArchivingEvent<boolean[]> event, int dim, int[] ival, boolean[] nullElements) {
+        final int[] ivalue = Arrays.copyOf(ival, dim);
+        event.setValue(ivalue, nullElements);
+    }
+
+    protected void transmitLongArray(ArchivingEvent<boolean[]> event, int dim, long[] lval, boolean[] nullElements) {
+        final long[] lvalue = Arrays.copyOf(lval, dim);
+        event.setValue(lvalue, nullElements);
+    }
+
+    protected void transmitFloatArray(ArchivingEvent<boolean[]> event, int dim, float[] fval, boolean[] nullElements) {
+        final float[] fvalue = Arrays.copyOf(fval, dim);
+        event.setValue(fvalue, nullElements);
+    }
+
+    protected void transmitDoubleArray(ArchivingEvent<boolean[]> event, int dim, double[] dval, boolean[] nullElements) {
+        final double[] dvalue = Arrays.copyOf(dval, dim);
+        event.setValue(dvalue, nullElements);
+    }
+
+    protected void transmitObjectArray(ArchivingEvent<boolean[]> event, int dim, Object[] oval, boolean[] nullElements) {
+        final Object[] ovalue = Arrays.copyOf(oval, dim);
+        event.setValue(ovalue, nullElements);
+    }
+
+    @Override
+    public void errorChange(ErrorEvent errorEvent) {
+        String attributeName = String.valueOf(errorEvent.getSource());
+        StringBuilder builder = new StringBuilder(getClass().getSimpleName());
+        builder.append(".errorChange : Unable to read the attribute named ").append(attributeName);
+        builder.append("\n\tTime: ").append(dateFormat.format(new Date(errorEvent.getTimeStamp())));
+        Throwable error = errorEvent.getError();
+        if (error != null) {
+            builder.append("\n\tReason: ");
+            DBTools.appendErrorToStringBuilder(builder, error);
+        }
+        String errorMess = builder.toString();
+        logger.error(errorMess);
+        registerErrorMessage(attributeName, errorMess);
+        treatErrorEventAfterLogging(errorEvent);
+    }
+
+    protected abstract void treatErrorEventAfterLogging(ErrorEvent errorEvent);
+
+    protected void registerErrorMessage(String name, String message) {
+        if ((name != null) && (message != null)) {
+            errorMessageMap.put(name.toLowerCase(), message);
+        }
+    }
+
+    protected void registerErrorMessage(String name, Throwable error) {
+        registerErrorMessage(name, DBTools.appendErrorToStringBuilder(new StringBuilder(), error).toString());
+    }
+
+    protected void removeErrorMessage(String name) {
+        if (name != null) {
+            errorMessageMap.remove(name.toLowerCase());
+        }
+    }
+
+    public String getErrorMessage(String attributeName) {
+        String result;
+        if (attributeName == null) {
+            result = null;
+        } else {
+            result = errorMessageMap.get(attributeName.toLowerCase());
+        }
+        return result;
+    }
+
+    // synchronized because of attribute list
+    public synchronized void clear() {
+        attributeList.clear();
+        attributeModeCounterMap.clear();
+        errorMessageMap.clear();
+    }
+
+}
diff --git a/src/main/java/Common/Archiver/Collector/ModeHandler.java b/archiving-common-collector/src/main/java/Common/Archiver/Collector/ModeHandler.java
similarity index 97%
rename from src/main/java/Common/Archiver/Collector/ModeHandler.java
rename to archiving-common-collector/src/main/java/Common/Archiver/Collector/ModeHandler.java
index 5a37b6aec0a7c0233399fb4bda0efcc2df8d2db4..022c71200cbdf19ac28da1b4da303f92f2ad56ee 100644
--- a/src/main/java/Common/Archiver/Collector/ModeHandler.java
+++ b/archiving-common-collector/src/main/java/Common/Archiver/Collector/ModeHandler.java
@@ -1,427 +1,427 @@
-package Common.Archiver.Collector;
-
-import fr.esrf.Tango.DevState;
-import fr.esrf.TangoDs.TangoConst;
-import fr.soleil.archiving.hdbtdb.api.tools.mode.Mode;
-import fr.soleil.archiving.hdbtdb.api.tools.mode.ModeAbsolu;
-import fr.soleil.archiving.hdbtdb.api.tools.mode.ModeRelatif;
-import fr.soleil.lib.project.ObjectUtils;
-
-public abstract class ModeHandler {
-    // This class has been defined as abstract just to keep one object in the
-    // Hdb part and an other in the Tdb part
-    // It has been done after the archiver developement, and it allows to reduce
-    // the impacts in the archivers code
-    private final Mode mode;
-
-    private int factorModePeriodic = 0;
-    private int factorModeAbsolute = 0;
-    private int factorModeRelative = 0;
-    private int factorModeThreshold = 0;
-    public int factorModeDifference = 0;
-    // private int factorModeCalcul = 0;
-
-    // private final String name = this.getClass().getSimpleName();
-
-    private int refresherInterval;
-    private final boolean hasRounding = true;
-
-    public ModeHandler(final Mode archiverMode) {
-        mode = archiverMode;
-
-        // Minimum polling interval definition
-        setMinRefreshInterval();
-        // Mode factor calculation
-        initFactor();
-    }
-
-    public int getRefreshInterval() {
-        return refresherInterval;
-    }
-
-    public Mode getMode() {
-        return mode;
-    }
-
-    public boolean isDataArchivable(final ModesCounters attModeCounter, final int dataType, final Object currentEvent,
-            final Object previousEvent) {
-        double currentEventD = -1;
-        double previousEventD = -1;
-
-        final boolean isCurrentNull = currentEvent == null;
-        final boolean isPreviousNull = previousEvent == null;
-
-        switch (dataType) {
-            case TangoConst.Tango_DEV_STRING:
-                // here, currentEvent and previousEvent are String values
-                if (!ObjectUtils.sameObject(currentEvent, previousEvent)) {
-                    currentEventD = previousEventD + 1;// so that the difference mode's archiving condition is triggered
-                }
-                break;
-            case TangoConst.Tango_DEV_STATE:
-                final DevState currentEventState = (DevState) currentEvent;
-                final DevState previousEventState = (DevState) previousEvent;
-                currentEventD = isCurrentNull ? -1 : currentEventState.value();
-                previousEventD = isPreviousNull ? -1 : previousEventState.value();
-                // System.out.println(
-                // "TdbModeHandler/isDataArchivable/currentEventD/"+currentEventD+"/previousEventD/"+previousEventD
-                // );
-                break;
-            // case TangoConst.Tango_DEV_UCHAR:
-            // currentEventD = isCurrentNull ? -1 : ((Byte)
-            // currentEvent).doubleValue();
-            // previousEventD = isPreviousNull ? -1 : ((Byte)
-            // previousEvent).doubleValue();
-            // break;
-            case TangoConst.Tango_DEV_LONG:
-            case TangoConst.Tango_DEV_ULONG:
-                currentEventD = isCurrentNull ? -1 : ((Integer) currentEvent).doubleValue();
-                previousEventD = isPreviousNull ? -1 : ((Integer) previousEvent).doubleValue();
-                break;
-            case TangoConst.Tango_DEV_LONG64:
-            case TangoConst.Tango_DEV_ULONG64:
-                currentEventD = isCurrentNull ? -1 : ((Long) currentEvent).doubleValue();
-                previousEventD = isPreviousNull ? -1 : ((Long) previousEvent).doubleValue();
-                break;
-            case TangoConst.Tango_DEV_BOOLEAN:
-                currentEventD = isCurrentNull ? -1 : ((Boolean) currentEvent).booleanValue() ? 1 : 0;
-                previousEventD = isPreviousNull ? -1 : ((Boolean) previousEvent).booleanValue() ? 1 : 0;
-                break;
-            case TangoConst.Tango_DEV_UCHAR:
-            case TangoConst.Tango_DEV_SHORT:
-            case TangoConst.Tango_DEV_USHORT:
-                currentEventD = isCurrentNull ? -1 : ((Short) currentEvent).doubleValue();
-                previousEventD = isPreviousNull ? -1 : ((Short) previousEvent).doubleValue();
-                break;
-            case TangoConst.Tango_DEV_FLOAT:
-                currentEventD = isCurrentNull ? -1 : ((Float) currentEvent).doubleValue();
-                previousEventD = isPreviousNull ? -1 : ((Float) previousEvent).doubleValue();
-                break;
-            case TangoConst.Tango_DEV_DOUBLE:
-                currentEventD = isCurrentNull ? -1 : ((Double) currentEvent).doubleValue();
-                previousEventD = isPreviousNull ? -1 : ((Double) previousEvent).doubleValue();
-                break;
-            default:
-                if (currentEvent instanceof Number && previousEvent instanceof Number) {
-                    currentEventD = isCurrentNull ? -1 : ((Double) currentEvent).doubleValue();
-                    previousEventD = isPreviousNull ? -1 : ((Double) previousEvent).doubleValue();
-                }
-                if (currentEvent instanceof String && previousEvent instanceof String) {
-                    String newCurrentEventString = currentEvent == null ? "" : (String) currentEvent;
-                    String newPreviousEventString = previousEvent == null ? "" : (String) previousEvent;
-                    if (!newCurrentEventString.equals(newPreviousEventString)) {
-                        currentEventD = previousEventD + 1;// so that the difference
-                        // mode's archiving
-                        // condition is triggered
-                    }
-                }
-                break;
-        }
-
-        boolean result = false;
-        // All the modes must be tested at least to increment the various
-        // counters
-        if (isDataArchivableModeP(attModeCounter)) {
-            result = true;
-        }
-        if (isDataArchivableModeA(attModeCounter, isCurrentNull, isPreviousNull, currentEventD, previousEventD)) {
-            result = true;
-        }
-        if (isDataArchivableModeR(attModeCounter, isCurrentNull, isPreviousNull, currentEventD, previousEventD)) {
-            result = true;
-        }
-        if (isDataArchivableModeT(attModeCounter, isCurrentNull, currentEventD)) {
-            result = true;
-        }
-        if (isDataArchivableModeC(attModeCounter, isCurrentNull, isPreviousNull, currentEventD, previousEventD)) {
-            result = true;
-        }
-        if (isDataArchivableModeD(attModeCounter, isCurrentNull, isPreviousNull, currentEventD, previousEventD)) {
-            result = true;
-        }
-        if (isDataArchivableModeE(attModeCounter, isCurrentNull, isPreviousNull, currentEventD, previousEventD)) {
-            result = true;
-        }
-        return result;
-    }
-
-    private boolean isDataArchivableModeP(final ModesCounters attModeCounter) {
-        if (mode.getModeP() == null) {
-            return false;
-        }
-
-        if (attModeCounter.getCountModeP() < factorModePeriodic) {
-            // Util.out4.println(m_myName + ".isDataArchivableModeP");
-            // Util.out4.println("countModePeriodic = " +
-            // attModeCounter.getCountModeP() + " < " +
-            // "m_factorModePeriodic = " + m_factorModePeriodic);
-            attModeCounter.incremCountModeP();
-            return false;
-        } else {
-            attModeCounter.initCountModeP();
-            // Util.out4.println(m_myName + ".isDataArchivableModeP");
-            // Util.out4.println("countModePeriodic = " +
-            // attModeCounter.getCountModeP() + " > " +
-            // "m_factorModePeriodic = " + m_factorModePeriodic);
-            return true;
-        }
-    }
-
-    private boolean isDataArchivableModeA(final ModesCounters attModeCounter, final boolean isCurrentNull,
-            final boolean isPreviousNull, final double currentEvent, double previousEvent) {
-        if (mode.getModeA() == null) {
-            return false;
-        }
-
-        if (attModeCounter.getCountModeA() < factorModeAbsolute) {
-            attModeCounter.incremCountModeA();
-            return false;
-        } else {
-            attModeCounter.initCountModeA();
-
-            if (isCurrentNull && isPreviousNull) {
-                return false;
-            } else if (isCurrentNull || isPreviousNull) {
-                return true;
-            }
-            // System.out.println("=/=/=/=/=/=/=/=/=/=//=/=/=/=/=/=/=/=/=/=/=/=/=/=/=/=/=/  derive lente: "
-            // + m_mode.getModeA().isSlow_drift());
-            if (mode.getModeA().isSlow_drift()) {
-                if (mode.getModeA().getPrev_stored_val() == ModeAbsolu.SLOW_DRIFT_FIRST_VAL) {
-                    mode.getModeA().setPrev_stored_val(previousEvent);
-                } else {
-                    previousEvent = mode.getModeA().getPrev_stored_val();
-                }
-            }
-            final double lowerLimit = previousEvent - Math.abs(mode.getModeA().getValInf());
-            final double upperLimit = previousEvent + Math.abs(mode.getModeA().getValSup());
-
-            if (currentEvent <= lowerLimit || currentEvent >= upperLimit) {
-
-                if (mode.getModeA().isSlow_drift()) {
-                    mode.getModeA().setPrev_stored_val(currentEvent);
-                }
-                return true;
-            } else {
-                return false;
-            }
-        }
-    }
-
-    private boolean isDataArchivableModeR(final ModesCounters attModeCounter, final boolean isCurrentNull,
-            final boolean isPreviousNull, final double currentEvent, double previousEvent) {
-        if (mode.getModeR() == null) {
-            return false;
-        }
-
-        if (attModeCounter.getCountModeR() < factorModeRelative) {
-            attModeCounter.incremCountModeR();
-            return false;
-        } else {
-            attModeCounter.initCountModeR();
-
-            if (isCurrentNull && isPreviousNull) {
-                return false;
-            } else if (isCurrentNull || isPreviousNull) {
-                return true;
-            }
-
-            if (mode.getModeR().isSlow_drift()
-                    && mode.getModeR().getPrev_stored_val() != ModeRelatif.SLOW_DRIFT_FIRST_VAL) {
-                previousEvent = mode.getModeR().getPrev_stored_val();
-            }
-            double lower_limit = 0;
-            double upper_limit = 0;
-
-            final double percentInf = Math.abs(mode.getModeR().getPercentInf() / 100.0);
-            final double percentSup = Math.abs(mode.getModeR().getPercentSup() / 100.0);
-
-            final double deltaInf = percentInf * Math.abs(previousEvent);
-            final double deltaSup = percentSup * Math.abs(previousEvent);
-
-            lower_limit = previousEvent - deltaInf;
-            upper_limit = previousEvent + deltaSup;
-
-            if (currentEvent < lower_limit || currentEvent > upper_limit) {
-                if (mode.getModeR().isSlow_drift()) {
-                    mode.getModeR().setPrev_stored_val(currentEvent);
-                }
-
-                // System.out.println("TRUE");
-                return true;
-            } else {
-                // System.out.println("FALSE");
-                return false;
-            }
-        }
-    }
-
-    private boolean isDataArchivableModeT(final ModesCounters attModeCounter, final boolean isCurrentNull,
-            final double currentEvent) {
-        if (mode.getModeT() == null) {
-            return false;
-        }
-
-        if (attModeCounter.getCountModeT() < factorModeThreshold) {
-            attModeCounter.incremCountModeT();
-            return false;
-        } else {
-            attModeCounter.initCountModeT();
-
-            if (isCurrentNull) {
-                return false;
-            }
-
-            /*
-             * System.out.println (m_myName + ".isDataArchivableModeT \r\n\t" +
-             * "\r\n\t" + "current value :" + currentEvent + "\r\n\t" +
-             * "previous value :" + previousEvent);
-             */
-
-            if (currentEvent <= mode.getModeT().getThresholdInf() || currentEvent >= mode.getModeT().getThresholdSup()) {
-
-                // System.out.println ("TRUE");
-                return true;
-            } else {
-                // System.out.println ("FALSE");
-                return false;
-            }
-        }
-    }
-
-    private boolean isDataArchivableModeD(final ModesCounters attModeCounter, final boolean isCurrentNull,
-            final boolean isPreviousNull, final double currentEvent, final double previousEvent) {
-        if (mode.getModeD() == null) {
-            return false;
-        }
-        if (attModeCounter.getCountModeD() < factorModeDifference) {
-            attModeCounter.incremCountModeD();
-            return false;
-        } else {
-            attModeCounter.initCountModeD();
-            if (isCurrentNull && isPreviousNull || (Double.isNaN(currentEvent) && Double.isNaN(previousEvent))) {
-                return false;
-            } else if (isCurrentNull || isPreviousNull) {
-                return true;
-            }
-            // if (isCurrentNull || isPreviousNull) {
-            // System.out
-            // .println("IF isDataArchivableModeD: " + (isCurrentNull !=
-            // isPreviousNull));
-            // return isCurrentNull != isPreviousNull;
-            // }
-
-            if (currentEvent != previousEvent) {
-                // System.out.println("TRUE");
-                return true;
-            } else {
-                // System.out.println("FALSE");
-                return false;
-            }
-        }
-    }
-
-    // todo faire la suite ...
-    private boolean isDataArchivableModeC(final ModesCounters attModeCounter, final boolean isCurrentNull,
-            final boolean isPreviousNull, final double currentEvent, final double previousEvent) {
-        return false;
-    }
-
-    private boolean isDataArchivableModeE(final ModesCounters attModeCounter, final boolean isCurrentNull,
-            final boolean isPreviousNull, final double currentEvent, final double previousEvent) {
-        return false;
-    }
-
-    private void initFactor() {
-        if (hasRounding) {
-            initFactorWithRounding();
-        } else {
-            initFactorWithoutRounding();
-        }
-    }
-
-    private void initFactorWithRounding() {
-        factorModePeriodic = (int) Math.round(mode.getModeP().getPeriod() * 1.0 / (refresherInterval * 1.0));
-
-        if (mode.getModeA() != null) {
-            factorModeAbsolute = (int) Math.round(mode.getModeA().getPeriod() * 1.0 / (refresherInterval * 1.0));
-        }
-
-        if (mode.getModeR() != null) {
-            factorModeRelative = (int) Math.round(mode.getModeR().getPeriod() * 1.0 / (refresherInterval * 1.0));
-        }
-
-        if (mode.getModeT() != null) {
-            factorModeThreshold = (int) Math.round(mode.getModeT().getPeriod() * 1.0 / (refresherInterval * 1.0));
-        }
-
-        if (mode.getModeD() != null) {
-            factorModeDifference = (int) Math.round(mode.getModeD().getPeriod() * 1.0 / (refresherInterval * 1.0));
-        }
-
-        // if (mode.getModeC() != null) {
-        // factorModeCalcul = (int) Math.round(mode.getModeC().getPeriod() * 1.0
-        // / (refresherInterval * 1.0));
-        // }
-    }
-
-    // Not really used
-    private void initFactorWithoutRounding() {
-        if (mode.getModeP().getPeriod() % refresherInterval == 0) {
-            factorModePeriodic = mode.getModeP().getPeriod() / refresherInterval;
-        } else {
-            // Todo send an exception
-        }
-        if (mode.getModeA() != null && mode.getModeA().getPeriod() % refresherInterval == 0) {
-            factorModeAbsolute = mode.getModeA().getPeriod() / refresherInterval;
-        } else {
-            // Todo send an exception
-        }
-        if (mode.getModeR() != null && mode.getModeR().getPeriod() % refresherInterval == 0) {
-            factorModeRelative = mode.getModeR().getPeriod() / refresherInterval;
-        } else {
-            // Todo send an exception
-        }
-        if (mode.getModeT() != null && mode.getModeT().getPeriod() % refresherInterval == 0) {
-            factorModeThreshold = mode.getModeT().getPeriod() / refresherInterval;
-        } else {
-            // Todo send an exception
-        }
-        // if (mode.getModeC() != null && mode.getModeC().getPeriod() %
-        // refresherInterval == 0) {
-        // factorModeCalcul = mode.getModeC().getPeriod() / refresherInterval;
-        // }
-        // else {
-        // // Todo send an exception
-        // }
-        if (mode.getModeD() != null && mode.getModeD().getPeriod() % refresherInterval == 0) {
-            factorModeDifference = mode.getModeD().getPeriod() / refresherInterval;
-        } else {
-            // Todo send an exception
-        }
-    }
-
-    private void setMinRefreshInterval() {
-        // the Periodical Mode is supposed to never be null !!
-        refresherInterval = mode.getModeP().getPeriod();
-
-        if (mode.getModeA() != null && refresherInterval > mode.getModeA().getPeriod()) {
-            refresherInterval = mode.getModeA().getPeriod();
-        }
-        if (mode.getModeR() != null && refresherInterval > mode.getModeR().getPeriod()) {
-            refresherInterval = mode.getModeR().getPeriod();
-        }
-        if (mode.getModeT() != null && refresherInterval > mode.getModeT().getPeriod()) {
-            refresherInterval = mode.getModeT().getPeriod();
-        }
-        /*
-         * if ( ( m_mode.getModeC() != null ) && ( min >
-         * m_mode.getModeC().getPeriod() ) ) { m_refresherInterval =
-         * m_mode.getModeC().getPeriod(); }
-         */
-        if (mode.getModeD() != null && refresherInterval > mode.getModeD().getPeriod()) {
-            refresherInterval = mode.getModeD().getPeriod();
-        }
-    }
-
-}
+package Common.Archiver.Collector;
+
+import fr.esrf.Tango.DevState;
+import fr.esrf.TangoDs.TangoConst;
+import fr.soleil.archiving.hdbtdb.api.tools.mode.Mode;
+import fr.soleil.archiving.hdbtdb.api.tools.mode.ModeAbsolu;
+import fr.soleil.archiving.hdbtdb.api.tools.mode.ModeRelatif;
+import fr.soleil.lib.project.ObjectUtils;
+
+public abstract class ModeHandler {
+    // This class has been defined as abstract just to keep one object in the
+    // Hdb part and an other in the Tdb part
+    // It has been done after the archiver developement, and it allows to reduce
+    // the impacts in the archivers code
+    private final Mode mode;
+
+    private int factorModePeriodic = 0;
+    private int factorModeAbsolute = 0;
+    private int factorModeRelative = 0;
+    private int factorModeThreshold = 0;
+    public int factorModeDifference = 0;
+    // private int factorModeCalcul = 0;
+
+    // private final String name = this.getClass().getSimpleName();
+
+    private int refresherInterval;
+    private final boolean hasRounding = true;
+
+    public ModeHandler(final Mode archiverMode) {
+        mode = archiverMode;
+
+        // Minimum polling interval definition
+        setMinRefreshInterval();
+        // Mode factor calculation
+        initFactor();
+    }
+
+    public int getRefreshInterval() {
+        return refresherInterval;
+    }
+
+    public Mode getMode() {
+        return mode;
+    }
+
+    public boolean isDataArchivable(final ModesCounters attModeCounter, final int dataType, final Object currentEvent,
+            final Object previousEvent) {
+        double currentEventD = -1;
+        double previousEventD = -1;
+
+        final boolean isCurrentNull = currentEvent == null;
+        final boolean isPreviousNull = previousEvent == null;
+
+        switch (dataType) {
+            case TangoConst.Tango_DEV_STRING:
+                // here, currentEvent and previousEvent are String values
+                if (!ObjectUtils.sameObject(currentEvent, previousEvent)) {
+                    currentEventD = previousEventD + 1;// so that the difference mode's archiving condition is triggered
+                }
+                break;
+            case TangoConst.Tango_DEV_STATE:
+                final DevState currentEventState = (DevState) currentEvent;
+                final DevState previousEventState = (DevState) previousEvent;
+                currentEventD = isCurrentNull ? -1 : currentEventState.value();
+                previousEventD = isPreviousNull ? -1 : previousEventState.value();
+                // System.out.println(
+                // "TdbModeHandler/isDataArchivable/currentEventD/"+currentEventD+"/previousEventD/"+previousEventD
+                // );
+                break;
+            // case TangoConst.Tango_DEV_UCHAR:
+            // currentEventD = isCurrentNull ? -1 : ((Byte)
+            // currentEvent).doubleValue();
+            // previousEventD = isPreviousNull ? -1 : ((Byte)
+            // previousEvent).doubleValue();
+            // break;
+            case TangoConst.Tango_DEV_LONG:
+            case TangoConst.Tango_DEV_ULONG:
+                currentEventD = isCurrentNull ? -1 : ((Integer) currentEvent).doubleValue();
+                previousEventD = isPreviousNull ? -1 : ((Integer) previousEvent).doubleValue();
+                break;
+            case TangoConst.Tango_DEV_LONG64:
+            case TangoConst.Tango_DEV_ULONG64:
+                currentEventD = isCurrentNull ? -1 : ((Long) currentEvent).doubleValue();
+                previousEventD = isPreviousNull ? -1 : ((Long) previousEvent).doubleValue();
+                break;
+            case TangoConst.Tango_DEV_BOOLEAN:
+                currentEventD = isCurrentNull ? -1 : ((Boolean) currentEvent).booleanValue() ? 1 : 0;
+                previousEventD = isPreviousNull ? -1 : ((Boolean) previousEvent).booleanValue() ? 1 : 0;
+                break;
+            case TangoConst.Tango_DEV_UCHAR:
+            case TangoConst.Tango_DEV_SHORT:
+            case TangoConst.Tango_DEV_USHORT:
+                currentEventD = isCurrentNull ? -1 : ((Short) currentEvent).doubleValue();
+                previousEventD = isPreviousNull ? -1 : ((Short) previousEvent).doubleValue();
+                break;
+            case TangoConst.Tango_DEV_FLOAT:
+                currentEventD = isCurrentNull ? -1 : ((Float) currentEvent).doubleValue();
+                previousEventD = isPreviousNull ? -1 : ((Float) previousEvent).doubleValue();
+                break;
+            case TangoConst.Tango_DEV_DOUBLE:
+                currentEventD = isCurrentNull ? -1 : ((Double) currentEvent).doubleValue();
+                previousEventD = isPreviousNull ? -1 : ((Double) previousEvent).doubleValue();
+                break;
+            default:
+                if (currentEvent instanceof Number && previousEvent instanceof Number) {
+                    currentEventD = isCurrentNull ? -1 : ((Double) currentEvent).doubleValue();
+                    previousEventD = isPreviousNull ? -1 : ((Double) previousEvent).doubleValue();
+                }
+                if (currentEvent instanceof String && previousEvent instanceof String) {
+                    String newCurrentEventString = currentEvent == null ? "" : (String) currentEvent;
+                    String newPreviousEventString = previousEvent == null ? "" : (String) previousEvent;
+                    if (!newCurrentEventString.equals(newPreviousEventString)) {
+                        currentEventD = previousEventD + 1;// so that the difference
+                        // mode's archiving
+                        // condition is triggered
+                    }
+                }
+                break;
+        }
+
+        boolean result = false;
+        // All the modes must be tested at least to increment the various
+        // counters
+        if (isDataArchivableModeP(attModeCounter)) {
+            result = true;
+        }
+        if (isDataArchivableModeA(attModeCounter, isCurrentNull, isPreviousNull, currentEventD, previousEventD)) {
+            result = true;
+        }
+        if (isDataArchivableModeR(attModeCounter, isCurrentNull, isPreviousNull, currentEventD, previousEventD)) {
+            result = true;
+        }
+        if (isDataArchivableModeT(attModeCounter, isCurrentNull, currentEventD)) {
+            result = true;
+        }
+        if (isDataArchivableModeC(attModeCounter, isCurrentNull, isPreviousNull, currentEventD, previousEventD)) {
+            result = true;
+        }
+        if (isDataArchivableModeD(attModeCounter, isCurrentNull, isPreviousNull, currentEventD, previousEventD)) {
+            result = true;
+        }
+        if (isDataArchivableModeE(attModeCounter, isCurrentNull, isPreviousNull, currentEventD, previousEventD)) {
+            result = true;
+        }
+        return result;
+    }
+
+    private boolean isDataArchivableModeP(final ModesCounters attModeCounter) {
+        if (mode.getModeP() == null) {
+            return false;
+        }
+
+        if (attModeCounter.getCountModeP() < factorModePeriodic) {
+            // Util.out4.println(m_myName + ".isDataArchivableModeP");
+            // Util.out4.println("countModePeriodic = " +
+            // attModeCounter.getCountModeP() + " < " +
+            // "m_factorModePeriodic = " + m_factorModePeriodic);
+            attModeCounter.incremCountModeP();
+            return false;
+        } else {
+            attModeCounter.initCountModeP();
+            // Util.out4.println(m_myName + ".isDataArchivableModeP");
+            // Util.out4.println("countModePeriodic = " +
+            // attModeCounter.getCountModeP() + " > " +
+            // "m_factorModePeriodic = " + m_factorModePeriodic);
+            return true;
+        }
+    }
+
+    private boolean isDataArchivableModeA(final ModesCounters attModeCounter, final boolean isCurrentNull,
+            final boolean isPreviousNull, final double currentEvent, double previousEvent) {
+        if (mode.getModeA() == null) {
+            return false;
+        }
+
+        if (attModeCounter.getCountModeA() < factorModeAbsolute) {
+            attModeCounter.incremCountModeA();
+            return false;
+        } else {
+            attModeCounter.initCountModeA();
+
+            if (isCurrentNull && isPreviousNull) {
+                return false;
+            } else if (isCurrentNull || isPreviousNull) {
+                return true;
+            }
+            // System.out.println("=/=/=/=/=/=/=/=/=/=//=/=/=/=/=/=/=/=/=/=/=/=/=/=/=/=/=/  derive lente: "
+            // + m_mode.getModeA().isSlow_drift());
+            if (mode.getModeA().isSlow_drift()) {
+                if (mode.getModeA().getPrev_stored_val() == ModeAbsolu.SLOW_DRIFT_FIRST_VAL) {
+                    mode.getModeA().setPrev_stored_val(previousEvent);
+                } else {
+                    previousEvent = mode.getModeA().getPrev_stored_val();
+                }
+            }
+            final double lowerLimit = previousEvent - Math.abs(mode.getModeA().getValInf());
+            final double upperLimit = previousEvent + Math.abs(mode.getModeA().getValSup());
+
+            if (currentEvent <= lowerLimit || currentEvent >= upperLimit) {
+
+                if (mode.getModeA().isSlow_drift()) {
+                    mode.getModeA().setPrev_stored_val(currentEvent);
+                }
+                return true;
+            } else {
+                return false;
+            }
+        }
+    }
+
+    private boolean isDataArchivableModeR(final ModesCounters attModeCounter, final boolean isCurrentNull,
+            final boolean isPreviousNull, final double currentEvent, double previousEvent) {
+        if (mode.getModeR() == null) {
+            return false;
+        }
+
+        if (attModeCounter.getCountModeR() < factorModeRelative) {
+            attModeCounter.incremCountModeR();
+            return false;
+        } else {
+            attModeCounter.initCountModeR();
+
+            if (isCurrentNull && isPreviousNull) {
+                return false;
+            } else if (isCurrentNull || isPreviousNull) {
+                return true;
+            }
+
+            if (mode.getModeR().isSlow_drift()
+                    && mode.getModeR().getPrev_stored_val() != ModeRelatif.SLOW_DRIFT_FIRST_VAL) {
+                previousEvent = mode.getModeR().getPrev_stored_val();
+            }
+            double lower_limit = 0;
+            double upper_limit = 0;
+
+            final double percentInf = Math.abs(mode.getModeR().getPercentInf() / 100.0);
+            final double percentSup = Math.abs(mode.getModeR().getPercentSup() / 100.0);
+
+            final double deltaInf = percentInf * Math.abs(previousEvent);
+            final double deltaSup = percentSup * Math.abs(previousEvent);
+
+            lower_limit = previousEvent - deltaInf;
+            upper_limit = previousEvent + deltaSup;
+
+            if (currentEvent < lower_limit || currentEvent > upper_limit) {
+                if (mode.getModeR().isSlow_drift()) {
+                    mode.getModeR().setPrev_stored_val(currentEvent);
+                }
+
+                // System.out.println("TRUE");
+                return true;
+            } else {
+                // System.out.println("FALSE");
+                return false;
+            }
+        }
+    }
+
+    private boolean isDataArchivableModeT(final ModesCounters attModeCounter, final boolean isCurrentNull,
+            final double currentEvent) {
+        if (mode.getModeT() == null) {
+            return false;
+        }
+
+        if (attModeCounter.getCountModeT() < factorModeThreshold) {
+            attModeCounter.incremCountModeT();
+            return false;
+        } else {
+            attModeCounter.initCountModeT();
+
+            if (isCurrentNull) {
+                return false;
+            }
+
+            /*
+             * System.out.println (m_myName + ".isDataArchivableModeT \r\n\t" +
+             * "\r\n\t" + "current value :" + currentEvent + "\r\n\t" +
+             * "previous value :" + previousEvent);
+             */
+
+            if (currentEvent <= mode.getModeT().getThresholdInf() || currentEvent >= mode.getModeT().getThresholdSup()) {
+
+                // System.out.println ("TRUE");
+                return true;
+            } else {
+                // System.out.println ("FALSE");
+                return false;
+            }
+        }
+    }
+
+    private boolean isDataArchivableModeD(final ModesCounters attModeCounter, final boolean isCurrentNull,
+            final boolean isPreviousNull, final double currentEvent, final double previousEvent) {
+        if (mode.getModeD() == null) {
+            return false;
+        }
+        if (attModeCounter.getCountModeD() < factorModeDifference) {
+            attModeCounter.incremCountModeD();
+            return false;
+        } else {
+            attModeCounter.initCountModeD();
+            if (isCurrentNull && isPreviousNull || (Double.isNaN(currentEvent) && Double.isNaN(previousEvent))) {
+                return false;
+            } else if (isCurrentNull || isPreviousNull) {
+                return true;
+            }
+            // if (isCurrentNull || isPreviousNull) {
+            // System.out
+            // .println("IF isDataArchivableModeD: " + (isCurrentNull !=
+            // isPreviousNull));
+            // return isCurrentNull != isPreviousNull;
+            // }
+
+            if (currentEvent != previousEvent) {
+                // System.out.println("TRUE");
+                return true;
+            } else {
+                // System.out.println("FALSE");
+                return false;
+            }
+        }
+    }
+
+    // todo faire la suite ...
+    private boolean isDataArchivableModeC(final ModesCounters attModeCounter, final boolean isCurrentNull,
+            final boolean isPreviousNull, final double currentEvent, final double previousEvent) {
+        return false;
+    }
+
+    private boolean isDataArchivableModeE(final ModesCounters attModeCounter, final boolean isCurrentNull,
+            final boolean isPreviousNull, final double currentEvent, final double previousEvent) {
+        return false;
+    }
+
+    private void initFactor() {
+        if (hasRounding) {
+            initFactorWithRounding();
+        } else {
+            initFactorWithoutRounding();
+        }
+    }
+
+    private void initFactorWithRounding() {
+        factorModePeriodic = (int) Math.round(mode.getModeP().getPeriod() * 1.0 / (refresherInterval * 1.0));
+
+        if (mode.getModeA() != null) {
+            factorModeAbsolute = (int) Math.round(mode.getModeA().getPeriod() * 1.0 / (refresherInterval * 1.0));
+        }
+
+        if (mode.getModeR() != null) {
+            factorModeRelative = (int) Math.round(mode.getModeR().getPeriod() * 1.0 / (refresherInterval * 1.0));
+        }
+
+        if (mode.getModeT() != null) {
+            factorModeThreshold = (int) Math.round(mode.getModeT().getPeriod() * 1.0 / (refresherInterval * 1.0));
+        }
+
+        if (mode.getModeD() != null) {
+            factorModeDifference = (int) Math.round(mode.getModeD().getPeriod() * 1.0 / (refresherInterval * 1.0));
+        }
+
+        // if (mode.getModeC() != null) {
+        // factorModeCalcul = (int) Math.round(mode.getModeC().getPeriod() * 1.0
+        // / (refresherInterval * 1.0));
+        // }
+    }
+
+    // Not really used
+    private void initFactorWithoutRounding() {
+        if (mode.getModeP().getPeriod() % refresherInterval == 0) {
+            factorModePeriodic = mode.getModeP().getPeriod() / refresherInterval;
+        } else {
+            // Todo send an exception
+        }
+        if (mode.getModeA() != null && mode.getModeA().getPeriod() % refresherInterval == 0) {
+            factorModeAbsolute = mode.getModeA().getPeriod() / refresherInterval;
+        } else {
+            // Todo send an exception
+        }
+        if (mode.getModeR() != null && mode.getModeR().getPeriod() % refresherInterval == 0) {
+            factorModeRelative = mode.getModeR().getPeriod() / refresherInterval;
+        } else {
+            // Todo send an exception
+        }
+        if (mode.getModeT() != null && mode.getModeT().getPeriod() % refresherInterval == 0) {
+            factorModeThreshold = mode.getModeT().getPeriod() / refresherInterval;
+        } else {
+            // Todo send an exception
+        }
+        // if (mode.getModeC() != null && mode.getModeC().getPeriod() %
+        // refresherInterval == 0) {
+        // factorModeCalcul = mode.getModeC().getPeriod() / refresherInterval;
+        // }
+        // else {
+        // // Todo send an exception
+        // }
+        if (mode.getModeD() != null && mode.getModeD().getPeriod() % refresherInterval == 0) {
+            factorModeDifference = mode.getModeD().getPeriod() / refresherInterval;
+        } else {
+            // Todo send an exception
+        }
+    }
+
+    private void setMinRefreshInterval() {
+        // the Periodical Mode is supposed to never be null !!
+        refresherInterval = mode.getModeP().getPeriod();
+
+        if (mode.getModeA() != null && refresherInterval > mode.getModeA().getPeriod()) {
+            refresherInterval = mode.getModeA().getPeriod();
+        }
+        if (mode.getModeR() != null && refresherInterval > mode.getModeR().getPeriod()) {
+            refresherInterval = mode.getModeR().getPeriod();
+        }
+        if (mode.getModeT() != null && refresherInterval > mode.getModeT().getPeriod()) {
+            refresherInterval = mode.getModeT().getPeriod();
+        }
+        /*
+         * if ( ( m_mode.getModeC() != null ) && ( min >
+         * m_mode.getModeC().getPeriod() ) ) { m_refresherInterval =
+         * m_mode.getModeC().getPeriod(); }
+         */
+        if (mode.getModeD() != null && refresherInterval > mode.getModeD().getPeriod()) {
+            refresherInterval = mode.getModeD().getPeriod();
+        }
+    }
+
+}
diff --git a/src/main/java/Common/Archiver/Collector/ModesCounters.java b/archiving-common-collector/src/main/java/Common/Archiver/Collector/ModesCounters.java
similarity index 95%
rename from src/main/java/Common/Archiver/Collector/ModesCounters.java
rename to archiving-common-collector/src/main/java/Common/Archiver/Collector/ModesCounters.java
index c9bfafc6868e451f2fd0af6024b6226642483ecc..e62ce41f20ad4955c451d133541c6b389160b733 100644
--- a/src/main/java/Common/Archiver/Collector/ModesCounters.java
+++ b/archiving-common-collector/src/main/java/Common/Archiver/Collector/ModesCounters.java
@@ -1,129 +1,129 @@
-package Common.Archiver.Collector;
-
-/**
- * This class manages all the useful counters for the ModeHandler decision for
- * one attribute
- * 
- * @author PIERREJOSEPH
- */
-public final class ModesCounters {
-    private int countModePeriodic;
-    private int countModeAbsolute;
-    private int countModeRelative;
-    private int countModeThreshold;
-    private int countModeDifference;
-    private int countModeCalcul;
-    private int countModeExtern;
-
-    private static final int INIT_COUNTER_VALUE = 1;
-
-    /**
-     * Creates a new instance of AttributeModeHandler
-     */
-    public ModesCounters() {
-	init();
-    }
-
-    public void init() {
-	initCountModeP();
-	initCountModeA();
-	initCountModeR();
-	initCountModeT();
-	initCountModeD();
-	initCountModeC();
-	initCountModeE();
-    }
-
-    /** ======================= Init methods ======================== **/
-    public void initCountModeP() {
-	countModePeriodic = INIT_COUNTER_VALUE;
-    }
-
-    public void initCountModeA() {
-	countModeAbsolute = INIT_COUNTER_VALUE;
-    }
-
-    public void initCountModeR() {
-	countModeRelative = INIT_COUNTER_VALUE;
-    }
-
-    public void initCountModeT() {
-	countModeThreshold = INIT_COUNTER_VALUE;
-    }
-
-    public void initCountModeD() {
-	countModeDifference = INIT_COUNTER_VALUE;
-    }
-
-    public void initCountModeC() {
-	countModeCalcul = INIT_COUNTER_VALUE;
-    }
-
-    public void initCountModeE() {
-	countModeExtern = INIT_COUNTER_VALUE;
-    }
-
-    /** ======================= Gets methods ======================== **/
-    public int getCountModeP() {
-	return countModePeriodic;
-    }
-
-    public int getCountModeA() {
-	return countModeAbsolute;
-    }
-
-    public int getCountModeR() {
-	return countModeRelative;
-    }
-
-    public int getCountModeT() {
-	return countModeThreshold;
-    }
-
-    public int getCountModeD() {
-	return countModeDifference;
-    }
-
-    public int getCountModeC() {
-	return countModeCalcul;
-    }
-
-    public int getCountModeE() {
-	return countModeExtern;
-    }
-
-    /** ======================= Increments methods ======================== **/
-    public void incremCountModeP() {
-	countModePeriodic++;
-    }
-
-    public void incremCountModeA() {
-	countModeAbsolute++;
-    }
-
-    public void incremCountModeR() {
-	countModeRelative++;
-    }
-
-    public void incremCountModeT() {
-	countModeThreshold++;
-    }
-
-    public void incremCountModeD() {
-	countModeDifference++;
-    }
-
-    public void incremCountModeC() {
-	countModeCalcul++;
-    }
-
-    public void incremCountModeE() {
-	countModeExtern++;
-    }
-
-    @Override
-    public String toString() {
-	return "P=" + countModePeriodic + " A=" + countModeAbsolute + " R=" + countModeRelative + " T="
-		+ countModeThreshold + " C=" + countModeCalcul + " D=" + countModeDifference + "E=" + countModeExtern;
-    }
-}
+package Common.Archiver.Collector;
+
+/**
+ * This class manages all the useful counters for the ModeHandler decision for
+ * one attribute
+ * 
+ * @author PIERREJOSEPH
+ */
+public final class ModesCounters {
+    private int countModePeriodic;
+    private int countModeAbsolute;
+    private int countModeRelative;
+    private int countModeThreshold;
+    private int countModeDifference;
+    private int countModeCalcul;
+    private int countModeExtern;
+
+    private static final int INIT_COUNTER_VALUE = 1;
+
+    /**
+     * Creates a new instance of AttributeModeHandler
+     */
+    public ModesCounters() {
+	init();
+    }
+
+    public void init() {
+	initCountModeP();
+	initCountModeA();
+	initCountModeR();
+	initCountModeT();
+	initCountModeD();
+	initCountModeC();
+	initCountModeE();
+    }
+
+    /** ======================= Init methods ======================== **/
+    public void initCountModeP() {
+	countModePeriodic = INIT_COUNTER_VALUE;
+    }
+
+    public void initCountModeA() {
+	countModeAbsolute = INIT_COUNTER_VALUE;
+    }
+
+    public void initCountModeR() {
+	countModeRelative = INIT_COUNTER_VALUE;
+    }
+
+    public void initCountModeT() {
+	countModeThreshold = INIT_COUNTER_VALUE;
+    }
+
+    public void initCountModeD() {
+	countModeDifference = INIT_COUNTER_VALUE;
+    }
+
+    public void initCountModeC() {
+	countModeCalcul = INIT_COUNTER_VALUE;
+    }
+
+    public void initCountModeE() {
+	countModeExtern = INIT_COUNTER_VALUE;
+    }
+
+    /** ======================= Gets methods ======================== **/
+    public int getCountModeP() {
+	return countModePeriodic;
+    }
+
+    public int getCountModeA() {
+	return countModeAbsolute;
+    }
+
+    public int getCountModeR() {
+	return countModeRelative;
+    }
+
+    public int getCountModeT() {
+	return countModeThreshold;
+    }
+
+    public int getCountModeD() {
+	return countModeDifference;
+    }
+
+    public int getCountModeC() {
+	return countModeCalcul;
+    }
+
+    public int getCountModeE() {
+	return countModeExtern;
+    }
+
+    /** ======================= Increments methods ======================== **/
+    public void incremCountModeP() {
+	countModePeriodic++;
+    }
+
+    public void incremCountModeA() {
+	countModeAbsolute++;
+    }
+
+    public void incremCountModeR() {
+	countModeRelative++;
+    }
+
+    public void incremCountModeT() {
+	countModeThreshold++;
+    }
+
+    public void incremCountModeD() {
+	countModeDifference++;
+    }
+
+    public void incremCountModeC() {
+	countModeCalcul++;
+    }
+
+    public void incremCountModeE() {
+	countModeExtern++;
+    }
+
+    @Override
+    public String toString() {
+	return "P=" + countModePeriodic + " A=" + countModeAbsolute + " R=" + countModeRelative + " T="
+		+ countModeThreshold + " C=" + countModeCalcul + " D=" + countModeDifference + "E=" + countModeExtern;
+    }
+}
diff --git a/archivingmanager/pom.xml b/archivingmanager/pom.xml
new file mode 100644
index 0000000000000000000000000000000000000000..9359c2f4b34a73bc7da84e978f57191c7fa98e4d
--- /dev/null
+++ b/archivingmanager/pom.xml
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"
+  xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+  <modelVersion>4.0.0</modelVersion>
+
+  <parent>
+    <groupId>fr.soleil.deviceservers</groupId>
+    <artifactId>historicalarchivingservers</artifactId>
+    <version>2.6.1</version>
+  </parent>
+
+  <groupId>fr.soleil.deviceservers</groupId>
+  <artifactId>archivingmanager</artifactId>
+
+  <developers>
+    <developer>
+      <id>girardot</id>
+      <name>Raphaël GIRARDOT</name>
+      <email>raphael.girardot@synchrotron-soleil.fr</email>
+      <organization>Synchrotron Soleil</organization>
+      <organizationUrl>http://www.synchrotron-soleil.fr</organizationUrl>
+      <roles>
+        <role>Java Developer</role>
+      </roles>
+      <timezone>1</timezone>
+    </developer>
+  </developers>
+
+  <dependencies>
+    <!--OLD ARCHIVER NEEDS IT dependency -->
+    <dependency>
+      <groupId>log4j</groupId>
+      <artifactId>log4j</artifactId>
+    </dependency>
+    <dependency>
+      <groupId>org.tango</groupId>
+      <artifactId>JTangoServer</artifactId>
+    </dependency>
+  </dependencies>
+
+  <properties>
+    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
+  </properties>
+
+</project>
diff --git a/src/main/java/ArchivingManager/ArchivingConfigureCmd.java b/archivingmanager/src/main/java/ArchivingManager/ArchivingConfigureCmd.java
similarity index 96%
rename from src/main/java/ArchivingManager/ArchivingConfigureCmd.java
rename to archivingmanager/src/main/java/ArchivingManager/ArchivingConfigureCmd.java
index e0ce272dd2ffb1b0b639bce5047150c2b20f2be0..05b3aed138d706bc7a39c07f394c256a8c369d34 100644
--- a/src/main/java/ArchivingManager/ArchivingConfigureCmd.java
+++ b/archivingmanager/src/main/java/ArchivingManager/ArchivingConfigureCmd.java
@@ -1,164 +1,164 @@
-//+======================================================================
-// $Source: /cvsroot/tango-cs/tango/jserver/archiving/ArchivingManager/ArchivingConfigureCmd.java,v $
-//
-// Project:      Tango Device Server
-//
-// Description:  Java source code for the command TemplateClass of the
-//               ArchivingManager class.
-//
-// $Author: chinkumo $
-//
-// $Revision: 1.6 $
-//
-// $Log: ArchivingConfigureCmd.java,v $
-// Revision 1.6  2005/11/29 17:34:41  chinkumo
-// no message
-//
-// Revision 1.5.10.2  2005/11/29 16:14:07  chinkumo
-// Code reformated (pogo compatible)
-//
-// Revision 1.5.10.1  2005/11/15 13:46:23  chinkumo
-// ...
-//
-// Revision 1.5  2005/06/14 10:24:03  chinkumo
-// Branch (archivingManager_1_0_1-branch_0)  and HEAD merged.
-//
-// Revision 1.4.4.1  2005/06/13 14:51:15  chinkumo
-// The ArchivingManager device was regenerated in Tango V5.
-//
-// Revision 1.4  2005/01/28 13:11:13  taurel
-// Some changes in source files to be Pogo compatible
-//
-//
-// copyleft :    European Synchrotron Radiation Facility
-//               BP 220, Grenoble 38043
-//               FRANCE
-//
-//-======================================================================
-//
-//  		This file is generated by POGO
-//	(Program Obviously used to Generate tango Object)
-//
-//         (c) - Software Engineering Group - ESRF
-//=============================================================================
-
-/**
- * @author	$Author: chinkumo $
- * @version	$Revision: 1.6 $
- */
-package ArchivingManager;
-
-import org.omg.CORBA.Any;
-
-import fr.esrf.Tango.DevFailed;
-import fr.esrf.Tango.DispLevel;
-import fr.esrf.TangoDs.Command;
-import fr.esrf.TangoDs.DeviceImpl;
-import fr.esrf.TangoDs.Except;
-import fr.esrf.TangoDs.Util;
-
-/**
- * Class Description: This command configures the connection to the historical
- * and temporary databases. It then needs 4 parameters : a login and password
- * for Hdb + a login and password for Tdb
- */
-
-public class ArchivingConfigureCmd extends Command {
-    // ===============================================================
-    /**
-     * Constructor for Command class ArchivingConfigureCmd
-     * 
-     * @param name
-     *            command name
-     * @param in
-     *            argin type
-     * @param out
-     *            argout type
-     */
-    // ===============================================================
-    public ArchivingConfigureCmd(final String name, final int in, final int out) {
-	super(name, in, out);
-    }
-
-    // ===============================================================
-    /**
-     * Constructor for Command class ArchivingConfigureCmd
-     * 
-     * @param name
-     *            command name
-     * @param in
-     *            argin type
-     * @param inComments
-     *            argin description
-     * @param out
-     *            argout type
-     * @param outComments
-     *            argout description
-     */
-    // ===============================================================
-    public ArchivingConfigureCmd(final String name, final int in, final int out, final String inComments,
-	    final String outComments) {
-	super(name, in, out, inComments, outComments);
-    }
-
-    // ===============================================================
-    /**
-     * Constructor for Command class ArchivingConfigureCmd
-     * 
-     * @param name
-     *            command name
-     * @param in
-     *            argin type
-     * @param inComments
-     *            argin description
-     * @param out
-     *            argout type
-     * @param outComments
-     *            argout description
-     * @param level
-     *            The command display type OPERATOR or EXPERT
-     */
-    // ===============================================================
-    public ArchivingConfigureCmd(final String name, final int in, final int out, final String inComments,
-	    final String outComments, final DispLevel level) {
-	super(name, in, out, inComments, outComments, level);
-    }
-
-    // ===============================================================
-    /**
-     * return the result of the device's command.
-     */
-    // ===============================================================
-    @Override
-    public Any execute(final DeviceImpl device, final Any in_any) throws DevFailed {
-	Util.out2.println("ArchivingConfigureCmd.execute(): arrived");
-	if (!(device instanceof ArchivingManager)) {
-	    Except.throw_exception("DEVICE_ERROR", "Device parameter is not instance of ArchivingManager",
-		    "ArchivingManager");
-	}
-
-	final String[] argin = extract_DevVarStringArray(in_any);
-	((ArchivingManager) device).archiving_configure(argin);
-	return insert();
-    }
-
-    // ===============================================================
-    /**
-     * Check if it is allowed to execute the command.
-     */
-    // ===============================================================
-    @Override
-    public boolean is_allowed(final DeviceImpl device, final Any dataIn) {
-	// End of Generated Code
-
-	// Re-Start of Generated Code
-	return true;
-    }
-}
-
-// -----------------------------------------------------------------------------
-/*
- * end of $Source:
- * /cvsroot/tango-cs/tango/jserver/archiving/ArchivingManager/ArchivingConfigureCmd
- * .java,v $
- */
+//+======================================================================
+// $Source: /cvsroot/tango-cs/tango/jserver/archiving/ArchivingManager/ArchivingConfigureCmd.java,v $
+//
+// Project:      Tango Device Server
+//
+// Description:  Java source code for the command TemplateClass of the
+//               ArchivingManager class.
+//
+// $Author: chinkumo $
+//
+// $Revision: 1.6 $
+//
+// $Log: ArchivingConfigureCmd.java,v $
+// Revision 1.6  2005/11/29 17:34:41  chinkumo
+// no message
+//
+// Revision 1.5.10.2  2005/11/29 16:14:07  chinkumo
+// Code reformated (pogo compatible)
+//
+// Revision 1.5.10.1  2005/11/15 13:46:23  chinkumo
+// ...
+//
+// Revision 1.5  2005/06/14 10:24:03  chinkumo
+// Branch (archivingManager_1_0_1-branch_0)  and HEAD merged.
+//
+// Revision 1.4.4.1  2005/06/13 14:51:15  chinkumo
+// The ArchivingManager device was regenerated in Tango V5.
+//
+// Revision 1.4  2005/01/28 13:11:13  taurel
+// Some changes in source files to be Pogo compatible
+//
+//
+// copyleft :    European Synchrotron Radiation Facility
+//               BP 220, Grenoble 38043
+//               FRANCE
+//
+//-======================================================================
+//
+//  		This file is generated by POGO
+//	(Program Obviously used to Generate tango Object)
+//
+//         (c) - Software Engineering Group - ESRF
+//=============================================================================
+
+/**
+ * @author	$Author: chinkumo $
+ * @version	$Revision: 1.6 $
+ */
+package ArchivingManager;
+
+import org.omg.CORBA.Any;
+
+import fr.esrf.Tango.DevFailed;
+import fr.esrf.Tango.DispLevel;
+import fr.esrf.TangoDs.Command;
+import fr.esrf.TangoDs.DeviceImpl;
+import fr.esrf.TangoDs.Except;
+import fr.esrf.TangoDs.Util;
+
+/**
+ * Class Description: This command configures the connection to the historical
+ * and temporary databases. It then needs 4 parameters : a login and password
+ * for Hdb + a login and password for Tdb
+ */
+
+public class ArchivingConfigureCmd extends Command {
+    // ===============================================================
+    /**
+     * Constructor for Command class ArchivingConfigureCmd
+     * 
+     * @param name
+     *            command name
+     * @param in
+     *            argin type
+     * @param out
+     *            argout type
+     */
+    // ===============================================================
+    public ArchivingConfigureCmd(final String name, final int in, final int out) {
+	super(name, in, out);
+    }
+
+    // ===============================================================
+    /**
+     * Constructor for Command class ArchivingConfigureCmd
+     * 
+     * @param name
+     *            command name
+     * @param in
+     *            argin type
+     * @param inComments
+     *            argin description
+     * @param out
+     *            argout type
+     * @param outComments
+     *            argout description
+     */
+    // ===============================================================
+    public ArchivingConfigureCmd(final String name, final int in, final int out, final String inComments,
+	    final String outComments) {
+	super(name, in, out, inComments, outComments);
+    }
+
+    // ===============================================================
+    /**
+     * Constructor for Command class ArchivingConfigureCmd
+     * 
+     * @param name
+     *            command name
+     * @param in
+     *            argin type
+     * @param inComments
+     *            argin description
+     * @param out
+     *            argout type
+     * @param outComments
+     *            argout description
+     * @param level
+     *            The command display type OPERATOR or EXPERT
+     */
+    // ===============================================================
+    public ArchivingConfigureCmd(final String name, final int in, final int out, final String inComments,
+	    final String outComments, final DispLevel level) {
+	super(name, in, out, inComments, outComments, level);
+    }
+
+    // ===============================================================
+    /**
+     * return the result of the device's command.
+     */
+    // ===============================================================
+    @Override
+    public Any execute(final DeviceImpl device, final Any in_any) throws DevFailed {
+	Util.out2.println("ArchivingConfigureCmd.execute(): arrived");
+	if (!(device instanceof ArchivingManager)) {
+	    Except.throw_exception("DEVICE_ERROR", "Device parameter is not instance of ArchivingManager",
+		    "ArchivingManager");
+	}
+
+	final String[] argin = extract_DevVarStringArray(in_any);
+	((ArchivingManager) device).archiving_configure(argin);
+	return insert();
+    }
+
+    // ===============================================================
+    /**
+     * Check if it is allowed to execute the command.
+     */
+    // ===============================================================
+    @Override
+    public boolean is_allowed(final DeviceImpl device, final Any dataIn) {
+	// End of Generated Code
+
+	// Re-Start of Generated Code
+	return true;
+    }
+}
+
+// -----------------------------------------------------------------------------
+/*
+ * end of $Source:
+ * /cvsroot/tango-cs/tango/jserver/archiving/ArchivingManager/ArchivingConfigureCmd
+ * .java,v $
+ */
diff --git a/src/main/java/ArchivingManager/ArchivingManager.java b/archivingmanager/src/main/java/ArchivingManager/ArchivingManager.java
similarity index 96%
rename from src/main/java/ArchivingManager/ArchivingManager.java
rename to archivingmanager/src/main/java/ArchivingManager/ArchivingManager.java
index 6952860f2433a4105b13285ebe62b2d606a45921..2e9a5eb9f9e5a88dfc005fed996428d686dcdac0 100644
--- a/src/main/java/ArchivingManager/ArchivingManager.java
+++ b/archivingmanager/src/main/java/ArchivingManager/ArchivingManager.java
@@ -1,1529 +1,1530 @@
-// +============================================================================
-// $Source:
-// /cvsroot/tango-cs/tango/jserver/archiving/ArchivingManager/ArchivingManager.java,v
-// $
-//
-// project : Tango Device Server
-//
-// Description: java source code for the ArchivingManager class and its
-// commands.
-// This class is derived from DeviceImpl class.
-// It represents the CORBA servant obbject which
-// will be accessed from the network. All commands which
-// can be executed on the ArchivingManager are implemented
-// in this file.
-//
-// $Author: pierrejoseph $
-//
-// $Revision: 1.19 $
-//
-// $Log: ArchivingManager.java,v $
-// Revision 1.19 2007/05/11 13:58:16 pierrejoseph
-// Attribute addition : release version
-//
-// Revision 1.18 2007/03/05 16:25:20 ounsy
-// non-static DataBase
-//
-// Revision 1.17 2007/02/26 16:14:24 ounsy
-// archiving devices now inherits just from DeviceImpl instead of
-// DeviceImplWithShutdownRunnable (they're nonlonger unexported onn shutdown)
-//
-// Revision 1.16 2007/02/01 13:49:47 pierrejoseph
-// minor changes
-//
-// Revision 1.15 2007/01/05 12:54:47 pierrejoseph
-// Modification of the ArchivingMessConfig object creation and so the
-// ArchivingStart and ArchivingModif methods argin has been simplified.
-//
-// Revision 1.14 2006/11/20 09:24:49 ounsy
-// minor changes
-//
-// Revision 1.13 2006/11/13 15:57:37 ounsy
-// all java devices now inherit from UnexportOnShutdownDeviceImpl instead of
-// from DeviceImpl
-//
-// Revision 1.12 2006/10/30 14:33:54 ounsy
-// modified the ArchivingConfigure command and the init_device method to init
-// the HDB and TDB connections separately
-//
-// Revision 1.11 2006/10/12 06:53:42 chinkumo
-// Argin comment modification for the archivingStartHdb command.
-// ==>modif pr�c�demment perdue
-//
-// Revision 1.10 2006/10/11 08:30:32 ounsy
-// modified the archiving_start commands to accept the same parameters as
-// Archivers
-//
-// Revision 1.9 2006/10/09 12:53:57 chinkumo
-// Argin comment modification for the archivingStartHdb command.
-//
-// Revision 1.8 2006/01/27 13:06:41 ounsy
-// organised imports
-//
-// Revision 1.7 2005/11/29 17:34:41 chinkumo
-// no message
-//
-// Revision 1.6.10.4 2005/11/29 16:14:07 chinkumo
-// Code reformated (pogo compatible)
-//
-// Revision 1.6.10.3 2005/11/15 13:46:24 chinkumo
-// ...
-//
-// Revision 1.6.10.2 2005/09/26 08:26:57 chinkumo
-// Minor changes !
-//
-// Revision 1.6.10.1 2005/09/16 08:10:22 chinkumo
-// The ArchivingManager now use exclusively ArchivingMessConfig object to
-// trigger archiving.
-//
-// Revision 1.6 2005/06/14 10:24:03 chinkumo
-// Branch (archivingManager_1_0_1-branch_0) and HEAD merged.
-//
-// Revision 1.5.4.3 2005/06/13 14:49:04 chinkumo
-// The ArchivingManager device was regenerated in Tango V5.
-// Changes made to improve the management of exceptions were reported here.
-// This class was also modified as some commands now returns a void object
-// (ArchivingStartHdb, ArchivingStartTdb, ArchivingStopHdb, ArchivingStopTdb,
-// ArchivingModifHdb, ArchivingModifTdb).
-//
-// Revision 1.5.4.2 2005/05/11 14:46:18 chinkumo
-// The ArchivingConfigure's command comment (for documentation ) was corrected.
-//
-// Revision 1.5.4.1 2005/05/03 16:33:01 chinkumo
-// Some constants in the class
-// 'fr.soleil.hdbtdbArchivingApi.ArchivingApi.ConfigConst' were renamed. Changes
-// reported here.
-//
-// Revision 1.5 2005/02/04 17:25:19 chinkumo
-// The trouble with grouped strategy when launching an archiving sequence was
-// fixed.
-
-// The grouped stopping functionnality was reported.
-//
-// Revision 1.4 2005/01/28 13:11:13 taurel
-// Some changes in source files to be Pogo compatible
-//
-// Revision 1.3 2005/01/26 16:33:33 chinkumo
-// Export of the new DServer source code.
-//
-//
-// copyleft : European Synchrotron Radiation Facility
-// BP 220, Grenoble 38043
-// FRANCE
-//
-// -============================================================================
-//
-// This file is generated by POGO
-// (Program Obviously used to Generate tango Object)
-//
-// (c) - Software Engineering Group - ESRF
-// =============================================================================
-
-package ArchivingManager;
-
-import java.util.Arrays;
-
-import org.omg.CORBA.SystemException;
-import org.omg.CORBA.UserException;
-import org.tango.utils.DevFailedUtils;
-
-import fr.esrf.Tango.DevFailed;
-import fr.esrf.Tango.DevState;
-import fr.esrf.Tango.ErrSeverity;
-import fr.esrf.TangoApi.DbDatum;
-import fr.esrf.TangoDs.Attribute;
-import fr.esrf.TangoDs.DeviceClass;
-import fr.esrf.TangoDs.DeviceImpl;
-import fr.esrf.TangoDs.Except;
-import fr.esrf.TangoDs.TangoConst;
-import fr.esrf.TangoDs.Util;
-import fr.soleil.archiving.common.api.ConnectionFactory;
-import fr.soleil.archiving.common.api.exception.ArchivingException;
-import fr.soleil.archiving.common.api.tools.GlobalConst;
-import fr.soleil.archiving.hdbtdb.api.ConfigConst;
-import fr.soleil.archiving.hdbtdb.api.HdbTdbConnectionParameters;
-import fr.soleil.archiving.hdbtdb.api.manager.ArchivingManagerApiRefFactory;
-import fr.soleil.archiving.hdbtdb.api.manager.IArchivingManagerApiRef;
-import fr.soleil.archiving.hdbtdb.api.tools.ArchivingMessConfig;
-import fr.soleil.archiving.hdbtdb.api.tools.mode.Mode;
-import fr.soleil.database.connection.AbstractDataBaseConnector;
-
-/**
- * Class Description: Device of Archiving system <Br>
- * <Br>
- * <br>
- * <b>ROLE</b><br>
- * This DeviceServer is used in order to manage the archiving of exported Tango
- * attributes device. <Br>
- * <Br>
- * <br>
- * <b>ARCHIVING TYPE</b><br>
- * There is two kind of archiving : <Br>
- * <Br>
- * <Li><b>The Historical archiving</b>, manage by HdbArchiver devices.<br>
- * This kind archiving allows to store in a database all the exported tango attributes.<br>
- * It is a continuous and never deleted storage.<br>
- * The frequency use for this kind of storage is usually small. <Br>
- * <Br> <Li><b>The Temporary archiving</b>, manage by TdbArchiver devices.<br>
- * This kind archiving allows to store in a database all the exported tango attributes.<br>
- * The stored values are kept in the database for a limited time ("Keeping Window" [4 hours - 24 hours]). Before being
- * stored into the database, values are first collected into files (timestamp, read value [, write value]). Those files
- * are periodically exported to the database. This export frequency must also be given ("Export Window" [5 seconds - 1
- * hour]).<br>
- * The frequency use for this kind of storage is usually high. <Br>
- * <Br>
- * <br>
- * <b>ARCHIVING MODE</b><br>
- * An archiving sequence must be tuned to follow one (or several) of the defined archiving modes :<br> <Li>The
- * <b>Periodical mode</b>, this mode allows to archive following a defined frequency.<br> <Li>The <b>Absolute mode</b>,
- * this mode allows to archive a value only if : <br>
- * &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <var>current_value</var> &gt; <var>previous_archived_value</var> +
- * <var>&delta;<sub>1</sub></var> &nbsp;&nbsp;&nbsp;&nbsp; or <br>
- * &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <var>current_value</var> &lt; <var>previous_archived_value</var> -
- * <var>&delta;<sub>2</sub></var>.<br> <Li>The <b>Relative mode</b>, this mode allows to archive a value only if :<br>
- * &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <var>current_value</var> &gt; <var>previous_archived_value</var>
- * <var>&micro;<sub>increase</sub></var> &nbsp;&nbsp;&nbsp;&nbsp; or <br>
- * &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <var>current_value</var> &lt; <var>previous_archived_value</var>
- * <var>&micro;<sub>decrease</sub></var>.<br>
- * &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (<var>&micro;<sub>increase</sub></var> and
- * <var>&micro;<sub>decrease</sub></var> are percentages) <Li>The <b>Threshold mode</b>, this mode allows to archive a
- * value only if :<br>
- * &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <var>current_value</var> &gt;
- * <var>threshold_value<sub>sup</sub></var> &nbsp;&nbsp;&nbsp;&nbsp; or <br>
- * &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <var>current_value</var> &lt;
- * <var>threshold_value<sub>min</sub></var>.<br>
- * (like alarms work).<br>
- * <Br>
- * <Br> <Li>The <b>On Calculation mode</b>, this mode allows to archive according to a user formula.<br> <Li>The <b>On
- * Difference mode</b>, this mode allows to archive when a value changes.<br> <Li>The <b>External mode</b>, this mode
- * allows to archive on the user demand.<br>
- * <br>
- * <br>
- * The 6 last mode must be associated to a periodic mode. <Br>
- * <Br>
- * 
- * @author $Author: pierrejoseph $
- * @version $Revision: 1.19 $
- */
-
-// --------- Start of States Description ----------
-/*
- * Device States Description: DevState.ON : The device is ready to use.
- * DevState.RUNNING : The device is executing a command and is not avalaible.
- * DevState.INIT : The device is initializing and still not ready to use.
- * DevState.ALARM : Either one of the two databases (HDB or TDB) is unreachable,
- * or there is no archiver one of them. DevState.FAULT : Either the two
- * databases (HDB and TDB) are unreachable, or there is no archiver at all.
- */
-// --------- End of States Description ----------
-public class ArchivingManager extends DeviceImpl
-/* WithShutdownRunnable */implements TangoConst {
-
-    protected int state;
-    private IArchivingManagerApiRef hdbManager, tdbManager;
-
-    private final String m_version;
-
-    // --------- Start of attributes data members ----------
-
-    // --------- End of attributes data members ----------
-
-    // --------- Start of properties data members ----------
-    /**
-     * Computer identifier on wich is settled the database DB. The identifier
-     * can be the computer name or its IP address. <br>
-     * <b>Default value : </b> hdb
-     */
-    protected String hdbHost;
-    /**
-     * Database name.<br>
-     * <b>Default value : </b> hdb
-     */
-    protected String hdbName;
-
-    /**
-     * Computer identifier on wich is settled the database TDB. The identifier
-     * can be the computer name or its IP address. <br>
-     * <b>Default value : </b> tdb
-     */
-    protected String tdbHost;
-    /**
-     * Database name.<br>
-     * <b>Default value : </b> tdb
-     */
-    protected String tdbName;
-
-    /**
-     * User identifier (name) used to connect the historical database.
-     */
-    protected String hdbUser;
-    /**
-     * Password used to connect the historical database.
-     */
-    protected String hdbPassword;
-    /**
-     * User identifier (name) used to connect the temporary database.
-     */
-    protected String tdbUser;
-    /**
-     * Password used to connect the temporary database.
-     */
-    protected String tdbPassword;
-    /**
-     * true if the ORACLE RAC connection is activated. This information is
-     * appended to all device's (or attributes) name. false otherwise.<br>
-     * <b>Default value : </b> false
-     */
-    protected boolean hdbRacConnection;
-    protected boolean tdbRacConnection;
-    private String hdbSchema;
-    private String tdbSchema;
-
-    // --------- End of properties data members ----------
-
-    // Add your own data members here
-    // --------------------------------------
-
-    // =========================================================
-    /**
-     * Constructor for simulated Time Device Server.
-     * 
-     * @param cl
-     *            The DeviceClass object
-     * @param s
-     *            The Device name.
-     * @param version
-     *            The device version
-     */
-    // =========================================================
-    public ArchivingManager(final DeviceClass cl, final String s, final String version) throws DevFailed {
-        super(cl, s);
-        m_version = version;
-        init_device();
-    }
-
-    // =========================================================
-    /**
-     * Constructor for simulated Time Device Server.
-     * 
-     * @param cl
-     *            The DeviceClass object
-     * @param s
-     *            The Device name.
-     * @param d
-     *            Device description.
-     * @param version
-     *            The device version
-     */
-    // =========================================================
-    public ArchivingManager(final DeviceClass cl, final String s, final String d, final String version)
-            throws DevFailed {
-        super(cl, s, d);
-        m_version = version;
-        init_device();
-    }
-
-    // =========================================================
-    /**
-     * Initialize the device.
-     */
-    // =========================================================
-    @Override
-    public void init_device() throws DevFailed {
-        System.out.println("ArchivingManager() create " + device_name);
-        HdbTdbConnectionParameters.initDbAvailable();
-        // Initialise variables to default values
-        // -------------------------------------------
-        get_device_property();
-        StringBuilder statusBuilder = new StringBuilder();
-        Boolean hdbAvailable = HdbTdbConnectionParameters.isHdbAvailable() ? Boolean.valueOf(connectHdb(statusBuilder))
-                : null;
-        Boolean tdbAvailable = HdbTdbConnectionParameters.isTdbAvailable() ? Boolean.valueOf(connectTdb(statusBuilder))
-                : null;
-        updateState(statusBuilder, hdbAvailable, tdbAvailable);
-    }
-
-    protected boolean isOk(IArchivingManagerApiRef manager) {
-        return ((manager != null) && (manager.getArchiverListSize() > 0));
-    }
-
-    protected void updateState(StringBuilder statusBuilder, Boolean hdbAvailable, Boolean tdbAvailable) {
-        if (hdbAvailable == null) {
-            if (tdbAvailable == null) {
-                set_state(DevState.FAULT);
-            } else if (tdbAvailable.booleanValue()) {
-                if (isOk(tdbManager)) {
-                    set_state(DevState.ON);
-                } else {
-                    set_state(DevState.ALARM);
-                }
-            } else {
-                set_state(DevState.FAULT);
-            }
-        } else if (tdbAvailable == null) {
-            if (hdbAvailable.booleanValue()) {
-                if (isOk(hdbManager)) {
-                    set_state(DevState.ON);
-                } else {
-                    set_state(DevState.ALARM);
-                }
-            } else {
-                set_state(DevState.FAULT);
-            }
-        } else if (hdbAvailable.booleanValue()) {
-            if (tdbAvailable.booleanValue()) {
-                if (isOk(hdbManager) && isOk(tdbManager)) {
-                    set_state(DevState.ON);
-                } else {
-                    set_state(DevState.ALARM);
-                }
-            } else {
-                set_state(DevState.ALARM);
-            }
-        } else if (tdbAvailable.booleanValue()) {
-            set_state(DevState.ALARM);
-        } else {
-            set_state(DevState.FAULT);
-        }
-        if (hdbManager != null) {
-            statusBuilder.append("HDB Archivers: ").append(Arrays.toString(hdbManager.getMExportedArchiverList()))
-                    .append("\n");
-        }
-        if (tdbManager != null) {
-            statusBuilder.append("TDB Archivers: ").append(Arrays.toString(tdbManager.getMExportedArchiverList()))
-                    .append("\n");
-        }
-        set_status(statusBuilder.toString().trim());
-    }
-
-    protected boolean connectHdb(StringBuilder statusBuilder) {
-        boolean hdbAvailable;
-        try {
-            AbstractDataBaseConnector hdbConnector = ConnectionFactory.connectThroughTango("HdbManager",
-                    ConfigConst.HDB_CLASS_DEVICE, hdbHost, hdbName, hdbSchema, hdbUser, hdbPassword, null, null,
-                    hdbRacConnection, false, true);
-            hdbManager = ArchivingManagerApiRefFactory.getInstance(true, hdbConnector);
-            hdbManager.archivingConfigure();
-            hdbAvailable = true;
-        } catch (final ArchivingException e) {
-            hdbAvailable = false;
-            get_logger().warn(e.toString(), e);
-            statusBuilder.append("HDB not available - error: ").append(e.getLastExceptionMessage()).append("\n");
-        } catch (final DevFailed e) {
-            hdbAvailable = false;
-            get_logger().warn(e.toString(), e);
-            statusBuilder.append("HDB not available - error:\n").append(DevFailedUtils.toString(e)).append("\n");
-        }
-        return hdbAvailable;
-    }
-
-    protected boolean connectTdb(StringBuilder statusBuilder) {
-        boolean tdbAvailable;
-        try {
-            AbstractDataBaseConnector tdbConnector = ConnectionFactory.connectThroughTango("TdbManager",
-                    ConfigConst.TDB_CLASS_DEVICE, tdbHost, tdbName, tdbSchema, tdbUser, tdbPassword, null, null,
-                    tdbRacConnection, false, true);
-            tdbManager = ArchivingManagerApiRefFactory.getInstance(false, tdbConnector);
-            tdbManager.archivingConfigure();
-            tdbAvailable = true;
-        } catch (final ArchivingException e) {
-            tdbAvailable = false;
-            get_logger().warn(e.toString(), e);
-            statusBuilder.append("TDB not available - error: ").append(e.getLastExceptionMessage()).append("\n");
-        } catch (final DevFailed e) {
-            tdbAvailable = false;
-            get_logger().warn(e.toString(), e);
-            statusBuilder.append("TDB not available - error:\n").append(DevFailedUtils.toString(e)).append("\n");
-        }
-        return tdbAvailable;
-    }
-
-    protected synchronized void updateDatabaseConnections() {
-        StringBuilder statusBuilder = new StringBuilder();
-        Boolean hdbAvailable, tdbAvailable;
-        if (HdbTdbConnectionParameters.isHdbAvailable()) {
-            if (hdbManager == null) {
-                hdbAvailable = Boolean.valueOf(connectHdb(statusBuilder));
-            } else if (hdbManager.isDbConnected()) {
-                hdbAvailable = Boolean.TRUE;
-            } else {
-                try {
-                    hdbManager.archivingConfigure();
-                    hdbAvailable = Boolean.TRUE;
-                } catch (ArchivingException e) {
-                    hdbAvailable = Boolean.FALSE;
-                    get_logger().warn(e.toString(), e);
-                    statusBuilder.append("HDB not available - error: ").append(e.getLastExceptionMessage())
-                            .append("\n");
-                }
-            }
-        } else {
-            hdbAvailable = null;
-        }
-        if (HdbTdbConnectionParameters.isTdbAvailable()) {
-            if (tdbManager == null) {
-                tdbAvailable = Boolean.valueOf(connectTdb(statusBuilder));
-            } else if (tdbManager.isDbConnected()) {
-                tdbAvailable = true;
-            } else {
-                try {
-                    tdbManager.archivingConfigure();
-                    tdbAvailable = Boolean.TRUE;
-                } catch (ArchivingException e) {
-                    tdbAvailable = Boolean.FALSE;
-                    get_logger().warn(e.toString(), e);
-                    statusBuilder.append("TDB not available - error: ").append(e.getLastExceptionMessage())
-                            .append("\n");
-                }
-            }
-        } else {
-            tdbAvailable = null;
-        }
-        updateState(statusBuilder, hdbAvailable, tdbAvailable);
-    }
-
-    // ===================================================================
-    /**
-     * Read the device properties from database.
-     */
-    // ===================================================================
-    public void get_device_property() throws DevFailed {
-        // Initialize your default values here.
-        // ------------------------------------------
-        hdbUser = ConfigConst.HDB_MANAGER_USER;
-        hdbPassword = ConfigConst.HDB_MANAGER_PASSWORD;
-        tdbUser = ConfigConst.TDB_MANAGER_USER;
-        tdbPassword = ConfigConst.TDB_MANAGER_PASSWORD;
-
-        // Read device properties from database.(Automatic code generation)
-        // -------------------------------------------------------------
-        if (Util._UseDb == false) {
-            return;
-        }
-        final String[] propnames = { "HdbHost", "HdbName", "HdbSchema", "TdbHost", "TdbName", "TdbSchema", "HdbUser",
-                "HdbPassword", "TdbUser", "TdbPassword", "HdbRacConnection", "TdbRacConnection" };
-
-        // Call database and extract values
-        // --------------------------------------------
-        final DbDatum[] dev_prop = get_db_device().get_property(propnames);
-        final ArchivingManagerClass ds_class = (ArchivingManagerClass) get_device_class();
-        int i = -1;
-
-        // Extract HDBHost value
-        if (dev_prop[++i].is_empty() == false) {
-            hdbHost = dev_prop[i].extractString();
-        } else {
-            // Try to get value from class property
-            final DbDatum cl_prop = ds_class.get_class_property(dev_prop[i].name);
-            if (cl_prop.is_empty() == false) {
-                hdbHost = cl_prop.extractString();
-            }
-        }
-
-        // Extract HDbName value
-        if (dev_prop[++i].is_empty() == false) {
-            hdbName = dev_prop[i].extractString();
-        } else {
-            // Try to get value from class property
-            final DbDatum cl_prop = ds_class.get_class_property(dev_prop[i].name);
-            if (cl_prop.is_empty() == false) {
-                hdbName = cl_prop.extractString();
-            }
-        }
-
-        // Extract HdbSchema value
-        if (dev_prop[++i].is_empty() == false) {
-            hdbSchema = dev_prop[i].extractString();
-        } else {
-            // Try to get value from class property
-            final DbDatum cl_prop = ds_class.get_class_property(dev_prop[i].name);
-            if (cl_prop.is_empty() == false) {
-                hdbSchema = cl_prop.extractString();
-            }
-        }
-
-        // Extract TDBHost value
-        if (dev_prop[++i].is_empty() == false) {
-            tdbHost = dev_prop[i].extractString();
-        } else {
-            // Try to get value from class property
-            final DbDatum cl_prop = ds_class.get_class_property(dev_prop[i].name);
-            if (cl_prop.is_empty() == false) {
-                tdbHost = cl_prop.extractString();
-            }
-        }
-
-        // Extract TDbName value
-        if (dev_prop[++i].is_empty() == false) {
-            tdbName = dev_prop[i].extractString();
-        } else {
-            // Try to get value from class property
-            final DbDatum cl_prop = ds_class.get_class_property(dev_prop[i].name);
-            if (cl_prop.is_empty() == false) {
-                tdbName = cl_prop.extractString();
-            }
-        }
-
-        // Extract tdbSchema value
-        if (dev_prop[++i].is_empty() == false) {
-            tdbSchema = dev_prop[i].extractString();
-        } else {
-            // Try to get value from class property
-            final DbDatum cl_prop = ds_class.get_class_property(dev_prop[i].name);
-            if (cl_prop.is_empty() == false) {
-                tdbSchema = cl_prop.extractString();
-            }
-        }
-
-        // Extract HdbUser value
-        if (dev_prop[++i].is_empty() == false) {
-            hdbUser = dev_prop[i].extractString();
-        } else {
-            // Try to get value from class property
-            final DbDatum cl_prop = ds_class.get_class_property(dev_prop[i].name);
-            if (cl_prop.is_empty() == false) {
-                hdbUser = cl_prop.extractString();
-            }
-        }
-
-        // Extract HdbPassword value
-        if (dev_prop[++i].is_empty() == false) {
-            hdbPassword = dev_prop[i].extractString();
-        } else {
-            // Try to get value from class property
-            final DbDatum cl_prop = ds_class.get_class_property(dev_prop[i].name);
-            if (cl_prop.is_empty() == false) {
-                hdbPassword = cl_prop.extractString();
-            }
-        }
-
-        // Extract TdbUser value
-        if (dev_prop[++i].is_empty() == false) {
-            tdbUser = dev_prop[i].extractString();
-        } else {
-            // Try to get value from class property
-            final DbDatum cl_prop = ds_class.get_class_property(dev_prop[i].name);
-            if (cl_prop.is_empty() == false) {
-                tdbUser = cl_prop.extractString();
-            }
-        }
-
-        // Extract TdbPassword value
-        if (dev_prop[++i].is_empty() == false) {
-            tdbPassword = dev_prop[i].extractString();
-        } else {
-            // Try to get value from class property
-            final DbDatum cl_prop = ds_class.get_class_property(dev_prop[i].name);
-            if (cl_prop.is_empty() == false) {
-                tdbPassword = cl_prop.extractString();
-            }
-        }
-        // Extract HdbRacConnection value
-        if (dev_prop[++i].is_empty() == false) {
-            hdbRacConnection = dev_prop[i].extractBoolean();
-        } else {
-            // Try to get value from class property
-            final DbDatum cl_prop = ds_class.get_class_property(dev_prop[i].name);
-            if (cl_prop.is_empty() == false) {
-                hdbRacConnection = cl_prop.extractBoolean();
-            }
-        }
-
-        // Extract TdbRacConnection value
-        if (dev_prop[++i].is_empty() == false) {
-            tdbRacConnection = dev_prop[i].extractBoolean();
-        } else {
-            // Try to get value from class property
-            final DbDatum cl_prop = ds_class.get_class_property(dev_prop[i].name);
-            if (cl_prop.is_empty() == false) {
-                tdbRacConnection = cl_prop.extractBoolean();
-            }
-        }
-        // End of Automatic code generation
-        // -------------------------------------------------------------
-
-    }
-
-    // =========================================================
-    /**
-     * Method always executed before command execution.
-     */
-    // =========================================================
-    @Override
-    public void always_executed_hook() {
-        get_logger().info("In always_executed_hook method()");
-    }
-
-    // =========================================================
-    /**
-     * Execute command "State" on device. This command gets the device state
-     * (stored in its <i>device_state</i> data member) and returns it to the
-     * caller.
-     * 
-     * @return State Code
-     */
-    // =========================================================
-    @Override
-    public DevState dev_state() throws DevFailed {
-        final DevState argout = super.dev_state();
-
-        // get_logger().info("Entering dev_state()");
-        //
-        // // ---Add your Own code to control device here ---
-        //
-        // get_logger().info("Exiting dev_state()");
-        return argout;
-    }
-
-    // =========================================================
-    /**
-     * Execute command "ArchivingConfigure" on device. This command configures
-     * the connection to the historical and temporary databases. It then needs 4
-     * parameters : a login and password for Hdb + a login and password for Tdb
-     * 
-     * @param argin
-     *            <ul>
-     *            <li><var>argin</var>[<code>0</code>], the <em>user name</em> used to logg into the historical
-     *            database.
-     *            <li><var>argin</var>[<code>1</code>], the <em>password</em> used to logg into the historical database.
-     *            <li><var>argin</var>[<code>2</code>], the <em>user name</em> used to logg into the temporary database.
-     *            <li><var>argin</var>[<code>9</code>], the <em>password</em> used to logg into the temporary database.
-     *            </ul>
-     */
-    // =========================================================
-    public void archiving_configure(final String[] argin) throws DevFailed {
-        get_logger().info("Entering archiving_configure()");
-        String exitMessage = "Exiting archiving_configure()";
-        if ((argin == null) || (argin.length < 4)) {
-            String errorMessage = "Invalid argument";
-            get_logger().warn(errorMessage);
-            get_logger().info(exitMessage);
-            throw new DevFailed(errorMessage, null);
-        } else {
-            // ---Add your Own code to control device here ---
-            /*
-             * try { ArchivingManagerApi.ArchivingConfigure(argin[ 0 ] , argin[ 1 ]
-             * , argin[ 2 ] , argin[ 3 ], argin[ 4 ]); } catch ( ArchivingException
-             * e ) { get_logger().warn(e.toString() , e); throw
-             * e.toTangoException(); }
-             */
-            boolean needsToThrow = false;
-            // TODO maybe update status, and maybe avoid connections to undesired database (HdbTdbConnectionParameters)
-            ArchivingException hdbArchivingException = null;
-            IArchivingManagerApiRef previousHdbManager = hdbManager;
-            try {
-                String hdbUser = argin[0], hdbPassword = argin[1];
-                AbstractDataBaseConnector hdbConnector = ConnectionFactory.connectThroughTango("HdbManager",
-                        ConfigConst.HDB_CLASS_DEVICE, hdbHost, hdbName, hdbSchema, hdbUser, hdbPassword, null, null,
-                        hdbRacConnection, false, true);
-                hdbManager = ArchivingManagerApiRefFactory.getInstance(true, hdbConnector);
-                hdbManager.archivingConfigure();
-            } catch (final ArchivingException e) {
-                get_logger().warn(e.toString(), e);
-                // throw e.toTangoException(); CLA 30/10/06 AN EXCEPTION IS NO
-                // LONGER THROWN, AS BOTH DATABASES ARE INITIALIZED INDEPENDENTLY
-                hdbArchivingException = e;
-                needsToThrow = true;
-                // restore previous manager as this one does not seem to be ok
-                hdbManager = previousHdbManager;
-            } catch (DevFailed e) {
-                get_logger().warn(DevFailedUtils.toString(e), e);
-                hdbArchivingException = new ArchivingException(e);
-                needsToThrow = true;
-                // restore previous manager as this one does not seem to be ok
-                hdbManager = previousHdbManager;
-            }
-
-            ArchivingException tdbArchivingException = null;
-            IArchivingManagerApiRef previousTdbManager = tdbManager;
-            try {
-                String tdbUser = argin[2], tdbPassword = argin[3];
-                AbstractDataBaseConnector tdbConnector = ConnectionFactory.connectThroughTango("TdbManager",
-                        ConfigConst.TDB_CLASS_DEVICE, tdbHost, tdbName, tdbSchema, tdbUser, tdbPassword, null, null,
-                        tdbRacConnection, false, false);
-                tdbManager = ArchivingManagerApiRefFactory.getInstance(true, tdbConnector);
-                tdbManager.archivingConfigure();
-            } catch (final ArchivingException e) {
-                get_logger().warn(e.toString(), e);
-                // throw e.toTangoException(); CLA 30/10/06 AN EXCEPTION IS NO
-                // LONGER THROWN, AS BOTH DATABASES ARE INITIALIZED INDEPENDENTLY
-                tdbArchivingException = e;
-                needsToThrow = true;
-                // restore previous manager as this one does not seem to be ok
-                tdbManager = previousTdbManager;
-            } catch (DevFailed e) {
-                get_logger().warn(DevFailedUtils.toString(e), e);
-                tdbArchivingException = new ArchivingException(e);
-                needsToThrow = true;
-                // restore previous manager as this one does not seem to be ok
-                tdbManager = previousTdbManager;
-            }
-
-            /*
-             * if ( hdbArchivingException != null ) { String desc =
-             * "Failed connecting to HDB"; ArchivingException exceptionHDB = new
-             * ArchivingException (message , reason , ErrSeverity.PANIC , desc , ""
-             * ); totale.addStack ( desc, exceptionHDB ); } if (
-             * tdbArchivingException != null ) { String desc =
-             * "Failed connecting to TDB"; ArchivingException exceptionTDB = new
-             * ArchivingException (message , reason , ErrSeverity.PANIC , desc , ""
-             * ); totale.addStack ( desc, exceptionTDB ); }
-             */
-            String desc;
-            if (hdbArchivingException != null) {
-                if (tdbArchivingException != null) {
-                    desc = "Failed connecting to HDB and TDB";
-                } else {
-                    desc = "Failed connecting to HDB";
-                }
-            } else if (tdbArchivingException != null) {
-                desc = "Failed connecting to TDB";
-            } else {
-                desc = "";
-            }
-            get_logger().info(exitMessage);
-            if (needsToThrow) {
-                final String reason = "Failed while executing ArchivingManager.archiving_configure() method...";
-                final String message = GlobalConst.ARCHIVING_ERROR_PREFIX + " : ";
-                final ArchivingException e = new ArchivingException(message, reason, ErrSeverity.PANIC, desc, "");
-                throw e.toTangoException();
-            }
-        }
-    }
-
-    // =========================================================
-    /**
-     * Execute command "ArchivingStartHdb" on device. Start an historical
-     * archiving for the specified attributes, and following the specified mode.
-     * 
-     * @param argin
-     *            Archiving arguments... <BR>
-     *            <blockquote>
-     *            <ul>
-     *            <li><strong>The first part :</strong>
-     *            <ul>
-     *            <li><var>argin</var>[0]<b> =</b> the load balancing type of the archiving<br>
-     *            &quot;1&quot;, if all the attribute are archived together in the same HdbArchiver device, <br>
-     *            &quot;0&quot; otherwise.
-     *            <li><var>argin</var>[1]<b> =</b> the number of attributes to archive<br>
-     *            <li><var>argin</var>[2] to <var>argin</var> [2 + <var>argin</var>[1] - 1] = the name of each attribute
-     *            </ul>
-     *            <li><strong>The second part (the <i>Mode </i>part) :</strong> <br>
-     *            Let us note <i>&quot;<var>index</var>&quot; </i>the last <var>index</var> used (for example, at this
-     *            point, <i><var>index</var></i> = 2]).
-     *            <ul>
-     *            <li><strong>If the Mode is composed of a <i>Periodical Mode</i></strong><br>
-     *            <var>argin</var>[<var>index</var>+ 1] = <code>MODE_P</code><br>
-     *            <var>argin</var>[<var>index</var>+ 2] = the period of the periodic mode in (ms)<br>
-     *            <var>index</var> = <var>index</var> + 2<br>
-     *            <li><strong>If the Mode is composed of an <i>Absolute Mode</i></strong><br>
-     *            <var>argin</var>[<var>index</var>+ 1] = <code>MODE_A</code><br>
-     *            <var>argin</var>[<var>index</var>+ 2] = the frequency of the <i>absolute mode </i>in (ms)<br>
-     *            <var>argin</var>[<var>index</var>+ 3] = the delta value max when decreasing<br>
-     *            <var>argin</var>[<var>index</var>+ 4] = the delta value max when increasing<br>
-     *            <var>index</var> = <var>index</var> + 4<br>
-     *            <li><strong>If the Mode is composed of a <i>Relative Mode</i></strong><br>
-     *            <var>argin</var>[<var>index</var>+ 1] = <code>MODE_R</code><br>
-     *            <var>argin</var>[<var>index</var>+ 2] = the <i>frequency </i>of the <i>relative mode </i>in (ms)<br>
-     *            <var>argin</var>[<var>index</var>+ 3] = the <i>decreasing variation </i>associated to this mode<br>
-     *            <var>argin</var>[<var>index</var>+ 4] = the <i>increasing variation </i>associated to this mode<br>
-     *            <var>index</var> = <var>index</var> + 4<br>
-     *            <li><strong>If the Mode is composed of an <i>Threshold Mode</i></strong><br>
-     *            <var>argin</var>[<var>index</var>+ 1] = <code>MODE_T</code><br>
-     *            <var>argin</var>[<var>index</var>+ 2] = the frequency of the <i>threshold mode </i>in (ms)<br>
-     *            <var>argin</var>[<var>index</var>+ 3] = the smallest value (min) when decreasing<br>
-     *            <var>argin</var>[<var>index</var>+ 4] = the biggest value (max) when increasing<br>
-     *            <var>index</var> = <var>index</var> + 4<br>
-     *            <li>If the Mode is composed of a <i>On Calculation Mode</i></strong><br>
-     *            <var>argin</var>[<var>index</var>+ 1] = <code>MODE_C</code><br>
-     *            <var>argin</var>[<var>index</var>+ 2] = the <i>frequency </i>of the <i>on calculation mode </i>in (ms)
-     *            <br>
-     *            <var>argin</var>[<var>index</var>+ 3] = the <i>number of values</i> taken into account<br>
-     *            <var>argin</var>[<var>index</var>+ 4] = the <i>type </i>associated to this mode<br>
-     *            <var>argin</var>[<var>index</var>+ 5] = Not used at the moment <br>
-     *            <var>index</var> = <var>index</var> + 5<br>
-     *            <li><strong>If the Mode is composed of an <i>On Difference Mode</i></strong><br>
-     *            <var>argin</var>[<var>index</var>+ 1] = <code>MODE_D</code><br>
-     *            <var>argin</var>[<var>index</var>+ 2] = the <i>frequency </i>of this<i> mode </i>(in ms)<br>
-     *            <var>index</var> = <var>index</var> + 2<br>
-     *            <li><strong>If the Mode is composed of an <i>External Mode</i></strong><br>
-     *            <var>argin</var>[<var>index</var>+ 1] = <code>MODE_E</code><br>
-     *            <var>index</var> = <var>index</var> + 1<br>
-     *            </ul>
-     *            </ul>
-     *            </blockquote>
-     * @see ArchivingMessConfig
-     */
-    // =========================================================
-    public void archiving_start_hdb(final String[] argin) throws DevFailed {
-        get_logger().info("Entering archiving_start_hdb()");
-        updateDatabaseConnections();
-        if (hdbManager != null) {
-            try {
-                final ArchivingMessConfig archivingMessConfig = ArchivingMessConfig
-                        .creationWithoutFullInformation(argin);
-                hdbManager.archivingStart(archivingMessConfig);
-            } catch (Exception e) {
-                if (e instanceof DevFailed) {
-                    throw (DevFailed) e;
-                } else if (e instanceof ArchivingException) {
-                    ArchivingException ae = (ArchivingException) e;
-                    ae.printStackTrace();
-                    get_logger().warn(ae.toString(), ae);
-                    throw ae.toTangoException();
-                } else {
-                    get_logger().error("unexpected error on hdb archiving start", e);
-                }
-            }
-        }
-        get_logger().info("Exiting archiving_start_hdb()");
-    }
-
-    // =========================================================
-    /**
-     * Execute command "ArchivingStartTdb" on device. Start an temporary
-     * archiving for the specified attributes, and following the specified mode.
-     * 
-     * @param argin
-     *            Archiving arguments... <BR>
-     *            <blockquote>
-     *            <ul>
-     *            <li><strong>The first part :</strong>
-     *            <ul>
-     *            <li><var>argin</var>[0]<b> =</b> the load balancing type of the archiving<br>
-     *            &quot;1&quot;, if all the attribute are archived together in the same HdbArchiver device, <br>
-     *            &quot;0&quot; otherwise.
-     *            <li><var>argin</var>[1]<b> =</b> the number of attributes to archive<br>
-     *            <li><var>argin</var>[2] to <var>argin</var> [2 + <var>argin</var>[1] - 1] = the name of each attribute
-     *            </ul>
-     *            <li><strong>The second part (the <i>Mode </i>part) :</strong> <br>
-     *            Let us note <i>&quot;<var>index</var>&quot; </i>the last <var>index</var> used (for example, at this
-     *            point, <i><var>index</var></i> = 2]).
-     *            <ul>
-     *            <li><strong>If the Mode is composed of a <i>Periodical Mode</i></strong><br>
-     *            <var>argin</var>[<var>index</var>+ 1] = <code>MODE_P</code><br>
-     *            <var>argin</var>[<var>index</var>+ 2] = the period of the periodic mode in (ms)<br>
-     *            <var>index</var> = <var>index</var> + 2<br>
-     *            <li><strong>If the Mode is composed of an <i>Absolute Mode</i></strong><br>
-     *            <var>argin</var>[<var>index</var>+ 1] = <code>MODE_A</code><br>
-     *            <var>argin</var>[<var>index</var>+ 2] = the frequency of the <i>absolute mode </i>in (ms)<br>
-     *            <var>argin</var>[<var>index</var>+ 3] = the delta value max when decreasing<br>
-     *            <var>argin</var>[<var>index</var>+ 4] = the delta value max when increasing<br>
-     *            <var>index</var> = <var>index</var> + 4<br>
-     *            <li><strong>If the Mode is composed of a <i>Relative Mode</i></strong><br>
-     *            <var>argin</var>[<var>index</var>+ 1] = <code>MODE_R</code><br>
-     *            <var>argin</var>[<var>index</var>+ 2] = the <i>frequency </i>of the <i>relative mode </i>in (ms)<br>
-     *            <var>argin</var>[<var>index</var>+ 3] = the <i>decreasing variation </i>associated to this mode<br>
-     *            <var>argin</var>[<var>index</var>+ 4] = the <i>increasing variation </i>associated to this mode<br>
-     *            <var>index</var> = <var>index</var> + 4<br>
-     *            <li><strong>If the Mode is composed of an <i>Threshold Mode</i></strong><br>
-     *            <var>argin</var>[<var>index</var>+ 1] = <code>MODE_T</code><br>
-     *            <var>argin</var>[<var>index</var>+ 2] = the frequency of the <i>threshold mode </i>in (ms)<br>
-     *            <var>argin</var>[<var>index</var>+ 3] = the smallest value (min) when decreasing<br>
-     *            <var>argin</var>[<var>index</var>+ 4] = the biggest value (max) when increasing<br>
-     *            <var>index</var> = <var>index</var> + 4<br>
-     *            <li>If the Mode is composed of a <i>On Calculation Mode</i></strong><br>
-     *            <var>argin</var>[<var>index</var>+ 1] = <code>MODE_C</code><br>
-     *            <var>argin</var>[<var>index</var>+ 2] = the <i>frequency </i>of the <i>on calculation mode </i>in (ms)
-     *            <br>
-     *            <var>argin</var>[<var>index</var>+ 3] = the <i>number of values</i> taken into account<br>
-     *            <var>argin</var>[<var>index</var>+ 4] = the <i>type </i>associated to this mode<br>
-     *            <var>argin</var>[<var>index</var>+ 5] = Not used at the moment <br>
-     *            <var>index</var> = <var>index</var> + 5<br>
-     *            <li><strong>If the Mode is composed of an <i>On Difference Mode</i></strong><br>
-     *            <var>argin</var>[<var>index</var>+ 1] = <code>MODE_D</code><br>
-     *            <var>argin</var>[<var>index</var>+ 2] = the <i>frequency </i>of this<i> mode </i>(in ms)<br>
-     *            <var>index</var> = <var>index</var> + 2<br>
-     *            <li><strong>If the Mode is composed of an <i>External Mode</i></strong><br>
-     *            <var>argin</var>[<var>index</var>+ 1] = <code>MODE_E</code><br>
-     *            <var>index</var> = <var>index</var> + 1<br>
-     *            <li><strong>The Temporary (<i>Intermediate Archiving</i>) archiving specific informations </strong><br>
-     *            <var>argin</var>[<var>index</var>+ 1] = <code>TDB_SPEC</code><br>
-     *            <var>argin</var>[<var>index</var>+ 2] = the <i>export frequency </i>(ms)<br>
-     *            <var>argin</var>[<var>index</var>+ 3] = the <i>keeping window duration </i>in (ms)<br>
-     *            <var>index</var> = <var>index</var> + 3<br>
-     *            </ul>
-     *            </ul>
-     *            </blockquote>
-     * @see ArchivingMessConfig
-     */
-    // =========================================================
-    public void archiving_start_tdb(final String[] argin) throws DevFailed {
-        get_logger().info("Entering archiving_start_tdb()");
-        updateDatabaseConnections();
-        if (tdbManager != null) {
-            final ArchivingMessConfig archivingMessConfig = ArchivingMessConfig.creationWithoutFullInformation(argin);
-            try {
-                tdbManager.archivingStart(archivingMessConfig);
-            } catch (final ArchivingException e) {
-                get_logger().warn(e.toString(), e);
-                throw e.toTangoException();
-            }
-        }
-        get_logger().info("Exiting archiving_start_tdb()");
-    }
-
-    // =========================================================
-    /**
-     * Execute command "ArchivingStopHdb" on device. Stops the historical
-     * archiving for the given attributes.
-     * 
-     * @param argin
-     *            The attribute list.
-     */
-    // =========================================================
-    public void archiving_stop_hdb(final String[] argin) throws DevFailed {
-        get_logger().info("Entering archiving_stop_hdb()");
-        updateDatabaseConnections();
-        if (hdbManager != null) {
-            // ---Add your Own code to control device here ---
-            try {
-                hdbManager.archivingStopConf(argin);
-            } catch (final ArchivingException e) {
-                get_logger().warn(e.toString(), e);
-                throw e.toTangoException();
-            }
-        }
-    }
-
-    // =========================================================
-    /**
-     * Execute command "ArchivingStopTdb" on device. Stops the temporary
-     * archiving for the given attributes.
-     * 
-     * @param argin
-     *            The attribute list.
-     */
-    // =========================================================
-    public void archiving_stop_tdb(final String[] argin) throws DevFailed {
-        get_logger().info("Entering archiving_stop_tdb()");
-        updateDatabaseConnections();
-        if (tdbManager != null) {
-            try {
-                tdbManager.archivingStopConf(argin);
-            } catch (final ArchivingException e) {
-                get_logger().warn(e.toString(), e);
-                throw e.toTangoException();
-            }
-        }
-        get_logger().info("Exiting archiving_stop_tdb()");
-    }
-
-    // =========================================================
-    /**
-     * Execute command "ArchivingModifHdb" on device. Change the mode of an
-     * historical archiving.
-     * 
-     * @param argin
-     *            The configuration to switch to... <br>
-     *            <blockquote>
-     *            <ul>
-     *            <li><strong>The first part :</strong>
-     *            <ul>
-     *            <li><var>argin</var>[0]<b> =</b> the load balancing type of the archiving<br>
-     *            &quot;1&quot;, if all the attribute are archived together in the same TdbArchiver device, <br>
-     *            &quot;0&quot; otherwise.
-     *            <li><var>argin</var>[1]<b> =</b> the number of attributes to archive<br>
-     *            <li><var>argin</var>[2] to <var>argin</var> [2 + <var>argin</var>[1] - 1] = the name of each attribute
-     *            </ul>
-     *            <li><strong>The second part (the <i>Mode </i>part) :</strong> <br>
-     *            Let us note <i>&quot;<var>index</var>&quot; </i>the last <var>index</var> used (for example, at this
-     *            point, <i><var>index</var></i> = 2]).
-     *            <ul>
-     *            <li><strong>If the Mode is composed of a <i>Periodical Mode</i></strong><br>
-     *            <var>argin</var>[<var>index</var>+ 1] = <code>MODE_P</code><br>
-     *            <var>argin</var>[<var>index</var>+ 2] = the period of the periodic mode in (ms)<br>
-     *            <var>index</var> = <var>index</var> + 2<br>
-     *            <li><strong>If the Mode is composed of an <i>Absolute Mode</i></strong><br>
-     *            <var>argin</var>[<var>index</var>+ 1] = <code>MODE_A</code><br>
-     *            <var>argin</var>[<var>index</var>+ 2] = the frequency of the <i>absolute mode </i>in (ms)<br>
-     *            <var>argin</var>[<var>index</var>+ 3] = the delta value max when decreasing<br>
-     *            <var>argin</var>[<var>index</var>+ 4] = the delta value max when increasing<br>
-     *            <var>index</var> = <var>index</var> + 4<br>
-     *            <li><strong>If the Mode is composed of a <i>Relative Mode</i></strong><br>
-     *            <var>argin</var>[<var>index</var>+ 1] = <code>MODE_R</code><br>
-     *            <var>argin</var>[<var>index</var>+ 2] = the <i>frequency </i>of the <i>relative mode </i>in (ms)<br>
-     *            <var>argin</var>[<var>index</var>+ 3] = the <i>decreasing variation </i>associated to this mode<br>
-     *            <var>argin</var>[<var>index</var>+ 4] = the <i>increasing variation </i>associated to this mode<br>
-     *            <var>index</var> = <var>index</var> + 4<br>
-     *            <li><strong>If the Mode is composed of an <i>Threshold Mode</i></strong><br>
-     *            <var>argin</var>[<var>index</var>+ 1] = <code>MODE_T</code><br>
-     *            <var>argin</var>[<var>index</var>+ 2] = the frequency of the <i>threshold mode </i>in (ms)<br>
-     *            <var>argin</var>[<var>index</var>+ 3] = the smallest value (min) when decreasing<br>
-     *            <var>argin</var>[<var>index</var>+ 4] = the biggest value (max) when increasing<br>
-     *            <var>index</var> = <var>index</var> + 4<br>
-     *            <li>If the Mode is composed of a <i>On Calculation Mode</i></strong><br>
-     *            <var>argin</var>[<var>index</var>+ 1] = <code>MODE_C</code><br>
-     *            <var>argin</var>[<var>index</var>+ 2] = the <i>frequency </i>of the <i>on calculation mode </i>in (ms)
-     *            <br>
-     *            <var>argin</var>[<var>index</var>+ 3] = the <i>number of values</i> taken into account<br>
-     *            <var>argin</var>[<var>index</var>+ 4] = the <i>type </i>associated to this mode<br>
-     *            <var>argin</var>[<var>index</var>+ 5] = Not used at the moment <br>
-     *            <var>index</var> = <var>index</var> + 5<br>
-     *            <li><strong>If the Mode is composed of an <i>On Difference Mode</i></strong><br>
-     *            <var>argin</var>[<var>index</var>+ 1] = <code>MODE_D</code><br>
-     *            <var>argin</var>[<var>index</var>+ 2] = the <i>frequency </i>of this<i> mode </i>(in ms)<br>
-     *            <var>index</var> = <var>index</var> + 2<br>
-     *            <li><strong>If the Mode is composed of an <i>External Mode</i></strong><br>
-     *            <var>argin</var>[<var>index</var>+ 1] = <code>MODE_E</code><br>
-     *            <var>index</var> = <var>index</var> + 1<br>
-     *            </ul>
-     *            </ul>
-     *            </blockquote>
-     * @see ArchivingMessConfig
-     */
-    // =========================================================
-    public void archiving_modif_hdb(final String[] argin) throws DevFailed {
-        get_logger().info("Entering archiving_modif_hdb()");
-        updateDatabaseConnections();
-        if (hdbManager != null) {
-            final ArchivingMessConfig archivingMessConfig = ArchivingMessConfig.creationWithoutFullInformation(argin);
-            try {
-                hdbManager.archivingStopConf(archivingMessConfig.getAttributeList());
-                archiving_start_hdb(argin);
-            } catch (final ArchivingException e) {
-                get_logger().warn(e.toString(), e);
-                throw e.toTangoException();
-            }
-        }
-        get_logger().info("Exiting archiving_modif_hdb()");
-    }
-
-    // =========================================================
-    /**
-     * Execute command "ArchivingModifTdb" on device. Change the mode of a
-     * temporary archiving.
-     * 
-     * @param argin
-     *            The configuration to switch to...... <br>
-     *            <blockquote>
-     *            <ul>
-     *            <li><strong>The first part :</strong>
-     *            <ul>
-     *            <li><var>argin</var>[0]<b> =</b> the load balancing type of the archiving<br>
-     *            &quot;1&quot;, if all the attribute are archived together in the same TdbArchiver device, <br>
-     *            &quot;0&quot; otherwise.
-     *            <li><var>argin</var>[1]<b> =</b> the number of attributes to archive<br>
-     *            <li><var>argin</var>[2] to <var>argin</var> [2 + <var>argin</var>[1] - 1] = the name of each attribute
-     *            </ul>
-     *            <li><strong>The second part (the <i>Mode </i>part) :</strong> <br>
-     *            Let us note <i>&quot;<var>index</var>&quot; </i>the last <var>index</var> used (for example, at this
-     *            point, <i><var>index</var></i> = 2]).
-     *            <ul>
-     *            <li><strong>If the Mode is composed of a <i>Periodical Mode</i></strong><br>
-     *            <var>argin</var>[<var>index</var>+ 1] = <code>MODE_P</code><br>
-     *            <var>argin</var>[<var>index</var>+ 2] = the period of the periodic mode in (ms)<br>
-     *            <var>index</var> = <var>index</var> + 2<br>
-     *            <li><strong>If the Mode is composed of an <i>Absolute Mode</i></strong><br>
-     *            <var>argin</var>[<var>index</var>+ 1] = <code>MODE_A</code><br>
-     *            <var>argin</var>[<var>index</var>+ 2] = the frequency of the <i>absolute mode </i>in (ms)<br>
-     *            <var>argin</var>[<var>index</var>+ 3] = the delta value max when decreasing<br>
-     *            <var>argin</var>[<var>index</var>+ 4] = the delta value max when increasing<br>
-     *            <var>index</var> = <var>index</var> + 4<br>
-     *            <li><strong>If the Mode is composed of a <i>Relative Mode</i></strong><br>
-     *            <var>argin</var>[<var>index</var>+ 1] = <code>MODE_R</code><br>
-     *            <var>argin</var>[<var>index</var>+ 2] = the <i>frequency </i>of the <i>relative mode </i>in (ms)<br>
-     *            <var>argin</var>[<var>index</var>+ 3] = the <i>decreasing variation </i>associated to this mode<br>
-     *            <var>argin</var>[<var>index</var>+ 4] = the <i>increasing variation </i>associated to this mode<br>
-     *            <var>index</var> = <var>index</var> + 4<br>
-     *            <li><strong>If the Mode is composed of an <i>Threshold Mode</i></strong><br>
-     *            <var>argin</var>[<var>index</var>+ 1] = <code>MODE_T</code><br>
-     *            <var>argin</var>[<var>index</var>+ 2] = the frequency of the <i>threshold mode </i>in (ms)<br>
-     *            <var>argin</var>[<var>index</var>+ 3] = the smallest value (min) when decreasing<br>
-     *            <var>argin</var>[<var>index</var>+ 4] = the biggest value (max) when increasing<br>
-     *            <var>index</var> = <var>index</var> + 4<br>
-     *            <li>If the Mode is composed of a <i>On Calculation Mode</i></strong><br>
-     *            <var>argin</var>[<var>index</var>+ 1] = <code>MODE_C</code><br>
-     *            <var>argin</var>[<var>index</var>+ 2] = the <i>frequency </i>of the <i>on calculation mode </i>in (ms)
-     *            <br>
-     *            <var>argin</var>[<var>index</var>+ 3] = the <i>number of values</i> taken into account<br>
-     *            <var>argin</var>[<var>index</var>+ 4] = the <i>type </i>associated to this mode<br>
-     *            <var>argin</var>[<var>index</var>+ 5] = Not used at the moment <br>
-     *            <var>index</var> = <var>index</var> + 5<br>
-     *            <li><strong>If the Mode is composed of an <i>On Difference Mode</i></strong><br>
-     *            <var>argin</var>[<var>index</var>+ 1] = <code>MODE_D</code><br>
-     *            <var>argin</var>[<var>index</var>+ 2] = the <i>frequency </i>of this<i> mode </i>(in ms)<br>
-     *            <var>index</var> = <var>index</var> + 2<br>
-     *            <li><strong>If the Mode is composed of an <i>External Mode</i></strong><br>
-     *            <var>argin</var>[<var>index</var>+ 1] = <code>MODE_E</code><br>
-     *            <var>index</var> = <var>index</var> + 1<br>
-     *            <li><strong>The Temporary (<i>Intermediate Archiving</i>) archiving specific informations </strong><br>
-     *            <var>argin</var>[<var>index</var>+ 1] = <code>TDB_SPEC</code><br>
-     *            <var>argin</var>[<var>index</var>+ 2] = the <i>export frequency </i>(ms)<br>
-     *            <var>argin</var>[<var>index</var>+ 3] = the <i>keeping window duration </i>in (ms)<br>
-     *            <var>index</var> = <var>index</var> + 3<br>
-     *            </ul>
-     *            </ul>
-     *            </blockquote>
-     * @see ArchivingMessConfig
-     */
-    // =========================================================
-    public void archiving_modif_tdb(final String[] argin) throws DevFailed {
-        get_logger().info("Entering archiving_modif_tdb()");
-        updateDatabaseConnections();
-        if (tdbManager != null) {
-            final ArchivingMessConfig archivingMessConfig = ArchivingMessConfig.creationWithoutFullInformation(argin);
-            try {
-                tdbManager.archivingStopConf(archivingMessConfig.getAttributeList());
-                archiving_start_tdb(argin);
-            } catch (final ArchivingException e) {
-                get_logger().warn(e.toString(), e);
-                throw e.toTangoException();
-            }
-        }
-        get_logger().info("Exiting archiving_modif_tdb()");
-    }
-
-    // =========================================================
-    /**
-     * Execute command "IsArchivedHdb" on device. Check the archiving state
-     * (historical archiving) for each attribute of the given list.
-     * 
-     * @param argin
-     *            The attribute list.
-     * @return For each attribute of the given list...<br>
-     *         <ul>
-     *         <li><code>1</code>, if the attribute is currently being archived (historical archiving)
-     *         <li><code>0</code>, otherwise
-     *         </ul>
-     */
-    // =========================================================
-    public short[] is_archived_hdb(final String[] argin) throws DevFailed {
-        get_logger().info("Entering is_archived_hdb()");
-        updateDatabaseConnections();
-        short[] argout = new short[argin.length];
-        if (hdbManager != null) {
-            // ---Add your Own code to control device here ---
-            boolean result = false;
-            for (int i = 0; i < argin.length; i++) {
-                try {
-                    result = hdbManager.isArchived(argin[i]);
-                } catch (final ArchivingException e) {
-                    get_logger().warn(e.toString(), e);
-                    throw e.toTangoException();
-                }
-                if (result) {
-                    argout[i] = 1;
-                } else {
-                    argout[i] = 0;
-                }
-            }
-        }
-        get_logger().info("Exiting is_archived_hdb()");
-        return argout;
-    }
-
-    // =========================================================
-    /**
-     * Execute command "IsArchivedTdb" on device. Check the archiving state
-     * (temporary archiving) for each attribute of the given list.
-     * 
-     * @param argin
-     *            The attribute list.
-     * @return For each attribute of the given list...<br>
-     *         <ul>
-     *         <li><code>1</code>, if the attribute is currently being archived (temporary archiving)
-     *         <li><code>0</code>, otherwise
-     *         </ul>
-     */
-    // =========================================================
-    public short[] is_archived_tdb(final String[] argin) throws DevFailed {
-        get_logger().info("Entering is_archived_tdb()");
-        short[] argout = new short[argin.length];
-        updateDatabaseConnections();
-        if (tdbManager != null) {
-            // ---Add your Own code to control device here ---
-            boolean result = false;
-            for (int i = 0; i < argin.length; i++) {
-                try {
-                    result = tdbManager.isArchived(argin[i]);
-                } catch (final ArchivingException e) {
-                    get_logger().warn(e.toString(), e);
-                    throw e.toTangoException();
-                }
-                if (result) {
-                    argout[i] = 1;
-                } else {
-                    argout[i] = 0;
-                }
-            }
-        }
-        get_logger().info("Exiting is_archived_tdb()");
-        return argout;
-    }
-
-    // =========================================================
-    /**
-     * Execute command "GetArchivingModeHdb" on device. Return the historical
-     * archiving mode applied to an attribute.
-     * 
-     * @param argin
-     *            The attribute name.
-     * @return The applied mode... <br>
-     *         <blockquote>
-     *         <ul>
-     *         Let us note <i>&quot;<var>index</var>&quot; </i>the last <var>index</var> used (for example, at this
-     *         point, <i><var>index</var></i> = 0]).
-     *         <li><strong>If the Mode is composed of a <i>Periodical Mode</i></strong><br>
-     *         <var>argout</var>[<var>index</var>] = <code>MODE_P</code><br>
-     *         <var>argout</var>[<var>index</var> + 1] = the period of the periodic mode in (ms)<br>
-     *         <var>index</var> = <var>index</var> + 2<br>
-     *         <li><strong>If the Mode is composed of an <i>Absolute Mode</i></strong><br>
-     *         <var>argout</var>[<var>index</var>] = <code>MODE_A</code><br>
-     *         <var>argout</var>[<var>index</var>+ 1] = the frequency of the <i>absolute mode </i>in (ms)<br>
-     *         <var>argout</var>[<var>index</var>+ 2] = the delta value max when decreasing<br>
-     *         <var>argout</var>[<var>index</var>+ 3] = the delta value max when increasing<br>
-     *         <var>index</var> = <var>index</var> + 4<br>
-     *         <li><strong>If the Mode is composed of a <i>Relative Mode</i></strong><br>
-     *         <var>argout</var>[<var>index</var>] = <code>MODE_R</code><br>
-     *         <var>argout</var>[<var>index</var>+ 1] = the <i>frequency </i>of the <i>relative mode </i>in (ms)<br>
-     *         <var>argout</var>[<var>index</var>+ 2] = the <i>decreasing variation </i>associated to this mode<br>
-     *         <var>argout</var>[<var>index</var>+ 3] = the <i>increasing variation </i>associated to this mode<br>
-     *         <var>index</var> = <var>index</var> + 4<br>
-     *         <li><strong>If the Mode is composed of an <i>Threshold Mode</i></strong><br>
-     *         <var>argout</var>[<var>index</var>] = <code>MODE_T</code><br>
-     *         <var>argout</var>[<var>index</var>+ 1] = the frequency of the <i>threshold mode </i>in (ms)<br>
-     *         <var>argout</var>[<var>index</var>+ 2] = the smallest value (min) when decreasing<br>
-     *         <var>argout</var>[<var>index</var>+ 3] = the biggest value (max) when increasing<br>
-     *         <var>index</var> = <var>index</var> + 4<br>
-     *         <li>If the Mode is composed of a <i>On Calculation Mode</i></strong><br>
-     *         <var>argout</var>[<var>index</var>] = <code>MODE_C</code><br>
-     *         <var>argout</var>[<var>index</var>+ 1] = the <i>frequency </i>of the <i>on calculation mode </i>in (ms)<br>
-     *         <var>argout</var>[<var>index</var>+ 2] = the <i>number of values</i> taken into account<br>
-     *         <var>argout</var>[<var>index</var>+ 3] = the <i>type </i>associated to this mode<br>
-     *         <var>argout</var>[<var>index</var>+ 4] = Not used at the moment <br>
-     *         <var>index</var> = <var>index</var> + 5<br>
-     *         <li><strong>If the Mode is composed of an <i>On Difference Mode</i></strong><br>
-     *         <var>argout</var>[<var>index</var>] = <code>MODE_D</code><br>
-     *         <var>argout</var>[<var>index</var>+ 1] = the <i>frequency </i>of this<i> mode </i>(in ms)<br>
-     *         <var>index</var> = <var>index</var> + 2<br>
-     *         <li><strong>If the Mode is composed of an <i>External Mode</i></strong><br>
-     *         <var>argout</var>[<var>index</var>] = <code>MODE_E</code><br>
-     *         <var>index</var> = <var>index</var> + 1<br>
-     *         </ul>
-     *         </blockquote>
-     */
-    // =========================================================
-    public String[] get_archiving_mode_hdb(final String argin) throws DevFailed {
-        get_logger().info("Entering get_archiving_mode_hdb()");
-        updateDatabaseConnections();
-        String[] argout;
-        if (hdbManager == null) {
-            argout = new String[5];
-            Arrays.fill(argout, "");
-        } else {
-            // ---Add your Own code to control device here ---
-            try {
-                final Mode mode = hdbManager.getArchivingMode(argin);
-                argout = mode.toArray();
-            } catch (final ArchivingException e) {
-                get_logger().error(e.getMessage());
-                throw e.toTangoException();
-            }
-        }
-        get_logger().info("Exiting get_archiving_mode_hdb()");
-        return argout;
-    }
-
-    // =========================================================
-    /**
-     * Execute command "GetArchivingModeTdb" on device. Return the temporary
-     * archiving mode applied to an attribute.
-     * 
-     * @param argin
-     *            The attribute name.
-     * @return The applied mode... <br>
-     *         <blockquote>
-     *         <ul>
-     *         Let us note <i>&quot;<var>index</var>&quot; </i>the last <var>index</var> used (for example, at this
-     *         point, <i><var>index</var></i> = 0]).
-     *         <li><strong>If the Mode is composed of a <i>Periodical Mode</i></strong><br>
-     *         <var>argout</var>[<var>index</var>] = <code>MODE_P</code><br>
-     *         <var>argout</var>[<var>index</var> + 1] = the period of the periodic mode in (ms)<br>
-     *         <var>index</var> = <var>index</var> + 2<br>
-     *         <li><strong>If the Mode is composed of an <i>Absolute Mode</i></strong><br>
-     *         <var>argout</var>[<var>index</var>] = <code>MODE_A</code><br>
-     *         <var>argout</var>[<var>index</var>+ 1] = the frequency of the <i>absolute mode </i>in (ms)<br>
-     *         <var>argout</var>[<var>index</var>+ 2] = the delta value max when decreasing<br>
-     *         <var>argout</var>[<var>index</var>+ 3] = the delta value max when increasing<br>
-     *         <var>index</var> = <var>index</var> + 4<br>
-     *         <li><strong>If the Mode is composed of a <i>Relative Mode</i></strong><br>
-     *         <var>argout</var>[<var>index</var>] = <code>MODE_R</code><br>
-     *         <var>argout</var>[<var>index</var>+ 1] = the <i>frequency </i>of the <i>relative mode </i>in (ms)<br>
-     *         <var>argout</var>[<var>index</var>+ 2] = the <i>decreasing variation </i>associated to this mode<br>
-     *         <var>argout</var>[<var>index</var>+ 3] = the <i>increasing variation </i>associated to this mode<br>
-     *         <var>index</var> = <var>index</var> + 4<br>
-     *         <li><strong>If the Mode is composed of an <i>Threshold Mode</i></strong><br>
-     *         <var>argout</var>[<var>index</var>] = <code>MODE_T</code><br>
-     *         <var>argout</var>[<var>index</var>+ 1] = the frequency of the <i>threshold mode </i>in (ms)<br>
-     *         <var>argout</var>[<var>index</var>+ 2] = the smallest value (min) when decreasing<br>
-     *         <var>argout</var>[<var>index</var>+ 3] = the biggest value (max) when increasing<br>
-     *         <var>index</var> = <var>index</var> + 4<br>
-     *         <li>If the Mode is composed of a <i>On Calculation Mode</i></strong><br>
-     *         <var>argout</var>[<var>index</var>] = <code>MODE_C</code><br>
-     *         <var>argout</var>[<var>index</var>+ 1] = the <i>frequency </i>of the <i>on calculation mode </i>in (ms)<br>
-     *         <var>argout</var>[<var>index</var>+ 2] = the <i>number of values</i> taken into account<br>
-     *         <var>argout</var>[<var>index</var>+ 3] = the <i>type </i>associated to this mode<br>
-     *         <var>argout</var>[<var>index</var>+ 4] = Not used at the moment <br>
-     *         <var>index</var> = <var>index</var> + 5<br>
-     *         <li><strong>If the Mode is composed of an <i>On Difference Mode</i></strong><br>
-     *         <var>argout</var>[<var>index</var>] = <code>MODE_D</code><br>
-     *         <var>argout</var>[<var>index</var>+ 1] = the <i>frequency </i>of this<i> mode </i>(in ms)<br>
-     *         <var>index</var> = <var>index</var> + 2<br>
-     *         <li><strong>If the Mode is composed of an <i>External Mode</i></strong><br>
-     *         <var>argout</var>[<var>index</var>] = <code>MODE_E</code><br>
-     *         <var>index</var> = <var>index</var> + 1<br>
-     *         <li><strong>The Temporary (<i>Intermediate Archiving</i>) archiving specific informations </strong><br>
-     *         <var>argout</var>[<var>index</var>] = <code>TDB_SPEC</code><br>
-     *         <var>argout</var>[<var>index</var>+ 1] = the <i>export frequency </i>(ms)<br>
-     *         <var>argout</var>[<var>index</var>+ 2] = the <i>keeping window duration </i>in (ms)<br>
-     *         <var>index</var> = <var>index</var> + 3<br>
-     *         </ul>
-     *         </blockquote>
-     */
-    // =========================================================
-    public String[] get_archiving_mode_tdb(final String argin) throws DevFailed {
-        get_logger().info("Entering get_archiving_mode_tdb()");
-        String[] argout;
-        updateDatabaseConnections();
-        if (tdbManager == null) {
-            argout = new String[5];
-            Arrays.fill(argout, "");
-        } else {
-            // ---Add your Own code to control device here ---
-            try {
-                final Mode mode = tdbManager.getArchivingMode(argin);
-                argout = mode.toArray();
-            } catch (final ArchivingException e) {
-                get_logger().error(e.getMessage());
-                throw e.toTangoException();
-            }
-        }
-        get_logger().info("Exiting get_archiving_mode_tdb()");
-        return argout;
-    }
-
-    // =========================================================
-    /**
-     * Execute command "GetStatusHdb" on device. For each attribute of the given
-     * list, get the status of the device in charge of its historical archiving
-     * 
-     * @param argin
-     *            The attribute list.
-     * @return The list of status.
-     */
-    // =========================================================
-    public String[] get_status_hdb(final String[] argin) throws DevFailed {
-        get_logger().info("Entering get_status_hdb()");
-        updateDatabaseConnections();
-        String[] argout = new String[argin.length];
-        if (hdbManager == null) {
-            Arrays.fill(argout, "");
-        } else {
-            for (int i = 0; i < argin.length; i++) {
-                try {
-                    argout[i] = hdbManager.getStatus(argin[i]);
-                } catch (final ArchivingException e) {
-                    throw e.toTangoException();
-                }
-            }
-        }
-        get_logger().info("Exiting get_status_hdb()");
-        return argout;
-    }
-
-    // =========================================================
-    /**
-     * Execute command "GetStatusTdb" on device. For each attribute of the given
-     * list, get the status of the device in charge of its temporary archiving.
-     * 
-     * @param argin
-     *            The attribute list.
-     * @return The list of status.
-     */
-    // =========================================================
-    public String[] get_status_tdb(final String[] argin) throws DevFailed {
-        get_logger().info("Entering get_status_tdb()");
-        String[] argout = new String[argin.length];
-        updateDatabaseConnections();
-        if (tdbManager == null) {
-            Arrays.fill(argout, "");
-        } else {
-            for (int i = 0; i < argin.length; i++) {
-                try {
-                    argout[i] = tdbManager.getStatus(argin[i]);
-                } catch (final ArchivingException e) {
-                    throw e.toTangoException();
-                }
-            }
-        }
-        get_logger().info("Exiting get_status_tdb()");
-        return argout;
-    }
-
-    // ===================================================================
-    /**
-     * Method called by the read_attributes CORBA operation to set internal
-     * attribute value.
-     * 
-     * @param attr
-     *            reference to the Attribute object
-     */
-    // ===================================================================
-    @Override
-    public void read_attr(final Attribute attr) throws DevFailed {
-        final String attr_name = attr.get_name();
-        // get_logger().info("In read_attr for attribute " + attr_name);
-
-        // Switch on attribute name
-        // ---------------------------------
-        if (attr_name == "version") {
-            // Add your own code here
-            attr.set_value(m_version);
-        }
-    }
-
-    // =========================================================
-    /**
-     * main part for the device server class
-     */
-    // =========================================================
-    public static void main(final String[] argv) {
-        try {
-            final Util tg = Util.init(argv, "ArchivingManager");
-            tg.server_init();
-
-            System.out.println("Ready to accept request");
-
-            tg.server_run();
-        } catch (final OutOfMemoryError ex) {
-            System.err.println("Can't allocate memory !!!!");
-            System.err.println("Exiting");
-        } catch (final UserException ex) {
-            Except.print_exception(ex);
-
-            System.err.println("Received a CORBA user exception");
-            System.err.println("Exiting");
-        } catch (final SystemException ex) {
-            Except.print_exception(ex);
-
-            System.err.println("Received a CORBA system exception");
-            System.err.println("Exiting");
-        }
-
-        System.exit(-1);
-    }
-
-    @Override
-    public void delete_device() throws DevFailed {
-        // TODO Auto-generated method stub
-
-    }
-}
-
-// --------------------------------------------------------------------------
-/*
- * end of $Source:
- * /cvsroot/tango-cs/tango/jserver/archiving/ArchivingManager/ArchivingManager
- * .java,v $
- */
+// +============================================================================
+// $Source:
+// /cvsroot/tango-cs/tango/jserver/archiving/ArchivingManager/ArchivingManager.java,v
+// $
+//
+// project : Tango Device Server
+//
+// Description: java source code for the ArchivingManager class and its
+// commands.
+// This class is derived from DeviceImpl class.
+// It represents the CORBA servant obbject which
+// will be accessed from the network. All commands which
+// can be executed on the ArchivingManager are implemented
+// in this file.
+//
+// $Author: pierrejoseph $
+//
+// $Revision: 1.19 $
+//
+// $Log: ArchivingManager.java,v $
+// Revision 1.19 2007/05/11 13:58:16 pierrejoseph
+// Attribute addition : release version
+//
+// Revision 1.18 2007/03/05 16:25:20 ounsy
+// non-static DataBase
+//
+// Revision 1.17 2007/02/26 16:14:24 ounsy
+// archiving devices now inherits just from DeviceImpl instead of
+// DeviceImplWithShutdownRunnable (they're nonlonger unexported onn shutdown)
+//
+// Revision 1.16 2007/02/01 13:49:47 pierrejoseph
+// minor changes
+//
+// Revision 1.15 2007/01/05 12:54:47 pierrejoseph
+// Modification of the ArchivingMessConfig object creation and so the
+// ArchivingStart and ArchivingModif methods argin has been simplified.
+//
+// Revision 1.14 2006/11/20 09:24:49 ounsy
+// minor changes
+//
+// Revision 1.13 2006/11/13 15:57:37 ounsy
+// all java devices now inherit from UnexportOnShutdownDeviceImpl instead of
+// from DeviceImpl
+//
+// Revision 1.12 2006/10/30 14:33:54 ounsy
+// modified the ArchivingConfigure command and the init_device method to init
+// the HDB and TDB connections separately
+//
+// Revision 1.11 2006/10/12 06:53:42 chinkumo
+// Argin comment modification for the archivingStartHdb command.
+// ==>modif pr�c�demment perdue
+//
+// Revision 1.10 2006/10/11 08:30:32 ounsy
+// modified the archiving_start commands to accept the same parameters as
+// Archivers
+//
+// Revision 1.9 2006/10/09 12:53:57 chinkumo
+// Argin comment modification for the archivingStartHdb command.
+//
+// Revision 1.8 2006/01/27 13:06:41 ounsy
+// organised imports
+//
+// Revision 1.7 2005/11/29 17:34:41 chinkumo
+// no message
+//
+// Revision 1.6.10.4 2005/11/29 16:14:07 chinkumo
+// Code reformated (pogo compatible)
+//
+// Revision 1.6.10.3 2005/11/15 13:46:24 chinkumo
+// ...
+//
+// Revision 1.6.10.2 2005/09/26 08:26:57 chinkumo
+// Minor changes !
+//
+// Revision 1.6.10.1 2005/09/16 08:10:22 chinkumo
+// The ArchivingManager now use exclusively ArchivingMessConfig object to
+// trigger archiving.
+//
+// Revision 1.6 2005/06/14 10:24:03 chinkumo
+// Branch (archivingManager_1_0_1-branch_0) and HEAD merged.
+//
+// Revision 1.5.4.3 2005/06/13 14:49:04 chinkumo
+// The ArchivingManager device was regenerated in Tango V5.
+// Changes made to improve the management of exceptions were reported here.
+// This class was also modified as some commands now returns a void object
+// (ArchivingStartHdb, ArchivingStartTdb, ArchivingStopHdb, ArchivingStopTdb,
+// ArchivingModifHdb, ArchivingModifTdb).
+//
+// Revision 1.5.4.2 2005/05/11 14:46:18 chinkumo
+// The ArchivingConfigure's command comment (for documentation ) was corrected.
+//
+// Revision 1.5.4.1 2005/05/03 16:33:01 chinkumo
+// Some constants in the class
+// 'fr.soleil.hdbtdbArchivingApi.ArchivingApi.ConfigConst' were renamed. Changes
+// reported here.
+//
+// Revision 1.5 2005/02/04 17:25:19 chinkumo
+// The trouble with grouped strategy when launching an archiving sequence was
+// fixed.
+
+// The grouped stopping functionnality was reported.
+//
+// Revision 1.4 2005/01/28 13:11:13 taurel
+// Some changes in source files to be Pogo compatible
+//
+// Revision 1.3 2005/01/26 16:33:33 chinkumo
+// Export of the new DServer source code.
+//
+//
+// copyleft : European Synchrotron Radiation Facility
+// BP 220, Grenoble 38043
+// FRANCE
+//
+// -============================================================================
+//
+// This file is generated by POGO
+// (Program Obviously used to Generate tango Object)
+//
+// (c) - Software Engineering Group - ESRF
+// =============================================================================
+
+package ArchivingManager;
+
+import java.util.Arrays;
+
+import fr.soleil.database.connection.DataBaseParameters;
+import org.omg.CORBA.SystemException;
+import org.omg.CORBA.UserException;
+import org.tango.utils.DevFailedUtils;
+
+import fr.esrf.Tango.DevFailed;
+import fr.esrf.Tango.DevState;
+import fr.esrf.Tango.ErrSeverity;
+import fr.esrf.TangoApi.DbDatum;
+import fr.esrf.TangoDs.Attribute;
+import fr.esrf.TangoDs.DeviceClass;
+import fr.esrf.TangoDs.DeviceImpl;
+import fr.esrf.TangoDs.Except;
+import fr.esrf.TangoDs.TangoConst;
+import fr.esrf.TangoDs.Util;
+import fr.soleil.archiving.common.api.ConnectionFactory;
+import fr.soleil.archiving.common.api.exception.ArchivingException;
+import fr.soleil.archiving.common.api.tools.GlobalConst;
+import fr.soleil.archiving.hdbtdb.api.ConfigConst;
+import fr.soleil.archiving.hdbtdb.api.HdbTdbConnectionParameters;
+import fr.soleil.archiving.hdbtdb.api.manager.ArchivingManagerApiRefFactory;
+import fr.soleil.archiving.hdbtdb.api.manager.IArchivingManagerApiRef;
+import fr.soleil.archiving.hdbtdb.api.tools.ArchivingMessConfig;
+import fr.soleil.archiving.hdbtdb.api.tools.mode.Mode;
+import fr.soleil.database.connection.AbstractDataBaseConnector;
+
+/**
+ * Class Description: Device of Archiving system <Br>
+ * <Br>
+ * <br>
+ * <b>ROLE</b><br>
+ * This DeviceServer is used in order to manage the archiving of exported Tango
+ * attributes device. <Br>
+ * <Br>
+ * <br>
+ * <b>ARCHIVING TYPE</b><br>
+ * There is two kind of archiving : <Br>
+ * <Br>
+ * <Li><b>The Historical archiving</b>, manage by HdbArchiver devices.<br>
+ * This kind archiving allows to store in a database all the exported tango attributes.<br>
+ * It is a continuous and never deleted storage.<br>
+ * The frequency use for this kind of storage is usually small. <Br>
+ * <Br> <Li><b>The Temporary archiving</b>, manage by TdbArchiver devices.<br>
+ * This kind archiving allows to store in a database all the exported tango attributes.<br>
+ * The stored values are kept in the database for a limited time ("Keeping Window" [4 hours - 24 hours]). Before being
+ * stored into the database, values are first collected into files (timestamp, read value [, write value]). Those files
+ * are periodically exported to the database. This export frequency must also be given ("Export Window" [5 seconds - 1
+ * hour]).<br>
+ * The frequency use for this kind of storage is usually high. <Br>
+ * <Br>
+ * <br>
+ * <b>ARCHIVING MODE</b><br>
+ * An archiving sequence must be tuned to follow one (or several) of the defined archiving modes :<br> <Li>The
+ * <b>Periodical mode</b>, this mode allows to archive following a defined frequency.<br> <Li>The <b>Absolute mode</b>,
+ * this mode allows to archive a value only if : <br>
+ * &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <var>current_value</var> &gt; <var>previous_archived_value</var> +
+ * <var>&delta;<sub>1</sub></var> &nbsp;&nbsp;&nbsp;&nbsp; or <br>
+ * &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <var>current_value</var> &lt; <var>previous_archived_value</var> -
+ * <var>&delta;<sub>2</sub></var>.<br> <Li>The <b>Relative mode</b>, this mode allows to archive a value only if :<br>
+ * &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <var>current_value</var> &gt; <var>previous_archived_value</var>
+ * <var>&micro;<sub>increase</sub></var> &nbsp;&nbsp;&nbsp;&nbsp; or <br>
+ * &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <var>current_value</var> &lt; <var>previous_archived_value</var>
+ * <var>&micro;<sub>decrease</sub></var>.<br>
+ * &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (<var>&micro;<sub>increase</sub></var> and
+ * <var>&micro;<sub>decrease</sub></var> are percentages) <Li>The <b>Threshold mode</b>, this mode allows to archive a
+ * value only if :<br>
+ * &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <var>current_value</var> &gt;
+ * <var>threshold_value<sub>sup</sub></var> &nbsp;&nbsp;&nbsp;&nbsp; or <br>
+ * &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <var>current_value</var> &lt;
+ * <var>threshold_value<sub>min</sub></var>.<br>
+ * (like alarms work).<br>
+ * <Br>
+ * <Br> <Li>The <b>On Calculation mode</b>, this mode allows to archive according to a user formula.<br> <Li>The <b>On
+ * Difference mode</b>, this mode allows to archive when a value changes.<br> <Li>The <b>External mode</b>, this mode
+ * allows to archive on the user demand.<br>
+ * <br>
+ * <br>
+ * The 6 last mode must be associated to a periodic mode. <Br>
+ * <Br>
+ * 
+ * @author $Author: pierrejoseph $
+ * @version $Revision: 1.19 $
+ */
+
+// --------- Start of States Description ----------
+/*
+ * Device States Description: DevState.ON : The device is ready to use.
+ * DevState.RUNNING : The device is executing a command and is not avalaible.
+ * DevState.INIT : The device is initializing and still not ready to use.
+ * DevState.ALARM : Either one of the two databases (HDB or TDB) is unreachable,
+ * or there is no archiver one of them. DevState.FAULT : Either the two
+ * databases (HDB and TDB) are unreachable, or there is no archiver at all.
+ */
+// --------- End of States Description ----------
+public class ArchivingManager extends DeviceImpl
+/* WithShutdownRunnable */implements TangoConst {
+
+    protected int state;
+    private IArchivingManagerApiRef hdbManager, tdbManager;
+
+    private final String m_version;
+
+    // --------- Start of attributes data members ----------
+
+    // --------- End of attributes data members ----------
+
+    // --------- Start of properties data members ----------
+    /**
+     * Computer identifier on wich is settled the database DB. The identifier
+     * can be the computer name or its IP address. <br>
+     * <b>Default value : </b> hdb
+     */
+    protected String hdbHost;
+    /**
+     * Database name.<br>
+     * <b>Default value : </b> hdb
+     */
+    protected String hdbName;
+
+    /**
+     * Computer identifier on wich is settled the database TDB. The identifier
+     * can be the computer name or its IP address. <br>
+     * <b>Default value : </b> tdb
+     */
+    protected String tdbHost;
+    /**
+     * Database name.<br>
+     * <b>Default value : </b> tdb
+     */
+    protected String tdbName;
+
+    /**
+     * User identifier (name) used to connect the historical database.
+     */
+    protected String hdbUser;
+    /**
+     * Password used to connect the historical database.
+     */
+    protected String hdbPassword;
+    /**
+     * User identifier (name) used to connect the temporary database.
+     */
+    protected String tdbUser;
+    /**
+     * Password used to connect the temporary database.
+     */
+    protected String tdbPassword;
+    /**
+     * true if the ORACLE RAC connection is activated. This information is
+     * appended to all device's (or attributes) name. false otherwise.<br>
+     * <b>Default value : </b> false
+     */
+    protected boolean hdbRacConnection;
+    protected boolean tdbRacConnection;
+    private String hdbSchema;
+    private String tdbSchema;
+
+    // --------- End of properties data members ----------
+
+    // Add your own data members here
+    // --------------------------------------
+
+    // =========================================================
+    /**
+     * Constructor for simulated Time Device Server.
+     * 
+     * @param cl
+     *            The DeviceClass object
+     * @param s
+     *            The Device name.
+     * @param version
+     *            The device version
+     */
+    // =========================================================
+    public ArchivingManager(final DeviceClass cl, final String s, final String version) throws DevFailed {
+        super(cl, s);
+        m_version = version;
+        init_device();
+    }
+
+    // =========================================================
+    /**
+     * Constructor for simulated Time Device Server.
+     * 
+     * @param cl
+     *            The DeviceClass object
+     * @param s
+     *            The Device name.
+     * @param d
+     *            Device description.
+     * @param version
+     *            The device version
+     */
+    // =========================================================
+    public ArchivingManager(final DeviceClass cl, final String s, final String d, final String version)
+            throws DevFailed {
+        super(cl, s, d);
+        m_version = version;
+        init_device();
+    }
+
+    // =========================================================
+    /**
+     * Initialize the device.
+     */
+    // =========================================================
+    @Override
+    public void init_device() throws DevFailed {
+        System.out.println("ArchivingManager() create " + device_name);
+        HdbTdbConnectionParameters.initDbAvailable();
+        // Initialise variables to default values
+        // -------------------------------------------
+        get_device_property();
+        StringBuilder statusBuilder = new StringBuilder();
+        Boolean hdbAvailable = HdbTdbConnectionParameters.isHdbAvailable() ? Boolean.valueOf(connectHdb(statusBuilder))
+                : null;
+        Boolean tdbAvailable = HdbTdbConnectionParameters.isTdbAvailable() ? Boolean.valueOf(connectTdb(statusBuilder))
+                : null;
+        updateState(statusBuilder, hdbAvailable, tdbAvailable);
+    }
+
+    protected boolean isOk(IArchivingManagerApiRef manager) {
+        return ((manager != null) && (manager.getArchiverListSize() > 0));
+    }
+
+    protected void updateState(StringBuilder statusBuilder, Boolean hdbAvailable, Boolean tdbAvailable) {
+        if (hdbAvailable == null) {
+            if (tdbAvailable == null) {
+                set_state(DevState.FAULT);
+            } else if (tdbAvailable.booleanValue()) {
+                if (isOk(tdbManager)) {
+                    set_state(DevState.ON);
+                } else {
+                    set_state(DevState.ALARM);
+                }
+            } else {
+                set_state(DevState.FAULT);
+            }
+        } else if (tdbAvailable == null) {
+            if (hdbAvailable.booleanValue()) {
+                if (isOk(hdbManager)) {
+                    set_state(DevState.ON);
+                } else {
+                    set_state(DevState.ALARM);
+                }
+            } else {
+                set_state(DevState.FAULT);
+            }
+        } else if (hdbAvailable.booleanValue()) {
+            if (tdbAvailable.booleanValue()) {
+                if (isOk(hdbManager) && isOk(tdbManager)) {
+                    set_state(DevState.ON);
+                } else {
+                    set_state(DevState.ALARM);
+                }
+            } else {
+                set_state(DevState.ALARM);
+            }
+        } else if (tdbAvailable.booleanValue()) {
+            set_state(DevState.ALARM);
+        } else {
+            set_state(DevState.FAULT);
+        }
+        if (hdbManager != null) {
+            statusBuilder.append("HDB Archivers: ").append(Arrays.toString(hdbManager.getMExportedArchiverList()))
+                    .append("\n");
+        }
+        if (tdbManager != null) {
+            statusBuilder.append("TDB Archivers: ").append(Arrays.toString(tdbManager.getMExportedArchiverList()))
+                    .append("\n");
+        }
+        set_status(statusBuilder.toString().trim());
+    }
+
+    protected boolean connectHdb(StringBuilder statusBuilder) {
+        boolean hdbAvailable;
+        try {
+            DataBaseParameters parameters = new DataBaseParameters();
+            parameters.setParametersFromTango(ConfigConst.HDB_CLASS_DEVICE);
+            AbstractDataBaseConnector hdbConnector = ConnectionFactory.connect(parameters);
+            hdbManager = ArchivingManagerApiRefFactory.getInstance(true, hdbConnector);
+            hdbManager.archivingConfigure();
+            hdbAvailable = true;
+        } catch (final ArchivingException e) {
+            hdbAvailable = false;
+            get_logger().warn(e.toString(), e);
+            statusBuilder.append("HDB not available - error: ").append(e.getLastExceptionMessage()).append("\n");
+        } catch (final DevFailed e) {
+            hdbAvailable = false;
+            get_logger().warn(e.toString(), e);
+            statusBuilder.append("HDB not available - error:\n").append(DevFailedUtils.toString(e)).append("\n");
+        }
+        return hdbAvailable;
+    }
+
+    protected boolean connectTdb(StringBuilder statusBuilder) {
+        boolean tdbAvailable;
+        try {
+            DataBaseParameters parameters = new DataBaseParameters();
+            parameters.setParametersFromTango(ConfigConst.TDB_CLASS_DEVICE);
+            AbstractDataBaseConnector tdbConnector = ConnectionFactory.connect(parameters);
+            tdbManager = ArchivingManagerApiRefFactory.getInstance(false, tdbConnector);
+            tdbManager.archivingConfigure();
+            tdbAvailable = true;
+        } catch (final ArchivingException e) {
+            tdbAvailable = false;
+            get_logger().warn(e.toString(), e);
+            statusBuilder.append("TDB not available - error: ").append(e.getLastExceptionMessage()).append("\n");
+        } catch (final DevFailed e) {
+            tdbAvailable = false;
+            get_logger().warn(e.toString(), e);
+            statusBuilder.append("TDB not available - error:\n").append(DevFailedUtils.toString(e)).append("\n");
+        }
+        return tdbAvailable;
+    }
+
+    protected synchronized void updateDatabaseConnections() {
+        StringBuilder statusBuilder = new StringBuilder();
+        Boolean hdbAvailable, tdbAvailable;
+        if (HdbTdbConnectionParameters.isHdbAvailable()) {
+            if (hdbManager == null) {
+                hdbAvailable = Boolean.valueOf(connectHdb(statusBuilder));
+            } else if (hdbManager.isDbConnected()) {
+                hdbAvailable = Boolean.TRUE;
+            } else {
+                try {
+                    hdbManager.archivingConfigure();
+                    hdbAvailable = Boolean.TRUE;
+                } catch (ArchivingException e) {
+                    hdbAvailable = Boolean.FALSE;
+                    get_logger().warn(e.toString(), e);
+                    statusBuilder.append("HDB not available - error: ").append(e.getLastExceptionMessage())
+                            .append("\n");
+                }
+            }
+        } else {
+            hdbAvailable = null;
+        }
+        if (HdbTdbConnectionParameters.isTdbAvailable()) {
+            if (tdbManager == null) {
+                tdbAvailable = Boolean.valueOf(connectTdb(statusBuilder));
+            } else if (tdbManager.isDbConnected()) {
+                tdbAvailable = true;
+            } else {
+                try {
+                    tdbManager.archivingConfigure();
+                    tdbAvailable = Boolean.TRUE;
+                } catch (ArchivingException e) {
+                    tdbAvailable = Boolean.FALSE;
+                    get_logger().warn(e.toString(), e);
+                    statusBuilder.append("TDB not available - error: ").append(e.getLastExceptionMessage())
+                            .append("\n");
+                }
+            }
+        } else {
+            tdbAvailable = null;
+        }
+        updateState(statusBuilder, hdbAvailable, tdbAvailable);
+    }
+
+    // ===================================================================
+    /**
+     * Read the device properties from database.
+     */
+    // ===================================================================
+    public void get_device_property() throws DevFailed {
+        // Initialize your default values here.
+        // ------------------------------------------
+        hdbUser = ConfigConst.HDB_MANAGER_USER;
+        hdbPassword = ConfigConst.HDB_MANAGER_PASSWORD;
+        tdbUser = ConfigConst.TDB_MANAGER_USER;
+        tdbPassword = ConfigConst.TDB_MANAGER_PASSWORD;
+
+        // Read device properties from database.(Automatic code generation)
+        // -------------------------------------------------------------
+        if (Util._UseDb == false) {
+            return;
+        }
+        final String[] propnames = { "HdbHost", "HdbName", "HdbSchema", "TdbHost", "TdbName", "TdbSchema", "HdbUser",
+                "HdbPassword", "TdbUser", "TdbPassword", "HdbRacConnection", "TdbRacConnection" };
+
+        // Call database and extract values
+        // --------------------------------------------
+        final DbDatum[] dev_prop = get_db_device().get_property(propnames);
+        final ArchivingManagerClass ds_class = (ArchivingManagerClass) get_device_class();
+        int i = -1;
+
+        // Extract HDBHost value
+        if (dev_prop[++i].is_empty() == false) {
+            hdbHost = dev_prop[i].extractString();
+        } else {
+            // Try to get value from class property
+            final DbDatum cl_prop = ds_class.get_class_property(dev_prop[i].name);
+            if (cl_prop.is_empty() == false) {
+                hdbHost = cl_prop.extractString();
+            }
+        }
+
+        // Extract HDbName value
+        if (dev_prop[++i].is_empty() == false) {
+            hdbName = dev_prop[i].extractString();
+        } else {
+            // Try to get value from class property
+            final DbDatum cl_prop = ds_class.get_class_property(dev_prop[i].name);
+            if (cl_prop.is_empty() == false) {
+                hdbName = cl_prop.extractString();
+            }
+        }
+
+        // Extract HdbSchema value
+        if (dev_prop[++i].is_empty() == false) {
+            hdbSchema = dev_prop[i].extractString();
+        } else {
+            // Try to get value from class property
+            final DbDatum cl_prop = ds_class.get_class_property(dev_prop[i].name);
+            if (cl_prop.is_empty() == false) {
+                hdbSchema = cl_prop.extractString();
+            }
+        }
+
+        // Extract TDBHost value
+        if (dev_prop[++i].is_empty() == false) {
+            tdbHost = dev_prop[i].extractString();
+        } else {
+            // Try to get value from class property
+            final DbDatum cl_prop = ds_class.get_class_property(dev_prop[i].name);
+            if (cl_prop.is_empty() == false) {
+                tdbHost = cl_prop.extractString();
+            }
+        }
+
+        // Extract TDbName value
+        if (dev_prop[++i].is_empty() == false) {
+            tdbName = dev_prop[i].extractString();
+        } else {
+            // Try to get value from class property
+            final DbDatum cl_prop = ds_class.get_class_property(dev_prop[i].name);
+            if (cl_prop.is_empty() == false) {
+                tdbName = cl_prop.extractString();
+            }
+        }
+
+        // Extract tdbSchema value
+        if (dev_prop[++i].is_empty() == false) {
+            tdbSchema = dev_prop[i].extractString();
+        } else {
+            // Try to get value from class property
+            final DbDatum cl_prop = ds_class.get_class_property(dev_prop[i].name);
+            if (cl_prop.is_empty() == false) {
+                tdbSchema = cl_prop.extractString();
+            }
+        }
+
+        // Extract HdbUser value
+        if (dev_prop[++i].is_empty() == false) {
+            hdbUser = dev_prop[i].extractString();
+        } else {
+            // Try to get value from class property
+            final DbDatum cl_prop = ds_class.get_class_property(dev_prop[i].name);
+            if (cl_prop.is_empty() == false) {
+                hdbUser = cl_prop.extractString();
+            }
+        }
+
+        // Extract HdbPassword value
+        if (dev_prop[++i].is_empty() == false) {
+            hdbPassword = dev_prop[i].extractString();
+        } else {
+            // Try to get value from class property
+            final DbDatum cl_prop = ds_class.get_class_property(dev_prop[i].name);
+            if (cl_prop.is_empty() == false) {
+                hdbPassword = cl_prop.extractString();
+            }
+        }
+
+        // Extract TdbUser value
+        if (dev_prop[++i].is_empty() == false) {
+            tdbUser = dev_prop[i].extractString();
+        } else {
+            // Try to get value from class property
+            final DbDatum cl_prop = ds_class.get_class_property(dev_prop[i].name);
+            if (cl_prop.is_empty() == false) {
+                tdbUser = cl_prop.extractString();
+            }
+        }
+
+        // Extract TdbPassword value
+        if (dev_prop[++i].is_empty() == false) {
+            tdbPassword = dev_prop[i].extractString();
+        } else {
+            // Try to get value from class property
+            final DbDatum cl_prop = ds_class.get_class_property(dev_prop[i].name);
+            if (cl_prop.is_empty() == false) {
+                tdbPassword = cl_prop.extractString();
+            }
+        }
+        // Extract HdbRacConnection value
+        if (dev_prop[++i].is_empty() == false) {
+            hdbRacConnection = dev_prop[i].extractBoolean();
+        } else {
+            // Try to get value from class property
+            final DbDatum cl_prop = ds_class.get_class_property(dev_prop[i].name);
+            if (cl_prop.is_empty() == false) {
+                hdbRacConnection = cl_prop.extractBoolean();
+            }
+        }
+
+        // Extract TdbRacConnection value
+        if (dev_prop[++i].is_empty() == false) {
+            tdbRacConnection = dev_prop[i].extractBoolean();
+        } else {
+            // Try to get value from class property
+            final DbDatum cl_prop = ds_class.get_class_property(dev_prop[i].name);
+            if (cl_prop.is_empty() == false) {
+                tdbRacConnection = cl_prop.extractBoolean();
+            }
+        }
+        // End of Automatic code generation
+        // -------------------------------------------------------------
+
+    }
+
+    // =========================================================
+    /**
+     * Method always executed before command execution.
+     */
+    // =========================================================
+    @Override
+    public void always_executed_hook() {
+        get_logger().info("In always_executed_hook method()");
+    }
+
+    // =========================================================
+    /**
+     * Execute command "State" on device. This command gets the device state
+     * (stored in its <i>device_state</i> data member) and returns it to the
+     * caller.
+     * 
+     * @return State Code
+     */
+    // =========================================================
+    @Override
+    public DevState dev_state() throws DevFailed {
+        final DevState argout = super.dev_state();
+
+        // get_logger().info("Entering dev_state()");
+        //
+        // // ---Add your Own code to control device here ---
+        //
+        // get_logger().info("Exiting dev_state()");
+        return argout;
+    }
+
+    // =========================================================
+    /**
+     * Execute command "ArchivingConfigure" on device. This command configures
+     * the connection to the historical and temporary databases. It then needs 4
+     * parameters : a login and password for Hdb + a login and password for Tdb
+     * 
+     * @param argin
+     *            <ul>
+     *            <li><var>argin</var>[<code>0</code>], the <em>user name</em> used to logg into the historical
+     *            database.
+     *            <li><var>argin</var>[<code>1</code>], the <em>password</em> used to logg into the historical database.
+     *            <li><var>argin</var>[<code>2</code>], the <em>user name</em> used to logg into the temporary database.
+     *            <li><var>argin</var>[<code>9</code>], the <em>password</em> used to logg into the temporary database.
+     *            </ul>
+     */
+    // =========================================================
+    public void archiving_configure(final String[] argin) throws DevFailed {
+        get_logger().info("Entering archiving_configure()");
+        String exitMessage = "Exiting archiving_configure()";
+        if ((argin == null) || (argin.length < 4)) {
+            String errorMessage = "Invalid argument";
+            get_logger().warn(errorMessage);
+            get_logger().info(exitMessage);
+            throw new DevFailed(errorMessage, null);
+        } else {
+            // ---Add your Own code to control device here ---
+            /*
+             * try { ArchivingManagerApi.ArchivingConfigure(argin[ 0 ] , argin[ 1 ]
+             * , argin[ 2 ] , argin[ 3 ], argin[ 4 ]); } catch ( ArchivingException
+             * e ) { get_logger().warn(e.toString() , e); throw
+             * e.toTangoException(); }
+             */
+            boolean needsToThrow = false;
+            // TODO maybe update status, and maybe avoid connections to undesired database (HdbTdbConnectionParameters)
+            ArchivingException hdbArchivingException = null;
+            IArchivingManagerApiRef previousHdbManager = hdbManager;
+            try {
+                String hdbUser = argin[0], hdbPassword = argin[1];
+                DataBaseParameters parameters = new DataBaseParameters();
+                parameters.setParametersFromTango(ConfigConst.HDB_CLASS_DEVICE);
+                AbstractDataBaseConnector hdbConnector = ConnectionFactory.connect(parameters);
+                hdbManager = ArchivingManagerApiRefFactory.getInstance(true, hdbConnector);
+                hdbManager.archivingConfigure();
+            } catch (final ArchivingException e) {
+                get_logger().warn(e.toString(), e);
+                // throw e.toTangoException(); CLA 30/10/06 AN EXCEPTION IS NO
+                // LONGER THROWN, AS BOTH DATABASES ARE INITIALIZED INDEPENDENTLY
+                hdbArchivingException = e;
+                needsToThrow = true;
+                // restore previous manager as this one does not seem to be ok
+                hdbManager = previousHdbManager;
+            } catch (DevFailed e) {
+                get_logger().warn(DevFailedUtils.toString(e), e);
+                hdbArchivingException = new ArchivingException(e);
+                needsToThrow = true;
+                // restore previous manager as this one does not seem to be ok
+                hdbManager = previousHdbManager;
+            }
+
+            ArchivingException tdbArchivingException = null;
+            IArchivingManagerApiRef previousTdbManager = tdbManager;
+            try {
+                String tdbUser = argin[2], tdbPassword = argin[3];
+                DataBaseParameters parameters = new DataBaseParameters();
+                parameters.setParametersFromTango(ConfigConst.TDB_CLASS_DEVICE);
+                AbstractDataBaseConnector tdbConnector = ConnectionFactory.connect(parameters);
+                tdbManager = ArchivingManagerApiRefFactory.getInstance(true, tdbConnector);
+                tdbManager.archivingConfigure();
+            } catch (final ArchivingException e) {
+                get_logger().warn(e.toString(), e);
+                // throw e.toTangoException(); CLA 30/10/06 AN EXCEPTION IS NO
+                // LONGER THROWN, AS BOTH DATABASES ARE INITIALIZED INDEPENDENTLY
+                tdbArchivingException = e;
+                needsToThrow = true;
+                // restore previous manager as this one does not seem to be ok
+                tdbManager = previousTdbManager;
+            } catch (DevFailed e) {
+                get_logger().warn(DevFailedUtils.toString(e), e);
+                tdbArchivingException = new ArchivingException(e);
+                needsToThrow = true;
+                // restore previous manager as this one does not seem to be ok
+                tdbManager = previousTdbManager;
+            }
+
+            /*
+             * if ( hdbArchivingException != null ) { String desc =
+             * "Failed connecting to HDB"; ArchivingException exceptionHDB = new
+             * ArchivingException (message , reason , ErrSeverity.PANIC , desc , ""
+             * ); totale.addStack ( desc, exceptionHDB ); } if (
+             * tdbArchivingException != null ) { String desc =
+             * "Failed connecting to TDB"; ArchivingException exceptionTDB = new
+             * ArchivingException (message , reason , ErrSeverity.PANIC , desc , ""
+             * ); totale.addStack ( desc, exceptionTDB ); }
+             */
+            String desc;
+            if (hdbArchivingException != null) {
+                if (tdbArchivingException != null) {
+                    desc = "Failed connecting to HDB and TDB";
+                } else {
+                    desc = "Failed connecting to HDB";
+                }
+            } else if (tdbArchivingException != null) {
+                desc = "Failed connecting to TDB";
+            } else {
+                desc = "";
+            }
+            get_logger().info(exitMessage);
+            if (needsToThrow) {
+                final String reason = "Failed while executing ArchivingManager.archiving_configure() method...";
+                final String message = GlobalConst.ARCHIVING_ERROR_PREFIX + " : ";
+                final ArchivingException e = new ArchivingException(message, reason, ErrSeverity.PANIC, desc, "");
+                throw e.toTangoException();
+            }
+        }
+    }
+
+    // =========================================================
+    /**
+     * Execute command "ArchivingStartHdb" on device. Start an historical
+     * archiving for the specified attributes, and following the specified mode.
+     * 
+     * @param argin
+     *            Archiving arguments... <BR>
+     *            <blockquote>
+     *            <ul>
+     *            <li><strong>The first part :</strong>
+     *            <ul>
+     *            <li><var>argin</var>[0]<b> =</b> the load balancing type of the archiving<br>
+     *            &quot;1&quot;, if all the attribute are archived together in the same HdbArchiver device, <br>
+     *            &quot;0&quot; otherwise.
+     *            <li><var>argin</var>[1]<b> =</b> the number of attributes to archive<br>
+     *            <li><var>argin</var>[2] to <var>argin</var> [2 + <var>argin</var>[1] - 1] = the name of each attribute
+     *            </ul>
+     *            <li><strong>The second part (the <i>Mode </i>part) :</strong> <br>
+     *            Let us note <i>&quot;<var>index</var>&quot; </i>the last <var>index</var> used (for example, at this
+     *            point, <i><var>index</var></i> = 2]).
+     *            <ul>
+     *            <li><strong>If the Mode is composed of a <i>Periodical Mode</i></strong><br>
+     *            <var>argin</var>[<var>index</var>+ 1] = <code>MODE_P</code><br>
+     *            <var>argin</var>[<var>index</var>+ 2] = the period of the periodic mode in (ms)<br>
+     *            <var>index</var> = <var>index</var> + 2<br>
+     *            <li><strong>If the Mode is composed of an <i>Absolute Mode</i></strong><br>
+     *            <var>argin</var>[<var>index</var>+ 1] = <code>MODE_A</code><br>
+     *            <var>argin</var>[<var>index</var>+ 2] = the frequency of the <i>absolute mode </i>in (ms)<br>
+     *            <var>argin</var>[<var>index</var>+ 3] = the delta value max when decreasing<br>
+     *            <var>argin</var>[<var>index</var>+ 4] = the delta value max when increasing<br>
+     *            <var>index</var> = <var>index</var> + 4<br>
+     *            <li><strong>If the Mode is composed of a <i>Relative Mode</i></strong><br>
+     *            <var>argin</var>[<var>index</var>+ 1] = <code>MODE_R</code><br>
+     *            <var>argin</var>[<var>index</var>+ 2] = the <i>frequency </i>of the <i>relative mode </i>in (ms)<br>
+     *            <var>argin</var>[<var>index</var>+ 3] = the <i>decreasing variation </i>associated to this mode<br>
+     *            <var>argin</var>[<var>index</var>+ 4] = the <i>increasing variation </i>associated to this mode<br>
+     *            <var>index</var> = <var>index</var> + 4<br>
+     *            <li><strong>If the Mode is composed of an <i>Threshold Mode</i></strong><br>
+     *            <var>argin</var>[<var>index</var>+ 1] = <code>MODE_T</code><br>
+     *            <var>argin</var>[<var>index</var>+ 2] = the frequency of the <i>threshold mode </i>in (ms)<br>
+     *            <var>argin</var>[<var>index</var>+ 3] = the smallest value (min) when decreasing<br>
+     *            <var>argin</var>[<var>index</var>+ 4] = the biggest value (max) when increasing<br>
+     *            <var>index</var> = <var>index</var> + 4<br>
+     *            <li>If the Mode is composed of a <i>On Calculation Mode</i></strong><br>
+     *            <var>argin</var>[<var>index</var>+ 1] = <code>MODE_C</code><br>
+     *            <var>argin</var>[<var>index</var>+ 2] = the <i>frequency </i>of the <i>on calculation mode </i>in (ms)
+     *            <br>
+     *            <var>argin</var>[<var>index</var>+ 3] = the <i>number of values</i> taken into account<br>
+     *            <var>argin</var>[<var>index</var>+ 4] = the <i>type </i>associated to this mode<br>
+     *            <var>argin</var>[<var>index</var>+ 5] = Not used at the moment <br>
+     *            <var>index</var> = <var>index</var> + 5<br>
+     *            <li><strong>If the Mode is composed of an <i>On Difference Mode</i></strong><br>
+     *            <var>argin</var>[<var>index</var>+ 1] = <code>MODE_D</code><br>
+     *            <var>argin</var>[<var>index</var>+ 2] = the <i>frequency </i>of this<i> mode </i>(in ms)<br>
+     *            <var>index</var> = <var>index</var> + 2<br>
+     *            <li><strong>If the Mode is composed of an <i>External Mode</i></strong><br>
+     *            <var>argin</var>[<var>index</var>+ 1] = <code>MODE_E</code><br>
+     *            <var>index</var> = <var>index</var> + 1<br>
+     *            </ul>
+     *            </ul>
+     *            </blockquote>
+     * @see ArchivingMessConfig
+     */
+    // =========================================================
+    public void archiving_start_hdb(final String[] argin) throws DevFailed {
+        get_logger().info("Entering archiving_start_hdb()");
+        updateDatabaseConnections();
+        if (hdbManager != null) {
+            try {
+                final ArchivingMessConfig archivingMessConfig = ArchivingMessConfig
+                        .creationWithoutFullInformation(argin);
+                hdbManager.archivingStart(archivingMessConfig);
+            } catch (Exception e) {
+                if (e instanceof DevFailed) {
+                    throw (DevFailed) e;
+                } else if (e instanceof ArchivingException) {
+                    ArchivingException ae = (ArchivingException) e;
+                    ae.printStackTrace();
+                    get_logger().warn(ae.toString(), ae);
+                    throw ae.toTangoException();
+                } else {
+                    get_logger().error("unexpected error on hdb archiving start", e);
+                }
+            }
+        }
+        get_logger().info("Exiting archiving_start_hdb()");
+    }
+
+    // =========================================================
+    /**
+     * Execute command "ArchivingStartTdb" on device. Start an temporary
+     * archiving for the specified attributes, and following the specified mode.
+     * 
+     * @param argin
+     *            Archiving arguments... <BR>
+     *            <blockquote>
+     *            <ul>
+     *            <li><strong>The first part :</strong>
+     *            <ul>
+     *            <li><var>argin</var>[0]<b> =</b> the load balancing type of the archiving<br>
+     *            &quot;1&quot;, if all the attribute are archived together in the same HdbArchiver device, <br>
+     *            &quot;0&quot; otherwise.
+     *            <li><var>argin</var>[1]<b> =</b> the number of attributes to archive<br>
+     *            <li><var>argin</var>[2] to <var>argin</var> [2 + <var>argin</var>[1] - 1] = the name of each attribute
+     *            </ul>
+     *            <li><strong>The second part (the <i>Mode </i>part) :</strong> <br>
+     *            Let us note <i>&quot;<var>index</var>&quot; </i>the last <var>index</var> used (for example, at this
+     *            point, <i><var>index</var></i> = 2]).
+     *            <ul>
+     *            <li><strong>If the Mode is composed of a <i>Periodical Mode</i></strong><br>
+     *            <var>argin</var>[<var>index</var>+ 1] = <code>MODE_P</code><br>
+     *            <var>argin</var>[<var>index</var>+ 2] = the period of the periodic mode in (ms)<br>
+     *            <var>index</var> = <var>index</var> + 2<br>
+     *            <li><strong>If the Mode is composed of an <i>Absolute Mode</i></strong><br>
+     *            <var>argin</var>[<var>index</var>+ 1] = <code>MODE_A</code><br>
+     *            <var>argin</var>[<var>index</var>+ 2] = the frequency of the <i>absolute mode </i>in (ms)<br>
+     *            <var>argin</var>[<var>index</var>+ 3] = the delta value max when decreasing<br>
+     *            <var>argin</var>[<var>index</var>+ 4] = the delta value max when increasing<br>
+     *            <var>index</var> = <var>index</var> + 4<br>
+     *            <li><strong>If the Mode is composed of a <i>Relative Mode</i></strong><br>
+     *            <var>argin</var>[<var>index</var>+ 1] = <code>MODE_R</code><br>
+     *            <var>argin</var>[<var>index</var>+ 2] = the <i>frequency </i>of the <i>relative mode </i>in (ms)<br>
+     *            <var>argin</var>[<var>index</var>+ 3] = the <i>decreasing variation </i>associated to this mode<br>
+     *            <var>argin</var>[<var>index</var>+ 4] = the <i>increasing variation </i>associated to this mode<br>
+     *            <var>index</var> = <var>index</var> + 4<br>
+     *            <li><strong>If the Mode is composed of an <i>Threshold Mode</i></strong><br>
+     *            <var>argin</var>[<var>index</var>+ 1] = <code>MODE_T</code><br>
+     *            <var>argin</var>[<var>index</var>+ 2] = the frequency of the <i>threshold mode </i>in (ms)<br>
+     *            <var>argin</var>[<var>index</var>+ 3] = the smallest value (min) when decreasing<br>
+     *            <var>argin</var>[<var>index</var>+ 4] = the biggest value (max) when increasing<br>
+     *            <var>index</var> = <var>index</var> + 4<br>
+     *            <li>If the Mode is composed of a <i>On Calculation Mode</i></strong><br>
+     *            <var>argin</var>[<var>index</var>+ 1] = <code>MODE_C</code><br>
+     *            <var>argin</var>[<var>index</var>+ 2] = the <i>frequency </i>of the <i>on calculation mode </i>in (ms)
+     *            <br>
+     *            <var>argin</var>[<var>index</var>+ 3] = the <i>number of values</i> taken into account<br>
+     *            <var>argin</var>[<var>index</var>+ 4] = the <i>type </i>associated to this mode<br>
+     *            <var>argin</var>[<var>index</var>+ 5] = Not used at the moment <br>
+     *            <var>index</var> = <var>index</var> + 5<br>
+     *            <li><strong>If the Mode is composed of an <i>On Difference Mode</i></strong><br>
+     *            <var>argin</var>[<var>index</var>+ 1] = <code>MODE_D</code><br>
+     *            <var>argin</var>[<var>index</var>+ 2] = the <i>frequency </i>of this<i> mode </i>(in ms)<br>
+     *            <var>index</var> = <var>index</var> + 2<br>
+     *            <li><strong>If the Mode is composed of an <i>External Mode</i></strong><br>
+     *            <var>argin</var>[<var>index</var>+ 1] = <code>MODE_E</code><br>
+     *            <var>index</var> = <var>index</var> + 1<br>
+     *            <li><strong>The Temporary (<i>Intermediate Archiving</i>) archiving specific informations </strong><br>
+     *            <var>argin</var>[<var>index</var>+ 1] = <code>TDB_SPEC</code><br>
+     *            <var>argin</var>[<var>index</var>+ 2] = the <i>export frequency </i>(ms)<br>
+     *            <var>argin</var>[<var>index</var>+ 3] = the <i>keeping window duration </i>in (ms)<br>
+     *            <var>index</var> = <var>index</var> + 3<br>
+     *            </ul>
+     *            </ul>
+     *            </blockquote>
+     * @see ArchivingMessConfig
+     */
+    // =========================================================
+    public void archiving_start_tdb(final String[] argin) throws DevFailed {
+        get_logger().info("Entering archiving_start_tdb()");
+        updateDatabaseConnections();
+        if (tdbManager != null) {
+            final ArchivingMessConfig archivingMessConfig = ArchivingMessConfig.creationWithoutFullInformation(argin);
+            try {
+                tdbManager.archivingStart(archivingMessConfig);
+            } catch (final ArchivingException e) {
+                get_logger().warn(e.toString(), e);
+                throw e.toTangoException();
+            }
+        }
+        get_logger().info("Exiting archiving_start_tdb()");
+    }
+
+    // =========================================================
+    /**
+     * Execute command "ArchivingStopHdb" on device. Stops the historical
+     * archiving for the given attributes.
+     * 
+     * @param argin
+     *            The attribute list.
+     */
+    // =========================================================
+    public void archiving_stop_hdb(final String[] argin) throws DevFailed {
+        get_logger().info("Entering archiving_stop_hdb()");
+        updateDatabaseConnections();
+        if (hdbManager != null) {
+            // ---Add your Own code to control device here ---
+            try {
+                hdbManager.archivingStopConf(argin);
+            } catch (final ArchivingException e) {
+                get_logger().warn(e.toString(), e);
+                throw e.toTangoException();
+            }
+        }
+    }
+
+    // =========================================================
+    /**
+     * Execute command "ArchivingStopTdb" on device. Stops the temporary
+     * archiving for the given attributes.
+     * 
+     * @param argin
+     *            The attribute list.
+     */
+    // =========================================================
+    public void archiving_stop_tdb(final String[] argin) throws DevFailed {
+        get_logger().info("Entering archiving_stop_tdb()");
+        updateDatabaseConnections();
+        if (tdbManager != null) {
+            try {
+                tdbManager.archivingStopConf(argin);
+            } catch (final ArchivingException e) {
+                get_logger().warn(e.toString(), e);
+                throw e.toTangoException();
+            }
+        }
+        get_logger().info("Exiting archiving_stop_tdb()");
+    }
+
+    // =========================================================
+    /**
+     * Execute command "ArchivingModifHdb" on device. Change the mode of an
+     * historical archiving.
+     * 
+     * @param argin
+     *            The configuration to switch to... <br>
+     *            <blockquote>
+     *            <ul>
+     *            <li><strong>The first part :</strong>
+     *            <ul>
+     *            <li><var>argin</var>[0]<b> =</b> the load balancing type of the archiving<br>
+     *            &quot;1&quot;, if all the attribute are archived together in the same TdbArchiver device, <br>
+     *            &quot;0&quot; otherwise.
+     *            <li><var>argin</var>[1]<b> =</b> the number of attributes to archive<br>
+     *            <li><var>argin</var>[2] to <var>argin</var> [2 + <var>argin</var>[1] - 1] = the name of each attribute
+     *            </ul>
+     *            <li><strong>The second part (the <i>Mode </i>part) :</strong> <br>
+     *            Let us note <i>&quot;<var>index</var>&quot; </i>the last <var>index</var> used (for example, at this
+     *            point, <i><var>index</var></i> = 2]).
+     *            <ul>
+     *            <li><strong>If the Mode is composed of a <i>Periodical Mode</i></strong><br>
+     *            <var>argin</var>[<var>index</var>+ 1] = <code>MODE_P</code><br>
+     *            <var>argin</var>[<var>index</var>+ 2] = the period of the periodic mode in (ms)<br>
+     *            <var>index</var> = <var>index</var> + 2<br>
+     *            <li><strong>If the Mode is composed of an <i>Absolute Mode</i></strong><br>
+     *            <var>argin</var>[<var>index</var>+ 1] = <code>MODE_A</code><br>
+     *            <var>argin</var>[<var>index</var>+ 2] = the frequency of the <i>absolute mode </i>in (ms)<br>
+     *            <var>argin</var>[<var>index</var>+ 3] = the delta value max when decreasing<br>
+     *            <var>argin</var>[<var>index</var>+ 4] = the delta value max when increasing<br>
+     *            <var>index</var> = <var>index</var> + 4<br>
+     *            <li><strong>If the Mode is composed of a <i>Relative Mode</i></strong><br>
+     *            <var>argin</var>[<var>index</var>+ 1] = <code>MODE_R</code><br>
+     *            <var>argin</var>[<var>index</var>+ 2] = the <i>frequency </i>of the <i>relative mode </i>in (ms)<br>
+     *            <var>argin</var>[<var>index</var>+ 3] = the <i>decreasing variation </i>associated to this mode<br>
+     *            <var>argin</var>[<var>index</var>+ 4] = the <i>increasing variation </i>associated to this mode<br>
+     *            <var>index</var> = <var>index</var> + 4<br>
+     *            <li><strong>If the Mode is composed of an <i>Threshold Mode</i></strong><br>
+     *            <var>argin</var>[<var>index</var>+ 1] = <code>MODE_T</code><br>
+     *            <var>argin</var>[<var>index</var>+ 2] = the frequency of the <i>threshold mode </i>in (ms)<br>
+     *            <var>argin</var>[<var>index</var>+ 3] = the smallest value (min) when decreasing<br>
+     *            <var>argin</var>[<var>index</var>+ 4] = the biggest value (max) when increasing<br>
+     *            <var>index</var> = <var>index</var> + 4<br>
+     *            <li>If the Mode is composed of a <i>On Calculation Mode</i></strong><br>
+     *            <var>argin</var>[<var>index</var>+ 1] = <code>MODE_C</code><br>
+     *            <var>argin</var>[<var>index</var>+ 2] = the <i>frequency </i>of the <i>on calculation mode </i>in (ms)
+     *            <br>
+     *            <var>argin</var>[<var>index</var>+ 3] = the <i>number of values</i> taken into account<br>
+     *            <var>argin</var>[<var>index</var>+ 4] = the <i>type </i>associated to this mode<br>
+     *            <var>argin</var>[<var>index</var>+ 5] = Not used at the moment <br>
+     *            <var>index</var> = <var>index</var> + 5<br>
+     *            <li><strong>If the Mode is composed of an <i>On Difference Mode</i></strong><br>
+     *            <var>argin</var>[<var>index</var>+ 1] = <code>MODE_D</code><br>
+     *            <var>argin</var>[<var>index</var>+ 2] = the <i>frequency </i>of this<i> mode </i>(in ms)<br>
+     *            <var>index</var> = <var>index</var> + 2<br>
+     *            <li><strong>If the Mode is composed of an <i>External Mode</i></strong><br>
+     *            <var>argin</var>[<var>index</var>+ 1] = <code>MODE_E</code><br>
+     *            <var>index</var> = <var>index</var> + 1<br>
+     *            </ul>
+     *            </ul>
+     *            </blockquote>
+     * @see ArchivingMessConfig
+     */
+    // =========================================================
+    public void archiving_modif_hdb(final String[] argin) throws DevFailed {
+        get_logger().info("Entering archiving_modif_hdb()");
+        updateDatabaseConnections();
+        if (hdbManager != null) {
+            final ArchivingMessConfig archivingMessConfig = ArchivingMessConfig.creationWithoutFullInformation(argin);
+            try {
+                hdbManager.archivingStopConf(archivingMessConfig.getAttributeList());
+                archiving_start_hdb(argin);
+            } catch (final ArchivingException e) {
+                get_logger().warn(e.toString(), e);
+                throw e.toTangoException();
+            }
+        }
+        get_logger().info("Exiting archiving_modif_hdb()");
+    }
+
+    // =========================================================
+    /**
+     * Execute command "ArchivingModifTdb" on device. Change the mode of a
+     * temporary archiving.
+     * 
+     * @param argin
+     *            The configuration to switch to...... <br>
+     *            <blockquote>
+     *            <ul>
+     *            <li><strong>The first part :</strong>
+     *            <ul>
+     *            <li><var>argin</var>[0]<b> =</b> the load balancing type of the archiving<br>
+     *            &quot;1&quot;, if all the attribute are archived together in the same TdbArchiver device, <br>
+     *            &quot;0&quot; otherwise.
+     *            <li><var>argin</var>[1]<b> =</b> the number of attributes to archive<br>
+     *            <li><var>argin</var>[2] to <var>argin</var> [2 + <var>argin</var>[1] - 1] = the name of each attribute
+     *            </ul>
+     *            <li><strong>The second part (the <i>Mode </i>part) :</strong> <br>
+     *            Let us note <i>&quot;<var>index</var>&quot; </i>the last <var>index</var> used (for example, at this
+     *            point, <i><var>index</var></i> = 2]).
+     *            <ul>
+     *            <li><strong>If the Mode is composed of a <i>Periodical Mode</i></strong><br>
+     *            <var>argin</var>[<var>index</var>+ 1] = <code>MODE_P</code><br>
+     *            <var>argin</var>[<var>index</var>+ 2] = the period of the periodic mode in (ms)<br>
+     *            <var>index</var> = <var>index</var> + 2<br>
+     *            <li><strong>If the Mode is composed of an <i>Absolute Mode</i></strong><br>
+     *            <var>argin</var>[<var>index</var>+ 1] = <code>MODE_A</code><br>
+     *            <var>argin</var>[<var>index</var>+ 2] = the frequency of the <i>absolute mode </i>in (ms)<br>
+     *            <var>argin</var>[<var>index</var>+ 3] = the delta value max when decreasing<br>
+     *            <var>argin</var>[<var>index</var>+ 4] = the delta value max when increasing<br>
+     *            <var>index</var> = <var>index</var> + 4<br>
+     *            <li><strong>If the Mode is composed of a <i>Relative Mode</i></strong><br>
+     *            <var>argin</var>[<var>index</var>+ 1] = <code>MODE_R</code><br>
+     *            <var>argin</var>[<var>index</var>+ 2] = the <i>frequency </i>of the <i>relative mode </i>in (ms)<br>
+     *            <var>argin</var>[<var>index</var>+ 3] = the <i>decreasing variation </i>associated to this mode<br>
+     *            <var>argin</var>[<var>index</var>+ 4] = the <i>increasing variation </i>associated to this mode<br>
+     *            <var>index</var> = <var>index</var> + 4<br>
+     *            <li><strong>If the Mode is composed of an <i>Threshold Mode</i></strong><br>
+     *            <var>argin</var>[<var>index</var>+ 1] = <code>MODE_T</code><br>
+     *            <var>argin</var>[<var>index</var>+ 2] = the frequency of the <i>threshold mode </i>in (ms)<br>
+     *            <var>argin</var>[<var>index</var>+ 3] = the smallest value (min) when decreasing<br>
+     *            <var>argin</var>[<var>index</var>+ 4] = the biggest value (max) when increasing<br>
+     *            <var>index</var> = <var>index</var> + 4<br>
+     *            <li>If the Mode is composed of a <i>On Calculation Mode</i></strong><br>
+     *            <var>argin</var>[<var>index</var>+ 1] = <code>MODE_C</code><br>
+     *            <var>argin</var>[<var>index</var>+ 2] = the <i>frequency </i>of the <i>on calculation mode </i>in (ms)
+     *            <br>
+     *            <var>argin</var>[<var>index</var>+ 3] = the <i>number of values</i> taken into account<br>
+     *            <var>argin</var>[<var>index</var>+ 4] = the <i>type </i>associated to this mode<br>
+     *            <var>argin</var>[<var>index</var>+ 5] = Not used at the moment <br>
+     *            <var>index</var> = <var>index</var> + 5<br>
+     *            <li><strong>If the Mode is composed of an <i>On Difference Mode</i></strong><br>
+     *            <var>argin</var>[<var>index</var>+ 1] = <code>MODE_D</code><br>
+     *            <var>argin</var>[<var>index</var>+ 2] = the <i>frequency </i>of this<i> mode </i>(in ms)<br>
+     *            <var>index</var> = <var>index</var> + 2<br>
+     *            <li><strong>If the Mode is composed of an <i>External Mode</i></strong><br>
+     *            <var>argin</var>[<var>index</var>+ 1] = <code>MODE_E</code><br>
+     *            <var>index</var> = <var>index</var> + 1<br>
+     *            <li><strong>The Temporary (<i>Intermediate Archiving</i>) archiving specific informations </strong><br>
+     *            <var>argin</var>[<var>index</var>+ 1] = <code>TDB_SPEC</code><br>
+     *            <var>argin</var>[<var>index</var>+ 2] = the <i>export frequency </i>(ms)<br>
+     *            <var>argin</var>[<var>index</var>+ 3] = the <i>keeping window duration </i>in (ms)<br>
+     *            <var>index</var> = <var>index</var> + 3<br>
+     *            </ul>
+     *            </ul>
+     *            </blockquote>
+     * @see ArchivingMessConfig
+     */
+    // =========================================================
+    public void archiving_modif_tdb(final String[] argin) throws DevFailed {
+        get_logger().info("Entering archiving_modif_tdb()");
+        updateDatabaseConnections();
+        if (tdbManager != null) {
+            final ArchivingMessConfig archivingMessConfig = ArchivingMessConfig.creationWithoutFullInformation(argin);
+            try {
+                tdbManager.archivingStopConf(archivingMessConfig.getAttributeList());
+                archiving_start_tdb(argin);
+            } catch (final ArchivingException e) {
+                get_logger().warn(e.toString(), e);
+                throw e.toTangoException();
+            }
+        }
+        get_logger().info("Exiting archiving_modif_tdb()");
+    }
+
+    // =========================================================
+    /**
+     * Execute command "IsArchivedHdb" on device. Check the archiving state
+     * (historical archiving) for each attribute of the given list.
+     * 
+     * @param argin
+     *            The attribute list.
+     * @return For each attribute of the given list...<br>
+     *         <ul>
+     *         <li><code>1</code>, if the attribute is currently being archived (historical archiving)
+     *         <li><code>0</code>, otherwise
+     *         </ul>
+     */
+    // =========================================================
+    public short[] is_archived_hdb(final String[] argin) throws DevFailed {
+        get_logger().info("Entering is_archived_hdb()");
+        updateDatabaseConnections();
+        short[] argout = new short[argin.length];
+        if (hdbManager != null) {
+            // ---Add your Own code to control device here ---
+            boolean result = false;
+            for (int i = 0; i < argin.length; i++) {
+                try {
+                    result = hdbManager.isArchived(argin[i]);
+                } catch (final ArchivingException e) {
+                    get_logger().warn(e.toString(), e);
+                    throw e.toTangoException();
+                }
+                if (result) {
+                    argout[i] = 1;
+                } else {
+                    argout[i] = 0;
+                }
+            }
+        }
+        get_logger().info("Exiting is_archived_hdb()");
+        return argout;
+    }
+
+    // =========================================================
+    /**
+     * Execute command "IsArchivedTdb" on device. Check the archiving state
+     * (temporary archiving) for each attribute of the given list.
+     * 
+     * @param argin
+     *            The attribute list.
+     * @return For each attribute of the given list...<br>
+     *         <ul>
+     *         <li><code>1</code>, if the attribute is currently being archived (temporary archiving)
+     *         <li><code>0</code>, otherwise
+     *         </ul>
+     */
+    // =========================================================
+    public short[] is_archived_tdb(final String[] argin) throws DevFailed {
+        get_logger().info("Entering is_archived_tdb()");
+        short[] argout = new short[argin.length];
+        updateDatabaseConnections();
+        if (tdbManager != null) {
+            // ---Add your Own code to control device here ---
+            boolean result = false;
+            for (int i = 0; i < argin.length; i++) {
+                try {
+                    result = tdbManager.isArchived(argin[i]);
+                } catch (final ArchivingException e) {
+                    get_logger().warn(e.toString(), e);
+                    throw e.toTangoException();
+                }
+                if (result) {
+                    argout[i] = 1;
+                } else {
+                    argout[i] = 0;
+                }
+            }
+        }
+        get_logger().info("Exiting is_archived_tdb()");
+        return argout;
+    }
+
+    // =========================================================
+    /**
+     * Execute command "GetArchivingModeHdb" on device. Return the historical
+     * archiving mode applied to an attribute.
+     * 
+     * @param argin
+     *            The attribute name.
+     * @return The applied mode... <br>
+     *         <blockquote>
+     *         <ul>
+     *         Let us note <i>&quot;<var>index</var>&quot; </i>the last <var>index</var> used (for example, at this
+     *         point, <i><var>index</var></i> = 0]).
+     *         <li><strong>If the Mode is composed of a <i>Periodical Mode</i></strong><br>
+     *         <var>argout</var>[<var>index</var>] = <code>MODE_P</code><br>
+     *         <var>argout</var>[<var>index</var> + 1] = the period of the periodic mode in (ms)<br>
+     *         <var>index</var> = <var>index</var> + 2<br>
+     *         <li><strong>If the Mode is composed of an <i>Absolute Mode</i></strong><br>
+     *         <var>argout</var>[<var>index</var>] = <code>MODE_A</code><br>
+     *         <var>argout</var>[<var>index</var>+ 1] = the frequency of the <i>absolute mode </i>in (ms)<br>
+     *         <var>argout</var>[<var>index</var>+ 2] = the delta value max when decreasing<br>
+     *         <var>argout</var>[<var>index</var>+ 3] = the delta value max when increasing<br>
+     *         <var>index</var> = <var>index</var> + 4<br>
+     *         <li><strong>If the Mode is composed of a <i>Relative Mode</i></strong><br>
+     *         <var>argout</var>[<var>index</var>] = <code>MODE_R</code><br>
+     *         <var>argout</var>[<var>index</var>+ 1] = the <i>frequency </i>of the <i>relative mode </i>in (ms)<br>
+     *         <var>argout</var>[<var>index</var>+ 2] = the <i>decreasing variation </i>associated to this mode<br>
+     *         <var>argout</var>[<var>index</var>+ 3] = the <i>increasing variation </i>associated to this mode<br>
+     *         <var>index</var> = <var>index</var> + 4<br>
+     *         <li><strong>If the Mode is composed of an <i>Threshold Mode</i></strong><br>
+     *         <var>argout</var>[<var>index</var>] = <code>MODE_T</code><br>
+     *         <var>argout</var>[<var>index</var>+ 1] = the frequency of the <i>threshold mode </i>in (ms)<br>
+     *         <var>argout</var>[<var>index</var>+ 2] = the smallest value (min) when decreasing<br>
+     *         <var>argout</var>[<var>index</var>+ 3] = the biggest value (max) when increasing<br>
+     *         <var>index</var> = <var>index</var> + 4<br>
+     *         <li>If the Mode is composed of a <i>On Calculation Mode</i></strong><br>
+     *         <var>argout</var>[<var>index</var>] = <code>MODE_C</code><br>
+     *         <var>argout</var>[<var>index</var>+ 1] = the <i>frequency </i>of the <i>on calculation mode </i>in (ms)<br>
+     *         <var>argout</var>[<var>index</var>+ 2] = the <i>number of values</i> taken into account<br>
+     *         <var>argout</var>[<var>index</var>+ 3] = the <i>type </i>associated to this mode<br>
+     *         <var>argout</var>[<var>index</var>+ 4] = Not used at the moment <br>
+     *         <var>index</var> = <var>index</var> + 5<br>
+     *         <li><strong>If the Mode is composed of an <i>On Difference Mode</i></strong><br>
+     *         <var>argout</var>[<var>index</var>] = <code>MODE_D</code><br>
+     *         <var>argout</var>[<var>index</var>+ 1] = the <i>frequency </i>of this<i> mode </i>(in ms)<br>
+     *         <var>index</var> = <var>index</var> + 2<br>
+     *         <li><strong>If the Mode is composed of an <i>External Mode</i></strong><br>
+     *         <var>argout</var>[<var>index</var>] = <code>MODE_E</code><br>
+     *         <var>index</var> = <var>index</var> + 1<br>
+     *         </ul>
+     *         </blockquote>
+     */
+    // =========================================================
+    public String[] get_archiving_mode_hdb(final String argin) throws DevFailed {
+        get_logger().info("Entering get_archiving_mode_hdb()");
+        updateDatabaseConnections();
+        String[] argout;
+        if (hdbManager == null) {
+            argout = new String[5];
+            Arrays.fill(argout, "");
+        } else {
+            // ---Add your Own code to control device here ---
+            try {
+                final Mode mode = hdbManager.getArchivingMode(argin);
+                argout = mode.toArray();
+            } catch (final ArchivingException e) {
+                get_logger().error(e.getMessage());
+                throw e.toTangoException();
+            }
+        }
+        get_logger().info("Exiting get_archiving_mode_hdb()");
+        return argout;
+    }
+
+    // =========================================================
+    /**
+     * Execute command "GetArchivingModeTdb" on device. Return the temporary
+     * archiving mode applied to an attribute.
+     * 
+     * @param argin
+     *            The attribute name.
+     * @return The applied mode... <br>
+     *         <blockquote>
+     *         <ul>
+     *         Let us note <i>&quot;<var>index</var>&quot; </i>the last <var>index</var> used (for example, at this
+     *         point, <i><var>index</var></i> = 0]).
+     *         <li><strong>If the Mode is composed of a <i>Periodical Mode</i></strong><br>
+     *         <var>argout</var>[<var>index</var>] = <code>MODE_P</code><br>
+     *         <var>argout</var>[<var>index</var> + 1] = the period of the periodic mode in (ms)<br>
+     *         <var>index</var> = <var>index</var> + 2<br>
+     *         <li><strong>If the Mode is composed of an <i>Absolute Mode</i></strong><br>
+     *         <var>argout</var>[<var>index</var>] = <code>MODE_A</code><br>
+     *         <var>argout</var>[<var>index</var>+ 1] = the frequency of the <i>absolute mode </i>in (ms)<br>
+     *         <var>argout</var>[<var>index</var>+ 2] = the delta value max when decreasing<br>
+     *         <var>argout</var>[<var>index</var>+ 3] = the delta value max when increasing<br>
+     *         <var>index</var> = <var>index</var> + 4<br>
+     *         <li><strong>If the Mode is composed of a <i>Relative Mode</i></strong><br>
+     *         <var>argout</var>[<var>index</var>] = <code>MODE_R</code><br>
+     *         <var>argout</var>[<var>index</var>+ 1] = the <i>frequency </i>of the <i>relative mode </i>in (ms)<br>
+     *         <var>argout</var>[<var>index</var>+ 2] = the <i>decreasing variation </i>associated to this mode<br>
+     *         <var>argout</var>[<var>index</var>+ 3] = the <i>increasing variation </i>associated to this mode<br>
+     *         <var>index</var> = <var>index</var> + 4<br>
+     *         <li><strong>If the Mode is composed of an <i>Threshold Mode</i></strong><br>
+     *         <var>argout</var>[<var>index</var>] = <code>MODE_T</code><br>
+     *         <var>argout</var>[<var>index</var>+ 1] = the frequency of the <i>threshold mode </i>in (ms)<br>
+     *         <var>argout</var>[<var>index</var>+ 2] = the smallest value (min) when decreasing<br>
+     *         <var>argout</var>[<var>index</var>+ 3] = the biggest value (max) when increasing<br>
+     *         <var>index</var> = <var>index</var> + 4<br>
+     *         <li>If the Mode is composed of a <i>On Calculation Mode</i></strong><br>
+     *         <var>argout</var>[<var>index</var>] = <code>MODE_C</code><br>
+     *         <var>argout</var>[<var>index</var>+ 1] = the <i>frequency </i>of the <i>on calculation mode </i>in (ms)<br>
+     *         <var>argout</var>[<var>index</var>+ 2] = the <i>number of values</i> taken into account<br>
+     *         <var>argout</var>[<var>index</var>+ 3] = the <i>type </i>associated to this mode<br>
+     *         <var>argout</var>[<var>index</var>+ 4] = Not used at the moment <br>
+     *         <var>index</var> = <var>index</var> + 5<br>
+     *         <li><strong>If the Mode is composed of an <i>On Difference Mode</i></strong><br>
+     *         <var>argout</var>[<var>index</var>] = <code>MODE_D</code><br>
+     *         <var>argout</var>[<var>index</var>+ 1] = the <i>frequency </i>of this<i> mode </i>(in ms)<br>
+     *         <var>index</var> = <var>index</var> + 2<br>
+     *         <li><strong>If the Mode is composed of an <i>External Mode</i></strong><br>
+     *         <var>argout</var>[<var>index</var>] = <code>MODE_E</code><br>
+     *         <var>index</var> = <var>index</var> + 1<br>
+     *         <li><strong>The Temporary (<i>Intermediate Archiving</i>) archiving specific informations </strong><br>
+     *         <var>argout</var>[<var>index</var>] = <code>TDB_SPEC</code><br>
+     *         <var>argout</var>[<var>index</var>+ 1] = the <i>export frequency </i>(ms)<br>
+     *         <var>argout</var>[<var>index</var>+ 2] = the <i>keeping window duration </i>in (ms)<br>
+     *         <var>index</var> = <var>index</var> + 3<br>
+     *         </ul>
+     *         </blockquote>
+     */
+    // =========================================================
+    public String[] get_archiving_mode_tdb(final String argin) throws DevFailed {
+        get_logger().info("Entering get_archiving_mode_tdb()");
+        String[] argout;
+        updateDatabaseConnections();
+        if (tdbManager == null) {
+            argout = new String[5];
+            Arrays.fill(argout, "");
+        } else {
+            // ---Add your Own code to control device here ---
+            try {
+                final Mode mode = tdbManager.getArchivingMode(argin);
+                argout = mode.toArray();
+            } catch (final ArchivingException e) {
+                get_logger().error(e.getMessage());
+                throw e.toTangoException();
+            }
+        }
+        get_logger().info("Exiting get_archiving_mode_tdb()");
+        return argout;
+    }
+
+    // =========================================================
+    /**
+     * Execute command "GetStatusHdb" on device. For each attribute of the given
+     * list, get the status of the device in charge of its historical archiving
+     * 
+     * @param argin
+     *            The attribute list.
+     * @return The list of status.
+     */
+    // =========================================================
+    public String[] get_status_hdb(final String[] argin) throws DevFailed {
+        get_logger().info("Entering get_status_hdb()");
+        updateDatabaseConnections();
+        String[] argout = new String[argin.length];
+        if (hdbManager == null) {
+            Arrays.fill(argout, "");
+        } else {
+            for (int i = 0; i < argin.length; i++) {
+                try {
+                    argout[i] = hdbManager.getStatus(argin[i]);
+                } catch (final ArchivingException e) {
+                    throw e.toTangoException();
+                }
+            }
+        }
+        get_logger().info("Exiting get_status_hdb()");
+        return argout;
+    }
+
+    // =========================================================
+    /**
+     * Execute command "GetStatusTdb" on device. For each attribute of the given
+     * list, get the status of the device in charge of its temporary archiving.
+     * 
+     * @param argin
+     *            The attribute list.
+     * @return The list of status.
+     */
+    // =========================================================
+    public String[] get_status_tdb(final String[] argin) throws DevFailed {
+        get_logger().info("Entering get_status_tdb()");
+        String[] argout = new String[argin.length];
+        updateDatabaseConnections();
+        if (tdbManager == null) {
+            Arrays.fill(argout, "");
+        } else {
+            for (int i = 0; i < argin.length; i++) {
+                try {
+                    argout[i] = tdbManager.getStatus(argin[i]);
+                } catch (final ArchivingException e) {
+                    throw e.toTangoException();
+                }
+            }
+        }
+        get_logger().info("Exiting get_status_tdb()");
+        return argout;
+    }
+
+    // ===================================================================
+    /**
+     * Method called by the read_attributes CORBA operation to set internal
+     * attribute value.
+     * 
+     * @param attr
+     *            reference to the Attribute object
+     */
+    // ===================================================================
+    @Override
+    public void read_attr(final Attribute attr) throws DevFailed {
+        final String attr_name = attr.get_name();
+        // get_logger().info("In read_attr for attribute " + attr_name);
+
+        // Switch on attribute name
+        // ---------------------------------
+        if (attr_name == "version") {
+            // Add your own code here
+            attr.set_value(m_version);
+        }
+    }
+
+    // =========================================================
+    /**
+     * main part for the device server class
+     */
+    // =========================================================
+    public static void main(final String[] argv) {
+        try {
+            final Util tg = Util.init(argv, "ArchivingManager");
+            tg.server_init();
+
+            System.out.println("Ready to accept request");
+
+            tg.server_run();
+        } catch (final OutOfMemoryError ex) {
+            System.err.println("Can't allocate memory !!!!");
+            System.err.println("Exiting");
+        } catch (final UserException ex) {
+            Except.print_exception(ex);
+
+            System.err.println("Received a CORBA user exception");
+            System.err.println("Exiting");
+        } catch (final SystemException ex) {
+            Except.print_exception(ex);
+
+            System.err.println("Received a CORBA system exception");
+            System.err.println("Exiting");
+        }
+
+        System.exit(-1);
+    }
+
+    @Override
+    public void delete_device() throws DevFailed {
+        // TODO Auto-generated method stub
+
+    }
+}
+
+// --------------------------------------------------------------------------
+/*
+ * end of $Source:
+ * /cvsroot/tango-cs/tango/jserver/archiving/ArchivingManager/ArchivingManager
+ * .java,v $
+ */
diff --git a/src/main/java/ArchivingManager/ArchivingManagerClass.java b/archivingmanager/src/main/java/ArchivingManager/ArchivingManagerClass.java
similarity index 99%
rename from src/main/java/ArchivingManager/ArchivingManagerClass.java
rename to archivingmanager/src/main/java/ArchivingManager/ArchivingManagerClass.java
index 019dff6936e0f1049b40fdd4a1ca946c15853f3e..75f22ccfcb4ad2211ab9d48fc77a661f7f3d5570 100644
--- a/src/main/java/ArchivingManager/ArchivingManagerClass.java
+++ b/archivingmanager/src/main/java/ArchivingManager/ArchivingManagerClass.java
@@ -1,347 +1,347 @@
-// +======================================================================
-// $Source: /cvsroot/tango-cs/tango/jserver/archiving/ArchivingManager/ArchivingManagerClass.java,v $
-//
-// Project:   	Tango Device Server
-//
-// Description:	java source code for the ArchivingManager class .
-//              This class is a singleton class and implements everything
-//              which exists only once for all the  ArchivingManager object
-//              It inherits from the DeviceClass class.
-//
-// $Author: pierrejoseph $
-//
-// $Revision: 1.9 $
-//
-// $Log: ArchivingManagerClass.java,v $
-// Revision 1.9  2007/05/11 13:58:34  pierrejoseph
-// Attribute addition : release version
-//
-// Revision 1.8  2006/10/09 12:53:57  chinkumo
-// Argin comment modification for the archivingStartHdb command.
-//
-// Revision 1.7  2006/01/27 13:06:40  ounsy
-// organised imports
-//
-// Revision 1.6  2005/11/29 17:34:41  chinkumo
-// no message
-//
-// Revision 1.5.10.2  2005/11/29 16:14:07  chinkumo
-// Code reformated (pogo compatible)
-//
-// Revision 1.5.10.1  2005/11/15 13:46:24  chinkumo
-// ...
-//
-// Revision 1.5  2005/06/14 10:24:03  chinkumo
-// Branch (archivingManager_1_0_1-branch_0)  and HEAD merged.
-//
-// Revision 1.4.4.1  2005/06/13 14:33:46  chinkumo
-// The ArchivingManager device was regenerated in Tango V5.
-// This class was also modified as some commands now returns a void object (ArchivingStartHdb, ArchivingStartTdb, ArchivingStopHdb, ArchivingStopTdb, ArchivingModifHdb, ArchivingModifTdb).
-//
-// Revision 1.4  2005/01/28 13:11:14  taurel
-// Some changes in source files to be Pogo compatible
-//
-// Revision 1.3  2005/01/26 16:33:32  chinkumo
-// Export of the new DServer source code.
-//
-//
-// copyleft :    European Synchrotron Radiation Facility
-//               BP 220, Grenoble 38043
-//               FRANCE
-//
-//-======================================================================
-//
-//  		This file is generated by POGO
-//	(Program Obviously used to Generate tango Object)
-//
-//         (c) - Software Engineering Group - ESRF
-//=============================================================================
-
-package ArchivingManager;
-
-import java.util.ResourceBundle;
-import java.util.Vector;
-
-import fr.esrf.Tango.AttrWriteType;
-import fr.esrf.Tango.DevFailed;
-import fr.esrf.Tango.DispLevel;
-import fr.esrf.TangoApi.DbDatum;
-import fr.esrf.TangoDs.Attr;
-import fr.esrf.TangoDs.DeviceClass;
-import fr.esrf.TangoDs.DeviceImpl;
-import fr.esrf.TangoDs.TangoConst;
-import fr.esrf.TangoDs.Util;
-
-public class ArchivingManagerClass extends DeviceClass implements TangoConst {
-    /**
-     * ArchivingManagerClass class instance (it is a singleton).
-     */
-    private static ArchivingManagerClass _instance = null;
-
-    /**
-     * Class properties array.
-     */
-    private DbDatum[] cl_prop = null;
-
-    // --------- Start of properties data members ----------
-
-    // --------- End of properties data members ----------
-
-    // ===================================================================
-    //
-    // method : instance()
-    //
-    // description : static method to retrieve the ArchivingManagerClass object
-    // once it has been initialised
-    //
-    // ===================================================================
-    public static ArchivingManagerClass instance() {
-        if (_instance == null) {
-            System.err.println("ArchivingManagerClass is not initialised !!!");
-            System.err.println("Exiting");
-            System.exit(-1);
-        }
-        return _instance;
-    }
-
-    // ===================================================================
-    //
-    // method : Init()
-    //
-    // description : static method to create/retrieve the ArchivingManagerClass
-    // object. This method is the only one which enables a
-    // user to create the object
-    //
-    // in : - class_name : The class name
-    //
-    // ===================================================================
-    public static synchronized ArchivingManagerClass init(String class_name) throws DevFailed {
-        if (_instance == null) {
-            _instance = new ArchivingManagerClass(class_name);
-        }
-        return _instance;
-    }
-
-    // ===================================================================
-    //
-    // method : ArchivingManagerClass()
-    //
-    // description : constructor for the ArchivingManagerClass class
-    //
-    // argument : in : - name : The class name
-    //
-    // ===================================================================
-    protected ArchivingManagerClass(String name) throws DevFailed {
-        super(name);
-
-        Util.out2.println("Entering ArchivingManagerClass constructor");
-        // write_class_property();
-        get_class_property();
-
-        Util.out2.println("Leaving ArchivingManagerClass constructor");
-    }
-
-    // ===================================================================
-    //
-    // method : command_factory()
-    //
-    // description : Create the command object(s) and store them in the
-    // command list
-    // ===================================================================
-    @SuppressWarnings("unchecked")
-    @Override
-    public void command_factory() {
-        command_list
-                .addElement(new ArchivingConfigureCmd(
-                        "ArchivingConfigure",
-                        Tango_DEVVAR_STRINGARRAY,
-                        Tango_DEV_VOID,
-                        "<ul> <li><var>argin</var>[<code>0</code>], the <em>user name</em> used to logg into the historical database. <li><var>argin</var>[<code>1</code>], the <em>password</em> used to logg into the historical database. <li><var>argin</var>[<code>2</code>], the <em>user name</em> used to logg into the temporary database. <li><var>argin</var>[<code>9</code>], the <em>password</em> used to logg into the temporary database.   </ul>",
-                        "", DispLevel.OPERATOR));
-        command_list
-                .addElement(new ArchivingStartHdbCmd(
-                        "ArchivingStartHdb",
-                        Tango_DEVVAR_STRINGARRAY,
-                        Tango_DEV_VOID,
-                        "Archiving arguments... <BR>         <blockquote> <ul>              <li><strong>The first part :</strong>              <ul>                  <li><var>argin</var>[0]<b> =</b> the load balancing type of the archiving<br>                   &quot;1&quot;, if all the attribute are archived together in the same HdbArchiver device, <br>                  &quot;0&quot; otherwise.                  <li><var>argin</var>[1]<b> =</b>                   the number of attributes to archive<br> <li><var>argin</var>[2]                  to <var>argin</var> [2 + <var>argin</var>[1] - 1] = the name of each attribute              </ul>              <li><strong>The second part (the <i>Mode </i>part) :</strong> <br>              Let us note <i>&quot;<var>index</var>&quot; </i>the last <var>index</var> used (for example, at this point, <i><var>index</var></i> = 2]).             <ul>                  <li><strong>If the Mode is composed of a <i>Periodical Mode</i></strong><br>                  <var>argin</var>[<var>index</var>+ 1] = <code>MODE_P</code><br>                  <var>argin</var>[<var>index</var>+ 2] = the period of the periodic mode in (ms)<br>                  <var>index</var> = <var>index</var> + 2<br>                                    <li><strong>If the Mode is composed of an <i>Absolute Mode</i></strong><br>                  <var>argin</var>[<var>index</var>+ 1] = <code>MODE_A</code><br>                  <var>argin</var>[<var>index</var>+ 2] = the frequency of the <i>absolute mode </i>in (ms)<br>                  <var>argin</var>[<var>index</var>+ 3] = the delta value max when decreasing<br>                  <var>argin</var>[<var>index</var>+ 4] = the delta value max when increasing<br>                  <var>index</var> = <var>index</var> + 4<br>                                    <li><strong>If the Mode is composed of a <i>Relative Mode</i></strong><br>                  <var>argin</var>[<var>index</var>+ 1] = <code>MODE_R</code><br>                  <var>argin</var>[<var>index</var>+ 2] = the <i>frequency </i>of the <i>relative mode </i>in (ms)<br>                  <var>argin</var>[<var>index</var>+ 3] = the <i>decreasing variation </i>associated to this mode<br>                  <var>argin</var>[<var>index</var>+ 4] = the <i>increasing variation </i>associated to this mode<br>                  <var>index</var> = <var>index</var> + 4<br>                                    <li><strong>If the Mode is composed of an <i>Threshold Mode</i></strong><br>                  <var>argin</var>[<var>index</var>+ 1] = <code>MODE_T</code><br>                  <var>argin</var>[<var>index</var>+ 2] = the frequency of the <i>threshold mode </i>in (ms)<br>                  <var>argin</var>[<var>index</var>+ 3] = the smallest value (min) when decreasing<br>                  <var>argin</var>[<var>index</var>+ 4] = the biggest value (max) when increasing<br>                  <var>index</var> = <var>index</var> + 4<br>                                    <li>If the Mode is composed of a <i>On Calculation Mode</i></strong><br>                  <var>argin</var>[<var>index</var>+ 1] = <code>MODE_C</code><br>                  <var>argin</var>[<var>index</var>+ 2] = the <i>frequency </i>of the <i>on calculation mode </i>in (ms)<br>                  <var>argin</var>[<var>index</var>+ 3] = the <i>number of values</i> taken into account<br>                  <var>argin</var>[<var>index</var>+ 4] = the <i>type </i>associated to this mode<br>                  <var>argin</var>[<var>index</var>+ 5] = Not used at the moment <br>                  <var>index</var> = <var>index</var> + 5<br>                                    <li><strong>If the Mode is composed of an <i>On Difference Mode</i></strong><br>                  <var>argin</var>[<var>index</var>+ 1] = <code>MODE_D</code><br>                  <var>argin</var>[<var>index</var>+ 2] = the <i>frequency </i>of this<i> mode </i>(in ms)<br>                  <var>index</var> = <var>index</var> + 2<br>                                    <li><strong>If the Mode is composed of an <i>External Mode</i></strong><br>                  <var>argin</var>[<var>index</var>+ 1] = <code>MODE_E</code><br>                  <var>index</var> = <var>index</var> + 1<br>                                            </ul>                       </ul>          </blockquote> ",
-                        "", DispLevel.OPERATOR));
-        command_list
-                .addElement(new ArchivingStartTdbCmd(
-                        "ArchivingStartTdb",
-                        Tango_DEVVAR_STRINGARRAY,
-                        Tango_DEV_VOID,
-                        "Archiving arguments... <BR><blockquote> <ul>              <li><strong>The first part :</strong>              <ul>                  <li><var>argin</var>[0]<b> =</b> the load balancing type of the archiving<br>                   &quot;1&quot;, if all the attribute are archived together in the same TdbArchiver device, <br>                  &quot;0&quot; otherwise.                  <li><var>argin</var>[1]<b> =</b>                   the number of attributes to archive<br> <li><var>argin</var>[2]                  to <var>argin</var> [2 + <var>argin</var>[1] - 1] = the name of each attribute              </ul>              <li><strong>The second part (the <i>Mode </i>part) :</strong> <br>              Let us note <i>&quot;<var>index</var>&quot; </i>the last <var>index</var> used (for example, at this point, <i><var>index</var></i> = 2]).             <ul>                  <li><strong>If the Mode is composed of a <i>Periodical Mode</i></strong><br>                  <var>argin</var>[<var>index</var>+ 1] = <code>MODE_P</code><br>                  <var>argin</var>[<var>index</var>+ 2] = the period of the periodic mode in (ms)<br>                  <var>index</var> = <var>index</var> + 2<br>                                    <li><strong>If the Mode is composed of an <i>Absolute Mode</i></strong><br>                  <var>argin</var>[<var>index</var>+ 1] = <code>MODE_A</code><br>                  <var>argin</var>[<var>index</var>+ 2] = the frequency of the <i>absolute mode </i>in (ms)<br>                  <var>argin</var>[<var>index</var>+ 3] = the delta value max when decreasing<br>                  <var>argin</var>[<var>index</var>+ 4] = the delta value max when increasing<br>                  <var>index</var> = <var>index</var> + 4<br>                                    <li><strong>If the Mode is composed of a <i>Relative Mode</i></strong><br>                  <var>argin</var>[<var>index</var>+ 1] = <code>MODE_R</code><br>                  <var>argin</var>[<var>index</var>+ 2] = the <i>frequency </i>of the <i>relative mode </i>in (ms)<br>                  <var>argin</var>[<var>index</var>+ 3] = the <i>decreasing variation </i>associated to this mode<br>                  <var>argin</var>[<var>index</var>+ 4] = the <i>increasing variation </i>associated to this mode<br>                  <var>index</var> = <var>index</var> + 4<br>                                    <li><strong>If the Mode is composed of an <i>Threshold Mode</i></strong><br>                  <var>argin</var>[<var>index</var>+ 1] = <code>MODE_T</code><br>                  <var>argin</var>[<var>index</var>+ 2] = the frequency of the <i>threshold mode </i>in (ms)<br>                  <var>argin</var>[<var>index</var>+ 3] = the smallest value (min) when decreasing<br>                  <var>argin</var>[<var>index</var>+ 4] = the biggest value (max) when increasing<br>                  <var>index</var> = <var>index</var> + 4<br>                                    <li>If the Mode is composed of a <i>On Calculation Mode</i></strong><br>                  <var>argin</var>[<var>index</var>+ 1] = <code>MODE_C</code><br>                  <var>argin</var>[<var>index</var>+ 2] = the <i>frequency </i>of the <i>on calculation mode </i>in (ms)<br>                  <var>argin</var>[<var>index</var>+ 3] = the <i>number of values</i> taken into account<br>                  <var>argin</var>[<var>index</var>+ 4] = the <i>type </i>associated to this mode<br>                  <var>argin</var>[<var>index</var>+ 5] = Not used at the moment <br>                  <var>index</var> = <var>index</var> + 5<br>                                    <li><strong>If the Mode is composed of an <i>On Difference Mode</i></strong><br>                  <var>argin</var>[<var>index</var>+ 1] = <code>MODE_D</code><br>                  <var>argin</var>[<var>index</var>+ 2] = the <i>frequency </i>of this<i> mode </i>(in ms)<br>                  <var>index</var> = <var>index</var> + 2<br>                                    <li><strong>If the Mode is composed of an <i>External Mode</i></strong><br>                  <var>argin</var>[<var>index</var>+ 1] = <code>MODE_E</code><br>                  <var>index</var> = <var>index</var> + 1<br>                                    <li><strong>The Temporary (<i>Intermediate Archiving</i>) archiving specific informations </strong><br>                  <var>argin</var>[<var>index</var>+ 1] = <code>TDB_SPEC</code><br>                  <var>argin</var>[<var>index</var>+ 2] = the <i>export frequency </i>(ms)<br>                  <var>argin</var>[<var>index</var>+ 3] = the <i>keeping window duration </i>in (ms)<br>                  <var>index</var> = <var>index</var> + 3<br>             </ul>                       </ul>          </blockquote>",
-                        "", DispLevel.OPERATOR));
-        command_list.addElement(new ArchivingStopHdbCmd("ArchivingStopHdb", Tango_DEVVAR_STRINGARRAY, Tango_DEV_VOID,
-                "The attribute list.", "", DispLevel.OPERATOR));
-        command_list.addElement(new ArchivingStopTdbCmd("ArchivingStopTdb", Tango_DEVVAR_STRINGARRAY, Tango_DEV_VOID,
-                "The attribute list.", "", DispLevel.OPERATOR));
-        command_list
-                .addElement(new ArchivingModifHdbCmd(
-                        "ArchivingModifHdb",
-                        Tango_DEVVAR_STRINGARRAY,
-                        Tango_DEV_VOID,
-                        "The configuration to switch to... <br> <blockquote> <ul> <li><strong>The first part :</strong>  <ul> <li><var>argin</var>[0]<b> =</b> the load balancing type of the archiving<br>  &quot;1&quot;, if all the attribute are archived together in the same TdbArchiver device, <br> &quot;0&quot; otherwise. <li><var>argin</var>[1]<b> =</b>  the number of attributes to archive<br> <li><var>argin</var>[2] to <var>argin</var> [2 + <var>argin</var>[1] - 1] = the name of each attribute  </ul> <li><strong>The second part (the <i>Mode </i>part) :</strong> <br> Let us note <i>&quot;<var>index</var>&quot; </i>the last <var>index</var> used (for example, at this point, <i><var>index</var></i> = 2]). <ul> <li><strong>If the Mode is composed of a <i>Periodical Mode</i></strong><br> <var>argin</var>[<var>index</var>+ 1] = <code>MODE_P</code><br> <var>argin</var>[<var>index</var>+ 2] = the period of the periodic mode in (ms)<br> <var>index</var> = <var>index</var> + 2<br>  <li><strong>If the Mode is composed of an <i>Absolute Mode</i></strong><br> <var>argin</var>[<var>index</var>+ 1] = <code>MODE_A</code><br> <var>argin</var>[<var>index</var>+ 2] = the frequency of the <i>absolute mode </i>in (ms)<br> <var>argin</var>[<var>index</var>+ 3] = the delta value max when decreasing<br> <var>argin</var>[<var>index</var>+ 4] = the delta value max when increasing<br> <var>index</var> = <var>index</var> + 4<br>  <li><strong>If the Mode is composed of a <i>Relative Mode</i></strong><br> <var>argin</var>[<var>index</var>+ 1] = <code>MODE_R</code><br> <var>argin</var>[<var>index</var>+ 2] = the <i>frequency </i>of the <i>relative mode </i>in (ms)<br> <var>argin</var>[<var>index</var>+ 3] = the <i>decreasing variation </i>associated to this mode<br> <var>argin</var>[<var>index</var>+ 4] = the <i>increasing variation </i>associated to this mode<br> <var>index</var> = <var>index</var> + 4<br>  <li><strong>If the Mode is composed of an <i>Threshold Mode</i></strong><br> <var>argin</var>[<var>index</var>+ 1] = <code>MODE_T</code><br> <var>argin</var>[<var>index</var>+ 2] = the frequency of the <i>threshold mode </i>in (ms)<br> <var>argin</var>[<var>index</var>+ 3] = the smallest value (min) when decreasing<br> <var>argin</var>[<var>index</var>+ 4] = the biggest value (max) when increasing<br> <var>index</var> = <var>index</var> + 4<br>  <li>If the Mode is composed of a <i>On Calculation Mode</i></strong><br> <var>argin</var>[<var>index</var>+ 1] = <code>MODE_C</code><br> <var>argin</var>[<var>index</var>+ 2] = the <i>frequency </i>of the <i>on calculation mode </i>in (ms)<br> <var>argin</var>[<var>index</var>+ 3] = the <i>number of values</i> taken into account<br> <var>argin</var>[<var>index</var>+ 4] = the <i>type </i>associated to this mode<br> <var>argin</var>[<var>index</var>+ 5] = Not used at the moment <br> <var>index</var> = <var>index</var> + 5<br>  <li><strong>If the Mode is composed of an <i>On Difference Mode</i></strong><br> <var>argin</var>[<var>index</var>+ 1] = <code>MODE_D</code><br> <var>argin</var>[<var>index</var>+ 2] = the <i>frequency </i>of this<i> mode </i>(in ms)<br> <var>index</var> = <var>index</var> + 2<br>  <li><strong>If the Mode is composed of an <i>External Mode</i></strong><br> <var>argin</var>[<var>index</var>+ 1] = <code>MODE_E</code><br> <var>index</var> = <var>index</var> + 1<br>  </ul>  </ul> </blockquote> ",
-                        "", DispLevel.OPERATOR));
-        command_list
-                .addElement(new ArchivingModifTdbCmd(
-                        "ArchivingModifTdb",
-                        Tango_DEVVAR_STRINGARRAY,
-                        Tango_DEV_VOID,
-                        "The configuration to switch to...... <br> <blockquote> <ul> <li><strong>The first part :</strong>  <ul> <li><var>argin</var>[0]<b> =</b> the load balancing type of the archiving<br>  &quot;1&quot;, if all the attribute are archived together in the same TdbArchiver device, <br> &quot;0&quot; otherwise. <li><var>argin</var>[1]<b> =</b>  the number of attributes to archive<br> <li><var>argin</var>[2] to <var>argin</var> [2 + <var>argin</var>[1] - 1] = the name of each attribute  </ul> <li><strong>The second part (the <i>Mode </i>part) :</strong> <br> Let us note <i>&quot;<var>index</var>&quot; </i>the last <var>index</var> used (for example, at this point, <i><var>index</var></i> = 2]). <ul> <li><strong>If the Mode is composed of a <i>Periodical Mode</i></strong><br> <var>argin</var>[<var>index</var>+ 1] = <code>MODE_P</code><br> <var>argin</var>[<var>index</var>+ 2] = the period of the periodic mode in (ms)<br> <var>index</var> = <var>index</var> + 2<br>  <li><strong>If the Mode is composed of an <i>Absolute Mode</i></strong><br> <var>argin</var>[<var>index</var>+ 1] = <code>MODE_A</code><br> <var>argin</var>[<var>index</var>+ 2] = the frequency of the <i>absolute mode </i>in (ms)<br> <var>argin</var>[<var>index</var>+ 3] = the delta value max when decreasing<br> <var>argin</var>[<var>index</var>+ 4] = the delta value max when increasing<br> <var>index</var> = <var>index</var> + 4<br>  <li><strong>If the Mode is composed of a <i>Relative Mode</i></strong><br> <var>argin</var>[<var>index</var>+ 1] = <code>MODE_R</code><br> <var>argin</var>[<var>index</var>+ 2] = the <i>frequency </i>of the <i>relative mode </i>in (ms)<br> <var>argin</var>[<var>index</var>+ 3] = the <i>decreasing variation </i>associated to this mode<br> <var>argin</var>[<var>index</var>+ 4] = the <i>increasing variation </i>associated to this mode<br> <var>index</var> = <var>index</var> + 4<br>  <li><strong>If the Mode is composed of an <i>Threshold Mode</i></strong><br> <var>argin</var>[<var>index</var>+ 1] = <code>MODE_T</code><br> <var>argin</var>[<var>index</var>+ 2] = the frequency of the <i>threshold mode </i>in (ms)<br> <var>argin</var>[<var>index</var>+ 3] = the smallest value (min) when decreasing<br> <var>argin</var>[<var>index</var>+ 4] = the biggest value (max) when increasing<br> <var>index</var> = <var>index</var> + 4<br>  <li>If the Mode is composed of a <i>On Calculation Mode</i></strong><br> <var>argin</var>[<var>index</var>+ 1] = <code>MODE_C</code><br> <var>argin</var>[<var>index</var>+ 2] = the <i>frequency </i>of the <i>on calculation mode </i>in (ms)<br> <var>argin</var>[<var>index</var>+ 3] = the <i>number of values</i> taken into account<br> <var>argin</var>[<var>index</var>+ 4] = the <i>type </i>associated to this mode<br> <var>argin</var>[<var>index</var>+ 5] = Not used at the moment <br> <var>index</var> = <var>index</var> + 5<br>  <li><strong>If the Mode is composed of an <i>On Difference Mode</i></strong><br> <var>argin</var>[<var>index</var>+ 1] = <code>MODE_D</code><br> <var>argin</var>[<var>index</var>+ 2] = the <i>frequency </i>of this<i> mode </i>(in ms)<br> <var>index</var> = <var>index</var> + 2<br>  <li><strong>If the Mode is composed of an <i>External Mode</i></strong><br> <var>argin</var>[<var>index</var>+ 1] = <code>MODE_E</code><br> <var>index</var> = <var>index</var> + 1<br>  <li><strong>The Temporary (<i>Intermediate Archiving</i>) archiving specific informations </strong><br> <var>argin</var>[<var>index</var>+ 1] = <code>TDB_SPEC</code><br> <var>argin</var>[<var>index</var>+ 2] = the <i>export frequency </i>(ms)<br> <var>argin</var>[<var>index</var>+ 3] = the <i>keeping window duration </i>in (ms)<br> <var>index</var> = <var>index</var> + 3<br> </ul>  </ul> </blockquote> ",
-                        "", DispLevel.OPERATOR));
-        command_list
-                .addElement(new IsArchivedHdbCmd(
-                        "IsArchivedHdb",
-                        Tango_DEVVAR_STRINGARRAY,
-                        Tango_DEVVAR_SHORTARRAY,
-                        "The attribute list.",
-                        "For each attribute of the given list...<br>   <ul> <li><code>1</code>, if the attribute is currently being archived (historical archiving) <li><code>0</code>, otherwise </ul>",
-                        DispLevel.OPERATOR));
-        command_list
-                .addElement(new IsArchivedTdbCmd(
-                        "IsArchivedTdb",
-                        Tango_DEVVAR_STRINGARRAY,
-                        Tango_DEVVAR_SHORTARRAY,
-                        "The attribute list.",
-                        "For each attribute of the given list...<br>   <ul> <li><code>1</code>, if the attribute is currently being archived (temporary archiving) <li><code>0</code>, otherwise </ul>",
-                        DispLevel.OPERATOR));
-        command_list
-                .addElement(new GetArchivingModeHdbCmd(
-                        "GetArchivingModeHdb",
-                        Tango_DEV_STRING,
-                        Tango_DEVVAR_STRINGARRAY,
-                        "The attribute name.",
-                        "The applied mode... <br> <blockquote> <ul>             Let us note <i>&quot;<var>index</var>&quot; </i>the last <var>index</var> used (for example, at this point, <i><var>index</var></i> = 0]).      <li><strong>If the Mode is composed of a <i>Periodical Mode</i></strong><br>     <var>argout</var>[<var>index</var>] = <code>MODE_P</code><br>     <var>argout</var>[<var>index</var> + 1] = the period of the periodic mode in (ms)<br>     <var>index</var> = <var>index</var> + 2<br>          <li><strong>If the Mode is composed of an <i>Absolute Mode</i></strong><br>     <var>argout</var>[<var>index</var>] = <code>MODE_A</code><br>     <var>argout</var>[<var>index</var>+ 1] = the frequency of the <i>absolute mode </i>in (ms)<br>     <var>argout</var>[<var>index</var>+ 2] = the delta value max when decreasing<br>     <var>argout</var>[<var>index</var>+ 3] = the delta value max when increasing<br>     <var>index</var> = <var>index</var> + 4<br>          <li><strong>If the Mode is composed of a <i>Relative Mode</i></strong><br>     <var>argout</var>[<var>index</var>] = <code>MODE_R</code><br>     <var>argout</var>[<var>index</var>+ 1] = the <i>frequency </i>of the <i>relative mode </i>in (ms)<br>     <var>argout</var>[<var>index</var>+ 2] = the <i>decreasing variation </i>associated to this mode<br>     <var>argout</var>[<var>index</var>+ 3] = the <i>increasing variation </i>associated to this mode<br>     <var>index</var> = <var>index</var> + 4<br>          <li><strong>If the Mode is composed of an <i>Threshold Mode</i></strong><br>     <var>argout</var>[<var>index</var>] = <code>MODE_T</code><br>     <var>argout</var>[<var>index</var>+ 1] = the frequency of the <i>threshold mode </i>in (ms)<br>     <var>argout</var>[<var>index</var>+ 2] = the smallest value (min) when decreasing<br>     <var>argout</var>[<var>index</var>+ 3] = the biggest value (max) when increasing<br>     <var>index</var> = <var>index</var> + 4<br>          <li>If the Mode is composed of a <i>On Calculation Mode</i></strong><br>     <var>argout</var>[<var>index</var>] = <code>MODE_C</code><br>     <var>argout</var>[<var>index</var>+ 1] = the <i>frequency </i>of the <i>on calculation mode </i>in (ms)<br>     <var>argout</var>[<var>index</var>+ 2] = the <i>number of values</i> taken into account<br>     <var>argout</var>[<var>index</var>+ 3] = the <i>type </i>associated to this mode<br>     <var>argout</var>[<var>index</var>+ 4] = Not used at the moment <br>     <var>index</var> = <var>index</var> + 5<br>          <li><strong>If the Mode is composed of an <i>On Difference Mode</i></strong><br>     <var>argout</var>[<var>index</var>] = <code>MODE_D</code><br>     <var>argout</var>[<var>index</var>+ 1] = the <i>frequency </i>of this<i> mode </i>(in ms)<br>     <var>index</var> = <var>index</var> + 2<br>          <li><strong>If the Mode is composed of an <i>External Mode</i></strong><br>     <var>argout</var>[<var>index</var>] = <code>MODE_E</code><br>     <var>index</var> = <var>index</var> + 1<br>     </ul> </blockquote> ",
-                        DispLevel.OPERATOR));
-        command_list
-                .addElement(new GetArchivingModeTdbCmd(
-                        "GetArchivingModeTdb",
-                        Tango_DEV_STRING,
-                        Tango_DEVVAR_STRINGARRAY,
-                        "The attribute name.",
-                        "The applied mode... <br> <blockquote> <ul>             Let us note <i>&quot;<var>index</var>&quot; </i>the last <var>index</var> used (for example, at this point, <i><var>index</var></i> = 0]).      <li><strong>If the Mode is composed of a <i>Periodical Mode</i></strong><br>     <var>argout</var>[<var>index</var>] = <code>MODE_P</code><br>     <var>argout</var>[<var>index</var> + 1] = the period of the periodic mode in (ms)<br>     <var>index</var> = <var>index</var> + 2<br>          <li><strong>If the Mode is composed of an <i>Absolute Mode</i></strong><br>     <var>argout</var>[<var>index</var>] = <code>MODE_A</code><br>     <var>argout</var>[<var>index</var>+ 1] = the frequency of the <i>absolute mode </i>in (ms)<br>     <var>argout</var>[<var>index</var>+ 2] = the delta value max when decreasing<br>     <var>argout</var>[<var>index</var>+ 3] = the delta value max when increasing<br>     <var>index</var> = <var>index</var> + 4<br>          <li><strong>If the Mode is composed of a <i>Relative Mode</i></strong><br>     <var>argout</var>[<var>index</var>] = <code>MODE_R</code><br>     <var>argout</var>[<var>index</var>+ 1] = the <i>frequency </i>of the <i>relative mode </i>in (ms)<br>     <var>argout</var>[<var>index</var>+ 2] = the <i>decreasing variation </i>associated to this mode<br>     <var>argout</var>[<var>index</var>+ 3] = the <i>increasing variation </i>associated to this mode<br>     <var>index</var> = <var>index</var> + 4<br>          <li><strong>If the Mode is composed of an <i>Threshold Mode</i></strong><br>     <var>argout</var>[<var>index</var>] = <code>MODE_T</code><br>     <var>argout</var>[<var>index</var>+ 1] = the frequency of the <i>threshold mode </i>in (ms)<br>     <var>argout</var>[<var>index</var>+ 2] = the smallest value (min) when decreasing<br>     <var>argout</var>[<var>index</var>+ 3] = the biggest value (max) when increasing<br>     <var>index</var> = <var>index</var> + 4<br>          <li>If the Mode is composed of a <i>On Calculation Mode</i></strong><br>     <var>argout</var>[<var>index</var>] = <code>MODE_C</code><br>     <var>argout</var>[<var>index</var>+ 1] = the <i>frequency </i>of the <i>on calculation mode </i>in (ms)<br>     <var>argout</var>[<var>index</var>+ 2] = the <i>number of values</i> taken into account<br>     <var>argout</var>[<var>index</var>+ 3] = the <i>type </i>associated to this mode<br>     <var>argout</var>[<var>index</var>+ 4] = Not used at the moment <br>     <var>index</var> = <var>index</var> + 5<br>          <li><strong>If the Mode is composed of an <i>On Difference Mode</i></strong><br>     <var>argout</var>[<var>index</var>] = <code>MODE_D</code><br>     <var>argout</var>[<var>index</var>+ 1] = the <i>frequency </i>of this<i> mode </i>(in ms)<br>     <var>index</var> = <var>index</var> + 2<br>          <li><strong>If the Mode is composed of an <i>External Mode</i></strong><br>     <var>argout</var>[<var>index</var>] = <code>MODE_E</code><br>     <var>index</var> = <var>index</var> + 1<br>          <li><strong>The Temporary (<i>Intermediate Archiving</i>) archiving specific informations </strong><br>     <var>argout</var>[<var>index</var>] = <code>TDB_SPEC</code><br>     <var>argout</var>[<var>index</var>+ 1] = the <i>export frequency </i>(ms)<br>     <var>argout</var>[<var>index</var>+ 2] = the <i>keeping window duration </i>in (ms)<br>     <var>index</var> = <var>index</var> + 3<br> </ul> </blockquote> ",
-                        DispLevel.OPERATOR));
-        command_list.addElement(new GetStatusHdbCmd("GetStatusHdb", Tango_DEVVAR_STRINGARRAY, Tango_DEVVAR_STRINGARRAY,
-                "The attribute list.", "The list of status.", DispLevel.OPERATOR));
-        command_list.addElement(new GetStatusTdbCmd("GetStatusTdb", Tango_DEVVAR_STRINGARRAY, Tango_DEVVAR_STRINGARRAY,
-                "The attribute list.", "The list of status.", DispLevel.OPERATOR));
-
-        // add polling if any
-        /*
-         * for (int i = 0; i < command_list.size(); i++) { Command cmd =
-         * (Command) command_list.elementAt(i); }
-         */
-    }
-
-    // ===================================================================
-    //
-    // method : device_factory()
-    //
-    // description : Create the device object(s) and store them in the
-    // device list
-    //
-    // argument : in : String[] devlist : The device name list
-    //
-    // ===================================================================
-    @SuppressWarnings("unchecked")
-    @Override
-    public void device_factory(String[] devlist) throws DevFailed {
-        String device_version = ResourceBundle.getBundle("application").getString("project.version");
-
-        for (int i = 0; i < devlist.length; i++) {
-            Util.out4.println("Device name : " + devlist[i]);
-
-            // Create device and add it into the device list
-            // ----------------------------------------------
-            device_list.addElement(new ArchivingManager(this, devlist[i], device_version));
-
-            // Export device to the outside world
-            // ----------------------------------------------
-            if (Util._UseDb == true)
-                export_device(((DeviceImpl) (device_list.elementAt(i))));
-            else
-                export_device(((DeviceImpl) (device_list.elementAt(i))), devlist[i]);
-        }
-    }
-
-    // =============================================================================
-    //
-    // Method: attribute_factory(Vector att_list)
-    //
-    // =============================================================================
-    @SuppressWarnings("unchecked")
-    @Override
-    public void attribute_factory(Vector att_list) throws DevFailed {
-        // Attribute : version
-        Attr version = new Attr("version", Tango_DEV_STRING, AttrWriteType.READ);
-        att_list.addElement(version);
-    }
-
-    // ===================================================================
-    /**
-     * Get the class property for specified name.
-     * 
-     * @param name
-     *            The property name.
-     */
-    // ===================================================================
-    public DbDatum get_class_property(String name) {
-        for (int i = 0; i < cl_prop.length; i++)
-            if (cl_prop[i].name.equals(name))
-                return cl_prop[i];
-        // if not found, return an empty DbDatum
-        return new DbDatum(name);
-    }
-
-    // ===================================================================
-    /**
-     * Read the class properties from database.
-     */
-    // ===================================================================
-    public void get_class_property() throws DevFailed {
-        // Initialize your default values here.
-        // ------------------------------------------
-
-        // Read class properties from database.(Automatic code generation)
-        // -------------------------------------------------------------
-        if (Util._UseDb == false)
-            return;
-        String[] propnames = {};
-
-        // Call database and extract values
-        // --------------------------------------------
-        cl_prop = get_db_class().get_property(propnames);
-
-        // End of Automatic code generation
-        // -------------------------------------------------------------
-
-    }
-
-    // ===================================================================
-    /**
-     * Set class description as property in database
-     */
-    // ===================================================================
-//	private void write_class_property() throws DevFailed {
-//		// First time, check if database used
-//		// --------------------------------------------
-//		if (Util._UseDb == false)
-//			return;
-//
-//		// Prepeare DbDatum
-//		// --------------------------------------------
-//		DbDatum[] data = new DbDatum[2];
-//		data[0] = new DbDatum("ProjectTitle");
-//		data[0].insert("Tango Device Server");
-//
-//		data[1] = new DbDatum("Description");
-//		data[1]
-//				.insert("Device of Archiving system\n<Br><Br>\n<br><b>ROLE</b><br>\nThis DeviceServer is used in order to manage the archiving of exported Tango attributes device.\n<Br><Br>\n<br><b>ARCHIVING TYPE</b><br>\nThere is two kind of archiving :\n<Br><Br>\n<Li><b>The His");
-//
-//		// Call database and and values
-//		// --------------------------------------------
-//		get_db_class().put_property(data);
-//	}
-
-}
+// +======================================================================
+// $Source: /cvsroot/tango-cs/tango/jserver/archiving/ArchivingManager/ArchivingManagerClass.java,v $
+//
+// Project:   	Tango Device Server
+//
+// Description:	java source code for the ArchivingManager class .
+//              This class is a singleton class and implements everything
+//              which exists only once for all the  ArchivingManager object
+//              It inherits from the DeviceClass class.
+//
+// $Author: pierrejoseph $
+//
+// $Revision: 1.9 $
+//
+// $Log: ArchivingManagerClass.java,v $
+// Revision 1.9  2007/05/11 13:58:34  pierrejoseph
+// Attribute addition : release version
+//
+// Revision 1.8  2006/10/09 12:53:57  chinkumo
+// Argin comment modification for the archivingStartHdb command.
+//
+// Revision 1.7  2006/01/27 13:06:40  ounsy
+// organised imports
+//
+// Revision 1.6  2005/11/29 17:34:41  chinkumo
+// no message
+//
+// Revision 1.5.10.2  2005/11/29 16:14:07  chinkumo
+// Code reformated (pogo compatible)
+//
+// Revision 1.5.10.1  2005/11/15 13:46:24  chinkumo
+// ...
+//
+// Revision 1.5  2005/06/14 10:24:03  chinkumo
+// Branch (archivingManager_1_0_1-branch_0)  and HEAD merged.
+//
+// Revision 1.4.4.1  2005/06/13 14:33:46  chinkumo
+// The ArchivingManager device was regenerated in Tango V5.
+// This class was also modified as some commands now returns a void object (ArchivingStartHdb, ArchivingStartTdb, ArchivingStopHdb, ArchivingStopTdb, ArchivingModifHdb, ArchivingModifTdb).
+//
+// Revision 1.4  2005/01/28 13:11:14  taurel
+// Some changes in source files to be Pogo compatible
+//
+// Revision 1.3  2005/01/26 16:33:32  chinkumo
+// Export of the new DServer source code.
+//
+//
+// copyleft :    European Synchrotron Radiation Facility
+//               BP 220, Grenoble 38043
+//               FRANCE
+//
+//-======================================================================
+//
+//  		This file is generated by POGO
+//	(Program Obviously used to Generate tango Object)
+//
+//         (c) - Software Engineering Group - ESRF
+//=============================================================================
+
+package ArchivingManager;
+
+import java.util.ResourceBundle;
+import java.util.Vector;
+
+import fr.esrf.Tango.AttrWriteType;
+import fr.esrf.Tango.DevFailed;
+import fr.esrf.Tango.DispLevel;
+import fr.esrf.TangoApi.DbDatum;
+import fr.esrf.TangoDs.Attr;
+import fr.esrf.TangoDs.DeviceClass;
+import fr.esrf.TangoDs.DeviceImpl;
+import fr.esrf.TangoDs.TangoConst;
+import fr.esrf.TangoDs.Util;
+
+public class ArchivingManagerClass extends DeviceClass implements TangoConst {
+    /**
+     * ArchivingManagerClass class instance (it is a singleton).
+     */
+    private static ArchivingManagerClass _instance = null;
+
+    /**
+     * Class properties array.
+     */
+    private DbDatum[] cl_prop = null;
+
+    // --------- Start of properties data members ----------
+
+    // --------- End of properties data members ----------
+
+    // ===================================================================
+    //
+    // method : instance()
+    //
+    // description : static method to retrieve the ArchivingManagerClass object
+    // once it has been initialised
+    //
+    // ===================================================================
+    public static ArchivingManagerClass instance() {
+        if (_instance == null) {
+            System.err.println("ArchivingManagerClass is not initialised !!!");
+            System.err.println("Exiting");
+            System.exit(-1);
+        }
+        return _instance;
+    }
+
+    // ===================================================================
+    //
+    // method : Init()
+    //
+    // description : static method to create/retrieve the ArchivingManagerClass
+    // object. This method is the only one which enables a
+    // user to create the object
+    //
+    // in : - class_name : The class name
+    //
+    // ===================================================================
+    public static synchronized ArchivingManagerClass init(String class_name) throws DevFailed {
+        if (_instance == null) {
+            _instance = new ArchivingManagerClass(class_name);
+        }
+        return _instance;
+    }
+
+    // ===================================================================
+    //
+    // method : ArchivingManagerClass()
+    //
+    // description : constructor for the ArchivingManagerClass class
+    //
+    // argument : in : - name : The class name
+    //
+    // ===================================================================
+    protected ArchivingManagerClass(String name) throws DevFailed {
+        super(name);
+
+        Util.out2.println("Entering ArchivingManagerClass constructor");
+        // write_class_property();
+        get_class_property();
+
+        Util.out2.println("Leaving ArchivingManagerClass constructor");
+    }
+
+    // ===================================================================
+    //
+    // method : command_factory()
+    //
+    // description : Create the command object(s) and store them in the
+    // command list
+    // ===================================================================
+    @SuppressWarnings("unchecked")
+    @Override
+    public void command_factory() {
+        command_list
+                .addElement(new ArchivingConfigureCmd(
+                        "ArchivingConfigure",
+                        Tango_DEVVAR_STRINGARRAY,
+                        Tango_DEV_VOID,
+                        "<ul> <li><var>argin</var>[<code>0</code>], the <em>user name</em> used to logg into the historical database. <li><var>argin</var>[<code>1</code>], the <em>password</em> used to logg into the historical database. <li><var>argin</var>[<code>2</code>], the <em>user name</em> used to logg into the temporary database. <li><var>argin</var>[<code>9</code>], the <em>password</em> used to logg into the temporary database.   </ul>",
+                        "", DispLevel.OPERATOR));
+        command_list
+                .addElement(new ArchivingStartHdbCmd(
+                        "ArchivingStartHdb",
+                        Tango_DEVVAR_STRINGARRAY,
+                        Tango_DEV_VOID,
+                        "Archiving arguments... <BR>         <blockquote> <ul>              <li><strong>The first part :</strong>              <ul>                  <li><var>argin</var>[0]<b> =</b> the load balancing type of the archiving<br>                   &quot;1&quot;, if all the attribute are archived together in the same HdbArchiver device, <br>                  &quot;0&quot; otherwise.                  <li><var>argin</var>[1]<b> =</b>                   the number of attributes to archive<br> <li><var>argin</var>[2]                  to <var>argin</var> [2 + <var>argin</var>[1] - 1] = the name of each attribute              </ul>              <li><strong>The second part (the <i>Mode </i>part) :</strong> <br>              Let us note <i>&quot;<var>index</var>&quot; </i>the last <var>index</var> used (for example, at this point, <i><var>index</var></i> = 2]).             <ul>                  <li><strong>If the Mode is composed of a <i>Periodical Mode</i></strong><br>                  <var>argin</var>[<var>index</var>+ 1] = <code>MODE_P</code><br>                  <var>argin</var>[<var>index</var>+ 2] = the period of the periodic mode in (ms)<br>                  <var>index</var> = <var>index</var> + 2<br>                                    <li><strong>If the Mode is composed of an <i>Absolute Mode</i></strong><br>                  <var>argin</var>[<var>index</var>+ 1] = <code>MODE_A</code><br>                  <var>argin</var>[<var>index</var>+ 2] = the frequency of the <i>absolute mode </i>in (ms)<br>                  <var>argin</var>[<var>index</var>+ 3] = the delta value max when decreasing<br>                  <var>argin</var>[<var>index</var>+ 4] = the delta value max when increasing<br>                  <var>index</var> = <var>index</var> + 4<br>                                    <li><strong>If the Mode is composed of a <i>Relative Mode</i></strong><br>                  <var>argin</var>[<var>index</var>+ 1] = <code>MODE_R</code><br>                  <var>argin</var>[<var>index</var>+ 2] = the <i>frequency </i>of the <i>relative mode </i>in (ms)<br>                  <var>argin</var>[<var>index</var>+ 3] = the <i>decreasing variation </i>associated to this mode<br>                  <var>argin</var>[<var>index</var>+ 4] = the <i>increasing variation </i>associated to this mode<br>                  <var>index</var> = <var>index</var> + 4<br>                                    <li><strong>If the Mode is composed of an <i>Threshold Mode</i></strong><br>                  <var>argin</var>[<var>index</var>+ 1] = <code>MODE_T</code><br>                  <var>argin</var>[<var>index</var>+ 2] = the frequency of the <i>threshold mode </i>in (ms)<br>                  <var>argin</var>[<var>index</var>+ 3] = the smallest value (min) when decreasing<br>                  <var>argin</var>[<var>index</var>+ 4] = the biggest value (max) when increasing<br>                  <var>index</var> = <var>index</var> + 4<br>                                    <li>If the Mode is composed of a <i>On Calculation Mode</i></strong><br>                  <var>argin</var>[<var>index</var>+ 1] = <code>MODE_C</code><br>                  <var>argin</var>[<var>index</var>+ 2] = the <i>frequency </i>of the <i>on calculation mode </i>in (ms)<br>                  <var>argin</var>[<var>index</var>+ 3] = the <i>number of values</i> taken into account<br>                  <var>argin</var>[<var>index</var>+ 4] = the <i>type </i>associated to this mode<br>                  <var>argin</var>[<var>index</var>+ 5] = Not used at the moment <br>                  <var>index</var> = <var>index</var> + 5<br>                                    <li><strong>If the Mode is composed of an <i>On Difference Mode</i></strong><br>                  <var>argin</var>[<var>index</var>+ 1] = <code>MODE_D</code><br>                  <var>argin</var>[<var>index</var>+ 2] = the <i>frequency </i>of this<i> mode </i>(in ms)<br>                  <var>index</var> = <var>index</var> + 2<br>                                    <li><strong>If the Mode is composed of an <i>External Mode</i></strong><br>                  <var>argin</var>[<var>index</var>+ 1] = <code>MODE_E</code><br>                  <var>index</var> = <var>index</var> + 1<br>                                            </ul>                       </ul>          </blockquote> ",
+                        "", DispLevel.OPERATOR));
+        command_list
+                .addElement(new ArchivingStartTdbCmd(
+                        "ArchivingStartTdb",
+                        Tango_DEVVAR_STRINGARRAY,
+                        Tango_DEV_VOID,
+                        "Archiving arguments... <BR><blockquote> <ul>              <li><strong>The first part :</strong>              <ul>                  <li><var>argin</var>[0]<b> =</b> the load balancing type of the archiving<br>                   &quot;1&quot;, if all the attribute are archived together in the same TdbArchiver device, <br>                  &quot;0&quot; otherwise.                  <li><var>argin</var>[1]<b> =</b>                   the number of attributes to archive<br> <li><var>argin</var>[2]                  to <var>argin</var> [2 + <var>argin</var>[1] - 1] = the name of each attribute              </ul>              <li><strong>The second part (the <i>Mode </i>part) :</strong> <br>              Let us note <i>&quot;<var>index</var>&quot; </i>the last <var>index</var> used (for example, at this point, <i><var>index</var></i> = 2]).             <ul>                  <li><strong>If the Mode is composed of a <i>Periodical Mode</i></strong><br>                  <var>argin</var>[<var>index</var>+ 1] = <code>MODE_P</code><br>                  <var>argin</var>[<var>index</var>+ 2] = the period of the periodic mode in (ms)<br>                  <var>index</var> = <var>index</var> + 2<br>                                    <li><strong>If the Mode is composed of an <i>Absolute Mode</i></strong><br>                  <var>argin</var>[<var>index</var>+ 1] = <code>MODE_A</code><br>                  <var>argin</var>[<var>index</var>+ 2] = the frequency of the <i>absolute mode </i>in (ms)<br>                  <var>argin</var>[<var>index</var>+ 3] = the delta value max when decreasing<br>                  <var>argin</var>[<var>index</var>+ 4] = the delta value max when increasing<br>                  <var>index</var> = <var>index</var> + 4<br>                                    <li><strong>If the Mode is composed of a <i>Relative Mode</i></strong><br>                  <var>argin</var>[<var>index</var>+ 1] = <code>MODE_R</code><br>                  <var>argin</var>[<var>index</var>+ 2] = the <i>frequency </i>of the <i>relative mode </i>in (ms)<br>                  <var>argin</var>[<var>index</var>+ 3] = the <i>decreasing variation </i>associated to this mode<br>                  <var>argin</var>[<var>index</var>+ 4] = the <i>increasing variation </i>associated to this mode<br>                  <var>index</var> = <var>index</var> + 4<br>                                    <li><strong>If the Mode is composed of an <i>Threshold Mode</i></strong><br>                  <var>argin</var>[<var>index</var>+ 1] = <code>MODE_T</code><br>                  <var>argin</var>[<var>index</var>+ 2] = the frequency of the <i>threshold mode </i>in (ms)<br>                  <var>argin</var>[<var>index</var>+ 3] = the smallest value (min) when decreasing<br>                  <var>argin</var>[<var>index</var>+ 4] = the biggest value (max) when increasing<br>                  <var>index</var> = <var>index</var> + 4<br>                                    <li>If the Mode is composed of a <i>On Calculation Mode</i></strong><br>                  <var>argin</var>[<var>index</var>+ 1] = <code>MODE_C</code><br>                  <var>argin</var>[<var>index</var>+ 2] = the <i>frequency </i>of the <i>on calculation mode </i>in (ms)<br>                  <var>argin</var>[<var>index</var>+ 3] = the <i>number of values</i> taken into account<br>                  <var>argin</var>[<var>index</var>+ 4] = the <i>type </i>associated to this mode<br>                  <var>argin</var>[<var>index</var>+ 5] = Not used at the moment <br>                  <var>index</var> = <var>index</var> + 5<br>                                    <li><strong>If the Mode is composed of an <i>On Difference Mode</i></strong><br>                  <var>argin</var>[<var>index</var>+ 1] = <code>MODE_D</code><br>                  <var>argin</var>[<var>index</var>+ 2] = the <i>frequency </i>of this<i> mode </i>(in ms)<br>                  <var>index</var> = <var>index</var> + 2<br>                                    <li><strong>If the Mode is composed of an <i>External Mode</i></strong><br>                  <var>argin</var>[<var>index</var>+ 1] = <code>MODE_E</code><br>                  <var>index</var> = <var>index</var> + 1<br>                                    <li><strong>The Temporary (<i>Intermediate Archiving</i>) archiving specific informations </strong><br>                  <var>argin</var>[<var>index</var>+ 1] = <code>TDB_SPEC</code><br>                  <var>argin</var>[<var>index</var>+ 2] = the <i>export frequency </i>(ms)<br>                  <var>argin</var>[<var>index</var>+ 3] = the <i>keeping window duration </i>in (ms)<br>                  <var>index</var> = <var>index</var> + 3<br>             </ul>                       </ul>          </blockquote>",
+                        "", DispLevel.OPERATOR));
+        command_list.addElement(new ArchivingStopHdbCmd("ArchivingStopHdb", Tango_DEVVAR_STRINGARRAY, Tango_DEV_VOID,
+                "The attribute list.", "", DispLevel.OPERATOR));
+        command_list.addElement(new ArchivingStopTdbCmd("ArchivingStopTdb", Tango_DEVVAR_STRINGARRAY, Tango_DEV_VOID,
+                "The attribute list.", "", DispLevel.OPERATOR));
+        command_list
+                .addElement(new ArchivingModifHdbCmd(
+                        "ArchivingModifHdb",
+                        Tango_DEVVAR_STRINGARRAY,
+                        Tango_DEV_VOID,
+                        "The configuration to switch to... <br> <blockquote> <ul> <li><strong>The first part :</strong>  <ul> <li><var>argin</var>[0]<b> =</b> the load balancing type of the archiving<br>  &quot;1&quot;, if all the attribute are archived together in the same TdbArchiver device, <br> &quot;0&quot; otherwise. <li><var>argin</var>[1]<b> =</b>  the number of attributes to archive<br> <li><var>argin</var>[2] to <var>argin</var> [2 + <var>argin</var>[1] - 1] = the name of each attribute  </ul> <li><strong>The second part (the <i>Mode </i>part) :</strong> <br> Let us note <i>&quot;<var>index</var>&quot; </i>the last <var>index</var> used (for example, at this point, <i><var>index</var></i> = 2]). <ul> <li><strong>If the Mode is composed of a <i>Periodical Mode</i></strong><br> <var>argin</var>[<var>index</var>+ 1] = <code>MODE_P</code><br> <var>argin</var>[<var>index</var>+ 2] = the period of the periodic mode in (ms)<br> <var>index</var> = <var>index</var> + 2<br>  <li><strong>If the Mode is composed of an <i>Absolute Mode</i></strong><br> <var>argin</var>[<var>index</var>+ 1] = <code>MODE_A</code><br> <var>argin</var>[<var>index</var>+ 2] = the frequency of the <i>absolute mode </i>in (ms)<br> <var>argin</var>[<var>index</var>+ 3] = the delta value max when decreasing<br> <var>argin</var>[<var>index</var>+ 4] = the delta value max when increasing<br> <var>index</var> = <var>index</var> + 4<br>  <li><strong>If the Mode is composed of a <i>Relative Mode</i></strong><br> <var>argin</var>[<var>index</var>+ 1] = <code>MODE_R</code><br> <var>argin</var>[<var>index</var>+ 2] = the <i>frequency </i>of the <i>relative mode </i>in (ms)<br> <var>argin</var>[<var>index</var>+ 3] = the <i>decreasing variation </i>associated to this mode<br> <var>argin</var>[<var>index</var>+ 4] = the <i>increasing variation </i>associated to this mode<br> <var>index</var> = <var>index</var> + 4<br>  <li><strong>If the Mode is composed of an <i>Threshold Mode</i></strong><br> <var>argin</var>[<var>index</var>+ 1] = <code>MODE_T</code><br> <var>argin</var>[<var>index</var>+ 2] = the frequency of the <i>threshold mode </i>in (ms)<br> <var>argin</var>[<var>index</var>+ 3] = the smallest value (min) when decreasing<br> <var>argin</var>[<var>index</var>+ 4] = the biggest value (max) when increasing<br> <var>index</var> = <var>index</var> + 4<br>  <li>If the Mode is composed of a <i>On Calculation Mode</i></strong><br> <var>argin</var>[<var>index</var>+ 1] = <code>MODE_C</code><br> <var>argin</var>[<var>index</var>+ 2] = the <i>frequency </i>of the <i>on calculation mode </i>in (ms)<br> <var>argin</var>[<var>index</var>+ 3] = the <i>number of values</i> taken into account<br> <var>argin</var>[<var>index</var>+ 4] = the <i>type </i>associated to this mode<br> <var>argin</var>[<var>index</var>+ 5] = Not used at the moment <br> <var>index</var> = <var>index</var> + 5<br>  <li><strong>If the Mode is composed of an <i>On Difference Mode</i></strong><br> <var>argin</var>[<var>index</var>+ 1] = <code>MODE_D</code><br> <var>argin</var>[<var>index</var>+ 2] = the <i>frequency </i>of this<i> mode </i>(in ms)<br> <var>index</var> = <var>index</var> + 2<br>  <li><strong>If the Mode is composed of an <i>External Mode</i></strong><br> <var>argin</var>[<var>index</var>+ 1] = <code>MODE_E</code><br> <var>index</var> = <var>index</var> + 1<br>  </ul>  </ul> </blockquote> ",
+                        "", DispLevel.OPERATOR));
+        command_list
+                .addElement(new ArchivingModifTdbCmd(
+                        "ArchivingModifTdb",
+                        Tango_DEVVAR_STRINGARRAY,
+                        Tango_DEV_VOID,
+                        "The configuration to switch to...... <br> <blockquote> <ul> <li><strong>The first part :</strong>  <ul> <li><var>argin</var>[0]<b> =</b> the load balancing type of the archiving<br>  &quot;1&quot;, if all the attribute are archived together in the same TdbArchiver device, <br> &quot;0&quot; otherwise. <li><var>argin</var>[1]<b> =</b>  the number of attributes to archive<br> <li><var>argin</var>[2] to <var>argin</var> [2 + <var>argin</var>[1] - 1] = the name of each attribute  </ul> <li><strong>The second part (the <i>Mode </i>part) :</strong> <br> Let us note <i>&quot;<var>index</var>&quot; </i>the last <var>index</var> used (for example, at this point, <i><var>index</var></i> = 2]). <ul> <li><strong>If the Mode is composed of a <i>Periodical Mode</i></strong><br> <var>argin</var>[<var>index</var>+ 1] = <code>MODE_P</code><br> <var>argin</var>[<var>index</var>+ 2] = the period of the periodic mode in (ms)<br> <var>index</var> = <var>index</var> + 2<br>  <li><strong>If the Mode is composed of an <i>Absolute Mode</i></strong><br> <var>argin</var>[<var>index</var>+ 1] = <code>MODE_A</code><br> <var>argin</var>[<var>index</var>+ 2] = the frequency of the <i>absolute mode </i>in (ms)<br> <var>argin</var>[<var>index</var>+ 3] = the delta value max when decreasing<br> <var>argin</var>[<var>index</var>+ 4] = the delta value max when increasing<br> <var>index</var> = <var>index</var> + 4<br>  <li><strong>If the Mode is composed of a <i>Relative Mode</i></strong><br> <var>argin</var>[<var>index</var>+ 1] = <code>MODE_R</code><br> <var>argin</var>[<var>index</var>+ 2] = the <i>frequency </i>of the <i>relative mode </i>in (ms)<br> <var>argin</var>[<var>index</var>+ 3] = the <i>decreasing variation </i>associated to this mode<br> <var>argin</var>[<var>index</var>+ 4] = the <i>increasing variation </i>associated to this mode<br> <var>index</var> = <var>index</var> + 4<br>  <li><strong>If the Mode is composed of an <i>Threshold Mode</i></strong><br> <var>argin</var>[<var>index</var>+ 1] = <code>MODE_T</code><br> <var>argin</var>[<var>index</var>+ 2] = the frequency of the <i>threshold mode </i>in (ms)<br> <var>argin</var>[<var>index</var>+ 3] = the smallest value (min) when decreasing<br> <var>argin</var>[<var>index</var>+ 4] = the biggest value (max) when increasing<br> <var>index</var> = <var>index</var> + 4<br>  <li>If the Mode is composed of a <i>On Calculation Mode</i></strong><br> <var>argin</var>[<var>index</var>+ 1] = <code>MODE_C</code><br> <var>argin</var>[<var>index</var>+ 2] = the <i>frequency </i>of the <i>on calculation mode </i>in (ms)<br> <var>argin</var>[<var>index</var>+ 3] = the <i>number of values</i> taken into account<br> <var>argin</var>[<var>index</var>+ 4] = the <i>type </i>associated to this mode<br> <var>argin</var>[<var>index</var>+ 5] = Not used at the moment <br> <var>index</var> = <var>index</var> + 5<br>  <li><strong>If the Mode is composed of an <i>On Difference Mode</i></strong><br> <var>argin</var>[<var>index</var>+ 1] = <code>MODE_D</code><br> <var>argin</var>[<var>index</var>+ 2] = the <i>frequency </i>of this<i> mode </i>(in ms)<br> <var>index</var> = <var>index</var> + 2<br>  <li><strong>If the Mode is composed of an <i>External Mode</i></strong><br> <var>argin</var>[<var>index</var>+ 1] = <code>MODE_E</code><br> <var>index</var> = <var>index</var> + 1<br>  <li><strong>The Temporary (<i>Intermediate Archiving</i>) archiving specific informations </strong><br> <var>argin</var>[<var>index</var>+ 1] = <code>TDB_SPEC</code><br> <var>argin</var>[<var>index</var>+ 2] = the <i>export frequency </i>(ms)<br> <var>argin</var>[<var>index</var>+ 3] = the <i>keeping window duration </i>in (ms)<br> <var>index</var> = <var>index</var> + 3<br> </ul>  </ul> </blockquote> ",
+                        "", DispLevel.OPERATOR));
+        command_list
+                .addElement(new IsArchivedHdbCmd(
+                        "IsArchivedHdb",
+                        Tango_DEVVAR_STRINGARRAY,
+                        Tango_DEVVAR_SHORTARRAY,
+                        "The attribute list.",
+                        "For each attribute of the given list...<br>   <ul> <li><code>1</code>, if the attribute is currently being archived (historical archiving) <li><code>0</code>, otherwise </ul>",
+                        DispLevel.OPERATOR));
+        command_list
+                .addElement(new IsArchivedTdbCmd(
+                        "IsArchivedTdb",
+                        Tango_DEVVAR_STRINGARRAY,
+                        Tango_DEVVAR_SHORTARRAY,
+                        "The attribute list.",
+                        "For each attribute of the given list...<br>   <ul> <li><code>1</code>, if the attribute is currently being archived (temporary archiving) <li><code>0</code>, otherwise </ul>",
+                        DispLevel.OPERATOR));
+        command_list
+                .addElement(new GetArchivingModeHdbCmd(
+                        "GetArchivingModeHdb",
+                        Tango_DEV_STRING,
+                        Tango_DEVVAR_STRINGARRAY,
+                        "The attribute name.",
+                        "The applied mode... <br> <blockquote> <ul>             Let us note <i>&quot;<var>index</var>&quot; </i>the last <var>index</var> used (for example, at this point, <i><var>index</var></i> = 0]).      <li><strong>If the Mode is composed of a <i>Periodical Mode</i></strong><br>     <var>argout</var>[<var>index</var>] = <code>MODE_P</code><br>     <var>argout</var>[<var>index</var> + 1] = the period of the periodic mode in (ms)<br>     <var>index</var> = <var>index</var> + 2<br>          <li><strong>If the Mode is composed of an <i>Absolute Mode</i></strong><br>     <var>argout</var>[<var>index</var>] = <code>MODE_A</code><br>     <var>argout</var>[<var>index</var>+ 1] = the frequency of the <i>absolute mode </i>in (ms)<br>     <var>argout</var>[<var>index</var>+ 2] = the delta value max when decreasing<br>     <var>argout</var>[<var>index</var>+ 3] = the delta value max when increasing<br>     <var>index</var> = <var>index</var> + 4<br>          <li><strong>If the Mode is composed of a <i>Relative Mode</i></strong><br>     <var>argout</var>[<var>index</var>] = <code>MODE_R</code><br>     <var>argout</var>[<var>index</var>+ 1] = the <i>frequency </i>of the <i>relative mode </i>in (ms)<br>     <var>argout</var>[<var>index</var>+ 2] = the <i>decreasing variation </i>associated to this mode<br>     <var>argout</var>[<var>index</var>+ 3] = the <i>increasing variation </i>associated to this mode<br>     <var>index</var> = <var>index</var> + 4<br>          <li><strong>If the Mode is composed of an <i>Threshold Mode</i></strong><br>     <var>argout</var>[<var>index</var>] = <code>MODE_T</code><br>     <var>argout</var>[<var>index</var>+ 1] = the frequency of the <i>threshold mode </i>in (ms)<br>     <var>argout</var>[<var>index</var>+ 2] = the smallest value (min) when decreasing<br>     <var>argout</var>[<var>index</var>+ 3] = the biggest value (max) when increasing<br>     <var>index</var> = <var>index</var> + 4<br>          <li>If the Mode is composed of a <i>On Calculation Mode</i></strong><br>     <var>argout</var>[<var>index</var>] = <code>MODE_C</code><br>     <var>argout</var>[<var>index</var>+ 1] = the <i>frequency </i>of the <i>on calculation mode </i>in (ms)<br>     <var>argout</var>[<var>index</var>+ 2] = the <i>number of values</i> taken into account<br>     <var>argout</var>[<var>index</var>+ 3] = the <i>type </i>associated to this mode<br>     <var>argout</var>[<var>index</var>+ 4] = Not used at the moment <br>     <var>index</var> = <var>index</var> + 5<br>          <li><strong>If the Mode is composed of an <i>On Difference Mode</i></strong><br>     <var>argout</var>[<var>index</var>] = <code>MODE_D</code><br>     <var>argout</var>[<var>index</var>+ 1] = the <i>frequency </i>of this<i> mode </i>(in ms)<br>     <var>index</var> = <var>index</var> + 2<br>          <li><strong>If the Mode is composed of an <i>External Mode</i></strong><br>     <var>argout</var>[<var>index</var>] = <code>MODE_E</code><br>     <var>index</var> = <var>index</var> + 1<br>     </ul> </blockquote> ",
+                        DispLevel.OPERATOR));
+        command_list
+                .addElement(new GetArchivingModeTdbCmd(
+                        "GetArchivingModeTdb",
+                        Tango_DEV_STRING,
+                        Tango_DEVVAR_STRINGARRAY,
+                        "The attribute name.",
+                        "The applied mode... <br> <blockquote> <ul>             Let us note <i>&quot;<var>index</var>&quot; </i>the last <var>index</var> used (for example, at this point, <i><var>index</var></i> = 0]).      <li><strong>If the Mode is composed of a <i>Periodical Mode</i></strong><br>     <var>argout</var>[<var>index</var>] = <code>MODE_P</code><br>     <var>argout</var>[<var>index</var> + 1] = the period of the periodic mode in (ms)<br>     <var>index</var> = <var>index</var> + 2<br>          <li><strong>If the Mode is composed of an <i>Absolute Mode</i></strong><br>     <var>argout</var>[<var>index</var>] = <code>MODE_A</code><br>     <var>argout</var>[<var>index</var>+ 1] = the frequency of the <i>absolute mode </i>in (ms)<br>     <var>argout</var>[<var>index</var>+ 2] = the delta value max when decreasing<br>     <var>argout</var>[<var>index</var>+ 3] = the delta value max when increasing<br>     <var>index</var> = <var>index</var> + 4<br>          <li><strong>If the Mode is composed of a <i>Relative Mode</i></strong><br>     <var>argout</var>[<var>index</var>] = <code>MODE_R</code><br>     <var>argout</var>[<var>index</var>+ 1] = the <i>frequency </i>of the <i>relative mode </i>in (ms)<br>     <var>argout</var>[<var>index</var>+ 2] = the <i>decreasing variation </i>associated to this mode<br>     <var>argout</var>[<var>index</var>+ 3] = the <i>increasing variation </i>associated to this mode<br>     <var>index</var> = <var>index</var> + 4<br>          <li><strong>If the Mode is composed of an <i>Threshold Mode</i></strong><br>     <var>argout</var>[<var>index</var>] = <code>MODE_T</code><br>     <var>argout</var>[<var>index</var>+ 1] = the frequency of the <i>threshold mode </i>in (ms)<br>     <var>argout</var>[<var>index</var>+ 2] = the smallest value (min) when decreasing<br>     <var>argout</var>[<var>index</var>+ 3] = the biggest value (max) when increasing<br>     <var>index</var> = <var>index</var> + 4<br>          <li>If the Mode is composed of a <i>On Calculation Mode</i></strong><br>     <var>argout</var>[<var>index</var>] = <code>MODE_C</code><br>     <var>argout</var>[<var>index</var>+ 1] = the <i>frequency </i>of the <i>on calculation mode </i>in (ms)<br>     <var>argout</var>[<var>index</var>+ 2] = the <i>number of values</i> taken into account<br>     <var>argout</var>[<var>index</var>+ 3] = the <i>type </i>associated to this mode<br>     <var>argout</var>[<var>index</var>+ 4] = Not used at the moment <br>     <var>index</var> = <var>index</var> + 5<br>          <li><strong>If the Mode is composed of an <i>On Difference Mode</i></strong><br>     <var>argout</var>[<var>index</var>] = <code>MODE_D</code><br>     <var>argout</var>[<var>index</var>+ 1] = the <i>frequency </i>of this<i> mode </i>(in ms)<br>     <var>index</var> = <var>index</var> + 2<br>          <li><strong>If the Mode is composed of an <i>External Mode</i></strong><br>     <var>argout</var>[<var>index</var>] = <code>MODE_E</code><br>     <var>index</var> = <var>index</var> + 1<br>          <li><strong>The Temporary (<i>Intermediate Archiving</i>) archiving specific informations </strong><br>     <var>argout</var>[<var>index</var>] = <code>TDB_SPEC</code><br>     <var>argout</var>[<var>index</var>+ 1] = the <i>export frequency </i>(ms)<br>     <var>argout</var>[<var>index</var>+ 2] = the <i>keeping window duration </i>in (ms)<br>     <var>index</var> = <var>index</var> + 3<br> </ul> </blockquote> ",
+                        DispLevel.OPERATOR));
+        command_list.addElement(new GetStatusHdbCmd("GetStatusHdb", Tango_DEVVAR_STRINGARRAY, Tango_DEVVAR_STRINGARRAY,
+                "The attribute list.", "The list of status.", DispLevel.OPERATOR));
+        command_list.addElement(new GetStatusTdbCmd("GetStatusTdb", Tango_DEVVAR_STRINGARRAY, Tango_DEVVAR_STRINGARRAY,
+                "The attribute list.", "The list of status.", DispLevel.OPERATOR));
+
+        // add polling if any
+        /*
+         * for (int i = 0; i < command_list.size(); i++) { Command cmd =
+         * (Command) command_list.elementAt(i); }
+         */
+    }
+
+    // ===================================================================
+    //
+    // method : device_factory()
+    //
+    // description : Create the device object(s) and store them in the
+    // device list
+    //
+    // argument : in : String[] devlist : The device name list
+    //
+    // ===================================================================
+    @SuppressWarnings("unchecked")
+    @Override
+    public void device_factory(String[] devlist) throws DevFailed {
+        String device_version = ResourceBundle.getBundle("application").getString("project.version");
+
+        for (int i = 0; i < devlist.length; i++) {
+            Util.out4.println("Device name : " + devlist[i]);
+
+            // Create device and add it into the device list
+            // ----------------------------------------------
+            device_list.addElement(new ArchivingManager(this, devlist[i], device_version));
+
+            // Export device to the outside world
+            // ----------------------------------------------
+            if (Util._UseDb == true)
+                export_device(((DeviceImpl) (device_list.elementAt(i))));
+            else
+                export_device(((DeviceImpl) (device_list.elementAt(i))), devlist[i]);
+        }
+    }
+
+    // =============================================================================
+    //
+    // Method: attribute_factory(Vector att_list)
+    //
+    // =============================================================================
+    @SuppressWarnings("unchecked")
+    @Override
+    public void attribute_factory(Vector att_list) throws DevFailed {
+        // Attribute : version
+        Attr version = new Attr("version", Tango_DEV_STRING, AttrWriteType.READ);
+        att_list.addElement(version);
+    }
+
+    // ===================================================================
+    /**
+     * Get the class property for specified name.
+     * 
+     * @param name
+     *            The property name.
+     */
+    // ===================================================================
+    public DbDatum get_class_property(String name) {
+        for (int i = 0; i < cl_prop.length; i++)
+            if (cl_prop[i].name.equals(name))
+                return cl_prop[i];
+        // if not found, return an empty DbDatum
+        return new DbDatum(name);
+    }
+
+    // ===================================================================
+    /**
+     * Read the class properties from database.
+     */
+    // ===================================================================
+    public void get_class_property() throws DevFailed {
+        // Initialize your default values here.
+        // ------------------------------------------
+
+        // Read class properties from database.(Automatic code generation)
+        // -------------------------------------------------------------
+        if (Util._UseDb == false)
+            return;
+        String[] propnames = {};
+
+        // Call database and extract values
+        // --------------------------------------------
+        cl_prop = get_db_class().get_property(propnames);
+
+        // End of Automatic code generation
+        // -------------------------------------------------------------
+
+    }
+
+    // ===================================================================
+    /**
+     * Set class description as property in database
+     */
+    // ===================================================================
+//	private void write_class_property() throws DevFailed {
+//		// First time, check if database used
+//		// --------------------------------------------
+//		if (Util._UseDb == false)
+//			return;
+//
+//		// Prepeare DbDatum
+//		// --------------------------------------------
+//		DbDatum[] data = new DbDatum[2];
+//		data[0] = new DbDatum("ProjectTitle");
+//		data[0].insert("Tango Device Server");
+//
+//		data[1] = new DbDatum("Description");
+//		data[1]
+//				.insert("Device of Archiving system\n<Br><Br>\n<br><b>ROLE</b><br>\nThis DeviceServer is used in order to manage the archiving of exported Tango attributes device.\n<Br><Br>\n<br><b>ARCHIVING TYPE</b><br>\nThere is two kind of archiving :\n<Br><Br>\n<Li><b>The His");
+//
+//		// Call database and and values
+//		// --------------------------------------------
+//		get_db_class().put_property(data);
+//	}
+
+}
diff --git a/src/main/java/ArchivingManager/ArchivingModifHdbCmd.java b/archivingmanager/src/main/java/ArchivingManager/ArchivingModifHdbCmd.java
similarity index 96%
rename from src/main/java/ArchivingManager/ArchivingModifHdbCmd.java
rename to archivingmanager/src/main/java/ArchivingManager/ArchivingModifHdbCmd.java
index 4a62147b7d1f21ef8b2bfdb312bfc57fbb26b38f..b25c08d190db036af88064424392df35e68bd1ee 100644
--- a/src/main/java/ArchivingManager/ArchivingModifHdbCmd.java
+++ b/archivingmanager/src/main/java/ArchivingManager/ArchivingModifHdbCmd.java
@@ -1,165 +1,165 @@
-//+======================================================================
-// $Source: /cvsroot/tango-cs/tango/jserver/archiving/ArchivingManager/ArchivingModifHdbCmd.java,v $
-//
-// Project:      Tango Device Server
-//
-// Description:  Java source code for the command TemplateClass of the
-//               ArchivingManager class.
-//
-// $Author: chinkumo $
-//
-// $Revision: 1.4 $
-//
-// $Log: ArchivingModifHdbCmd.java,v $
-// Revision 1.4  2005/11/29 17:34:41  chinkumo
-// no message
-//
-// Revision 1.3.10.2  2005/11/29 16:14:07  chinkumo
-// Code reformated (pogo compatible)
-//
-// Revision 1.3.10.1  2005/11/15 13:46:24  chinkumo
-// ...
-//
-// Revision 1.3  2005/06/14 10:24:03  chinkumo
-// Branch (archivingManager_1_0_1-branch_0)  and HEAD merged.
-//
-// Revision 1.2.4.1  2005/06/13 14:29:28  chinkumo
-// The ArchivingManager device was regenerated in Tango V5.
-// This command was also modified. It now returns a void object.
-//
-// Revision 1.2  2005/01/28 13:11:14  taurel
-// Some changes in source files to be Pogo compatible
-//
-//
-// copyleft :    European Synchrotron Radiation Facility
-//               BP 220, Grenoble 38043
-//               FRANCE
-//
-//-======================================================================
-//
-//  		This file is generated by POGO
-//	(Program Obviously used to Generate tango Object)
-//
-//         (c) - Software Engineering Group - ESRF
-//=============================================================================
-
-/**
- * @author	$Author: chinkumo $
- * @version	$Revision: 1.4 $
- */
-package ArchivingManager;
-
-import org.omg.CORBA.Any;
-
-import fr.esrf.Tango.DevFailed;
-import fr.esrf.Tango.DevState;
-import fr.esrf.Tango.DispLevel;
-import fr.esrf.TangoDs.Command;
-import fr.esrf.TangoDs.DeviceImpl;
-import fr.esrf.TangoDs.Except;
-import fr.esrf.TangoDs.TangoConst;
-import fr.esrf.TangoDs.Util;
-
-/**
- * Class Description: Change the mode of an historical archiving.
- */
-
-public class ArchivingModifHdbCmd extends Command implements TangoConst {
-	// ===============================================================
-	/**
-	 * Constructor for Command class ArchivingModifHdbCmd
-	 * 
-	 * @param name
-	 *            command name
-	 * @param in
-	 *            argin type
-	 * @param out
-	 *            argout type
-	 */
-	// ===============================================================
-	public ArchivingModifHdbCmd(String name, int in, int out) {
-		super(name, in, out);
-	}
-
-	// ===============================================================
-	/**
-	 * Constructor for Command class ArchivingModifHdbCmd
-	 * 
-	 * @param name
-	 *            command name
-	 * @param in
-	 *            argin type
-	 * @param in_comments
-	 *            argin description
-	 * @param out
-	 *            argout type
-	 * @param out_comments
-	 *            argout description
-	 */
-	// ===============================================================
-	public ArchivingModifHdbCmd(String name, int in, int out, String in_comments, String out_comments) {
-		super(name, in, out, in_comments, out_comments);
-	}
-
-	// ===============================================================
-	/**
-	 * Constructor for Command class ArchivingModifHdbCmd
-	 * 
-	 * @param name
-	 *            command name
-	 * @param in
-	 *            argin type
-	 * @param in_comments
-	 *            argin description
-	 * @param out
-	 *            argout type
-	 * @param out_comments
-	 *            argout description
-	 * @param level
-	 *            The command display type OPERATOR or EXPERT
-	 */
-	// ===============================================================
-	public ArchivingModifHdbCmd(String name, int in, int out, String in_comments, String out_comments, DispLevel level) {
-		super(name, in, out, in_comments, out_comments, level);
-	}
-
-	// ===============================================================
-	/**
-	 * return the result of the device's command.
-	 */
-	// ===============================================================
-	@Override
-	public Any execute(DeviceImpl device, Any in_any) throws DevFailed {
-		Util.out2.println("ArchivingModifHdbCmd.execute(): arrived");
-		if (!(device instanceof ArchivingManager)) {
-			Except.throw_exception("DEVICE_ERROR", "Device parameter is not instance of ArchivingManager", "ArchivingManager");
-		}
-
-		String[] argin = extract_DevVarStringArray(in_any);
-		((ArchivingManager) (device)).archiving_modif_hdb(argin);
-		return insert();
-	}
-
-	// ===============================================================
-	/**
-	 * Check if it is allowed to execute the command.
-	 */
-	// ===============================================================
-	@Override
-	public boolean is_allowed(DeviceImpl device, Any data_in) {
-		if (device.get_state() == DevState.INIT || device.get_state() == DevState.FAULT) {
-			// End of Generated Code
-
-			// Re-Start of Generated Code
-			return false;
-		}
-		return true;
-	}
-}
-
-// -----------------------------------------------------------------------------
-/*
- * end of $Source:
- * /cvsroot/tango-cs/tango/jserver/archiving/ArchivingManager/ArchivingModifHdbCmd
- * .java,v $
- */
+//+======================================================================
+// $Source: /cvsroot/tango-cs/tango/jserver/archiving/ArchivingManager/ArchivingModifHdbCmd.java,v $
+//
+// Project:      Tango Device Server
+//
+// Description:  Java source code for the command TemplateClass of the
+//               ArchivingManager class.
+//
+// $Author: chinkumo $
+//
+// $Revision: 1.4 $
+//
+// $Log: ArchivingModifHdbCmd.java,v $
+// Revision 1.4  2005/11/29 17:34:41  chinkumo
+// no message
+//
+// Revision 1.3.10.2  2005/11/29 16:14:07  chinkumo
+// Code reformated (pogo compatible)
+//
+// Revision 1.3.10.1  2005/11/15 13:46:24  chinkumo
+// ...
+//
+// Revision 1.3  2005/06/14 10:24:03  chinkumo
+// Branch (archivingManager_1_0_1-branch_0)  and HEAD merged.
+//
+// Revision 1.2.4.1  2005/06/13 14:29:28  chinkumo
+// The ArchivingManager device was regenerated in Tango V5.
+// This command was also modified. It now returns a void object.
+//
+// Revision 1.2  2005/01/28 13:11:14  taurel
+// Some changes in source files to be Pogo compatible
+//
+//
+// copyleft :    European Synchrotron Radiation Facility
+//               BP 220, Grenoble 38043
+//               FRANCE
+//
+//-======================================================================
+//
+//  		This file is generated by POGO
+//	(Program Obviously used to Generate tango Object)
+//
+//         (c) - Software Engineering Group - ESRF
+//=============================================================================
+
+/**
+ * @author	$Author: chinkumo $
+ * @version	$Revision: 1.4 $
+ */
+package ArchivingManager;
+
+import org.omg.CORBA.Any;
+
+import fr.esrf.Tango.DevFailed;
+import fr.esrf.Tango.DevState;
+import fr.esrf.Tango.DispLevel;
+import fr.esrf.TangoDs.Command;
+import fr.esrf.TangoDs.DeviceImpl;
+import fr.esrf.TangoDs.Except;
+import fr.esrf.TangoDs.TangoConst;
+import fr.esrf.TangoDs.Util;
+
+/**
+ * Class Description: Change the mode of an historical archiving.
+ */
+
+public class ArchivingModifHdbCmd extends Command implements TangoConst {
+	// ===============================================================
+	/**
+	 * Constructor for Command class ArchivingModifHdbCmd
+	 * 
+	 * @param name
+	 *            command name
+	 * @param in
+	 *            argin type
+	 * @param out
+	 *            argout type
+	 */
+	// ===============================================================
+	public ArchivingModifHdbCmd(String name, int in, int out) {
+		super(name, in, out);
+	}
+
+	// ===============================================================
+	/**
+	 * Constructor for Command class ArchivingModifHdbCmd
+	 * 
+	 * @param name
+	 *            command name
+	 * @param in
+	 *            argin type
+	 * @param in_comments
+	 *            argin description
+	 * @param out
+	 *            argout type
+	 * @param out_comments
+	 *            argout description
+	 */
+	// ===============================================================
+	public ArchivingModifHdbCmd(String name, int in, int out, String in_comments, String out_comments) {
+		super(name, in, out, in_comments, out_comments);
+	}
+
+	// ===============================================================
+	/**
+	 * Constructor for Command class ArchivingModifHdbCmd
+	 * 
+	 * @param name
+	 *            command name
+	 * @param in
+	 *            argin type
+	 * @param in_comments
+	 *            argin description
+	 * @param out
+	 *            argout type
+	 * @param out_comments
+	 *            argout description
+	 * @param level
+	 *            The command display type OPERATOR or EXPERT
+	 */
+	// ===============================================================
+	public ArchivingModifHdbCmd(String name, int in, int out, String in_comments, String out_comments, DispLevel level) {
+		super(name, in, out, in_comments, out_comments, level);
+	}
+
+	// ===============================================================
+	/**
+	 * return the result of the device's command.
+	 */
+	// ===============================================================
+	@Override
+	public Any execute(DeviceImpl device, Any in_any) throws DevFailed {
+		Util.out2.println("ArchivingModifHdbCmd.execute(): arrived");
+		if (!(device instanceof ArchivingManager)) {
+			Except.throw_exception("DEVICE_ERROR", "Device parameter is not instance of ArchivingManager", "ArchivingManager");
+		}
+
+		String[] argin = extract_DevVarStringArray(in_any);
+		((ArchivingManager) (device)).archiving_modif_hdb(argin);
+		return insert();
+	}
+
+	// ===============================================================
+	/**
+	 * Check if it is allowed to execute the command.
+	 */
+	// ===============================================================
+	@Override
+	public boolean is_allowed(DeviceImpl device, Any data_in) {
+		if (device.get_state() == DevState.INIT || device.get_state() == DevState.FAULT) {
+			// End of Generated Code
+
+			// Re-Start of Generated Code
+			return false;
+		}
+		return true;
+	}
+}
+
+// -----------------------------------------------------------------------------
+/*
+ * end of $Source:
+ * /cvsroot/tango-cs/tango/jserver/archiving/ArchivingManager/ArchivingModifHdbCmd
+ * .java,v $
+ */
diff --git a/src/main/java/ArchivingManager/ArchivingModifTdbCmd.java b/archivingmanager/src/main/java/ArchivingManager/ArchivingModifTdbCmd.java
similarity index 96%
rename from src/main/java/ArchivingManager/ArchivingModifTdbCmd.java
rename to archivingmanager/src/main/java/ArchivingManager/ArchivingModifTdbCmd.java
index 3b6cb72ccef1b33b791bf9be525de9ad71ba8a10..ac665ce2110812fc724293df6ce8e64455c186f1 100644
--- a/src/main/java/ArchivingManager/ArchivingModifTdbCmd.java
+++ b/archivingmanager/src/main/java/ArchivingManager/ArchivingModifTdbCmd.java
@@ -1,165 +1,165 @@
-//+======================================================================
-// $Source: /cvsroot/tango-cs/tango/jserver/archiving/ArchivingManager/ArchivingModifTdbCmd.java,v $
-//
-// Project:      Tango Device Server
-//
-// Description:  Java source code for the command TemplateClass of the
-//               ArchivingManager class.
-//
-// $Author: chinkumo $
-//
-// $Revision: 1.4 $
-//
-// $Log: ArchivingModifTdbCmd.java,v $
-// Revision 1.4  2005/11/29 17:34:41  chinkumo
-// no message
-//
-// Revision 1.3.10.2  2005/11/29 16:14:07  chinkumo
-// Code reformated (pogo compatible)
-//
-// Revision 1.3.10.1  2005/11/15 13:46:24  chinkumo
-// ...
-//
-// Revision 1.3  2005/06/14 10:24:03  chinkumo
-// Branch (archivingManager_1_0_1-branch_0)  and HEAD merged.
-//
-// Revision 1.2.4.1  2005/06/13 14:29:28  chinkumo
-// The ArchivingManager device was regenerated in Tango V5.
-// This command was also modified. It now returns a void object.
-//
-// Revision 1.2  2005/01/28 13:11:14  taurel
-// Some changes in source files to be Pogo compatible
-//
-//
-// copyleft :    European Synchrotron Radiation Facility
-//               BP 220, Grenoble 38043
-//               FRANCE
-//
-//-======================================================================
-//
-//  		This file is generated by POGO
-//	(Program Obviously used to Generate tango Object)
-//
-//         (c) - Software Engineering Group - ESRF
-//=============================================================================
-
-/**
- * @author	$Author: chinkumo $
- * @version	$Revision: 1.4 $
- */
-package ArchivingManager;
-
-import org.omg.CORBA.Any;
-
-import fr.esrf.Tango.DevFailed;
-import fr.esrf.Tango.DevState;
-import fr.esrf.Tango.DispLevel;
-import fr.esrf.TangoDs.Command;
-import fr.esrf.TangoDs.DeviceImpl;
-import fr.esrf.TangoDs.Except;
-import fr.esrf.TangoDs.TangoConst;
-import fr.esrf.TangoDs.Util;
-
-/**
- * Class Description: Change the mode of a temporary archiving.
- */
-
-public class ArchivingModifTdbCmd extends Command implements TangoConst {
-	// ===============================================================
-	/**
-	 * Constructor for Command class ArchivingModifTdbCmd
-	 * 
-	 * @param name
-	 *            command name
-	 * @param in
-	 *            argin type
-	 * @param out
-	 *            argout type
-	 */
-	// ===============================================================
-	public ArchivingModifTdbCmd(String name, int in, int out) {
-		super(name, in, out);
-	}
-
-	// ===============================================================
-	/**
-	 * Constructor for Command class ArchivingModifTdbCmd
-	 * 
-	 * @param name
-	 *            command name
-	 * @param in
-	 *            argin type
-	 * @param in_comments
-	 *            argin description
-	 * @param out
-	 *            argout type
-	 * @param out_comments
-	 *            argout description
-	 */
-	// ===============================================================
-	public ArchivingModifTdbCmd(String name, int in, int out, String in_comments, String out_comments) {
-		super(name, in, out, in_comments, out_comments);
-	}
-
-	// ===============================================================
-	/**
-	 * Constructor for Command class ArchivingModifTdbCmd
-	 * 
-	 * @param name
-	 *            command name
-	 * @param in
-	 *            argin type
-	 * @param in_comments
-	 *            argin description
-	 * @param out
-	 *            argout type
-	 * @param out_comments
-	 *            argout description
-	 * @param level
-	 *            The command display type OPERATOR or EXPERT
-	 */
-	// ===============================================================
-	public ArchivingModifTdbCmd(String name, int in, int out, String in_comments, String out_comments, DispLevel level) {
-		super(name, in, out, in_comments, out_comments, level);
-	}
-
-	// ===============================================================
-	/**
-	 * return the result of the device's command.
-	 */
-	// ===============================================================
-	@Override
-	public Any execute(DeviceImpl device, Any in_any) throws DevFailed {
-		Util.out2.println("ArchivingModifTdbCmd.execute(): arrived");
-		if (!(device instanceof ArchivingManager)) {
-			Except.throw_exception("DEVICE_ERROR", "Device parameter is not instance of ArchivingManager", "ArchivingManager");
-		}
-
-		String[] argin = extract_DevVarStringArray(in_any);
-		((ArchivingManager) (device)).archiving_modif_tdb(argin);
-		return insert();
-	}
-
-	// ===============================================================
-	/**
-	 * Check if it is allowed to execute the command.
-	 */
-	// ===============================================================
-	@Override
-	public boolean is_allowed(DeviceImpl device, Any data_in) {
-		if (device.get_state() == DevState.INIT || device.get_state() == DevState.FAULT) {
-			// End of Generated Code
-
-			// Re-Start of Generated Code
-			return false;
-		}
-		return true;
-	}
-}
-
-// -----------------------------------------------------------------------------
-/*
- * end of $Source:
- * /cvsroot/tango-cs/tango/jserver/archiving/ArchivingManager/ArchivingModifTdbCmd
- * .java,v $
- */
+//+======================================================================
+// $Source: /cvsroot/tango-cs/tango/jserver/archiving/ArchivingManager/ArchivingModifTdbCmd.java,v $
+//
+// Project:      Tango Device Server
+//
+// Description:  Java source code for the command TemplateClass of the
+//               ArchivingManager class.
+//
+// $Author: chinkumo $
+//
+// $Revision: 1.4 $
+//
+// $Log: ArchivingModifTdbCmd.java,v $
+// Revision 1.4  2005/11/29 17:34:41  chinkumo
+// no message
+//
+// Revision 1.3.10.2  2005/11/29 16:14:07  chinkumo
+// Code reformated (pogo compatible)
+//
+// Revision 1.3.10.1  2005/11/15 13:46:24  chinkumo
+// ...
+//
+// Revision 1.3  2005/06/14 10:24:03  chinkumo
+// Branch (archivingManager_1_0_1-branch_0)  and HEAD merged.
+//
+// Revision 1.2.4.1  2005/06/13 14:29:28  chinkumo
+// The ArchivingManager device was regenerated in Tango V5.
+// This command was also modified. It now returns a void object.
+//
+// Revision 1.2  2005/01/28 13:11:14  taurel
+// Some changes in source files to be Pogo compatible
+//
+//
+// copyleft :    European Synchrotron Radiation Facility
+//               BP 220, Grenoble 38043
+//               FRANCE
+//
+//-======================================================================
+//
+//  		This file is generated by POGO
+//	(Program Obviously used to Generate tango Object)
+//
+//         (c) - Software Engineering Group - ESRF
+//=============================================================================
+
+/**
+ * @author	$Author: chinkumo $
+ * @version	$Revision: 1.4 $
+ */
+package ArchivingManager;
+
+import org.omg.CORBA.Any;
+
+import fr.esrf.Tango.DevFailed;
+import fr.esrf.Tango.DevState;
+import fr.esrf.Tango.DispLevel;
+import fr.esrf.TangoDs.Command;
+import fr.esrf.TangoDs.DeviceImpl;
+import fr.esrf.TangoDs.Except;
+import fr.esrf.TangoDs.TangoConst;
+import fr.esrf.TangoDs.Util;
+
+/**
+ * Class Description: Change the mode of a temporary archiving.
+ */
+
+public class ArchivingModifTdbCmd extends Command implements TangoConst {
+	// ===============================================================
+	/**
+	 * Constructor for Command class ArchivingModifTdbCmd
+	 * 
+	 * @param name
+	 *            command name
+	 * @param in
+	 *            argin type
+	 * @param out
+	 *            argout type
+	 */
+	// ===============================================================
+	public ArchivingModifTdbCmd(String name, int in, int out) {
+		super(name, in, out);
+	}
+
+	// ===============================================================
+	/**
+	 * Constructor for Command class ArchivingModifTdbCmd
+	 * 
+	 * @param name
+	 *            command name
+	 * @param in
+	 *            argin type
+	 * @param in_comments
+	 *            argin description
+	 * @param out
+	 *            argout type
+	 * @param out_comments
+	 *            argout description
+	 */
+	// ===============================================================
+	public ArchivingModifTdbCmd(String name, int in, int out, String in_comments, String out_comments) {
+		super(name, in, out, in_comments, out_comments);
+	}
+
+	// ===============================================================
+	/**
+	 * Constructor for Command class ArchivingModifTdbCmd
+	 * 
+	 * @param name
+	 *            command name
+	 * @param in
+	 *            argin type
+	 * @param in_comments
+	 *            argin description
+	 * @param out
+	 *            argout type
+	 * @param out_comments
+	 *            argout description
+	 * @param level
+	 *            The command display type OPERATOR or EXPERT
+	 */
+	// ===============================================================
+	public ArchivingModifTdbCmd(String name, int in, int out, String in_comments, String out_comments, DispLevel level) {
+		super(name, in, out, in_comments, out_comments, level);
+	}
+
+	// ===============================================================
+	/**
+	 * return the result of the device's command.
+	 */
+	// ===============================================================
+	@Override
+	public Any execute(DeviceImpl device, Any in_any) throws DevFailed {
+		Util.out2.println("ArchivingModifTdbCmd.execute(): arrived");
+		if (!(device instanceof ArchivingManager)) {
+			Except.throw_exception("DEVICE_ERROR", "Device parameter is not instance of ArchivingManager", "ArchivingManager");
+		}
+
+		String[] argin = extract_DevVarStringArray(in_any);
+		((ArchivingManager) (device)).archiving_modif_tdb(argin);
+		return insert();
+	}
+
+	// ===============================================================
+	/**
+	 * Check if it is allowed to execute the command.
+	 */
+	// ===============================================================
+	@Override
+	public boolean is_allowed(DeviceImpl device, Any data_in) {
+		if (device.get_state() == DevState.INIT || device.get_state() == DevState.FAULT) {
+			// End of Generated Code
+
+			// Re-Start of Generated Code
+			return false;
+		}
+		return true;
+	}
+}
+
+// -----------------------------------------------------------------------------
+/*
+ * end of $Source:
+ * /cvsroot/tango-cs/tango/jserver/archiving/ArchivingManager/ArchivingModifTdbCmd
+ * .java,v $
+ */
diff --git a/src/main/java/ArchivingManager/ArchivingStartHdbCmd.java b/archivingmanager/src/main/java/ArchivingManager/ArchivingStartHdbCmd.java
similarity index 96%
rename from src/main/java/ArchivingManager/ArchivingStartHdbCmd.java
rename to archivingmanager/src/main/java/ArchivingManager/ArchivingStartHdbCmd.java
index a521cb0bdf9c1d272efb0f9127560388465e7eba..6076c9f4d3cb7fb4309aaf88e6fc7113f91b0db3 100644
--- a/src/main/java/ArchivingManager/ArchivingStartHdbCmd.java
+++ b/archivingmanager/src/main/java/ArchivingManager/ArchivingStartHdbCmd.java
@@ -1,166 +1,166 @@
-//+======================================================================
-// $Source: /cvsroot/tango-cs/tango/jserver/archiving/ArchivingManager/ArchivingStartHdbCmd.java,v $
-//
-// Project:      Tango Device Server
-//
-// Description:  Java source code for the command TemplateClass of the
-//               ArchivingManager class.
-//
-// $Author: chinkumo $
-//
-// $Revision: 1.4 $
-//
-// $Log: ArchivingStartHdbCmd.java,v $
-// Revision 1.4  2005/11/29 17:34:41  chinkumo
-// no message
-//
-// Revision 1.3.10.2  2005/11/29 16:14:07  chinkumo
-// Code reformated (pogo compatible)
-//
-// Revision 1.3.10.1  2005/11/15 13:46:24  chinkumo
-// ...
-//
-// Revision 1.3  2005/06/14 10:24:03  chinkumo
-// Branch (archivingManager_1_0_1-branch_0)  and HEAD merged.
-//
-// Revision 1.2.4.1  2005/06/13 14:29:28  chinkumo
-// The ArchivingManager device was regenerated in Tango V5.
-// This command was also modified. It now returns a void object.
-//
-// Revision 1.2  2005/01/28 13:11:14  taurel
-// Some changes in source files to be Pogo compatible
-//
-//
-// copyleft :    European Synchrotron Radiation Facility
-//               BP 220, Grenoble 38043
-//               FRANCE
-//
-//-======================================================================
-//
-//  		This file is generated by POGO
-//	(Program Obviously used to Generate tango Object)
-//
-//         (c) - Software Engineering Group - ESRF
-//=============================================================================
-
-/**
- * @author	$Author: chinkumo $
- * @version	$Revision: 1.4 $
- */
-package ArchivingManager;
-
-import org.omg.CORBA.Any;
-
-import fr.esrf.Tango.DevFailed;
-import fr.esrf.Tango.DevState;
-import fr.esrf.Tango.DispLevel;
-import fr.esrf.TangoDs.Command;
-import fr.esrf.TangoDs.DeviceImpl;
-import fr.esrf.TangoDs.Except;
-import fr.esrf.TangoDs.TangoConst;
-import fr.esrf.TangoDs.Util;
-
-/**
- * Class Description: Start an historical archiving for the specified
- * attributes, and following the specified mode.
- */
-
-public class ArchivingStartHdbCmd extends Command implements TangoConst {
-	// ===============================================================
-	/**
-	 * Constructor for Command class ArchivingStartHdbCmd
-	 * 
-	 * @param name
-	 *            command name
-	 * @param in
-	 *            argin type
-	 * @param out
-	 *            argout type
-	 */
-	// ===============================================================
-	public ArchivingStartHdbCmd(String name, int in, int out) {
-		super(name, in, out);
-	}
-
-	// ===============================================================
-	/**
-	 * Constructor for Command class ArchivingStartHdbCmd
-	 * 
-	 * @param name
-	 *            command name
-	 * @param in
-	 *            argin type
-	 * @param in_comments
-	 *            argin description
-	 * @param out
-	 *            argout type
-	 * @param out_comments
-	 *            argout description
-	 */
-	// ===============================================================
-	public ArchivingStartHdbCmd(String name, int in, int out, String in_comments, String out_comments) {
-		super(name, in, out, in_comments, out_comments);
-	}
-
-	// ===============================================================
-	/**
-	 * Constructor for Command class ArchivingStartHdbCmd
-	 * 
-	 * @param name
-	 *            command name
-	 * @param in
-	 *            argin type
-	 * @param in_comments
-	 *            argin description
-	 * @param out
-	 *            argout type
-	 * @param out_comments
-	 *            argout description
-	 * @param level
-	 *            The command display type OPERATOR or EXPERT
-	 */
-	// ===============================================================
-	public ArchivingStartHdbCmd(String name, int in, int out, String in_comments, String out_comments, DispLevel level) {
-		super(name, in, out, in_comments, out_comments, level);
-	}
-
-	// ===============================================================
-	/**
-	 * return the result of the device's command.
-	 */
-	// ===============================================================
-	@Override
-	public Any execute(DeviceImpl device, Any in_any) throws DevFailed {
-		Util.out2.println("ArchivingStartHdbCmd.execute(): arrived");
-		if (!(device instanceof ArchivingManager)) {
-			Except.throw_exception("DEVICE_ERROR", "Device parameter is not instance of ArchivingManager", "ArchivingManager");
-		}
-
-		String[] argin = extract_DevVarStringArray(in_any);
-		((ArchivingManager) (device)).archiving_start_hdb(argin);
-		return insert();
-	}
-
-	// ===============================================================
-	/**
-	 * Check if it is allowed to execute the command.
-	 */
-	// ===============================================================
-	@Override
-	public boolean is_allowed(DeviceImpl device, Any data_in) {
-		if (device.get_state() == DevState.INIT || device.get_state() == DevState.FAULT) {
-			// End of Generated Code
-
-			// Re-Start of Generated Code
-			return false;
-		}
-		return true;
-	}
-}
-
-// -----------------------------------------------------------------------------
-/*
- * end of $Source:
- * /cvsroot/tango-cs/tango/jserver/archiving/ArchivingManager/ArchivingStartHdbCmd
- * .java,v $
- */
+//+======================================================================
+// $Source: /cvsroot/tango-cs/tango/jserver/archiving/ArchivingManager/ArchivingStartHdbCmd.java,v $
+//
+// Project:      Tango Device Server
+//
+// Description:  Java source code for the command TemplateClass of the
+//               ArchivingManager class.
+//
+// $Author: chinkumo $
+//
+// $Revision: 1.4 $
+//
+// $Log: ArchivingStartHdbCmd.java,v $
+// Revision 1.4  2005/11/29 17:34:41  chinkumo
+// no message
+//
+// Revision 1.3.10.2  2005/11/29 16:14:07  chinkumo
+// Code reformated (pogo compatible)
+//
+// Revision 1.3.10.1  2005/11/15 13:46:24  chinkumo
+// ...
+//
+// Revision 1.3  2005/06/14 10:24:03  chinkumo
+// Branch (archivingManager_1_0_1-branch_0)  and HEAD merged.
+//
+// Revision 1.2.4.1  2005/06/13 14:29:28  chinkumo
+// The ArchivingManager device was regenerated in Tango V5.
+// This command was also modified. It now returns a void object.
+//
+// Revision 1.2  2005/01/28 13:11:14  taurel
+// Some changes in source files to be Pogo compatible
+//
+//
+// copyleft :    European Synchrotron Radiation Facility
+//               BP 220, Grenoble 38043
+//               FRANCE
+//
+//-======================================================================
+//
+//  		This file is generated by POGO
+//	(Program Obviously used to Generate tango Object)
+//
+//         (c) - Software Engineering Group - ESRF
+//=============================================================================
+
+/**
+ * @author	$Author: chinkumo $
+ * @version	$Revision: 1.4 $
+ */
+package ArchivingManager;
+
+import org.omg.CORBA.Any;
+
+import fr.esrf.Tango.DevFailed;
+import fr.esrf.Tango.DevState;
+import fr.esrf.Tango.DispLevel;
+import fr.esrf.TangoDs.Command;
+import fr.esrf.TangoDs.DeviceImpl;
+import fr.esrf.TangoDs.Except;
+import fr.esrf.TangoDs.TangoConst;
+import fr.esrf.TangoDs.Util;
+
+/**
+ * Class Description: Start an historical archiving for the specified
+ * attributes, and following the specified mode.
+ */
+
+public class ArchivingStartHdbCmd extends Command implements TangoConst {
+	// ===============================================================
+	/**
+	 * Constructor for Command class ArchivingStartHdbCmd
+	 * 
+	 * @param name
+	 *            command name
+	 * @param in
+	 *            argin type
+	 * @param out
+	 *            argout type
+	 */
+	// ===============================================================
+	public ArchivingStartHdbCmd(String name, int in, int out) {
+		super(name, in, out);
+	}
+
+	// ===============================================================
+	/**
+	 * Constructor for Command class ArchivingStartHdbCmd
+	 * 
+	 * @param name
+	 *            command name
+	 * @param in
+	 *            argin type
+	 * @param in_comments
+	 *            argin description
+	 * @param out
+	 *            argout type
+	 * @param out_comments
+	 *            argout description
+	 */
+	// ===============================================================
+	public ArchivingStartHdbCmd(String name, int in, int out, String in_comments, String out_comments) {
+		super(name, in, out, in_comments, out_comments);
+	}
+
+	// ===============================================================
+	/**
+	 * Constructor for Command class ArchivingStartHdbCmd
+	 * 
+	 * @param name
+	 *            command name
+	 * @param in
+	 *            argin type
+	 * @param in_comments
+	 *            argin description
+	 * @param out
+	 *            argout type
+	 * @param out_comments
+	 *            argout description
+	 * @param level
+	 *            The command display type OPERATOR or EXPERT
+	 */
+	// ===============================================================
+	public ArchivingStartHdbCmd(String name, int in, int out, String in_comments, String out_comments, DispLevel level) {
+		super(name, in, out, in_comments, out_comments, level);
+	}
+
+	// ===============================================================
+	/**
+	 * return the result of the device's command.
+	 */
+	// ===============================================================
+	@Override
+	public Any execute(DeviceImpl device, Any in_any) throws DevFailed {
+		Util.out2.println("ArchivingStartHdbCmd.execute(): arrived");
+		if (!(device instanceof ArchivingManager)) {
+			Except.throw_exception("DEVICE_ERROR", "Device parameter is not instance of ArchivingManager", "ArchivingManager");
+		}
+
+		String[] argin = extract_DevVarStringArray(in_any);
+		((ArchivingManager) (device)).archiving_start_hdb(argin);
+		return insert();
+	}
+
+	// ===============================================================
+	/**
+	 * Check if it is allowed to execute the command.
+	 */
+	// ===============================================================
+	@Override
+	public boolean is_allowed(DeviceImpl device, Any data_in) {
+		if (device.get_state() == DevState.INIT || device.get_state() == DevState.FAULT) {
+			// End of Generated Code
+
+			// Re-Start of Generated Code
+			return false;
+		}
+		return true;
+	}
+}
+
+// -----------------------------------------------------------------------------
+/*
+ * end of $Source:
+ * /cvsroot/tango-cs/tango/jserver/archiving/ArchivingManager/ArchivingStartHdbCmd
+ * .java,v $
+ */
diff --git a/src/main/java/ArchivingManager/ArchivingStartTdbCmd.java b/archivingmanager/src/main/java/ArchivingManager/ArchivingStartTdbCmd.java
similarity index 96%
rename from src/main/java/ArchivingManager/ArchivingStartTdbCmd.java
rename to archivingmanager/src/main/java/ArchivingManager/ArchivingStartTdbCmd.java
index 4cec0b043f5c002d585613c9e0eb4b4af0ab09d5..ddbe6574b010fd9d69924c9a792e014fe2a8d011 100644
--- a/src/main/java/ArchivingManager/ArchivingStartTdbCmd.java
+++ b/archivingmanager/src/main/java/ArchivingManager/ArchivingStartTdbCmd.java
@@ -1,166 +1,166 @@
-//+======================================================================
-// $Source: /cvsroot/tango-cs/tango/jserver/archiving/ArchivingManager/ArchivingStartTdbCmd.java,v $
-//
-// Project:      Tango Device Server
-//
-// Description:  Java source code for the command TemplateClass of the
-//               ArchivingManager class.
-//
-// $Author: chinkumo $
-//
-// $Revision: 1.4 $
-//
-// $Log: ArchivingStartTdbCmd.java,v $
-// Revision 1.4  2005/11/29 17:34:41  chinkumo
-// no message
-//
-// Revision 1.3.10.2  2005/11/29 16:14:07  chinkumo
-// Code reformated (pogo compatible)
-//
-// Revision 1.3.10.1  2005/11/15 13:46:24  chinkumo
-// ...
-//
-// Revision 1.3  2005/06/14 10:24:03  chinkumo
-// Branch (archivingManager_1_0_1-branch_0)  and HEAD merged.
-//
-// Revision 1.2.4.1  2005/06/13 14:29:28  chinkumo
-// The ArchivingManager device was regenerated in Tango V5.
-// This command was also modified. It now returns a void object.
-//
-// Revision 1.2  2005/01/28 13:11:14  taurel
-// Some changes in source files to be Pogo compatible
-//
-//
-// copyleft :    European Synchrotron Radiation Facility
-//               BP 220, Grenoble 38043
-//               FRANCE
-//
-//-======================================================================
-//
-//  		This file is generated by POGO
-//	(Program Obviously used to Generate tango Object)
-//
-//         (c) - Software Engineering Group - ESRF
-//=============================================================================
-
-/**
- * @author	$Author: chinkumo $
- * @version	$Revision: 1.4 $
- */
-package ArchivingManager;
-
-import org.omg.CORBA.Any;
-
-import fr.esrf.Tango.DevFailed;
-import fr.esrf.Tango.DevState;
-import fr.esrf.Tango.DispLevel;
-import fr.esrf.TangoDs.Command;
-import fr.esrf.TangoDs.DeviceImpl;
-import fr.esrf.TangoDs.Except;
-import fr.esrf.TangoDs.TangoConst;
-import fr.esrf.TangoDs.Util;
-
-/**
- * Class Description: Start an temporary archiving for the specified attributes,
- * and following the specified mode.
- */
-
-public class ArchivingStartTdbCmd extends Command implements TangoConst {
-	// ===============================================================
-	/**
-	 * Constructor for Command class ArchivingStartTdbCmd
-	 * 
-	 * @param name
-	 *            command name
-	 * @param in
-	 *            argin type
-	 * @param out
-	 *            argout type
-	 */
-	// ===============================================================
-	public ArchivingStartTdbCmd(String name, int in, int out) {
-		super(name, in, out);
-	}
-
-	// ===============================================================
-	/**
-	 * Constructor for Command class ArchivingStartTdbCmd
-	 * 
-	 * @param name
-	 *            command name
-	 * @param in
-	 *            argin type
-	 * @param in_comments
-	 *            argin description
-	 * @param out
-	 *            argout type
-	 * @param out_comments
-	 *            argout description
-	 */
-	// ===============================================================
-	public ArchivingStartTdbCmd(String name, int in, int out, String in_comments, String out_comments) {
-		super(name, in, out, in_comments, out_comments);
-	}
-
-	// ===============================================================
-	/**
-	 * Constructor for Command class ArchivingStartTdbCmd
-	 * 
-	 * @param name
-	 *            command name
-	 * @param in
-	 *            argin type
-	 * @param in_comments
-	 *            argin description
-	 * @param out
-	 *            argout type
-	 * @param out_comments
-	 *            argout description
-	 * @param level
-	 *            The command display type OPERATOR or EXPERT
-	 */
-	// ===============================================================
-	public ArchivingStartTdbCmd(String name, int in, int out, String in_comments, String out_comments, DispLevel level) {
-		super(name, in, out, in_comments, out_comments, level);
-	}
-
-	// ===============================================================
-	/**
-	 * return the result of the device's command.
-	 */
-	// ===============================================================
-	@Override
-	public Any execute(DeviceImpl device, Any in_any) throws DevFailed {
-		Util.out2.println("ArchivingStartTdbCmd.execute(): arrived");
-		if (!(device instanceof ArchivingManager)) {
-			Except.throw_exception("DEVICE_ERROR", "Device parameter is not instance of ArchivingManager", "ArchivingManager");
-		}
-
-		String[] argin = extract_DevVarStringArray(in_any);
-		((ArchivingManager) (device)).archiving_start_tdb(argin);
-		return insert();
-	}
-
-	// ===============================================================
-	/**
-	 * Check if it is allowed to execute the command.
-	 */
-	// ===============================================================
-	@Override
-	public boolean is_allowed(DeviceImpl device, Any data_in) {
-		if (device.get_state() == DevState.INIT || device.get_state() == DevState.FAULT) {
-			// End of Generated Code
-
-			// Re-Start of Generated Code
-			return false;
-		}
-		return true;
-	}
-}
-
-// -----------------------------------------------------------------------------
-/*
- * end of $Source:
- * /cvsroot/tango-cs/tango/jserver/archiving/ArchivingManager/ArchivingStartTdbCmd
- * .java,v $
- */
+//+======================================================================
+// $Source: /cvsroot/tango-cs/tango/jserver/archiving/ArchivingManager/ArchivingStartTdbCmd.java,v $
+//
+// Project:      Tango Device Server
+//
+// Description:  Java source code for the command TemplateClass of the
+//               ArchivingManager class.
+//
+// $Author: chinkumo $
+//
+// $Revision: 1.4 $
+//
+// $Log: ArchivingStartTdbCmd.java,v $
+// Revision 1.4  2005/11/29 17:34:41  chinkumo
+// no message
+//
+// Revision 1.3.10.2  2005/11/29 16:14:07  chinkumo
+// Code reformated (pogo compatible)
+//
+// Revision 1.3.10.1  2005/11/15 13:46:24  chinkumo
+// ...
+//
+// Revision 1.3  2005/06/14 10:24:03  chinkumo
+// Branch (archivingManager_1_0_1-branch_0)  and HEAD merged.
+//
+// Revision 1.2.4.1  2005/06/13 14:29:28  chinkumo
+// The ArchivingManager device was regenerated in Tango V5.
+// This command was also modified. It now returns a void object.
+//
+// Revision 1.2  2005/01/28 13:11:14  taurel
+// Some changes in source files to be Pogo compatible
+//
+//
+// copyleft :    European Synchrotron Radiation Facility
+//               BP 220, Grenoble 38043
+//               FRANCE
+//
+//-======================================================================
+//
+//  		This file is generated by POGO
+//	(Program Obviously used to Generate tango Object)
+//
+//         (c) - Software Engineering Group - ESRF
+//=============================================================================
+
+/**
+ * @author	$Author: chinkumo $
+ * @version	$Revision: 1.4 $
+ */
+package ArchivingManager;
+
+import org.omg.CORBA.Any;
+
+import fr.esrf.Tango.DevFailed;
+import fr.esrf.Tango.DevState;
+import fr.esrf.Tango.DispLevel;
+import fr.esrf.TangoDs.Command;
+import fr.esrf.TangoDs.DeviceImpl;
+import fr.esrf.TangoDs.Except;
+import fr.esrf.TangoDs.TangoConst;
+import fr.esrf.TangoDs.Util;
+
+/**
+ * Class Description: Start an temporary archiving for the specified attributes,
+ * and following the specified mode.
+ */
+
+public class ArchivingStartTdbCmd extends Command implements TangoConst {
+	// ===============================================================
+	/**
+	 * Constructor for Command class ArchivingStartTdbCmd
+	 * 
+	 * @param name
+	 *            command name
+	 * @param in
+	 *            argin type
+	 * @param out
+	 *            argout type
+	 */
+	// ===============================================================
+	public ArchivingStartTdbCmd(String name, int in, int out) {
+		super(name, in, out);
+	}
+
+	// ===============================================================
+	/**
+	 * Constructor for Command class ArchivingStartTdbCmd
+	 * 
+	 * @param name
+	 *            command name
+	 * @param in
+	 *            argin type
+	 * @param in_comments
+	 *            argin description
+	 * @param out
+	 *            argout type
+	 * @param out_comments
+	 *            argout description
+	 */
+	// ===============================================================
+	public ArchivingStartTdbCmd(String name, int in, int out, String in_comments, String out_comments) {
+		super(name, in, out, in_comments, out_comments);
+	}
+
+	// ===============================================================
+	/**
+	 * Constructor for Command class ArchivingStartTdbCmd
+	 * 
+	 * @param name
+	 *            command name
+	 * @param in
+	 *            argin type
+	 * @param in_comments
+	 *            argin description
+	 * @param out
+	 *            argout type
+	 * @param out_comments
+	 *            argout description
+	 * @param level
+	 *            The command display type OPERATOR or EXPERT
+	 */
+	// ===============================================================
+	public ArchivingStartTdbCmd(String name, int in, int out, String in_comments, String out_comments, DispLevel level) {
+		super(name, in, out, in_comments, out_comments, level);
+	}
+
+	// ===============================================================
+	/**
+	 * return the result of the device's command.
+	 */
+	// ===============================================================
+	@Override
+	public Any execute(DeviceImpl device, Any in_any) throws DevFailed {
+		Util.out2.println("ArchivingStartTdbCmd.execute(): arrived");
+		if (!(device instanceof ArchivingManager)) {
+			Except.throw_exception("DEVICE_ERROR", "Device parameter is not instance of ArchivingManager", "ArchivingManager");
+		}
+
+		String[] argin = extract_DevVarStringArray(in_any);
+		((ArchivingManager) (device)).archiving_start_tdb(argin);
+		return insert();
+	}
+
+	// ===============================================================
+	/**
+	 * Check if it is allowed to execute the command.
+	 */
+	// ===============================================================
+	@Override
+	public boolean is_allowed(DeviceImpl device, Any data_in) {
+		if (device.get_state() == DevState.INIT || device.get_state() == DevState.FAULT) {
+			// End of Generated Code
+
+			// Re-Start of Generated Code
+			return false;
+		}
+		return true;
+	}
+}
+
+// -----------------------------------------------------------------------------
+/*
+ * end of $Source:
+ * /cvsroot/tango-cs/tango/jserver/archiving/ArchivingManager/ArchivingStartTdbCmd
+ * .java,v $
+ */
diff --git a/src/main/java/ArchivingManager/ArchivingStopHdbCmd.java b/archivingmanager/src/main/java/ArchivingManager/ArchivingStopHdbCmd.java
similarity index 96%
rename from src/main/java/ArchivingManager/ArchivingStopHdbCmd.java
rename to archivingmanager/src/main/java/ArchivingManager/ArchivingStopHdbCmd.java
index 93236d60afb7df9dfe76dabbd74b69174cac8f48..2ad852859024896ce626487d2171f392c6592db7 100644
--- a/src/main/java/ArchivingManager/ArchivingStopHdbCmd.java
+++ b/archivingmanager/src/main/java/ArchivingManager/ArchivingStopHdbCmd.java
@@ -1,165 +1,165 @@
-//+======================================================================
-// $Source: /cvsroot/tango-cs/tango/jserver/archiving/ArchivingManager/ArchivingStopHdbCmd.java,v $
-//
-// Project:      Tango Device Server
-//
-// Description:  Java source code for the command TemplateClass of the
-//               ArchivingManager class.
-//
-// $Author: chinkumo $
-//
-// $Revision: 1.4 $
-//
-// $Log: ArchivingStopHdbCmd.java,v $
-// Revision 1.4  2005/11/29 17:34:41  chinkumo
-// no message
-//
-// Revision 1.3.10.2  2005/11/29 16:14:07  chinkumo
-// Code reformated (pogo compatible)
-//
-// Revision 1.3.10.1  2005/11/15 13:46:24  chinkumo
-// ...
-//
-// Revision 1.3  2005/06/14 10:24:03  chinkumo
-// Branch (archivingManager_1_0_1-branch_0)  and HEAD merged.
-//
-// Revision 1.2.4.1  2005/06/13 14:29:28  chinkumo
-// The ArchivingManager device was regenerated in Tango V5.
-// This command was also modified. It now returns a void object.
-//
-// Revision 1.2  2005/01/28 13:11:14  taurel
-// Some changes in source files to be Pogo compatible
-//
-//
-// copyleft :    European Synchrotron Radiation Facility
-//               BP 220, Grenoble 38043
-//               FRANCE
-//
-//-======================================================================
-//
-//  		This file is generated by POGO
-//	(Program Obviously used to Generate tango Object)
-//
-//         (c) - Software Engineering Group - ESRF
-//=============================================================================
-
-/**
- * @author	$Author: chinkumo $
- * @version	$Revision: 1.4 $
- */
-package ArchivingManager;
-
-import org.omg.CORBA.Any;
-
-import fr.esrf.Tango.DevFailed;
-import fr.esrf.Tango.DevState;
-import fr.esrf.Tango.DispLevel;
-import fr.esrf.TangoDs.Command;
-import fr.esrf.TangoDs.DeviceImpl;
-import fr.esrf.TangoDs.Except;
-import fr.esrf.TangoDs.TangoConst;
-import fr.esrf.TangoDs.Util;
-
-/**
- * Class Description: Stops the historical archiving for the given attributes.
- */
-
-public class ArchivingStopHdbCmd extends Command implements TangoConst {
-	// ===============================================================
-	/**
-	 * Constructor for Command class ArchivingStopHdbCmd
-	 * 
-	 * @param name
-	 *            command name
-	 * @param in
-	 *            argin type
-	 * @param out
-	 *            argout type
-	 */
-	// ===============================================================
-	public ArchivingStopHdbCmd(String name, int in, int out) {
-		super(name, in, out);
-	}
-
-	// ===============================================================
-	/**
-	 * Constructor for Command class ArchivingStopHdbCmd
-	 * 
-	 * @param name
-	 *            command name
-	 * @param in
-	 *            argin type
-	 * @param in_comments
-	 *            argin description
-	 * @param out
-	 *            argout type
-	 * @param out_comments
-	 *            argout description
-	 */
-	// ===============================================================
-	public ArchivingStopHdbCmd(String name, int in, int out, String in_comments, String out_comments) {
-		super(name, in, out, in_comments, out_comments);
-	}
-
-	// ===============================================================
-	/**
-	 * Constructor for Command class ArchivingStopHdbCmd
-	 * 
-	 * @param name
-	 *            command name
-	 * @param in
-	 *            argin type
-	 * @param in_comments
-	 *            argin description
-	 * @param out
-	 *            argout type
-	 * @param out_comments
-	 *            argout description
-	 * @param level
-	 *            The command display type OPERATOR or EXPERT
-	 */
-	// ===============================================================
-	public ArchivingStopHdbCmd(String name, int in, int out, String in_comments, String out_comments, DispLevel level) {
-		super(name, in, out, in_comments, out_comments, level);
-	}
-
-	// ===============================================================
-	/**
-	 * return the result of the device's command.
-	 */
-	// ===============================================================
-	@Override
-	public Any execute(DeviceImpl device, Any in_any) throws DevFailed {
-		Util.out2.println("ArchivingStopHdbCmd.execute(): arrived");
-		if (!(device instanceof ArchivingManager)) {
-			Except.throw_exception("DEVICE_ERROR", "Device parameter is not instance of ArchivingManager", "ArchivingManager");
-		}
-
-		String[] argin = extract_DevVarStringArray(in_any);
-		((ArchivingManager) (device)).archiving_stop_hdb(argin);
-		return insert();
-	}
-
-	// ===============================================================
-	/**
-	 * Check if it is allowed to execute the command.
-	 */
-	// ===============================================================
-	@Override
-	public boolean is_allowed(DeviceImpl device, Any data_in) {
-		if (device.get_state() == DevState.INIT || device.get_state() == DevState.FAULT) {
-			// End of Generated Code
-
-			// Re-Start of Generated Code
-			return false;
-		}
-		return true;
-	}
-}
-
-// -----------------------------------------------------------------------------
-/*
- * end of $Source:
- * /cvsroot/tango-cs/tango/jserver/archiving/ArchivingManager/ArchivingStopHdbCmd
- * .java,v $
- */
+//+======================================================================
+// $Source: /cvsroot/tango-cs/tango/jserver/archiving/ArchivingManager/ArchivingStopHdbCmd.java,v $
+//
+// Project:      Tango Device Server
+//
+// Description:  Java source code for the command TemplateClass of the
+//               ArchivingManager class.
+//
+// $Author: chinkumo $
+//
+// $Revision: 1.4 $
+//
+// $Log: ArchivingStopHdbCmd.java,v $
+// Revision 1.4  2005/11/29 17:34:41  chinkumo
+// no message
+//
+// Revision 1.3.10.2  2005/11/29 16:14:07  chinkumo
+// Code reformated (pogo compatible)
+//
+// Revision 1.3.10.1  2005/11/15 13:46:24  chinkumo
+// ...
+//
+// Revision 1.3  2005/06/14 10:24:03  chinkumo
+// Branch (archivingManager_1_0_1-branch_0)  and HEAD merged.
+//
+// Revision 1.2.4.1  2005/06/13 14:29:28  chinkumo
+// The ArchivingManager device was regenerated in Tango V5.
+// This command was also modified. It now returns a void object.
+//
+// Revision 1.2  2005/01/28 13:11:14  taurel
+// Some changes in source files to be Pogo compatible
+//
+//
+// copyleft :    European Synchrotron Radiation Facility
+//               BP 220, Grenoble 38043
+//               FRANCE
+//
+//-======================================================================
+//
+//  		This file is generated by POGO
+//	(Program Obviously used to Generate tango Object)
+//
+//         (c) - Software Engineering Group - ESRF
+//=============================================================================
+
+/**
+ * @author	$Author: chinkumo $
+ * @version	$Revision: 1.4 $
+ */
+package ArchivingManager;
+
+import org.omg.CORBA.Any;
+
+import fr.esrf.Tango.DevFailed;
+import fr.esrf.Tango.DevState;
+import fr.esrf.Tango.DispLevel;
+import fr.esrf.TangoDs.Command;
+import fr.esrf.TangoDs.DeviceImpl;
+import fr.esrf.TangoDs.Except;
+import fr.esrf.TangoDs.TangoConst;
+import fr.esrf.TangoDs.Util;
+
+/**
+ * Class Description: Stops the historical archiving for the given attributes.
+ */
+
+public class ArchivingStopHdbCmd extends Command implements TangoConst {
+	// ===============================================================
+	/**
+	 * Constructor for Command class ArchivingStopHdbCmd
+	 * 
+	 * @param name
+	 *            command name
+	 * @param in
+	 *            argin type
+	 * @param out
+	 *            argout type
+	 */
+	// ===============================================================
+	public ArchivingStopHdbCmd(String name, int in, int out) {
+		super(name, in, out);
+	}
+
+	// ===============================================================
+	/**
+	 * Constructor for Command class ArchivingStopHdbCmd
+	 * 
+	 * @param name
+	 *            command name
+	 * @param in
+	 *            argin type
+	 * @param in_comments
+	 *            argin description
+	 * @param out
+	 *            argout type
+	 * @param out_comments
+	 *            argout description
+	 */
+	// ===============================================================
+	public ArchivingStopHdbCmd(String name, int in, int out, String in_comments, String out_comments) {
+		super(name, in, out, in_comments, out_comments);
+	}
+
+	// ===============================================================
+	/**
+	 * Constructor for Command class ArchivingStopHdbCmd
+	 * 
+	 * @param name
+	 *            command name
+	 * @param in
+	 *            argin type
+	 * @param in_comments
+	 *            argin description
+	 * @param out
+	 *            argout type
+	 * @param out_comments
+	 *            argout description
+	 * @param level
+	 *            The command display type OPERATOR or EXPERT
+	 */
+	// ===============================================================
+	public ArchivingStopHdbCmd(String name, int in, int out, String in_comments, String out_comments, DispLevel level) {
+		super(name, in, out, in_comments, out_comments, level);
+	}
+
+	// ===============================================================
+	/**
+	 * return the result of the device's command.
+	 */
+	// ===============================================================
+	@Override
+	public Any execute(DeviceImpl device, Any in_any) throws DevFailed {
+		Util.out2.println("ArchivingStopHdbCmd.execute(): arrived");
+		if (!(device instanceof ArchivingManager)) {
+			Except.throw_exception("DEVICE_ERROR", "Device parameter is not instance of ArchivingManager", "ArchivingManager");
+		}
+
+		String[] argin = extract_DevVarStringArray(in_any);
+		((ArchivingManager) (device)).archiving_stop_hdb(argin);
+		return insert();
+	}
+
+	// ===============================================================
+	/**
+	 * Check if it is allowed to execute the command.
+	 */
+	// ===============================================================
+	@Override
+	public boolean is_allowed(DeviceImpl device, Any data_in) {
+		if (device.get_state() == DevState.INIT || device.get_state() == DevState.FAULT) {
+			// End of Generated Code
+
+			// Re-Start of Generated Code
+			return false;
+		}
+		return true;
+	}
+}
+
+// -----------------------------------------------------------------------------
+/*
+ * end of $Source:
+ * /cvsroot/tango-cs/tango/jserver/archiving/ArchivingManager/ArchivingStopHdbCmd
+ * .java,v $
+ */
diff --git a/src/main/java/ArchivingManager/ArchivingStopTdbCmd.java b/archivingmanager/src/main/java/ArchivingManager/ArchivingStopTdbCmd.java
similarity index 96%
rename from src/main/java/ArchivingManager/ArchivingStopTdbCmd.java
rename to archivingmanager/src/main/java/ArchivingManager/ArchivingStopTdbCmd.java
index 5c61f7f3cd73e899abe63d4213659892b8de0645..fb5f8bf2c0ed9dc2b950526bbfaedaae8963d1f3 100644
--- a/src/main/java/ArchivingManager/ArchivingStopTdbCmd.java
+++ b/archivingmanager/src/main/java/ArchivingManager/ArchivingStopTdbCmd.java
@@ -1,166 +1,166 @@
-//+======================================================================
-// $Source: /cvsroot/tango-cs/tango/jserver/archiving/ArchivingManager/ArchivingStopTdbCmd.java,v $
-//
-// Project:      Tango Device Server
-//
-// Description:  Java source code for the command TemplateClass of the
-//               ArchivingManager class.
-//
-// $Author: chinkumo $
-//
-// $Revision: 1.4 $
-//
-// $Log: ArchivingStopTdbCmd.java,v $
-// Revision 1.4  2005/11/29 17:34:41  chinkumo
-// no message
-//
-// Revision 1.3.10.2  2005/11/29 16:14:07  chinkumo
-// Code reformated (pogo compatible)
-//
-// Revision 1.3.10.1  2005/11/15 13:46:24  chinkumo
-// ...
-//
-// Revision 1.3  2005/06/14 10:24:03  chinkumo
-// Branch (archivingManager_1_0_1-branch_0)  and HEAD merged.
-//
-// Revision 1.2.4.1  2005/06/13 14:29:28  chinkumo
-// The ArchivingManager device was regenerated in Tango V5.
-// This command was also modified. It now returns a void object.
-//
-// Revision 1.2  2005/01/28 13:11:14  taurel
-// Some changes in source files to be Pogo compatible
-//
-//
-// copyleft :    European Synchrotron Radiation Facility
-//               BP 220, Grenoble 38043
-//               FRANCE
-//
-//-======================================================================
-//
-//  		This file is generated by POGO
-//	(Program Obviously used to Generate tango Object)
-//
-//         (c) - Software Engineering Group - ESRF
-//=============================================================================
-
-/**
- * @author	$Author: chinkumo $
- * @version	$Revision: 1.4 $
- */
-package ArchivingManager;
-
-import org.omg.CORBA.Any;
-
-import fr.esrf.Tango.DevFailed;
-import fr.esrf.Tango.DevState;
-import fr.esrf.Tango.DispLevel;
-import fr.esrf.TangoDs.Command;
-import fr.esrf.TangoDs.DeviceImpl;
-import fr.esrf.TangoDs.Except;
-import fr.esrf.TangoDs.TangoConst;
-import fr.esrf.TangoDs.Util;
-
-/**
- * Class Description: Stops the temporary archiving for the given attributes.
- */
-
-public class ArchivingStopTdbCmd extends Command implements TangoConst {
-	// ===============================================================
-	/**
-	 * Constructor for Command class ArchivingStopTdbCmd
-	 * 
-	 * @param name
-	 *            command name
-	 * @param in
-	 *            argin type
-	 * @param out
-	 *            argout type
-	 */
-	// ===============================================================
-	public ArchivingStopTdbCmd(String name, int in, int out) {
-		super(name, in, out);
-	}
-
-	// ===============================================================
-	/**
-	 * Constructor for Command class ArchivingStopTdbCmd
-	 * 
-	 * @param name
-	 *            command name
-	 * @param in
-	 *            argin type
-	 * @param in_comments
-	 *            argin description
-	 * @param out
-	 *            argout type
-	 * @param out_comments
-	 *            argout description
-	 */
-	// ===============================================================
-	public ArchivingStopTdbCmd(String name, int in, int out, String in_comments, String out_comments) {
-		super(name, in, out, in_comments, out_comments);
-	}
-
-	// ===============================================================
-	/**
-	 * Constructor for Command class ArchivingStopTdbCmd
-	 * 
-	 * @param name
-	 *            command name
-	 * @param in
-	 *            argin type
-	 * @param in_comments
-	 *            argin description
-	 * @param out
-	 *            argout type
-	 * @param out_comments
-	 *            argout description
-	 * @param level
-	 *            The command display type OPERATOR or EXPERT
-	 */
-	// ===============================================================
-	public ArchivingStopTdbCmd(String name, int in, int out, String in_comments, String out_comments, DispLevel level) {
-		super(name, in, out, in_comments, out_comments, level);
-	}
-
-	// ===============================================================
-	/**
-	 * return the result of the device's command.
-	 */
-	// ===============================================================
-	@Override
-	public Any execute(DeviceImpl device, Any in_any) throws DevFailed {
-		Util.out2.println("ArchivingStopTdbCmd.execute(): arrived");
-
-		if (!(device instanceof ArchivingManager)) {
-			Except.throw_exception("DEVICE_ERROR", "Device parameter is not instance of ArchivingManager", "ArchivingManager");
-		}
-
-		String[] argin = extract_DevVarStringArray(in_any);
-		((ArchivingManager) (device)).archiving_stop_tdb(argin);
-		return insert();
-	}
-
-	// ===============================================================
-	/**
-	 * Check if it is allowed to execute the command.
-	 */
-	// ===============================================================
-	@Override
-	public boolean is_allowed(DeviceImpl device, Any data_in) {
-		if (device.get_state() == DevState.INIT || device.get_state() == DevState.FAULT) {
-			// End of Generated Code
-
-			// Re-Start of Generated Code
-			return false;
-		}
-		return true;
-	}
-}
-
-// -----------------------------------------------------------------------------
-/*
- * end of $Source:
- * /cvsroot/tango-cs/tango/jserver/archiving/ArchivingManager/ArchivingStopTdbCmd
- * .java,v $
- */
+//+======================================================================
+// $Source: /cvsroot/tango-cs/tango/jserver/archiving/ArchivingManager/ArchivingStopTdbCmd.java,v $
+//
+// Project:      Tango Device Server
+//
+// Description:  Java source code for the command TemplateClass of the
+//               ArchivingManager class.
+//
+// $Author: chinkumo $
+//
+// $Revision: 1.4 $
+//
+// $Log: ArchivingStopTdbCmd.java,v $
+// Revision 1.4  2005/11/29 17:34:41  chinkumo
+// no message
+//
+// Revision 1.3.10.2  2005/11/29 16:14:07  chinkumo
+// Code reformated (pogo compatible)
+//
+// Revision 1.3.10.1  2005/11/15 13:46:24  chinkumo
+// ...
+//
+// Revision 1.3  2005/06/14 10:24:03  chinkumo
+// Branch (archivingManager_1_0_1-branch_0)  and HEAD merged.
+//
+// Revision 1.2.4.1  2005/06/13 14:29:28  chinkumo
+// The ArchivingManager device was regenerated in Tango V5.
+// This command was also modified. It now returns a void object.
+//
+// Revision 1.2  2005/01/28 13:11:14  taurel
+// Some changes in source files to be Pogo compatible
+//
+//
+// copyleft :    European Synchrotron Radiation Facility
+//               BP 220, Grenoble 38043
+//               FRANCE
+//
+//-======================================================================
+//
+//  		This file is generated by POGO
+//	(Program Obviously used to Generate tango Object)
+//
+//         (c) - Software Engineering Group - ESRF
+//=============================================================================
+
+/**
+ * @author	$Author: chinkumo $
+ * @version	$Revision: 1.4 $
+ */
+package ArchivingManager;
+
+import org.omg.CORBA.Any;
+
+import fr.esrf.Tango.DevFailed;
+import fr.esrf.Tango.DevState;
+import fr.esrf.Tango.DispLevel;
+import fr.esrf.TangoDs.Command;
+import fr.esrf.TangoDs.DeviceImpl;
+import fr.esrf.TangoDs.Except;
+import fr.esrf.TangoDs.TangoConst;
+import fr.esrf.TangoDs.Util;
+
+/**
+ * Class Description: Stops the temporary archiving for the given attributes.
+ */
+
+public class ArchivingStopTdbCmd extends Command implements TangoConst {
+	// ===============================================================
+	/**
+	 * Constructor for Command class ArchivingStopTdbCmd
+	 * 
+	 * @param name
+	 *            command name
+	 * @param in
+	 *            argin type
+	 * @param out
+	 *            argout type
+	 */
+	// ===============================================================
+	public ArchivingStopTdbCmd(String name, int in, int out) {
+		super(name, in, out);
+	}
+
+	// ===============================================================
+	/**
+	 * Constructor for Command class ArchivingStopTdbCmd
+	 * 
+	 * @param name
+	 *            command name
+	 * @param in
+	 *            argin type
+	 * @param in_comments
+	 *            argin description
+	 * @param out
+	 *            argout type
+	 * @param out_comments
+	 *            argout description
+	 */
+	// ===============================================================
+	public ArchivingStopTdbCmd(String name, int in, int out, String in_comments, String out_comments) {
+		super(name, in, out, in_comments, out_comments);
+	}
+
+	// ===============================================================
+	/**
+	 * Constructor for Command class ArchivingStopTdbCmd
+	 * 
+	 * @param name
+	 *            command name
+	 * @param in
+	 *            argin type
+	 * @param in_comments
+	 *            argin description
+	 * @param out
+	 *            argout type
+	 * @param out_comments
+	 *            argout description
+	 * @param level
+	 *            The command display type OPERATOR or EXPERT
+	 */
+	// ===============================================================
+	public ArchivingStopTdbCmd(String name, int in, int out, String in_comments, String out_comments, DispLevel level) {
+		super(name, in, out, in_comments, out_comments, level);
+	}
+
+	// ===============================================================
+	/**
+	 * return the result of the device's command.
+	 */
+	// ===============================================================
+	@Override
+	public Any execute(DeviceImpl device, Any in_any) throws DevFailed {
+		Util.out2.println("ArchivingStopTdbCmd.execute(): arrived");
+
+		if (!(device instanceof ArchivingManager)) {
+			Except.throw_exception("DEVICE_ERROR", "Device parameter is not instance of ArchivingManager", "ArchivingManager");
+		}
+
+		String[] argin = extract_DevVarStringArray(in_any);
+		((ArchivingManager) (device)).archiving_stop_tdb(argin);
+		return insert();
+	}
+
+	// ===============================================================
+	/**
+	 * Check if it is allowed to execute the command.
+	 */
+	// ===============================================================
+	@Override
+	public boolean is_allowed(DeviceImpl device, Any data_in) {
+		if (device.get_state() == DevState.INIT || device.get_state() == DevState.FAULT) {
+			// End of Generated Code
+
+			// Re-Start of Generated Code
+			return false;
+		}
+		return true;
+	}
+}
+
+// -----------------------------------------------------------------------------
+/*
+ * end of $Source:
+ * /cvsroot/tango-cs/tango/jserver/archiving/ArchivingManager/ArchivingStopTdbCmd
+ * .java,v $
+ */
diff --git a/src/main/java/ArchivingManager/GetArchivingModeHdbCmd.java b/archivingmanager/src/main/java/ArchivingManager/GetArchivingModeHdbCmd.java
similarity index 96%
rename from src/main/java/ArchivingManager/GetArchivingModeHdbCmd.java
rename to archivingmanager/src/main/java/ArchivingManager/GetArchivingModeHdbCmd.java
index 6ade7e613c14771ae92d80e4d96d4ddeb30b50f9..993f0c8af4403187ccf50c8e69fa7ba7cd34dfd6 100644
--- a/src/main/java/ArchivingManager/GetArchivingModeHdbCmd.java
+++ b/archivingmanager/src/main/java/ArchivingManager/GetArchivingModeHdbCmd.java
@@ -1,165 +1,165 @@
-//+======================================================================
-// $Source: /cvsroot/tango-cs/tango/jserver/archiving/ArchivingManager/GetArchivingModeHdbCmd.java,v $
-//
-// Project:      Tango Device Server
-//
-// Description:  Java source code for the command TemplateClass of the
-//               ArchivingManager class.
-//
-// $Author: chinkumo $
-//
-// $Revision: 1.4 $
-//
-// $Log: GetArchivingModeHdbCmd.java,v $
-// Revision 1.4  2005/11/29 17:34:41  chinkumo
-// no message
-//
-// Revision 1.3.10.2  2005/11/29 16:14:07  chinkumo
-// Code reformated (pogo compatible)
-//
-// Revision 1.3.10.1  2005/11/15 13:46:24  chinkumo
-// ...
-//
-// Revision 1.3  2005/06/14 10:24:03  chinkumo
-// Branch (archivingManager_1_0_1-branch_0)  and HEAD merged.
-//
-// Revision 1.2.4.1  2005/06/13 14:27:26  chinkumo
-// The ArchivingManager device was regenerated in Tango V5.
-//
-// Revision 1.2  2005/01/28 13:11:14  taurel
-// Some changes in source files to be Pogo compatible
-//
-//
-// copyleft :    European Synchrotron Radiation Facility
-//               BP 220, Grenoble 38043
-//               FRANCE
-//
-//-======================================================================
-//
-//  		This file is generated by POGO
-//	(Program Obviously used to Generate tango Object)
-//
-//         (c) - Software Engineering Group - ESRF
-//=============================================================================
-
-/**
- * @author	$Author: chinkumo $
- * @version	$Revision: 1.4 $
- */
-package ArchivingManager;
-
-import org.omg.CORBA.Any;
-
-import fr.esrf.Tango.DevFailed;
-import fr.esrf.Tango.DevState;
-import fr.esrf.Tango.DispLevel;
-import fr.esrf.TangoDs.Command;
-import fr.esrf.TangoDs.DeviceImpl;
-import fr.esrf.TangoDs.Except;
-import fr.esrf.TangoDs.TangoConst;
-import fr.esrf.TangoDs.Util;
-
-/**
- * Class Description: Return the historical archiving mode applied to an
- * attribute.
- */
-
-public class GetArchivingModeHdbCmd extends Command implements TangoConst {
-	// ===============================================================
-	/**
-	 * Constructor for Command class GetArchivingModeHdbCmd
-	 * 
-	 * @param name
-	 *            command name
-	 * @param in
-	 *            argin type
-	 * @param out
-	 *            argout type
-	 */
-	// ===============================================================
-	public GetArchivingModeHdbCmd(String name, int in, int out) {
-		super(name, in, out);
-	}
-
-	// ===============================================================
-	/**
-	 * Constructor for Command class GetArchivingModeHdbCmd
-	 * 
-	 * @param name
-	 *            command name
-	 * @param in
-	 *            argin type
-	 * @param in_comments
-	 *            argin description
-	 * @param out
-	 *            argout type
-	 * @param out_comments
-	 *            argout description
-	 */
-	// ===============================================================
-	public GetArchivingModeHdbCmd(String name, int in, int out, String in_comments, String out_comments) {
-		super(name, in, out, in_comments, out_comments);
-	}
-
-	// ===============================================================
-	/**
-	 * Constructor for Command class GetArchivingModeHdbCmd
-	 * 
-	 * @param name
-	 *            command name
-	 * @param in
-	 *            argin type
-	 * @param in_comments
-	 *            argin description
-	 * @param out
-	 *            argout type
-	 * @param out_comments
-	 *            argout description
-	 * @param level
-	 *            The command display type OPERATOR or EXPERT
-	 */
-	// ===============================================================
-	public GetArchivingModeHdbCmd(String name, int in, int out, String in_comments, String out_comments, DispLevel level) {
-		super(name, in, out, in_comments, out_comments, level);
-	}
-
-	// ===============================================================
-	/**
-	 * return the result of the device's command.
-	 */
-	// ===============================================================
-	@Override
-	public Any execute(DeviceImpl device, Any in_any) throws DevFailed {
-		Util.out2.println("GetArchivingModeHdbCmd.execute(): arrived");
-
-		if (!(device instanceof ArchivingManager)) {
-			Except.throw_exception("DEVICE_ERROR", "Device parameter is not instance of ArchivingManager", "ArchivingManager");
-		}
-
-		String argin = extract_DevString(in_any);
-		return insert(((ArchivingManager) (device)).get_archiving_mode_hdb(argin));
-	}
-
-	// ===============================================================
-	/**
-	 * Check if it is allowed to execute the command.
-	 */
-	// ===============================================================
-	@Override
-	public boolean is_allowed(DeviceImpl device, Any data_in) {
-		if (device.get_state() == DevState.INIT || device.get_state() == DevState.FAULT) {
-			// End of Generated Code
-
-			// Re-Start of Generated Code
-			return false;
-		}
-		return true;
-	}
-}
-
-// -----------------------------------------------------------------------------
-/*
- * end of $Source:
- * /cvsroot/tango-cs/tango/jserver/archiving/ArchivingManager/GetArchivingModeHdbCmd
- * .java,v $
- */
+//+======================================================================
+// $Source: /cvsroot/tango-cs/tango/jserver/archiving/ArchivingManager/GetArchivingModeHdbCmd.java,v $
+//
+// Project:      Tango Device Server
+//
+// Description:  Java source code for the command TemplateClass of the
+//               ArchivingManager class.
+//
+// $Author: chinkumo $
+//
+// $Revision: 1.4 $
+//
+// $Log: GetArchivingModeHdbCmd.java,v $
+// Revision 1.4  2005/11/29 17:34:41  chinkumo
+// no message
+//
+// Revision 1.3.10.2  2005/11/29 16:14:07  chinkumo
+// Code reformated (pogo compatible)
+//
+// Revision 1.3.10.1  2005/11/15 13:46:24  chinkumo
+// ...
+//
+// Revision 1.3  2005/06/14 10:24:03  chinkumo
+// Branch (archivingManager_1_0_1-branch_0)  and HEAD merged.
+//
+// Revision 1.2.4.1  2005/06/13 14:27:26  chinkumo
+// The ArchivingManager device was regenerated in Tango V5.
+//
+// Revision 1.2  2005/01/28 13:11:14  taurel
+// Some changes in source files to be Pogo compatible
+//
+//
+// copyleft :    European Synchrotron Radiation Facility
+//               BP 220, Grenoble 38043
+//               FRANCE
+//
+//-======================================================================
+//
+//  		This file is generated by POGO
+//	(Program Obviously used to Generate tango Object)
+//
+//         (c) - Software Engineering Group - ESRF
+//=============================================================================
+
+/**
+ * @author	$Author: chinkumo $
+ * @version	$Revision: 1.4 $
+ */
+package ArchivingManager;
+
+import org.omg.CORBA.Any;
+
+import fr.esrf.Tango.DevFailed;
+import fr.esrf.Tango.DevState;
+import fr.esrf.Tango.DispLevel;
+import fr.esrf.TangoDs.Command;
+import fr.esrf.TangoDs.DeviceImpl;
+import fr.esrf.TangoDs.Except;
+import fr.esrf.TangoDs.TangoConst;
+import fr.esrf.TangoDs.Util;
+
+/**
+ * Class Description: Return the historical archiving mode applied to an
+ * attribute.
+ */
+
+public class GetArchivingModeHdbCmd extends Command implements TangoConst {
+	// ===============================================================
+	/**
+	 * Constructor for Command class GetArchivingModeHdbCmd
+	 * 
+	 * @param name
+	 *            command name
+	 * @param in
+	 *            argin type
+	 * @param out
+	 *            argout type
+	 */
+	// ===============================================================
+	public GetArchivingModeHdbCmd(String name, int in, int out) {
+		super(name, in, out);
+	}
+
+	// ===============================================================
+	/**
+	 * Constructor for Command class GetArchivingModeHdbCmd
+	 * 
+	 * @param name
+	 *            command name
+	 * @param in
+	 *            argin type
+	 * @param in_comments
+	 *            argin description
+	 * @param out
+	 *            argout type
+	 * @param out_comments
+	 *            argout description
+	 */
+	// ===============================================================
+	public GetArchivingModeHdbCmd(String name, int in, int out, String in_comments, String out_comments) {
+		super(name, in, out, in_comments, out_comments);
+	}
+
+	// ===============================================================
+	/**
+	 * Constructor for Command class GetArchivingModeHdbCmd
+	 * 
+	 * @param name
+	 *            command name
+	 * @param in
+	 *            argin type
+	 * @param in_comments
+	 *            argin description
+	 * @param out
+	 *            argout type
+	 * @param out_comments
+	 *            argout description
+	 * @param level
+	 *            The command display type OPERATOR or EXPERT
+	 */
+	// ===============================================================
+	public GetArchivingModeHdbCmd(String name, int in, int out, String in_comments, String out_comments, DispLevel level) {
+		super(name, in, out, in_comments, out_comments, level);
+	}
+
+	// ===============================================================
+	/**
+	 * return the result of the device's command.
+	 */
+	// ===============================================================
+	@Override
+	public Any execute(DeviceImpl device, Any in_any) throws DevFailed {
+		Util.out2.println("GetArchivingModeHdbCmd.execute(): arrived");
+
+		if (!(device instanceof ArchivingManager)) {
+			Except.throw_exception("DEVICE_ERROR", "Device parameter is not instance of ArchivingManager", "ArchivingManager");
+		}
+
+		String argin = extract_DevString(in_any);
+		return insert(((ArchivingManager) (device)).get_archiving_mode_hdb(argin));
+	}
+
+	// ===============================================================
+	/**
+	 * Check if it is allowed to execute the command.
+	 */
+	// ===============================================================
+	@Override
+	public boolean is_allowed(DeviceImpl device, Any data_in) {
+		if (device.get_state() == DevState.INIT || device.get_state() == DevState.FAULT) {
+			// End of Generated Code
+
+			// Re-Start of Generated Code
+			return false;
+		}
+		return true;
+	}
+}
+
+// -----------------------------------------------------------------------------
+/*
+ * end of $Source:
+ * /cvsroot/tango-cs/tango/jserver/archiving/ArchivingManager/GetArchivingModeHdbCmd
+ * .java,v $
+ */
diff --git a/src/main/java/ArchivingManager/GetArchivingModeTdbCmd.java b/archivingmanager/src/main/java/ArchivingManager/GetArchivingModeTdbCmd.java
similarity index 96%
rename from src/main/java/ArchivingManager/GetArchivingModeTdbCmd.java
rename to archivingmanager/src/main/java/ArchivingManager/GetArchivingModeTdbCmd.java
index 0d1f0c6672bdb55784f995b4b7ef9a2b1979c03c..a3485c66fcfe96b783dc9406ec6d2c2c988af984 100644
--- a/src/main/java/ArchivingManager/GetArchivingModeTdbCmd.java
+++ b/archivingmanager/src/main/java/ArchivingManager/GetArchivingModeTdbCmd.java
@@ -1,164 +1,164 @@
-//+======================================================================
-// $Source: /cvsroot/tango-cs/tango/jserver/archiving/ArchivingManager/GetArchivingModeTdbCmd.java,v $
-//
-// Project:      Tango Device Server
-//
-// Description:  Java source code for the command TemplateClass of the
-//               ArchivingManager class.
-//
-// $Author: chinkumo $
-//
-// $Revision: 1.4 $
-//
-// $Log: GetArchivingModeTdbCmd.java,v $
-// Revision 1.4  2005/11/29 17:34:41  chinkumo
-// no message
-//
-// Revision 1.3.10.2  2005/11/29 16:14:07  chinkumo
-// Code reformated (pogo compatible)
-//
-// Revision 1.3.10.1  2005/11/15 13:46:24  chinkumo
-// ...
-//
-// Revision 1.3  2005/06/14 10:24:03  chinkumo
-// Branch (archivingManager_1_0_1-branch_0)  and HEAD merged.
-//
-// Revision 1.2.4.1  2005/06/13 14:27:26  chinkumo
-// The ArchivingManager device was regenerated in Tango V5.
-//
-// Revision 1.2  2005/01/28 13:11:14  taurel
-// Some changes in source files to be Pogo compatible
-//
-//
-// copyleft :    European Synchrotron Radiation Facility
-//               BP 220, Grenoble 38043
-//               FRANCE
-//
-//-======================================================================
-//
-//  		This file is generated by POGO
-//	(Program Obviously used to Generate tango Object)
-//
-//         (c) - Software Engineering Group - ESRF
-//=============================================================================
-
-/**
- * @author	$Author: chinkumo $
- * @version	$Revision: 1.4 $
- */
-package ArchivingManager;
-
-import org.omg.CORBA.Any;
-
-import fr.esrf.Tango.DevFailed;
-import fr.esrf.Tango.DevState;
-import fr.esrf.Tango.DispLevel;
-import fr.esrf.TangoDs.Command;
-import fr.esrf.TangoDs.DeviceImpl;
-import fr.esrf.TangoDs.Except;
-import fr.esrf.TangoDs.TangoConst;
-import fr.esrf.TangoDs.Util;
-
-/**
- * Class Description: Return the temporary archiving mode applied to an
- * attribute.
- */
-
-public class GetArchivingModeTdbCmd extends Command implements TangoConst {
-	// ===============================================================
-	/**
-	 * Constructor for Command class GetArchivingModeTdbCmd
-	 * 
-	 * @param name
-	 *            command name
-	 * @param in
-	 *            argin type
-	 * @param out
-	 *            argout type
-	 */
-	// ===============================================================
-	public GetArchivingModeTdbCmd(String name, int in, int out) {
-		super(name, in, out);
-	}
-
-	// ===============================================================
-	/**
-	 * Constructor for Command class GetArchivingModeTdbCmd
-	 * 
-	 * @param name
-	 *            command name
-	 * @param in
-	 *            argin type
-	 * @param in_comments
-	 *            argin description
-	 * @param out
-	 *            argout type
-	 * @param out_comments
-	 *            argout description
-	 */
-	// ===============================================================
-	public GetArchivingModeTdbCmd(String name, int in, int out, String in_comments, String out_comments) {
-		super(name, in, out, in_comments, out_comments);
-	}
-
-	// ===============================================================
-	/**
-	 * Constructor for Command class GetArchivingModeTdbCmd
-	 * 
-	 * @param name
-	 *            command name
-	 * @param in
-	 *            argin type
-	 * @param in_comments
-	 *            argin description
-	 * @param out
-	 *            argout type
-	 * @param out_comments
-	 *            argout description
-	 * @param level
-	 *            The command display type OPERATOR or EXPERT
-	 */
-	// ===============================================================
-	public GetArchivingModeTdbCmd(String name, int in, int out, String in_comments, String out_comments, DispLevel level) {
-		super(name, in, out, in_comments, out_comments, level);
-	}
-
-	// ===============================================================
-	/**
-	 * return the result of the device's command.
-	 */
-	// ===============================================================
-	@Override
-	public Any execute(DeviceImpl device, Any in_any) throws DevFailed {
-		Util.out2.println("GetArchivingModeTdbCmd.execute(): arrived");
-		if (!(device instanceof ArchivingManager)) {
-			Except.throw_exception("DEVICE_ERROR", "Device parameter is not instance of ArchivingManager", "ArchivingManager");
-		}
-
-		String argin = extract_DevString(in_any);
-		return insert(((ArchivingManager) (device)).get_archiving_mode_tdb(argin));
-	}
-
-	// ===============================================================
-	/**
-	 * Check if it is allowed to execute the command.
-	 */
-	// ===============================================================
-	@Override
-	public boolean is_allowed(DeviceImpl device, Any data_in) {
-		if (device.get_state() == DevState.INIT || device.get_state() == DevState.FAULT) {
-			// End of Generated Code
-
-			// Re-Start of Generated Code
-			return false;
-		}
-		return true;
-	}
-}
-
-// -----------------------------------------------------------------------------
-/*
- * end of $Source:
- * /cvsroot/tango-cs/tango/jserver/archiving/ArchivingManager/GetArchivingModeTdbCmd
- * .java,v $
- */
+//+======================================================================
+// $Source: /cvsroot/tango-cs/tango/jserver/archiving/ArchivingManager/GetArchivingModeTdbCmd.java,v $
+//
+// Project:      Tango Device Server
+//
+// Description:  Java source code for the command TemplateClass of the
+//               ArchivingManager class.
+//
+// $Author: chinkumo $
+//
+// $Revision: 1.4 $
+//
+// $Log: GetArchivingModeTdbCmd.java,v $
+// Revision 1.4  2005/11/29 17:34:41  chinkumo
+// no message
+//
+// Revision 1.3.10.2  2005/11/29 16:14:07  chinkumo
+// Code reformated (pogo compatible)
+//
+// Revision 1.3.10.1  2005/11/15 13:46:24  chinkumo
+// ...
+//
+// Revision 1.3  2005/06/14 10:24:03  chinkumo
+// Branch (archivingManager_1_0_1-branch_0)  and HEAD merged.
+//
+// Revision 1.2.4.1  2005/06/13 14:27:26  chinkumo
+// The ArchivingManager device was regenerated in Tango V5.
+//
+// Revision 1.2  2005/01/28 13:11:14  taurel
+// Some changes in source files to be Pogo compatible
+//
+//
+// copyleft :    European Synchrotron Radiation Facility
+//               BP 220, Grenoble 38043
+//               FRANCE
+//
+//-======================================================================
+//
+//  		This file is generated by POGO
+//	(Program Obviously used to Generate tango Object)
+//
+//         (c) - Software Engineering Group - ESRF
+//=============================================================================
+
+/**
+ * @author	$Author: chinkumo $
+ * @version	$Revision: 1.4 $
+ */
+package ArchivingManager;
+
+import org.omg.CORBA.Any;
+
+import fr.esrf.Tango.DevFailed;
+import fr.esrf.Tango.DevState;
+import fr.esrf.Tango.DispLevel;
+import fr.esrf.TangoDs.Command;
+import fr.esrf.TangoDs.DeviceImpl;
+import fr.esrf.TangoDs.Except;
+import fr.esrf.TangoDs.TangoConst;
+import fr.esrf.TangoDs.Util;
+
+/**
+ * Class Description: Return the temporary archiving mode applied to an
+ * attribute.
+ */
+
+public class GetArchivingModeTdbCmd extends Command implements TangoConst {
+	// ===============================================================
+	/**
+	 * Constructor for Command class GetArchivingModeTdbCmd
+	 * 
+	 * @param name
+	 *            command name
+	 * @param in
+	 *            argin type
+	 * @param out
+	 *            argout type
+	 */
+	// ===============================================================
+	public GetArchivingModeTdbCmd(String name, int in, int out) {
+		super(name, in, out);
+	}
+
+	// ===============================================================
+	/**
+	 * Constructor for Command class GetArchivingModeTdbCmd
+	 * 
+	 * @param name
+	 *            command name
+	 * @param in
+	 *            argin type
+	 * @param in_comments
+	 *            argin description
+	 * @param out
+	 *            argout type
+	 * @param out_comments
+	 *            argout description
+	 */
+	// ===============================================================
+	public GetArchivingModeTdbCmd(String name, int in, int out, String in_comments, String out_comments) {
+		super(name, in, out, in_comments, out_comments);
+	}
+
+	// ===============================================================
+	/**
+	 * Constructor for Command class GetArchivingModeTdbCmd
+	 * 
+	 * @param name
+	 *            command name
+	 * @param in
+	 *            argin type
+	 * @param in_comments
+	 *            argin description
+	 * @param out
+	 *            argout type
+	 * @param out_comments
+	 *            argout description
+	 * @param level
+	 *            The command display type OPERATOR or EXPERT
+	 */
+	// ===============================================================
+	public GetArchivingModeTdbCmd(String name, int in, int out, String in_comments, String out_comments, DispLevel level) {
+		super(name, in, out, in_comments, out_comments, level);
+	}
+
+	// ===============================================================
+	/**
+	 * return the result of the device's command.
+	 */
+	// ===============================================================
+	@Override
+	public Any execute(DeviceImpl device, Any in_any) throws DevFailed {
+		Util.out2.println("GetArchivingModeTdbCmd.execute(): arrived");
+		if (!(device instanceof ArchivingManager)) {
+			Except.throw_exception("DEVICE_ERROR", "Device parameter is not instance of ArchivingManager", "ArchivingManager");
+		}
+
+		String argin = extract_DevString(in_any);
+		return insert(((ArchivingManager) (device)).get_archiving_mode_tdb(argin));
+	}
+
+	// ===============================================================
+	/**
+	 * Check if it is allowed to execute the command.
+	 */
+	// ===============================================================
+	@Override
+	public boolean is_allowed(DeviceImpl device, Any data_in) {
+		if (device.get_state() == DevState.INIT || device.get_state() == DevState.FAULT) {
+			// End of Generated Code
+
+			// Re-Start of Generated Code
+			return false;
+		}
+		return true;
+	}
+}
+
+// -----------------------------------------------------------------------------
+/*
+ * end of $Source:
+ * /cvsroot/tango-cs/tango/jserver/archiving/ArchivingManager/GetArchivingModeTdbCmd
+ * .java,v $
+ */
diff --git a/src/main/java/ArchivingManager/GetStatusHdbCmd.java b/archivingmanager/src/main/java/ArchivingManager/GetStatusHdbCmd.java
similarity index 96%
rename from src/main/java/ArchivingManager/GetStatusHdbCmd.java
rename to archivingmanager/src/main/java/ArchivingManager/GetStatusHdbCmd.java
index b93c0c60f1220d35a72123d08ba66333cbe01559..40e991cdb03b28ac7313d814d148dabda96387ba 100644
--- a/src/main/java/ArchivingManager/GetStatusHdbCmd.java
+++ b/archivingmanager/src/main/java/ArchivingManager/GetStatusHdbCmd.java
@@ -1,159 +1,159 @@
-//+======================================================================
-// $Source: /cvsroot/tango-cs/tango/jserver/archiving/ArchivingManager/GetStatusHdbCmd.java,v $
-//
-// Project:      Tango Device Server
-//
-// Description:  Java source code for the command TemplateClass of the
-//               ArchivingManager class.
-//
-// $Author: chinkumo $
-//
-// $Revision: 1.4 $
-//
-// $Log: GetStatusHdbCmd.java,v $
-// Revision 1.4  2005/11/29 17:34:41  chinkumo
-// no message
-//
-// Revision 1.3.10.2  2005/11/29 16:14:07  chinkumo
-// Code reformated (pogo compatible)
-//
-// Revision 1.3.10.1  2005/11/15 13:46:24  chinkumo
-// ...
-//
-// Revision 1.3  2005/06/14 10:24:03  chinkumo
-// Branch (archivingManager_1_0_1-branch_0)  and HEAD merged.
-//
-// Revision 1.2.4.1  2005/06/13 14:27:26  chinkumo
-// The ArchivingManager device was regenerated in Tango V5.
-//
-// Revision 1.2  2005/01/28 13:11:14  taurel
-// Some changes in source files to be Pogo compatible
-//
-//
-// copyleft :    European Synchrotron Radiation Facility
-//               BP 220, Grenoble 38043
-//               FRANCE
-//
-//-======================================================================
-//
-//  		This file is generated by POGO
-//	(Program Obviously used to Generate tango Object)
-//
-//         (c) - Software Engineering Group - ESRF
-//=============================================================================
-
-/**
- * @author	$Author: chinkumo $
- * @version	$Revision: 1.4 $
- */
-package ArchivingManager;
-
-import org.omg.CORBA.Any;
-
-import fr.esrf.Tango.DevFailed;
-import fr.esrf.Tango.DispLevel;
-import fr.esrf.TangoDs.Command;
-import fr.esrf.TangoDs.DeviceImpl;
-import fr.esrf.TangoDs.Except;
-import fr.esrf.TangoDs.TangoConst;
-import fr.esrf.TangoDs.Util;
-
-/**
- * Class Description: For each attribute of the given list, get the status of
- * the device in charge of its historical archiving
- */
-
-public class GetStatusHdbCmd extends Command implements TangoConst {
-	// ===============================================================
-	/**
-	 * Constructor for Command class GetStatusHdbCmd
-	 * 
-	 * @param name
-	 *            command name
-	 * @param in
-	 *            argin type
-	 * @param out
-	 *            argout type
-	 */
-	// ===============================================================
-	public GetStatusHdbCmd(String name, int in, int out) {
-		super(name, in, out);
-	}
-
-	// ===============================================================
-	/**
-	 * Constructor for Command class GetStatusHdbCmd
-	 * 
-	 * @param name
-	 *            command name
-	 * @param in
-	 *            argin type
-	 * @param in_comments
-	 *            argin description
-	 * @param out
-	 *            argout type
-	 * @param out_comments
-	 *            argout description
-	 */
-	// ===============================================================
-	public GetStatusHdbCmd(String name, int in, int out, String in_comments, String out_comments) {
-		super(name, in, out, in_comments, out_comments);
-	}
-
-	// ===============================================================
-	/**
-	 * Constructor for Command class GetStatusHdbCmd
-	 * 
-	 * @param name
-	 *            command name
-	 * @param in
-	 *            argin type
-	 * @param in_comments
-	 *            argin description
-	 * @param out
-	 *            argout type
-	 * @param out_comments
-	 *            argout description
-	 * @param level
-	 *            The command display type OPERATOR or EXPERT
-	 */
-	// ===============================================================
-	public GetStatusHdbCmd(String name, int in, int out, String in_comments, String out_comments, DispLevel level) {
-		super(name, in, out, in_comments, out_comments, level);
-	}
-
-	// ===============================================================
-	/**
-	 * return the result of the device's command.
-	 */
-	// ===============================================================
-	@Override
-	public Any execute(DeviceImpl device, Any in_any) throws DevFailed {
-		Util.out2.println("GetStatusHdbCmd.execute(): arrived");
-		if (!(device instanceof ArchivingManager)) {
-			Except.throw_exception("DEVICE_ERROR", "Device parameter is not instance of ArchivingManager", "ArchivingManager");
-		}
-		String[] argin = extract_DevVarStringArray(in_any);
-		return insert(((ArchivingManager) (device)).get_status_hdb(argin));
-	}
-
-	// ===============================================================
-	/**
-	 * Check if it is allowed to execute the command.
-	 */
-	// ===============================================================
-	@Override
-	public boolean is_allowed(DeviceImpl device, Any data_in) {
-		// End of Generated Code
-
-		// Re-Start of Generated Code
-		return true;
-	}
-}
-
-// -----------------------------------------------------------------------------
-/*
- * end of $Source:
- * /cvsroot/tango-cs/tango/jserver/archiving/ArchivingManager/GetStatusHdbCmd
- * .java,v $
- */
+//+======================================================================
+// $Source: /cvsroot/tango-cs/tango/jserver/archiving/ArchivingManager/GetStatusHdbCmd.java,v $
+//
+// Project:      Tango Device Server
+//
+// Description:  Java source code for the command TemplateClass of the
+//               ArchivingManager class.
+//
+// $Author: chinkumo $
+//
+// $Revision: 1.4 $
+//
+// $Log: GetStatusHdbCmd.java,v $
+// Revision 1.4  2005/11/29 17:34:41  chinkumo
+// no message
+//
+// Revision 1.3.10.2  2005/11/29 16:14:07  chinkumo
+// Code reformated (pogo compatible)
+//
+// Revision 1.3.10.1  2005/11/15 13:46:24  chinkumo
+// ...
+//
+// Revision 1.3  2005/06/14 10:24:03  chinkumo
+// Branch (archivingManager_1_0_1-branch_0)  and HEAD merged.
+//
+// Revision 1.2.4.1  2005/06/13 14:27:26  chinkumo
+// The ArchivingManager device was regenerated in Tango V5.
+//
+// Revision 1.2  2005/01/28 13:11:14  taurel
+// Some changes in source files to be Pogo compatible
+//
+//
+// copyleft :    European Synchrotron Radiation Facility
+//               BP 220, Grenoble 38043
+//               FRANCE
+//
+//-======================================================================
+//
+//  		This file is generated by POGO
+//	(Program Obviously used to Generate tango Object)
+//
+//         (c) - Software Engineering Group - ESRF
+//=============================================================================
+
+/**
+ * @author	$Author: chinkumo $
+ * @version	$Revision: 1.4 $
+ */
+package ArchivingManager;
+
+import org.omg.CORBA.Any;
+
+import fr.esrf.Tango.DevFailed;
+import fr.esrf.Tango.DispLevel;
+import fr.esrf.TangoDs.Command;
+import fr.esrf.TangoDs.DeviceImpl;
+import fr.esrf.TangoDs.Except;
+import fr.esrf.TangoDs.TangoConst;
+import fr.esrf.TangoDs.Util;
+
+/**
+ * Class Description: For each attribute of the given list, get the status of
+ * the device in charge of its historical archiving
+ */
+
+public class GetStatusHdbCmd extends Command implements TangoConst {
+	// ===============================================================
+	/**
+	 * Constructor for Command class GetStatusHdbCmd
+	 * 
+	 * @param name
+	 *            command name
+	 * @param in
+	 *            argin type
+	 * @param out
+	 *            argout type
+	 */
+	// ===============================================================
+	public GetStatusHdbCmd(String name, int in, int out) {
+		super(name, in, out);
+	}
+
+	// ===============================================================
+	/**
+	 * Constructor for Command class GetStatusHdbCmd
+	 * 
+	 * @param name
+	 *            command name
+	 * @param in
+	 *            argin type
+	 * @param in_comments
+	 *            argin description
+	 * @param out
+	 *            argout type
+	 * @param out_comments
+	 *            argout description
+	 */
+	// ===============================================================
+	public GetStatusHdbCmd(String name, int in, int out, String in_comments, String out_comments) {
+		super(name, in, out, in_comments, out_comments);
+	}
+
+	// ===============================================================
+	/**
+	 * Constructor for Command class GetStatusHdbCmd
+	 * 
+	 * @param name
+	 *            command name
+	 * @param in
+	 *            argin type
+	 * @param in_comments
+	 *            argin description
+	 * @param out
+	 *            argout type
+	 * @param out_comments
+	 *            argout description
+	 * @param level
+	 *            The command display type OPERATOR or EXPERT
+	 */
+	// ===============================================================
+	public GetStatusHdbCmd(String name, int in, int out, String in_comments, String out_comments, DispLevel level) {
+		super(name, in, out, in_comments, out_comments, level);
+	}
+
+	// ===============================================================
+	/**
+	 * return the result of the device's command.
+	 */
+	// ===============================================================
+	@Override
+	public Any execute(DeviceImpl device, Any in_any) throws DevFailed {
+		Util.out2.println("GetStatusHdbCmd.execute(): arrived");
+		if (!(device instanceof ArchivingManager)) {
+			Except.throw_exception("DEVICE_ERROR", "Device parameter is not instance of ArchivingManager", "ArchivingManager");
+		}
+		String[] argin = extract_DevVarStringArray(in_any);
+		return insert(((ArchivingManager) (device)).get_status_hdb(argin));
+	}
+
+	// ===============================================================
+	/**
+	 * Check if it is allowed to execute the command.
+	 */
+	// ===============================================================
+	@Override
+	public boolean is_allowed(DeviceImpl device, Any data_in) {
+		// End of Generated Code
+
+		// Re-Start of Generated Code
+		return true;
+	}
+}
+
+// -----------------------------------------------------------------------------
+/*
+ * end of $Source:
+ * /cvsroot/tango-cs/tango/jserver/archiving/ArchivingManager/GetStatusHdbCmd
+ * .java,v $
+ */
diff --git a/src/main/java/ArchivingManager/GetStatusTdbCmd.java b/archivingmanager/src/main/java/ArchivingManager/GetStatusTdbCmd.java
similarity index 96%
rename from src/main/java/ArchivingManager/GetStatusTdbCmd.java
rename to archivingmanager/src/main/java/ArchivingManager/GetStatusTdbCmd.java
index 14a47b37d57b9acb41b064f101d619e573341752..f40d6fdf1f7e5d955d5874966b7572558518c2cf 100644
--- a/src/main/java/ArchivingManager/GetStatusTdbCmd.java
+++ b/archivingmanager/src/main/java/ArchivingManager/GetStatusTdbCmd.java
@@ -1,160 +1,160 @@
-//+======================================================================
-// $Source: /cvsroot/tango-cs/tango/jserver/archiving/ArchivingManager/GetStatusTdbCmd.java,v $
-//
-// Project:      Tango Device Server
-//
-// Description:  Java source code for the command TemplateClass of the
-//               ArchivingManager class.
-//
-// $Author: chinkumo $
-//
-// $Revision: 1.4 $
-//
-// $Log: GetStatusTdbCmd.java,v $
-// Revision 1.4  2005/11/29 17:34:41  chinkumo
-// no message
-//
-// Revision 1.3.10.2  2005/11/29 16:14:07  chinkumo
-// Code reformated (pogo compatible)
-//
-// Revision 1.3.10.1  2005/11/15 13:46:24  chinkumo
-// ...
-//
-// Revision 1.3  2005/06/14 10:24:03  chinkumo
-// Branch (archivingManager_1_0_1-branch_0)  and HEAD merged.
-//
-// Revision 1.2.4.1  2005/06/13 14:27:26  chinkumo
-// The ArchivingManager device was regenerated in Tango V5.
-//
-// Revision 1.2  2005/01/28 13:11:14  taurel
-// Some changes in source files to be Pogo compatible
-//
-//
-// copyleft :    European Synchrotron Radiation Facility
-//               BP 220, Grenoble 38043
-//               FRANCE
-//
-//-======================================================================
-//
-//  		This file is generated by POGO
-//	(Program Obviously used to Generate tango Object)
-//
-//         (c) - Software Engineering Group - ESRF
-//=============================================================================
-
-/**
- * @author	$Author: chinkumo $
- * @version	$Revision: 1.4 $
- */
-package ArchivingManager;
-
-import org.omg.CORBA.Any;
-
-import fr.esrf.Tango.DevFailed;
-import fr.esrf.Tango.DispLevel;
-import fr.esrf.TangoDs.Command;
-import fr.esrf.TangoDs.DeviceImpl;
-import fr.esrf.TangoDs.Except;
-import fr.esrf.TangoDs.TangoConst;
-import fr.esrf.TangoDs.Util;
-
-/**
- * Class Description: For each attribute of the given list, get the status of
- * the device in charge of its temporary archiving.
- */
-
-public class GetStatusTdbCmd extends Command implements TangoConst {
-	// ===============================================================
-	/**
-	 * Constructor for Command class GetStatusTdbCmd
-	 * 
-	 * @param name
-	 *            command name
-	 * @param in
-	 *            argin type
-	 * @param out
-	 *            argout type
-	 */
-	// ===============================================================
-	public GetStatusTdbCmd(String name, int in, int out) {
-		super(name, in, out);
-	}
-
-	// ===============================================================
-	/**
-	 * Constructor for Command class GetStatusTdbCmd
-	 * 
-	 * @param name
-	 *            command name
-	 * @param in
-	 *            argin type
-	 * @param in_comments
-	 *            argin description
-	 * @param out
-	 *            argout type
-	 * @param out_comments
-	 *            argout description
-	 */
-	// ===============================================================
-	public GetStatusTdbCmd(String name, int in, int out, String in_comments, String out_comments) {
-		super(name, in, out, in_comments, out_comments);
-	}
-
-	// ===============================================================
-	/**
-	 * Constructor for Command class GetStatusTdbCmd
-	 * 
-	 * @param name
-	 *            command name
-	 * @param in
-	 *            argin type
-	 * @param in_comments
-	 *            argin description
-	 * @param out
-	 *            argout type
-	 * @param out_comments
-	 *            argout description
-	 * @param level
-	 *            The command display type OPERATOR or EXPERT
-	 */
-	// ===============================================================
-	public GetStatusTdbCmd(String name, int in, int out, String in_comments, String out_comments, DispLevel level) {
-		super(name, in, out, in_comments, out_comments, level);
-	}
-
-	// ===============================================================
-	/**
-	 * return the result of the device's command.
-	 */
-	// ===============================================================
-	@Override
-	public Any execute(DeviceImpl device, Any in_any) throws DevFailed {
-		Util.out2.println("GetStatusTdbCmd.execute(): arrived");
-		if (!(device instanceof ArchivingManager)) {
-			Except.throw_exception("DEVICE_ERROR", "Device parameter is not instance of ArchivingManager", "ArchivingManager");
-		}
-
-		String[] argin = extract_DevVarStringArray(in_any);
-		return insert(((ArchivingManager) (device)).get_status_tdb(argin));
-	}
-
-	// ===============================================================
-	/**
-	 * Check if it is allowed to execute the command.
-	 */
-	// ===============================================================
-	@Override
-	public boolean is_allowed(DeviceImpl device, Any data_in) {
-		// End of Generated Code
-
-		// Re-Start of Generated Code
-		return true;
-	}
-}
-
-// -----------------------------------------------------------------------------
-/*
- * end of $Source:
- * /cvsroot/tango-cs/tango/jserver/archiving/ArchivingManager/GetStatusTdbCmd
- * .java,v $
- */
+//+======================================================================
+// $Source: /cvsroot/tango-cs/tango/jserver/archiving/ArchivingManager/GetStatusTdbCmd.java,v $
+//
+// Project:      Tango Device Server
+//
+// Description:  Java source code for the command TemplateClass of the
+//               ArchivingManager class.
+//
+// $Author: chinkumo $
+//
+// $Revision: 1.4 $
+//
+// $Log: GetStatusTdbCmd.java,v $
+// Revision 1.4  2005/11/29 17:34:41  chinkumo
+// no message
+//
+// Revision 1.3.10.2  2005/11/29 16:14:07  chinkumo
+// Code reformated (pogo compatible)
+//
+// Revision 1.3.10.1  2005/11/15 13:46:24  chinkumo
+// ...
+//
+// Revision 1.3  2005/06/14 10:24:03  chinkumo
+// Branch (archivingManager_1_0_1-branch_0)  and HEAD merged.
+//
+// Revision 1.2.4.1  2005/06/13 14:27:26  chinkumo
+// The ArchivingManager device was regenerated in Tango V5.
+//
+// Revision 1.2  2005/01/28 13:11:14  taurel
+// Some changes in source files to be Pogo compatible
+//
+//
+// copyleft :    European Synchrotron Radiation Facility
+//               BP 220, Grenoble 38043
+//               FRANCE
+//
+//-======================================================================
+//
+//  		This file is generated by POGO
+//	(Program Obviously used to Generate tango Object)
+//
+//         (c) - Software Engineering Group - ESRF
+//=============================================================================
+
+/**
+ * @author	$Author: chinkumo $
+ * @version	$Revision: 1.4 $
+ */
+package ArchivingManager;
+
+import org.omg.CORBA.Any;
+
+import fr.esrf.Tango.DevFailed;
+import fr.esrf.Tango.DispLevel;
+import fr.esrf.TangoDs.Command;
+import fr.esrf.TangoDs.DeviceImpl;
+import fr.esrf.TangoDs.Except;
+import fr.esrf.TangoDs.TangoConst;
+import fr.esrf.TangoDs.Util;
+
+/**
+ * Class Description: For each attribute of the given list, get the status of
+ * the device in charge of its temporary archiving.
+ */
+
+public class GetStatusTdbCmd extends Command implements TangoConst {
+	// ===============================================================
+	/**
+	 * Constructor for Command class GetStatusTdbCmd
+	 * 
+	 * @param name
+	 *            command name
+	 * @param in
+	 *            argin type
+	 * @param out
+	 *            argout type
+	 */
+	// ===============================================================
+	public GetStatusTdbCmd(String name, int in, int out) {
+		super(name, in, out);
+	}
+
+	// ===============================================================
+	/**
+	 * Constructor for Command class GetStatusTdbCmd
+	 * 
+	 * @param name
+	 *            command name
+	 * @param in
+	 *            argin type
+	 * @param in_comments
+	 *            argin description
+	 * @param out
+	 *            argout type
+	 * @param out_comments
+	 *            argout description
+	 */
+	// ===============================================================
+	public GetStatusTdbCmd(String name, int in, int out, String in_comments, String out_comments) {
+		super(name, in, out, in_comments, out_comments);
+	}
+
+	// ===============================================================
+	/**
+	 * Constructor for Command class GetStatusTdbCmd
+	 * 
+	 * @param name
+	 *            command name
+	 * @param in
+	 *            argin type
+	 * @param in_comments
+	 *            argin description
+	 * @param out
+	 *            argout type
+	 * @param out_comments
+	 *            argout description
+	 * @param level
+	 *            The command display type OPERATOR or EXPERT
+	 */
+	// ===============================================================
+	public GetStatusTdbCmd(String name, int in, int out, String in_comments, String out_comments, DispLevel level) {
+		super(name, in, out, in_comments, out_comments, level);
+	}
+
+	// ===============================================================
+	/**
+	 * return the result of the device's command.
+	 */
+	// ===============================================================
+	@Override
+	public Any execute(DeviceImpl device, Any in_any) throws DevFailed {
+		Util.out2.println("GetStatusTdbCmd.execute(): arrived");
+		if (!(device instanceof ArchivingManager)) {
+			Except.throw_exception("DEVICE_ERROR", "Device parameter is not instance of ArchivingManager", "ArchivingManager");
+		}
+
+		String[] argin = extract_DevVarStringArray(in_any);
+		return insert(((ArchivingManager) (device)).get_status_tdb(argin));
+	}
+
+	// ===============================================================
+	/**
+	 * Check if it is allowed to execute the command.
+	 */
+	// ===============================================================
+	@Override
+	public boolean is_allowed(DeviceImpl device, Any data_in) {
+		// End of Generated Code
+
+		// Re-Start of Generated Code
+		return true;
+	}
+}
+
+// -----------------------------------------------------------------------------
+/*
+ * end of $Source:
+ * /cvsroot/tango-cs/tango/jserver/archiving/ArchivingManager/GetStatusTdbCmd
+ * .java,v $
+ */
diff --git a/src/main/java/ArchivingManager/IsArchivedHdbCmd.java b/archivingmanager/src/main/java/ArchivingManager/IsArchivedHdbCmd.java
similarity index 96%
rename from src/main/java/ArchivingManager/IsArchivedHdbCmd.java
rename to archivingmanager/src/main/java/ArchivingManager/IsArchivedHdbCmd.java
index 50d7a072da30335fde12068ec757c2b9eb2e6183..a6cde0dcc88ae4cf652f8b3cd428f9cfa163b8aa 100644
--- a/src/main/java/ArchivingManager/IsArchivedHdbCmd.java
+++ b/archivingmanager/src/main/java/ArchivingManager/IsArchivedHdbCmd.java
@@ -1,164 +1,164 @@
-//+======================================================================
-// $Source: /cvsroot/tango-cs/tango/jserver/archiving/ArchivingManager/IsArchivedHdbCmd.java,v $
-//
-// Project:      Tango Device Server
-//
-// Description:  Java source code for the command TemplateClass of the
-//               ArchivingManager class.
-//
-// $Author: chinkumo $
-//
-// $Revision: 1.4 $
-//
-// $Log: IsArchivedHdbCmd.java,v $
-// Revision 1.4  2005/11/29 17:34:41  chinkumo
-// no message
-//
-// Revision 1.3.10.2  2005/11/29 16:14:07  chinkumo
-// Code reformated (pogo compatible)
-//
-// Revision 1.3.10.1  2005/11/15 13:46:24  chinkumo
-// ...
-//
-// Revision 1.3  2005/06/14 10:24:03  chinkumo
-// Branch (archivingManager_1_0_1-branch_0)  and HEAD merged.
-//
-// Revision 1.2.4.1  2005/06/13 14:27:26  chinkumo
-// The ArchivingManager device was regenerated in Tango V5.
-//
-// Revision 1.2  2005/01/28 13:11:14  taurel
-// Some changes in source files to be Pogo compatible
-//
-//
-// copyleft :    European Synchrotron Radiation Facility
-//               BP 220, Grenoble 38043
-//               FRANCE
-//
-//-======================================================================
-//
-//  		This file is generated by POGO
-//	(Program Obviously used to Generate tango Object)
-//
-//         (c) - Software Engineering Group - ESRF
-//=============================================================================
-
-/**
- * @author	$Author: chinkumo $
- * @version	$Revision: 1.4 $
- */
-package ArchivingManager;
-
-import org.omg.CORBA.Any;
-
-import fr.esrf.Tango.DevFailed;
-import fr.esrf.Tango.DevState;
-import fr.esrf.Tango.DispLevel;
-import fr.esrf.TangoDs.Command;
-import fr.esrf.TangoDs.DeviceImpl;
-import fr.esrf.TangoDs.Except;
-import fr.esrf.TangoDs.TangoConst;
-import fr.esrf.TangoDs.Util;
-
-/**
- * Class Description: Check the archiving state (historical archiving) for each
- * attribute of the given list.
- */
-
-public class IsArchivedHdbCmd extends Command implements TangoConst {
-	// ===============================================================
-	/**
-	 * Constructor for Command class IsArchivedHdbCmd
-	 * 
-	 * @param name
-	 *            command name
-	 * @param in
-	 *            argin type
-	 * @param out
-	 *            argout type
-	 */
-	// ===============================================================
-	public IsArchivedHdbCmd(String name, int in, int out) {
-		super(name, in, out);
-	}
-
-	// ===============================================================
-	/**
-	 * Constructor for Command class IsArchivedHdbCmd
-	 * 
-	 * @param name
-	 *            command name
-	 * @param in
-	 *            argin type
-	 * @param in_comments
-	 *            argin description
-	 * @param out
-	 *            argout type
-	 * @param out_comments
-	 *            argout description
-	 */
-	// ===============================================================
-	public IsArchivedHdbCmd(String name, int in, int out, String in_comments, String out_comments) {
-		super(name, in, out, in_comments, out_comments);
-	}
-
-	// ===============================================================
-	/**
-	 * Constructor for Command class IsArchivedHdbCmd
-	 * 
-	 * @param name
-	 *            command name
-	 * @param in
-	 *            argin type
-	 * @param in_comments
-	 *            argin description
-	 * @param out
-	 *            argout type
-	 * @param out_comments
-	 *            argout description
-	 * @param level
-	 *            The command display type OPERATOR or EXPERT
-	 */
-	// ===============================================================
-	public IsArchivedHdbCmd(String name, int in, int out, String in_comments, String out_comments, DispLevel level) {
-		super(name, in, out, in_comments, out_comments, level);
-	}
-
-	// ===============================================================
-	/**
-	 * return the result of the device's command.
-	 */
-	// ===============================================================
-	@Override
-	public Any execute(DeviceImpl device, Any in_any) throws DevFailed {
-		Util.out2.println("IsArchivedHdbCmd.execute(): arrived");
-		if (!(device instanceof ArchivingManager)) {
-			Except.throw_exception("DEVICE_ERROR", "Device parameter is not instance of ArchivingManager", "ArchivingManager");
-		}
-
-		String[] argin = extract_DevVarStringArray(in_any);
-		return insert(((ArchivingManager) (device)).is_archived_hdb(argin));
-	}
-
-	// ===============================================================
-	/**
-	 * Check if it is allowed to execute the command.
-	 */
-	// ===============================================================
-	@Override
-	public boolean is_allowed(DeviceImpl device, Any data_in) {
-		if (device.get_state() == DevState.INIT || device.get_state() == DevState.FAULT) {
-			// End of Generated Code
-
-			// Re-Start of Generated Code
-			return false;
-		}
-		return true;
-	}
-}
-
-// -----------------------------------------------------------------------------
-/*
- * end of $Source:
- * /cvsroot/tango-cs/tango/jserver/archiving/ArchivingManager/IsArchivedHdbCmd
- * .java,v $
- */
+//+======================================================================
+// $Source: /cvsroot/tango-cs/tango/jserver/archiving/ArchivingManager/IsArchivedHdbCmd.java,v $
+//
+// Project:      Tango Device Server
+//
+// Description:  Java source code for the command TemplateClass of the
+//               ArchivingManager class.
+//
+// $Author: chinkumo $
+//
+// $Revision: 1.4 $
+//
+// $Log: IsArchivedHdbCmd.java,v $
+// Revision 1.4  2005/11/29 17:34:41  chinkumo
+// no message
+//
+// Revision 1.3.10.2  2005/11/29 16:14:07  chinkumo
+// Code reformated (pogo compatible)
+//
+// Revision 1.3.10.1  2005/11/15 13:46:24  chinkumo
+// ...
+//
+// Revision 1.3  2005/06/14 10:24:03  chinkumo
+// Branch (archivingManager_1_0_1-branch_0)  and HEAD merged.
+//
+// Revision 1.2.4.1  2005/06/13 14:27:26  chinkumo
+// The ArchivingManager device was regenerated in Tango V5.
+//
+// Revision 1.2  2005/01/28 13:11:14  taurel
+// Some changes in source files to be Pogo compatible
+//
+//
+// copyleft :    European Synchrotron Radiation Facility
+//               BP 220, Grenoble 38043
+//               FRANCE
+//
+//-======================================================================
+//
+//  		This file is generated by POGO
+//	(Program Obviously used to Generate tango Object)
+//
+//         (c) - Software Engineering Group - ESRF
+//=============================================================================
+
+/**
+ * @author	$Author: chinkumo $
+ * @version	$Revision: 1.4 $
+ */
+package ArchivingManager;
+
+import org.omg.CORBA.Any;
+
+import fr.esrf.Tango.DevFailed;
+import fr.esrf.Tango.DevState;
+import fr.esrf.Tango.DispLevel;
+import fr.esrf.TangoDs.Command;
+import fr.esrf.TangoDs.DeviceImpl;
+import fr.esrf.TangoDs.Except;
+import fr.esrf.TangoDs.TangoConst;
+import fr.esrf.TangoDs.Util;
+
+/**
+ * Class Description: Check the archiving state (historical archiving) for each
+ * attribute of the given list.
+ */
+
+public class IsArchivedHdbCmd extends Command implements TangoConst {
+	// ===============================================================
+	/**
+	 * Constructor for Command class IsArchivedHdbCmd
+	 * 
+	 * @param name
+	 *            command name
+	 * @param in
+	 *            argin type
+	 * @param out
+	 *            argout type
+	 */
+	// ===============================================================
+	public IsArchivedHdbCmd(String name, int in, int out) {
+		super(name, in, out);
+	}
+
+	// ===============================================================
+	/**
+	 * Constructor for Command class IsArchivedHdbCmd
+	 * 
+	 * @param name
+	 *            command name
+	 * @param in
+	 *            argin type
+	 * @param in_comments
+	 *            argin description
+	 * @param out
+	 *            argout type
+	 * @param out_comments
+	 *            argout description
+	 */
+	// ===============================================================
+	public IsArchivedHdbCmd(String name, int in, int out, String in_comments, String out_comments) {
+		super(name, in, out, in_comments, out_comments);
+	}
+
+	// ===============================================================
+	/**
+	 * Constructor for Command class IsArchivedHdbCmd
+	 * 
+	 * @param name
+	 *            command name
+	 * @param in
+	 *            argin type
+	 * @param in_comments
+	 *            argin description
+	 * @param out
+	 *            argout type
+	 * @param out_comments
+	 *            argout description
+	 * @param level
+	 *            The command display type OPERATOR or EXPERT
+	 */
+	// ===============================================================
+	public IsArchivedHdbCmd(String name, int in, int out, String in_comments, String out_comments, DispLevel level) {
+		super(name, in, out, in_comments, out_comments, level);
+	}
+
+	// ===============================================================
+	/**
+	 * return the result of the device's command.
+	 */
+	// ===============================================================
+	@Override
+	public Any execute(DeviceImpl device, Any in_any) throws DevFailed {
+		Util.out2.println("IsArchivedHdbCmd.execute(): arrived");
+		if (!(device instanceof ArchivingManager)) {
+			Except.throw_exception("DEVICE_ERROR", "Device parameter is not instance of ArchivingManager", "ArchivingManager");
+		}
+
+		String[] argin = extract_DevVarStringArray(in_any);
+		return insert(((ArchivingManager) (device)).is_archived_hdb(argin));
+	}
+
+	// ===============================================================
+	/**
+	 * Check if it is allowed to execute the command.
+	 */
+	// ===============================================================
+	@Override
+	public boolean is_allowed(DeviceImpl device, Any data_in) {
+		if (device.get_state() == DevState.INIT || device.get_state() == DevState.FAULT) {
+			// End of Generated Code
+
+			// Re-Start of Generated Code
+			return false;
+		}
+		return true;
+	}
+}
+
+// -----------------------------------------------------------------------------
+/*
+ * end of $Source:
+ * /cvsroot/tango-cs/tango/jserver/archiving/ArchivingManager/IsArchivedHdbCmd
+ * .java,v $
+ */
diff --git a/src/main/java/ArchivingManager/IsArchivedTdbCmd.java b/archivingmanager/src/main/java/ArchivingManager/IsArchivedTdbCmd.java
similarity index 96%
rename from src/main/java/ArchivingManager/IsArchivedTdbCmd.java
rename to archivingmanager/src/main/java/ArchivingManager/IsArchivedTdbCmd.java
index 8a442fe3a3ef163b0592ddb8bb2cd03fd6b63ed6..3e5515e74477f6e34543930216e237aac50f6259 100644
--- a/src/main/java/ArchivingManager/IsArchivedTdbCmd.java
+++ b/archivingmanager/src/main/java/ArchivingManager/IsArchivedTdbCmd.java
@@ -1,164 +1,164 @@
-//+======================================================================
-// $Source: /cvsroot/tango-cs/tango/jserver/archiving/ArchivingManager/IsArchivedTdbCmd.java,v $
-//
-// Project:      Tango Device Server
-//
-// Description:  Java source code for the command TemplateClass of the
-//               ArchivingManager class.
-//
-// $Author: chinkumo $
-//
-// $Revision: 1.4 $
-//
-// $Log: IsArchivedTdbCmd.java,v $
-// Revision 1.4  2005/11/29 17:34:41  chinkumo
-// no message
-//
-// Revision 1.3.10.2  2005/11/29 16:14:07  chinkumo
-// Code reformated (pogo compatible)
-//
-// Revision 1.3.10.1  2005/11/15 13:46:24  chinkumo
-// ...
-//
-// Revision 1.3  2005/06/14 10:24:03  chinkumo
-// Branch (archivingManager_1_0_1-branch_0)  and HEAD merged.
-//
-// Revision 1.2.4.1  2005/06/13 14:27:26  chinkumo
-// The ArchivingManager device was regenerated in Tango V5.
-//
-// Revision 1.2  2005/01/28 13:11:14  taurel
-// Some changes in source files to be Pogo compatible
-//
-//
-// copyleft :    European Synchrotron Radiation Facility
-//               BP 220, Grenoble 38043
-//               FRANCE
-//
-//-======================================================================
-//
-//  		This file is generated by POGO
-//	(Program Obviously used to Generate tango Object)
-//
-//         (c) - Software Engineering Group - ESRF
-//=============================================================================
-
-/**
- * @author	$Author: chinkumo $
- * @version	$Revision: 1.4 $
- */
-package ArchivingManager;
-
-import org.omg.CORBA.Any;
-
-import fr.esrf.Tango.DevFailed;
-import fr.esrf.Tango.DevState;
-import fr.esrf.Tango.DispLevel;
-import fr.esrf.TangoDs.Command;
-import fr.esrf.TangoDs.DeviceImpl;
-import fr.esrf.TangoDs.Except;
-import fr.esrf.TangoDs.TangoConst;
-import fr.esrf.TangoDs.Util;
-
-/**
- * Class Description: Check the archiving state (temporary archiving) for each
- * attribute of the given list.
- */
-
-public class IsArchivedTdbCmd extends Command implements TangoConst {
-	// ===============================================================
-	/**
-	 * Constructor for Command class IsArchivedTdbCmd
-	 * 
-	 * @param name
-	 *            command name
-	 * @param in
-	 *            argin type
-	 * @param out
-	 *            argout type
-	 */
-	// ===============================================================
-	public IsArchivedTdbCmd(String name, int in, int out) {
-		super(name, in, out);
-	}
-
-	// ===============================================================
-	/**
-	 * Constructor for Command class IsArchivedTdbCmd
-	 * 
-	 * @param name
-	 *            command name
-	 * @param in
-	 *            argin type
-	 * @param in_comments
-	 *            argin description
-	 * @param out
-	 *            argout type
-	 * @param out_comments
-	 *            argout description
-	 */
-	// ===============================================================
-	public IsArchivedTdbCmd(String name, int in, int out, String in_comments, String out_comments) {
-		super(name, in, out, in_comments, out_comments);
-	}
-
-	// ===============================================================
-	/**
-	 * Constructor for Command class IsArchivedTdbCmd
-	 * 
-	 * @param name
-	 *            command name
-	 * @param in
-	 *            argin type
-	 * @param in_comments
-	 *            argin description
-	 * @param out
-	 *            argout type
-	 * @param out_comments
-	 *            argout description
-	 * @param level
-	 *            The command display type OPERATOR or EXPERT
-	 */
-	// ===============================================================
-	public IsArchivedTdbCmd(String name, int in, int out, String in_comments, String out_comments, DispLevel level) {
-		super(name, in, out, in_comments, out_comments, level);
-	}
-
-	// ===============================================================
-	/**
-	 * return the result of the device's command.
-	 */
-	// ===============================================================
-	@Override
-	public Any execute(DeviceImpl device, Any in_any) throws DevFailed {
-		Util.out2.println("IsArchivedTdbCmd.execute(): arrived");
-		String[] argin = extract_DevVarStringArray(in_any);
-		if (!(device instanceof ArchivingManager)) {
-			Except.throw_exception("DEVICE_ERROR", "Device parameter is not instance of ArchivingManager", "ArchivingManager");
-		}
-
-		return insert(((ArchivingManager) (device)).is_archived_tdb(argin));
-	}
-
-	// ===============================================================
-	/**
-	 * Check if it is allowed to execute the command.
-	 */
-	// ===============================================================
-	@Override
-	public boolean is_allowed(DeviceImpl device, Any data_in) {
-		if (device.get_state() == DevState.INIT || device.get_state() == DevState.FAULT) {
-			// End of Generated Code
-
-			// Re-Start of Generated Code
-			return false;
-		}
-		return true;
-	}
-}
-
-// -----------------------------------------------------------------------------
-/*
- * end of $Source:
- * /cvsroot/tango-cs/tango/jserver/archiving/ArchivingManager/IsArchivedTdbCmd
- * .java,v $
- */
+//+======================================================================
+// $Source: /cvsroot/tango-cs/tango/jserver/archiving/ArchivingManager/IsArchivedTdbCmd.java,v $
+//
+// Project:      Tango Device Server
+//
+// Description:  Java source code for the command TemplateClass of the
+//               ArchivingManager class.
+//
+// $Author: chinkumo $
+//
+// $Revision: 1.4 $
+//
+// $Log: IsArchivedTdbCmd.java,v $
+// Revision 1.4  2005/11/29 17:34:41  chinkumo
+// no message
+//
+// Revision 1.3.10.2  2005/11/29 16:14:07  chinkumo
+// Code reformated (pogo compatible)
+//
+// Revision 1.3.10.1  2005/11/15 13:46:24  chinkumo
+// ...
+//
+// Revision 1.3  2005/06/14 10:24:03  chinkumo
+// Branch (archivingManager_1_0_1-branch_0)  and HEAD merged.
+//
+// Revision 1.2.4.1  2005/06/13 14:27:26  chinkumo
+// The ArchivingManager device was regenerated in Tango V5.
+//
+// Revision 1.2  2005/01/28 13:11:14  taurel
+// Some changes in source files to be Pogo compatible
+//
+//
+// copyleft :    European Synchrotron Radiation Facility
+//               BP 220, Grenoble 38043
+//               FRANCE
+//
+//-======================================================================
+//
+//  		This file is generated by POGO
+//	(Program Obviously used to Generate tango Object)
+//
+//         (c) - Software Engineering Group - ESRF
+//=============================================================================
+
+/**
+ * @author	$Author: chinkumo $
+ * @version	$Revision: 1.4 $
+ */
+package ArchivingManager;
+
+import org.omg.CORBA.Any;
+
+import fr.esrf.Tango.DevFailed;
+import fr.esrf.Tango.DevState;
+import fr.esrf.Tango.DispLevel;
+import fr.esrf.TangoDs.Command;
+import fr.esrf.TangoDs.DeviceImpl;
+import fr.esrf.TangoDs.Except;
+import fr.esrf.TangoDs.TangoConst;
+import fr.esrf.TangoDs.Util;
+
+/**
+ * Class Description: Check the archiving state (temporary archiving) for each
+ * attribute of the given list.
+ */
+
+public class IsArchivedTdbCmd extends Command implements TangoConst {
+	// ===============================================================
+	/**
+	 * Constructor for Command class IsArchivedTdbCmd
+	 * 
+	 * @param name
+	 *            command name
+	 * @param in
+	 *            argin type
+	 * @param out
+	 *            argout type
+	 */
+	// ===============================================================
+	public IsArchivedTdbCmd(String name, int in, int out) {
+		super(name, in, out);
+	}
+
+	// ===============================================================
+	/**
+	 * Constructor for Command class IsArchivedTdbCmd
+	 * 
+	 * @param name
+	 *            command name
+	 * @param in
+	 *            argin type
+	 * @param in_comments
+	 *            argin description
+	 * @param out
+	 *            argout type
+	 * @param out_comments
+	 *            argout description
+	 */
+	// ===============================================================
+	public IsArchivedTdbCmd(String name, int in, int out, String in_comments, String out_comments) {
+		super(name, in, out, in_comments, out_comments);
+	}
+
+	// ===============================================================
+	/**
+	 * Constructor for Command class IsArchivedTdbCmd
+	 * 
+	 * @param name
+	 *            command name
+	 * @param in
+	 *            argin type
+	 * @param in_comments
+	 *            argin description
+	 * @param out
+	 *            argout type
+	 * @param out_comments
+	 *            argout description
+	 * @param level
+	 *            The command display type OPERATOR or EXPERT
+	 */
+	// ===============================================================
+	public IsArchivedTdbCmd(String name, int in, int out, String in_comments, String out_comments, DispLevel level) {
+		super(name, in, out, in_comments, out_comments, level);
+	}
+
+	// ===============================================================
+	/**
+	 * return the result of the device's command.
+	 */
+	// ===============================================================
+	@Override
+	public Any execute(DeviceImpl device, Any in_any) throws DevFailed {
+		Util.out2.println("IsArchivedTdbCmd.execute(): arrived");
+		String[] argin = extract_DevVarStringArray(in_any);
+		if (!(device instanceof ArchivingManager)) {
+			Except.throw_exception("DEVICE_ERROR", "Device parameter is not instance of ArchivingManager", "ArchivingManager");
+		}
+
+		return insert(((ArchivingManager) (device)).is_archived_tdb(argin));
+	}
+
+	// ===============================================================
+	/**
+	 * Check if it is allowed to execute the command.
+	 */
+	// ===============================================================
+	@Override
+	public boolean is_allowed(DeviceImpl device, Any data_in) {
+		if (device.get_state() == DevState.INIT || device.get_state() == DevState.FAULT) {
+			// End of Generated Code
+
+			// Re-Start of Generated Code
+			return false;
+		}
+		return true;
+	}
+}
+
+// -----------------------------------------------------------------------------
+/*
+ * end of $Source:
+ * /cvsroot/tango-cs/tango/jserver/archiving/ArchivingManager/IsArchivedTdbCmd
+ * .java,v $
+ */
diff --git a/archivingmanager/src/main/java/org/tango/archiving/server/manager/ArchivingManager.java b/archivingmanager/src/main/java/org/tango/archiving/server/manager/ArchivingManager.java
new file mode 100644
index 0000000000000000000000000000000000000000..a126e0d484fa5c64ff7d9d0d4a29f7160b64d72d
--- /dev/null
+++ b/archivingmanager/src/main/java/org/tango/archiving/server/manager/ArchivingManager.java
@@ -0,0 +1,954 @@
+package org.tango.archiving.server.manager;
+
+import fr.esrf.Tango.DevFailed;
+import fr.soleil.archiving.common.api.ConnectionFactory;
+import fr.soleil.archiving.common.api.exception.ArchivingException;
+import fr.soleil.archiving.hdbtdb.api.ConfigConst;
+import fr.soleil.archiving.hdbtdb.api.manager.ArchivingManagerApiRefFactory;
+import fr.soleil.archiving.hdbtdb.api.manager.IArchivingManagerApiRef;
+import fr.soleil.archiving.hdbtdb.api.tools.ArchivingMessConfig;
+import fr.soleil.archiving.hdbtdb.api.tools.mode.Mode;
+import fr.soleil.database.connection.AbstractDataBaseConnector;
+import fr.soleil.database.connection.DataBaseParameters;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.tango.DeviceState;
+import org.tango.server.ServerManager;
+import org.tango.server.annotation.*;
+
+import java.util.Arrays;
+import java.util.ResourceBundle;
+
+/**
+ * Class Description: Device of Archiving system <Br>
+ * <Br>
+ * <br>
+ * <b>ROLE</b><br>
+ * This DeviceServer is used in order to manage the archiving of exported Tango
+ * attributes device. <Br>
+ * <Br>
+ * <br>
+ * <b>ARCHIVING TYPE</b><br>
+ * There is two kind of archiving : <Br>
+ * <Br>
+ * <Li><b>The Historical archiving</b>, manage by HdbArchiver devices.<br>
+ * This kind archiving allows to store in a database all the exported tango attributes.<br>
+ * It is a continuous and never deleted storage.<br>
+ * The frequency use for this kind of storage is usually small. <Br>
+ * <Br> <Li><b>The Temporary archiving</b>, manage by TdbArchiver devices.<br>
+ * This kind archiving allows to store in a database all the exported tango attributes.<br>
+ * The stored values are kept in the database for a limited time ("Keeping Window" [4 hours - 24 hours]). Before being
+ * stored into the database, values are first collected into files (timestamp, read value [, write value]). Those files
+ * are periodically exported to the database. This export frequency must also be given ("Export Window" [5 seconds - 1
+ * hour]).<br>
+ * The frequency use for this kind of storage is usually high. <Br>
+ * <Br>
+ * <br>
+ * <b>ARCHIVING MODE</b><br>
+ * An archiving sequence must be tuned to follow one (or several) of the defined archiving modes :<br> <Li>The
+ * <b>Periodical mode</b>, this mode allows to archive following a defined frequency.<br> <Li>The <b>Absolute mode</b>,
+ * this mode allows to archive a value only if : <br>
+ * &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <var>current_value</var> &gt; <var>previous_archived_value</var> +
+ * <var>&delta;<sub>1</sub></var> &nbsp;&nbsp;&nbsp;&nbsp; or <br>
+ * &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <var>current_value</var> &lt; <var>previous_archived_value</var> -
+ * <var>&delta;<sub>2</sub></var>.<br> <Li>The <b>Relative mode</b>, this mode allows to archive a value only if :<br>
+ * &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <var>current_value</var> &gt; <var>previous_archived_value</var>
+ * <var>&micro;<sub>increase</sub></var> &nbsp;&nbsp;&nbsp;&nbsp; or <br>
+ * &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <var>current_value</var> &lt; <var>previous_archived_value</var>
+ * <var>&micro;<sub>decrease</sub></var>.<br>
+ * &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (<var>&micro;<sub>increase</sub></var> and
+ * <var>&micro;<sub>decrease</sub></var> are percentages) <Li>The <b>Threshold mode</b>, this mode allows to archive a
+ * value only if :<br>
+ * &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <var>current_value</var> &gt;
+ * <var>threshold_value<sub>sup</sub></var> &nbsp;&nbsp;&nbsp;&nbsp; or <br>
+ * &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <var>current_value</var> &lt;
+ * <var>threshold_value<sub>min</sub></var>.<br>
+ * (like alarms work).<br>
+ * <Br>
+ * <Br> <Li>The <b>On Calculation mode</b>, this mode allows to archive according to a user formula.<br> <Li>The <b>On
+ * Difference mode</b>, this mode allows to archive when a value changes.<br> <Li>The <b>External mode</b>, this mode
+ * allows to archive on the user demand.<br>
+ * <br>
+ * <br>
+ * The 6 last mode must be associated to a periodic mode. <Br>
+ * <Br>
+ *
+ * @author $Author: pierrejoseph $
+ * @version $Revision: 1.19 $
+ */
+
+@Device
+public class ArchivingManager {
+
+    private Logger logger = LoggerFactory.getLogger(ArchivingManager.class);
+    private IArchivingManagerApiRef hdbManager, tdbManager;
+
+    /**
+     * Computer identifier on wich is settled the database DB. The identifier
+     * can be the computer name or its IP address. <br>
+     * <b>Default value : </b> hdb
+     */
+    @DeviceProperty
+    private String hdbHost = "";
+    /**
+     * Database name.<br>
+     * <b>Default value : </b> hdb
+     */
+    @DeviceProperty
+    private String hdbName = "";
+
+    /**
+     * Computer identifier on wich is settled the database TDB. The identifier
+     * can be the computer name or its IP address. <br>
+     * <b>Default value : </b> tdb
+     */
+    @DeviceProperty
+    private String tdbHost = "";
+    /**
+     * Database name.<br>
+     * <b>Default value : </b> tdb
+     */
+    @DeviceProperty
+    private String tdbName = "";
+
+    /**
+     * User identifier (name) used to connect the historical database.
+     */
+    @DeviceProperty
+    private String hdbUser = "";
+    /**
+     * Password used to connect the historical database.
+     */
+    @DeviceProperty
+    private String hdbPassword = "";
+    /**
+     * User identifier (name) used to connect the temporary database.
+     */
+    @DeviceProperty
+    private String tdbUser = "";
+    /**
+     * Password used to connect the temporary database.
+     */
+    @DeviceProperty
+    private String tdbPassword = "";
+    /**
+     * true if the ORACLE RAC connection is activated. This information is
+     * appended to all device's (or attributes) name. false otherwise.<br>
+     * <b>Default value : </b> false
+     */
+    @DeviceProperty
+    private boolean hdbRacConnection;
+    @DeviceProperty
+    private boolean tdbRacConnection;
+    @DeviceProperty
+    private String hdbSchema = "";
+    @DeviceProperty
+    private String tdbSchema = "";
+    @State
+    private DeviceState state;
+    @Status
+    private String status;
+
+    private static String VERSION;
+    private boolean hdbRacOverride = false;
+    private boolean tdbRacOverride = false;
+
+    public static void main(final String[] args) {
+        VERSION = ResourceBundle.getBundle("application").getString("project.version");
+        ServerManager.getInstance().start(args, ArchivingManager.class);
+    }
+
+    @Attribute
+    public String getVersion() {
+        return VERSION;
+    }
+
+
+    public DeviceState getState() {
+        return state;
+    }
+
+    public void setState(DeviceState state) {
+        this.state = state;
+    }
+
+    private void connectHdb() throws DevFailed {
+
+        final DataBaseParameters params = new DataBaseParameters();
+        // get default value from class properties of HDBArchiver
+        params.setParametersFromTango(ConfigConst.HDB_CLASS_DEVICE);
+        if (!hdbHost.isEmpty())
+            params.setHost(hdbHost);
+        if (!hdbUser.isEmpty())
+            params.setUser(hdbUser);
+        if (!hdbPassword.isEmpty())
+            params.setPassword(hdbPassword);
+        if (!hdbName.isEmpty())
+            params.setName(hdbName);
+        if (!hdbSchema.isEmpty())
+            params.setSchema(hdbSchema);
+        if (hdbRacOverride)
+            params.setRac(hdbRacConnection);
+        try {
+            final AbstractDataBaseConnector hdbConnector = ConnectionFactory.connect(params);
+            hdbManager = ArchivingManagerApiRefFactory.getInstance(true, hdbConnector);
+            hdbManager.archivingConfigure();
+        } catch (ArchivingException e) {
+            throw e.toTangoException();
+        }
+    }
+
+    protected void connectTdb() throws DevFailed {
+        final DataBaseParameters params = new DataBaseParameters();
+        params.setParametersFromTango(ConfigConst.TDB_CLASS_DEVICE);
+        if (!tdbHost.isEmpty())
+            params.setHost(tdbHost);
+        if (!tdbUser.isEmpty())
+            params.setUser(tdbUser);
+        if (!tdbPassword.isEmpty())
+            params.setPassword(tdbPassword);
+        if (!tdbName.isEmpty())
+            params.setName(tdbName);
+        if (!tdbSchema.isEmpty())
+            params.setSchema(tdbSchema);
+        if (tdbRacOverride)
+            params.setRac(tdbRacConnection);
+        try {
+            final AbstractDataBaseConnector connector = ConnectionFactory.connect(params);
+            tdbManager = ArchivingManagerApiRefFactory.getInstance(false, connector);
+            tdbManager.archivingConfigure();
+        } catch (ArchivingException e) {
+            throw e.toTangoException();
+        }
+    }
+
+    private void connect() {
+        boolean isHdbOK;
+        StringBuilder statusBuilder = new StringBuilder();
+        try {
+            connectHdb();
+            isHdbOK = true;
+            statusBuilder.append("- HDB Archivers: ").append(Arrays.toString(hdbManager.getMExportedArchiverList()))
+                    .append("\n");
+        } catch (DevFailed e) {
+            isHdbOK = false;
+            statusBuilder.append("- HDB is not available").append("\n");
+        }
+        boolean isTdbOK;
+        try {
+            connectTdb();
+            isTdbOK = true;
+            statusBuilder.append("- TDB Archivers: ").append(Arrays.toString(tdbManager.getMExportedArchiverList()))
+                    .append("\n");
+        } catch (DevFailed e) {
+            isTdbOK = false;
+            statusBuilder.append("- TDB is not available").append("\n");
+        }
+        state = DeviceState.ON;
+        status = statusBuilder.toString();
+    }
+
+    @Init
+    public void init() throws DevFailed, ArchivingException {
+        hdbRacOverride = false;
+        tdbRacOverride = false;
+        connect();
+    }
+
+    public String getStatus() {
+        return status;
+    }
+
+    public void setStatus(String status) {
+        this.status = status;
+    }
+
+    /**
+     * Execute command "ArchivingStartHdb" on device. Start an historical
+     * archiving for the specified attributes, and following the specified mode.
+     *
+     * @param argin Archiving arguments... <BR>
+     *              <blockquote>
+     *              <ul>
+     *              <li><strong>The first part :</strong>
+     *              <ul>
+     *              <li><var>argin</var>[0]<b> =</b> the load balancing type of the archiving<br>
+     *              &quot;1&quot;, if all the attribute are archived together in the same HdbArchiver device, <br>
+     *              &quot;0&quot; otherwise.
+     *              <li><var>argin</var>[1]<b> =</b> the number of attributes to archive<br>
+     *              <li><var>argin</var>[2] to <var>argin</var> [2 + <var>argin</var>[1] - 1] = the name of each attribute
+     *              </ul>
+     *              <li><strong>The second part (the <i>Mode </i>part) :</strong> <br>
+     *              Let us note <i>&quot;<var>index</var>&quot; </i>the last <var>index</var> used (for example, at this
+     *              point, <i><var>index</var></i> = 2]).
+     *              <ul>
+     *              <li><strong>If the Mode is composed of a <i>Periodical Mode</i></strong><br>
+     *              <var>argin</var>[<var>index</var>+ 1] = <code>MODE_P</code><br>
+     *              <var>argin</var>[<var>index</var>+ 2] = the period of the periodic mode in (ms)<br>
+     *              <var>index</var> = <var>index</var> + 2<br>
+     *              <li><strong>If the Mode is composed of an <i>Absolute Mode</i></strong><br>
+     *              <var>argin</var>[<var>index</var>+ 1] = <code>MODE_A</code><br>
+     *              <var>argin</var>[<var>index</var>+ 2] = the frequency of the <i>absolute mode </i>in (ms)<br>
+     *              <var>argin</var>[<var>index</var>+ 3] = the delta value max when decreasing<br>
+     *              <var>argin</var>[<var>index</var>+ 4] = the delta value max when increasing<br>
+     *              <var>index</var> = <var>index</var> + 4<br>
+     *              <li><strong>If the Mode is composed of a <i>Relative Mode</i></strong><br>
+     *              <var>argin</var>[<var>index</var>+ 1] = <code>MODE_R</code><br>
+     *              <var>argin</var>[<var>index</var>+ 2] = the <i>frequency </i>of the <i>relative mode </i>in (ms)<br>
+     *              <var>argin</var>[<var>index</var>+ 3] = the <i>decreasing variation </i>associated to this mode<br>
+     *              <var>argin</var>[<var>index</var>+ 4] = the <i>increasing variation </i>associated to this mode<br>
+     *              <var>index</var> = <var>index</var> + 4<br>
+     *              <li><strong>If the Mode is composed of an <i>Threshold Mode</i></strong><br>
+     *              <var>argin</var>[<var>index</var>+ 1] = <code>MODE_T</code><br>
+     *              <var>argin</var>[<var>index</var>+ 2] = the frequency of the <i>threshold mode </i>in (ms)<br>
+     *              <var>argin</var>[<var>index</var>+ 3] = the smallest value (min) when decreasing<br>
+     *              <var>argin</var>[<var>index</var>+ 4] = the biggest value (max) when increasing<br>
+     *              <var>index</var> = <var>index</var> + 4<br>
+     *              <li>If the Mode is composed of a <i>On Calculation Mode</i></strong><br>
+     *              <var>argin</var>[<var>index</var>+ 1] = <code>MODE_C</code><br>
+     *              <var>argin</var>[<var>index</var>+ 2] = the <i>frequency </i>of the <i>on calculation mode </i>in (ms)
+     *              <br>
+     *              <var>argin</var>[<var>index</var>+ 3] = the <i>number of values</i> taken into account<br>
+     *              <var>argin</var>[<var>index</var>+ 4] = the <i>type </i>associated to this mode<br>
+     *              <var>argin</var>[<var>index</var>+ 5] = Not used at the moment <br>
+     *              <var>index</var> = <var>index</var> + 5<br>
+     *              <li><strong>If the Mode is composed of an <i>On Difference Mode</i></strong><br>
+     *              <var>argin</var>[<var>index</var>+ 1] = <code>MODE_D</code><br>
+     *              <var>argin</var>[<var>index</var>+ 2] = the <i>frequency </i>of this<i> mode </i>(in ms)<br>
+     *              <var>index</var> = <var>index</var> + 2<br>
+     *              <li><strong>If the Mode is composed of an <i>External Mode</i></strong><br>
+     *              <var>argin</var>[<var>index</var>+ 1] = <code>MODE_E</code><br>
+     *              <var>index</var> = <var>index</var> + 1<br>
+     *              </ul>
+     *              </ul>
+     *              </blockquote>
+     * @see fr.soleil.archiving.hdbtdb.api.tools.ArchivingMessConfig
+     */
+    @Command(name = "ArchivingStartHdb")
+    public void archivingStartHdb(final String[] argin) throws DevFailed {
+        logger.info("Entering archiving_start_hdb()");
+        if (hdbManager == null) {
+            connectHdb();
+        }
+        if (hdbManager != null) {
+            try {
+                final ArchivingMessConfig archivingMessConfig = ArchivingMessConfig
+                        .creationWithoutFullInformation(argin);
+                hdbManager.archivingStart(archivingMessConfig);
+            } catch (Exception e) {
+                if (e instanceof DevFailed) {
+                    throw (DevFailed) e;
+                } else if (e instanceof ArchivingException) {
+                    ArchivingException ae = (ArchivingException) e;
+                    ae.printStackTrace();
+                    logger.warn(ae.toString(), ae);
+                    throw ae.toTangoException();
+                } else {
+                    logger.error("unexpected error on hdb archiving start", e);
+                }
+            }
+        }
+        logger.info("Exiting archiving_start_hdb()");
+    }
+
+    /**
+     * Execute command "ArchivingStartTdb" on device. Start an temporary
+     * archiving for the specified attributes, and following the specified mode.
+     *
+     * @param argin Archiving arguments... <BR>
+     *              <blockquote>
+     *              <ul>
+     *              <li><strong>The first part :</strong>
+     *              <ul>
+     *              <li><var>argin</var>[0]<b> =</b> the load balancing type of the archiving<br>
+     *              &quot;1&quot;, if all the attribute are archived together in the same HdbArchiver device, <br>
+     *              &quot;0&quot; otherwise.
+     *              <li><var>argin</var>[1]<b> =</b> the number of attributes to archive<br>
+     *              <li><var>argin</var>[2] to <var>argin</var> [2 + <var>argin</var>[1] - 1] = the name of each attribute
+     *              </ul>
+     *              <li><strong>The second part (the <i>Mode </i>part) :</strong> <br>
+     *              Let us note <i>&quot;<var>index</var>&quot; </i>the last <var>index</var> used (for example, at this
+     *              point, <i><var>index</var></i> = 2]).
+     *              <ul>
+     *              <li><strong>If the Mode is composed of a <i>Periodical Mode</i></strong><br>
+     *              <var>argin</var>[<var>index</var>+ 1] = <code>MODE_P</code><br>
+     *              <var>argin</var>[<var>index</var>+ 2] = the period of the periodic mode in (ms)<br>
+     *              <var>index</var> = <var>index</var> + 2<br>
+     *              <li><strong>If the Mode is composed of an <i>Absolute Mode</i></strong><br>
+     *              <var>argin</var>[<var>index</var>+ 1] = <code>MODE_A</code><br>
+     *              <var>argin</var>[<var>index</var>+ 2] = the frequency of the <i>absolute mode </i>in (ms)<br>
+     *              <var>argin</var>[<var>index</var>+ 3] = the delta value max when decreasing<br>
+     *              <var>argin</var>[<var>index</var>+ 4] = the delta value max when increasing<br>
+     *              <var>index</var> = <var>index</var> + 4<br>
+     *              <li><strong>If the Mode is composed of a <i>Relative Mode</i></strong><br>
+     *              <var>argin</var>[<var>index</var>+ 1] = <code>MODE_R</code><br>
+     *              <var>argin</var>[<var>index</var>+ 2] = the <i>frequency </i>of the <i>relative mode </i>in (ms)<br>
+     *              <var>argin</var>[<var>index</var>+ 3] = the <i>decreasing variation </i>associated to this mode<br>
+     *              <var>argin</var>[<var>index</var>+ 4] = the <i>increasing variation </i>associated to this mode<br>
+     *              <var>index</var> = <var>index</var> + 4<br>
+     *              <li><strong>If the Mode is composed of an <i>Threshold Mode</i></strong><br>
+     *              <var>argin</var>[<var>index</var>+ 1] = <code>MODE_T</code><br>
+     *              <var>argin</var>[<var>index</var>+ 2] = the frequency of the <i>threshold mode </i>in (ms)<br>
+     *              <var>argin</var>[<var>index</var>+ 3] = the smallest value (min) when decreasing<br>
+     *              <var>argin</var>[<var>index</var>+ 4] = the biggest value (max) when increasing<br>
+     *              <var>index</var> = <var>index</var> + 4<br>
+     *              <li>If the Mode is composed of a <i>On Calculation Mode</i></strong><br>
+     *              <var>argin</var>[<var>index</var>+ 1] = <code>MODE_C</code><br>
+     *              <var>argin</var>[<var>index</var>+ 2] = the <i>frequency </i>of the <i>on calculation mode </i>in (ms)
+     *              <br>
+     *              <var>argin</var>[<var>index</var>+ 3] = the <i>number of values</i> taken into account<br>
+     *              <var>argin</var>[<var>index</var>+ 4] = the <i>type </i>associated to this mode<br>
+     *              <var>argin</var>[<var>index</var>+ 5] = Not used at the moment <br>
+     *              <var>index</var> = <var>index</var> + 5<br>
+     *              <li><strong>If the Mode is composed of an <i>On Difference Mode</i></strong><br>
+     *              <var>argin</var>[<var>index</var>+ 1] = <code>MODE_D</code><br>
+     *              <var>argin</var>[<var>index</var>+ 2] = the <i>frequency </i>of this<i> mode </i>(in ms)<br>
+     *              <var>index</var> = <var>index</var> + 2<br>
+     *              <li><strong>If the Mode is composed of an <i>External Mode</i></strong><br>
+     *              <var>argin</var>[<var>index</var>+ 1] = <code>MODE_E</code><br>
+     *              <var>index</var> = <var>index</var> + 1<br>
+     *              <li><strong>The Temporary (<i>Intermediate Archiving</i>) archiving specific informations </strong><br>
+     *              <var>argin</var>[<var>index</var>+ 1] = <code>TDB_SPEC</code><br>
+     *              <var>argin</var>[<var>index</var>+ 2] = the <i>export frequency </i>(ms)<br>
+     *              <var>argin</var>[<var>index</var>+ 3] = the <i>keeping window duration </i>in (ms)<br>
+     *              <var>index</var> = <var>index</var> + 3<br>
+     *              </ul>
+     *              </ul>
+     *              </blockquote>
+     * @see fr.soleil.archiving.hdbtdb.api.tools.ArchivingMessConfig
+     */
+    @Command(name = "ArchivingStartTdb")
+    public void archivingStartTdb(final String[] argin) throws DevFailed {
+        logger.info("Entering archiving_start_tdb()");
+        if (tdbManager == null) {
+            connectTdb();
+        }
+        final ArchivingMessConfig archivingMessConfig = ArchivingMessConfig.creationWithoutFullInformation(argin);
+        try {
+            tdbManager.archivingStart(archivingMessConfig);
+        } catch (final ArchivingException e) {
+            logger.warn(e.toString(), e);
+            throw e.toTangoException();
+        }
+        logger.info("Exiting archiving_start_tdb()");
+    }
+
+    /**
+     * Execute command "ArchivingStopHdb" on device. Stops the historical
+     * archiving for the given attributes.
+     *
+     * @param argin The attribute list.
+     */
+    @Command(name = "ArchivingStopHdb")
+    public void archivingStopHdb(final String[] argin) throws DevFailed {
+        logger.info("Entering archiving_stop_hdb()");
+        if (hdbManager == null) {
+            connectHdb();
+        }
+        try {
+            hdbManager.archivingStopConf(argin);
+        } catch (final ArchivingException e) {
+            logger.warn(e.toString(), e);
+            throw e.toTangoException();
+        }
+    }
+
+    /**
+     * Execute command "ArchivingStopTdb" on device. Stops the temporary
+     * archiving for the given attributes.
+     *
+     * @param argin The attribute list.
+     */
+    @Command(name = "ArchivingStopTdb")
+    public void archivingStopTdb(final String[] argin) throws DevFailed {
+        logger.info("Entering archiving_stop_tdb()");
+        if (tdbManager == null) {
+            connectTdb();
+        }
+        try {
+            tdbManager.archivingStopConf(argin);
+        } catch (final ArchivingException e) {
+            logger.warn(e.toString(), e);
+            throw e.toTangoException();
+        }
+        logger.info("Exiting archiving_stop_tdb()");
+    }
+
+    /**
+     * Execute command "ArchivingModifHdb" on device. Change the mode of an
+     * historical archiving.
+     *
+     * @param argin The configuration to switch to... <br>
+     *              <blockquote>
+     *              <ul>
+     *              <li><strong>The first part :</strong>
+     *              <ul>
+     *              <li><var>argin</var>[0]<b> =</b> the load balancing type of the archiving<br>
+     *              &quot;1&quot;, if all the attribute are archived together in the same TdbArchiver device, <br>
+     *              &quot;0&quot; otherwise.
+     *              <li><var>argin</var>[1]<b> =</b> the number of attributes to archive<br>
+     *              <li><var>argin</var>[2] to <var>argin</var> [2 + <var>argin</var>[1] - 1] = the name of each attribute
+     *              </ul>
+     *              <li><strong>The second part (the <i>Mode </i>part) :</strong> <br>
+     *              Let us note <i>&quot;<var>index</var>&quot; </i>the last <var>index</var> used (for example, at this
+     *              point, <i><var>index</var></i> = 2]).
+     *              <ul>
+     *              <li><strong>If the Mode is composed of a <i>Periodical Mode</i></strong><br>
+     *              <var>argin</var>[<var>index</var>+ 1] = <code>MODE_P</code><br>
+     *              <var>argin</var>[<var>index</var>+ 2] = the period of the periodic mode in (ms)<br>
+     *              <var>index</var> = <var>index</var> + 2<br>
+     *              <li><strong>If the Mode is composed of an <i>Absolute Mode</i></strong><br>
+     *              <var>argin</var>[<var>index</var>+ 1] = <code>MODE_A</code><br>
+     *              <var>argin</var>[<var>index</var>+ 2] = the frequency of the <i>absolute mode </i>in (ms)<br>
+     *              <var>argin</var>[<var>index</var>+ 3] = the delta value max when decreasing<br>
+     *              <var>argin</var>[<var>index</var>+ 4] = the delta value max when increasing<br>
+     *              <var>index</var> = <var>index</var> + 4<br>
+     *              <li><strong>If the Mode is composed of a <i>Relative Mode</i></strong><br>
+     *              <var>argin</var>[<var>index</var>+ 1] = <code>MODE_R</code><br>
+     *              <var>argin</var>[<var>index</var>+ 2] = the <i>frequency </i>of the <i>relative mode </i>in (ms)<br>
+     *              <var>argin</var>[<var>index</var>+ 3] = the <i>decreasing variation </i>associated to this mode<br>
+     *              <var>argin</var>[<var>index</var>+ 4] = the <i>increasing variation </i>associated to this mode<br>
+     *              <var>index</var> = <var>index</var> + 4<br>
+     *              <li><strong>If the Mode is composed of an <i>Threshold Mode</i></strong><br>
+     *              <var>argin</var>[<var>index</var>+ 1] = <code>MODE_T</code><br>
+     *              <var>argin</var>[<var>index</var>+ 2] = the frequency of the <i>threshold mode </i>in (ms)<br>
+     *              <var>argin</var>[<var>index</var>+ 3] = the smallest value (min) when decreasing<br>
+     *              <var>argin</var>[<var>index</var>+ 4] = the biggest value (max) when increasing<br>
+     *              <var>index</var> = <var>index</var> + 4<br>
+     *              <li>If the Mode is composed of a <i>On Calculation Mode</i></strong><br>
+     *              <var>argin</var>[<var>index</var>+ 1] = <code>MODE_C</code><br>
+     *              <var>argin</var>[<var>index</var>+ 2] = the <i>frequency </i>of the <i>on calculation mode </i>in (ms)
+     *              <br>
+     *              <var>argin</var>[<var>index</var>+ 3] = the <i>number of values</i> taken into account<br>
+     *              <var>argin</var>[<var>index</var>+ 4] = the <i>type </i>associated to this mode<br>
+     *              <var>argin</var>[<var>index</var>+ 5] = Not used at the moment <br>
+     *              <var>index</var> = <var>index</var> + 5<br>
+     *              <li><strong>If the Mode is composed of an <i>On Difference Mode</i></strong><br>
+     *              <var>argin</var>[<var>index</var>+ 1] = <code>MODE_D</code><br>
+     *              <var>argin</var>[<var>index</var>+ 2] = the <i>frequency </i>of this<i> mode </i>(in ms)<br>
+     *              <var>index</var> = <var>index</var> + 2<br>
+     *              <li><strong>If the Mode is composed of an <i>External Mode</i></strong><br>
+     *              <var>argin</var>[<var>index</var>+ 1] = <code>MODE_E</code><br>
+     *              <var>index</var> = <var>index</var> + 1<br>
+     *              </ul>
+     *              </ul>
+     *              </blockquote>
+     * @see fr.soleil.archiving.hdbtdb.api.tools.ArchivingMessConfig
+     */
+    @Command(name = "ArchivingModifHdb")
+    public void archivingModifHdb(final String[] argin) throws DevFailed {
+        logger.info("Entering archiving_modif_hdb()");
+        if (hdbManager == null) {
+            connectHdb();
+        }
+        final ArchivingMessConfig archivingMessConfig = ArchivingMessConfig.creationWithoutFullInformation(argin);
+        try {
+            hdbManager.archivingStopConf(archivingMessConfig.getAttributeList());
+            archivingStartHdb(argin);
+        } catch (final ArchivingException e) {
+            logger.warn(e.toString(), e);
+            throw e.toTangoException();
+        }
+        logger.info("Exiting archiving_modif_hdb()");
+    }
+
+    /**
+     * Execute command "ArchivingModifTdb" on device. Change the mode of a
+     * temporary archiving.
+     *
+     * @param argin The configuration to switch to...... <br>
+     *              <blockquote>
+     *              <ul>
+     *              <li><strong>The first part :</strong>
+     *              <ul>
+     *              <li><var>argin</var>[0]<b> =</b> the load balancing type of the archiving<br>
+     *              &quot;1&quot;, if all the attribute are archived together in the same TdbArchiver device, <br>
+     *              &quot;0&quot; otherwise.
+     *              <li><var>argin</var>[1]<b> =</b> the number of attributes to archive<br>
+     *              <li><var>argin</var>[2] to <var>argin</var> [2 + <var>argin</var>[1] - 1] = the name of each attribute
+     *              </ul>
+     *              <li><strong>The second part (the <i>Mode </i>part) :</strong> <br>
+     *              Let us note <i>&quot;<var>index</var>&quot; </i>the last <var>index</var> used (for example, at this
+     *              point, <i><var>index</var></i> = 2]).
+     *              <ul>
+     *              <li><strong>If the Mode is composed of a <i>Periodical Mode</i></strong><br>
+     *              <var>argin</var>[<var>index</var>+ 1] = <code>MODE_P</code><br>
+     *              <var>argin</var>[<var>index</var>+ 2] = the period of the periodic mode in (ms)<br>
+     *              <var>index</var> = <var>index</var> + 2<br>
+     *              <li><strong>If the Mode is composed of an <i>Absolute Mode</i></strong><br>
+     *              <var>argin</var>[<var>index</var>+ 1] = <code>MODE_A</code><br>
+     *              <var>argin</var>[<var>index</var>+ 2] = the frequency of the <i>absolute mode </i>in (ms)<br>
+     *              <var>argin</var>[<var>index</var>+ 3] = the delta value max when decreasing<br>
+     *              <var>argin</var>[<var>index</var>+ 4] = the delta value max when increasing<br>
+     *              <var>index</var> = <var>index</var> + 4<br>
+     *              <li><strong>If the Mode is composed of a <i>Relative Mode</i></strong><br>
+     *              <var>argin</var>[<var>index</var>+ 1] = <code>MODE_R</code><br>
+     *              <var>argin</var>[<var>index</var>+ 2] = the <i>frequency </i>of the <i>relative mode </i>in (ms)<br>
+     *              <var>argin</var>[<var>index</var>+ 3] = the <i>decreasing variation </i>associated to this mode<br>
+     *              <var>argin</var>[<var>index</var>+ 4] = the <i>increasing variation </i>associated to this mode<br>
+     *              <var>index</var> = <var>index</var> + 4<br>
+     *              <li><strong>If the Mode is composed of an <i>Threshold Mode</i></strong><br>
+     *              <var>argin</var>[<var>index</var>+ 1] = <code>MODE_T</code><br>
+     *              <var>argin</var>[<var>index</var>+ 2] = the frequency of the <i>threshold mode </i>in (ms)<br>
+     *              <var>argin</var>[<var>index</var>+ 3] = the smallest value (min) when decreasing<br>
+     *              <var>argin</var>[<var>index</var>+ 4] = the biggest value (max) when increasing<br>
+     *              <var>index</var> = <var>index</var> + 4<br>
+     *              <li>If the Mode is composed of a <i>On Calculation Mode</i></strong><br>
+     *              <var>argin</var>[<var>index</var>+ 1] = <code>MODE_C</code><br>
+     *              <var>argin</var>[<var>index</var>+ 2] = the <i>frequency </i>of the <i>on calculation mode </i>in (ms)
+     *              <br>
+     *              <var>argin</var>[<var>index</var>+ 3] = the <i>number of values</i> taken into account<br>
+     *              <var>argin</var>[<var>index</var>+ 4] = the <i>type </i>associated to this mode<br>
+     *              <var>argin</var>[<var>index</var>+ 5] = Not used at the moment <br>
+     *              <var>index</var> = <var>index</var> + 5<br>
+     *              <li><strong>If the Mode is composed of an <i>On Difference Mode</i></strong><br>
+     *              <var>argin</var>[<var>index</var>+ 1] = <code>MODE_D</code><br>
+     *              <var>argin</var>[<var>index</var>+ 2] = the <i>frequency </i>of this<i> mode </i>(in ms)<br>
+     *              <var>index</var> = <var>index</var> + 2<br>
+     *              <li><strong>If the Mode is composed of an <i>External Mode</i></strong><br>
+     *              <var>argin</var>[<var>index</var>+ 1] = <code>MODE_E</code><br>
+     *              <var>index</var> = <var>index</var> + 1<br>
+     *              <li><strong>The Temporary (<i>Intermediate Archiving</i>) archiving specific informations </strong><br>
+     *              <var>argin</var>[<var>index</var>+ 1] = <code>TDB_SPEC</code><br>
+     *              <var>argin</var>[<var>index</var>+ 2] = the <i>export frequency </i>(ms)<br>
+     *              <var>argin</var>[<var>index</var>+ 3] = the <i>keeping window duration </i>in (ms)<br>
+     *              <var>index</var> = <var>index</var> + 3<br>
+     *              </ul>
+     *              </ul>
+     *              </blockquote>
+     * @see fr.soleil.archiving.hdbtdb.api.tools.ArchivingMessConfig
+     */
+    @Command(name = "ArchivingModifTdb")
+    public void archivingModifTdb(final String[] argin) throws DevFailed {
+        logger.info("Entering archiving_modif_tdb()");
+        if (tdbManager == null) {
+            connectTdb();
+        }
+        final ArchivingMessConfig archivingMessConfig = ArchivingMessConfig.creationWithoutFullInformation(argin);
+        try {
+            tdbManager.archivingStopConf(archivingMessConfig.getAttributeList());
+            archivingStartTdb(argin);
+        } catch (final ArchivingException e) {
+            logger.warn(e.toString(), e);
+            throw e.toTangoException();
+        }
+        logger.info("Exiting archiving_modif_tdb()");
+    }
+
+    /**
+     * Execute command "IsArchivedHdb" on device. Check the archiving state
+     * (historical archiving) for each attribute of the given list.
+     *
+     * @param argin The attribute list.
+     * @return For each attribute of the given list...<br>
+     * <ul>
+     * <li><code>1</code>, if the attribute is currently being archived (historical archiving)
+     * <li><code>0</code>, otherwise
+     * </ul>
+     */
+    @Command(name = "IsArchivedHdb")
+    public short[] isArchivedHdb(final String[] argin) throws DevFailed {
+        logger.info("Entering is_archived_hdb()");
+        if (hdbManager == null) {
+            connectHdb();
+        }
+        short[] argout = new short[argin.length];
+
+        boolean result = false;
+        for (int i = 0; i < argin.length; i++) {
+            try {
+                result = hdbManager.isArchived(argin[i]);
+            } catch (final ArchivingException e) {
+                logger.warn(e.toString(), e);
+                throw e.toTangoException();
+            }
+            if (result) {
+                argout[i] = 1;
+            } else {
+                argout[i] = 0;
+            }
+        }
+
+        logger.info("Exiting is_archived_hdb()");
+        return argout;
+    }
+
+    /**
+     * Execute command "IsArchivedTdb" on device. Check the archiving state
+     * (temporary archiving) for each attribute of the given list.
+     *
+     * @param argin The attribute list.
+     * @return For each attribute of the given list...<br>
+     * <ul>
+     * <li><code>1</code>, if the attribute is currently being archived (temporary archiving)
+     * <li><code>0</code>, otherwise
+     * </ul>
+     */
+    @Command(name = "IsArchivedTdb")
+    public short[] isArchivedTdb(final String[] argin) throws DevFailed {
+        logger.info("Entering is_archived_tdb()");
+        short[] argout = new short[argin.length];
+        if (tdbManager == null) {
+            connectTdb();
+        }
+        boolean result = false;
+        for (int i = 0; i < argin.length; i++) {
+            try {
+                result = tdbManager.isArchived(argin[i]);
+            } catch (final ArchivingException e) {
+                logger.warn(e.toString(), e);
+                throw e.toTangoException();
+            }
+            if (result) {
+                argout[i] = 1;
+            } else {
+                argout[i] = 0;
+            }
+        }
+        logger.info("Exiting is_archived_tdb()");
+        return argout;
+    }
+
+    /**
+     * Execute command "GetArchivingModeHdb" on device. Return the historical
+     * archiving mode applied to an attribute.
+     *
+     * @param argin The attribute name.
+     * @return The applied mode... <br>
+     * <blockquote>
+     * <ul>
+     * Let us note <i>&quot;<var>index</var>&quot; </i>the last <var>index</var> used (for example, at this
+     * point, <i><var>index</var></i> = 0]).
+     * <li><strong>If the Mode is composed of a <i>Periodical Mode</i></strong><br>
+     * <var>argout</var>[<var>index</var>] = <code>MODE_P</code><br>
+     * <var>argout</var>[<var>index</var> + 1] = the period of the periodic mode in (ms)<br>
+     * <var>index</var> = <var>index</var> + 2<br>
+     * <li><strong>If the Mode is composed of an <i>Absolute Mode</i></strong><br>
+     * <var>argout</var>[<var>index</var>] = <code>MODE_A</code><br>
+     * <var>argout</var>[<var>index</var>+ 1] = the frequency of the <i>absolute mode </i>in (ms)<br>
+     * <var>argout</var>[<var>index</var>+ 2] = the delta value max when decreasing<br>
+     * <var>argout</var>[<var>index</var>+ 3] = the delta value max when increasing<br>
+     * <var>index</var> = <var>index</var> + 4<br>
+     * <li><strong>If the Mode is composed of a <i>Relative Mode</i></strong><br>
+     * <var>argout</var>[<var>index</var>] = <code>MODE_R</code><br>
+     * <var>argout</var>[<var>index</var>+ 1] = the <i>frequency </i>of the <i>relative mode </i>in (ms)<br>
+     * <var>argout</var>[<var>index</var>+ 2] = the <i>decreasing variation </i>associated to this mode<br>
+     * <var>argout</var>[<var>index</var>+ 3] = the <i>increasing variation </i>associated to this mode<br>
+     * <var>index</var> = <var>index</var> + 4<br>
+     * <li><strong>If the Mode is composed of an <i>Threshold Mode</i></strong><br>
+     * <var>argout</var>[<var>index</var>] = <code>MODE_T</code><br>
+     * <var>argout</var>[<var>index</var>+ 1] = the frequency of the <i>threshold mode </i>in (ms)<br>
+     * <var>argout</var>[<var>index</var>+ 2] = the smallest value (min) when decreasing<br>
+     * <var>argout</var>[<var>index</var>+ 3] = the biggest value (max) when increasing<br>
+     * <var>index</var> = <var>index</var> + 4<br>
+     * <li>If the Mode is composed of a <i>On Calculation Mode</i></strong><br>
+     * <var>argout</var>[<var>index</var>] = <code>MODE_C</code><br>
+     * <var>argout</var>[<var>index</var>+ 1] = the <i>frequency </i>of the <i>on calculation mode </i>in (ms)<br>
+     * <var>argout</var>[<var>index</var>+ 2] = the <i>number of values</i> taken into account<br>
+     * <var>argout</var>[<var>index</var>+ 3] = the <i>type </i>associated to this mode<br>
+     * <var>argout</var>[<var>index</var>+ 4] = Not used at the moment <br>
+     * <var>index</var> = <var>index</var> + 5<br>
+     * <li><strong>If the Mode is composed of an <i>On Difference Mode</i></strong><br>
+     * <var>argout</var>[<var>index</var>] = <code>MODE_D</code><br>
+     * <var>argout</var>[<var>index</var>+ 1] = the <i>frequency </i>of this<i> mode </i>(in ms)<br>
+     * <var>index</var> = <var>index</var> + 2<br>
+     * <li><strong>If the Mode is composed of an <i>External Mode</i></strong><br>
+     * <var>argout</var>[<var>index</var>] = <code>MODE_E</code><br>
+     * <var>index</var> = <var>index</var> + 1<br>
+     * </ul>
+     * </blockquote>
+     */
+    @Command(name = "GetArchivingModeHdb")
+    public String[] getArchivingModeHdb(final String argin) throws DevFailed {
+        logger.info("Entering get_archiving_mode_hdb()");
+        if (hdbManager == null) {
+            connectHdb();
+        }
+        String[] argout;
+        try {
+            final Mode mode = hdbManager.getArchivingMode(argin);
+            argout = mode.toArray();
+        } catch (final ArchivingException e) {
+            logger.error(e.getMessage());
+            throw e.toTangoException();
+        }
+        logger.info("Exiting get_archiving_mode_hdb()");
+        return argout;
+    }
+
+    /**
+     * Execute command "GetArchivingModeTdb" on device. Return the temporary
+     * archiving mode applied to an attribute.
+     *
+     * @param argin The attribute name.
+     * @return The applied mode... <br>
+     * <blockquote>
+     * <ul>
+     * Let us note <i>&quot;<var>index</var>&quot; </i>the last <var>index</var> used (for example, at this
+     * point, <i><var>index</var></i> = 0]).
+     * <li><strong>If the Mode is composed of a <i>Periodical Mode</i></strong><br>
+     * <var>argout</var>[<var>index</var>] = <code>MODE_P</code><br>
+     * <var>argout</var>[<var>index</var> + 1] = the period of the periodic mode in (ms)<br>
+     * <var>index</var> = <var>index</var> + 2<br>
+     * <li><strong>If the Mode is composed of an <i>Absolute Mode</i></strong><br>
+     * <var>argout</var>[<var>index</var>] = <code>MODE_A</code><br>
+     * <var>argout</var>[<var>index</var>+ 1] = the frequency of the <i>absolute mode </i>in (ms)<br>
+     * <var>argout</var>[<var>index</var>+ 2] = the delta value max when decreasing<br>
+     * <var>argout</var>[<var>index</var>+ 3] = the delta value max when increasing<br>
+     * <var>index</var> = <var>index</var> + 4<br>
+     * <li><strong>If the Mode is composed of a <i>Relative Mode</i></strong><br>
+     * <var>argout</var>[<var>index</var>] = <code>MODE_R</code><br>
+     * <var>argout</var>[<var>index</var>+ 1] = the <i>frequency </i>of the <i>relative mode </i>in (ms)<br>
+     * <var>argout</var>[<var>index</var>+ 2] = the <i>decreasing variation </i>associated to this mode<br>
+     * <var>argout</var>[<var>index</var>+ 3] = the <i>increasing variation </i>associated to this mode<br>
+     * <var>index</var> = <var>index</var> + 4<br>
+     * <li><strong>If the Mode is composed of an <i>Threshold Mode</i></strong><br>
+     * <var>argout</var>[<var>index</var>] = <code>MODE_T</code><br>
+     * <var>argout</var>[<var>index</var>+ 1] = the frequency of the <i>threshold mode </i>in (ms)<br>
+     * <var>argout</var>[<var>index</var>+ 2] = the smallest value (min) when decreasing<br>
+     * <var>argout</var>[<var>index</var>+ 3] = the biggest value (max) when increasing<br>
+     * <var>index</var> = <var>index</var> + 4<br>
+     * <li>If the Mode is composed of a <i>On Calculation Mode</i></strong><br>
+     * <var>argout</var>[<var>index</var>] = <code>MODE_C</code><br>
+     * <var>argout</var>[<var>index</var>+ 1] = the <i>frequency </i>of the <i>on calculation mode </i>in (ms)<br>
+     * <var>argout</var>[<var>index</var>+ 2] = the <i>number of values</i> taken into account<br>
+     * <var>argout</var>[<var>index</var>+ 3] = the <i>type </i>associated to this mode<br>
+     * <var>argout</var>[<var>index</var>+ 4] = Not used at the moment <br>
+     * <var>index</var> = <var>index</var> + 5<br>
+     * <li><strong>If the Mode is composed of an <i>On Difference Mode</i></strong><br>
+     * <var>argout</var>[<var>index</var>] = <code>MODE_D</code><br>
+     * <var>argout</var>[<var>index</var>+ 1] = the <i>frequency </i>of this<i> mode </i>(in ms)<br>
+     * <var>index</var> = <var>index</var> + 2<br>
+     * <li><strong>If the Mode is composed of an <i>External Mode</i></strong><br>
+     * <var>argout</var>[<var>index</var>] = <code>MODE_E</code><br>
+     * <var>index</var> = <var>index</var> + 1<br>
+     * <li><strong>The Temporary (<i>Intermediate Archiving</i>) archiving specific informations </strong><br>
+     * <var>argout</var>[<var>index</var>] = <code>TDB_SPEC</code><br>
+     * <var>argout</var>[<var>index</var>+ 1] = the <i>export frequency </i>(ms)<br>
+     * <var>argout</var>[<var>index</var>+ 2] = the <i>keeping window duration </i>in (ms)<br>
+     * <var>index</var> = <var>index</var> + 3<br>
+     * </ul>
+     * </blockquote>
+     */
+    @Command(name = "GetArchivingModeTdb")
+    public String[] getArchivingModeTdb(final String argin) throws DevFailed {
+        logger.info("Entering get_archiving_mode_tdb()");
+        String[] argout;
+        if (tdbManager == null) {
+            connectTdb();
+        }
+        try {
+            final Mode mode = tdbManager.getArchivingMode(argin);
+            argout = mode.toArray();
+        } catch (final ArchivingException e) {
+            logger.error(e.getMessage());
+            throw e.toTangoException();
+        }
+
+        logger.info("Exiting get_archiving_mode_tdb()");
+        return argout;
+    }
+
+    /**
+     * Execute command "GetStatusHdb" on device. For each attribute of the given
+     * list, get the status of the device in charge of its historical archiving
+     *
+     * @param argin The attribute list.
+     * @return The list of status.
+     */
+    @Command(name = "GetStatusHdb")
+    public String[] getStatusHdb(final String[] argin) throws DevFailed {
+        logger.info("Entering get_status_hdb()");
+        if (hdbManager == null) {
+            connectHdb();
+        }
+        String[] argout = new String[argin.length];
+
+        for (int i = 0; i < argin.length; i++) {
+            try {
+                argout[i] = hdbManager.getStatus(argin[i]);
+            } catch (final ArchivingException e) {
+                throw e.toTangoException();
+            }
+        }
+        logger.info("Exiting get_status_hdb()");
+        return argout;
+    }
+
+    /**
+     * Execute command "GetStatusTdb" on device. For each attribute of the given
+     * list, get the status of the device in charge of its temporary archiving.
+     *
+     * @param argin The attribute list.
+     * @return The list of status.
+     */
+    @Command(name = "GetStatusTdb")
+    public String[] getStatusTdb(final String[] argin) throws DevFailed {
+        logger.info("Entering get_status_tdb()");
+        String[] argout = new String[argin.length];
+        if (tdbManager == null) {
+            connectTdb();
+        }
+        for (int i = 0; i < argin.length; i++) {
+            try {
+                argout[i] = tdbManager.getStatus(argin[i]);
+            } catch (final ArchivingException e) {
+                throw e.toTangoException();
+            }
+        }
+        logger.info("Exiting get_status_tdb()");
+        return argout;
+    }
+
+    public void setHdbHost(String hdbHost) {
+        this.hdbHost = hdbHost;
+    }
+
+    public void setHdbName(String hdbName) {
+        this.hdbName = hdbName;
+    }
+
+    public void setTdbHost(String tdbHost) {
+        this.tdbHost = tdbHost;
+    }
+
+    public void setTdbName(String tdbName) {
+        this.tdbName = tdbName;
+    }
+
+    public void setHdbUser(String hdbUser) {
+        this.hdbUser = hdbUser;
+    }
+
+    public void setHdbPassword(String hdbPassword) {
+        this.hdbPassword = hdbPassword;
+    }
+
+    public void setTdbUser(String tdbUser) {
+        this.tdbUser = tdbUser;
+    }
+
+    public void setTdbPassword(String tdbPassword) {
+        this.tdbPassword = tdbPassword;
+    }
+
+    public void setHdbRacConnection(boolean hdbRacConnection) {
+        hdbRacOverride = true;
+        this.hdbRacConnection = hdbRacConnection;
+    }
+
+    public void setTdbRacConnection(boolean tdbRacConnection) {
+        tdbRacOverride = true;
+        this.tdbRacConnection = tdbRacConnection;
+    }
+
+    public void setHdbSchema(String hdbSchema) {
+        this.hdbSchema = hdbSchema;
+    }
+
+    public void setTdbSchema(String tdbSchema) {
+        this.tdbSchema = tdbSchema;
+    }
+
+}
+
diff --git a/src/main/resources/application.properties b/archivingmanager/src/main/resources/application.properties
similarity index 95%
rename from src/main/resources/application.properties
rename to archivingmanager/src/main/resources/application.properties
index 4ce0e7137a42a49f5096fbc3f11b7728851f35a5..256553fd996bcf6edfc00d2799b25e9767957e5d 100644
--- a/src/main/resources/application.properties
+++ b/archivingmanager/src/main/resources/application.properties
@@ -1,5 +1,5 @@
-#application properties
-project.name=${project.name}
-project.version=${project.version}
-build.date=${buildNumber}
-
+#application properties
+project.name=${project.name}
+project.version=${project.version}
+build.date=${buildNumber}
+
diff --git a/hdbarchiver/pom.xml b/hdbarchiver/pom.xml
new file mode 100644
index 0000000000000000000000000000000000000000..b7cef7c9848d65d99efba68557afc24d7b638d19
--- /dev/null
+++ b/hdbarchiver/pom.xml
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project
+        xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"
+        xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+    <modelVersion>4.0.0</modelVersion>
+
+    <parent>
+        <groupId>fr.soleil.deviceservers</groupId>
+        <artifactId>historicalarchivingservers</artifactId>
+    <version>2.6.1</version>
+    </parent>
+
+    <groupId>fr.soleil.deviceservers</groupId>
+    <artifactId>hdbarchiver</artifactId>
+
+    <developers>
+        <developer>
+            <id>girardot</id>
+            <name>Raphaël GIRARDOT</name>
+            <email>raphael.girardot@synchrotron-soleil.fr</email>
+            <organization>Synchrotron Soleil</organization>
+            <organizationUrl>http://www.synchrotron-soleil.fr</organizationUrl>
+            <roles>
+                <role>Java Developer</role>
+            </roles>
+            <timezone>1</timezone>
+        </developer>
+    </developers>
+
+    <dependencies>
+        <dependency>
+            <groupId>fr.soleil.deviceservers</groupId>
+            <artifactId>archiving-common-collector</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.tango</groupId>
+            <artifactId>JTangoServer</artifactId>
+        </dependency>
+    </dependencies>
+
+  <properties>
+    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
+  </properties>
+
+</project>
diff --git a/src/main/java/HdbArchiver/Collector/DbProxy.java b/hdbarchiver/src/main/java/HdbArchiver/Collector/DbProxy.java
similarity index 86%
rename from src/main/java/HdbArchiver/Collector/DbProxy.java
rename to hdbarchiver/src/main/java/HdbArchiver/Collector/DbProxy.java
index 468ec90afc91f550d5ca212154efc789554150ac..3ab4aafb4f9171d92e5ff4559ccdb555f0e59f74 100644
--- a/src/main/java/HdbArchiver/Collector/DbProxy.java
+++ b/hdbarchiver/src/main/java/HdbArchiver/Collector/DbProxy.java
@@ -1,338 +1,317 @@
-// +======================================================================
-// $Source: /cvsroot/tango-cs/tango/jserver/archiving/HdbArchiver/Collector/DbProxy.java,v $
-//
-// Project:      Tango Archiving Service
-//
-// Description:  Java source code for the class  DbProxy.
-//						(Chinkumo Jean) - 22 janv. 2005
-//
-// $Author: ounsy $
-//
-// $Revision: 1.27 $
-//
-// $Log: DbProxy.java,v $
-// Revision 1.27  2007/03/05 16:25:20  ounsy
-// non-static DataBase
-//
-// Revision 1.26  2006/12/06 15:07:51  ounsy
-// corrected a bug in initCommitThread
-//
-// Revision 1.25  2006/11/27 16:08:14  ounsy
-// The current date is now obtained from System.currentTimeMillis instead of a DB call to SYSDATE
-//
-// Revision 1.24  2006/11/23 09:56:21  ounsy
-// added a commit thread
-//
-// Revision 1.23  2006/11/20 09:25:49  ounsy
-// minor changes
-//
-// Revision 1.22  2006/10/30 14:32:24  ounsy
-// commented the old hasBeenArchiving method and renamed the new hasBeenArchiving2 method to just hasBeenArchiving to avoid confusions
-//
-// Revision 1.21  2006/08/24 13:52:42  ounsy
-// minor changes
-//
-// Revision 1.20  2006/07/24 09:54:52  ounsy
-// the store(ScalarEvent) method now uses insertScalarData_withId instead of insertScalarData
-//
-// Revision 1.19  2006/07/21 14:44:55  ounsy
-// minor changes
-//
-// Revision 1.18  2006/07/19 08:37:36  ounsy
-// catch and rethrow ArchivingException
-//
-// Revision 1.17  2006/07/18 15:19:32  ounsy
-// minor changes
-//
-// Revision 1.16  2006/06/07 12:55:08  ounsy
-// corrected a small bug that displayed a 1Jan1970 date instead of Null for lastInsertRequest in case of missing data
-//
-// Revision 1.15  2006/05/17 15:02:41  ounsy
-// corrected a bug in getLastInsertRequest ()
-//
-// Revision 1.14  2006/04/11 09:12:06  ounsy
-// added some attribute checking methods
-//
-// Revision 1.13  2006/02/28 10:38:31  ounsy
-// lastInsertRequest added for HDBArchiver internal controls
-//
-// Revision 1.12  2006/02/27 12:17:57  ounsy
-// the HdbArchiver internal diagnosis function's safety period calculation is now defined
-//  by the safetyPeriod property
-//  (for example safetyPeriod=absolute/minutes/15 or safetyPeriod=relative/2)
-//
-// Revision 1.11  2006/02/15 15:55:43  chinkumo
-// Javadoc updated.
-//
-// Revision 1.10  2006/02/15 12:49:06  ounsy
-// added support for HdbArchiver internal support
-//
-// Revision 1.9  2006/02/06 13:03:29  ounsy
-// added a store (SpectrumEventRW) method
-//
-// Revision 1.8  2006/01/26 10:50:03  ounsy
-// commit bug corrected
-//
-// Revision 1.7  2006/01/23 09:12:18  ounsy
-// commit forced in "insertModeRecord" method
-//
-// Revision 1.6  2006/01/13 14:28:27  chinkumo
-// Changes made to avoid multi lines in AMT table when archivers are rebooted.
-//
-// Revision 1.5  2005/11/29 17:33:53  chinkumo
-// no message
-//
-// Revision 1.4.10.4  2005/11/29 16:16:05  chinkumo
-// Code reformated (pogo compatible)
-//
-// Revision 1.4.10.3  2005/11/15 13:46:08  chinkumo
-// ...
-//
-// Revision 1.4.10.2  2005/09/26 08:01:20  chinkumo
-// Minor changes !
-//
-// Revision 1.4.10.1  2005/09/09 10:07:50  chinkumo
-// The method store is more generic (scalars).
-//
-// Revision 1.4  2005/06/24 12:06:27  chinkumo
-// Some constants were moved from fr.soleil.hdbtdbArchivingApi.ArchivingApi.ConfigConst to fr.soleil.hdbtdbArchivingApi.ArchivingTools.Tools.GlobalConst.
-
-// This change was reported here.
-//
-// Revision 1.3  2005/06/14 10:30:27  chinkumo
-// Branch (hdbArchiver_1_0_1-branch_0)  and HEAD merged.
-//
-// Revision 1.2.4.1  2005/06/13 14:17:45  chinkumo
-// Changes made to improve the management of exceptions were reported here.
-//
-// Revision 1.2  2005/02/04 17:10:15  chinkumo
-// The trouble with the grouped stopping strategy was fixed.
-//
-// Revision 1.1  2005/01/26 16:38:14  chinkumo
-// Ultimate synchronization before real sharing.
-//
-//
-// copyleft :	Synchrotron SOLEIL
-//					L'Orme des Merisiers
-//					Saint-Aubin - BP 48
-//					91192 GIF-sur-YVETTE CEDEX
-//
-//-======================================================================
-package HdbArchiver.Collector;
-
-import java.io.IOException;
-import java.sql.SQLException;
-import java.util.Collection;
-import java.util.HashMap;
-import java.util.Map;
-
-import org.slf4j.Logger;
-
-import fr.esrf.Tango.DevFailed;
-import fr.esrf.Tango.ErrSeverity;
-import fr.esrf.TangoApi.Database;
-import fr.soleil.archiving.common.api.ConnectionFactory;
-import fr.soleil.archiving.common.api.exception.ArchivingException;
-import fr.soleil.archiving.common.api.tools.ArchivingEvent;
-import fr.soleil.archiving.common.api.tools.GlobalConst;
-import fr.soleil.archiving.hdbtdb.api.ConfigConst;
-import fr.soleil.archiving.hdbtdb.api.HDBDataBaseManager;
-import fr.soleil.archiving.hdbtdb.api.management.attributes.hdb.insert.HDBOracleAttributeInsert;
-import fr.soleil.archiving.hdbtdb.api.management.attributes.hdb.insert.IHdbAttributeInsert;
-import fr.soleil.archiving.hdbtdb.api.manager.ArchivingManagerApiRefFactory;
-import fr.soleil.archiving.hdbtdb.api.manager.IArchivingManagerApiRef;
-import fr.soleil.archiving.hdbtdb.api.tools.AttributeLightMode;
-import fr.soleil.archiving.hdbtdb.api.tools.ImageEvent_RO;
-import fr.soleil.archiving.hdbtdb.api.tools.ScalarEvent;
-import fr.soleil.archiving.hdbtdb.api.tools.SpectrumEvent_RO;
-import fr.soleil.archiving.hdbtdb.api.tools.SpectrumEvent_RW;
-
-public final class DbProxy {
-    private final Map<String, Integer> periods;
-    private final Map<String, Long> counters;
-    // private final Map<String, Long> lastInserts;
-    // private final Map<String, Long> lastInsertRequests;
-
-    private final IArchivingManagerApiRef manager;
-    private final IHdbAttributeInsert inserter;
-
-    private final Logger logger;
-
-    public DbProxy(final String myDbHost, final String myDbName, final String mySchemaName, final String myDbUser,
-            final String myDbPassword, final boolean myRacConnection, final Logger logger) throws ArchivingException {
-        this.logger = logger;
-
-        try {
-            manager = ArchivingManagerApiRefFactory.getInstance(true, ConnectionFactory.connectThroughTango(
-                    ConfigConst.HDB_CLASS_DEVICE, ConfigConst.HDB_CLASS_DEVICE, myDbHost, myDbName, mySchemaName,
-                    myDbUser, myDbPassword, null, null, myRacConnection, false, true));
-            manager.archivingConfigureWithoutArchiverListInit();
-            inserter = ((HDBDataBaseManager) manager.getDataBase()).getHdbAttributeInsert(logger);
-            periods = new HashMap<String, Integer>();
-            counters = new HashMap<String, Long>();
-        } catch (DevFailed e) {
-            throw new ArchivingException(e);
-        }
-        // lastInserts = new HashMap<String, Long>();
-        // lastInsertRequests = new HashMap<String, Long>();
-        // ArchivingWatch.setDbProxy(this);
-
-    }
-
-    public boolean isDbConnected() {
-        return manager.isDbConnected();
-    }
-
-    /**
-     * This method gives to the Archiver the event for filing. *
-     * 
-     * @param scalarEvent
-     *            event to be archieved.
-     * @throws ArchivingException
-     */
-    public void store(final ScalarEvent scalarEvent) throws ArchivingException {
-        // System.out.println("archive " +
-        // scalarEvent.getAttribute_complete_name());
-        try {
-            // updateCountersForAttributePreInsert(scalarEvent);
-            // ArchivingManagerApi.getDataBase(true).insert_ScalarData(scalarEvent);
-            inserter.insert_ScalarData(scalarEvent);
-            updateCountersForAttributePostInsert(scalarEvent);
-        } catch (final ArchivingException e) {
-            logger.error("error inserting in DB, value = {}", scalarEvent);
-            logger.error("Error during scalar insertion", e);
-            throw e;
-        }
-    }
-
-    /**
-     * @param scalarEvent
-     */
-    // private void updateCountersForAttributePreInsert(final ArchivingEvent
-    // archivingEvent) {
-    // final String completeName = archivingEvent.getAttribute_complete_name();
-    // // lastInsertRequests.put(completeName,
-    // // Long.valueOf(archivingEvent.getTimeStamp()));
-    // }
-
-    /**
-     * 
-     * @param archivingEvent
-     */
-    private void updateCountersForAttributePostInsert(final ArchivingEvent<?> archivingEvent) {
-        final String completeName = archivingEvent.getAttributeCompleteName();
-
-        final Long currentCounterI = counters.get(completeName);
-        long currentCounter = currentCounterI == null ? 0 : currentCounterI.longValue();
-        currentCounter++;
-        counters.put(completeName, Long.valueOf(currentCounter));
-        // lastInserts.put(completeName,
-        // Long.valueOf(archivingEvent.getTimeStamp()));
-    }
-
-    public void store(final SpectrumEvent_RO spectrumEventRO) throws ArchivingException {
-
-        // updateCountersForAttributePreInsert(spectrumEventRO);
-        inserter.insert_SpectrumData_RO(spectrumEventRO);
-        updateCountersForAttributePostInsert(spectrumEventRO);
-    }
-
-    public void store(final SpectrumEvent_RW spectrumEventRW) throws ArchivingException {
-
-        // updateCountersForAttributePreInsert(spectrumEventRW);
-        inserter.insert_SpectrumData_RW(spectrumEventRW);
-        updateCountersForAttributePostInsert(spectrumEventRW);
-
-    }
-
-    // @Override
-    // public Timestamp getLastInsertRequest(final String completeName) throws
-    // DevFailed {
-    // Timestamp ret = null;
-    //
-    // final Long value = lastInsertRequests.get(completeName);
-    // final long val = value == null ? -1 : value.longValue();
-    // ret = val == -1 ? null : new Timestamp(val);
-    //
-    // return ret;
-    // }
-
-    public void store(final ImageEvent_RO imageEventRO) throws SQLException, IOException, ArchivingException {
-        // updateCountersForAttributePreInsert(imageEventRO);
-        inserter.insert_ImageData_RO(imageEventRO);
-        updateCountersForAttributePostInsert(imageEventRO);
-    }
-
-    public void insertModeRecord(final AttributeLightMode attributeLightMode) throws ArchivingException {
-        manager.getDataBase().getMode().insertModeRecord(attributeLightMode);
-    }
-
-    public boolean isArchived(final String attributeName) throws ArchivingException {
-        return manager.getDataBase().getMode().isArchived(attributeName);
-
-    }
-
-    public boolean isArchived(final String attributeName, final String deviceName) throws ArchivingException {
-        return manager.getDataBase().getMode().isArchived(attributeName, deviceName);
-
-    }
-
-    public void updateModeRecord(final String attributeName) throws ArchivingException {
-        manager.getDataBase().getMode().updateModeRecord(attributeName);
-    }
-
-    public void updateModeRecordWithoutStop(final AttributeLightMode attributeLightMode) throws ArchivingException {
-        manager.getDataBase().getMode().updateModeRecordWithoutStop(attributeLightMode);
-    }
-
-    public Collection<AttributeLightMode> getArchiverCurrentTasks(final String archiverName) throws ArchivingException {
-        final boolean facility = manager.isMFacility();
-        try {
-            final Collection<AttributeLightMode> archiverCurrentTasks = manager
-                    .getDataBase()
-                    .getMode()
-                    .getArchiverCurrentTasks(
-                            (facility ? "//" + new Database().get_tango_host() + "/" : "") + archiverName);
-            return archiverCurrentTasks;
-        } catch (final DevFailed devFailed) {
-            final String message = GlobalConst.ARCHIVING_ERROR_PREFIX + " : " + GlobalConst.DBT_UNREACH_EXCEPTION;
-            final String reason = GlobalConst.TANGO_COMM_EXCEPTION;
-            final String desc = "Failed while executing DbProxy.getArchiverCurrentTasks() method...";
-            throw new ArchivingException(message, reason, ErrSeverity.PANIC, desc, "", devFailed);
-        }
-    }
-
-    /**
-     * @param completeName
-     * @param period
-     */
-    public void setPeriodForAttribute(final String completeName, final Integer period) {
-        periods.put(completeName, period);
-    }
-
-    public void closeConnection() {
-        if (manager != null) {
-            manager.closeConnection();
-            if (inserter instanceof HDBOracleAttributeInsert) {
-                ((HDBOracleAttributeInsert) inserter).closeConnection();
-            }
-        }
-    }
-    /*
-     * (non-Javadoc)
-     * 
-     * @see
-     * fr.soleil.hdbtdbArchivingApi.ArchivingWatchApi.datasources.device.IDbProxy
-     * #getLastInsert(java.lang.String)
-     */
-    // @Override
-    // public Timestamp getLastInsert(final String completeName) throws
-    // DevFailed {
-    // Timestamp ret = null;
-    // final Long lastInsertL = lastInserts.get(completeName);
-    // if (lastInsertL != null) {
-    // ret = new Timestamp(lastInsertL.longValue());
-    // }
-    // return ret;
-    // }
-}
+// +======================================================================
+// $Source: /cvsroot/tango-cs/tango/jserver/archiving/HdbArchiver/Collector/DbProxy.java,v $
+//
+// Project:      Tango Archiving Service
+//
+// Description:  Java source code for the class  DbProxy.
+//						(Chinkumo Jean) - 22 janv. 2005
+//
+// $Author: ounsy $
+//
+// $Revision: 1.27 $
+//
+// $Log: DbProxy.java,v $
+// Revision 1.27  2007/03/05 16:25:20  ounsy
+// non-static DataBase
+//
+// Revision 1.26  2006/12/06 15:07:51  ounsy
+// corrected a bug in initCommitThread
+//
+// Revision 1.25  2006/11/27 16:08:14  ounsy
+// The current date is now obtained from System.currentTimeMillis instead of a DB call to SYSDATE
+//
+// Revision 1.24  2006/11/23 09:56:21  ounsy
+// added a commit thread
+//
+// Revision 1.23  2006/11/20 09:25:49  ounsy
+// minor changes
+//
+// Revision 1.22  2006/10/30 14:32:24  ounsy
+// commented the old hasBeenArchiving method and renamed the new hasBeenArchiving2 method to just hasBeenArchiving to avoid confusions
+//
+// Revision 1.21  2006/08/24 13:52:42  ounsy
+// minor changes
+//
+// Revision 1.20  2006/07/24 09:54:52  ounsy
+// the store(ScalarEvent) method now uses insertScalarData_withId instead of insertScalarData
+//
+// Revision 1.19  2006/07/21 14:44:55  ounsy
+// minor changes
+//
+// Revision 1.18  2006/07/19 08:37:36  ounsy
+// catch and rethrow ArchivingException
+//
+// Revision 1.17  2006/07/18 15:19:32  ounsy
+// minor changes
+//
+// Revision 1.16  2006/06/07 12:55:08  ounsy
+// corrected a small bug that displayed a 1Jan1970 date instead of Null for lastInsertRequest in case of missing data
+//
+// Revision 1.15  2006/05/17 15:02:41  ounsy
+// corrected a bug in getLastInsertRequest ()
+//
+// Revision 1.14  2006/04/11 09:12:06  ounsy
+// added some attribute checking methods
+//
+// Revision 1.13  2006/02/28 10:38:31  ounsy
+// lastInsertRequest added for HDBArchiver internal controls
+//
+// Revision 1.12  2006/02/27 12:17:57  ounsy
+// the HdbArchiver internal diagnosis function's safety period calculation is now defined
+//  by the safetyPeriod property
+//  (for example safetyPeriod=absolute/minutes/15 or safetyPeriod=relative/2)
+//
+// Revision 1.11  2006/02/15 15:55:43  chinkumo
+// Javadoc updated.
+//
+// Revision 1.10  2006/02/15 12:49:06  ounsy
+// added support for HdbArchiver internal support
+//
+// Revision 1.9  2006/02/06 13:03:29  ounsy
+// added a store (SpectrumEventRW) method
+//
+// Revision 1.8  2006/01/26 10:50:03  ounsy
+// commit bug corrected
+//
+// Revision 1.7  2006/01/23 09:12:18  ounsy
+// commit forced in "insertModeRecord" method
+//
+// Revision 1.6  2006/01/13 14:28:27  chinkumo
+// Changes made to avoid multi lines in AMT table when archivers are rebooted.
+//
+// Revision 1.5  2005/11/29 17:33:53  chinkumo
+// no message
+//
+// Revision 1.4.10.4  2005/11/29 16:16:05  chinkumo
+// Code reformated (pogo compatible)
+//
+// Revision 1.4.10.3  2005/11/15 13:46:08  chinkumo
+// ...
+//
+// Revision 1.4.10.2  2005/09/26 08:01:20  chinkumo
+// Minor changes !
+//
+// Revision 1.4.10.1  2005/09/09 10:07:50  chinkumo
+// The method store is more generic (scalars).
+//
+// Revision 1.4  2005/06/24 12:06:27  chinkumo
+// Some constants were moved from fr.soleil.hdbtdbArchivingApi.ArchivingApi.ConfigConst to fr.soleil.hdbtdbArchivingApi.ArchivingTools.Tools.GlobalConst.
+
+// This change was reported here.
+//
+// Revision 1.3  2005/06/14 10:30:27  chinkumo
+// Branch (hdbArchiver_1_0_1-branch_0)  and HEAD merged.
+//
+// Revision 1.2.4.1  2005/06/13 14:17:45  chinkumo
+// Changes made to improve the management of exceptions were reported here.
+//
+// Revision 1.2  2005/02/04 17:10:15  chinkumo
+// The trouble with the grouped stopping strategy was fixed.
+//
+// Revision 1.1  2005/01/26 16:38:14  chinkumo
+// Ultimate synchronization before real sharing.
+//
+//
+// copyleft :	Synchrotron SOLEIL
+//					L'Orme des Merisiers
+//					Saint-Aubin - BP 48
+//					91192 GIF-sur-YVETTE CEDEX
+//
+//-======================================================================
+package HdbArchiver.Collector;
+
+import fr.esrf.Tango.DevFailed;
+import fr.esrf.Tango.ErrSeverity;
+import fr.esrf.TangoApi.Database;
+import fr.soleil.archiving.common.api.ConnectionFactory;
+import fr.soleil.archiving.common.api.exception.ArchivingException;
+import fr.soleil.archiving.common.api.tools.ArchivingEvent;
+import fr.soleil.archiving.common.api.tools.GlobalConst;
+import fr.soleil.archiving.hdbtdb.api.HDBDataBaseManager;
+import fr.soleil.archiving.hdbtdb.api.management.attributes.hdb.insert.IHdbAttributeInsert;
+import fr.soleil.archiving.hdbtdb.api.manager.ArchivingManagerApiRefFactory;
+import fr.soleil.archiving.hdbtdb.api.manager.IArchivingManagerApiRef;
+import fr.soleil.archiving.hdbtdb.api.tools.*;
+import fr.soleil.database.connection.DataBaseParameters;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import java.io.IOException;
+import java.sql.SQLException;
+import java.util.Collection;
+import java.util.HashMap;
+import java.util.Map;
+
+public final class DbProxy {
+    private final Map<String, Integer> periods;
+    private final Map<String, Long> counters;
+    // private final Map<String, Long> lastInserts;
+    // private final Map<String, Long> lastInsertRequests;
+
+    private final IArchivingManagerApiRef manager;
+    private final IHdbAttributeInsert inserter;
+    private final Logger logger = LoggerFactory.getLogger(DbProxy.class);
+
+    public DbProxy(DataBaseParameters params) throws ArchivingException {
+        manager = ArchivingManagerApiRefFactory.getInstance(true, ConnectionFactory.connect(params));
+        manager.archivingConfigureWithoutArchiverListInit();
+        inserter = ((HDBDataBaseManager) manager.getDataBase()).getHdbAttributeInsert(logger);
+        periods = new HashMap<String, Integer>();
+        counters = new HashMap<String, Long>();
+
+        // lastInserts = new HashMap<String, Long>();
+        // lastInsertRequests = new HashMap<String, Long>();
+        // ArchivingWatch.setDbProxy(this);
+
+    }
+
+    public boolean isDbConnected() {
+        return manager.isDbConnected();
+    }
+
+    /**
+     * This method gives to the Archiver the event for filing. *
+     *
+     * @param scalarEvent event to be archieved.
+     * @throws ArchivingException
+     */
+    public void store(final ScalarEvent scalarEvent) throws ArchivingException {
+        // System.out.println("archive " +
+        // scalarEvent.getAttribute_complete_name());
+        try {
+            // updateCountersForAttributePreInsert(scalarEvent);
+            // ArchivingManagerApi.getDataBase(true).insert_ScalarData(scalarEvent);
+            inserter.insert_ScalarData(scalarEvent);
+            updateCountersForAttributePostInsert(scalarEvent);
+        } catch (final ArchivingException e) {
+            logger.error("error inserting in DB, value = {}", scalarEvent);
+            logger.error("Error during scalar insertion", e);
+            throw e;
+        }
+    }
+
+    /**
+     * @param scalarEvent
+     */
+    // private void updateCountersForAttributePreInsert(final ArchivingEvent
+    // archivingEvent) {
+    // final String completeName = archivingEvent.getAttribute_complete_name();
+    // // lastInsertRequests.put(completeName,
+    // // Long.valueOf(archivingEvent.getTimeStamp()));
+    // }
+
+    /**
+     * @param archivingEvent
+     */
+    private void updateCountersForAttributePostInsert(final ArchivingEvent<?> archivingEvent) {
+        final String completeName = archivingEvent.getAttributeCompleteName();
+
+        final Long currentCounterI = counters.get(completeName);
+        long currentCounter = currentCounterI == null ? 0 : currentCounterI.longValue();
+        currentCounter++;
+        counters.put(completeName, Long.valueOf(currentCounter));
+        // lastInserts.put(completeName,
+        // Long.valueOf(archivingEvent.getTimeStamp()));
+    }
+
+    public void store(final SpectrumEvent_RO spectrumEventRO) throws ArchivingException {
+
+        // updateCountersForAttributePreInsert(spectrumEventRO);
+        inserter.insert_SpectrumData_RO(spectrumEventRO);
+        updateCountersForAttributePostInsert(spectrumEventRO);
+    }
+
+    public void store(final SpectrumEvent_RW spectrumEventRW) throws ArchivingException {
+
+        // updateCountersForAttributePreInsert(spectrumEventRW);
+        inserter.insert_SpectrumData_RW(spectrumEventRW);
+        updateCountersForAttributePostInsert(spectrumEventRW);
+
+    }
+
+    // @Override
+    // public Timestamp getLastInsertRequest(final String completeName) throws
+    // DevFailed {
+    // Timestamp ret = null;
+    //
+    // final Long value = lastInsertRequests.get(completeName);
+    // final long val = value == null ? -1 : value.longValue();
+    // ret = val == -1 ? null : new Timestamp(val);
+    //
+    // return ret;
+    // }
+
+    public void store(final ImageEvent_RO imageEventRO) throws SQLException, IOException, ArchivingException {
+        // updateCountersForAttributePreInsert(imageEventRO);
+        inserter.insert_ImageData_RO(imageEventRO);
+        updateCountersForAttributePostInsert(imageEventRO);
+    }
+
+    public void insertModeRecord(final AttributeLightMode attributeLightMode) throws ArchivingException {
+        manager.getDataBase().getMode().insertModeRecord(attributeLightMode);
+    }
+
+    public boolean isArchived(final String attributeName) throws ArchivingException {
+        return manager.getDataBase().getMode().isArchived(attributeName);
+
+    }
+
+    public boolean isArchived(final String attributeName, final String deviceName) throws ArchivingException {
+        return manager.getDataBase().getMode().isArchived(attributeName, deviceName);
+
+    }
+
+    public void updateModeRecord(final String attributeName) throws ArchivingException {
+        manager.getDataBase().getMode().updateModeRecord(attributeName);
+    }
+
+    public void updateModeRecordWithoutStop(final AttributeLightMode attributeLightMode) throws ArchivingException {
+        manager.getDataBase().getMode().updateModeRecordWithoutStop(attributeLightMode);
+    }
+
+    public Collection<AttributeLightMode> getArchiverCurrentTasks(final String archiverName) throws ArchivingException {
+        final boolean facility = manager.isMFacility();
+        try {
+            final Collection<AttributeLightMode> archiverCurrentTasks = manager
+                    .getDataBase()
+                    .getMode()
+                    .getArchiverCurrentTasks(
+                            (facility ? "//" + new Database().get_tango_host() + "/" : "") + archiverName);
+            return archiverCurrentTasks;
+        } catch (final DevFailed devFailed) {
+            final String message = GlobalConst.ARCHIVING_ERROR_PREFIX + " : " + GlobalConst.DBT_UNREACH_EXCEPTION;
+            final String reason = GlobalConst.TANGO_COMM_EXCEPTION;
+            final String desc = "Failed while executing DbProxy.getArchiverCurrentTasks() method...";
+            throw new ArchivingException(message, reason, ErrSeverity.PANIC, desc, "", devFailed);
+        }
+    }
+
+    /**
+     * @param completeName
+     * @param period
+     */
+    public void setPeriodForAttribute(final String completeName, final Integer period) {
+        periods.put(completeName, period);
+    }
+
+    public void closeConnection() {
+        inserter.closeConnection();
+    }
+    /*
+     * (non-Javadoc)
+     * 
+     * @see
+     * fr.soleil.hdbtdbArchivingApi.ArchivingWatchApi.datasources.device.IDbProxy
+     * #getLastInsert(java.lang.String)
+     */
+    // @Override
+    // public Timestamp getLastInsert(final String completeName) throws
+    // DevFailed {
+    // Timestamp ret = null;
+    // final Long lastInsertL = lastInserts.get(completeName);
+    // if (lastInsertL != null) {
+    // ret = new Timestamp(lastInsertL.longValue());
+    // }
+    // return ret;
+    // }
+}
diff --git a/src/main/java/HdbArchiver/Collector/HdbCollector.java b/hdbarchiver/src/main/java/HdbArchiver/Collector/HdbCollector.java
similarity index 95%
rename from src/main/java/HdbArchiver/Collector/HdbCollector.java
rename to hdbarchiver/src/main/java/HdbArchiver/Collector/HdbCollector.java
index 9a15e5f5c703add7adb80bf5131a3366c7e0e139..71de17a5cb4d3f6d228e1cb83578de365d516dd8 100644
--- a/src/main/java/HdbArchiver/Collector/HdbCollector.java
+++ b/hdbarchiver/src/main/java/HdbArchiver/Collector/HdbCollector.java
@@ -1,344 +1,345 @@
-// +======================================================================
-// $Source: /cvsroot/tango-cs/tango/jserver/archiving/HdbArchiver/Collector/HdbCollector.java,v $
-//
-// Project:      Tango Archiving Service
-//
-// Description:  Java source code for the class  HdbCollector.
-//						(Chinkumo Jean) - Mar 24, 2004
-//
-// $Author: pierrejoseph $
-//
-// $Revision: 1.29 $
-//
-// $Log: HdbCollector.java,v $
-// Revision 1.29  2007/10/03 15:23:29  pierrejoseph
-// Minor changes
-//
-// Revision 1.28  2007/09/28 14:49:22  pierrejoseph
-// Merged between Polling and Events code
-//
-// Revision 1.27  2007/06/13 13:13:23  pierrejoseph
-// the mode counter are managed attribute by attribute in each collector
-//
-// Revision 1.26  2007/06/11 12:18:26  pierrejoseph
-// Now it inherits from the ArchiverCollector object.
-// doArchive method has been added in the TdbCollector class with new catched exceptions that can be raised by the isDataArchivable method.
-//
-// Revision 1.25  2007/04/03 15:40:54  ounsy
-// corrected the deadlock
-//
-// Revision 1.24  2007/03/27 15:17:06  ounsy
-// added a isFirstValue attribute
-//
-// Revision 1.23  2007/03/26 14:36:13  ounsy
-// trying a new method to avoid double records.
-//
-// Revision 1.22  2007/03/05 16:25:20  ounsy
-// non-static DataBase
-//
-// Revision 1.21  2007/01/09 15:25:28  ounsy
-// set the most frequent traces to DEBUG level
-//
-// Revision 1.20  2006/11/15 16:29:42  ounsy
-// refresher with synchronized period
-//
-// Revision 1.19  2006/08/23 09:41:57  ounsy
-// minor changes
-//
-// Revision 1.18  2006/07/27 12:38:43  ounsy
-// changed the logs with the correct HdbCollector name instead of TdbCollector
-//
-// Revision 1.17  2006/07/26 08:37:21  ounsy
-// try number no more static and reinitialized with change events (errorchange, numberscalarchange, etc...)
-//
-// Revision 1.16  2006/07/25 13:39:14  ounsy
-// correcting bad merge
-//
-// Revision 1.15  2006/07/25 09:46:43  ounsy
-// added a loadAssessment() method
-//
-// Revision 1.14  2006/07/24 14:51:15  ounsy
-// corrected a bug in the assessment() method
-//
-// Revision 1.13  2006/07/21 14:42:14  ounsy
-// replaced the lastTimestampHashtable with lastTimestampStacksHashtable, to keep track of more than one timestamp in the past
-//
-// Revision 1.12  2006/07/18 07:51:03  ounsy
-// added a log message in case the received timestamp is 0
-//
-// Revision 1.11  2006/06/30 08:27:07  ounsy
-// modified isDataArchivableTimestampWise () so that event with a zero timestamp aren't archived
-//
-// Revision 1.10  2006/06/16 09:25:33  ounsy
-// changed imports because of the diary package moving to the javaapi project
-//
-// Revision 1.9  2006/06/13 13:28:20  ounsy
-// added a file logging system (diary) that records data storing errors
-//
-// Revision 1.8  2006/05/23 11:55:45  ounsy
-// added a lastTimestamp Hashtable in the same vein as the lastValue one in HdbModeHandler to avoid getting twice the same timestamp in a row
-//
-// Revision 1.7  2006/05/12 09:20:17  ounsy
-// list concurrent modification bug correction
-//
-// Revision 1.6  2005/11/29 17:33:53  chinkumo
-// no message
-//
-// Revision 1.5.12.3  2005/11/29 16:16:05  chinkumo
-// Code reformated (pogo compatible)
-//
-// Revision 1.5.12.2  2005/11/15 13:46:08  chinkumo
-// ...
-//
-// Revision 1.5.12.1  2005/09/09 10:08:42  chinkumo
-// Minor changes.
-//
-// Revision 1.5  2005/06/14 10:30:27  chinkumo
-// Branch (hdbArchiver_1_0_1-branch_0)  and HEAD merged.
-//
-// Revision 1.4.4.1  2005/06/13 14:10:45  chinkumo
-// Changes made to improve the management of exceptions were reported here.
-//
-// Revision 1.4  2005/02/07 09:36:48  chinkumo
-// To avoid side effects when including events in ATK, AttributeList object is replaced with the AttributePolledList object.
-//
-// Revision 1.3  2005/02/04 17:10:15  chinkumo
-// The trouble with the grouped stopping strategy was fixed.
-//
-// Revision 1.2  2005/01/26 16:38:14  chinkumo
-// Ultimate synchronization before real sharing.
-//
-// Revision 1.1  2004/12/06 16:43:13  chinkumo
-// First commit (new architecture).
-//
-//
-// copyleft :	Synchrotron SOLEIL
-//					L'Orme des Merisiers
-//					Saint-Aubin - BP 48
-//					91192 GIF-sur-YVETTE CEDEX
-//
-//-======================================================================
-package HdbArchiver.Collector;
-
-import java.sql.Timestamp;
-import java.util.Map;
-import java.util.concurrent.ConcurrentHashMap;
-
-import org.slf4j.Logger;
-
-import Common.Archiver.Collector.ArchiverCollector;
-import HdbArchiver.HdbArchiver;
-import fr.soleil.archiving.common.api.exception.ArchivingException;
-import fr.soleil.archiving.common.api.tools.ArchivingEvent;
-import fr.soleil.archiving.hdbtdb.api.tools.AttributeLightMode;
-import fr.soleil.archiving.hdbtdb.api.tools.DBTools;
-import fr.soleil.archiving.hdbtdb.api.tools.LimitedStack;
-
-public abstract class HdbCollector extends ArchiverCollector {
-
-    private static final long serialVersionUID = -2258508407955073150L;
-
-    protected volatile Map<String, Boolean> isFirstValueList = new ConcurrentHashMap<String, Boolean>();
-
-    /**
-     * This parameter specify the number of time a Collector retry the archiving
-     * of an attribute event
-     */
-    protected final static int DEFAULT_TRY_NUMBER = 2;
-    /**
-     * An HdbModeHandler is associated to each HdbCollector to handle the
-     * archiving mode
-     */
-    private final ConcurrentHashMap<String, LimitedStack> lastTimestampStacks = new ConcurrentHashMap<String, LimitedStack>();
-    protected DbProxy dbProxy;
-
-    /**
-     * This Map is used to store the last value of an attribute. This value will
-     * be compared to the current one (cf. Modes)
-     */
-    private final Map<String, Object> lastValueHashtable = new ConcurrentHashMap<String, Object>();
-
-    // --------------------------------------------------------------------------//
-    // ELETTRA : Archiving Events
-    // --------------------------------------------------------------------------//
-    protected int archiveListenersCounter = 0;
-
-    // --------------------------------------------------------------------------//
-    // ELETTRA : Archiving Events
-    // --------------------------------------------------------------------------//
-
-    public HdbCollector(final HdbModeHandler modeHandler, final Logger logger) {
-        super(modeHandler, logger);
-    }
-
-    protected abstract void doAddSourceForPolling(final AttributeLightMode attributeLightMode)
-            throws ArchivingException;
-
-    protected abstract void addSourceForEvents(final AttributeLightMode attributeLightMode) throws ArchivingException;
-
-    /**
-     * Removes an attribute from the list of the attributes for which is
-     * responsible this HdbCollector. If the attribute was registered for the
-     * archive events, we unsubscribe from it.
-     * 
-     * @param attributeName
-     * @throws ArchivingException
-     */
-    public abstract void removeSource(String attributeName) throws ArchivingException;
-
-    protected void setLastValue(final ArchivingEvent<boolean[]> scalarEvent, final Object lastValue) {
-        String key = scalarEvent.getAttributeCompleteName();
-        if (key != null) {
-            setLastTimestamp(scalarEvent);
-            if (lastValue == null) {
-                lastValueHashtable.remove(key);
-            } else {
-                lastValueHashtable.put(key, lastValue);
-            }
-        }
-    }
-
-    protected Object getLastValue(final ArchivingEvent<boolean[]> scalarEvent) {
-        return scalarEvent.getAttributeCompleteName() == null ? null : lastValueHashtable.get(scalarEvent
-                .getAttributeCompleteName());
-    }
-
-    protected final synchronized void addSourceForPolling(final AttributeLightMode attributeLightMode)
-            throws ArchivingException {
-        if (attributeLightMode != null) {
-            String attName = attributeLightMode.getAttributeCompleteName();
-            if (attName != null) {
-                if (attributeList.get(attName) == null) {
-                    doAddSourceForPolling(attributeLightMode);
-                }
-            }
-        }
-    }
-
-    /**
-     * Adds an attribute to the list of the attributes for which is responsible
-     * this HdbCollector. If possible registers for the archive events
-     * 
-     * @param attributeLightMode
-     */
-    public void addSource(final AttributeLightMode attributeLightMode) throws ArchivingException {
-        isFirstValueList.put(attributeLightMode.getAttributeCompleteName().toLowerCase(), true);
-        try {
-            if (HdbArchiver.isUseEvents) {
-                addSourceForEvents(attributeLightMode);
-            } else {
-                addSourceForPolling(attributeLightMode);
-            }
-        } catch (Exception e) {
-            final String message = e.getMessage();
-            if ((attributeLightMode != null) && (message != null)) {
-                final String name = attributeLightMode.getAttributeCompleteName();
-                if (name != null) {
-                    registerErrorMessage(name, message);
-                }
-            }
-            if (e instanceof ArchivingException) {
-                throw (ArchivingException) e;
-            } else {
-                ArchivingException exception = new ArchivingException(DBTools.appendErrorToStringBuilder(null, e)
-                        .toString());
-                throw exception;
-            }
-        }
-    }
-
-    protected void setLastTimestamp(final ArchivingEvent<?> scalarEvent) {
-        if (scalarEvent != null) {
-            final String name = scalarEvent.getAttributeCompleteName();
-            final Long longTimeStamp = new Long(scalarEvent.getTimeStamp());
-
-            LimitedStack lastTimestampStack;
-            if (lastTimestampStacks.containsKey(name)) {
-                lastTimestampStack = lastTimestampStacks.get(name);
-            } else {
-                lastTimestampStack = new LimitedStack();
-                LimitedStack tmp = lastTimestampStacks.putIfAbsent(name, lastTimestampStack);
-                if (tmp != null) {
-                    lastTimestampStack = tmp;
-                }
-            }
-            lastTimestampStack.push(longTimeStamp);
-        }
-    }
-
-    protected void removeTimestamps(final String attributeName) {
-        lastTimestampStacks.remove(attributeName);
-    }
-
-    protected LimitedStack getTimestamps(final String attributeName) {
-        return lastTimestampStacks.get(attributeName);
-    }
-
-    protected boolean isDataArchivableTimestampWise(final ArchivingEvent<?> archivingEvent) {
-        final String name = archivingEvent.getAttributeCompleteName();
-
-        final long newTime = archivingEvent.getTimeStamp();
-        if (newTime == 0) {
-            StringBuilder builder = new StringBuilder("NOARCHIVING - received a zero timestamp for ");
-            builder.append(name).append(" - tableName: ").append(archivingEvent.getTableName());
-            String error = builder.toString();
-            logger.debug(error);
-            registerErrorMessage(name, error);
-            return false;
-        }
-
-        final LimitedStack lastTimestampStack = getTimestamps(name);
-        if (lastTimestampStack == null) {
-            return true;
-        }
-
-        final boolean isAlreadyRegisteredDate = lastTimestampStack.containsDate(newTime);
-        final boolean isValidDate = lastTimestampStack.validateDate(newTime);
-        if (isAlreadyRegisteredDate || !isValidDate) {
-            Timestamp timestamp = new Timestamp(newTime);
-            StringBuilder builder = new StringBuilder("NOARCHIVING - AlreadyRegisteredDate - attribute: ");
-            builder.append(name).append(" - timestamp: ").append(timestamp);
-            logger.debug(builder.toString());
-            builder = new StringBuilder("NOARCHIVING - attribute ").append(name)
-                    .append(" seems to be frozen - timestamp: ").append(timestamp);
-            registerErrorMessage(name, builder.toString());
-            return false;
-        }
-
-        return true;
-    }
-
-    public void setDbProxy(final DbProxy dbProxy) {
-        this.dbProxy = dbProxy;
-    }
-
-    // synchronized because of attribute list
-    @Override
-    public synchronized void clear() {
-        super.clear();
-        lastTimestampStacks.clear();
-        isFirstValueList.clear();
-        lastValueHashtable.clear();
-    }
-
-    // --------------------------------------------------------------------------//
-    // ELETTRA : Archiving Events
-    // --------------------------------------------------------------------------//
-    /**
-     * 
-     * @return true if there are archive listeners still alive.
-     * @since events
-     * @author Giacomo Strangolino
-     */
-    protected boolean areThereArchiveListeners() {
-        if (archiveListenersCounter > 0) {
-            return true;
-        }
-        return false;
-    }
-
-    // --------------------------------------------------------------------------//
-    // ELETTRA : Archiving Events
-    // --------------------------------------------------------------------------//
-
-}
+// +======================================================================
+// $Source: /cvsroot/tango-cs/tango/jserver/archiving/HdbArchiver/Collector/HdbCollector.java,v $
+//
+// Project:      Tango Archiving Service
+//
+// Description:  Java source code for the class  HdbCollector.
+//						(Chinkumo Jean) - Mar 24, 2004
+//
+// $Author: pierrejoseph $
+//
+// $Revision: 1.29 $
+//
+// $Log: HdbCollector.java,v $
+// Revision 1.29  2007/10/03 15:23:29  pierrejoseph
+// Minor changes
+//
+// Revision 1.28  2007/09/28 14:49:22  pierrejoseph
+// Merged between Polling and Events code
+//
+// Revision 1.27  2007/06/13 13:13:23  pierrejoseph
+// the mode counter are managed attribute by attribute in each collector
+//
+// Revision 1.26  2007/06/11 12:18:26  pierrejoseph
+// Now it inherits from the ArchiverCollector object.
+// doArchive method has been added in the TdbCollector class with new catched exceptions that can be raised by the isDataArchivable method.
+//
+// Revision 1.25  2007/04/03 15:40:54  ounsy
+// corrected the deadlock
+//
+// Revision 1.24  2007/03/27 15:17:06  ounsy
+// added a isFirstValue attribute
+//
+// Revision 1.23  2007/03/26 14:36:13  ounsy
+// trying a new method to avoid double records.
+//
+// Revision 1.22  2007/03/05 16:25:20  ounsy
+// non-static DataBase
+//
+// Revision 1.21  2007/01/09 15:25:28  ounsy
+// set the most frequent traces to DEBUG level
+//
+// Revision 1.20  2006/11/15 16:29:42  ounsy
+// refresher with synchronized period
+//
+// Revision 1.19  2006/08/23 09:41:57  ounsy
+// minor changes
+//
+// Revision 1.18  2006/07/27 12:38:43  ounsy
+// changed the logs with the correct HdbCollector name instead of TdbCollector
+//
+// Revision 1.17  2006/07/26 08:37:21  ounsy
+// try number no more static and reinitialized with change events (errorchange, numberscalarchange, etc...)
+//
+// Revision 1.16  2006/07/25 13:39:14  ounsy
+// correcting bad merge
+//
+// Revision 1.15  2006/07/25 09:46:43  ounsy
+// added a loadAssessment() method
+//
+// Revision 1.14  2006/07/24 14:51:15  ounsy
+// corrected a bug in the assessment() method
+//
+// Revision 1.13  2006/07/21 14:42:14  ounsy
+// replaced the lastTimestampHashtable with lastTimestampStacksHashtable, to keep track of more than one timestamp in the past
+//
+// Revision 1.12  2006/07/18 07:51:03  ounsy
+// added a log message in case the received timestamp is 0
+//
+// Revision 1.11  2006/06/30 08:27:07  ounsy
+// modified isDataArchivableTimestampWise () so that event with a zero timestamp aren't archived
+//
+// Revision 1.10  2006/06/16 09:25:33  ounsy
+// changed imports because of the diary package moving to the javaapi project
+//
+// Revision 1.9  2006/06/13 13:28:20  ounsy
+// added a file logging system (diary) that records data storing errors
+//
+// Revision 1.8  2006/05/23 11:55:45  ounsy
+// added a lastTimestamp Hashtable in the same vein as the lastValue one in HdbModeHandler to avoid getting twice the same timestamp in a row
+//
+// Revision 1.7  2006/05/12 09:20:17  ounsy
+// list concurrent modification bug correction
+//
+// Revision 1.6  2005/11/29 17:33:53  chinkumo
+// no message
+//
+// Revision 1.5.12.3  2005/11/29 16:16:05  chinkumo
+// Code reformated (pogo compatible)
+//
+// Revision 1.5.12.2  2005/11/15 13:46:08  chinkumo
+// ...
+//
+// Revision 1.5.12.1  2005/09/09 10:08:42  chinkumo
+// Minor changes.
+//
+// Revision 1.5  2005/06/14 10:30:27  chinkumo
+// Branch (hdbArchiver_1_0_1-branch_0)  and HEAD merged.
+//
+// Revision 1.4.4.1  2005/06/13 14:10:45  chinkumo
+// Changes made to improve the management of exceptions were reported here.
+//
+// Revision 1.4  2005/02/07 09:36:48  chinkumo
+// To avoid side effects when including events in ATK, AttributeList object is replaced with the AttributePolledList object.
+//
+// Revision 1.3  2005/02/04 17:10:15  chinkumo
+// The trouble with the grouped stopping strategy was fixed.
+//
+// Revision 1.2  2005/01/26 16:38:14  chinkumo
+// Ultimate synchronization before real sharing.
+//
+// Revision 1.1  2004/12/06 16:43:13  chinkumo
+// First commit (new architecture).
+//
+//
+// copyleft :	Synchrotron SOLEIL
+//					L'Orme des Merisiers
+//					Saint-Aubin - BP 48
+//					91192 GIF-sur-YVETTE CEDEX
+//
+//-======================================================================
+package HdbArchiver.Collector;
+
+import Common.Archiver.Collector.ArchiverCollector;
+import fr.soleil.archiving.common.api.exception.ArchivingException;
+import fr.soleil.archiving.common.api.tools.ArchivingEvent;
+import fr.soleil.archiving.hdbtdb.api.tools.AttributeLightMode;
+import fr.soleil.archiving.hdbtdb.api.tools.DBTools;
+import fr.soleil.archiving.hdbtdb.api.tools.LimitedStack;
+import org.slf4j.Logger;
+
+import java.sql.Timestamp;
+import java.util.Map;
+import java.util.concurrent.ConcurrentHashMap;
+
+public abstract class HdbCollector extends ArchiverCollector {
+
+    private static final long serialVersionUID = -2258508407955073150L;
+
+    protected volatile Map<String, Boolean> isFirstValueList = new ConcurrentHashMap<String, Boolean>();
+
+    /**
+     * This parameter specify the number of time a Collector retry the archiving
+     * of an attribute event
+     */
+    protected final static int DEFAULT_TRY_NUMBER = 2;
+    /**
+     * An HdbModeHandler is associated to each HdbCollector to handle the
+     * archiving mode
+     */
+    private final ConcurrentHashMap<String, LimitedStack> lastTimestampStacks = new ConcurrentHashMap<String, LimitedStack>();
+    protected DbProxy dbProxy;
+
+    /**
+     * This Map is used to store the last value of an attribute. This value will
+     * be compared to the current one (cf. Modes)
+     */
+    private final Map<String, Object> lastValueHashtable = new ConcurrentHashMap<String, Object>();
+
+    // --------------------------------------------------------------------------//
+    // ELETTRA : Archiving Events
+    // --------------------------------------------------------------------------//
+    protected int archiveListenersCounter = 0;
+    protected boolean useEvents = false;
+
+    // --------------------------------------------------------------------------//
+    // ELETTRA : Archiving Events
+    // --------------------------------------------------------------------------//
+
+    public HdbCollector(final HdbModeHandler modeHandler, boolean useEvents, final Logger logger) {
+        super(modeHandler, logger);
+        this.useEvents = useEvents;
+
+    }
+
+    protected abstract void doAddSourceForPolling(final AttributeLightMode attributeLightMode)
+            throws ArchivingException;
+
+    protected abstract void addSourceForEvents(final AttributeLightMode attributeLightMode) throws ArchivingException;
+
+    /**
+     * Removes an attribute from the list of the attributes for which is
+     * responsible this HdbCollector. If the attribute was registered for the
+     * archive events, we unsubscribe from it.
+     *
+     * @param attributeName
+     * @throws ArchivingException
+     */
+    public abstract void removeSource(String attributeName) throws ArchivingException;
+
+    protected void setLastValue(final ArchivingEvent<boolean[]> scalarEvent, final Object lastValue) {
+        String key = scalarEvent.getAttributeCompleteName();
+        if (key != null) {
+            setLastTimestamp(scalarEvent);
+            if (lastValue == null) {
+                lastValueHashtable.remove(key);
+            } else {
+                lastValueHashtable.put(key, lastValue);
+            }
+        }
+    }
+
+    protected Object getLastValue(final ArchivingEvent<boolean[]> scalarEvent) {
+        return scalarEvent.getAttributeCompleteName() == null ? null : lastValueHashtable.get(scalarEvent
+                .getAttributeCompleteName());
+    }
+
+    protected final synchronized void addSourceForPolling(final AttributeLightMode attributeLightMode)
+            throws ArchivingException {
+        if (attributeLightMode != null) {
+            String attName = attributeLightMode.getAttributeCompleteName();
+            if (attName != null) {
+                if (attributeList.get(attName) == null) {
+                    doAddSourceForPolling(attributeLightMode);
+                }
+            }
+        }
+    }
+
+    /**
+     * Adds an attribute to the list of the attributes for which is responsible
+     * this HdbCollector. If possible registers for the archive events
+     *
+     * @param attributeLightMode
+     */
+    public void addSource(final AttributeLightMode attributeLightMode) throws ArchivingException {
+        isFirstValueList.put(attributeLightMode.getAttributeCompleteName().toLowerCase(), true);
+        try {
+            if (useEvents) {
+                addSourceForEvents(attributeLightMode);
+            } else {
+                addSourceForPolling(attributeLightMode);
+            }
+        } catch (Exception e) {
+            final String message = e.getMessage();
+            if ((attributeLightMode != null) && (message != null)) {
+                final String name = attributeLightMode.getAttributeCompleteName();
+                if (name != null) {
+                    registerErrorMessage(name, message);
+                }
+            }
+            if (e instanceof ArchivingException) {
+                throw (ArchivingException) e;
+            } else {
+                ArchivingException exception = new ArchivingException(DBTools.appendErrorToStringBuilder(null, e)
+                        .toString());
+                throw exception;
+            }
+        }
+    }
+
+    protected void setLastTimestamp(final ArchivingEvent<?> scalarEvent) {
+        if (scalarEvent != null) {
+            final String name = scalarEvent.getAttributeCompleteName();
+            final Long longTimeStamp = new Long(scalarEvent.getTimeStamp());
+
+            LimitedStack lastTimestampStack;
+            if (lastTimestampStacks.containsKey(name)) {
+                lastTimestampStack = lastTimestampStacks.get(name);
+            } else {
+                lastTimestampStack = new LimitedStack();
+                LimitedStack tmp = lastTimestampStacks.putIfAbsent(name, lastTimestampStack);
+                if (tmp != null) {
+                    lastTimestampStack = tmp;
+                }
+            }
+            lastTimestampStack.push(longTimeStamp);
+        }
+    }
+
+    protected void removeTimestamps(final String attributeName) {
+        lastTimestampStacks.remove(attributeName);
+    }
+
+    protected LimitedStack getTimestamps(final String attributeName) {
+        return lastTimestampStacks.get(attributeName);
+    }
+
+    protected boolean isDataArchivableTimestampWise(final ArchivingEvent<?> archivingEvent) {
+        final String name = archivingEvent.getAttributeCompleteName();
+
+        final long newTime = archivingEvent.getTimeStamp();
+        if (newTime == 0) {
+            StringBuilder builder = new StringBuilder("NOARCHIVING - received a zero timestamp for ");
+            builder.append(name).append(" - tableName: ").append(archivingEvent.getTableName());
+            String error = builder.toString();
+            logger.debug(error);
+            registerErrorMessage(name, error);
+            return false;
+        }
+
+        final LimitedStack lastTimestampStack = getTimestamps(name);
+        if (lastTimestampStack == null) {
+            return true;
+        }
+
+        final boolean isAlreadyRegisteredDate = lastTimestampStack.containsDate(newTime);
+        final boolean isValidDate = lastTimestampStack.validateDate(newTime);
+        if (isAlreadyRegisteredDate || !isValidDate) {
+            Timestamp timestamp = new Timestamp(newTime);
+            StringBuilder builder = new StringBuilder("NOARCHIVING - AlreadyRegisteredDate - attribute: ");
+            builder.append(name).append(" - timestamp: ").append(timestamp);
+            logger.debug(builder.toString());
+            builder = new StringBuilder("NOARCHIVING - attribute ").append(name)
+                    .append(" seems to be frozen - timestamp: ").append(timestamp);
+            registerErrorMessage(name, builder.toString());
+            return false;
+        }
+
+        return true;
+    }
+
+    public void setDbProxy(final DbProxy dbProxy) {
+        this.dbProxy = dbProxy;
+    }
+
+    // synchronized because of attribute list
+    @Override
+    public synchronized void clear() {
+        super.clear();
+        lastTimestampStacks.clear();
+        isFirstValueList.clear();
+        lastValueHashtable.clear();
+    }
+
+    // --------------------------------------------------------------------------//
+    // ELETTRA : Archiving Events
+    // --------------------------------------------------------------------------//
+
+    /**
+     * @return true if there are archive listeners still alive.
+     * @author Giacomo Strangolino
+     * @since events
+     */
+    protected boolean areThereArchiveListeners() {
+        if (archiveListenersCounter > 0) {
+            return true;
+        }
+        return false;
+    }
+
+    // --------------------------------------------------------------------------//
+    // ELETTRA : Archiving Events
+    // --------------------------------------------------------------------------//
+
+}
diff --git a/src/main/java/HdbArchiver/Collector/HdbCollectorFactory.java b/hdbarchiver/src/main/java/HdbArchiver/Collector/HdbCollectorFactory.java
similarity index 91%
rename from src/main/java/HdbArchiver/Collector/HdbCollectorFactory.java
rename to hdbarchiver/src/main/java/HdbArchiver/Collector/HdbCollectorFactory.java
index bf7827c7c2bca91f32048ca44f41d9b8c3bcc496..9773322902b2a74c590421ffcbda918af89e64f2 100644
--- a/src/main/java/HdbArchiver/Collector/HdbCollectorFactory.java
+++ b/hdbarchiver/src/main/java/HdbArchiver/Collector/HdbCollectorFactory.java
@@ -1,593 +1,571 @@
-// +======================================================================
-// $Source: /cvsroot/tango-cs/tango/jserver/archiving/HdbArchiver/Collector/HdbCollectorFactory.java,v $
-//
-// Project:      Tango Archiving Service
-//
-// Description:  Java source code for the class  HdbCollectorFactory.
-//						(Chinkumo Jean) - Mar 24, 2004
-//
-// $Author: ounsy $
-//
-// $Revision: 1.26 $
-//
-// $Log: HdbCollectorFactory.java,v $
-// Revision 1.26  2007/03/05 16:25:20  ounsy
-// non-static DataBase
-//
-// Revision 1.25  2007/01/09 15:15:24  ounsy
-// put the Giacomo version back for removeAllForAttribute
-//
-// Revision 1.24  2006/11/24 14:54:17  ounsy
-// we re-use the old removeAllForAttribute
-//
-// Revision 1.23  2006/11/24 14:04:16  ounsy
-// the diary entry in case of missing collector is now done by he archiver
-//
-// Revision 1.22  2006/11/24 13:19:35  ounsy
-// TdbCollectorFactory.get(attrLightMode) has a new parameter "doCreateCollectorIfMissing". A missing collector will only be created if this is true, otherwise a message in logged into the archiver's diary and an exception launched
-//
-// Revision 1.21  2006/11/15 15:48:56  ounsy
-// minorc hanges
-//
-// Revision 1.20  2006/11/13 15:56:20  ounsy
-// replaced the removeAllForAttribute(String) by removeAllForAttribute(AttributeLightMode) (cf. the Giacomo modification)
-//
-// Revision 1.19  2006/07/26 08:37:21  ounsy
-// try number no more static and reinitialized with change events (errorchange, numberscalarchange, etc...)
-//
-// Revision 1.18  2006/07/25 16:24:18  ounsy
-// HdbCollectorFactory no more static
-//
-// Revision 1.17  2006/07/25 09:47:01  ounsy
-// added a factoryLoadAssessment() method
-//
-// Revision 1.16  2006/06/27 12:07:13  ounsy
-// Corrected the bug that made the collectors all have the same logger for a given
-// SuperMode (instead of one logger per TdbArchiver)
-//
-// Revision 1.15  2006/06/16 09:25:33  ounsy
-// changed imports because of the diary package moving to the javaapi project
-//
-// Revision 1.14  2006/06/15 15:16:39  ounsy
-// added a protection against the ConcurrentModificationException that sometimes occur when launching the archivers
-//
-// Revision 1.13  2006/06/13 13:28:20  ounsy
-// added a file logging system (diary) that records data storing errors
-//
-// Revision 1.12  2006/05/12 09:20:17  ounsy
-// list concurrent modification bug correction
-//
-// Revision 1.11  2006/05/03 14:28:44  ounsy
-// renamed Spectrum_... into NumberSpectrum_...
-//
-// Revision 1.10  2006/04/11 09:12:39  ounsy
-// added some attribute removing methods
-//
-// Revision 1.9  2006/04/05 13:49:52  ounsy
-// new types full support
-//
-// Revision 1.8  2006/03/10 11:58:29  ounsy
-// state and string support
-//
-// Revision 1.7  2006/02/06 13:04:20  ounsy
-// added support for spectrum RO/RW
-//
-// Revision 1.6  2005/11/29 17:33:53  chinkumo
-// no message
-//
-// Revision 1.5.10.3  2005/11/29 16:16:05  chinkumo
-// Code reformated (pogo compatible)
-//
-// Revision 1.5.10.2  2005/11/15 13:46:08  chinkumo
-// ...
-//
-// Revision 1.5.10.1  2005/09/09 10:10:49  chinkumo
-// Since the collecting politic was simplified and improved CollectorFactory was modified.
-//
-// Revision 1.5  2005/06/24 12:06:27  chinkumo
-// Some constants were moved from fr.soleil.hdbtdbArchivingApi.ArchivingApi.ConfigConst to fr.soleil.hdbtdbArchivingApi.ArchivingTools.Tools.GlobalConst.
-
-// This change was reported here.
-//
-// Revision 1.4  2005/06/14 10:30:27  chinkumo
-// Branch (hdbArchiver_1_0_1-branch_0)  and HEAD merged.
-//
-// Revision 1.3.4.1  2005/06/13 14:09:56  chinkumo
-// Changes made to improve the management of exceptions were reported here.
-//
-// Revision 1.3  2005/02/04 17:10:15  chinkumo
-// The trouble with the grouped stopping strategy was fixed.
-//
-// Revision 1.2  2005/01/26 16:38:14  chinkumo
-// Ultimate synchronization before real sharing.
-//
-// Revision 1.1  2004/12/06 16:43:14  chinkumo
-// First commit (new architecture).
-//
-//
-// copyleft :	Synchrotron SOLEIL
-//					L'Orme des Merisiers
-//					Saint-Aubin - BP 48
-//					91192 GIF-sur-YVETTE CEDEX
-//
-//-======================================================================
-
-package HdbArchiver.Collector;
-
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.HashSet;
-import java.util.List;
-import java.util.Map;
-import java.util.concurrent.ConcurrentHashMap;
-
-import org.slf4j.Logger;
-
-import HdbArchiver.Collector.image.Image_RO;
-import HdbArchiver.Collector.scalar.BooleanScalar_RO;
-import HdbArchiver.Collector.scalar.BooleanScalar_RW;
-import HdbArchiver.Collector.scalar.BooleanScalar_WO;
-import HdbArchiver.Collector.scalar.NumberScalar_RO;
-import HdbArchiver.Collector.scalar.NumberScalar_RW;
-import HdbArchiver.Collector.scalar.NumberScalar_WO;
-import HdbArchiver.Collector.scalar.StateScalar_RO;
-import HdbArchiver.Collector.scalar.StringScalar_RO;
-import HdbArchiver.Collector.scalar.StringScalar_RW;
-import HdbArchiver.Collector.scalar.StringScalar_WO;
-import HdbArchiver.Collector.spectrum.BooleanSpectrum_RO;
-import HdbArchiver.Collector.spectrum.BooleanSpectrum_RW;
-import HdbArchiver.Collector.spectrum.NumberSpectrum_RO;
-import HdbArchiver.Collector.spectrum.NumberSpectrum_RW;
-import HdbArchiver.Collector.spectrum.StringSpectrum_RO;
-import HdbArchiver.Collector.spectrum.StringSpectrum_RW;
-import fr.esrf.Tango.AttrDataFormat;
-import fr.esrf.Tango.AttrWriteType;
-import fr.esrf.Tango.ErrSeverity;
-import fr.esrf.TangoDs.TangoConst;
-import fr.soleil.archiving.common.api.exception.ArchivingException;
-import fr.soleil.archiving.common.api.tools.GlobalConst;
-import fr.soleil.archiving.hdbtdb.api.tools.AttributeLightMode;
-import fr.soleil.archiving.hdbtdb.api.tools.AttributeSupport;
-import fr.soleil.archiving.hdbtdb.api.tools.mode.SuperMode;
-
-public final class HdbCollectorFactory {
-    private final ConcurrentHashMap<SuperMode, HdbCollector> tableCollector = new ConcurrentHashMap<SuperMode, HdbCollector>();
-    private final ConcurrentHashMap<String, String> collectorErrorTable = new ConcurrentHashMap<String, String>();
-    private final Logger logger;
-
-    public HdbCollectorFactory(final Logger logger) {
-        this.logger = logger;
-    }
-
-    /**
-     * This method returns the instance of HdbCollector associated / associable
-     * to an attribute. In this method, attributes are not grouped by mode.
-     * 
-     * @param attributeLightMode
-     *            Attribute associated to the looked collector.
-     * @return the instance of HdbCollector associated / associable to an
-     *         attribute.
-     */
-    public HdbCollector get(final AttributeLightMode attributeLightMode) {
-        final SuperMode superMode = new SuperMode(attributeLightMode.getDataFormat(), attributeLightMode.getDataType(),
-                attributeLightMode.getWritable(), attributeLightMode.getMode());
-        return tableCollector.get(superMode);
-    }
-
-    public HdbCollector get(final String attributeName) {
-        HdbCollector result = null;
-        for (final HdbCollector collector : tableCollector.values()) {
-            if (collector.isCollected(attributeName)) {
-                result = collector;
-                break;
-            }
-        }
-        return result;
-    }
-
-    public HdbCollector quickGet(final String attributeName) {
-        HdbCollector result = null;
-        for (final HdbCollector collector : tableCollector.values()) {
-            if (collector.isPotentiallyCollected(attributeName)) {
-                result = collector;
-                break;
-            }
-        }
-        return result;
-    }
-
-    /**
-     * This method create a new HdbCollector instance if required associated to
-     * an attribute. In this method, attributes are not grouped by mode.
-     * 
-     * @param attributeLightMode
-     *            Attribute associated to the looked collector.
-     */
-    public void createCollectorAndAddSource(final AttributeLightMode attributeLightMode, final DbProxy dbProxy)
-            throws ArchivingException {
-        if (attributeLightMode != null) {
-            logger.trace("createCollectorAndAddSource for " + attributeLightMode);
-            final SuperMode superMode = new SuperMode(attributeLightMode.getDataFormat(),
-                    attributeLightMode.getDataType(), attributeLightMode.getWritable(), attributeLightMode.getMode());
-            ArchivingException lastException = null;
-            String attrName = (attributeLightMode.getAttributeCompleteName());
-            try {
-                HdbCollector collector = tableCollector.get(superMode);
-                if (collector == null) {
-                    logger.trace("new collector ");
-                    collector = create(attributeLightMode);
-                    collector.setDbProxy(dbProxy);
-                    HdbCollector tmp = tableCollector.putIfAbsent(superMode, collector);
-                    if (tmp != null) {
-                        collector = tmp;
-                    }
-                    collector.addSource(attributeLightMode);
-                    removeErrorMessage(attrName);
-                } else {
-                    logger.trace("use existing collector " + collector.assessment());
-                    collector.addSource(attributeLightMode);
-                    removeErrorMessage(attrName);
-                }
-            } catch (ArchivingException e) {
-                registerError(attrName, e);
-                lastException = e;
-            }
-            if (lastException != null) {
-                throw lastException;
-            }
-        }
-    }
-
-    public String getLastError(AttributeLightMode attributeLightMode) {
-        String result;
-        String attrName = (attributeLightMode == null ? null : attributeLightMode.getAttributeCompleteName());
-        if (attrName == null) {
-            result = null;
-        } else {
-            result = collectorErrorTable.get(attrName.toLowerCase());
-            if (result == null) {
-                HdbCollector collector = get(attributeLightMode);
-                if (collector == null) {
-                    result = "No HdbCollector found";
-                } else {
-                    result = collector.getErrorMessage(attrName);
-                }
-            }
-        }
-        if (result == null) {
-            result = "";
-        }
-        return result;
-    }
-
-    public void registerError(String attrName, Exception exception) {
-        if (exception != null) {
-            registerErrorMessage(attrName, exception.getMessage());
-        }
-    }
-
-    public void registerErrorMessage(String attrName, String message) {
-        if ((attrName != null) && (message != null)) {
-            collectorErrorTable.put(attrName.toLowerCase(), message);
-        }
-    }
-
-    public void removeErrorMessage(String attrName) {
-        if (attrName != null) {
-            collectorErrorTable.remove(attrName.toLowerCase());
-        }
-    }
-
-    /**
-     * This method returns the instance of Hdb_Collector associated / associable
-     * to an attribute. In this method, attributes are not grouped by mode.
-     * 
-     * @param attributeLightMode
-     *            Attribute associated to the looked collector.
-     * @return the instance of Hdb_Collector associated / associable to an
-     *         attribute.
-     */
-
-    /**
-     * This method returns the instance of HdbCollector associated / associable
-     * to an attribute. In this method, attributes are grouped by mode.
-     * 
-     * @param attributeLightMode
-     *            Attribute associated to the looked collector.
-     * @return the instance of HdbCollector associated / associable to an
-     *         attribute.
-     */
-    public HdbCollector create(final AttributeLightMode attributeLightMode) throws ArchivingException {
-        // System.out.println("HdbCollectorFactory.create\r\n\t" +
-        // attributeLightMode.toString());
-        final String name = attributeLightMode.getAttributeCompleteName();
-        final int dataType = attributeLightMode.getDataType();
-        final int dataFormat = attributeLightMode.getDataFormat();
-        final int writable = attributeLightMode.getWritable();
-        final HdbModeHandler modeHandler = new HdbModeHandler(attributeLightMode.getMode());
-        HdbCollector collector = null;
-        if (AttributeSupport.checkAttributeSupport(name, dataType, dataFormat, writable)) {
-            switch (dataFormat) { // [0 - > SCALAR] (1 - > SPECTRUM] [2 - >
-            // IMAGE]
-                case AttrDataFormat._SCALAR: // SCALAR
-                    switch (writable) { // [0 - > READ] [1 - > READ_WITH_WRITE] ([2
-                    // - > WRITE)] [3 - > READ_WRITE]
-                        case AttrWriteType._READ: // READ -> 0
-                            switch (dataType) {
-                                case TangoConst.Tango_DEV_SHORT:
-                                case TangoConst.Tango_DEV_USHORT:
-                                case TangoConst.Tango_DEV_LONG:
-                                case TangoConst.Tango_DEV_ULONG:
-                                case TangoConst.Tango_DEV_DOUBLE:
-                                case TangoConst.Tango_DEV_FLOAT:
-                                case TangoConst.Tango_DEV_UCHAR:
-                                case TangoConst.Tango_DEV_ULONG64:
-                                case TangoConst.Tango_DEV_LONG64:
-                                    collector = new NumberScalar_RO(modeHandler, logger);
-                                    break;
-                                case TangoConst.Tango_DEV_BOOLEAN:
-                                    collector = new BooleanScalar_RO(modeHandler, logger);
-                                    break;
-                                case TangoConst.Tango_DEV_STATE:
-                                    collector = new StateScalar_RO(modeHandler, logger);
-                                    break;
-                                case TangoConst.Tango_DEV_STRING:
-                                    collector = new StringScalar_RO(modeHandler, logger);
-                                    break;
-
-                                default:
-                                    generateException(GlobalConst.DATA_TYPE_EXCEPTION, dataType, name);
-                            }
-                            break;
-                        case AttrWriteType._READ_WITH_WRITE: // READ_WITH_WRITE -> 1
-                            switch (dataType) {
-                                case TangoConst.Tango_DEV_SHORT:
-                                case TangoConst.Tango_DEV_USHORT:
-                                case TangoConst.Tango_DEV_LONG:
-                                case TangoConst.Tango_DEV_ULONG:
-                                case TangoConst.Tango_DEV_DOUBLE:
-                                case TangoConst.Tango_DEV_FLOAT:
-                                case TangoConst.Tango_DEV_UCHAR:
-                                case TangoConst.Tango_DEV_ULONG64:
-                                case TangoConst.Tango_DEV_LONG64:
-                                    collector = new NumberScalar_RW(modeHandler, logger);
-                                    break;
-                                case TangoConst.Tango_DEV_BOOLEAN:
-                                    collector = new BooleanScalar_RW(modeHandler, logger);
-                                    break;
-                                case TangoConst.Tango_DEV_STRING:
-                                    collector = new StringScalar_RW(modeHandler, logger);
-                                    break;
-                                case TangoConst.Tango_DEV_STATE:
-                                default:
-                                    generateException(GlobalConst.DATA_TYPE_EXCEPTION, dataType, name);
-                            }
-                            break;
-                        case AttrWriteType._WRITE: // WRITE -> 2
-                            switch (dataType) {
-                                case TangoConst.Tango_DEV_SHORT:
-                                case TangoConst.Tango_DEV_USHORT:
-                                case TangoConst.Tango_DEV_LONG:
-                                case TangoConst.Tango_DEV_ULONG:
-                                case TangoConst.Tango_DEV_DOUBLE:
-                                case TangoConst.Tango_DEV_FLOAT:
-                                case TangoConst.Tango_DEV_UCHAR:
-                                case TangoConst.Tango_DEV_ULONG64:
-                                case TangoConst.Tango_DEV_LONG64:
-                                    collector = new NumberScalar_WO(modeHandler, logger);
-                                    break;
-                                case TangoConst.Tango_DEV_BOOLEAN:
-                                    collector = new BooleanScalar_WO(modeHandler, logger);
-                                    break;
-                                case TangoConst.Tango_DEV_STRING:
-                                    collector = new StringScalar_WO(modeHandler, logger);
-                                    break;
-                                case TangoConst.Tango_DEV_STATE:
-                                default:
-                                    generateException(GlobalConst.DATA_TYPE_EXCEPTION, dataType, name);
-                            }
-                            break;
-                        case AttrWriteType._READ_WRITE: // READ_WRITE -> 3
-                            switch (dataType) {
-                                case TangoConst.Tango_DEV_SHORT:
-                                case TangoConst.Tango_DEV_FLOAT:
-                                case TangoConst.Tango_DEV_USHORT:
-                                case TangoConst.Tango_DEV_LONG:
-                                case TangoConst.Tango_DEV_ULONG:
-                                case TangoConst.Tango_DEV_DOUBLE:
-                                case TangoConst.Tango_DEV_UCHAR:
-                                case TangoConst.Tango_DEV_ULONG64:
-                                case TangoConst.Tango_DEV_LONG64:
-                                    collector = new NumberScalar_RW(modeHandler, logger);
-                                    break;
-                                case TangoConst.Tango_DEV_BOOLEAN:
-                                    collector = new BooleanScalar_RW(modeHandler, logger);
-                                    break;
-                                case TangoConst.Tango_DEV_STRING:
-                                    collector = new StringScalar_RW(modeHandler, logger);
-                                    break;
-                                case TangoConst.Tango_DEV_STATE:
-                                default:
-                                    generateException(GlobalConst.DATA_TYPE_EXCEPTION, dataType, name);
-                            }
-                            break;
-                        default:
-                            generateException(GlobalConst.DATA_WRITABLE_EXCEPTION, writable, name);
-                    }
-                    break;
-                case AttrDataFormat._SPECTRUM: // SPECTRUM
-                    // collector = new NumberSpectrum_RO(modeHandler);
-                    switch (writable) {
-                    // [0 - > READ] [1 - > READ_WITH_WRITE] [2 - > WRITE] [3 - > READ_WRITE]
-                        case AttrWriteType._READ:
-                            switch (dataType) {
-                                case TangoConst.Tango_DEV_SHORT:
-                                case TangoConst.Tango_DEV_USHORT:
-                                case TangoConst.Tango_DEV_LONG:
-                                case TangoConst.Tango_DEV_ULONG:
-                                case TangoConst.Tango_DEV_DOUBLE:
-                                case TangoConst.Tango_DEV_FLOAT:
-                                case TangoConst.Tango_DEV_UCHAR:
-                                case TangoConst.Tango_DEV_ULONG64:
-                                case TangoConst.Tango_DEV_LONG64:
-                                    collector = new NumberSpectrum_RO(modeHandler, logger);
-                                    break;
-                                case TangoConst.Tango_DEV_BOOLEAN:
-                                    collector = new BooleanSpectrum_RO(modeHandler, logger);
-                                    break;
-                                case TangoConst.Tango_DEV_STRING:
-                                    collector = new StringSpectrum_RO(modeHandler, logger);
-                                    break;
-
-                                default:
-                                    generateException(GlobalConst.DATA_TYPE_EXCEPTION, dataType, name);
-                            }
-                            break;
-                        case AttrWriteType._WRITE:
-                            switch (dataType) {
-                                case TangoConst.Tango_DEV_SHORT:
-                                case TangoConst.Tango_DEV_USHORT:
-                                case TangoConst.Tango_DEV_LONG:
-                                case TangoConst.Tango_DEV_ULONG:
-                                case TangoConst.Tango_DEV_DOUBLE:
-                                case TangoConst.Tango_DEV_FLOAT:
-                                case TangoConst.Tango_DEV_UCHAR:
-                                case TangoConst.Tango_DEV_ULONG64:
-                                case TangoConst.Tango_DEV_LONG64:
-                                    collector = new NumberSpectrum_RO(modeHandler, logger);
-                                    break;
-                                case TangoConst.Tango_DEV_BOOLEAN:
-                                    collector = new BooleanSpectrum_RO(modeHandler, logger);
-                                    break;
-                                case TangoConst.Tango_DEV_STRING:
-                                    collector = new StringSpectrum_RO(modeHandler, logger);
-                                    break;
-                                default:
-                                    generateException(GlobalConst.DATA_TYPE_EXCEPTION, dataType, name);
-                            }
-                            break;
-
-                        case AttrWriteType._READ_WRITE:
-                        case AttrWriteType._READ_WITH_WRITE:
-                            switch (dataType) {
-                                case TangoConst.Tango_DEV_SHORT:
-                                case TangoConst.Tango_DEV_USHORT:
-                                case TangoConst.Tango_DEV_LONG:
-                                case TangoConst.Tango_DEV_ULONG:
-                                case TangoConst.Tango_DEV_DOUBLE:
-                                case TangoConst.Tango_DEV_FLOAT:
-                                case TangoConst.Tango_DEV_UCHAR:
-                                case TangoConst.Tango_DEV_LONG64:
-
-                                case TangoConst.Tango_DEV_ULONG64:
-                                case TangoConst.Tango_DEV_STATE:
-                                    collector = new NumberSpectrum_RW(modeHandler, logger);
-                                    break;
-                                case TangoConst.Tango_DEV_BOOLEAN:
-                                    collector = new BooleanSpectrum_RW(modeHandler, logger);
-                                    break;
-                                case TangoConst.Tango_DEV_STRING:
-                                    collector = new StringSpectrum_RW(modeHandler, logger);
-                                    break;
-
-                                default:
-                                    generateException(GlobalConst.DATA_TYPE_EXCEPTION, dataType, name);
-                            }
-                            break;
-                    }
-                    break;
-                case AttrDataFormat._IMAGE: // IMAGE
-                    collector = new Image_RO(modeHandler, logger);
-                    break;
-                default:
-                    generateException(GlobalConst.DATA_FORMAT_EXCEPTION, dataFormat, name);
-            }
-        }
-
-        return collector;
-    }
-
-    public void destroy(final AttributeLightMode attributeLightMode) {
-        final SuperMode superMode = new SuperMode(attributeLightMode.getDataFormat(), attributeLightMode.getDataType(),
-                attributeLightMode.getWritable(), attributeLightMode.getMode());
-        tableCollector.remove(superMode);
-    }
-
-    public void remove(final String attributeName) throws ArchivingException {
-        final List<SuperMode> modes = new ArrayList<SuperMode>();
-        for (final Map.Entry<SuperMode, HdbCollector> entry : tableCollector.entrySet()) {
-            final SuperMode mode = entry.getKey();
-            final HdbCollector collector = entry.getValue();
-            if (collector.isCollected(attributeName)) {
-                collector.removeSource(attributeName);
-            }
-            if (collector.hasEmptyList()) {
-                modes.add(mode);
-            }
-        }
-        for (final SuperMode superMode : modes) {
-            tableCollector.remove(superMode);
-        }
-    }
-
-    // GIACOMO VERSION
-    public void removeAllForAttribute(final AttributeLightMode attributeLightMode) throws ArchivingException {
-        SuperMode superMode;
-        final HashSet<SuperMode> toRemove = new HashSet<SuperMode>();
-        superMode = new SuperMode(attributeLightMode.getDataFormat(), attributeLightMode.getDataType(),
-                attributeLightMode.getWritable(), attributeLightMode.getMode());
-        final HdbCollector collector = tableCollector.get(superMode);
-
-        if (collector != null) {
-            collector.removeSource(attributeLightMode.getAttributeCompleteName());
-            if (collector.hasEmptyList()) {
-                toRemove.add(superMode);
-            }
-        }
-        for (SuperMode mode : toRemove) {
-            if (mode != null) {
-                tableCollector.remove(mode);
-            }
-        }
-        toRemove.clear();
-    }
-
-    public String factoryAssessment() {
-        final StringBuilder ass = new StringBuilder();
-        final Collection<HdbCollector> collectors = tableCollector.values();
-        int i = 1;
-        final int size = collectors.size();
-        for (final HdbCollector hdbCollector : collectors) {
-            ass.append("*********************************" + " " + i++ + "/" + size + " "
-                    + "*********************************" + "\r\n");
-            ass.append(hdbCollector.assessment());
-        }
-        return ass.toString();
-    }
-
-    public int[] factoryLoadAssessment() {
-        final int[] ret = new int[3];
-        for (final HdbCollector collector : tableCollector.values()) {
-            final int[] collectorLoad = collector.loadAssessment();
-            ret[0] += collectorLoad[0];
-            ret[1] += collectorLoad[1];
-            ret[2] += collectorLoad[2];
-        }
-        return ret;
-    }
-
-    private static void generateException(final String cause, final int causeValue, final String name)
-            throws ArchivingException {
-        final String message = GlobalConst.ARCHIVING_ERROR_PREFIX + " : " + cause;
-        final String reason = "Failed while executing HdbCollectorFactory.create() method...";
-        final String desc = cause + " (" + causeValue + ") not supported !! [" + name + "]";
-        throw new ArchivingException(message, reason, ErrSeverity.PANIC, desc, "");
-    }
-
-    public void clear() {
-        for (HdbCollector collector : tableCollector.values()) {
-            collector.clear();
-        }
-        tableCollector.clear();
-    }
-}
+// +======================================================================
+// $Source: /cvsroot/tango-cs/tango/jserver/archiving/HdbArchiver/Collector/HdbCollectorFactory.java,v $
+//
+// Project:      Tango Archiving Service
+//
+// Description:  Java source code for the class  HdbCollectorFactory.
+//						(Chinkumo Jean) - Mar 24, 2004
+//
+// $Author: ounsy $
+//
+// $Revision: 1.26 $
+//
+// $Log: HdbCollectorFactory.java,v $
+// Revision 1.26  2007/03/05 16:25:20  ounsy
+// non-static DataBase
+//
+// Revision 1.25  2007/01/09 15:15:24  ounsy
+// put the Giacomo version back for removeAllForAttribute
+//
+// Revision 1.24  2006/11/24 14:54:17  ounsy
+// we re-use the old removeAllForAttribute
+//
+// Revision 1.23  2006/11/24 14:04:16  ounsy
+// the diary entry in case of missing collector is now done by he archiver
+//
+// Revision 1.22  2006/11/24 13:19:35  ounsy
+// TdbCollectorFactory.get(attrLightMode) has a new parameter "doCreateCollectorIfMissing". A missing collector will only be created if this is true, otherwise a message in logged into the archiver's diary and an exception launched
+//
+// Revision 1.21  2006/11/15 15:48:56  ounsy
+// minorc hanges
+//
+// Revision 1.20  2006/11/13 15:56:20  ounsy
+// replaced the removeAllForAttribute(String) by removeAllForAttribute(AttributeLightMode) (cf. the Giacomo modification)
+//
+// Revision 1.19  2006/07/26 08:37:21  ounsy
+// try number no more static and reinitialized with change events (errorchange, numberscalarchange, etc...)
+//
+// Revision 1.18  2006/07/25 16:24:18  ounsy
+// HdbCollectorFactory no more static
+//
+// Revision 1.17  2006/07/25 09:47:01  ounsy
+// added a factoryLoadAssessment() method
+//
+// Revision 1.16  2006/06/27 12:07:13  ounsy
+// Corrected the bug that made the collectors all have the same logger for a given
+// SuperMode (instead of one logger per TdbArchiver)
+//
+// Revision 1.15  2006/06/16 09:25:33  ounsy
+// changed imports because of the diary package moving to the javaapi project
+//
+// Revision 1.14  2006/06/15 15:16:39  ounsy
+// added a protection against the ConcurrentModificationException that sometimes occur when launching the archivers
+//
+// Revision 1.13  2006/06/13 13:28:20  ounsy
+// added a file logging system (diary) that records data storing errors
+//
+// Revision 1.12  2006/05/12 09:20:17  ounsy
+// list concurrent modification bug correction
+//
+// Revision 1.11  2006/05/03 14:28:44  ounsy
+// renamed Spectrum_... into NumberSpectrum_...
+//
+// Revision 1.10  2006/04/11 09:12:39  ounsy
+// added some attribute removing methods
+//
+// Revision 1.9  2006/04/05 13:49:52  ounsy
+// new types full support
+//
+// Revision 1.8  2006/03/10 11:58:29  ounsy
+// state and string support
+//
+// Revision 1.7  2006/02/06 13:04:20  ounsy
+// added support for spectrum RO/RW
+//
+// Revision 1.6  2005/11/29 17:33:53  chinkumo
+// no message
+//
+// Revision 1.5.10.3  2005/11/29 16:16:05  chinkumo
+// Code reformated (pogo compatible)
+//
+// Revision 1.5.10.2  2005/11/15 13:46:08  chinkumo
+// ...
+//
+// Revision 1.5.10.1  2005/09/09 10:10:49  chinkumo
+// Since the collecting politic was simplified and improved CollectorFactory was modified.
+//
+// Revision 1.5  2005/06/24 12:06:27  chinkumo
+// Some constants were moved from fr.soleil.hdbtdbArchivingApi.ArchivingApi.ConfigConst to fr.soleil.hdbtdbArchivingApi.ArchivingTools.Tools.GlobalConst.
+
+// This change was reported here.
+//
+// Revision 1.4  2005/06/14 10:30:27  chinkumo
+// Branch (hdbArchiver_1_0_1-branch_0)  and HEAD merged.
+//
+// Revision 1.3.4.1  2005/06/13 14:09:56  chinkumo
+// Changes made to improve the management of exceptions were reported here.
+//
+// Revision 1.3  2005/02/04 17:10:15  chinkumo
+// The trouble with the grouped stopping strategy was fixed.
+//
+// Revision 1.2  2005/01/26 16:38:14  chinkumo
+// Ultimate synchronization before real sharing.
+//
+// Revision 1.1  2004/12/06 16:43:14  chinkumo
+// First commit (new architecture).
+//
+//
+// copyleft :	Synchrotron SOLEIL
+//					L'Orme des Merisiers
+//					Saint-Aubin - BP 48
+//					91192 GIF-sur-YVETTE CEDEX
+//
+//-======================================================================
+
+package HdbArchiver.Collector;
+
+import HdbArchiver.Collector.image.Image_RO;
+import HdbArchiver.Collector.scalar.*;
+import HdbArchiver.Collector.spectrum.*;
+import fr.esrf.Tango.AttrDataFormat;
+import fr.esrf.Tango.AttrWriteType;
+import fr.esrf.Tango.ErrSeverity;
+import fr.esrf.TangoDs.TangoConst;
+import fr.soleil.archiving.common.api.exception.ArchivingException;
+import fr.soleil.archiving.common.api.tools.GlobalConst;
+import fr.soleil.archiving.hdbtdb.api.tools.AttributeLightMode;
+import fr.soleil.archiving.hdbtdb.api.tools.AttributeSupport;
+import fr.soleil.archiving.hdbtdb.api.tools.mode.SuperMode;
+import org.slf4j.Logger;
+
+import java.util.*;
+import java.util.concurrent.ConcurrentHashMap;
+
+public final class HdbCollectorFactory {
+    private final ConcurrentHashMap<SuperMode, HdbCollector> tableCollector = new ConcurrentHashMap<SuperMode, HdbCollector>();
+    private final ConcurrentHashMap<String, String> collectorErrorTable = new ConcurrentHashMap<String, String>();
+    private final Logger logger;
+
+    public HdbCollectorFactory(final Logger logger) {
+        this.logger = logger;
+    }
+
+    /**
+     * This method returns the instance of HdbCollector associated / associable
+     * to an attribute. In this method, attributes are not grouped by mode.
+     *
+     * @param attributeLightMode Attribute associated to the looked collector.
+     * @return the instance of HdbCollector associated / associable to an
+     * attribute.
+     */
+    public HdbCollector get(final AttributeLightMode attributeLightMode) {
+        final SuperMode superMode = new SuperMode(attributeLightMode.getDataFormat(), attributeLightMode.getDataType(),
+                attributeLightMode.getWritable(), attributeLightMode.getMode());
+        return tableCollector.get(superMode);
+    }
+
+    public HdbCollector get(final String attributeName) {
+        HdbCollector result = null;
+        for (final HdbCollector collector : tableCollector.values()) {
+            if (collector.isCollected(attributeName)) {
+                result = collector;
+                break;
+            }
+        }
+        return result;
+    }
+
+    public HdbCollector quickGet(final String attributeName) {
+        HdbCollector result = null;
+        for (final HdbCollector collector : tableCollector.values()) {
+            if (collector.isPotentiallyCollected(attributeName)) {
+                result = collector;
+                break;
+            }
+        }
+        return result;
+    }
+
+    /**
+     * This method create a new HdbCollector instance if required associated to
+     * an attribute. In this method, attributes are not grouped by mode.
+     *
+     * @param attributeLightMode Attribute associated to the looked collector.
+     */
+    public void createCollectorAndAddSource(final AttributeLightMode attributeLightMode, final DbProxy dbProxy, final boolean useEvents)
+            throws ArchivingException {
+        if (attributeLightMode != null) {
+            logger.trace("createCollectorAndAddSource for " + attributeLightMode);
+            final SuperMode superMode = new SuperMode(attributeLightMode.getDataFormat(),
+                    attributeLightMode.getDataType(), attributeLightMode.getWritable(), attributeLightMode.getMode());
+            ArchivingException lastException = null;
+            String attrName = (attributeLightMode.getAttributeCompleteName());
+            try {
+                HdbCollector collector = tableCollector.get(superMode);
+                if (collector == null) {
+                    logger.trace("new collector ");
+                    collector = create(attributeLightMode, useEvents);
+                    collector.setDbProxy(dbProxy);
+                    HdbCollector tmp = tableCollector.putIfAbsent(superMode, collector);
+                    if (tmp != null) {
+                        collector = tmp;
+                    }
+                    collector.addSource(attributeLightMode);
+                    removeErrorMessage(attrName);
+                } else {
+                    logger.trace("use existing collector " + collector.assessment());
+                    collector.addSource(attributeLightMode);
+                    removeErrorMessage(attrName);
+                }
+            } catch (ArchivingException e) {
+                registerError(attrName, e);
+                lastException = e;
+            }
+            if (lastException != null) {
+                throw lastException;
+            }
+        }
+    }
+
+    public String getLastError(AttributeLightMode attributeLightMode) {
+        String result;
+        String attrName = (attributeLightMode == null ? null : attributeLightMode.getAttributeCompleteName());
+        if (attrName == null) {
+            result = null;
+        } else {
+            result = collectorErrorTable.get(attrName.toLowerCase());
+            if (result == null) {
+                HdbCollector collector = get(attributeLightMode);
+                if (collector == null) {
+                    result = "No HdbCollector found";
+                } else {
+                    result = collector.getErrorMessage(attrName);
+                }
+            }
+        }
+        if (result == null) {
+            result = "";
+        }
+        return result;
+    }
+
+    public void registerError(String attrName, Exception exception) {
+        if (exception != null) {
+            registerErrorMessage(attrName, exception.getMessage());
+        }
+    }
+
+    public void registerErrorMessage(String attrName, String message) {
+        if ((attrName != null) && (message != null)) {
+            collectorErrorTable.put(attrName.toLowerCase(), message);
+        }
+    }
+
+    public void removeErrorMessage(String attrName) {
+        if (attrName != null) {
+            collectorErrorTable.remove(attrName.toLowerCase());
+        }
+    }
+
+    /**
+     * This method returns the instance of Hdb_Collector associated / associable
+     * to an attribute. In this method, attributes are not grouped by mode.
+     *
+     * @param attributeLightMode
+     *            Attribute associated to the looked collector.
+     * @return the instance of Hdb_Collector associated / associable to an
+     *         attribute.
+     */
+
+    /**
+     * This method returns the instance of HdbCollector associated / associable
+     * to an attribute. In this method, attributes are grouped by mode.
+     *
+     * @param attributeLightMode Attribute associated to the looked collector.
+     * @return the instance of HdbCollector associated / associable to an
+     * attribute.
+     */
+    public HdbCollector create(final AttributeLightMode attributeLightMode, final boolean useEvents) throws ArchivingException {
+        // System.out.println("HdbCollectorFactory.create\r\n\t" +
+        // attributeLightMode.toString());
+        final String name = attributeLightMode.getAttributeCompleteName();
+        final int dataType = attributeLightMode.getDataType();
+        final int dataFormat = attributeLightMode.getDataFormat();
+        final int writable = attributeLightMode.getWritable();
+        final HdbModeHandler modeHandler = new HdbModeHandler(attributeLightMode.getMode());
+        HdbCollector collector = null;
+        if (AttributeSupport.checkAttributeSupport(name, dataType, dataFormat, writable)) {
+            switch (dataFormat) { // [0 - > SCALAR] (1 - > SPECTRUM] [2 - >
+                // IMAGE]
+                case AttrDataFormat._SCALAR: // SCALAR
+                    switch (writable) { // [0 - > READ] [1 - > READ_WITH_WRITE] ([2
+                        // - > WRITE)] [3 - > READ_WRITE]
+                        case AttrWriteType._READ: // READ -> 0
+                            switch (dataType) {
+                                case TangoConst.Tango_DEV_SHORT:
+                                case TangoConst.Tango_DEV_USHORT:
+                                case TangoConst.Tango_DEV_LONG:
+                                case TangoConst.Tango_DEV_ULONG:
+                                case TangoConst.Tango_DEV_DOUBLE:
+                                case TangoConst.Tango_DEV_FLOAT:
+                                case TangoConst.Tango_DEV_UCHAR:
+                                case TangoConst.Tango_DEV_ULONG64:
+                                case TangoConst.Tango_DEV_LONG64:
+                                    collector = new NumberScalar_RO(modeHandler, useEvents, logger);
+                                    break;
+                                case TangoConst.Tango_DEV_BOOLEAN:
+                                    collector = new BooleanScalar_RO(modeHandler, useEvents, logger);
+                                    break;
+                                case TangoConst.Tango_DEV_STATE:
+                                    collector = new StateScalar_RO(modeHandler, useEvents, logger);
+                                    break;
+                                case TangoConst.Tango_DEV_STRING:
+                                    collector = new StringScalar_RO(modeHandler, useEvents, logger);
+                                    break;
+
+                                default:
+                                    generateException(GlobalConst.DATA_TYPE_EXCEPTION, dataType, name);
+                            }
+                            break;
+                        case AttrWriteType._READ_WITH_WRITE: // READ_WITH_WRITE -> 1
+                            switch (dataType) {
+                                case TangoConst.Tango_DEV_SHORT:
+                                case TangoConst.Tango_DEV_USHORT:
+                                case TangoConst.Tango_DEV_LONG:
+                                case TangoConst.Tango_DEV_ULONG:
+                                case TangoConst.Tango_DEV_DOUBLE:
+                                case TangoConst.Tango_DEV_FLOAT:
+                                case TangoConst.Tango_DEV_UCHAR:
+                                case TangoConst.Tango_DEV_ULONG64:
+                                case TangoConst.Tango_DEV_LONG64:
+                                    collector = new NumberScalar_RW(modeHandler, useEvents, logger);
+                                    break;
+                                case TangoConst.Tango_DEV_BOOLEAN:
+                                    collector = new BooleanScalar_RW(modeHandler, useEvents, logger);
+                                    break;
+                                case TangoConst.Tango_DEV_STRING:
+                                    collector = new StringScalar_RW(modeHandler, useEvents, logger);
+                                    break;
+                                case TangoConst.Tango_DEV_STATE:
+                                default:
+                                    generateException(GlobalConst.DATA_TYPE_EXCEPTION, dataType, name);
+                            }
+                            break;
+                        case AttrWriteType._WRITE: // WRITE -> 2
+                            switch (dataType) {
+                                case TangoConst.Tango_DEV_SHORT:
+                                case TangoConst.Tango_DEV_USHORT:
+                                case TangoConst.Tango_DEV_LONG:
+                                case TangoConst.Tango_DEV_ULONG:
+                                case TangoConst.Tango_DEV_DOUBLE:
+                                case TangoConst.Tango_DEV_FLOAT:
+                                case TangoConst.Tango_DEV_UCHAR:
+                                case TangoConst.Tango_DEV_ULONG64:
+                                case TangoConst.Tango_DEV_LONG64:
+                                    collector = new NumberScalar_WO(modeHandler, useEvents, logger);
+                                    break;
+                                case TangoConst.Tango_DEV_BOOLEAN:
+                                    collector = new BooleanScalar_WO(modeHandler, useEvents, logger);
+                                    break;
+                                case TangoConst.Tango_DEV_STRING:
+                                    collector = new StringScalar_WO(modeHandler, useEvents, logger);
+                                    break;
+                                case TangoConst.Tango_DEV_STATE:
+                                default:
+                                    generateException(GlobalConst.DATA_TYPE_EXCEPTION, dataType, name);
+                            }
+                            break;
+                        case AttrWriteType._READ_WRITE: // READ_WRITE -> 3
+                            switch (dataType) {
+                                case TangoConst.Tango_DEV_SHORT:
+                                case TangoConst.Tango_DEV_FLOAT:
+                                case TangoConst.Tango_DEV_USHORT:
+                                case TangoConst.Tango_DEV_LONG:
+                                case TangoConst.Tango_DEV_ULONG:
+                                case TangoConst.Tango_DEV_DOUBLE:
+                                case TangoConst.Tango_DEV_UCHAR:
+                                case TangoConst.Tango_DEV_ULONG64:
+                                case TangoConst.Tango_DEV_LONG64:
+                                    collector = new NumberScalar_RW(modeHandler, useEvents, logger);
+                                    break;
+                                case TangoConst.Tango_DEV_BOOLEAN:
+                                    collector = new BooleanScalar_RW(modeHandler, useEvents, logger);
+                                    break;
+                                case TangoConst.Tango_DEV_STRING:
+                                    collector = new StringScalar_RW(modeHandler, useEvents, logger);
+                                    break;
+                                case TangoConst.Tango_DEV_STATE:
+                                default:
+                                    generateException(GlobalConst.DATA_TYPE_EXCEPTION, dataType, name);
+                            }
+                            break;
+                        default:
+                            generateException(GlobalConst.DATA_WRITABLE_EXCEPTION, writable, name);
+                    }
+                    break;
+                case AttrDataFormat._SPECTRUM: // SPECTRUM
+                    // collector = new NumberSpectrum_RO(modeHandler);
+                    switch (writable) {
+                        // [0 - > READ] [1 - > READ_WITH_WRITE] [2 - > WRITE] [3 - > READ_WRITE]
+                        case AttrWriteType._READ:
+                            switch (dataType) {
+                                case TangoConst.Tango_DEV_SHORT:
+                                case TangoConst.Tango_DEV_USHORT:
+                                case TangoConst.Tango_DEV_LONG:
+                                case TangoConst.Tango_DEV_ULONG:
+                                case TangoConst.Tango_DEV_DOUBLE:
+                                case TangoConst.Tango_DEV_FLOAT:
+                                case TangoConst.Tango_DEV_UCHAR:
+                                case TangoConst.Tango_DEV_ULONG64:
+                                case TangoConst.Tango_DEV_LONG64:
+                                    collector = new NumberSpectrum_RO(modeHandler, useEvents, logger);
+                                    break;
+                                case TangoConst.Tango_DEV_BOOLEAN:
+                                    collector = new BooleanSpectrum_RO(modeHandler, useEvents, logger);
+                                    break;
+                                case TangoConst.Tango_DEV_STRING:
+                                    collector = new StringSpectrum_RO(modeHandler, useEvents, logger);
+                                    break;
+
+                                default:
+                                    generateException(GlobalConst.DATA_TYPE_EXCEPTION, dataType, name);
+                            }
+                            break;
+                        case AttrWriteType._WRITE:
+                            switch (dataType) {
+                                case TangoConst.Tango_DEV_SHORT:
+                                case TangoConst.Tango_DEV_USHORT:
+                                case TangoConst.Tango_DEV_LONG:
+                                case TangoConst.Tango_DEV_ULONG:
+                                case TangoConst.Tango_DEV_DOUBLE:
+                                case TangoConst.Tango_DEV_FLOAT:
+                                case TangoConst.Tango_DEV_UCHAR:
+                                case TangoConst.Tango_DEV_ULONG64:
+                                case TangoConst.Tango_DEV_LONG64:
+                                    collector = new NumberSpectrum_RO(modeHandler, useEvents, logger);
+                                    break;
+                                case TangoConst.Tango_DEV_BOOLEAN:
+                                    collector = new BooleanSpectrum_RO(modeHandler, useEvents, logger);
+                                    break;
+                                case TangoConst.Tango_DEV_STRING:
+                                    collector = new StringSpectrum_RO(modeHandler, useEvents, logger);
+                                    break;
+                                default:
+                                    generateException(GlobalConst.DATA_TYPE_EXCEPTION, dataType, name);
+                            }
+                            break;
+
+                        case AttrWriteType._READ_WRITE:
+                        case AttrWriteType._READ_WITH_WRITE:
+                            switch (dataType) {
+                                case TangoConst.Tango_DEV_SHORT:
+                                case TangoConst.Tango_DEV_USHORT:
+                                case TangoConst.Tango_DEV_LONG:
+                                case TangoConst.Tango_DEV_ULONG:
+                                case TangoConst.Tango_DEV_DOUBLE:
+                                case TangoConst.Tango_DEV_FLOAT:
+                                case TangoConst.Tango_DEV_UCHAR:
+                                case TangoConst.Tango_DEV_LONG64:
+
+                                case TangoConst.Tango_DEV_ULONG64:
+                                case TangoConst.Tango_DEV_STATE:
+                                    collector = new NumberSpectrum_RW(modeHandler, useEvents, logger);
+                                    break;
+                                case TangoConst.Tango_DEV_BOOLEAN:
+                                    collector = new BooleanSpectrum_RW(modeHandler, useEvents, logger);
+                                    break;
+                                case TangoConst.Tango_DEV_STRING:
+                                    collector = new StringSpectrum_RW(modeHandler, useEvents, logger);
+                                    break;
+
+                                default:
+                                    generateException(GlobalConst.DATA_TYPE_EXCEPTION, dataType, name);
+                            }
+                            break;
+                    }
+                    break;
+                case AttrDataFormat._IMAGE: // IMAGE
+                    collector = new Image_RO(modeHandler,useEvents, logger);
+                    break;
+                default:
+                    generateException(GlobalConst.DATA_FORMAT_EXCEPTION, dataFormat, name);
+            }
+        }
+
+        return collector;
+    }
+
+    public void destroy(final AttributeLightMode attributeLightMode) {
+        final SuperMode superMode = new SuperMode(attributeLightMode.getDataFormat(), attributeLightMode.getDataType(),
+                attributeLightMode.getWritable(), attributeLightMode.getMode());
+        tableCollector.remove(superMode);
+    }
+
+    public void remove(final String attributeName) throws ArchivingException {
+        final List<SuperMode> modes = new ArrayList<SuperMode>();
+        for (final Map.Entry<SuperMode, HdbCollector> entry : tableCollector.entrySet()) {
+            final SuperMode mode = entry.getKey();
+            final HdbCollector collector = entry.getValue();
+            if (collector.isCollected(attributeName)) {
+                collector.removeSource(attributeName);
+            }
+            if (collector.hasEmptyList()) {
+                modes.add(mode);
+            }
+        }
+        for (final SuperMode superMode : modes) {
+            tableCollector.remove(superMode);
+        }
+    }
+
+    // GIACOMO VERSION
+    public void removeAllForAttribute(final AttributeLightMode attributeLightMode) throws ArchivingException {
+        SuperMode superMode;
+        final HashSet<SuperMode> toRemove = new HashSet<SuperMode>();
+        superMode = new SuperMode(attributeLightMode.getDataFormat(), attributeLightMode.getDataType(),
+                attributeLightMode.getWritable(), attributeLightMode.getMode());
+        final HdbCollector collector = tableCollector.get(superMode);
+
+        if (collector != null) {
+            collector.removeSource(attributeLightMode.getAttributeCompleteName());
+            if (collector.hasEmptyList()) {
+                toRemove.add(superMode);
+            }
+        }
+        for (SuperMode mode : toRemove) {
+            if (mode != null) {
+                tableCollector.remove(mode);
+            }
+        }
+        toRemove.clear();
+    }
+
+    public String factoryAssessment() {
+        final StringBuilder ass = new StringBuilder();
+        final Collection<HdbCollector> collectors = tableCollector.values();
+        int i = 1;
+        final int size = collectors.size();
+        for (final HdbCollector hdbCollector : collectors) {
+            ass.append("*********************************" + " " + i++ + "/" + size + " "
+                    + "*********************************" + "\r\n");
+            ass.append(hdbCollector.assessment());
+        }
+        return ass.toString();
+    }
+
+    public int[] factoryLoadAssessment() {
+        final int[] ret = new int[3];
+        for (final HdbCollector collector : tableCollector.values()) {
+            final int[] collectorLoad = collector.loadAssessment();
+            ret[0] += collectorLoad[0];
+            ret[1] += collectorLoad[1];
+            ret[2] += collectorLoad[2];
+        }
+        return ret;
+    }
+
+    private static void generateException(final String cause, final int causeValue, final String name)
+            throws ArchivingException {
+        final String message = GlobalConst.ARCHIVING_ERROR_PREFIX + " : " + cause;
+        final String reason = "Failed while executing HdbCollectorFactory.create() method...";
+        final String desc = cause + " (" + causeValue + ") not supported !! [" + name + "]";
+        throw new ArchivingException(message, reason, ErrSeverity.PANIC, desc, "");
+    }
+
+    public void clear() {
+        for (HdbCollector collector : tableCollector.values()) {
+            collector.clear();
+        }
+        tableCollector.clear();
+    }
+}
diff --git a/src/main/java/HdbArchiver/Collector/HdbModeHandler.java b/hdbarchiver/src/main/java/HdbArchiver/Collector/HdbModeHandler.java
similarity index 92%
rename from src/main/java/HdbArchiver/Collector/HdbModeHandler.java
rename to hdbarchiver/src/main/java/HdbArchiver/Collector/HdbModeHandler.java
index 653920db29264ca67fa780c6955616cfd8a559e7..418b5e8aa64b859c1719d642910cfe86bc28bac2 100644
--- a/src/main/java/HdbArchiver/Collector/HdbModeHandler.java
+++ b/hdbarchiver/src/main/java/HdbArchiver/Collector/HdbModeHandler.java
@@ -1,94 +1,94 @@
-//+======================================================================
-// $Source: /cvsroot/tango-cs/tango/jserver/archiving/HdbArchiver/Collector/HdbModeHandler.java,v $
-//
-// Project:      Tango Archiving Service
-//
-// Description:  Java source code for the class  HdbModeHandler.
-//						(Chinkumo Jean) - Apr 27, 2004
-//
-// $Author: pierrejoseph $
-//
-// $Revision: 1.15 $
-//
-// $Log: HdbModeHandler.java,v $
-// Revision 1.15  2007/06/13 13:13:23  pierrejoseph
-// the mode counter are managed attribute by attribute in each collector
-//
-// Revision 1.14  2007/04/24 14:29:28  ounsy
-// added a log in the case of unexpected ClassCast exception on the event's value
-//
-// Revision 1.13  2007/04/03 15:40:41  ounsy
-// took null values into account
-//
-// Revision 1.12  2007/03/20 10:46:52  ounsy
-// minor changes
-//
-// Revision 1.11  2006/11/30 14:17:32  ounsy
-// added rounding in the initFactor method, as was already the case with TDB
-//
-// Revision 1.10  2006/11/08 10:10:46  ounsy
-// corrected isDataArchivable:
-// -added management of the String and State types
-// -removed the test that prevented Nan values from being archived
-//
-// Revision 1.9  2006/07/27 12:37:20  ounsy
-// corrected the absolute and relative modes
-//
-// Revision 1.8  2006/06/30 08:28:25  ounsy
-// added a protection against non numeric values where they should be
-// REMOVE THIS LATER
-//
-// Revision 1.7  2006/03/13 15:27:12  ounsy
-// Long as an int management
-//
-// Revision 1.6  2006/03/10 11:58:29  ounsy
-// state and string support
-//
-// Revision 1.5  2005/11/29 17:33:53  chinkumo
-// no message
-//
-// Revision 1.4.12.3  2005/11/29 16:16:05  chinkumo
-// Code reformated (pogo compatible)
-//
-// Revision 1.4.12.2  2005/11/15 13:46:08  chinkumo
-// ...
-//
-// Revision 1.4.12.1  2005/09/09 10:12:08  chinkumo
-// Since the collecting politic was simplified and improved this class was modified.
-//
-// Revision 1.4  2005/06/14 10:30:27  chinkumo
-// Branch (hdbArchiver_1_0_1-branch_0)  and HEAD merged.
-//
-// Revision 1.3.4.1  2005/05/11 15:05:13  chinkumo
-// The 'absolute mode' just behaved like the 'threshold mode'. This was corrected.
-//
-// Revision 1.3  2005/02/04 17:10:15  chinkumo
-// The trouble with the grouped stopping strategy was fixed.
-//
-// Revision 1.2  2005/01/26 16:38:14  chinkumo
-// Ultimate synchronization before real sharing.
-//
-// Revision 1.1  2004/12/06 16:43:14  chinkumo
-// First commit (new architecture).
-//
-//
-// copyleft :	Synchrotron SOLEIL
-//					L'Orme des Merisiers
-//					Saint-Aubin - BP 48
-//					91192 GIF-sur-YVETTE CEDEX
-//
-//-======================================================================
-
-package HdbArchiver.Collector;
-
-import Common.Archiver.Collector.ModeHandler;
-import fr.soleil.archiving.hdbtdb.api.tools.mode.Mode;
-
-public class HdbModeHandler extends ModeHandler {
-	/**
-	 * Creates a new instance of HdbModeHandler
-	 */
-	public HdbModeHandler(Mode hdbMode) {
-		super(hdbMode);
-	}
-}
+//+======================================================================
+// $Source: /cvsroot/tango-cs/tango/jserver/archiving/HdbArchiver/Collector/HdbModeHandler.java,v $
+//
+// Project:      Tango Archiving Service
+//
+// Description:  Java source code for the class  HdbModeHandler.
+//						(Chinkumo Jean) - Apr 27, 2004
+//
+// $Author: pierrejoseph $
+//
+// $Revision: 1.15 $
+//
+// $Log: HdbModeHandler.java,v $
+// Revision 1.15  2007/06/13 13:13:23  pierrejoseph
+// the mode counter are managed attribute by attribute in each collector
+//
+// Revision 1.14  2007/04/24 14:29:28  ounsy
+// added a log in the case of unexpected ClassCast exception on the event's value
+//
+// Revision 1.13  2007/04/03 15:40:41  ounsy
+// took null values into account
+//
+// Revision 1.12  2007/03/20 10:46:52  ounsy
+// minor changes
+//
+// Revision 1.11  2006/11/30 14:17:32  ounsy
+// added rounding in the initFactor method, as was already the case with TDB
+//
+// Revision 1.10  2006/11/08 10:10:46  ounsy
+// corrected isDataArchivable:
+// -added management of the String and State types
+// -removed the test that prevented Nan values from being archived
+//
+// Revision 1.9  2006/07/27 12:37:20  ounsy
+// corrected the absolute and relative modes
+//
+// Revision 1.8  2006/06/30 08:28:25  ounsy
+// added a protection against non numeric values where they should be
+// REMOVE THIS LATER
+//
+// Revision 1.7  2006/03/13 15:27:12  ounsy
+// Long as an int management
+//
+// Revision 1.6  2006/03/10 11:58:29  ounsy
+// state and string support
+//
+// Revision 1.5  2005/11/29 17:33:53  chinkumo
+// no message
+//
+// Revision 1.4.12.3  2005/11/29 16:16:05  chinkumo
+// Code reformated (pogo compatible)
+//
+// Revision 1.4.12.2  2005/11/15 13:46:08  chinkumo
+// ...
+//
+// Revision 1.4.12.1  2005/09/09 10:12:08  chinkumo
+// Since the collecting politic was simplified and improved this class was modified.
+//
+// Revision 1.4  2005/06/14 10:30:27  chinkumo
+// Branch (hdbArchiver_1_0_1-branch_0)  and HEAD merged.
+//
+// Revision 1.3.4.1  2005/05/11 15:05:13  chinkumo
+// The 'absolute mode' just behaved like the 'threshold mode'. This was corrected.
+//
+// Revision 1.3  2005/02/04 17:10:15  chinkumo
+// The trouble with the grouped stopping strategy was fixed.
+//
+// Revision 1.2  2005/01/26 16:38:14  chinkumo
+// Ultimate synchronization before real sharing.
+//
+// Revision 1.1  2004/12/06 16:43:14  chinkumo
+// First commit (new architecture).
+//
+//
+// copyleft :	Synchrotron SOLEIL
+//					L'Orme des Merisiers
+//					Saint-Aubin - BP 48
+//					91192 GIF-sur-YVETTE CEDEX
+//
+//-======================================================================
+
+package HdbArchiver.Collector;
+
+import Common.Archiver.Collector.ModeHandler;
+import fr.soleil.archiving.hdbtdb.api.tools.mode.Mode;
+
+public class HdbModeHandler extends ModeHandler {
+    /**
+     * Creates a new instance of HdbModeHandler
+     */
+    public HdbModeHandler(Mode hdbMode) {
+        super(hdbMode);
+    }
+}
diff --git a/src/main/java/HdbArchiver/Collector/image/Image_RO.java b/hdbarchiver/src/main/java/HdbArchiver/Collector/image/Image_RO.java
similarity index 91%
rename from src/main/java/HdbArchiver/Collector/image/Image_RO.java
rename to hdbarchiver/src/main/java/HdbArchiver/Collector/image/Image_RO.java
index 8625f7cd230b3628c2a2cccfc6c27e0f966b0f0b..340c027dd9fda33121ebd02fdd71e1e275b91f0d 100644
--- a/src/main/java/HdbArchiver/Collector/image/Image_RO.java
+++ b/hdbarchiver/src/main/java/HdbArchiver/Collector/image/Image_RO.java
@@ -1,242 +1,231 @@
-// +======================================================================
-// $Source: /cvsroot/tango-cs/tango/jserver/archiving/HdbArchiver/Collector/image/Image_RO.java,v $
-//
-// Project:      Tango Archiving Service
-//
-// Description:  Java source code for the class  Image_RO.
-//						(Chinkumo Jean) - Mar 24, 2004
-//
-// $Author: pierrejoseph $
-//
-// $Revision: 1.17 $
-//
-// $Log: Image_RO.java,v $
-// Revision 1.17  2007/09/28 14:49:22  pierrejoseph
-// Merged between Polling and Events code
-//
-// Revision 1.16  2007/06/11 12:18:51  pierrejoseph
-// m_logger from the mother class (ArchiverCollector)
-//
-// Revision 1.15  2007/03/05 16:25:19  ounsy
-// non-static DataBase
-//
-// Revision 1.14  2006/10/31 16:54:12  ounsy
-// milliseconds and null values management
-//
-// Revision 1.13  2006/07/26 08:37:21  ounsy
-// try number no more static and reinitialized with change events (errorchange, numberscalarchange, etc...)
-//
-// Revision 1.12  2006/07/18 08:02:59  ounsy
-// minor changes
-//
-// Revision 1.11  2006/06/16 09:25:33  ounsy
-// changed imports because of the diary package moving to the javaapi project
-//
-// Revision 1.10  2006/06/13 13:38:40  ounsy
-// minor changes
-//
-// Revision 1.9  2006/06/13 13:28:19  ounsy
-// added a file logging system (diary) that records data storing errors
-//
-// Revision 1.8  2006/05/23 11:57:17  ounsy
-// now checks the timeCondition condition before calling DbProxy.store
-//
-// Revision 1.7  2005/11/29 17:33:53  chinkumo
-// no message
-//
-// Revision 1.6.10.2  2005/11/29 16:16:05  chinkumo
-// Code reformated (pogo compatible)
-//
-// Revision 1.6.10.1  2005/11/15 13:46:08  chinkumo
-// ...
-//
-// Revision 1.6  2005/06/24 12:06:27  chinkumo
-// Some constants were moved from fr.soleil.hdbtdbArchivingApi.ArchivingApi.ConfigConst to fr.soleil.hdbtdbArchivingApi.ArchivingTools.Tools.GlobalConst.
-
-// This change was reported here.
-//
-// Revision 1.5  2005/06/14 10:30:28  chinkumo
-// Branch (hdbArchiver_1_0_1-branch_0)  and HEAD merged.
-//
-// Revision 1.4.2.1  2005/06/13 14:01:04  chinkumo
-// Changes made to improve the management of exceptions were reported here.
-//
-// Revision 1.4  2005/04/08 15:37:00  chinkumo
-// errorChange method filled.
-
-// The aim of this method is to manage possible attribute's problem while polling attributes.
-
-// In case of unavailable value, a record is nevertheless carried out with the event timestamp, but with a kind of NULL value.
-//
-// Revision 1.3  2005/02/04 17:10:12  chinkumo
-// The trouble with the grouped stopping strategy was fixed.
-//
-// Revision 1.2  2005/01/26 16:38:14  chinkumo
-// Ultimate synchronization before real sharing.
-//
-// Revision 1.1  2004/12/06 16:43:26  chinkumo
-// First commit (new architecture).
-//
-//
-// copyleft :	Synchrotron SOLEIL
-//					L'Orme des Merisiers
-//					Saint-Aubin - BP 48
-//					91192 GIF-sur-YVETTE CEDEX
-//
-//-======================================================================
-
-package HdbArchiver.Collector.image;
-
-import org.slf4j.Logger;
-
-import HdbArchiver.Collector.HdbCollector;
-import HdbArchiver.Collector.HdbModeHandler;
-import fr.esrf.Tango.ErrSeverity;
-import fr.esrf.TangoDs.Util;
-import fr.esrf.tangoatk.core.AttributeStateEvent;
-import fr.esrf.tangoatk.core.ConnectionException;
-import fr.esrf.tangoatk.core.ErrorEvent;
-import fr.esrf.tangoatk.core.IImageListener;
-import fr.esrf.tangoatk.core.INumberImage;
-import fr.esrf.tangoatk.core.NumberImageEvent;
-import fr.soleil.archiving.common.api.exception.ArchivingException;
-import fr.soleil.archiving.common.api.tools.GlobalConst;
-import fr.soleil.archiving.hdbtdb.api.tools.AttributeLightMode;
-import fr.soleil.archiving.hdbtdb.api.tools.ImageEvent_RO;
-
-public class Image_RO extends HdbCollector implements IImageListener {
-
-    private static final long serialVersionUID = -7906079939396096709L;
-
-    public Image_RO(final HdbModeHandler hdbModeHandler, final Logger logger) {
-        super(hdbModeHandler, logger);
-    }
-
-    @Override
-    public void removeSource(final String attributeName) throws ArchivingException {
-        try {
-            synchronized (attributeList) {
-                final INumberImage attribute = (INumberImage) attributeList.get(attributeName);
-                if (attribute != null) {
-                    attribute.removeImageListener(this);
-                    attribute.removeErrorListener(this);
-                    attributeList.remove(attributeName);
-                    if (attributeList.isEmpty()) {
-                        stopCollecting();
-                    }
-                    removeErrorMessage(attributeName);
-                    Util.out4.println("\t The attribute named " + attributeName
-                            + " was fired from the Collector list...");
-                }
-            }
-        } catch (final Exception e) {
-            final String message = GlobalConst.ARCHIVING_ERROR_PREFIX + "Failed removing '" + attributeName
-                    + "' from sources";
-            final String reason = GlobalConst.TANGO_COMM_EXCEPTION;
-            final String desc = "Failed while executing Image_RO.removeSource() method...";
-            throw new ArchivingException(message, reason, ErrSeverity.WARN, desc, "", e);
-
-        }
-    }
-
-    @Override
-    protected void treatErrorEventAfterLogging(ErrorEvent errorEvent) {
-        final double[][] value = null;
-        final ImageEvent_RO imageEventRO = new ImageEvent_RO();
-        imageEventRO.setAttributeCompleteName(errorEvent.getSource().toString());
-        imageEventRO.setTimeStamp(errorEvent.getTimeStamp());
-        imageEventRO.setImageValueRO(value, null);
-        processEventImage(imageEventRO, DEFAULT_TRY_NUMBER);
-    }
-
-    @Override
-    public void imageChange(final NumberImageEvent event) {
-        final int tryNumber = DEFAULT_TRY_NUMBER;
-        final String attributeName = ((INumberImage) event.getSource()).getName();
-        final double[][] value = event.getValue();
-        int length = 0, length2 = 0;
-        if (value != null) {
-            length = value.length;
-            if (length > 0 && value[0] != null) {
-                length2 = value[0].length;
-            }
-        }
-        final double[][] imageValue = new double[length][];
-        for (int i = 0; i < length; i++) {
-            imageValue[i] = (value[i] == null ? null : value[i].clone());
-        }
-
-        final ImageEvent_RO imageEventRO = new ImageEvent_RO();
-
-        imageEventRO.setAttributeCompleteName(attributeName);
-        imageEventRO.setTimeStamp(event.getTimeStamp());
-        imageEventRO.setDimX(length);
-        imageEventRO.setDimY(length2);
-        imageEventRO.setImageValueRO(imageValue, null);
-
-        removeErrorMessage(attributeName);
-
-        processEventImage(imageEventRO, tryNumber);
-    }
-
-    @Override
-    public void stateChange(final AttributeStateEvent event) {
-    }
-
-    public void processEventImage(final ImageEvent_RO event, int try_number) {
-        if (isDataArchivableTimestampWise(event)) {
-            final String attributeName = event.getAttributeCompleteName();
-            try {
-                // image values can only have periodic modes, we don't need their lastValue
-                super.dbProxy.store(event);
-                super.setLastTimestamp(event);
-            } catch (final Exception e) {
-                registerErrorMessage(attributeName, e);
-                final String message = "Problem (ArchivingException) storing Image_RO value";
-                logger.error(message, e);
-
-                try_number--;
-                if (try_number > 0) {
-                    processEventImage(event, try_number);
-                }
-            }
-        }
-
-    }
-
-    @Override
-    protected void addSourceForEvents(final AttributeLightMode attributeLightMode) throws ArchivingException {
-        // TODO Auto-generated method stub
-
-    }
-
-    @Override
-    protected void doAddSourceForPolling(final AttributeLightMode attributeLightMode) throws ArchivingException {
-        Util.out2.println("Image_RO.addSource");
-        String attributeName = null;
-        try {
-            synchronized (attributeList) {
-                attributeName = attributeLightMode.getAttributeCompleteName();
-                while ((INumberImage) attributeList.get(attributeName) == null) {
-                    final INumberImage attribute = (INumberImage) attributeList.add(attributeLightMode
-                            .getAttributeCompleteName());
-                    attribute.addImageListener(this);
-                    attribute.addErrorListener(this);
-                    Util.out4.println("\t The attribute named " + attributeLightMode.getAttributeCompleteName()
-                            + " was hired to the Collector list...");
-                    if (attributeList.size() == 1) {
-                        startCollecting();
-                    }
-                }
-            }
-        } catch (final ConnectionException e) {
-            registerErrorMessage(attributeName, e);
-            final String message = GlobalConst.ARCHIVING_ERROR_PREFIX + "Failed adding '"
-                    + attributeLightMode.getAttributeCompleteName() + "' as source";
-            final String reason = GlobalConst.TANGO_COMM_EXCEPTION;
-            final String desc = "Failed while executing Image_RO.addSource() method...";
-            throw new ArchivingException(message, reason, ErrSeverity.WARN, desc, "", e);
-        }
-
-    }
-}
+// +======================================================================
+// $Source: /cvsroot/tango-cs/tango/jserver/archiving/HdbArchiver/Collector/image/Image_RO.java,v $
+//
+// Project:      Tango Archiving Service
+//
+// Description:  Java source code for the class  Image_RO.
+//						(Chinkumo Jean) - Mar 24, 2004
+//
+// $Author: pierrejoseph $
+//
+// $Revision: 1.17 $
+//
+// $Log: Image_RO.java,v $
+// Revision 1.17  2007/09/28 14:49:22  pierrejoseph
+// Merged between Polling and Events code
+//
+// Revision 1.16  2007/06/11 12:18:51  pierrejoseph
+// m_logger from the mother class (ArchiverCollector)
+//
+// Revision 1.15  2007/03/05 16:25:19  ounsy
+// non-static DataBase
+//
+// Revision 1.14  2006/10/31 16:54:12  ounsy
+// milliseconds and null values management
+//
+// Revision 1.13  2006/07/26 08:37:21  ounsy
+// try number no more static and reinitialized with change events (errorchange, numberscalarchange, etc...)
+//
+// Revision 1.12  2006/07/18 08:02:59  ounsy
+// minor changes
+//
+// Revision 1.11  2006/06/16 09:25:33  ounsy
+// changed imports because of the diary package moving to the javaapi project
+//
+// Revision 1.10  2006/06/13 13:38:40  ounsy
+// minor changes
+//
+// Revision 1.9  2006/06/13 13:28:19  ounsy
+// added a file logging system (diary) that records data storing errors
+//
+// Revision 1.8  2006/05/23 11:57:17  ounsy
+// now checks the timeCondition condition before calling DbProxy.store
+//
+// Revision 1.7  2005/11/29 17:33:53  chinkumo
+// no message
+//
+// Revision 1.6.10.2  2005/11/29 16:16:05  chinkumo
+// Code reformated (pogo compatible)
+//
+// Revision 1.6.10.1  2005/11/15 13:46:08  chinkumo
+// ...
+//
+// Revision 1.6  2005/06/24 12:06:27  chinkumo
+// Some constants were moved from fr.soleil.hdbtdbArchivingApi.ArchivingApi.ConfigConst to fr.soleil.hdbtdbArchivingApi.ArchivingTools.Tools.GlobalConst.
+
+// This change was reported here.
+//
+// Revision 1.5  2005/06/14 10:30:28  chinkumo
+// Branch (hdbArchiver_1_0_1-branch_0)  and HEAD merged.
+//
+// Revision 1.4.2.1  2005/06/13 14:01:04  chinkumo
+// Changes made to improve the management of exceptions were reported here.
+//
+// Revision 1.4  2005/04/08 15:37:00  chinkumo
+// errorChange method filled.
+
+// The aim of this method is to manage possible attribute's problem while polling attributes.
+
+// In case of unavailable value, a record is nevertheless carried out with the event timestamp, but with a kind of NULL value.
+//
+// Revision 1.3  2005/02/04 17:10:12  chinkumo
+// The trouble with the grouped stopping strategy was fixed.
+//
+// Revision 1.2  2005/01/26 16:38:14  chinkumo
+// Ultimate synchronization before real sharing.
+//
+// Revision 1.1  2004/12/06 16:43:26  chinkumo
+// First commit (new architecture).
+//
+//
+// copyleft :	Synchrotron SOLEIL
+//					L'Orme des Merisiers
+//					Saint-Aubin - BP 48
+//					91192 GIF-sur-YVETTE CEDEX
+//
+//-======================================================================
+
+package HdbArchiver.Collector.image;
+
+import HdbArchiver.Collector.HdbCollector;
+import HdbArchiver.Collector.HdbModeHandler;
+import fr.esrf.Tango.ErrSeverity;
+import fr.esrf.TangoDs.Util;
+import fr.esrf.tangoatk.core.*;
+import fr.soleil.archiving.common.api.exception.ArchivingException;
+import fr.soleil.archiving.common.api.tools.GlobalConst;
+import fr.soleil.archiving.hdbtdb.api.tools.AttributeLightMode;
+import fr.soleil.archiving.hdbtdb.api.tools.ImageEvent_RO;
+import org.slf4j.Logger;
+
+public class Image_RO extends HdbCollector implements IImageListener {
+
+    private static final long serialVersionUID = -7906079939396096709L;
+
+    public Image_RO(final HdbModeHandler hdbModeHandler, boolean useEvents, final Logger logger) {
+        super(hdbModeHandler, useEvents, logger);
+    }
+
+    @Override
+    public void removeSource(final String attributeName) throws ArchivingException {
+        try {
+            synchronized (attributeList) {
+                final INumberImage attribute = (INumberImage) attributeList.get(attributeName);
+                if (attribute != null) {
+                    attribute.removeImageListener(this);
+                    attribute.removeErrorListener(this);
+                    attributeList.remove(attributeName);
+                    if (attributeList.isEmpty()) {
+                        stopCollecting();
+                    }
+                    removeErrorMessage(attributeName);
+                }
+            }
+        } catch (final Exception e) {
+            final String message = GlobalConst.ARCHIVING_ERROR_PREFIX + "Failed removing '" + attributeName
+                    + "' from sources";
+            final String reason = GlobalConst.TANGO_COMM_EXCEPTION;
+            final String desc = "Failed while executing Image_RO.removeSource() method...";
+            throw new ArchivingException(message, reason, ErrSeverity.WARN, desc, "", e);
+
+        }
+    }
+
+    @Override
+    protected void treatErrorEventAfterLogging(ErrorEvent errorEvent) {
+        final double[][] value = null;
+        final ImageEvent_RO imageEventRO = new ImageEvent_RO();
+        imageEventRO.setAttributeCompleteName(errorEvent.getSource().toString());
+        imageEventRO.setTimeStamp(errorEvent.getTimeStamp());
+        imageEventRO.setImageValueRO(value, null);
+        processEventImage(imageEventRO, DEFAULT_TRY_NUMBER);
+    }
+
+    @Override
+    public void imageChange(final NumberImageEvent event) {
+        final int tryNumber = DEFAULT_TRY_NUMBER;
+        final String attributeName = ((INumberImage) event.getSource()).getName();
+        final double[][] value = event.getValue();
+        int length = 0, length2 = 0;
+        if (value != null) {
+            length = value.length;
+            if (length > 0 && value[0] != null) {
+                length2 = value[0].length;
+            }
+        }
+        final double[][] imageValue = new double[length][];
+        for (int i = 0; i < length; i++) {
+            imageValue[i] = (value[i] == null ? null : value[i].clone());
+        }
+
+        final ImageEvent_RO imageEventRO = new ImageEvent_RO();
+
+        imageEventRO.setAttributeCompleteName(attributeName);
+        imageEventRO.setTimeStamp(event.getTimeStamp());
+        imageEventRO.setDimX(length);
+        imageEventRO.setDimY(length2);
+        imageEventRO.setImageValueRO(imageValue, null);
+
+        removeErrorMessage(attributeName);
+
+        processEventImage(imageEventRO, tryNumber);
+    }
+
+    @Override
+    public void stateChange(final AttributeStateEvent event) {
+    }
+
+    public void processEventImage(final ImageEvent_RO event, int try_number) {
+        if (isDataArchivableTimestampWise(event)) {
+            final String attributeName = event.getAttributeCompleteName();
+            try {
+                // image values can only have periodic modes, we don't need their lastValue
+                super.dbProxy.store(event);
+                super.setLastTimestamp(event);
+            } catch (final Exception e) {
+                registerErrorMessage(attributeName, e);
+                final String message = "Problem (ArchivingException) storing Image_RO value";
+                logger.error(message, e);
+
+                try_number--;
+                if (try_number > 0) {
+                    processEventImage(event, try_number);
+                }
+            }
+        }
+
+    }
+
+    @Override
+    protected void addSourceForEvents(final AttributeLightMode attributeLightMode) throws ArchivingException {
+        // TODO Auto-generated method stub
+
+    }
+
+    @Override
+    protected void doAddSourceForPolling(final AttributeLightMode attributeLightMode) throws ArchivingException {
+        String attributeName = null;
+        try {
+            synchronized (attributeList) {
+                attributeName = attributeLightMode.getAttributeCompleteName();
+                while ((INumberImage) attributeList.get(attributeName) == null) {
+                    final INumberImage attribute = (INumberImage) attributeList.add(attributeLightMode
+                            .getAttributeCompleteName());
+                    attribute.addImageListener(this);
+                    attribute.addErrorListener(this);
+                    if (attributeList.size() == 1) {
+                        startCollecting();
+                    }
+                }
+            }
+        } catch (final ConnectionException e) {
+            registerErrorMessage(attributeName, e);
+            final String message = GlobalConst.ARCHIVING_ERROR_PREFIX + "Failed adding '"
+                    + attributeLightMode.getAttributeCompleteName() + "' as source";
+            final String reason = GlobalConst.TANGO_COMM_EXCEPTION;
+            final String desc = "Failed while executing Image_RO.addSource() method...";
+            throw new ArchivingException(message, reason, ErrSeverity.WARN, desc, "", e);
+        }
+
+    }
+}
diff --git a/src/main/java/HdbArchiver/Collector/scalar/BooleanScalar.java b/hdbarchiver/src/main/java/HdbArchiver/Collector/scalar/BooleanScalar.java
similarity index 94%
rename from src/main/java/HdbArchiver/Collector/scalar/BooleanScalar.java
rename to hdbarchiver/src/main/java/HdbArchiver/Collector/scalar/BooleanScalar.java
index e07118f67f476a2efe82017a8cd490bc6da75e06..f442fc68d27cbbf5b0593a398081d9732cbbaa50 100644
--- a/src/main/java/HdbArchiver/Collector/scalar/BooleanScalar.java
+++ b/hdbarchiver/src/main/java/HdbArchiver/Collector/scalar/BooleanScalar.java
@@ -1,385 +1,374 @@
-// +======================================================================
-// $Source: /cvsroot/tango-cs/tango/jserver/archiving/HdbArchiver/Collector/scalar/BooleanScalar.java,v $
-//
-// Project:      Tango Archiving Service
-//
-// Description:  Java source code for the class  BooleanScalar.
-//						(Chinkumo Jean) - Aug 30, 2005
-//
-// $Author: pierrejoseph $
-//
-// $Revision: 1.22 $
-//
-// $Log: BooleanScalar.java,v $
-// Revision 1.22  2007/10/03 15:23:29  pierrejoseph
-// Minor changes
-//
-// Revision 1.21  2007/09/28 14:49:23  pierrejoseph
-// Merged between Polling and Events code
-//
-// Revision 1.20  2007/09/25 14:59:17  pierrejoseph
-// 5251 : sometimes the device stayed in Running state sue to a blocking while in  the addAttribute method.
-//
-// Revision 1.19  2007/06/14 07:09:37  pierrejoseph
-// Exception addition in errorChange + retrieve the data_type of a Number Event
-//
-// Revision 1.18  2007/06/13 13:13:23  pierrejoseph
-// the mode counter are managed attribute by attribute in each collector
-//
-// Revision 1.17  2007/06/11 12:23:27  pierrejoseph
-// These abstracts classes managed the errorChange method +
-// call the doArchiveEvent method from the mother class to avoid dispatched the various catch exceptions at all collectors levels
-//
-// Revision 1.16  2007/04/24 14:29:27  ounsy
-// added a log in the case of unexpected ClassCast exception on the event's value
-//
-// Revision 1.15  2007/04/03 15:40:25  ounsy
-// removed logs
-//
-// Revision 1.14  2007/03/27 15:17:43  ounsy
-// corrected the processEventScalar method to use the isFirstValue boolean
-//
-// Revision 1.13  2007/03/20 10:47:38  ounsy
-// trying alternate version of processEventScalar
-//
-// Revision 1.12  2007/03/05 16:25:20  ounsy
-// non-static DataBase
-//
-// Revision 1.11  2006/07/27 12:42:19  ounsy
-// modified processEventScalar so that it calls setLastValue even if the current value doesn't have to be archived
-//
-// Revision 1.10  2006/07/26 08:37:21  ounsy
-// try number no more static and reinitialized with change events (errorchange, numberscalarchange, etc...)
-//
-// Revision 1.9  2006/07/18 08:04:03  ounsy
-// moved the setAttribute_complete_name call in the try block
-//
-// Revision 1.8  2006/06/16 09:25:33  ounsy
-// changed imports because of the diary package moving to the javaapi project
-//
-// Revision 1.7  2006/06/13 13:28:20  ounsy
-// added a file logging system (diary) that records data storing errors
-//
-// Revision 1.6  2006/05/23 11:57:17  ounsy
-// now checks the timeCondition condition before calling DbProxy.store
-//
-// Revision 1.5  2006/01/27 13:06:40  ounsy
-// organised imports
-//
-// Revision 1.4  2005/11/29 16:16:05  chinkumo
-// Code reformated (pogo compatible)
-//
-// Revision 1.3  2005/11/15 13:46:08  chinkumo
-// ...
-//
-// Revision 1.2  2005/09/26 08:01:20  chinkumo
-// Minor changes !
-//
-// Revision 1.1  2005/09/09 10:03:56  chinkumo
-// First commit !
-// (Dynamic attribut release)
-//
-//
-// copyleft :	Synchrotron SOLEIL
-//					L'Orme des Merisiers
-//					Saint-Aubin - BP 48
-//					91192 GIF-sur-YVETTE CEDEX
-//
-//-======================================================================
-
-package HdbArchiver.Collector.scalar;
-
-import java.util.HashMap;
-import java.util.Map;
-
-import org.slf4j.Logger;
-import org.tango.utils.DevFailedUtils;
-
-import Common.Archiver.Collector.ModesCounters;
-import HdbArchiver.HdbArchiver;
-import HdbArchiver.Collector.HdbCollector;
-import HdbArchiver.Collector.HdbModeHandler;
-import fr.esrf.Tango.DevError;
-import fr.esrf.Tango.DevFailed;
-import fr.esrf.Tango.ErrSeverity;
-import fr.esrf.TangoApi.events.ITangoArchiveListener;
-import fr.esrf.TangoApi.events.TangoEventsAdapter;
-import fr.esrf.TangoDs.TangoConst;
-import fr.esrf.TangoDs.Util;
-import fr.esrf.tangoatk.core.AttributeStateEvent;
-import fr.esrf.tangoatk.core.ConnectionException;
-import fr.esrf.tangoatk.core.Device;
-import fr.esrf.tangoatk.core.ErrorEvent;
-import fr.esrf.tangoatk.core.IBooleanScalar;
-import fr.esrf.tangoatk.core.IBooleanScalarListener;
-import fr.esrf.tangoatk.core.attribute.AttributeFactory;
-import fr.soleil.archiving.common.api.exception.ArchivingException;
-import fr.soleil.archiving.common.api.tools.GlobalConst;
-import fr.soleil.archiving.hdbtdb.api.tools.AttributeLightMode;
-import fr.soleil.archiving.hdbtdb.api.tools.ScalarEvent;
-
-public abstract class BooleanScalar extends HdbCollector implements IBooleanScalarListener, ITangoArchiveListener {
-
-    private static final long serialVersionUID = 1974911931653751008L;
-
-    private final Map<Device, TangoEventsAdapter> evtAdaptHMap;
-
-    public BooleanScalar(final HdbModeHandler hdbModeHandler, final Logger logger) {
-        super(hdbModeHandler, logger);
-
-        evtAdaptHMap = new HashMap<Device, TangoEventsAdapter>();
-    }
-
-    @Override
-    public synchronized void removeSource(final String attributeName) throws ArchivingException {
-        Util.out2.println("BooleanScalar.removeSource");
-
-        if (HdbArchiver.isUseEvents) {
-            removeSourceForEvents(attributeName);
-        }
-
-        try {
-            /*
-             * while ( ( IBooleanScalar ) attributeList.get(attributeName) !=
-             * null ) {
-             */
-            stopCollecting();
-            final IBooleanScalar attribute = (IBooleanScalar) attributeList.get(attributeName);
-            if (attribute != null) {
-                attribute.removeBooleanScalarListener(this);
-                attribute.removeErrorListener(this);
-                attributeList.remove(attributeName);
-                isFirstValueList.remove(attributeName.toLowerCase());
-                // informs the mother class that one new attribute must be removed
-                removeAttribute(attributeName);
-                removeTimestamps(attributeName);
-                removeErrorMessage(attributeName);
-                Util.out4.println("\t The attribute named " + attributeName + " was fired from the Collector list...");
-            }
-        } catch (final Exception e) {
-            final String message = GlobalConst.ARCHIVING_ERROR_PREFIX + "Failed removing '" + attributeName
-                    + "' from sources";
-            final String reason = GlobalConst.TANGO_COMM_EXCEPTION;
-            final String desc = "Failed while executing " + this.getClass().getSimpleName()
-                    + ".removeSource() method...";
-            throw new ArchivingException(message, reason, ErrSeverity.WARN, desc, "", e);
-        } finally {
-            startCollecting();
-        }
-    }
-
-    @Override
-    protected void doAddSourceForPolling(final AttributeLightMode attributeLightMode) throws ArchivingException {
-        String attName = null;
-        try {
-            attName = attributeLightMode.getAttributeCompleteName();
-            if (attName != null) {
-                stopCollecting();
-                final IBooleanScalar attribute = (IBooleanScalar) attributeList.add(attName);
-                attribute.addBooleanScalarListener(this);
-                attribute.addErrorListener(this);
-                Util.out4.println("\t The attribute named " + attName + " was hired to the Collector list...");
-
-                // informs the mother class that one new attribute must be managed
-                addAttribute(attName);
-                logger.debug("add archiving for " + attName);
-
-            }
-        } catch (final ConnectionException e) {
-            registerErrorMessage(attName, e);
-            final String message = GlobalConst.ARCHIVING_ERROR_PREFIX + "Failed adding '"
-                    + attributeLightMode.getAttributeCompleteName() + "' as source";
-            final String reason = GlobalConst.TANGO_COMM_EXCEPTION;
-            final String desc = "Failed while executing " + this.getClass().getSimpleName() + ".addSource() method...";
-            throw new ArchivingException(message, reason, ErrSeverity.WARN, desc, "", e);
-
-        } catch (final Exception e) {
-            registerErrorMessage(attName, e);
-            final String message = GlobalConst.ARCHIVING_ERROR_PREFIX + "Failed adding '"
-                    + attributeLightMode.getAttributeCompleteName() + "' as source";
-            final String reason = GlobalConst.TANGO_COMM_EXCEPTION;
-            final String desc = "Failed while executing " + this.getClass().getSimpleName() + ".addSource() method...";
-            throw new ArchivingException(message, reason, ErrSeverity.WARN, desc, "", e);
-        } finally {
-            startCollecting();
-        }
-    }
-
-    // --------------------------------------------------------------------------//
-    // ELETTRA : Archiving Events
-    // --------------------------------------------------------------------------//
-    @Override
-    protected void addSourceForEvents(final AttributeLightMode attributeLightMode) throws ArchivingException {
-        /* Adapter for the Tango archive events */
-        TangoEventsAdapter evtAdapt = null;
-        IBooleanScalar attribute = null;
-
-        try {
-            /*
-             * Get the attribute from the AttributeFactory, so that it is not
-             * added to the attribute polled list. Remember that `attributeList'
-             * is an AttributePolledList().
-             */
-            attribute = (IBooleanScalar) AttributeFactory.getInstance().getAttribute(
-                    attributeLightMode.getAttributeCompleteName());
-            if (attribute == null) {
-                logger.debug("\033[1;31mBooleanScalar.java: the attribute \""
-                        + attributeLightMode.getAttributeCompleteName()
-                        + " is null (BooleanScalar.java): not adding it!");
-                return;
-            }
-        } catch (final DevFailed e) {
-            logger.error(DevFailedUtils.toString(e));
-            throw new ArchivingException(e);
-        } catch (final ConnectionException e) {
-            final String message = GlobalConst.ARCHIVING_ERROR_PREFIX + "Failed adding '"
-                    + attributeLightMode.getAttributeCompleteName() + "' as source";
-            final String reason = GlobalConst.TANGO_COMM_EXCEPTION;
-            final String desc = "Failed while executing NumberSpectrum_RW.addSource() method...\nBooleanScalar.java: Failed to get the attribute from the AttributeFactory";
-            throw new ArchivingException(message, reason, ErrSeverity.WARN, desc, "", e);
-        } /*
-           * end of first try/catch block, to retrieve the attribute from the
-           * AttributeFactory
-           */
-
-        logger.debug("boolean attribute \"" + attribute.getNameSansDevice() + "\"...\t");
-
-        /*
-         * If an attribute (name + device server) is already in the map, it
-         * means it has already been registered for the Tango Archive events. So
-         * it does not have to be added to the archive events once again, nor to
-         * the attributePolledList: we can return. The same goes for an
-         * attribute already present in the attributePolledList `attributeList'.
-         */
-        /*
-         * if(HdbArchiver.useEvents.equalsIgnoreCase("no")) {
-         * System.out.print("[\033[1;35mEVENTS DISABLED\033[0m]. ");
-         * registerForScalarListener(attributeLightMode); } else {
-         */
-        try {
-            synchronized (evtAdaptHMap) {
-                evtAdapt = evtAdaptHMap.get(attribute.getDevice());
-                if (evtAdapt == null) {
-                    evtAdapt = new TangoEventsAdapter(attribute.getDevice());
-                    evtAdaptHMap.put(attribute.getDevice(), evtAdapt);
-                } else {
-                    logger.debug("\nThe adapter for the attribute is already configured");
-                }
-            }
-            final String[] filter = new String[0];
-
-            /*
-             * Try to register for the archive events: evtAdapt is the new
-             * adapter or the one already found in the map.
-             */
-            evtAdapt.addTangoArchiveListener(this, attribute.getNameSansDevice(), filter);
-            archiveListenersCounter++;
-            logger.debug("[\033[1;32mEVENTS\033[0m].");
-        } catch (final DevFailed e) {
-            /*
-             * If archive events are not enabled for the attribute, we will poll
-             * it
-             */
-            for (final DevError error : e.errors) {
-                // // System.out.println("error registering: " +
-                // e.errors[err].desc);
-                if (error.desc.contains("Already connected to event")) {
-                    logger.debug("Already connected to events for attribute");
-                    return;
-                }
-            }
-            /* Register for polling */
-            addSourceForPolling(attributeLightMode);
-            /* unlock the attributeList */
-        }
-        // } /* function finishes */
-    }
-
-    private void removeSourceForEvents(final String attributeName) {
-        logger.debug("boolean: removing source for \"" + attributeName + "\"...\t");
-        TangoEventsAdapter adapter;
-        IBooleanScalar attribute;
-
-        try {
-            synchronized (evtAdaptHMap) {
-                attribute = (IBooleanScalar) AttributeFactory.getInstance().getAttribute(attributeName);
-                // Retrieve in map the event adapter associated to the attributeName.
-                if (attribute == null) {
-                    logger.debug("\033[1;31mThe attribute " + attributeName + " is null\033[0m");
-                }
-                adapter = evtAdaptHMap.get(attribute.getDevice());
-
-                if (adapter != null) {
-                    adapter.removeTangoArchiveListener(this, attribute.getNameSansDevice());
-                    archiveListenersCounter--;
-                    logger.debug("[\033[1;32mEVENTS\033[0m].");
-                }
-            } // unlock event adapters map
-        } catch (final ConnectionException e) {
-            // getAttribute() failed
-            logger.error("\033[1;31mConnection exception while retrieving the attribute from the AttributeFactory!\033[0m");
-        } catch (final DevFailed f) {
-            logger.error(DevFailedUtils.toString(f));
-        }
-    }
-
-    // --------------------------------------------------------------------------//
-    // ELETTRA : Archiving Events
-    // --------------------------------------------------------------------------//
-
-    @Override
-    public void stateChange(final AttributeStateEvent event) {
-    }
-
-    public void processEventScalar(final ScalarEvent scalarEvent, int try_number) {
-        if (isDataArchivableTimestampWise(scalarEvent)) {
-            final String attributeName = scalarEvent.getAttributeCompleteName();
-            try {
-                boolean doArchive = false;
-                if (isFirstValueList.get(attributeName.toLowerCase())) {
-                    doArchive = true;
-                    isFirstValueList.put(attributeName.toLowerCase(), false);
-                    logger.debug(attributeName + " first value, forcing archiving");
-                } else {
-                    final ModesCounters mc = getModeCounter(attributeName);
-                    if (mc == null) {
-                        logger.debug(attributeName + " Attribute Counters unknown");
-                    } else {
-                        doArchive = doArchiveEvent(mc, scalarEvent.getDataType(), scalarEvent.getReadValue(),
-                                getLastValue(scalarEvent), attributeName);
-                    }
-                }
-
-                if (doArchive) {
-                    super.dbProxy.store(scalarEvent);
-                }
-
-                setLastValue(scalarEvent, scalarEvent.getReadValue());
-            } catch (final Exception e) {
-                registerErrorMessage(attributeName, e);
-                final String message = "Problem storing BooleanScalar value";
-                logger.error(message, e);
-
-                try_number--;
-                if (try_number > 0) {
-                    Util.out2.println("BooleanScalar.processEventScalar : retry " + try_number + "failed...");
-                    processEventScalar(scalarEvent, try_number);
-                }
-            }
-        }
-    }
-
-    protected abstract int getWritableValue();
-
-    @Override
-    protected void treatErrorEventAfterLogging(ErrorEvent errorEvent) {
-        try {
-            processEventScalar(getNullValueScalarEvent(errorEvent, TangoConst.Tango_DEV_BOOLEAN, getWritableValue()),
-                    DEFAULT_TRY_NUMBER);
-        } catch (final Exception e) {
-            logger.error(this.getClass().getSimpleName() + ".errorChange : during processEventScalar creation execp : "
-                    + e);
-        }
-    }
-
-}
+// +======================================================================
+// $Source: /cvsroot/tango-cs/tango/jserver/archiving/HdbArchiver/Collector/scalar/BooleanScalar.java,v $
+//
+// Project:      Tango Archiving Service
+//
+// Description:  Java source code for the class  BooleanScalar.
+//						(Chinkumo Jean) - Aug 30, 2005
+//
+// $Author: pierrejoseph $
+//
+// $Revision: 1.22 $
+//
+// $Log: BooleanScalar.java,v $
+// Revision 1.22  2007/10/03 15:23:29  pierrejoseph
+// Minor changes
+//
+// Revision 1.21  2007/09/28 14:49:23  pierrejoseph
+// Merged between Polling and Events code
+//
+// Revision 1.20  2007/09/25 14:59:17  pierrejoseph
+// 5251 : sometimes the device stayed in Running state sue to a blocking while in  the addAttribute method.
+//
+// Revision 1.19  2007/06/14 07:09:37  pierrejoseph
+// Exception addition in errorChange + retrieve the data_type of a Number Event
+//
+// Revision 1.18  2007/06/13 13:13:23  pierrejoseph
+// the mode counter are managed attribute by attribute in each collector
+//
+// Revision 1.17  2007/06/11 12:23:27  pierrejoseph
+// These abstracts classes managed the errorChange method +
+// call the doArchiveEvent method from the mother class to avoid dispatched the various catch exceptions at all collectors levels
+//
+// Revision 1.16  2007/04/24 14:29:27  ounsy
+// added a log in the case of unexpected ClassCast exception on the event's value
+//
+// Revision 1.15  2007/04/03 15:40:25  ounsy
+// removed logs
+//
+// Revision 1.14  2007/03/27 15:17:43  ounsy
+// corrected the processEventScalar method to use the isFirstValue boolean
+//
+// Revision 1.13  2007/03/20 10:47:38  ounsy
+// trying alternate version of processEventScalar
+//
+// Revision 1.12  2007/03/05 16:25:20  ounsy
+// non-static DataBase
+//
+// Revision 1.11  2006/07/27 12:42:19  ounsy
+// modified processEventScalar so that it calls setLastValue even if the current value doesn't have to be archived
+//
+// Revision 1.10  2006/07/26 08:37:21  ounsy
+// try number no more static and reinitialized with change events (errorchange, numberscalarchange, etc...)
+//
+// Revision 1.9  2006/07/18 08:04:03  ounsy
+// moved the setAttribute_complete_name call in the try block
+//
+// Revision 1.8  2006/06/16 09:25:33  ounsy
+// changed imports because of the diary package moving to the javaapi project
+//
+// Revision 1.7  2006/06/13 13:28:20  ounsy
+// added a file logging system (diary) that records data storing errors
+//
+// Revision 1.6  2006/05/23 11:57:17  ounsy
+// now checks the timeCondition condition before calling DbProxy.store
+//
+// Revision 1.5  2006/01/27 13:06:40  ounsy
+// organised imports
+//
+// Revision 1.4  2005/11/29 16:16:05  chinkumo
+// Code reformated (pogo compatible)
+//
+// Revision 1.3  2005/11/15 13:46:08  chinkumo
+// ...
+//
+// Revision 1.2  2005/09/26 08:01:20  chinkumo
+// Minor changes !
+//
+// Revision 1.1  2005/09/09 10:03:56  chinkumo
+// First commit !
+// (Dynamic attribut release)
+//
+//
+// copyleft :	Synchrotron SOLEIL
+//					L'Orme des Merisiers
+//					Saint-Aubin - BP 48
+//					91192 GIF-sur-YVETTE CEDEX
+//
+//-======================================================================
+
+package HdbArchiver.Collector.scalar;
+
+import Common.Archiver.Collector.ModesCounters;
+import HdbArchiver.Collector.HdbCollector;
+import HdbArchiver.Collector.HdbModeHandler;
+import fr.esrf.Tango.DevError;
+import fr.esrf.Tango.DevFailed;
+import fr.esrf.Tango.ErrSeverity;
+import fr.esrf.TangoApi.events.ITangoArchiveListener;
+import fr.esrf.TangoApi.events.TangoEventsAdapter;
+import fr.esrf.TangoDs.TangoConst;
+import fr.esrf.TangoDs.Util;
+import fr.esrf.tangoatk.core.*;
+import fr.esrf.tangoatk.core.attribute.AttributeFactory;
+import fr.soleil.archiving.common.api.exception.ArchivingException;
+import fr.soleil.archiving.common.api.tools.GlobalConst;
+import fr.soleil.archiving.hdbtdb.api.tools.AttributeLightMode;
+import fr.soleil.archiving.hdbtdb.api.tools.ScalarEvent;
+import org.slf4j.Logger;
+import org.tango.utils.DevFailedUtils;
+
+import java.util.HashMap;
+import java.util.Map;
+
+public abstract class BooleanScalar extends HdbCollector implements IBooleanScalarListener, ITangoArchiveListener {
+
+    private static final long serialVersionUID = 1974911931653751008L;
+
+    private final Map<Device, TangoEventsAdapter> evtAdaptHMap;
+
+    public BooleanScalar(final HdbModeHandler hdbModeHandler, boolean useEvents, final Logger logger) {
+        super(hdbModeHandler, useEvents, logger);
+
+        evtAdaptHMap = new HashMap<Device, TangoEventsAdapter>();
+    }
+
+    @Override
+    public synchronized void removeSource(final String attributeName) throws ArchivingException {
+
+        if (useEvents) {
+            removeSourceForEvents(attributeName);
+        }
+
+        try {
+            /*
+             * while ( ( IBooleanScalar ) attributeList.get(attributeName) !=
+             * null ) {
+             */
+            stopCollecting();
+            final IBooleanScalar attribute = (IBooleanScalar) attributeList.get(attributeName);
+            if (attribute != null) {
+                attribute.removeBooleanScalarListener(this);
+                attribute.removeErrorListener(this);
+                attributeList.remove(attributeName);
+                isFirstValueList.remove(attributeName.toLowerCase());
+                // informs the mother class that one new attribute must be removed
+                removeAttribute(attributeName);
+                removeTimestamps(attributeName);
+                removeErrorMessage(attributeName);
+            }
+        } catch (final Exception e) {
+            final String message = GlobalConst.ARCHIVING_ERROR_PREFIX + "Failed removing '" + attributeName
+                    + "' from sources";
+            final String reason = GlobalConst.TANGO_COMM_EXCEPTION;
+            final String desc = "Failed while executing " + this.getClass().getSimpleName()
+                    + ".removeSource() method...";
+            throw new ArchivingException(message, reason, ErrSeverity.WARN, desc, "", e);
+        } finally {
+            startCollecting();
+        }
+    }
+
+    @Override
+    protected void doAddSourceForPolling(final AttributeLightMode attributeLightMode) throws ArchivingException {
+        String attName = null;
+        try {
+            attName = attributeLightMode.getAttributeCompleteName();
+            if (attName != null) {
+                stopCollecting();
+                final IBooleanScalar attribute = (IBooleanScalar) attributeList.add(attName);
+                attribute.addBooleanScalarListener(this);
+                attribute.addErrorListener(this);
+
+                // informs the mother class that one new attribute must be managed
+                addAttribute(attName);
+                logger.debug("add archiving for " + attName);
+
+            }
+        } catch (final ConnectionException e) {
+            registerErrorMessage(attName, e);
+            final String message = GlobalConst.ARCHIVING_ERROR_PREFIX + "Failed adding '"
+                    + attributeLightMode.getAttributeCompleteName() + "' as source";
+            final String reason = GlobalConst.TANGO_COMM_EXCEPTION;
+            final String desc = "Failed while executing " + this.getClass().getSimpleName() + ".addSource() method...";
+            throw new ArchivingException(message, reason, ErrSeverity.WARN, desc, "", e);
+
+        } catch (final Exception e) {
+            registerErrorMessage(attName, e);
+            final String message = GlobalConst.ARCHIVING_ERROR_PREFIX + "Failed adding '"
+                    + attributeLightMode.getAttributeCompleteName() + "' as source";
+            final String reason = GlobalConst.TANGO_COMM_EXCEPTION;
+            final String desc = "Failed while executing " + this.getClass().getSimpleName() + ".addSource() method...";
+            throw new ArchivingException(message, reason, ErrSeverity.WARN, desc, "", e);
+        } finally {
+            startCollecting();
+        }
+    }
+
+    // --------------------------------------------------------------------------//
+    // ELETTRA : Archiving Events
+    // --------------------------------------------------------------------------//
+    @Override
+    protected void addSourceForEvents(final AttributeLightMode attributeLightMode) throws ArchivingException {
+        /* Adapter for the Tango archive events */
+        TangoEventsAdapter evtAdapt = null;
+        IBooleanScalar attribute = null;
+
+        try {
+            /*
+             * Get the attribute from the AttributeFactory, so that it is not
+             * added to the attribute polled list. Remember that `attributeList'
+             * is an AttributePolledList().
+             */
+            attribute = (IBooleanScalar) AttributeFactory.getInstance().getAttribute(
+                    attributeLightMode.getAttributeCompleteName());
+            if (attribute == null) {
+                logger.debug("\033[1;31mBooleanScalar.java: the attribute \""
+                        + attributeLightMode.getAttributeCompleteName()
+                        + " is null (BooleanScalar.java): not adding it!");
+                return;
+            }
+        } catch (final DevFailed e) {
+            logger.error(DevFailedUtils.toString(e));
+            throw new ArchivingException(e);
+        } catch (final ConnectionException e) {
+            final String message = GlobalConst.ARCHIVING_ERROR_PREFIX + "Failed adding '"
+                    + attributeLightMode.getAttributeCompleteName() + "' as source";
+            final String reason = GlobalConst.TANGO_COMM_EXCEPTION;
+            final String desc = "Failed while executing NumberSpectrum_RW.addSource() method...\nBooleanScalar.java: Failed to get the attribute from the AttributeFactory";
+            throw new ArchivingException(message, reason, ErrSeverity.WARN, desc, "", e);
+        } /*
+           * end of first try/catch block, to retrieve the attribute from the
+           * AttributeFactory
+           */
+
+        logger.debug("boolean attribute \"" + attribute.getNameSansDevice() + "\"...\t");
+
+        /*
+         * If an attribute (name + device server) is already in the map, it
+         * means it has already been registered for the Tango Archive events. So
+         * it does not have to be added to the archive events once again, nor to
+         * the attributePolledList: we can return. The same goes for an
+         * attribute already present in the attributePolledList `attributeList'.
+         */
+        /*
+         * if(HdbArchiver.useEvents.equalsIgnoreCase("no")) {
+         * System.out.print("[\033[1;35mEVENTS DISABLED\033[0m]. ");
+         * registerForScalarListener(attributeLightMode); } else {
+         */
+        try {
+            synchronized (evtAdaptHMap) {
+                evtAdapt = evtAdaptHMap.get(attribute.getDevice());
+                if (evtAdapt == null) {
+                    evtAdapt = new TangoEventsAdapter(attribute.getDevice());
+                    evtAdaptHMap.put(attribute.getDevice(), evtAdapt);
+                } else {
+                    logger.debug("\nThe adapter for the attribute is already configured");
+                }
+            }
+            final String[] filter = new String[0];
+
+            /*
+             * Try to register for the archive events: evtAdapt is the new
+             * adapter or the one already found in the map.
+             */
+            evtAdapt.addTangoArchiveListener(this, attribute.getNameSansDevice(), filter);
+            archiveListenersCounter++;
+            logger.debug("[\033[1;32mEVENTS\033[0m].");
+        } catch (final DevFailed e) {
+            /*
+             * If archive events are not enabled for the attribute, we will poll
+             * it
+             */
+            for (final DevError error : e.errors) {
+                // // System.out.println("error registering: " +
+                // e.errors[err].desc);
+                if (error.desc.contains("Already connected to event")) {
+                    logger.debug("Already connected to events for attribute");
+                    return;
+                }
+            }
+            /* Register for polling */
+            addSourceForPolling(attributeLightMode);
+            /* unlock the attributeList */
+        }
+        // } /* function finishes */
+    }
+
+    private void removeSourceForEvents(final String attributeName) {
+        logger.debug("boolean: removing source for \"" + attributeName + "\"...\t");
+        TangoEventsAdapter adapter;
+        IBooleanScalar attribute;
+
+        try {
+            synchronized (evtAdaptHMap) {
+                attribute = (IBooleanScalar) AttributeFactory.getInstance().getAttribute(attributeName);
+                // Retrieve in map the event adapter associated to the attributeName.
+                if (attribute == null) {
+                    logger.debug("\033[1;31mThe attribute " + attributeName + " is null\033[0m");
+                }
+                adapter = evtAdaptHMap.get(attribute.getDevice());
+
+                if (adapter != null) {
+                    adapter.removeTangoArchiveListener(this, attribute.getNameSansDevice());
+                    archiveListenersCounter--;
+                    logger.debug("[\033[1;32mEVENTS\033[0m].");
+                }
+            } // unlock event adapters map
+        } catch (final ConnectionException e) {
+            // getAttribute() failed
+            logger.error("\033[1;31mConnection exception while retrieving the attribute from the AttributeFactory!\033[0m");
+        } catch (final DevFailed f) {
+            logger.error(DevFailedUtils.toString(f));
+        }
+    }
+
+    // --------------------------------------------------------------------------//
+    // ELETTRA : Archiving Events
+    // --------------------------------------------------------------------------//
+
+    @Override
+    public void stateChange(final AttributeStateEvent event) {
+    }
+
+    public void processEventScalar(final ScalarEvent scalarEvent, int try_number) {
+        if (isDataArchivableTimestampWise(scalarEvent)) {
+            final String attributeName = scalarEvent.getAttributeCompleteName();
+            try {
+                boolean doArchive = false;
+                if (isFirstValueList.get(attributeName.toLowerCase())) {
+                    doArchive = true;
+                    isFirstValueList.put(attributeName.toLowerCase(), false);
+                    logger.debug(attributeName + " first value, forcing archiving");
+                } else {
+                    final ModesCounters mc = getModeCounter(attributeName);
+                    if (mc == null) {
+                        logger.debug(attributeName + " Attribute Counters unknown");
+                    } else {
+                        doArchive = doArchiveEvent(mc, scalarEvent.getDataType(), scalarEvent.getReadValue(),
+                                getLastValue(scalarEvent), attributeName);
+                    }
+                }
+
+                if (doArchive) {
+                    super.dbProxy.store(scalarEvent);
+                }
+
+                setLastValue(scalarEvent, scalarEvent.getReadValue());
+            } catch (final Exception e) {
+                registerErrorMessage(attributeName, e);
+                logger.error("error storing attribute {}, {}",attributeName, e.getMessage());
+                logger.error("Problem storing value", e);
+
+                try_number--;
+                if (try_number > 0) {
+                    processEventScalar(scalarEvent, try_number);
+                }
+            }
+        }
+    }
+
+    protected abstract int getWritableValue();
+
+    @Override
+    protected void treatErrorEventAfterLogging(ErrorEvent errorEvent) {
+        try {
+            processEventScalar(getNullValueScalarEvent(errorEvent, TangoConst.Tango_DEV_BOOLEAN, getWritableValue()),
+                    DEFAULT_TRY_NUMBER);
+        } catch (final Exception e) {
+            logger.error(this.getClass().getSimpleName() + ".errorChange : during processEventScalar creation execp : "
+                    + e);
+        }
+    }
+
+}
diff --git a/src/main/java/HdbArchiver/Collector/scalar/BooleanScalar_RO.java b/hdbarchiver/src/main/java/HdbArchiver/Collector/scalar/BooleanScalar_RO.java
similarity index 94%
rename from src/main/java/HdbArchiver/Collector/scalar/BooleanScalar_RO.java
rename to hdbarchiver/src/main/java/HdbArchiver/Collector/scalar/BooleanScalar_RO.java
index e9aa3605ceae071be5b35ac3d7298c7dee6ffa85..6422e747c784c4f57de435deead30a73e55bd25e 100644
--- a/src/main/java/HdbArchiver/Collector/scalar/BooleanScalar_RO.java
+++ b/hdbarchiver/src/main/java/HdbArchiver/Collector/scalar/BooleanScalar_RO.java
@@ -1,209 +1,207 @@
-// +======================================================================
-// $Source: /cvsroot/tango-cs/tango/jserver/archiving/HdbArchiver/Collector/scalar/BooleanScalar_RO.java,v $
-//
-// Project:      Tango Archiving Service
-//
-// Description:  Java source code for the class  BooleanScalar_RO.
-//						(Chinkumo Jean) - Aug 30, 2005
-//
-// $Author: pierrejoseph $
-//
-// $Revision: 1.12 $
-//
-// $Log: BooleanScalar_RO.java,v $
-// Revision 1.12  2007/10/03 15:23:29  pierrejoseph
-// Minor changes
-//
-// Revision 1.11  2007/09/28 14:49:23  pierrejoseph
-// Merged between Polling and Events code
-//
-// Revision 1.10  2007/06/11 12:21:04  pierrejoseph
-// errorEvent method is managed by the mother class
-//
-// Revision 1.9  2006/07/26 08:37:21  ounsy
-// try number no more static and reinitialized with change events (errorchange, numberscalarchange, etc...)
-//
-// Revision 1.8  2006/07/21 14:43:08  ounsy
-// minor changes
-//
-// Revision 1.7  2006/07/18 08:04:02  ounsy
-// moved the setAttribute_complete_name call in the try block
-//
-// Revision 1.6  2006/07/13 13:56:11  ounsy
-// added logging in case of errors during XXXValueChanged
-//
-// Revision 1.5  2006/05/03 14:29:18  ounsy
-// compatible with the AttributePolledList in "dispatch" mode
-//
-// Revision 1.4  2005/11/29 16:16:05  chinkumo
-// Code reformated (pogo compatible)
-//
-// Revision 1.3  2005/11/15 13:46:08  chinkumo
-// ...
-//
-// Revision 1.2  2005/09/26 08:01:20  chinkumo
-// Minor changes !
-//
-// Revision 1.1  2005/09/09 10:03:56  chinkumo
-// First commit !
-// (Dynamic attribut release)
-//
-//
-// copyleft :	Synchrotron SOLEIL
-//					L'Orme des Merisiers
-//					Saint-Aubin - BP 48
-//					91192 GIF-sur-YVETTE CEDEX
-//
-//-======================================================================
-
-package HdbArchiver.Collector.scalar;
-
-import org.slf4j.Logger;
-import org.tango.utils.DevFailedUtils;
-
-import HdbArchiver.Collector.HdbModeHandler;
-import fr.esrf.Tango.AttrDataFormat;
-import fr.esrf.Tango.AttrWriteType;
-import fr.esrf.Tango.DevFailed;
-import fr.esrf.TangoApi.DeviceAttribute;
-import fr.esrf.TangoApi.DeviceProxy;
-import fr.esrf.TangoApi.events.TangoArchive;
-import fr.esrf.TangoApi.events.TangoArchiveEvent;
-import fr.esrf.tangoatk.core.BooleanScalarEvent;
-import fr.esrf.tangoatk.core.IBooleanScalar;
-import fr.soleil.archiving.hdbtdb.api.tools.ScalarEvent;
-
-public class BooleanScalar_RO extends BooleanScalar {
-
-    private static final long serialVersionUID = 8192052988031913514L;
-
-    public BooleanScalar_RO(final HdbModeHandler modeHandler, final Logger logger) {
-        super(modeHandler, logger);
-    }
-
-    @Override
-    protected int getWritableValue() {
-        return AttrWriteType._READ;
-    }
-
-    @Override
-    public void booleanScalarChange(final BooleanScalarEvent event) {
-        final ScalarEvent scalarEvent = new ScalarEvent();
-        final int tryNumber = DEFAULT_TRY_NUMBER;
-
-        String attributeName = ((IBooleanScalar) event.getSource()).getName();
-        try {
-            removeErrorMessage(attributeName);
-            scalarEvent.setAttributeCompleteName(attributeName);
-
-            scalarEvent.setDataFormat(AttrDataFormat._SCALAR);
-            scalarEvent.setWritable(getWritableValue());
-            scalarEvent.setDataType(((IBooleanScalar) event.getSource()).getAttribute().getType());
-            // Null pointer ( IBooleanScalar ) event.getSource()
-            // ).getAttribute() is null sometimes
-
-            scalarEvent.setTimeStamp(event.getTimeStamp());
-
-            // --------------------------------------------------------------------------//
-            // ELETTRA : Archiving Events
-            // --------------------------------------------------------------------------//
-            /*
-             * In case of error the line can be modified as followed Boolean
-             * readvalue; readvalue = event.getValue(); System.out.println( ( (
-             * IBooleanScalar ) event.getSource() ).getName() +
-             * "{boolean, RO} [\033[1;36mPOLLED\033[0m]: " + readvalue);
-             * 
-             * scalarEvent.setValue(readvalue);
-             */
-            // --------------------------------------------------------------------------//
-            // ELETTRA : Archiving Events
-            // --------------------------------------------------------------------------//
-            scalarEvent.setValue(Boolean.valueOf(((IBooleanScalar) event.getSource()).getValue()), null);
-
-            processEventScalar(scalarEvent, tryNumber);
-
-        } catch (final DevFailed devFailed) {
-            logger.error(DevFailedUtils.toString(devFailed));
-            registerErrorMessage(attributeName, devFailed);
-            scalarEvent.setValue(null, null);
-            processEventScalar(scalarEvent, tryNumber);
-        } catch (final Exception e) {
-            registerErrorMessage(attributeName, e);
-            scalarEvent.setValue(null, null);
-            processEventScalar(scalarEvent, tryNumber);
-            logger.trace("Problem in BooleanScalar_RO/booleanScalarChange", e);
-        }
-
-    }
-
-    // --------------------------------------------------------------------------//
-    // ELETTRA : Archiving Events
-    // --------------------------------------------------------------------------//
-
-    /**
-     * @since events
-     * @author giacomo Implements the boolean scalar archive events for the read
-     *         only type
-     */
-    @Override
-    public void archive(final TangoArchiveEvent event) {
-        final int tryNumber = DEFAULT_TRY_NUMBER;
-        DeviceAttribute attrib = null;
-        TangoArchive arch;
-        DeviceProxy proxy;
-        final ScalarEvent scalarEvent = new ScalarEvent();
-        Boolean bvalue;
-
-        try {
-            attrib = event.getValue();
-        } catch (final DevFailed f) {
-            logger.error(DevFailedUtils.toString(f));
-        } catch (final Exception e) /* Shouldn't be reached */
-        {
-            logger.error("error", e);
-        }
-
-        try {
-            /*
-             * To correctly archive the attribute, we have to know its complete
-             * name. To acquire this information, we must o back to the
-             * TangoArchive object (which contains the DeviceProxy).
-             */
-            arch = (TangoArchive) event.getSource();
-            proxy = arch.getEventSupplier(); /*
-                                              * The device that supplied the
-                                              * event
-                                              */
-            if (arch == null || proxy == null || attrib == null) {
-                logger.debug("\033[1;31mBooleanScalar_RO: event.getValue() or event.getSource() or event.getSource().getEventSupplier()) returned null!\033[0m");
-                return;
-            }
-
-            scalarEvent.setAttributeCompleteName(proxy.name() + "/" + attrib.getName());
-            scalarEvent.setTimeStamp(attrib.getTime());
-            scalarEvent.setDataFormat(AttrDataFormat._SCALAR);
-            scalarEvent.setWritable(AttrWriteType._READ);
-            scalarEvent.setDataType(attrib.getType());
-
-            bvalue = attrib.extractBoolean();
-            scalarEvent.setValue(Boolean.valueOf(bvalue), null);
-
-            logger.debug(proxy.name() + ": " + attrib.getName() + "{boolean, RO} [\033[1;32mEVENT\033[0m]: " + bvalue);
-
-            processEventScalar(scalarEvent, tryNumber);
-
-        } catch (final DevFailed devFailed) {
-            logger.error(DevFailedUtils.toString(devFailed));
-            scalarEvent.setValue(null, null);
-            processEventScalar(scalarEvent, tryNumber);
-        } catch (final Exception exE) {
-            logger.error("error", exE);
-            scalarEvent.setValue(null, null);
-            processEventScalar(scalarEvent, tryNumber);
-        }
-
-    }
-    // --------------------------------------------------------------------------//
-    // ELETTRA : Archiving Events
-    // --------------------------------------------------------------------------//
-}
+// +======================================================================
+// $Source: /cvsroot/tango-cs/tango/jserver/archiving/HdbArchiver/Collector/scalar/BooleanScalar_RO.java,v $
+//
+// Project:      Tango Archiving Service
+//
+// Description:  Java source code for the class  BooleanScalar_RO.
+//						(Chinkumo Jean) - Aug 30, 2005
+//
+// $Author: pierrejoseph $
+//
+// $Revision: 1.12 $
+//
+// $Log: BooleanScalar_RO.java,v $
+// Revision 1.12  2007/10/03 15:23:29  pierrejoseph
+// Minor changes
+//
+// Revision 1.11  2007/09/28 14:49:23  pierrejoseph
+// Merged between Polling and Events code
+//
+// Revision 1.10  2007/06/11 12:21:04  pierrejoseph
+// errorEvent method is managed by the mother class
+//
+// Revision 1.9  2006/07/26 08:37:21  ounsy
+// try number no more static and reinitialized with change events (errorchange, numberscalarchange, etc...)
+//
+// Revision 1.8  2006/07/21 14:43:08  ounsy
+// minor changes
+//
+// Revision 1.7  2006/07/18 08:04:02  ounsy
+// moved the setAttribute_complete_name call in the try block
+//
+// Revision 1.6  2006/07/13 13:56:11  ounsy
+// added logging in case of errors during XXXValueChanged
+//
+// Revision 1.5  2006/05/03 14:29:18  ounsy
+// compatible with the AttributePolledList in "dispatch" mode
+//
+// Revision 1.4  2005/11/29 16:16:05  chinkumo
+// Code reformated (pogo compatible)
+//
+// Revision 1.3  2005/11/15 13:46:08  chinkumo
+// ...
+//
+// Revision 1.2  2005/09/26 08:01:20  chinkumo
+// Minor changes !
+//
+// Revision 1.1  2005/09/09 10:03:56  chinkumo
+// First commit !
+// (Dynamic attribut release)
+//
+//
+// copyleft :	Synchrotron SOLEIL
+//					L'Orme des Merisiers
+//					Saint-Aubin - BP 48
+//					91192 GIF-sur-YVETTE CEDEX
+//
+//-======================================================================
+
+package HdbArchiver.Collector.scalar;
+
+import HdbArchiver.Collector.HdbModeHandler;
+import fr.esrf.Tango.AttrDataFormat;
+import fr.esrf.Tango.AttrWriteType;
+import fr.esrf.Tango.DevFailed;
+import fr.esrf.TangoApi.DeviceAttribute;
+import fr.esrf.TangoApi.DeviceProxy;
+import fr.esrf.TangoApi.events.TangoArchive;
+import fr.esrf.TangoApi.events.TangoArchiveEvent;
+import fr.esrf.tangoatk.core.BooleanScalarEvent;
+import fr.esrf.tangoatk.core.IBooleanScalar;
+import fr.soleil.archiving.hdbtdb.api.tools.ScalarEvent;
+import org.slf4j.Logger;
+import org.tango.utils.DevFailedUtils;
+
+public class BooleanScalar_RO extends BooleanScalar {
+
+    private static final long serialVersionUID = 8192052988031913514L;
+
+    public BooleanScalar_RO(final HdbModeHandler modeHandler, boolean useEvents, final Logger logger) {
+        super(modeHandler, useEvents, logger);
+    }
+
+    @Override
+    protected int getWritableValue() {
+        return AttrWriteType._READ;
+    }
+
+    @Override
+    public void booleanScalarChange(final BooleanScalarEvent event) {
+        final ScalarEvent scalarEvent = new ScalarEvent();
+        final int tryNumber = DEFAULT_TRY_NUMBER;
+
+        String attributeName = ((IBooleanScalar) event.getSource()).getName();
+        try {
+            removeErrorMessage(attributeName);
+            scalarEvent.setAttributeCompleteName(attributeName);
+
+            scalarEvent.setDataFormat(AttrDataFormat._SCALAR);
+            scalarEvent.setWritable(getWritableValue());
+            scalarEvent.setDataType(((IBooleanScalar) event.getSource()).getAttribute().getType());
+            // Null pointer ( IBooleanScalar ) event.getSource()
+            // ).getAttribute() is null sometimes
+
+            scalarEvent.setTimeStamp(event.getTimeStamp());
+
+            // --------------------------------------------------------------------------//
+            // ELETTRA : Archiving Events
+            // --------------------------------------------------------------------------//
+            /*
+             * In case of error the line can be modified as followed Boolean
+             * readvalue; readvalue = event.getValue(); System.out.println( ( (
+             * IBooleanScalar ) event.getSource() ).getName() +
+             * "{boolean, RO} [\033[1;36mPOLLED\033[0m]: " + readvalue);
+             * 
+             * scalarEvent.setValue(readvalue);
+             */
+            // --------------------------------------------------------------------------//
+            // ELETTRA : Archiving Events
+            // --------------------------------------------------------------------------//
+            scalarEvent.setValue(Boolean.valueOf(((IBooleanScalar) event.getSource()).getValue()), null);
+
+            processEventScalar(scalarEvent, tryNumber);
+
+        } catch (final DevFailed devFailed) {
+            logger.error(DevFailedUtils.toString(devFailed));
+            registerErrorMessage(attributeName, devFailed);
+            scalarEvent.setValue(null, null);
+            processEventScalar(scalarEvent, tryNumber);
+        } catch (final Exception e) {
+            registerErrorMessage(attributeName, e);
+            scalarEvent.setValue(null, null);
+            processEventScalar(scalarEvent, tryNumber);
+            logger.trace("Problem in BooleanScalar_RO/booleanScalarChange", e);
+        }
+
+    }
+
+    // --------------------------------------------------------------------------//
+    // ELETTRA : Archiving Events
+    // --------------------------------------------------------------------------//
+
+    /**
+     * @author giacomo Implements the boolean scalar archive events for the read
+     * only type
+     * @since events
+     */
+    @Override
+    public void archive(final TangoArchiveEvent event) {
+        final int tryNumber = DEFAULT_TRY_NUMBER;
+        DeviceAttribute attrib = null;
+        TangoArchive arch;
+        DeviceProxy proxy;
+        final ScalarEvent scalarEvent = new ScalarEvent();
+        Boolean bvalue;
+
+        try {
+            attrib = event.getValue();
+        } catch (final DevFailed f) {
+            logger.error(DevFailedUtils.toString(f));
+        } catch (final Exception e) /* Shouldn't be reached */ {
+            logger.error("error", e);
+        }
+
+        try {
+            /*
+             * To correctly archive the attribute, we have to know its complete
+             * name. To acquire this information, we must o back to the
+             * TangoArchive object (which contains the DeviceProxy).
+             */
+            arch = (TangoArchive) event.getSource();
+            proxy = arch.getEventSupplier(); /*
+                                              * The device that supplied the
+                                              * event
+                                              */
+            if (arch == null || proxy == null || attrib == null) {
+                logger.debug("\033[1;31mBooleanScalar_RO: event.getValue() or event.getSource() or event.getSource().getEventSupplier()) returned null!\033[0m");
+                return;
+            }
+
+            scalarEvent.setAttributeCompleteName(proxy.name() + "/" + attrib.getName());
+            scalarEvent.setTimeStamp(attrib.getTime());
+            scalarEvent.setDataFormat(AttrDataFormat._SCALAR);
+            scalarEvent.setWritable(AttrWriteType._READ);
+            scalarEvent.setDataType(attrib.getType());
+
+            bvalue = attrib.extractBoolean();
+            scalarEvent.setValue(Boolean.valueOf(bvalue), null);
+
+            logger.debug(proxy.name() + ": " + attrib.getName() + "{boolean, RO} [\033[1;32mEVENT\033[0m]: " + bvalue);
+
+            processEventScalar(scalarEvent, tryNumber);
+
+        } catch (final DevFailed devFailed) {
+            logger.error(DevFailedUtils.toString(devFailed));
+            scalarEvent.setValue(null, null);
+            processEventScalar(scalarEvent, tryNumber);
+        } catch (final Exception exE) {
+            logger.error("error", exE);
+            scalarEvent.setValue(null, null);
+            processEventScalar(scalarEvent, tryNumber);
+        }
+
+    }
+    // --------------------------------------------------------------------------//
+    // ELETTRA : Archiving Events
+    // --------------------------------------------------------------------------//
+}
diff --git a/src/main/java/HdbArchiver/Collector/scalar/BooleanScalar_RW.java b/hdbarchiver/src/main/java/HdbArchiver/Collector/scalar/BooleanScalar_RW.java
similarity index 95%
rename from src/main/java/HdbArchiver/Collector/scalar/BooleanScalar_RW.java
rename to hdbarchiver/src/main/java/HdbArchiver/Collector/scalar/BooleanScalar_RW.java
index d23cb84780512441ac89df4498dc125a7dad0d40..58e5ff594c4a0e1ca0def654a2d4a1a1023e8bba 100644
--- a/src/main/java/HdbArchiver/Collector/scalar/BooleanScalar_RW.java
+++ b/hdbarchiver/src/main/java/HdbArchiver/Collector/scalar/BooleanScalar_RW.java
@@ -1,215 +1,214 @@
-// +======================================================================
-// $Source: /cvsroot/tango-cs/tango/jserver/archiving/HdbArchiver/Collector/scalar/BooleanScalar_RW.java,v $
-//
-// Project:      Tango Archiving Service
-//
-// Description:  Java source code for the class  BooleanScalar_RW.
-//						(Chinkumo Jean) - Aug 30, 2005
-//
-// $Author: pierrejoseph $
-//
-// $Revision: 1.12 $
-//
-// $Log: BooleanScalar_RW.java,v $
-// Revision 1.12  2007/10/03 15:23:29  pierrejoseph
-// Minor changes
-//
-// Revision 1.11  2007/09/28 14:49:23  pierrejoseph
-// Merged between Polling and Events code
-//
-// Revision 1.10  2007/06/11 12:21:04  pierrejoseph
-// errorEvent method is managed by the mother class
-//
-// Revision 1.9  2006/10/31 16:54:12  ounsy
-// milliseconds and null values management
-//
-// Revision 1.8  2006/07/26 08:37:21  ounsy
-// try number no more static and reinitialized with change events (errorchange, numberscalarchange, etc...)
-//
-// Revision 1.7  2006/07/18 08:04:02  ounsy
-// moved the setAttribute_complete_name call in the try block
-//
-// Revision 1.6  2006/07/13 13:56:11  ounsy
-// added logging in case of errors during XXXValueChanged
-//
-// Revision 1.5  2006/05/03 14:29:18  ounsy
-// compatible with the AttributePolledList in "dispatch" mode
-//
-// Revision 1.4  2006/01/27 13:06:40  ounsy
-// organised imports
-//
-// Revision 1.3  2005/11/29 16:16:05  chinkumo
-// Code reformated (pogo compatible)
-//
-// Revision 1.2  2005/11/15 13:46:08  chinkumo
-// ...
-//
-// Revision 1.1  2005/09/09 10:03:56  chinkumo
-// First commit !
-// (Dynamic attribut release)
-//
-//
-// copyleft :	Synchrotron SOLEIL
-//					L'Orme des Merisiers
-//					Saint-Aubin - BP 48
-//					91192 GIF-sur-YVETTE CEDEX
-//
-//-======================================================================
-
-package HdbArchiver.Collector.scalar;
-
-import org.slf4j.Logger;
-import org.tango.utils.DevFailedUtils;
-
-import HdbArchiver.Collector.HdbModeHandler;
-import fr.esrf.Tango.AttrDataFormat;
-import fr.esrf.Tango.AttrWriteType;
-import fr.esrf.Tango.DevFailed;
-import fr.esrf.TangoApi.DeviceAttribute;
-import fr.esrf.TangoApi.DeviceProxy;
-import fr.esrf.TangoApi.events.TangoArchive;
-import fr.esrf.TangoApi.events.TangoArchiveEvent;
-import fr.esrf.tangoatk.core.BooleanScalarEvent;
-import fr.esrf.tangoatk.core.IBooleanScalar;
-import fr.soleil.archiving.hdbtdb.api.tools.ScalarEvent;
-
-public class BooleanScalar_RW extends BooleanScalar {
-
-    private static final long serialVersionUID = 2762148410511036068L;
-
-    public BooleanScalar_RW(final HdbModeHandler modeHandler, final Logger logger) {
-        super(modeHandler, logger);
-    }
-
-    @Override
-    protected int getWritableValue() {
-        return AttrWriteType._READ_WRITE;
-    }
-
-    @Override
-    public void booleanScalarChange(final BooleanScalarEvent event) {
-        final int tryNumber = DEFAULT_TRY_NUMBER;
-
-        final ScalarEvent scalarEvent = new ScalarEvent();
-        boolean[] bvalue;
-
-        String attributeName = ((IBooleanScalar) event.getSource()).getName();
-        try {
-            removeErrorMessage(attributeName);
-            scalarEvent.setAttributeCompleteName(attributeName);
-
-            scalarEvent.setDataFormat(AttrDataFormat._SCALAR);
-            scalarEvent.setWritable(getWritableValue());
-            scalarEvent.setDataType(((IBooleanScalar) event.getSource()).getAttribute().getType());
-
-            scalarEvent.setTimeStamp(event.getTimeStamp());
-            bvalue = new boolean[2];
-            // --------------------------------------------------------------------------//
-            // ELETTRA : Archiving Events
-            // --------------------------------------------------------------------------//
-            /*
-             * In case of error the line can be modified as followed boolean
-             * readvalue, setvalue; readvalue = event.getValue(); setvalue = ( (
-             * IBooleanScalar ) event.getSource() ).getSetPoint(); bvalue[0] =
-             * readvalue; bvalue[1] = setvalue; System.out.println( ( (
-             * IBooleanScalar ) event.getSource() ).getName() +
-             * "{boolean, RW} [\033[1;36mPOLLED\033[0m]" );
-             */
-            // --------------------------------------------------------------------------//
-            // ELETTRA : Archiving Events
-            // --------------------------------------------------------------------------//
-            bvalue[0] = ((IBooleanScalar) event.getSource()).getValue();
-            bvalue[1] = ((IBooleanScalar) event.getSource()).getSetPoint();
-            scalarEvent.setValue(bvalue, null);
-
-            processEventScalar(scalarEvent, tryNumber);
-
-        } catch (final DevFailed devFailed) {
-            registerErrorMessage(attributeName, devFailed);
-            logger.error(DevFailedUtils.toString(devFailed));
-            scalarEvent.setValue(null, null);
-            processEventScalar(scalarEvent, tryNumber);
-        } catch (final Exception e) {
-            registerErrorMessage(attributeName, e);
-            scalarEvent.setValue(null, null);
-            processEventScalar(scalarEvent, tryNumber);
-
-            logger.error("Problem in BooleanScalar_RW/booleanScalarChange", e);
-        }
-
-    }
-
-    // --------------------------------------------------------------------------//
-    // ELETTRA : Archiving Events
-    // --------------------------------------------------------------------------//
-    @Override
-    public void archive(final TangoArchiveEvent event) {
-        final int tryNumber = DEFAULT_TRY_NUMBER;
-        DeviceAttribute attrib = null;
-        final TangoArchive arch;
-        final DeviceProxy proxy;
-        final ScalarEvent scalarEvent = new ScalarEvent();
-        final boolean[] bvalueTmp;
-        final boolean[] bvalue = new boolean[2];
-
-        try {
-            attrib = event.getValue();
-        } catch (final DevFailed f) {
-            logger.error(DevFailedUtils.toString(f));
-            return;
-        } catch (final Exception e) { /* Shouldn't be reached */
-            logger.error("BooleanScalar_RW.archive.getValue() failed, caught generic Exception, code failure", e);
-            return;
-        }
-
-        try {
-            /*
-             * To correctly archive the attribute, we have to know its complete
-             * name. To acquire this information, we must o back to the
-             * TangoArchive object (which contains the DeviceProxy).
-             */
-            arch = (TangoArchive) event.getSource();
-            proxy = arch.getEventSupplier(); /*
-                                              * The device that supplied the
-                                              * event
-                                              */
-            if (arch == null || proxy == null || attrib == null) {
-                logger.debug("\033[1;31mBooleanScalar_RW: event.getValue() or event.getSource() or event.getSource().getEventSupplier()) returned null!\033[0m");
-                return;
-            }
-
-            scalarEvent.setAttributeCompleteName(proxy.name() + "/" + attrib.getName());
-            scalarEvent.setTimeStamp(attrib.getTime());
-            scalarEvent.setDataFormat(AttrDataFormat._SCALAR);
-            scalarEvent.setWritable(AttrWriteType._READ_WRITE);
-            scalarEvent.setDataType(attrib.getType());
-
-            bvalueTmp = attrib.extractBooleanArray(); /* returns boolean[] */
-            /* we need boolean[] to store the correct data type */
-            bvalue[0] = bvalueTmp[0];
-            bvalue[1] = bvalueTmp[1];
-            scalarEvent.setValue(bvalue, null);
-
-            logger.debug(proxy.name() + ": " + attrib.getName() + "{boolean, RW} [\033[1;32mEVENT\033[0m]: " + "R: "
-                    + bvalue[0] + ", W: " + bvalue[1]);
-
-            processEventScalar(scalarEvent, tryNumber);
-
-        } catch (final DevFailed devFailed) {
-            logger.error(DevFailedUtils.toString(devFailed));
-            final Object value = null;
-            scalarEvent.setValue(value, null);
-            processEventScalar(scalarEvent, tryNumber);
-        } catch (final Exception exE) {
-            logger.error("error", exE);
-            final Object value = null;
-            scalarEvent.setValue(value, null);
-            processEventScalar(scalarEvent, tryNumber);
-        }
-
-    }
-
-    // --------------------------------------------------------------------------//
-    // ELETTRA : Archiving Events
-    // --------------------------------------------------------------------------//
-}
+// +======================================================================
+// $Source: /cvsroot/tango-cs/tango/jserver/archiving/HdbArchiver/Collector/scalar/BooleanScalar_RW.java,v $
+//
+// Project:      Tango Archiving Service
+//
+// Description:  Java source code for the class  BooleanScalar_RW.
+//						(Chinkumo Jean) - Aug 30, 2005
+//
+// $Author: pierrejoseph $
+//
+// $Revision: 1.12 $
+//
+// $Log: BooleanScalar_RW.java,v $
+// Revision 1.12  2007/10/03 15:23:29  pierrejoseph
+// Minor changes
+//
+// Revision 1.11  2007/09/28 14:49:23  pierrejoseph
+// Merged between Polling and Events code
+//
+// Revision 1.10  2007/06/11 12:21:04  pierrejoseph
+// errorEvent method is managed by the mother class
+//
+// Revision 1.9  2006/10/31 16:54:12  ounsy
+// milliseconds and null values management
+//
+// Revision 1.8  2006/07/26 08:37:21  ounsy
+// try number no more static and reinitialized with change events (errorchange, numberscalarchange, etc...)
+//
+// Revision 1.7  2006/07/18 08:04:02  ounsy
+// moved the setAttribute_complete_name call in the try block
+//
+// Revision 1.6  2006/07/13 13:56:11  ounsy
+// added logging in case of errors during XXXValueChanged
+//
+// Revision 1.5  2006/05/03 14:29:18  ounsy
+// compatible with the AttributePolledList in "dispatch" mode
+//
+// Revision 1.4  2006/01/27 13:06:40  ounsy
+// organised imports
+//
+// Revision 1.3  2005/11/29 16:16:05  chinkumo
+// Code reformated (pogo compatible)
+//
+// Revision 1.2  2005/11/15 13:46:08  chinkumo
+// ...
+//
+// Revision 1.1  2005/09/09 10:03:56  chinkumo
+// First commit !
+// (Dynamic attribut release)
+//
+//
+// copyleft :	Synchrotron SOLEIL
+//					L'Orme des Merisiers
+//					Saint-Aubin - BP 48
+//					91192 GIF-sur-YVETTE CEDEX
+//
+//-======================================================================
+
+package HdbArchiver.Collector.scalar;
+
+import HdbArchiver.Collector.HdbModeHandler;
+import fr.esrf.Tango.AttrDataFormat;
+import fr.esrf.Tango.AttrWriteType;
+import fr.esrf.Tango.DevFailed;
+import fr.esrf.TangoApi.DeviceAttribute;
+import fr.esrf.TangoApi.DeviceProxy;
+import fr.esrf.TangoApi.events.TangoArchive;
+import fr.esrf.TangoApi.events.TangoArchiveEvent;
+import fr.esrf.tangoatk.core.BooleanScalarEvent;
+import fr.esrf.tangoatk.core.IBooleanScalar;
+import fr.soleil.archiving.hdbtdb.api.tools.ScalarEvent;
+import org.slf4j.Logger;
+import org.tango.utils.DevFailedUtils;
+
+public class BooleanScalar_RW extends BooleanScalar {
+
+    private static final long serialVersionUID = 2762148410511036068L;
+
+    public BooleanScalar_RW(final HdbModeHandler modeHandler, boolean useEvents, final Logger logger) {
+        super(modeHandler, useEvents, logger);
+    }
+
+    @Override
+    protected int getWritableValue() {
+        return AttrWriteType._READ_WRITE;
+    }
+
+    @Override
+    public void booleanScalarChange(final BooleanScalarEvent event) {
+        final int tryNumber = DEFAULT_TRY_NUMBER;
+
+        final ScalarEvent scalarEvent = new ScalarEvent();
+        boolean[] bvalue;
+
+        String attributeName = ((IBooleanScalar) event.getSource()).getName();
+        try {
+            removeErrorMessage(attributeName);
+            scalarEvent.setAttributeCompleteName(attributeName);
+
+            scalarEvent.setDataFormat(AttrDataFormat._SCALAR);
+            scalarEvent.setWritable(getWritableValue());
+            scalarEvent.setDataType(((IBooleanScalar) event.getSource()).getAttribute().getType());
+
+            scalarEvent.setTimeStamp(event.getTimeStamp());
+            bvalue = new boolean[2];
+            // --------------------------------------------------------------------------//
+            // ELETTRA : Archiving Events
+            // --------------------------------------------------------------------------//
+            /*
+             * In case of error the line can be modified as followed boolean
+             * readvalue, setvalue; readvalue = event.getValue(); setvalue = ( (
+             * IBooleanScalar ) event.getSource() ).getSetPoint(); bvalue[0] =
+             * readvalue; bvalue[1] = setvalue; System.out.println( ( (
+             * IBooleanScalar ) event.getSource() ).getName() +
+             * "{boolean, RW} [\033[1;36mPOLLED\033[0m]" );
+             */
+            // --------------------------------------------------------------------------//
+            // ELETTRA : Archiving Events
+            // --------------------------------------------------------------------------//
+            bvalue[0] = ((IBooleanScalar) event.getSource()).getValue();
+            bvalue[1] = ((IBooleanScalar) event.getSource()).getSetPoint();
+            scalarEvent.setValue(bvalue, null);
+
+            processEventScalar(scalarEvent, tryNumber);
+
+        } catch (final DevFailed devFailed) {
+            registerErrorMessage(attributeName, devFailed);
+            logger.error(DevFailedUtils.toString(devFailed));
+            scalarEvent.setValue(null, null);
+            processEventScalar(scalarEvent, tryNumber);
+        } catch (final Exception e) {
+            registerErrorMessage(attributeName, e);
+            scalarEvent.setValue(null, null);
+            processEventScalar(scalarEvent, tryNumber);
+
+            logger.error("Problem in BooleanScalar_RW/booleanScalarChange", e);
+        }
+
+    }
+
+    // --------------------------------------------------------------------------//
+    // ELETTRA : Archiving Events
+    // --------------------------------------------------------------------------//
+    @Override
+    public void archive(final TangoArchiveEvent event) {
+        final int tryNumber = DEFAULT_TRY_NUMBER;
+        DeviceAttribute attrib = null;
+        final TangoArchive arch;
+        final DeviceProxy proxy;
+        final ScalarEvent scalarEvent = new ScalarEvent();
+        final boolean[] bvalueTmp;
+        final boolean[] bvalue = new boolean[2];
+
+        try {
+            attrib = event.getValue();
+        } catch (final DevFailed f) {
+            logger.error(DevFailedUtils.toString(f));
+            return;
+        } catch (final Exception e) { /* Shouldn't be reached */
+            logger.error("BooleanScalar_RW.archive.getValue() failed, caught generic Exception, code failure", e);
+            return;
+        }
+
+        try {
+            /*
+             * To correctly archive the attribute, we have to know its complete
+             * name. To acquire this information, we must o back to the
+             * TangoArchive object (which contains the DeviceProxy).
+             */
+            arch = (TangoArchive) event.getSource();
+            proxy = arch.getEventSupplier(); /*
+                                              * The device that supplied the
+                                              * event
+                                              */
+            if (arch == null || proxy == null || attrib == null) {
+                logger.debug("\033[1;31mBooleanScalar_RW: event.getValue() or event.getSource() or event.getSource().getEventSupplier()) returned null!\033[0m");
+                return;
+            }
+
+            scalarEvent.setAttributeCompleteName(proxy.name() + "/" + attrib.getName());
+            scalarEvent.setTimeStamp(attrib.getTime());
+            scalarEvent.setDataFormat(AttrDataFormat._SCALAR);
+            scalarEvent.setWritable(AttrWriteType._READ_WRITE);
+            scalarEvent.setDataType(attrib.getType());
+
+            bvalueTmp = attrib.extractBooleanArray(); /* returns boolean[] */
+            /* we need boolean[] to store the correct data type */
+            bvalue[0] = bvalueTmp[0];
+            bvalue[1] = bvalueTmp[1];
+            scalarEvent.setValue(bvalue, null);
+
+            logger.debug(proxy.name() + ": " + attrib.getName() + "{boolean, RW} [\033[1;32mEVENT\033[0m]: " + "R: "
+                    + bvalue[0] + ", W: " + bvalue[1]);
+
+            processEventScalar(scalarEvent, tryNumber);
+
+        } catch (final DevFailed devFailed) {
+            logger.error(DevFailedUtils.toString(devFailed));
+            final Object value = null;
+            scalarEvent.setValue(value, null);
+            processEventScalar(scalarEvent, tryNumber);
+        } catch (final Exception exE) {
+            logger.error("error", exE);
+            final Object value = null;
+            scalarEvent.setValue(value, null);
+            processEventScalar(scalarEvent, tryNumber);
+        }
+
+    }
+
+    // --------------------------------------------------------------------------//
+    // ELETTRA : Archiving Events
+    // --------------------------------------------------------------------------//
+}
diff --git a/src/main/java/HdbArchiver/Collector/scalar/BooleanScalar_WO.java b/hdbarchiver/src/main/java/HdbArchiver/Collector/scalar/BooleanScalar_WO.java
similarity index 94%
rename from src/main/java/HdbArchiver/Collector/scalar/BooleanScalar_WO.java
rename to hdbarchiver/src/main/java/HdbArchiver/Collector/scalar/BooleanScalar_WO.java
index 524d47979871356b627c5159c5d75c9c41511ccd..ba9c20d65703c142207b552a733eb7567954d8f6 100644
--- a/src/main/java/HdbArchiver/Collector/scalar/BooleanScalar_WO.java
+++ b/hdbarchiver/src/main/java/HdbArchiver/Collector/scalar/BooleanScalar_WO.java
@@ -1,199 +1,198 @@
-// +======================================================================
-// $Source: /cvsroot/tango-cs/tango/jserver/archiving/HdbArchiver/Collector/scalar/BooleanScalar_WO.java,v $
-//
-// Project:      Tango Archiving Service
-//
-// Description:  Java source code for the class  BooleanScalar_WO.
-//						(Chinkumo Jean) - Aug 30, 2005
-//
-// $Author: pierrejoseph $
-//
-// $Revision: 1.12 $
-//
-// $Log: BooleanScalar_WO.java,v $
-// Revision 1.12  2007/10/03 15:23:29  pierrejoseph
-// Minor changes
-//
-// Revision 1.11  2007/09/28 14:49:23  pierrejoseph
-// Merged between Polling and Events code
-//
-// Revision 1.10  2007/06/11 12:21:04  pierrejoseph
-// errorEvent method is managed by the mother class
-//
-// Revision 1.9  2006/07/26 08:37:21  ounsy
-// try number no more static and reinitialized with change events (errorchange, numberscalarchange, etc...)
-//
-// Revision 1.8  2006/07/18 08:04:02  ounsy
-// moved the setAttribute_complete_name call in the try block
-//
-// Revision 1.7  2006/07/13 13:56:11  ounsy
-// added logging in case of errors during XXXValueChanged
-//
-// Revision 1.6  2006/05/03 14:29:18  ounsy
-// compatible with the AttributePolledList in "dispatch" mode
-//
-// Revision 1.5  2006/01/27 13:06:40  ounsy
-// organised imports
-//
-// Revision 1.4  2005/11/29 16:16:05  chinkumo
-// Code reformated (pogo compatible)
-//
-// Revision 1.3  2005/11/15 13:46:08  chinkumo
-// ...
-//
-// Revision 1.2  2005/09/26 08:01:20  chinkumo
-// Minor changes !
-//
-// Revision 1.1  2005/09/09 10:03:56  chinkumo
-// First commit !
-// (Dynamic attribut release)
-//
-//
-// copyleft :	Synchrotron SOLEIL
-//					L'Orme des Merisiers
-//					Saint-Aubin - BP 48
-//					91192 GIF-sur-YVETTE CEDEX
-//
-//-======================================================================
-package HdbArchiver.Collector.scalar;
-
-import org.slf4j.Logger;
-import org.tango.utils.DevFailedUtils;
-
-import HdbArchiver.Collector.HdbModeHandler;
-import fr.esrf.Tango.AttrDataFormat;
-import fr.esrf.Tango.AttrWriteType;
-import fr.esrf.Tango.DevFailed;
-import fr.esrf.TangoApi.DeviceAttribute;
-import fr.esrf.TangoApi.DeviceProxy;
-import fr.esrf.TangoApi.events.TangoArchive;
-import fr.esrf.TangoApi.events.TangoArchiveEvent;
-import fr.esrf.tangoatk.core.BooleanScalarEvent;
-import fr.esrf.tangoatk.core.IBooleanScalar;
-import fr.soleil.archiving.hdbtdb.api.tools.ScalarEvent;
-
-public class BooleanScalar_WO extends BooleanScalar {
-
-    private static final long serialVersionUID = -3368839868083819323L;
-
-    public BooleanScalar_WO(final HdbModeHandler modeHandler, final Logger logger) {
-        super(modeHandler, logger);
-    }
-
-    @Override
-    protected int getWritableValue() {
-        return AttrWriteType._WRITE;
-    }
-
-    @Override
-    public void booleanScalarChange(final BooleanScalarEvent event) {
-        final int tryNumber = DEFAULT_TRY_NUMBER;
-        final ScalarEvent scalarEvent = new ScalarEvent();
-
-        String attributeName = ((IBooleanScalar) event.getSource()).getName();
-        try {
-            removeErrorMessage(attributeName);
-            scalarEvent.setAttributeCompleteName(attributeName);
-
-            scalarEvent.setDataFormat(AttrDataFormat._SCALAR);
-            scalarEvent.setWritable(getWritableValue());
-            scalarEvent.setDataType(((IBooleanScalar) event.getSource()).getAttribute().getType());
-
-            scalarEvent.setTimeStamp(event.getTimeStamp());
-
-            scalarEvent.setValue(Boolean.valueOf(((IBooleanScalar) event.getSource()).getSetPoint()), null);
-
-            processEventScalar(scalarEvent, tryNumber);
-
-        } catch (final DevFailed devFailed) {
-            registerErrorMessage(attributeName, devFailed);
-            logger.error(DevFailedUtils.toString(devFailed));
-            final Object value = null;
-            scalarEvent.setValue(value, null);
-            processEventScalar(scalarEvent, tryNumber);
-        } catch (final Exception e) {
-            registerErrorMessage(attributeName, e);
-            logger.error("error", e);
-            final Object value = null;
-            scalarEvent.setValue(value, null);
-            processEventScalar(scalarEvent, tryNumber);
-
-            final String message = "Problem in BooleanScalar_WO/booleanScalarChange";
-            logger.error(message, e);
-        }
-    }
-
-    // --------------------------------------------------------------------------//
-    // ELETTRA : Archiving Events
-    // --------------------------------------------------------------------------//
-    /**
-     * @since events
-     * @author giacomo Implements the boolean scalar archive events for the read
-     *         only type
-     */
-    @Override
-    public void archive(final TangoArchiveEvent event) {
-        final int tryNumber = DEFAULT_TRY_NUMBER;
-        DeviceAttribute attrib = null;
-        TangoArchive arch;
-        DeviceProxy proxy;
-        final ScalarEvent scalarEvent = new ScalarEvent();
-
-        try {
-            attrib = event.getValue();
-        } catch (final DevFailed f) {
-            logger.error(DevFailedUtils.toString(f));
-            return;
-        } catch (final Exception e) /* Shouldn't be reached */
-        {
-            logger.error("error", e);
-            return;
-        }
-
-        try {
-            /*
-             * To correctly archive the attribute, we have to know its complete
-             * name. To acquire this information, we must o back to the
-             * TangoArchive object (which contains the DeviceProxy).
-             */
-            arch = (TangoArchive) event.getSource();
-            proxy = arch.getEventSupplier(); /*
-                                              * The device that supplied the
-                                              * event
-                                              */
-            if (arch == null || proxy == null || attrib == null) {
-                logger.debug("\033[1;31mBooleanScalar_WO: event.getValue() or event.getSource() or event.getSource().getEventSupplier()) returned null!\033[0m");
-                return;
-            }
-
-            scalarEvent.setAttributeCompleteName(proxy.name() + "/" + attrib.getName());
-            scalarEvent.setTimeStamp(attrib.getTime());
-            scalarEvent.setDataFormat(AttrDataFormat._SCALAR);
-            scalarEvent.setWritable(AttrWriteType._WRITE);
-            scalarEvent.setDataType(attrib.getType());
-
-            final Boolean bvalue = Boolean.valueOf(attrib.extractBoolean());
-            scalarEvent.setValue(bvalue, null);
-
-            logger.debug(((IBooleanScalar) event.getSource()).getName() + "{boolean, WO} [\033[1;36mPOLLED\033[0m]: "
-                    + bvalue);
-            processEventScalar(scalarEvent, tryNumber);
-
-        } catch (final DevFailed devFailed) {
-            logger.error(DevFailedUtils.toString(devFailed));
-            final Object value = null;
-            scalarEvent.setValue(value, null);
-            processEventScalar(scalarEvent, tryNumber);
-        } catch (final Exception exE) {
-            logger.error("error", exE);
-            final Object value = null;
-            scalarEvent.setValue(value, null);
-            processEventScalar(scalarEvent, tryNumber);
-        }
-
-    }
-
-    // --------------------------------------------------------------------------//
-    // ELETTRA : Archiving Events
-    // --------------------------------------------------------------------------//
-}
+// +======================================================================
+// $Source: /cvsroot/tango-cs/tango/jserver/archiving/HdbArchiver/Collector/scalar/BooleanScalar_WO.java,v $
+//
+// Project:      Tango Archiving Service
+//
+// Description:  Java source code for the class  BooleanScalar_WO.
+//						(Chinkumo Jean) - Aug 30, 2005
+//
+// $Author: pierrejoseph $
+//
+// $Revision: 1.12 $
+//
+// $Log: BooleanScalar_WO.java,v $
+// Revision 1.12  2007/10/03 15:23:29  pierrejoseph
+// Minor changes
+//
+// Revision 1.11  2007/09/28 14:49:23  pierrejoseph
+// Merged between Polling and Events code
+//
+// Revision 1.10  2007/06/11 12:21:04  pierrejoseph
+// errorEvent method is managed by the mother class
+//
+// Revision 1.9  2006/07/26 08:37:21  ounsy
+// try number no more static and reinitialized with change events (errorchange, numberscalarchange, etc...)
+//
+// Revision 1.8  2006/07/18 08:04:02  ounsy
+// moved the setAttribute_complete_name call in the try block
+//
+// Revision 1.7  2006/07/13 13:56:11  ounsy
+// added logging in case of errors during XXXValueChanged
+//
+// Revision 1.6  2006/05/03 14:29:18  ounsy
+// compatible with the AttributePolledList in "dispatch" mode
+//
+// Revision 1.5  2006/01/27 13:06:40  ounsy
+// organised imports
+//
+// Revision 1.4  2005/11/29 16:16:05  chinkumo
+// Code reformated (pogo compatible)
+//
+// Revision 1.3  2005/11/15 13:46:08  chinkumo
+// ...
+//
+// Revision 1.2  2005/09/26 08:01:20  chinkumo
+// Minor changes !
+//
+// Revision 1.1  2005/09/09 10:03:56  chinkumo
+// First commit !
+// (Dynamic attribut release)
+//
+//
+// copyleft :	Synchrotron SOLEIL
+//					L'Orme des Merisiers
+//					Saint-Aubin - BP 48
+//					91192 GIF-sur-YVETTE CEDEX
+//
+//-======================================================================
+package HdbArchiver.Collector.scalar;
+
+import HdbArchiver.Collector.HdbModeHandler;
+import fr.esrf.Tango.AttrDataFormat;
+import fr.esrf.Tango.AttrWriteType;
+import fr.esrf.Tango.DevFailed;
+import fr.esrf.TangoApi.DeviceAttribute;
+import fr.esrf.TangoApi.DeviceProxy;
+import fr.esrf.TangoApi.events.TangoArchive;
+import fr.esrf.TangoApi.events.TangoArchiveEvent;
+import fr.esrf.tangoatk.core.BooleanScalarEvent;
+import fr.esrf.tangoatk.core.IBooleanScalar;
+import fr.soleil.archiving.hdbtdb.api.tools.ScalarEvent;
+import org.slf4j.Logger;
+import org.tango.utils.DevFailedUtils;
+
+public class BooleanScalar_WO extends BooleanScalar {
+
+    private static final long serialVersionUID = -3368839868083819323L;
+
+    public BooleanScalar_WO(final HdbModeHandler modeHandler, boolean useEvents, final Logger logger) {
+        super(modeHandler, useEvents, logger);
+    }
+
+    @Override
+    protected int getWritableValue() {
+        return AttrWriteType._WRITE;
+    }
+
+    @Override
+    public void booleanScalarChange(final BooleanScalarEvent event) {
+        final int tryNumber = DEFAULT_TRY_NUMBER;
+        final ScalarEvent scalarEvent = new ScalarEvent();
+
+        String attributeName = ((IBooleanScalar) event.getSource()).getName();
+        try {
+            removeErrorMessage(attributeName);
+            scalarEvent.setAttributeCompleteName(attributeName);
+
+            scalarEvent.setDataFormat(AttrDataFormat._SCALAR);
+            scalarEvent.setWritable(getWritableValue());
+            scalarEvent.setDataType(((IBooleanScalar) event.getSource()).getAttribute().getType());
+
+            scalarEvent.setTimeStamp(event.getTimeStamp());
+
+            scalarEvent.setValue(Boolean.valueOf(((IBooleanScalar) event.getSource()).getSetPoint()), null);
+
+            processEventScalar(scalarEvent, tryNumber);
+
+        } catch (final DevFailed devFailed) {
+            registerErrorMessage(attributeName, devFailed);
+            logger.error(DevFailedUtils.toString(devFailed));
+            final Object value = null;
+            scalarEvent.setValue(value, null);
+            processEventScalar(scalarEvent, tryNumber);
+        } catch (final Exception e) {
+            registerErrorMessage(attributeName, e);
+            logger.error("error", e);
+            final Object value = null;
+            scalarEvent.setValue(value, null);
+            processEventScalar(scalarEvent, tryNumber);
+
+            final String message = "Problem in BooleanScalar_WO/booleanScalarChange";
+            logger.error(message, e);
+        }
+    }
+
+    // --------------------------------------------------------------------------//
+    // ELETTRA : Archiving Events
+    // --------------------------------------------------------------------------//
+
+    /**
+     * @author giacomo Implements the boolean scalar archive events for the read
+     * only type
+     * @since events
+     */
+    @Override
+    public void archive(final TangoArchiveEvent event) {
+        final int tryNumber = DEFAULT_TRY_NUMBER;
+        DeviceAttribute attrib = null;
+        TangoArchive arch;
+        DeviceProxy proxy;
+        final ScalarEvent scalarEvent = new ScalarEvent();
+
+        try {
+            attrib = event.getValue();
+        } catch (final DevFailed f) {
+            logger.error(DevFailedUtils.toString(f));
+            return;
+        } catch (final Exception e) /* Shouldn't be reached */ {
+            logger.error("error", e);
+            return;
+        }
+
+        try {
+            /*
+             * To correctly archive the attribute, we have to know its complete
+             * name. To acquire this information, we must o back to the
+             * TangoArchive object (which contains the DeviceProxy).
+             */
+            arch = (TangoArchive) event.getSource();
+            proxy = arch.getEventSupplier(); /*
+                                              * The device that supplied the
+                                              * event
+                                              */
+            if (arch == null || proxy == null || attrib == null) {
+                logger.debug("\033[1;31mBooleanScalar_WO: event.getValue() or event.getSource() or event.getSource().getEventSupplier()) returned null!\033[0m");
+                return;
+            }
+
+            scalarEvent.setAttributeCompleteName(proxy.name() + "/" + attrib.getName());
+            scalarEvent.setTimeStamp(attrib.getTime());
+            scalarEvent.setDataFormat(AttrDataFormat._SCALAR);
+            scalarEvent.setWritable(AttrWriteType._WRITE);
+            scalarEvent.setDataType(attrib.getType());
+
+            final Boolean bvalue = Boolean.valueOf(attrib.extractBoolean());
+            scalarEvent.setValue(bvalue, null);
+
+            logger.debug(((IBooleanScalar) event.getSource()).getName() + "{boolean, WO} [\033[1;36mPOLLED\033[0m]: "
+                    + bvalue);
+            processEventScalar(scalarEvent, tryNumber);
+
+        } catch (final DevFailed devFailed) {
+            logger.error(DevFailedUtils.toString(devFailed));
+            final Object value = null;
+            scalarEvent.setValue(value, null);
+            processEventScalar(scalarEvent, tryNumber);
+        } catch (final Exception exE) {
+            logger.error("error", exE);
+            final Object value = null;
+            scalarEvent.setValue(value, null);
+            processEventScalar(scalarEvent, tryNumber);
+        }
+
+    }
+
+    // --------------------------------------------------------------------------//
+    // ELETTRA : Archiving Events
+    // --------------------------------------------------------------------------//
+}
diff --git a/src/main/java/HdbArchiver/Collector/scalar/NumberScalar.java b/hdbarchiver/src/main/java/HdbArchiver/Collector/scalar/NumberScalar.java
similarity index 95%
rename from src/main/java/HdbArchiver/Collector/scalar/NumberScalar.java
rename to hdbarchiver/src/main/java/HdbArchiver/Collector/scalar/NumberScalar.java
index bf91c6dfd8613fdfcf317c60d5435a1cef75ee11..d360c7fecfb0cf451d26c190628a2cd0d0ee76ac 100644
--- a/src/main/java/HdbArchiver/Collector/scalar/NumberScalar.java
+++ b/hdbarchiver/src/main/java/HdbArchiver/Collector/scalar/NumberScalar.java
@@ -1,451 +1,442 @@
-// +======================================================================
-// $Source: /cvsroot/tango-cs/tango/jserver/archiving/HdbArchiver/Collector/scalar/NumberScalar.java,v $
-//
-// Project:      Tango Archiving Service
-//
-// Description:  Java source code for the class  NumberScalar.
-//						(Chinkumo Jean) - Mar 25, 2004
-//
-// $Author: pierrejoseph $
-//
-// $Revision: 1.30 $
-//
-// $Log: NumberScalar.java,v $
-// Revision 1.30  2007/10/18 15:30:44  pierrejoseph
-// avoid a double creation of the evtAdaptHMap
-//
-// Revision 1.29  2007/10/03 15:23:29  pierrejoseph
-// Minor changes
-//
-// Revision 1.28  2007/09/28 14:49:23  pierrejoseph
-// Merged between Polling and Events code
-//
-// Revision 1.27  2007/09/25 14:59:17  pierrejoseph
-// 5251 : sometimes the device stayed in Running state sue to a blocking while in  the addAttribute method.
-//
-// Revision 1.26  2007/08/27 14:14:50  pierrejoseph
-// Traces addition
-//
-// Revision 1.25  2007/06/14 07:09:37  pierrejoseph
-// Exception addition in errorChange + retrieve the data_type of a Number Event
-//
-// Revision 1.24  2007/06/13 14:26:01  ounsy
-// catch exception addition
-//
-// Revision 1.23  2007/06/13 13:13:23  pierrejoseph
-// the mode counter are managed attribute by attribute in each collector
-//
-// Revision 1.22  2007/06/11 12:23:27  pierrejoseph
-// These abstracts classes managed the errorChange method +
-// call the doArchiveEvent method from the mother class to avoid dispatched the various catch exceptions at all collectors levels
-//
-// Revision 1.21  2007/04/24 14:29:27  ounsy
-// added a log in the case of unexpected ClassCast exception on the event's value
-//
-// Revision 1.20  2007/04/03 15:40:26  ounsy
-// removed logs
-//
-// Revision 1.19  2007/03/27 15:17:43  ounsy
-// corrected the processEventScalar method to use the isFirstValue boolean
-//
-// Revision 1.18  2007/03/14 09:17:51  ounsy
-// added a call to scalarEvent.avoidUnderFlow () in processNumberScalarEvent
-//
-// Revision 1.17  2007/03/05 16:25:20  ounsy
-// non-static DataBase
-//
-// Revision 1.16  2006/07/27 12:42:19  ounsy
-// modified processEventScalar so that it calls setLastValue even if the current value doesn't have to be archived
-//
-// Revision 1.15  2006/07/26 08:37:21  ounsy
-// try number no more static and reinitialized with change events (errorchange, numberscalarchange, etc...)
-//
-// Revision 1.14  2006/07/21 14:43:08  ounsy
-// minor changes
-//
-// Revision 1.13  2006/07/18 08:04:02  ounsy
-// moved the setAttribute_complete_name call in the try block
-//
-// Revision 1.12  2006/06/16 09:25:33  ounsy
-// changed imports because of the diary package moving to the javaapi project
-//
-// Revision 1.11  2006/06/13 13:28:19  ounsy
-// added a file logging system (diary) that records data storing errors
-//
-// Revision 1.10  2006/05/23 11:57:17  ounsy
-// now checks the timeCondition condition before calling DbProxy.store
-//
-// Revision 1.9  2006/01/27 13:06:40  ounsy
-// organised imports
-//
-// Revision 1.8  2005/11/29 17:33:53  chinkumo
-// no message
-//
-// Revision 1.7.10.4  2005/11/29 16:16:05  chinkumo
-// Code reformated (pogo compatible)
-//
-// Revision 1.7.10.3  2005/11/15 13:46:08  chinkumo
-// ...
-//
-// Revision 1.7.10.2  2005/09/26 08:01:20  chinkumo
-// Minor changes !
-//
-// Revision 1.7.10.1  2005/09/09 10:13:26  chinkumo
-// Since the collecting politic was simplified and improved this class was modified.
-//
-// Revision 1.7  2005/06/24 12:06:27  chinkumo
-// Some constants were moved from fr.soleil.hdbtdbArchivingApi.ArchivingApi.ConfigConst to fr.soleil.hdbtdbArchivingApi.ArchivingTools.Tools.GlobalConst.
-
-// This change was reported here.
-//
-// Revision 1.6  2005/06/14 10:30:27  chinkumo
-// Branch (hdbArchiver_1_0_1-branch_0)  and HEAD merged.
-//
-// Revision 1.5.2.1  2005/06/13 14:01:06  chinkumo
-// Changes made to improve the management of exceptions were reported here.
-//
-// Revision 1.5  2005/04/08 15:40:39  chinkumo
-// Code reformated.
-//
-// Revision 1.4  2005/03/07 16:26:10  chinkumo
-// Minor change (tag renamed)
-//
-// Revision 1.3  2005/02/04 17:10:12  chinkumo
-// The trouble with the grouped stopping strategy was fixed.
-//
-// Revision 1.2  2005/01/26 16:38:14  chinkumo
-// Ultimate synchronization before real sharing.
-//
-// Revision 1.1  2004/12/06 16:43:22  chinkumo
-// First commit (new architecture).
-//
-//
-// copyleft :	Synchrotron SOLEIL
-//					L'Orme des Merisiers
-//					Saint-Aubin - BP 48
-//					91192 GIF-sur-YVETTE CEDEX
-//
-//-======================================================================
-
-package HdbArchiver.Collector.scalar;
-
-import java.util.HashMap;
-import java.util.Map;
-
-import org.slf4j.Logger;
-import org.tango.utils.DevFailedUtils;
-
-import Common.Archiver.Collector.ModesCounters;
-import HdbArchiver.HdbArchiver;
-import HdbArchiver.Collector.HdbCollector;
-import HdbArchiver.Collector.HdbModeHandler;
-import fr.esrf.Tango.DevError;
-import fr.esrf.Tango.DevFailed;
-import fr.esrf.Tango.ErrSeverity;
-import fr.esrf.TangoApi.events.ITangoArchiveListener;
-import fr.esrf.TangoApi.events.TangoEventsAdapter;
-import fr.esrf.TangoDs.Util;
-import fr.esrf.tangoatk.core.AttributeStateEvent;
-import fr.esrf.tangoatk.core.ConnectionException;
-import fr.esrf.tangoatk.core.Device;
-import fr.esrf.tangoatk.core.ErrorEvent;
-import fr.esrf.tangoatk.core.INumberScalar;
-import fr.esrf.tangoatk.core.INumberScalarListener;
-import fr.esrf.tangoatk.core.attribute.AAttribute;
-import fr.esrf.tangoatk.core.attribute.AttributeFactory;
-import fr.soleil.archiving.common.api.exception.ArchivingException;
-import fr.soleil.archiving.common.api.tools.GlobalConst;
-import fr.soleil.archiving.hdbtdb.api.tools.AttributeLightMode;
-import fr.soleil.archiving.hdbtdb.api.tools.ScalarEvent;
-
-//--------------------------------------------------------------------------//
-//ELETTRA : Archiving Events
-//--------------------------------------------------------------------------//
-public abstract class NumberScalar extends HdbCollector implements INumberScalarListener, ITangoArchiveListener {
-
-    private static final long serialVersionUID = -889982942919688309L;
-
-    private final Map<Device, TangoEventsAdapter> evtAdaptHMap;
-
-    public NumberScalar(final HdbModeHandler modeHandler, final Logger logger) {
-        super(modeHandler, logger);
-        evtAdaptHMap = new HashMap<Device, TangoEventsAdapter>();
-    }
-
-    @Override
-    public synchronized void removeSource(final String attributeName) throws ArchivingException {
-
-        logger.debug("===> Entering " + this.getClass().getSimpleName() + ".removeSource for " + attributeName);
-
-        if (HdbArchiver.isUseEvents) {
-            removeSourceForEvents(attributeName);
-        }
-
-        try {
-            /*
-             * while ( ( INumberScalar ) attributeList.get(attributeName) !=
-             * null ) {
-             */
-            stopCollecting();
-            final INumberScalar attribute = (INumberScalar) attributeList.get(attributeName);
-            if (attribute != null) {
-                attribute.removeNumberScalarListener(this);
-                attribute.removeErrorListener(this);
-                attributeList.remove(attributeName);
-                isFirstValueList.remove(attributeName.toLowerCase());
-                logger.debug("\t The attribute was fired from the Collector list...");
-                // informs the mother class that one new attribute must be
-                // removed
-                removeAttribute(attributeName);
-                removeTimestamps(attributeName);
-                removeErrorMessage(attributeName);
-                Util.out4.println("\t The attribute named " + attributeName + " was fired from the Collector list...");
-            }
-        } catch (final Exception e) {
-            final String message = GlobalConst.ARCHIVING_ERROR_PREFIX + "Failed removing '" + attributeName
-                    + "' from sources";
-            final String reason = GlobalConst.TANGO_COMM_EXCEPTION;
-            final String desc = "Failed while executing " + this.getClass().getSimpleName()
-                    + ".removeSource() method...";
-            throw new ArchivingException(message, reason, ErrSeverity.WARN, desc, "", e);
-        } finally {
-            startCollecting();
-        }
-    }
-
-    @Override
-    protected void doAddSourceForPolling(final AttributeLightMode attributeLightMode) throws ArchivingException {
-        try {
-            final String attName = attributeLightMode.getAttributeCompleteName();
-            if (attName != null) {
-                INumberScalar attribute = null;
-                stopCollecting();
-                attribute = (INumberScalar) attributeList.add(attName);
-                attribute.addNumberScalarListener(this);
-                attribute.addErrorListener(this);
-                Util.out4.println("\t The attribute named " + attName + " was hired to the Collector list...");
-
-                // informs the mother class that one new attribute must be
-                // managed
-                addAttribute(attName);
-                logger.debug("add archiving for " + attName);
-            }
-        } catch (final ConnectionException e) {
-            final String message = GlobalConst.ARCHIVING_ERROR_PREFIX + "Failed adding '"
-                    + attributeLightMode.getAttributeCompleteName() + "' as source";
-            final String reason = GlobalConst.TANGO_COMM_EXCEPTION;
-            final String desc = "Failed while executing " + this.getClass().getSimpleName() + ".addSource() method...";
-            throw new ArchivingException(message, reason, ErrSeverity.WARN, desc, "", e);
-        } catch (final Exception e) {
-            final String message = GlobalConst.ARCHIVING_ERROR_PREFIX + "Unknown exception when adding '"
-                    + attributeLightMode.getAttributeCompleteName() + "' as source";
-            final String reason = GlobalConst.TANGO_COMM_EXCEPTION;
-            final String desc = "Failed while executing " + this.getClass().getSimpleName() + ".addSource() method...";
-            throw new ArchivingException(message, reason, ErrSeverity.WARN, desc, "", e);
-        } finally {
-            startCollecting();
-        }
-    }
-
-    // --------------------------------------------------------------------------//
-    // ELETTRA : Archiving Events
-    // --------------------------------------------------------------------------//
-    @Override
-    protected void addSourceForEvents(final AttributeLightMode attributeLightMode) throws ArchivingException {
-        /* Adapter for the Tango archive events */
-        TangoEventsAdapter evtAdapt = null;
-        INumberScalar attribute = null;
-
-        try {
-            /*
-             * Get the attribute from the AttributeFactory, so that it is not
-             * added to the attribute polled list. Remember that `attributeList'
-             * is an AttributePolledList().
-             */
-            attribute = (INumberScalar) AttributeFactory.getInstance().getAttribute(
-                    attributeLightMode.getAttributeCompleteName());
-            if (attribute == null) {
-                logger.debug("\033[1;31mNumberScalar.java: the attribute \""
-                        + attributeLightMode.getAttributeCompleteName()
-                        + " is null (NumberScalar.java): not adding it!");
-                return;
-            }
-            addAttribute(attributeLightMode.getAttributeCompleteName());
-        } catch (final DevFailed e) {
-            logger.error(DevFailedUtils.toString(e));
-            final String message = GlobalConst.ARCHIVING_ERROR_PREFIX + "Failed adding '"
-                    + attributeLightMode.getAttributeCompleteName() + "' as source";
-            final String reason = "DevFailed exception while calling AttributeFactory.getInstance().getAttribute();";
-            final String desc = "Failed while executing Spectrum_RW.addSource() method...\nSpectrum_RW.java: Failed to get the attribute from the AttributeFactory";
-            throw new ArchivingException(message, reason, ErrSeverity.WARN, desc, "", e);
-        } catch (final ConnectionException e) {
-            final String message = GlobalConst.ARCHIVING_ERROR_PREFIX + "Failed adding '"
-                    + attributeLightMode.getAttributeCompleteName() + "' as source";
-            final String reason = GlobalConst.TANGO_COMM_EXCEPTION;
-            final String desc = "Failed while executing NumberScalar.addSource() method...\nNumberScalar.java: Failed to get the attribute from the AttributeFactory";
-            throw new ArchivingException(message, reason, ErrSeverity.WARN, desc, "", e);
-        } /*
-           * end of first try/catch block, to retrieve the attribute from the
-           * AttributeFactory
-           */
-
-        logger.debug("\033[1;42mregistering\033[0m the scalar attribute \"" + attribute.getNameSansDevice() + "\"...\t");
-
-        /*
-         * If an attribute (name + device server) is already in the map, it
-         * means it has already been registered for the Tango Archive events. So
-         * it does not have to be added to the archive events once again, nor to
-         * the attributePolledList: we can return. The same goes for an
-         * attribute already present in the attributePolledList `attributeList'.
-         */
-        /*
-         * if(HdbArchiver.useEvents.equalsIgnoreCase("no")) {
-         * System.out.print("[\033[1;35mEVENTS DISABLED\033[0m]. ");
-         * registerForScalarListener(attributeLightMode); } else {
-         */
-        try {
-            synchronized (evtAdaptHMap) {
-                evtAdapt = evtAdaptHMap.get(attribute.getDevice());
-                if (evtAdapt == null) {
-                    evtAdapt = new TangoEventsAdapter(attribute.getDevice());
-                    evtAdaptHMap.put(attribute.getDevice(), evtAdapt);
-                } else {
-                    logger.debug("\nThe adapter for the attribute is already configured");
-                }
-            }
-            final String[] filter = new String[0];
-
-            /*
-             * Try to register for the archive events: evtAdapt is the new
-             * adapter or the one already found in the map.
-             */
-            evtAdapt.addTangoArchiveListener(this, attribute.getNameSansDevice(), filter);
-            archiveListenersCounter++;
-            logger.debug("[\033[1;42mEVENTS\033[0m].");
-        } catch (final DevFailed e) {
-            /*
-             * If archive events are not enabled for the attribute, we will poll
-             * it
-             */
-            for (final DevError error : e.errors) {
-
-                if (error.desc.contains("Already connected to event")) {
-                    logger.debug("Already connected to events for attribute");
-                    return;
-                } else if (error.desc.contains("The polling (necessary to send events) for the attribute")) {
-                    logger.debug(" {\033[1;35mpoller not started\033[0m} ");
-                    break;
-                } else if (error.desc.contains("Archive event properties")) {
-                    logger.debug(" {\033[1;35marchive event properties not set\033[0m} ");
-                    break;
-                } else {
-                    logger.debug("error registering: " + error.desc);
-                }
-
-            }
-            /* Register for polling */
-            addSourceForPolling(attributeLightMode);
-            /* unlock the attributeList */
-        }
-        // } /* function finishes */
-    }
-
-    private void removeSourceForEvents(final String attributeName) {
-        logger.debug("number: \033[1;42mremoving\033[0m source for \"" + attributeName + "\"...\t");
-        TangoEventsAdapter adapter;
-        INumberScalar attribute;
-        /*
-         * If useEvents is enabled, we should remove the eventListener, if not
-         * we can skip this piece of code
-         */
-        try {
-            synchronized (evtAdaptHMap) {
-                attribute = (INumberScalar) AttributeFactory.getInstance().getAttribute(attributeName);
-                /*
-                 * Retrieve in the hash table the event adapter associated to
-                 * the attributeName.
-                 */
-                if (attribute == null) {
-                    logger.debug("\033[1;31mThe attribute " + attributeName + " is null\033[0m");
-                }
-                adapter = evtAdaptHMap.get(attribute.getDevice());
-
-                if (adapter != null) {
-                    adapter.removeTangoArchiveListener(this, attribute.getNameSansDevice());
-                    archiveListenersCounter--;
-                    logger.debug("[\033[1;42mEVENTS\033[0m].");
-                    logger.debug(" (adapter: " + adapter.device_name() + ")");
-                    /* Should be ok now to return */
-                    // return;
-                }
-            } /* unlock event adapters map */
-        } catch (final ConnectionException e) /* getAttribute() failed */
-        {
-            logger.error("\033[1;31mConnection exception while retrieving the attribute from the AttributeFactory!\033[0m");
-        } catch (final DevFailed f) {
-            logger.error(DevFailedUtils.toString(f));
-        }
-    }
-
-    // --------------------------------------------------------------------------//
-    // ELETTRA : Archiving Events
-    // --------------------------------------------------------------------------//
-    @Override
-    public void stateChange(final AttributeStateEvent event) {
-    }
-
-    public void processEventScalar(final ScalarEvent scalarEvent, int try_number) {
-        if (isDataArchivableTimestampWise(scalarEvent)) {
-            final String attributeName = scalarEvent.getAttributeCompleteName();
-            try {
-                scalarEvent.avoidUnderFlow();
-
-                boolean doArchive = false;
-                if (isFirstValueList.get(attributeName.toLowerCase())) {
-                    doArchive = true;
-                    isFirstValueList.put(attributeName.toLowerCase(), false);
-                    logger.debug(attributeName + " first value, forcing archiving");
-                } else {
-                    final ModesCounters mc = getModeCounter(attributeName);
-                    if (mc == null) {
-                        logger.debug(attributeName + " Attribute Counters unknown ");
-                    } else {
-                        doArchive = doArchiveEvent(mc, scalarEvent.getDataType(), scalarEvent.getReadValue(),
-                                getLastValue(scalarEvent), attributeName);
-
-                    }
-                }
-
-                if (doArchive) {
-                    super.dbProxy.store(scalarEvent);
-                    setLastValue(scalarEvent, scalarEvent.getReadValue());
-                }
-            } catch (final Exception e) {
-                registerErrorMessage(attributeName, e.getMessage());
-                final String message = "Problem storing NumberScalar value";
-                logger.error(message, e);
-
-                try_number--;
-                if (try_number > 0) {
-                    logger.debug("NumberScalar.processEventScalar : retry " + try_number + "failed...");
-                    processEventScalar(scalarEvent, try_number);
-                }
-            }
-        }
-    }
-
-    protected abstract int getWritableValue();
-
-    @Override
-    protected void treatErrorEventAfterLogging(ErrorEvent errorEvent) {
-        /* Must be change because the number scalar are not only double */
-        try {
-            processEventScalar(
-                    getNullValueScalarEvent(errorEvent, ((AAttribute) errorEvent.getSource()).getTangoDataType(),
-                            getWritableValue()), DEFAULT_TRY_NUMBER);
-        } catch (final Exception e) {
-            logger.error(this.getClass().getSimpleName() + ".errorChange : during processEventScalar creation execp : "
-                    + e);
-        }
-    }
-}
+// +======================================================================
+// $Source: /cvsroot/tango-cs/tango/jserver/archiving/HdbArchiver/Collector/scalar/NumberScalar.java,v $
+//
+// Project:      Tango Archiving Service
+//
+// Description:  Java source code for the class  NumberScalar.
+//						(Chinkumo Jean) - Mar 25, 2004
+//
+// $Author: pierrejoseph $
+//
+// $Revision: 1.30 $
+//
+// $Log: NumberScalar.java,v $
+// Revision 1.30  2007/10/18 15:30:44  pierrejoseph
+// avoid a double creation of the evtAdaptHMap
+//
+// Revision 1.29  2007/10/03 15:23:29  pierrejoseph
+// Minor changes
+//
+// Revision 1.28  2007/09/28 14:49:23  pierrejoseph
+// Merged between Polling and Events code
+//
+// Revision 1.27  2007/09/25 14:59:17  pierrejoseph
+// 5251 : sometimes the device stayed in Running state sue to a blocking while in  the addAttribute method.
+//
+// Revision 1.26  2007/08/27 14:14:50  pierrejoseph
+// Traces addition
+//
+// Revision 1.25  2007/06/14 07:09:37  pierrejoseph
+// Exception addition in errorChange + retrieve the data_type of a Number Event
+//
+// Revision 1.24  2007/06/13 14:26:01  ounsy
+// catch exception addition
+//
+// Revision 1.23  2007/06/13 13:13:23  pierrejoseph
+// the mode counter are managed attribute by attribute in each collector
+//
+// Revision 1.22  2007/06/11 12:23:27  pierrejoseph
+// These abstracts classes managed the errorChange method +
+// call the doArchiveEvent method from the mother class to avoid dispatched the various catch exceptions at all collectors levels
+//
+// Revision 1.21  2007/04/24 14:29:27  ounsy
+// added a log in the case of unexpected ClassCast exception on the event's value
+//
+// Revision 1.20  2007/04/03 15:40:26  ounsy
+// removed logs
+//
+// Revision 1.19  2007/03/27 15:17:43  ounsy
+// corrected the processEventScalar method to use the isFirstValue boolean
+//
+// Revision 1.18  2007/03/14 09:17:51  ounsy
+// added a call to scalarEvent.avoidUnderFlow () in processNumberScalarEvent
+//
+// Revision 1.17  2007/03/05 16:25:20  ounsy
+// non-static DataBase
+//
+// Revision 1.16  2006/07/27 12:42:19  ounsy
+// modified processEventScalar so that it calls setLastValue even if the current value doesn't have to be archived
+//
+// Revision 1.15  2006/07/26 08:37:21  ounsy
+// try number no more static and reinitialized with change events (errorchange, numberscalarchange, etc...)
+//
+// Revision 1.14  2006/07/21 14:43:08  ounsy
+// minor changes
+//
+// Revision 1.13  2006/07/18 08:04:02  ounsy
+// moved the setAttribute_complete_name call in the try block
+//
+// Revision 1.12  2006/06/16 09:25:33  ounsy
+// changed imports because of the diary package moving to the javaapi project
+//
+// Revision 1.11  2006/06/13 13:28:19  ounsy
+// added a file logging system (diary) that records data storing errors
+//
+// Revision 1.10  2006/05/23 11:57:17  ounsy
+// now checks the timeCondition condition before calling DbProxy.store
+//
+// Revision 1.9  2006/01/27 13:06:40  ounsy
+// organised imports
+//
+// Revision 1.8  2005/11/29 17:33:53  chinkumo
+// no message
+//
+// Revision 1.7.10.4  2005/11/29 16:16:05  chinkumo
+// Code reformated (pogo compatible)
+//
+// Revision 1.7.10.3  2005/11/15 13:46:08  chinkumo
+// ...
+//
+// Revision 1.7.10.2  2005/09/26 08:01:20  chinkumo
+// Minor changes !
+//
+// Revision 1.7.10.1  2005/09/09 10:13:26  chinkumo
+// Since the collecting politic was simplified and improved this class was modified.
+//
+// Revision 1.7  2005/06/24 12:06:27  chinkumo
+// Some constants were moved from fr.soleil.hdbtdbArchivingApi.ArchivingApi.ConfigConst to fr.soleil.hdbtdbArchivingApi.ArchivingTools.Tools.GlobalConst.
+
+// This change was reported here.
+//
+// Revision 1.6  2005/06/14 10:30:27  chinkumo
+// Branch (hdbArchiver_1_0_1-branch_0)  and HEAD merged.
+//
+// Revision 1.5.2.1  2005/06/13 14:01:06  chinkumo
+// Changes made to improve the management of exceptions were reported here.
+//
+// Revision 1.5  2005/04/08 15:40:39  chinkumo
+// Code reformated.
+//
+// Revision 1.4  2005/03/07 16:26:10  chinkumo
+// Minor change (tag renamed)
+//
+// Revision 1.3  2005/02/04 17:10:12  chinkumo
+// The trouble with the grouped stopping strategy was fixed.
+//
+// Revision 1.2  2005/01/26 16:38:14  chinkumo
+// Ultimate synchronization before real sharing.
+//
+// Revision 1.1  2004/12/06 16:43:22  chinkumo
+// First commit (new architecture).
+//
+//
+// copyleft :	Synchrotron SOLEIL
+//					L'Orme des Merisiers
+//					Saint-Aubin - BP 48
+//					91192 GIF-sur-YVETTE CEDEX
+//
+//-======================================================================
+
+package HdbArchiver.Collector.scalar;
+
+import Common.Archiver.Collector.ModesCounters;
+import HdbArchiver.Collector.HdbCollector;
+import HdbArchiver.Collector.HdbModeHandler;
+import fr.esrf.Tango.DevError;
+import fr.esrf.Tango.DevFailed;
+import fr.esrf.Tango.ErrSeverity;
+import fr.esrf.TangoApi.events.ITangoArchiveListener;
+import fr.esrf.TangoApi.events.TangoEventsAdapter;
+import fr.esrf.TangoDs.Util;
+import fr.esrf.tangoatk.core.*;
+import fr.esrf.tangoatk.core.attribute.AAttribute;
+import fr.esrf.tangoatk.core.attribute.AttributeFactory;
+import fr.soleil.archiving.common.api.exception.ArchivingException;
+import fr.soleil.archiving.common.api.tools.GlobalConst;
+import fr.soleil.archiving.hdbtdb.api.tools.AttributeLightMode;
+import fr.soleil.archiving.hdbtdb.api.tools.ScalarEvent;
+import org.slf4j.Logger;
+import org.tango.utils.DevFailedUtils;
+
+import java.util.HashMap;
+import java.util.Map;
+
+//--------------------------------------------------------------------------//
+//ELETTRA : Archiving Events
+//--------------------------------------------------------------------------//
+public abstract class NumberScalar extends HdbCollector implements INumberScalarListener, ITangoArchiveListener {
+
+    private static final long serialVersionUID = -889982942919688309L;
+
+    private final Map<Device, TangoEventsAdapter> evtAdaptHMap;
+
+    public NumberScalar(final HdbModeHandler modeHandler, boolean useEvents, final Logger logger) {
+        super(modeHandler, useEvents, logger);
+        evtAdaptHMap = new HashMap<Device, TangoEventsAdapter>();
+    }
+
+    @Override
+    public synchronized void removeSource(final String attributeName) throws ArchivingException {
+
+        logger.debug("===> Entering " + this.getClass().getSimpleName() + ".removeSource for " + attributeName);
+
+        if (useEvents) {
+            removeSourceForEvents(attributeName);
+        }
+
+        try {
+            /*
+             * while ( ( INumberScalar ) attributeList.get(attributeName) !=
+             * null ) {
+             */
+            stopCollecting();
+            final INumberScalar attribute = (INumberScalar) attributeList.get(attributeName);
+            if (attribute != null) {
+                attribute.removeNumberScalarListener(this);
+                attribute.removeErrorListener(this);
+                attributeList.remove(attributeName);
+                isFirstValueList.remove(attributeName.toLowerCase());
+                logger.debug("\t The attribute was fired from the Collector list...");
+                // informs the mother class that one new attribute must be
+                // removed
+                removeAttribute(attributeName);
+                removeTimestamps(attributeName);
+                removeErrorMessage(attributeName);
+            }
+        } catch (final Exception e) {
+            final String message = GlobalConst.ARCHIVING_ERROR_PREFIX + "Failed removing '" + attributeName
+                    + "' from sources";
+            final String reason = GlobalConst.TANGO_COMM_EXCEPTION;
+            final String desc = "Failed while executing " + this.getClass().getSimpleName()
+                    + ".removeSource() method...";
+            throw new ArchivingException(message, reason, ErrSeverity.WARN, desc, "", e);
+        } finally {
+            startCollecting();
+        }
+    }
+
+    @Override
+    protected void doAddSourceForPolling(final AttributeLightMode attributeLightMode) throws ArchivingException {
+        try {
+            final String attName = attributeLightMode.getAttributeCompleteName();
+            if (attName != null) {
+                INumberScalar attribute = null;
+                stopCollecting();
+                attribute = (INumberScalar) attributeList.add(attName);
+                attribute.addNumberScalarListener(this);
+                attribute.addErrorListener(this);
+
+                // informs the mother class that one new attribute must be
+                // managed
+                addAttribute(attName);
+                logger.debug("add archiving for " + attName);
+            }
+        } catch (final ConnectionException e) {
+            final String message = GlobalConst.ARCHIVING_ERROR_PREFIX + "Failed adding '"
+                    + attributeLightMode.getAttributeCompleteName() + "' as source";
+            final String reason = GlobalConst.TANGO_COMM_EXCEPTION;
+            final String desc = "Failed while executing " + this.getClass().getSimpleName() + ".addSource() method...";
+            throw new ArchivingException(message, reason, ErrSeverity.WARN, desc, "", e);
+        } catch (final Exception e) {
+            e.printStackTrace();
+            final String message = GlobalConst.ARCHIVING_ERROR_PREFIX + "Unknown exception when adding '"
+                    + attributeLightMode.getAttributeCompleteName() + "' as source";
+            final String reason = GlobalConst.TANGO_COMM_EXCEPTION;
+            final String desc = "Failed while executing " + this.getClass().getSimpleName() + ".addSource() method...";
+            throw new ArchivingException(message, reason, ErrSeverity.WARN, desc, "", e);
+        } finally {
+            startCollecting();
+        }
+    }
+
+    // --------------------------------------------------------------------------//
+    // ELETTRA : Archiving Events
+    // --------------------------------------------------------------------------//
+    @Override
+    protected void addSourceForEvents(final AttributeLightMode attributeLightMode) throws ArchivingException {
+        /* Adapter for the Tango archive events */
+        TangoEventsAdapter evtAdapt = null;
+        INumberScalar attribute = null;
+
+        try {
+            /*
+             * Get the attribute from the AttributeFactory, so that it is not
+             * added to the attribute polled list. Remember that `attributeList'
+             * is an AttributePolledList().
+             */
+            attribute = (INumberScalar) AttributeFactory.getInstance().getAttribute(
+                    attributeLightMode.getAttributeCompleteName());
+            if (attribute == null) {
+                logger.debug("\033[1;31mNumberScalar.java: the attribute \""
+                        + attributeLightMode.getAttributeCompleteName()
+                        + " is null (NumberScalar.java): not adding it!");
+                return;
+            }
+            addAttribute(attributeLightMode.getAttributeCompleteName());
+        } catch (final DevFailed e) {
+            logger.error(DevFailedUtils.toString(e));
+            final String message = GlobalConst.ARCHIVING_ERROR_PREFIX + "Failed adding '"
+                    + attributeLightMode.getAttributeCompleteName() + "' as source";
+            final String reason = "DevFailed exception while calling AttributeFactory.getInstance().getAttribute();";
+            final String desc = "Failed while executing Spectrum_RW.addSource() method...\nSpectrum_RW.java: Failed to get the attribute from the AttributeFactory";
+            throw new ArchivingException(message, reason, ErrSeverity.WARN, desc, "", e);
+        } catch (final ConnectionException e) {
+            final String message = GlobalConst.ARCHIVING_ERROR_PREFIX + "Failed adding '"
+                    + attributeLightMode.getAttributeCompleteName() + "' as source";
+            final String reason = GlobalConst.TANGO_COMM_EXCEPTION;
+            final String desc = "Failed while executing NumberScalar.addSource() method...\nNumberScalar.java: Failed to get the attribute from the AttributeFactory";
+            throw new ArchivingException(message, reason, ErrSeverity.WARN, desc, "", e);
+        } /*
+           * end of first try/catch block, to retrieve the attribute from the
+           * AttributeFactory
+           */
+
+        logger.debug("\033[1;42mregistering\033[0m the scalar attribute \"" + attribute.getNameSansDevice() + "\"...\t");
+
+        /*
+         * If an attribute (name + device server) is already in the map, it
+         * means it has already been registered for the Tango Archive events. So
+         * it does not have to be added to the archive events once again, nor to
+         * the attributePolledList: we can return. The same goes for an
+         * attribute already present in the attributePolledList `attributeList'.
+         */
+        /*
+         * if(HdbArchiver.useEvents.equalsIgnoreCase("no")) {
+         * System.out.print("[\033[1;35mEVENTS DISABLED\033[0m]. ");
+         * registerForScalarListener(attributeLightMode); } else {
+         */
+        try {
+            synchronized (evtAdaptHMap) {
+                evtAdapt = evtAdaptHMap.get(attribute.getDevice());
+                if (evtAdapt == null) {
+                    evtAdapt = new TangoEventsAdapter(attribute.getDevice());
+                    evtAdaptHMap.put(attribute.getDevice(), evtAdapt);
+                } else {
+                    logger.debug("\nThe adapter for the attribute is already configured");
+                }
+            }
+            final String[] filter = new String[0];
+
+            /*
+             * Try to register for the archive events: evtAdapt is the new
+             * adapter or the one already found in the map.
+             */
+            evtAdapt.addTangoArchiveListener(this, attribute.getNameSansDevice(), filter);
+            archiveListenersCounter++;
+            logger.debug("[\033[1;42mEVENTS\033[0m].");
+        } catch (final DevFailed e) {
+            /*
+             * If archive events are not enabled for the attribute, we will poll
+             * it
+             */
+            for (final DevError error : e.errors) {
+
+                if (error.desc.contains("Already connected to event")) {
+                    logger.debug("Already connected to events for attribute");
+                    return;
+                } else if (error.desc.contains("The polling (necessary to send events) for the attribute")) {
+                    logger.debug(" {\033[1;35mpoller not started\033[0m} ");
+                    break;
+                } else if (error.desc.contains("Archive event properties")) {
+                    logger.debug(" {\033[1;35marchive event properties not set\033[0m} ");
+                    break;
+                } else {
+                    logger.debug("error registering: " + error.desc);
+                }
+
+            }
+            /* Register for polling */
+            addSourceForPolling(attributeLightMode);
+            /* unlock the attributeList */
+        }
+        // } /* function finishes */
+    }
+
+    private void removeSourceForEvents(final String attributeName) {
+        logger.debug("number: \033[1;42mremoving\033[0m source for \"" + attributeName + "\"...\t");
+        TangoEventsAdapter adapter;
+        INumberScalar attribute;
+        /*
+         * If useEvents is enabled, we should remove the eventListener, if not
+         * we can skip this piece of code
+         */
+        try {
+            synchronized (evtAdaptHMap) {
+                attribute = (INumberScalar) AttributeFactory.getInstance().getAttribute(attributeName);
+                /*
+                 * Retrieve in the hash table the event adapter associated to
+                 * the attributeName.
+                 */
+                if (attribute == null) {
+                    logger.debug("\033[1;31mThe attribute " + attributeName + " is null\033[0m");
+                }
+                adapter = evtAdaptHMap.get(attribute.getDevice());
+
+                if (adapter != null) {
+                    adapter.removeTangoArchiveListener(this, attribute.getNameSansDevice());
+                    archiveListenersCounter--;
+                    logger.debug("[\033[1;42mEVENTS\033[0m].");
+                    logger.debug(" (adapter: " + adapter.device_name() + ")");
+                    /* Should be ok now to return */
+                    // return;
+                }
+            } /* unlock event adapters map */
+        } catch (final ConnectionException e) /* getAttribute() failed */ {
+            logger.error("\033[1;31mConnection exception while retrieving the attribute from the AttributeFactory!\033[0m");
+        } catch (final DevFailed f) {
+            logger.error(DevFailedUtils.toString(f));
+        }
+    }
+
+    // --------------------------------------------------------------------------//
+    // ELETTRA : Archiving Events
+    // --------------------------------------------------------------------------//
+    @Override
+    public void stateChange(final AttributeStateEvent event) {
+    }
+
+    public void processEventScalar(final ScalarEvent scalarEvent, int try_number) {
+        if (isDataArchivableTimestampWise(scalarEvent)) {
+            final String attributeName = scalarEvent.getAttributeCompleteName();
+            try {
+                scalarEvent.avoidUnderFlow();
+
+                boolean doArchive = false;
+                if (isFirstValueList.get(attributeName.toLowerCase())) {
+                    doArchive = true;
+                    isFirstValueList.put(attributeName.toLowerCase(), false);
+                    logger.debug(attributeName + " first value, forcing archiving");
+                } else {
+                    final ModesCounters mc = getModeCounter(attributeName);
+                    if (mc == null) {
+                        logger.debug(attributeName + " Attribute Counters unknown ");
+                    } else {
+                        doArchive = doArchiveEvent(mc, scalarEvent.getDataType(), scalarEvent.getReadValue(),
+                                getLastValue(scalarEvent), attributeName);
+
+                    }
+                }
+
+                if (doArchive) {
+                    super.dbProxy.store(scalarEvent);
+                    setLastValue(scalarEvent, scalarEvent.getReadValue());
+                }
+            } catch (final Exception e) {
+                registerErrorMessage(attributeName, e.getMessage());
+                logger.error("error storing attribute {}, {}",attributeName, e.getMessage());
+                logger.error("Problem storing value", e);
+
+                try_number--;
+                if (try_number > 0) {
+                    logger.debug("NumberScalar.processEventScalar : retry " + try_number + "failed...");
+                    processEventScalar(scalarEvent, try_number);
+                }
+            }
+        }
+    }
+
+    protected abstract int getWritableValue();
+
+    @Override
+    protected void treatErrorEventAfterLogging(ErrorEvent errorEvent) {
+        /* Must be change because the number scalar are not only double */
+        try {
+            processEventScalar(
+                    getNullValueScalarEvent(errorEvent, ((AAttribute) errorEvent.getSource()).getTangoDataType(),
+                            getWritableValue()), DEFAULT_TRY_NUMBER);
+        } catch (final Exception e) {
+            logger.error(this.getClass().getSimpleName() + ".errorChange : during processEventScalar creation execp : "
+                    + e);
+        }
+    }
+}
diff --git a/src/main/java/HdbArchiver/Collector/scalar/NumberScalar_RO.java b/hdbarchiver/src/main/java/HdbArchiver/Collector/scalar/NumberScalar_RO.java
similarity index 95%
rename from src/main/java/HdbArchiver/Collector/scalar/NumberScalar_RO.java
rename to hdbarchiver/src/main/java/HdbArchiver/Collector/scalar/NumberScalar_RO.java
index 49b8c32311873cac10c09b1fe68abc86e7e9b9de..8830ae44a193b74a5ed76676daadaa99a8595ba1 100644
--- a/src/main/java/HdbArchiver/Collector/scalar/NumberScalar_RO.java
+++ b/hdbarchiver/src/main/java/HdbArchiver/Collector/scalar/NumberScalar_RO.java
@@ -1,268 +1,267 @@
-// +======================================================================
-// $Source: /cvsroot/tango-cs/tango/jserver/archiving/HdbArchiver/Collector/scalar/NumberScalar_RO.java,v $
-//
-// Project:      Tango Archiving Service
-//
-// Description:  Java source code for the class  NumberScalar_RO.
-//						(Chinkumo Jean) - Aug 30, 2005
-//
-// $Author: pierrejoseph $
-//
-// $Revision: 1.12 $
-//
-// $Log: NumberScalar_RO.java,v $
-// Revision 1.12  2007/10/03 15:23:29  pierrejoseph
-// Minor changes
-//
-// Revision 1.11  2007/09/28 14:49:23  pierrejoseph
-// Merged between Polling and Events code
-//
-// Revision 1.10  2007/06/11 12:21:04  pierrejoseph
-// errorEvent method is managed by the mother class
-//
-// Revision 1.9  2006/07/26 08:37:21  ounsy
-// try number no more static and reinitialized with change events (errorchange, numberscalarchange, etc...)
-//
-// Revision 1.8  2006/07/18 08:04:02  ounsy
-// moved the setAttribute_complete_name call in the try block
-//
-// Revision 1.7  2006/07/13 13:56:11  ounsy
-// added logging in case of errors during XXXValueChanged
-//
-// Revision 1.6  2006/05/03 14:29:18  ounsy
-// compatible with the AttributePolledList in "dispatch" mode
-//
-// Revision 1.5  2006/03/13 14:51:10  ounsy
-// Long as an int management
-//
-// Revision 1.4  2005/11/29 16:16:05  chinkumo
-// Code reformated (pogo compatible)
-//
-// Revision 1.3  2005/11/15 13:46:08  chinkumo
-// ...
-//
-// Revision 1.2  2005/09/26 08:01:20  chinkumo
-// Minor changes !
-//
-// Revision 1.1  2005/09/09 10:03:56  chinkumo
-// First commit !
-// (Dynamic attribut release)
-//
-//
-// copyleft :	Synchrotron SOLEIL
-//					L'Orme des Merisiers
-//					Saint-Aubin - BP 48
-//					91192 GIF-sur-YVETTE CEDEX
-//
-//-======================================================================
-
-package HdbArchiver.Collector.scalar;
-
-import org.slf4j.Logger;
-import org.tango.utils.DevFailedUtils;
-
-import HdbArchiver.Collector.HdbModeHandler;
-import fr.esrf.Tango.AttrDataFormat;
-import fr.esrf.Tango.AttrWriteType;
-import fr.esrf.Tango.DevFailed;
-import fr.esrf.TangoApi.DeviceAttribute;
-import fr.esrf.TangoApi.DeviceProxy;
-import fr.esrf.TangoApi.events.TangoArchive;
-import fr.esrf.TangoApi.events.TangoArchiveEvent;
-import fr.esrf.TangoDs.TangoConst;
-import fr.esrf.tangoatk.core.NumberScalarEvent;
-import fr.soleil.archiving.hdbtdb.api.tools.ScalarEvent;
-
-public class NumberScalar_RO extends NumberScalar {
-
-    private static final long serialVersionUID = 14755954266802717L;
-
-    public NumberScalar_RO(final HdbModeHandler modeHandler, final Logger logger) {
-        super(modeHandler, logger);
-    }
-
-    @Override
-    protected int getWritableValue() {
-        return AttrWriteType._READ;
-    }
-
-    @Override
-    public void numberScalarChange(final NumberScalarEvent event) {
-        final int tryNumber = DEFAULT_TRY_NUMBER;
-        final ScalarEvent scalarEvent = new ScalarEvent();
-
-        String attributeName = event.getNumberSource().getName();
-        try {
-            removeErrorMessage(attributeName);
-            scalarEvent.setAttributeCompleteName(attributeName);
-
-            scalarEvent.setDataFormat(AttrDataFormat._SCALAR);
-            scalarEvent.setWritable(getWritableValue());
-            scalarEvent.setDataType(event.getNumberSource().getAttribute().getType());
-
-            scalarEvent.setTimeStamp(event.getTimeStamp());
-            // --------------------------------------------------------------------------//
-            // ELETTRA : Archiving Events
-            // --------------------------------------------------------------------------//
-            /*
-             * scalarEvent.setValue(new Short((short) event.getValue() ));
-             * scalarEvent.setValue(new Integer((int) event.getValue() ));
-             * scalarEvent.setValue(new Double((double) event.getValue() ));
-             * scalarEvent.setValue(new Float((float) event.getValue() ));
-             */
-            // --------------------------------------------------------------------------//
-            // ELETTRA : Archiving Events
-            // --------------------------------------------------------------------------//
-            switch (scalarEvent.getDataType()) {
-                case TangoConst.Tango_DEV_SHORT:
-                case TangoConst.Tango_DEV_UCHAR:
-                    scalarEvent.setValue((short) event.getNumberSource().getNumberScalarValue(), null);
-                    break;
-                case TangoConst.Tango_DEV_USHORT:
-                    scalarEvent.setValue((short) event.getNumberSource().getNumberScalarValue(), null);
-                    break;
-                case TangoConst.Tango_DEV_LONG:
-                case TangoConst.Tango_DEV_ULONG:
-                    scalarEvent.setValue((int) event.getNumberSource().getNumberScalarValue(), null);
-                    break;
-                case TangoConst.Tango_DEV_LONG64:
-                case TangoConst.Tango_DEV_ULONG64:
-                    scalarEvent.setValue((long) event.getNumberSource().getNumberScalarValue(), null);
-                    break;
-                case TangoConst.Tango_DEV_FLOAT:
-                    scalarEvent.setValue((float) event.getNumberSource().getNumberScalarValue(), null);
-                    break;
-                case TangoConst.Tango_DEV_DOUBLE:
-                default:
-                    scalarEvent.setValue(event.getNumberSource().getNumberScalarValue(), null);
-                    break;
-            }
-            processEventScalar(scalarEvent, tryNumber);
-
-        } catch (final DevFailed devFailed) {
-            logger.error(DevFailedUtils.toString(devFailed));
-            registerErrorMessage(attributeName, devFailed);
-            scalarEvent.setValue(null, null);
-            processEventScalar(scalarEvent, tryNumber);
-        } catch (final Exception e) {
-            registerErrorMessage(attributeName, e);
-            scalarEvent.setValue(null, null);
-            processEventScalar(scalarEvent, tryNumber);
-            final String message = "Problem in NumberScalar_RO/numberScalarChange";
-            logger.error(message, e);
-        }
-
-    }
-
-    // --------------------------------------------------------------------------//
-    // ELETTRA : Archiving Events
-    // --------------------------------------------------------------------------//
-    /**
-     * @since events
-     * @author giacomo Implements the boolean scalar archive events for the read
-     *         only type
-     */
-    @Override
-    public void archive(final TangoArchiveEvent event) {
-        final int tryNumber = DEFAULT_TRY_NUMBER;
-        DeviceAttribute attrib = null;
-        TangoArchive arch;
-        DeviceProxy proxy;
-        boolean bvalue;
-        double dvalue;
-        float fvalue;
-        int ivalue;
-        short svalue;
-        final ScalarEvent scalarEvent = new ScalarEvent();
-
-        try {
-            attrib = event.getValue();
-        } catch (final DevFailed f) {
-            logger.error(DevFailedUtils.toString(f));
-            return;
-        } catch (final Exception e) /* Shouldn't be reached */
-        {
-            logger.error("error", e);
-            return;
-        }
-
-        try {
-            /*
-             * To correctly archive the attribute, we have to know its complete
-             * name. To acquire this information, we must o back to the
-             * TangoArchive object (which contains the DeviceProxy).
-             */
-            arch = (TangoArchive) event.getSource();
-            proxy = arch.getEventSupplier(); /*
-                                              * The device that supplied the
-                                              * event
-                                              */
-            if (arch == null || proxy == null || attrib == null) {
-                logger.debug("\033[1;31mNumberScalar_RO.java: event.getValue() or event.getSource() or event.getSource().getEventSupplier()) returned null!\033[0m");
-                return;
-            }
-
-            scalarEvent.setAttributeCompleteName(proxy.name() + "/" + attrib.getName());
-            scalarEvent.setTimeStamp(attrib.getTime());
-            scalarEvent.setDataFormat(AttrDataFormat._SCALAR);
-            scalarEvent.setWritable(AttrWriteType._READ);
-            scalarEvent.setDataType(attrib.getType());
-
-            logger.debug(proxy.name() + ": " + attrib.getName() + "{scalar, RO} [\033[1;32mEVENT\033[0m]: ");
-
-            switch (scalarEvent.getDataType()) {
-                case TangoConst.Tango_DEV_SHORT:
-                    svalue = attrib.extractShort();
-                    scalarEvent.setValue(svalue, null);
-                    logger.debug("short: " + svalue);
-                    break;
-                case TangoConst.Tango_DEV_USHORT:
-                    ivalue = attrib.extractUShort();
-                    scalarEvent.setValue(ivalue, null);
-                    logger.debug("unsigned short: " + ivalue);
-                    break;
-                case TangoConst.Tango_DEV_LONG:
-                    ivalue = attrib.extractLong();
-                    scalarEvent.setValue(ivalue, null);
-                    logger.debug("long: " + ivalue);
-                    break;
-                case TangoConst.Tango_DEV_ULONG:
-                    ivalue = attrib.extractLong();
-                    scalarEvent.setValue(ivalue, null);
-                    logger.debug("unsigned long: " + ivalue);
-                    break;
-
-                case TangoConst.Tango_DEV_FLOAT:
-                    fvalue = attrib.extractFloat();
-                    scalarEvent.setValue(fvalue, null);
-                    logger.debug("float: " + fvalue);
-                    break;
-                case TangoConst.Tango_DEV_BOOLEAN:
-                    bvalue = attrib.extractBoolean();
-                    scalarEvent.setValue(bvalue, null);
-                    logger.debug("boolean here? :o ");
-                    break;
-                /* The default case, double */
-                case TangoConst.Tango_DEV_DOUBLE:
-                default:
-                    dvalue = attrib.extractDouble();
-                    scalarEvent.setValue(dvalue, null);
-                    logger.debug("double: " + dvalue);
-                    break;
-            }
-            processEventScalar(scalarEvent, tryNumber);
-        } catch (final DevFailed devFailed) {
-            logger.error(DevFailedUtils.toString(devFailed));
-            scalarEvent.setValue(null, null);
-            processEventScalar(scalarEvent, tryNumber);
-        } catch (final Exception e) {
-            logger.error("error", e);
-            scalarEvent.setValue(null, null);
-            processEventScalar(scalarEvent, tryNumber);
-        }
-
-    }
-    // --------------------------------------------------------------------------//
-    // ELETTRA : Archiving Events
-    // --------------------------------------------------------------------------//
-}
+// +======================================================================
+// $Source: /cvsroot/tango-cs/tango/jserver/archiving/HdbArchiver/Collector/scalar/NumberScalar_RO.java,v $
+//
+// Project:      Tango Archiving Service
+//
+// Description:  Java source code for the class  NumberScalar_RO.
+//						(Chinkumo Jean) - Aug 30, 2005
+//
+// $Author: pierrejoseph $
+//
+// $Revision: 1.12 $
+//
+// $Log: NumberScalar_RO.java,v $
+// Revision 1.12  2007/10/03 15:23:29  pierrejoseph
+// Minor changes
+//
+// Revision 1.11  2007/09/28 14:49:23  pierrejoseph
+// Merged between Polling and Events code
+//
+// Revision 1.10  2007/06/11 12:21:04  pierrejoseph
+// errorEvent method is managed by the mother class
+//
+// Revision 1.9  2006/07/26 08:37:21  ounsy
+// try number no more static and reinitialized with change events (errorchange, numberscalarchange, etc...)
+//
+// Revision 1.8  2006/07/18 08:04:02  ounsy
+// moved the setAttribute_complete_name call in the try block
+//
+// Revision 1.7  2006/07/13 13:56:11  ounsy
+// added logging in case of errors during XXXValueChanged
+//
+// Revision 1.6  2006/05/03 14:29:18  ounsy
+// compatible with the AttributePolledList in "dispatch" mode
+//
+// Revision 1.5  2006/03/13 14:51:10  ounsy
+// Long as an int management
+//
+// Revision 1.4  2005/11/29 16:16:05  chinkumo
+// Code reformated (pogo compatible)
+//
+// Revision 1.3  2005/11/15 13:46:08  chinkumo
+// ...
+//
+// Revision 1.2  2005/09/26 08:01:20  chinkumo
+// Minor changes !
+//
+// Revision 1.1  2005/09/09 10:03:56  chinkumo
+// First commit !
+// (Dynamic attribut release)
+//
+//
+// copyleft :	Synchrotron SOLEIL
+//					L'Orme des Merisiers
+//					Saint-Aubin - BP 48
+//					91192 GIF-sur-YVETTE CEDEX
+//
+//-======================================================================
+
+package HdbArchiver.Collector.scalar;
+
+import HdbArchiver.Collector.HdbModeHandler;
+import fr.esrf.Tango.AttrDataFormat;
+import fr.esrf.Tango.AttrWriteType;
+import fr.esrf.Tango.DevFailed;
+import fr.esrf.TangoApi.DeviceAttribute;
+import fr.esrf.TangoApi.DeviceProxy;
+import fr.esrf.TangoApi.events.TangoArchive;
+import fr.esrf.TangoApi.events.TangoArchiveEvent;
+import fr.esrf.TangoDs.TangoConst;
+import fr.esrf.tangoatk.core.NumberScalarEvent;
+import fr.soleil.archiving.hdbtdb.api.tools.ScalarEvent;
+import org.slf4j.Logger;
+import org.tango.utils.DevFailedUtils;
+
+public class NumberScalar_RO extends NumberScalar {
+
+    private static final long serialVersionUID = 14755954266802717L;
+
+    public NumberScalar_RO(final HdbModeHandler modeHandler, boolean useEvents, final Logger logger) {
+        super(modeHandler, useEvents, logger);
+    }
+
+    @Override
+    protected int getWritableValue() {
+        return AttrWriteType._READ;
+    }
+
+    @Override
+    public void numberScalarChange(final NumberScalarEvent event) {
+        final int tryNumber = DEFAULT_TRY_NUMBER;
+        final ScalarEvent scalarEvent = new ScalarEvent();
+
+        String attributeName = event.getNumberSource().getName();
+        try {
+            removeErrorMessage(attributeName);
+            scalarEvent.setAttributeCompleteName(attributeName);
+
+            scalarEvent.setDataFormat(AttrDataFormat._SCALAR);
+            scalarEvent.setWritable(getWritableValue());
+            scalarEvent.setDataType(event.getNumberSource().getAttribute().getType());
+
+            scalarEvent.setTimeStamp(event.getTimeStamp());
+            // --------------------------------------------------------------------------//
+            // ELETTRA : Archiving Events
+            // --------------------------------------------------------------------------//
+            /*
+             * scalarEvent.setValue(new Short((short) event.getValue() ));
+             * scalarEvent.setValue(new Integer((int) event.getValue() ));
+             * scalarEvent.setValue(new Double((double) event.getValue() ));
+             * scalarEvent.setValue(new Float((float) event.getValue() ));
+             */
+            // --------------------------------------------------------------------------//
+            // ELETTRA : Archiving Events
+            // --------------------------------------------------------------------------//
+            switch (scalarEvent.getDataType()) {
+                case TangoConst.Tango_DEV_SHORT:
+                case TangoConst.Tango_DEV_UCHAR:
+                    scalarEvent.setValue((short) event.getNumberSource().getNumberScalarValue(), null);
+                    break;
+                case TangoConst.Tango_DEV_USHORT:
+                    scalarEvent.setValue((short) event.getNumberSource().getNumberScalarValue(), null);
+                    break;
+                case TangoConst.Tango_DEV_LONG:
+                case TangoConst.Tango_DEV_ULONG:
+                    scalarEvent.setValue((int) event.getNumberSource().getNumberScalarValue(), null);
+                    break;
+                case TangoConst.Tango_DEV_LONG64:
+                case TangoConst.Tango_DEV_ULONG64:
+                    scalarEvent.setValue((long) event.getNumberSource().getNumberScalarValue(), null);
+                    break;
+                case TangoConst.Tango_DEV_FLOAT:
+                    scalarEvent.setValue((float) event.getNumberSource().getNumberScalarValue(), null);
+                    break;
+                case TangoConst.Tango_DEV_DOUBLE:
+                default:
+                    scalarEvent.setValue(event.getNumberSource().getNumberScalarValue(), null);
+                    break;
+            }
+            processEventScalar(scalarEvent, tryNumber);
+
+        } catch (final DevFailed devFailed) {
+            logger.error(DevFailedUtils.toString(devFailed));
+            registerErrorMessage(attributeName, devFailed);
+            scalarEvent.setValue(null, null);
+            processEventScalar(scalarEvent, tryNumber);
+        } catch (final Exception e) {
+            registerErrorMessage(attributeName, e);
+            scalarEvent.setValue(null, null);
+            processEventScalar(scalarEvent, tryNumber);
+            final String message = "Problem in NumberScalar_RO/numberScalarChange";
+            logger.error(message, e);
+        }
+
+    }
+
+    // --------------------------------------------------------------------------//
+    // ELETTRA : Archiving Events
+    // --------------------------------------------------------------------------//
+
+    /**
+     * @author giacomo Implements the boolean scalar archive events for the read
+     * only type
+     * @since events
+     */
+    @Override
+    public void archive(final TangoArchiveEvent event) {
+        final int tryNumber = DEFAULT_TRY_NUMBER;
+        DeviceAttribute attrib = null;
+        TangoArchive arch;
+        DeviceProxy proxy;
+        boolean bvalue;
+        double dvalue;
+        float fvalue;
+        int ivalue;
+        short svalue;
+        final ScalarEvent scalarEvent = new ScalarEvent();
+
+        try {
+            attrib = event.getValue();
+        } catch (final DevFailed f) {
+            logger.error(DevFailedUtils.toString(f));
+            return;
+        } catch (final Exception e) /* Shouldn't be reached */ {
+            logger.error("error", e);
+            return;
+        }
+
+        try {
+            /*
+             * To correctly archive the attribute, we have to know its complete
+             * name. To acquire this information, we must o back to the
+             * TangoArchive object (which contains the DeviceProxy).
+             */
+            arch = (TangoArchive) event.getSource();
+            proxy = arch.getEventSupplier(); /*
+                                              * The device that supplied the
+                                              * event
+                                              */
+            if (arch == null || proxy == null || attrib == null) {
+                logger.debug("\033[1;31mNumberScalar_RO.java: event.getValue() or event.getSource() or event.getSource().getEventSupplier()) returned null!\033[0m");
+                return;
+            }
+
+            scalarEvent.setAttributeCompleteName(proxy.name() + "/" + attrib.getName());
+            scalarEvent.setTimeStamp(attrib.getTime());
+            scalarEvent.setDataFormat(AttrDataFormat._SCALAR);
+            scalarEvent.setWritable(AttrWriteType._READ);
+            scalarEvent.setDataType(attrib.getType());
+
+            logger.debug(proxy.name() + ": " + attrib.getName() + "{scalar, RO} [\033[1;32mEVENT\033[0m]: ");
+
+            switch (scalarEvent.getDataType()) {
+                case TangoConst.Tango_DEV_SHORT:
+                    svalue = attrib.extractShort();
+                    scalarEvent.setValue(svalue, null);
+                    logger.debug("short: " + svalue);
+                    break;
+                case TangoConst.Tango_DEV_USHORT:
+                    ivalue = attrib.extractUShort();
+                    scalarEvent.setValue(ivalue, null);
+                    logger.debug("unsigned short: " + ivalue);
+                    break;
+                case TangoConst.Tango_DEV_LONG:
+                    ivalue = attrib.extractLong();
+                    scalarEvent.setValue(ivalue, null);
+                    logger.debug("long: " + ivalue);
+                    break;
+                case TangoConst.Tango_DEV_ULONG:
+                    ivalue = attrib.extractLong();
+                    scalarEvent.setValue(ivalue, null);
+                    logger.debug("unsigned long: " + ivalue);
+                    break;
+
+                case TangoConst.Tango_DEV_FLOAT:
+                    fvalue = attrib.extractFloat();
+                    scalarEvent.setValue(fvalue, null);
+                    logger.debug("float: " + fvalue);
+                    break;
+                case TangoConst.Tango_DEV_BOOLEAN:
+                    bvalue = attrib.extractBoolean();
+                    scalarEvent.setValue(bvalue, null);
+                    logger.debug("boolean here? :o ");
+                    break;
+                /* The default case, double */
+                case TangoConst.Tango_DEV_DOUBLE:
+                default:
+                    dvalue = attrib.extractDouble();
+                    scalarEvent.setValue(dvalue, null);
+                    logger.debug("double: " + dvalue);
+                    break;
+            }
+            processEventScalar(scalarEvent, tryNumber);
+        } catch (final DevFailed devFailed) {
+            logger.error(DevFailedUtils.toString(devFailed));
+            scalarEvent.setValue(null, null);
+            processEventScalar(scalarEvent, tryNumber);
+        } catch (final Exception e) {
+            logger.error("error", e);
+            scalarEvent.setValue(null, null);
+            processEventScalar(scalarEvent, tryNumber);
+        }
+
+    }
+    // --------------------------------------------------------------------------//
+    // ELETTRA : Archiving Events
+    // --------------------------------------------------------------------------//
+}
diff --git a/src/main/java/HdbArchiver/Collector/scalar/NumberScalar_RW.java b/hdbarchiver/src/main/java/HdbArchiver/Collector/scalar/NumberScalar_RW.java
similarity index 94%
rename from src/main/java/HdbArchiver/Collector/scalar/NumberScalar_RW.java
rename to hdbarchiver/src/main/java/HdbArchiver/Collector/scalar/NumberScalar_RW.java
index 5ff170667f0aa303e1adb1a56f4dfec12815d80f..4616ef22527bea564ab3ec2814160097b5206b58 100644
--- a/src/main/java/HdbArchiver/Collector/scalar/NumberScalar_RW.java
+++ b/hdbarchiver/src/main/java/HdbArchiver/Collector/scalar/NumberScalar_RW.java
@@ -1,319 +1,318 @@
-// +======================================================================
-// $Source: /cvsroot/tango-cs/tango/jserver/archiving/HdbArchiver/Collector/scalar/NumberScalar_RW.java,v $
-//
-// Project:      Tango Archiving Service
-//
-// Description:  Java source code for the class  NumberScalar_RW.
-//						(Chinkumo Jean) - Aug 30, 2005
-//
-// $Author: pierrejoseph $
-//
-// $Revision: 1.13 $
-//
-// $Log: NumberScalar_RW.java,v $
-// Revision 1.13  2007/10/03 15:23:29  pierrejoseph
-// Minor changes
-//
-// Revision 1.12  2007/09/28 14:49:23  pierrejoseph
-// Merged between Polling and Events code
-//
-// Revision 1.11  2007/06/11 12:21:04  pierrejoseph
-// errorEvent method is managed by the mother class
-//
-// Revision 1.10  2006/10/31 16:54:12  ounsy
-// milliseconds and null values management
-//
-// Revision 1.9  2006/07/26 08:37:21  ounsy
-// try number no more static and reinitialized with change events (errorchange, numberscalarchange, etc...)
-//
-// Revision 1.8  2006/07/21 14:43:08  ounsy
-// minor changes
-//
-// Revision 1.7  2006/07/18 08:04:02  ounsy
-// moved the setAttribute_complete_name call in the try block
-//
-// Revision 1.6  2006/07/13 13:56:11  ounsy
-// added logging in case of errors during XXXValueChanged
-//
-// Revision 1.5  2006/05/03 14:29:18  ounsy
-// compatible with the AttributePolledList in "dispatch" mode
-//
-// Revision 1.4  2006/03/13 14:51:10  ounsy
-// Long as an int management
-//
-// Revision 1.3  2005/11/29 16:16:05  chinkumo
-// Code reformated (pogo compatible)
-//
-// Revision 1.2  2005/11/15 13:46:08  chinkumo
-// ...
-//
-// Revision 1.1  2005/09/09 10:03:56  chinkumo
-// First commit !
-// (Dynamic attribut release)
-//
-//
-// copyleft :	Synchrotron SOLEIL
-//					L'Orme des Merisiers
-//					Saint-Aubin - BP 48
-//					91192 GIF-sur-YVETTE CEDEX
-//
-//-======================================================================
-
-package HdbArchiver.Collector.scalar;
-
-import org.slf4j.Logger;
-import org.tango.utils.DevFailedUtils;
-
-import HdbArchiver.Collector.HdbModeHandler;
-import fr.esrf.Tango.AttrDataFormat;
-import fr.esrf.Tango.AttrWriteType;
-import fr.esrf.Tango.DevFailed;
-import fr.esrf.TangoApi.DeviceAttribute;
-import fr.esrf.TangoApi.DeviceProxy;
-import fr.esrf.TangoApi.events.TangoArchive;
-import fr.esrf.TangoApi.events.TangoArchiveEvent;
-import fr.esrf.TangoDs.TangoConst;
-import fr.esrf.tangoatk.core.NumberScalarEvent;
-import fr.soleil.archiving.hdbtdb.api.tools.ScalarEvent;
-
-//--------------------------------------------------------------------------//
-//ELETTRA : Archiving Events
-//--------------------------------------------------------------------------//
-public class NumberScalar_RW extends NumberScalar {
-
-    private static final long serialVersionUID = -4951883718056213613L;
-
-    public NumberScalar_RW(final HdbModeHandler modeHandler, final Logger logger) {
-        super(modeHandler, logger);
-    }
-
-    @Override
-    protected int getWritableValue() {
-        return AttrWriteType._READ_WRITE;
-    }
-
-    @Override
-    public void numberScalarChange(final NumberScalarEvent event) {
-        final int tryNumber = DEFAULT_TRY_NUMBER;
-        final ScalarEvent scalarEvent = new ScalarEvent();
-        String attributeName = event.getNumberSource().getName();
-        try {
-            removeErrorMessage(attributeName);
-            scalarEvent.setAttributeCompleteName(attributeName);
-
-            scalarEvent.setTimeStamp(event.getTimeStamp());
-            /*
-             * long fixed = 1153484775366L; long l; double seuil= 0.7; if (
-             * Math.random () < seuil ) { System.out.println (
-             * "NumberScalar_RW/numberScalarChange/fixed/"+new Timestamp (fixed)
-             * ); l =fixed; } else { l =event.getTimeStamp(); }
-             * scalarEvent.setTimeStamp( l );
-             */
-
-            scalarEvent.setDataFormat(AttrDataFormat._SCALAR);
-            scalarEvent.setWritable(getWritableValue());
-            scalarEvent.setDataType(event.getNumberSource().getAttribute().getType());
-            // --------------------------------------------------------------------------//
-            // ELETTRA : Archiving Events
-            // --------------------------------------------------------------------------//
-            /*
-             * svalue[0] = new Short((short)event.getValue()); ivalue[0] = new
-             * Integer((int)event.getValue()); dvalue[0] = new
-             * Double(event.getValue()); fvalue[0] = new
-             * Float((float)event.getValue());
-             */
-            // --------------------------------------------------------------------------//
-            // ELETTRA : Archiving Events
-            // --------------------------------------------------------------------------//
-            switch (scalarEvent.getDataType()) {
-                case TangoConst.Tango_DEV_SHORT:
-                case TangoConst.Tango_DEV_USHORT:
-                case TangoConst.Tango_DEV_UCHAR:
-                    final short[] svalue = new short[2];
-                    svalue[0] = (short) event.getNumberSource().getNumberScalarValue();
-                    svalue[1] = (short) event.getNumberSource().getNumberScalarSetPoint();
-                    scalarEvent.setValue(svalue, null);
-                    break;
-                case TangoConst.Tango_DEV_LONG:
-                case TangoConst.Tango_DEV_ULONG:
-                    final int[] ivalue = new int[2];
-                    ivalue[0] = (int) event.getNumberSource().getNumberScalarValue();
-                    ivalue[1] = (int) event.getNumberSource().getNumberScalarSetPoint();
-                    scalarEvent.setValue(ivalue, null);
-                    break;
-                case TangoConst.Tango_DEV_LONG64:
-                case TangoConst.Tango_DEV_ULONG64:
-                    final long[] value = new long[2];
-                    value[0] = (long) event.getNumberSource().getNumberScalarValue();
-                    value[1] = (long) event.getNumberSource().getNumberScalarSetPoint();
-                    scalarEvent.setValue(value, null);
-                    break;
-                case TangoConst.Tango_DEV_FLOAT:
-                    final float[] fvalue = new float[2];
-                    fvalue[0] = (float) event.getNumberSource().getNumberScalarValue();
-                    fvalue[1] = (float) event.getNumberSource().getNumberScalarSetPoint();
-                    scalarEvent.setValue(fvalue, null);
-                    break;
-                case TangoConst.Tango_DEV_DOUBLE:
-                default:
-                    final double[] dvalue = new double[2];
-                    dvalue[0] = event.getNumberSource().getNumberScalarValue();
-                    dvalue[1] = event.getNumberSource().getNumberScalarSetPoint();
-                    scalarEvent.setValue(dvalue, null);
-                    break;
-            }
-            processEventScalar(scalarEvent, tryNumber);
-
-        } catch (final DevFailed devFailed) {
-            registerErrorMessage(attributeName, devFailed);
-            logger.error(DevFailedUtils.toString(devFailed));
-            final Object value = null;
-            scalarEvent.setValue(value, null);
-            processEventScalar(scalarEvent, tryNumber);
-        } catch (final Exception e) {
-            registerErrorMessage(attributeName, e);
-            final Object value = null;
-            scalarEvent.setValue(value, null);
-            processEventScalar(scalarEvent, tryNumber);
-
-            final String message = "Problem in NumberScalar_RW/numberScalarChange";
-            logger.error(message, e);
-        }
-
-    }
-
-    // --------------------------------------------------------------------------//
-    // ELETTRA : Archiving Events Begin
-    // --------------------------------------------------------------------------//
-    /**
-     * @since events
-     * @author giacomo Implements the boolean scalar archive events for the read
-     *         only type
-     */
-    @Override
-    public void archive(final TangoArchiveEvent event) {
-        final int tryNumber = DEFAULT_TRY_NUMBER;
-        DeviceAttribute attrib = null;
-        TangoArchive arch;
-        DeviceProxy proxy;
-        final boolean[] bvalue = { false, false };
-        final double[] dvalue = { 0.0, 0.0 };
-        final float[] fvalue = { 0, 0 };
-        final int[] ivalue = { 0, 0 };
-        final short[] svalue = { 0, 0 };
-        final ScalarEvent scalarEvent = new ScalarEvent();
-
-        try {
-            attrib = event.getValue();
-        } catch (final DevFailed f) {
-            logger.error(DevFailedUtils.toString(f));
-            return;
-        } catch (final Exception e) /* Shouldn't be reached */
-        {
-            logger.error("error", e);
-            return;
-        }
-
-        try {
-            /*
-             * To correctly archive the attribute, we have to know its complete
-             * name. To acquire this information, we must o back to the
-             * TangoArchive object (which contains the DeviceProxy).
-             */
-            arch = (TangoArchive) event.getSource();
-
-            proxy = arch.getEventSupplier(); /*
-                                              * The device that supplied the
-                                              * event
-                                              */
-            if (arch == null || proxy == null || attrib == null) {
-                logger.debug("\033[1;31mNumberScalar_RW.java: event.getValue() or event.getSource() or event.getSource().getEventSupplier()) returned null!\033[0m");
-                return;
-            }
-
-            logger.debug(proxy.name() + ": " + attrib.getName() + "{scalar, RW} [\033[1;32mEVENT\033[0m]: ");
-
-            scalarEvent.setAttributeCompleteName(proxy.name() + "/" + attrib.getName());
-            scalarEvent.setTimeStamp(attrib.getTime());
-            scalarEvent.setDataFormat(AttrDataFormat._SCALAR);
-            scalarEvent.setWritable(AttrWriteType._READ_WRITE);
-            scalarEvent.setDataType(attrib.getType());
-
-            switch (scalarEvent.getDataType()) {
-                case TangoConst.Tango_DEV_SHORT:
-                    final short[] shvalue = attrib.extractShortArray();
-                    svalue[0] = shvalue[0];
-                    svalue[1] = shvalue[1];
-                    scalarEvent.setValue(svalue, null);
-                    logger.debug("short (R): " + svalue[0] + " (W): " + svalue[1]);
-                    break;
-                case TangoConst.Tango_DEV_USHORT:
-                    /*
-                     * extractUShortArray() returns an int[]. Then it cannot be
-                     * casted to Short[]. If we do this, a cast exception is thrown.
-                     * We probably could convert int to short and then short to
-                     * Short... But anyway we lose the `unsigned' information
-                     */
-                    final short ushvalue[] = attrib.extractShortArray();
-                    svalue[0] = ushvalue[0];
-                    svalue[1] = ushvalue[1];
-                    scalarEvent.setValue(svalue, null);
-                    logger.debug("unsigned short (R): " + svalue[0] + " (W): " + svalue[1]);
-                    break;
-                case TangoConst.Tango_DEV_LONG:
-                    final int[] intvalue = attrib.extractLongArray();
-                    ivalue[0] = intvalue[0];
-                    ivalue[1] = intvalue[1];
-                    scalarEvent.setValue(ivalue, null);
-                    logger.debug("long (R): " + ivalue[0] + " (W): " + ivalue[1]);
-                    break;
-                case TangoConst.Tango_DEV_ULONG:
-                    final int[] intulongvalue = attrib.extractLongArray();
-                    ivalue[0] = intulongvalue[0];
-                    ivalue[1] = intulongvalue[1];
-                    scalarEvent.setValue(ivalue, null);
-                    logger.debug("unsigned long (R): " + ivalue[0] + " (W): " + ivalue[1]);
-                    break;
-
-                case TangoConst.Tango_DEV_FLOAT:
-                    final float[] fval = attrib.extractFloatArray();
-                    fvalue[0] = fval[0];
-                    fvalue[1] = fval[1];
-                    scalarEvent.setValue(fvalue, null);
-                    logger.debug("float (R): " + fvalue[0] + " (W): " + fvalue[1]);
-                    break;
-                case TangoConst.Tango_DEV_BOOLEAN:
-                    final boolean[] bovalue = attrib.extractBooleanArray();
-                    bvalue[0] = bovalue[0];
-                    bvalue[1] = bovalue[1];
-                    scalarEvent.setValue(bvalue, null);
-                    logger.debug("boolean (Here?!?! :o ) (R): " + bvalue[0] + " (W): " + bvalue[1]);
-                    break;
-
-                case TangoConst.Tango_DEV_DOUBLE:
-                default:
-                    final double dovalue[] = attrib.extractDoubleArray();
-                    dvalue[0] = dovalue[0];
-                    dvalue[1] = dovalue[1];
-                    scalarEvent.setValue(dvalue, null);
-                    logger.debug("double (R): " + dvalue[0] + " (W): " + dvalue[1]);
-                    break;
-            }
-            processEventScalar(scalarEvent, tryNumber);
-
-        } catch (final DevFailed devFailed) {
-            logger.error(DevFailedUtils.toString(devFailed));
-            scalarEvent.setValue(null, null);
-            processEventScalar(scalarEvent, tryNumber);
-        } catch (final Exception exE) {
-            logger.error("error", exE);
-            final Object value = null;
-            scalarEvent.setValue(value, null);
-            processEventScalar(scalarEvent, tryNumber);
-        }
-
-    }
-    // --------------------------------------------------------------------------//
-    // ELETTRA : Archiving Events End
-    // --------------------------------------------------------------------------//
-}
+// +======================================================================
+// $Source: /cvsroot/tango-cs/tango/jserver/archiving/HdbArchiver/Collector/scalar/NumberScalar_RW.java,v $
+//
+// Project:      Tango Archiving Service
+//
+// Description:  Java source code for the class  NumberScalar_RW.
+//						(Chinkumo Jean) - Aug 30, 2005
+//
+// $Author: pierrejoseph $
+//
+// $Revision: 1.13 $
+//
+// $Log: NumberScalar_RW.java,v $
+// Revision 1.13  2007/10/03 15:23:29  pierrejoseph
+// Minor changes
+//
+// Revision 1.12  2007/09/28 14:49:23  pierrejoseph
+// Merged between Polling and Events code
+//
+// Revision 1.11  2007/06/11 12:21:04  pierrejoseph
+// errorEvent method is managed by the mother class
+//
+// Revision 1.10  2006/10/31 16:54:12  ounsy
+// milliseconds and null values management
+//
+// Revision 1.9  2006/07/26 08:37:21  ounsy
+// try number no more static and reinitialized with change events (errorchange, numberscalarchange, etc...)
+//
+// Revision 1.8  2006/07/21 14:43:08  ounsy
+// minor changes
+//
+// Revision 1.7  2006/07/18 08:04:02  ounsy
+// moved the setAttribute_complete_name call in the try block
+//
+// Revision 1.6  2006/07/13 13:56:11  ounsy
+// added logging in case of errors during XXXValueChanged
+//
+// Revision 1.5  2006/05/03 14:29:18  ounsy
+// compatible with the AttributePolledList in "dispatch" mode
+//
+// Revision 1.4  2006/03/13 14:51:10  ounsy
+// Long as an int management
+//
+// Revision 1.3  2005/11/29 16:16:05  chinkumo
+// Code reformated (pogo compatible)
+//
+// Revision 1.2  2005/11/15 13:46:08  chinkumo
+// ...
+//
+// Revision 1.1  2005/09/09 10:03:56  chinkumo
+// First commit !
+// (Dynamic attribut release)
+//
+//
+// copyleft :	Synchrotron SOLEIL
+//					L'Orme des Merisiers
+//					Saint-Aubin - BP 48
+//					91192 GIF-sur-YVETTE CEDEX
+//
+//-======================================================================
+
+package HdbArchiver.Collector.scalar;
+
+import HdbArchiver.Collector.HdbModeHandler;
+import fr.esrf.Tango.AttrDataFormat;
+import fr.esrf.Tango.AttrWriteType;
+import fr.esrf.Tango.DevFailed;
+import fr.esrf.TangoApi.DeviceAttribute;
+import fr.esrf.TangoApi.DeviceProxy;
+import fr.esrf.TangoApi.events.TangoArchive;
+import fr.esrf.TangoApi.events.TangoArchiveEvent;
+import fr.esrf.TangoDs.TangoConst;
+import fr.esrf.tangoatk.core.NumberScalarEvent;
+import fr.soleil.archiving.hdbtdb.api.tools.ScalarEvent;
+import org.slf4j.Logger;
+import org.tango.utils.DevFailedUtils;
+
+//--------------------------------------------------------------------------//
+//ELETTRA : Archiving Events
+//--------------------------------------------------------------------------//
+public class NumberScalar_RW extends NumberScalar {
+
+    private static final long serialVersionUID = -4951883718056213613L;
+
+    public NumberScalar_RW(final HdbModeHandler modeHandler, boolean useEvents, final Logger logger) {
+        super(modeHandler, useEvents, logger);
+    }
+
+    @Override
+    protected int getWritableValue() {
+        return AttrWriteType._READ_WRITE;
+    }
+
+    @Override
+    public void numberScalarChange(final NumberScalarEvent event) {
+        final int tryNumber = DEFAULT_TRY_NUMBER;
+        final ScalarEvent scalarEvent = new ScalarEvent();
+        String attributeName = event.getNumberSource().getName();
+        try {
+            removeErrorMessage(attributeName);
+            scalarEvent.setAttributeCompleteName(attributeName);
+
+            scalarEvent.setTimeStamp(event.getTimeStamp());
+            /*
+             * long fixed = 1153484775366L; long l; double seuil= 0.7; if (
+             * Math.random () < seuil ) { System.out.println (
+             * "NumberScalar_RW/numberScalarChange/fixed/"+new Timestamp (fixed)
+             * ); l =fixed; } else { l =event.getTimeStamp(); }
+             * scalarEvent.setTimeStamp( l );
+             */
+
+            scalarEvent.setDataFormat(AttrDataFormat._SCALAR);
+            scalarEvent.setWritable(getWritableValue());
+            scalarEvent.setDataType(event.getNumberSource().getAttribute().getType());
+            // --------------------------------------------------------------------------//
+            // ELETTRA : Archiving Events
+            // --------------------------------------------------------------------------//
+            /*
+             * svalue[0] = new Short((short)event.getValue()); ivalue[0] = new
+             * Integer((int)event.getValue()); dvalue[0] = new
+             * Double(event.getValue()); fvalue[0] = new
+             * Float((float)event.getValue());
+             */
+            // --------------------------------------------------------------------------//
+            // ELETTRA : Archiving Events
+            // --------------------------------------------------------------------------//
+            switch (scalarEvent.getDataType()) {
+                case TangoConst.Tango_DEV_SHORT:
+                case TangoConst.Tango_DEV_USHORT:
+                case TangoConst.Tango_DEV_UCHAR:
+                    final short[] svalue = new short[2];
+                    svalue[0] = (short) event.getNumberSource().getNumberScalarValue();
+                    svalue[1] = (short) event.getNumberSource().getNumberScalarSetPoint();
+                    scalarEvent.setValue(svalue, null);
+                    break;
+                case TangoConst.Tango_DEV_LONG:
+                case TangoConst.Tango_DEV_ULONG:
+                    final int[] ivalue = new int[2];
+                    ivalue[0] = (int) event.getNumberSource().getNumberScalarValue();
+                    ivalue[1] = (int) event.getNumberSource().getNumberScalarSetPoint();
+                    scalarEvent.setValue(ivalue, null);
+                    break;
+                case TangoConst.Tango_DEV_LONG64:
+                case TangoConst.Tango_DEV_ULONG64:
+                    final long[] value = new long[2];
+                    value[0] = (long) event.getNumberSource().getNumberScalarValue();
+                    value[1] = (long) event.getNumberSource().getNumberScalarSetPoint();
+                    scalarEvent.setValue(value, null);
+                    break;
+                case TangoConst.Tango_DEV_FLOAT:
+                    final float[] fvalue = new float[2];
+                    fvalue[0] = (float) event.getNumberSource().getNumberScalarValue();
+                    fvalue[1] = (float) event.getNumberSource().getNumberScalarSetPoint();
+                    scalarEvent.setValue(fvalue, null);
+                    break;
+                case TangoConst.Tango_DEV_DOUBLE:
+                default:
+                    final double[] dvalue = new double[2];
+                    dvalue[0] = event.getNumberSource().getNumberScalarValue();
+                    dvalue[1] = event.getNumberSource().getNumberScalarSetPoint();
+                    scalarEvent.setValue(dvalue, null);
+                    break;
+            }
+            processEventScalar(scalarEvent, tryNumber);
+
+        } catch (final DevFailed devFailed) {
+            registerErrorMessage(attributeName, devFailed);
+            logger.error(DevFailedUtils.toString(devFailed));
+            final Object value = null;
+            scalarEvent.setValue(value, null);
+            processEventScalar(scalarEvent, tryNumber);
+        } catch (final Exception e) {
+            registerErrorMessage(attributeName, e);
+            final Object value = null;
+            scalarEvent.setValue(value, null);
+            processEventScalar(scalarEvent, tryNumber);
+
+            final String message = "Problem in NumberScalar_RW/numberScalarChange";
+            logger.error(message, e);
+        }
+
+    }
+
+    // --------------------------------------------------------------------------//
+    // ELETTRA : Archiving Events Begin
+    // --------------------------------------------------------------------------//
+
+    /**
+     * @author giacomo Implements the boolean scalar archive events for the read
+     * only type
+     * @since events
+     */
+    @Override
+    public void archive(final TangoArchiveEvent event) {
+        final int tryNumber = DEFAULT_TRY_NUMBER;
+        DeviceAttribute attrib = null;
+        TangoArchive arch;
+        DeviceProxy proxy;
+        final boolean[] bvalue = {false, false};
+        final double[] dvalue = {0.0, 0.0};
+        final float[] fvalue = {0, 0};
+        final int[] ivalue = {0, 0};
+        final short[] svalue = {0, 0};
+        final ScalarEvent scalarEvent = new ScalarEvent();
+
+        try {
+            attrib = event.getValue();
+        } catch (final DevFailed f) {
+            logger.error(DevFailedUtils.toString(f));
+            return;
+        } catch (final Exception e) /* Shouldn't be reached */ {
+            logger.error("error", e);
+            return;
+        }
+
+        try {
+            /*
+             * To correctly archive the attribute, we have to know its complete
+             * name. To acquire this information, we must o back to the
+             * TangoArchive object (which contains the DeviceProxy).
+             */
+            arch = (TangoArchive) event.getSource();
+
+            proxy = arch.getEventSupplier(); /*
+                                              * The device that supplied the
+                                              * event
+                                              */
+            if (arch == null || proxy == null || attrib == null) {
+                logger.debug("\033[1;31mNumberScalar_RW.java: event.getValue() or event.getSource() or event.getSource().getEventSupplier()) returned null!\033[0m");
+                return;
+            }
+
+            logger.debug(proxy.name() + ": " + attrib.getName() + "{scalar, RW} [\033[1;32mEVENT\033[0m]: ");
+
+            scalarEvent.setAttributeCompleteName(proxy.name() + "/" + attrib.getName());
+            scalarEvent.setTimeStamp(attrib.getTime());
+            scalarEvent.setDataFormat(AttrDataFormat._SCALAR);
+            scalarEvent.setWritable(AttrWriteType._READ_WRITE);
+            scalarEvent.setDataType(attrib.getType());
+
+            switch (scalarEvent.getDataType()) {
+                case TangoConst.Tango_DEV_SHORT:
+                    final short[] shvalue = attrib.extractShortArray();
+                    svalue[0] = shvalue[0];
+                    svalue[1] = shvalue[1];
+                    scalarEvent.setValue(svalue, null);
+                    logger.debug("short (R): " + svalue[0] + " (W): " + svalue[1]);
+                    break;
+                case TangoConst.Tango_DEV_USHORT:
+                    /*
+                     * extractUShortArray() returns an int[]. Then it cannot be
+                     * casted to Short[]. If we do this, a cast exception is thrown.
+                     * We probably could convert int to short and then short to
+                     * Short... But anyway we lose the `unsigned' information
+                     */
+                    final short ushvalue[] = attrib.extractShortArray();
+                    svalue[0] = ushvalue[0];
+                    svalue[1] = ushvalue[1];
+                    scalarEvent.setValue(svalue, null);
+                    logger.debug("unsigned short (R): " + svalue[0] + " (W): " + svalue[1]);
+                    break;
+                case TangoConst.Tango_DEV_LONG:
+                    final int[] intvalue = attrib.extractLongArray();
+                    ivalue[0] = intvalue[0];
+                    ivalue[1] = intvalue[1];
+                    scalarEvent.setValue(ivalue, null);
+                    logger.debug("long (R): " + ivalue[0] + " (W): " + ivalue[1]);
+                    break;
+                case TangoConst.Tango_DEV_ULONG:
+                    final int[] intulongvalue = attrib.extractLongArray();
+                    ivalue[0] = intulongvalue[0];
+                    ivalue[1] = intulongvalue[1];
+                    scalarEvent.setValue(ivalue, null);
+                    logger.debug("unsigned long (R): " + ivalue[0] + " (W): " + ivalue[1]);
+                    break;
+
+                case TangoConst.Tango_DEV_FLOAT:
+                    final float[] fval = attrib.extractFloatArray();
+                    fvalue[0] = fval[0];
+                    fvalue[1] = fval[1];
+                    scalarEvent.setValue(fvalue, null);
+                    logger.debug("float (R): " + fvalue[0] + " (W): " + fvalue[1]);
+                    break;
+                case TangoConst.Tango_DEV_BOOLEAN:
+                    final boolean[] bovalue = attrib.extractBooleanArray();
+                    bvalue[0] = bovalue[0];
+                    bvalue[1] = bovalue[1];
+                    scalarEvent.setValue(bvalue, null);
+                    logger.debug("boolean (Here?!?! :o ) (R): " + bvalue[0] + " (W): " + bvalue[1]);
+                    break;
+
+                case TangoConst.Tango_DEV_DOUBLE:
+                default:
+                    final double dovalue[] = attrib.extractDoubleArray();
+                    dvalue[0] = dovalue[0];
+                    dvalue[1] = dovalue[1];
+                    scalarEvent.setValue(dvalue, null);
+                    logger.debug("double (R): " + dvalue[0] + " (W): " + dvalue[1]);
+                    break;
+            }
+            processEventScalar(scalarEvent, tryNumber);
+
+        } catch (final DevFailed devFailed) {
+            logger.error(DevFailedUtils.toString(devFailed));
+            scalarEvent.setValue(null, null);
+            processEventScalar(scalarEvent, tryNumber);
+        } catch (final Exception exE) {
+            logger.error("error", exE);
+            final Object value = null;
+            scalarEvent.setValue(value, null);
+            processEventScalar(scalarEvent, tryNumber);
+        }
+
+    }
+    // --------------------------------------------------------------------------//
+    // ELETTRA : Archiving Events End
+    // --------------------------------------------------------------------------//
+}
diff --git a/src/main/java/HdbArchiver/Collector/scalar/NumberScalar_WO.java b/hdbarchiver/src/main/java/HdbArchiver/Collector/scalar/NumberScalar_WO.java
similarity index 95%
rename from src/main/java/HdbArchiver/Collector/scalar/NumberScalar_WO.java
rename to hdbarchiver/src/main/java/HdbArchiver/Collector/scalar/NumberScalar_WO.java
index 19a0211163a82d64142a267a4fe10e85a112e426..049b87102b576454889b3fce18a3c39e9b2f7fdc 100644
--- a/src/main/java/HdbArchiver/Collector/scalar/NumberScalar_WO.java
+++ b/hdbarchiver/src/main/java/HdbArchiver/Collector/scalar/NumberScalar_WO.java
@@ -1,243 +1,241 @@
-// +======================================================================
-// $Source: /cvsroot/tango-cs/tango/jserver/archiving/HdbArchiver/Collector/scalar/NumberScalar_WO.java,v $
-//
-// Project:      Tango Archiving Service
-//
-// Description:  Java source code for the class  NumberScalar_WO.
-//						(Chinkumo Jean) - Aug 30, 2005
-//
-// $Author: pierrejoseph $
-//
-// $Revision: 1.11 $
-//
-// $Log: NumberScalar_WO.java,v $
-// Revision 1.11  2007/10/03 15:23:29  pierrejoseph
-// Minor changes
-//
-// Revision 1.10  2007/09/28 14:49:23  pierrejoseph
-// Merged between Polling and Events code
-//
-// Revision 1.9  2007/06/11 12:21:04  pierrejoseph
-// errorEvent method is managed by the mother class
-//
-// Revision 1.8  2006/07/26 08:37:21  ounsy
-// try number no more static and reinitialized with change events (errorchange, numberscalarchange, etc...)
-//
-// Revision 1.7  2006/07/18 08:04:02  ounsy
-// moved the setAttribute_complete_name call in the try block
-//
-// Revision 1.6  2006/07/13 13:56:11  ounsy
-// added logging in case of errors during XXXValueChanged
-//
-// Revision 1.5  2006/05/03 14:29:18  ounsy
-// compatible with the AttributePolledList in "dispatch" mode
-//
-// Revision 1.4  2006/03/13 14:51:10  ounsy
-// Long as an int management
-//
-// Revision 1.3  2005/11/29 16:16:05  chinkumo
-// Code reformated (pogo compatible)
-//
-// Revision 1.2  2005/11/15 13:46:08  chinkumo
-// ...
-//
-// Revision 1.1  2005/09/09 10:03:56  chinkumo
-// First commit !
-// (Dynamic attribut release)
-//
-//
-// copyleft :	Synchrotron SOLEIL
-//					L'Orme des Merisiers
-//					Saint-Aubin - BP 48
-//					91192 GIF-sur-YVETTE CEDEX
-//
-//-======================================================================
-package HdbArchiver.Collector.scalar;
-
-import org.slf4j.Logger;
-import org.tango.utils.DevFailedUtils;
-
-import HdbArchiver.Collector.HdbModeHandler;
-import fr.esrf.Tango.AttrDataFormat;
-import fr.esrf.Tango.AttrWriteType;
-import fr.esrf.Tango.DevFailed;
-import fr.esrf.TangoApi.DeviceAttribute;
-import fr.esrf.TangoApi.DeviceProxy;
-import fr.esrf.TangoApi.events.TangoArchive;
-import fr.esrf.TangoApi.events.TangoArchiveEvent;
-import fr.esrf.TangoDs.TangoConst;
-import fr.esrf.tangoatk.core.NumberScalarEvent;
-import fr.soleil.archiving.hdbtdb.api.tools.ScalarEvent;
-
-public class NumberScalar_WO extends NumberScalar {
-
-    private static final long serialVersionUID = -2482536152899273835L;
-
-    public NumberScalar_WO(final HdbModeHandler modeHandler, final Logger logger) {
-        super(modeHandler, logger);
-    }
-
-    @Override
-    protected int getWritableValue() {
-        return AttrWriteType._WRITE;
-    }
-
-    @Override
-    public void numberScalarChange(final NumberScalarEvent event) {
-        final int tryNumber = DEFAULT_TRY_NUMBER;
-        final ScalarEvent scalarEvent = new ScalarEvent();
-
-        String attributeName = event.getNumberSource().getName();
-        try {
-            removeErrorMessage(attributeName);
-            scalarEvent.setAttributeCompleteName(attributeName);
-
-            scalarEvent.setDataFormat(AttrDataFormat._SCALAR);
-            scalarEvent.setWritable(getWritableValue());
-            scalarEvent.setDataType(event.getNumberSource().getAttribute().getType());
-
-            scalarEvent.setTimeStamp(event.getTimeStamp());
-
-            switch (scalarEvent.getDataType()) {
-                case TangoConst.Tango_DEV_SHORT:
-                case TangoConst.Tango_DEV_USHORT:
-                case TangoConst.Tango_DEV_UCHAR:
-                    scalarEvent.setValue((short) event.getNumberSource().getNumberScalarSetPoint(), null);
-                    break;
-                case TangoConst.Tango_DEV_LONG:
-                case TangoConst.Tango_DEV_ULONG:
-                    scalarEvent.setValue((int) event.getNumberSource().getNumberScalarSetPoint(), null);
-                    break;
-                case TangoConst.Tango_DEV_LONG64:
-                case TangoConst.Tango_DEV_ULONG64:
-                    scalarEvent.setValue((long) event.getNumberSource().getNumberScalarValue(), null);
-                    break;
-                case TangoConst.Tango_DEV_FLOAT:
-                    scalarEvent.setValue((float) event.getNumberSource().getNumberScalarSetPoint(), null);
-                    break;
-                case TangoConst.Tango_DEV_DOUBLE:
-                default:
-                    scalarEvent.setValue(event.getNumberSource().getNumberScalarSetPoint(), null);
-                    break;
-            }
-            processEventScalar(scalarEvent, tryNumber);
-
-        } catch (final DevFailed devFailed) {
-            registerErrorMessage(attributeName, devFailed);
-            logger.error(DevFailedUtils.toString(devFailed));
-            scalarEvent.setValue(null, null);
-            processEventScalar(scalarEvent, tryNumber);
-        } catch (final Exception e) {
-            registerErrorMessage(attributeName, e);
-            scalarEvent.setValue(null, null);
-            processEventScalar(scalarEvent, tryNumber);
-
-            final String message = "Problem in NumberScalar_RW/numberScalarChange";
-            logger.error(message, e);
-        }
-    }
-
-    // --------------------------------------------------------------------------//
-    // ELETTRA : Archiving Events
-    // --------------------------------------------------------------------------//
-    /* Invoked on the reception of a tango archive event. */
-    @Override
-    public void archive(final TangoArchiveEvent event) {
-        final int tryNumber = DEFAULT_TRY_NUMBER;
-        DeviceAttribute attrib = null;
-        TangoArchive arch;
-        DeviceProxy proxy;
-        /* The scalar event which must be filled in and finally archived. */
-        final ScalarEvent scalarEvent = new ScalarEvent();
-
-        try {
-            attrib = event.getValue();
-        } catch (final DevFailed f) {
-            logger.error(DevFailedUtils.toString(f));
-            return;
-        } catch (final Exception e) /* Shouldn't be reached */
-        {
-            logger.error("error", e);
-            return;
-        }
-
-        try {
-            /*
-             * To correctly archive the attribute, we have to know its complete
-             * name. To acquire this information, we must o back to the
-             * TangoArchive object (which contains the DeviceProxy).
-             */
-            arch = (TangoArchive) event.getSource();
-            proxy = arch.getEventSupplier(); /*
-                                              * The device that supplied the
-                                              * event
-                                              */
-            if (arch == null || proxy == null || attrib == null) {
-                logger.debug("\033[1;31mNumberScalar_WO.java: event.getValue() or event.getSource() or event.getSource().getEventSupplier()) returned null!\033[0m");
-                return;
-            }
-
-            logger.debug(proxy.name() + ": " + attrib.getName() + "{scalar, WO} [\033[1;32mEVENT\033[0m]: ");
-
-            scalarEvent.setAttributeCompleteName(proxy.name() + "/" + attrib.getName());
-            scalarEvent.setTimeStamp(attrib.getTime());
-            scalarEvent.setDataFormat(AttrDataFormat._SCALAR);
-            scalarEvent.setWritable(AttrWriteType._WRITE);
-            scalarEvent.setDataType(attrib.getType());
-
-            switch (scalarEvent.getDataType()) {
-                case TangoConst.Tango_DEV_SHORT:
-                    Short sval = attrib.extractShort();
-                    scalarEvent.setValue(sval, null);
-                    logger.debug("value {}", sval);
-                    break;
-                case TangoConst.Tango_DEV_USHORT:
-                    sval = (short) attrib.extractUShort();
-                    scalarEvent.setValue(sval, null);
-                    logger.debug("value {}", sval);
-                    break;
-                case TangoConst.Tango_DEV_LONG:
-                    /* extractLong() returns an int */
-                    final int longval = attrib.extractLong();
-                    scalarEvent.setValue(longval, null);
-                    logger.debug("value {}", longval);
-                    break;
-                case TangoConst.Tango_DEV_ULONG:
-                    final int longintval = attrib.extractLong();
-                    scalarEvent.setValue(longintval, null);
-                    logger.debug("value {}", longintval);
-                    break;
-                case TangoConst.Tango_DEV_DOUBLE:
-                    final Double dval = attrib.extractDouble();
-                    scalarEvent.setValue(dval, null);
-                    logger.debug("value {}", dval);
-                    break;
-                case TangoConst.Tango_DEV_FLOAT:
-                    final Float floatval = attrib.extractFloat();
-                    scalarEvent.setValue(floatval, null);
-                    logger.debug("value {}", floatval);
-                    break;
-                case TangoConst.Tango_DEV_BOOLEAN:
-                    scalarEvent.setValue(attrib.extractBoolean(), null);
-                    break;
-                default:
-                    scalarEvent.setValue(attrib.extractDouble(), null);
-                    break;
-            }
-            processEventScalar(scalarEvent, tryNumber);
-
-        } catch (final DevFailed devFailed) {
-            logger.error(DevFailedUtils.toString(devFailed));
-            scalarEvent.setValue(null, null);
-            processEventScalar(scalarEvent, tryNumber);
-        } catch (final Exception exE) {
-            logger.error("error", exE);
-            scalarEvent.setValue(null, null);
-            processEventScalar(scalarEvent, tryNumber);
-        }
-
-    }
-    // --------------------------------------------------------------------------//
-    // ELETTRA : Archiving Events
-    // --------------------------------------------------------------------------//
-}
+// +======================================================================
+// $Source: /cvsroot/tango-cs/tango/jserver/archiving/HdbArchiver/Collector/scalar/NumberScalar_WO.java,v $
+//
+// Project:      Tango Archiving Service
+//
+// Description:  Java source code for the class  NumberScalar_WO.
+//						(Chinkumo Jean) - Aug 30, 2005
+//
+// $Author: pierrejoseph $
+//
+// $Revision: 1.11 $
+//
+// $Log: NumberScalar_WO.java,v $
+// Revision 1.11  2007/10/03 15:23:29  pierrejoseph
+// Minor changes
+//
+// Revision 1.10  2007/09/28 14:49:23  pierrejoseph
+// Merged between Polling and Events code
+//
+// Revision 1.9  2007/06/11 12:21:04  pierrejoseph
+// errorEvent method is managed by the mother class
+//
+// Revision 1.8  2006/07/26 08:37:21  ounsy
+// try number no more static and reinitialized with change events (errorchange, numberscalarchange, etc...)
+//
+// Revision 1.7  2006/07/18 08:04:02  ounsy
+// moved the setAttribute_complete_name call in the try block
+//
+// Revision 1.6  2006/07/13 13:56:11  ounsy
+// added logging in case of errors during XXXValueChanged
+//
+// Revision 1.5  2006/05/03 14:29:18  ounsy
+// compatible with the AttributePolledList in "dispatch" mode
+//
+// Revision 1.4  2006/03/13 14:51:10  ounsy
+// Long as an int management
+//
+// Revision 1.3  2005/11/29 16:16:05  chinkumo
+// Code reformated (pogo compatible)
+//
+// Revision 1.2  2005/11/15 13:46:08  chinkumo
+// ...
+//
+// Revision 1.1  2005/09/09 10:03:56  chinkumo
+// First commit !
+// (Dynamic attribut release)
+//
+//
+// copyleft :	Synchrotron SOLEIL
+//					L'Orme des Merisiers
+//					Saint-Aubin - BP 48
+//					91192 GIF-sur-YVETTE CEDEX
+//
+//-======================================================================
+package HdbArchiver.Collector.scalar;
+
+import HdbArchiver.Collector.HdbModeHandler;
+import fr.esrf.Tango.AttrDataFormat;
+import fr.esrf.Tango.AttrWriteType;
+import fr.esrf.Tango.DevFailed;
+import fr.esrf.TangoApi.DeviceAttribute;
+import fr.esrf.TangoApi.DeviceProxy;
+import fr.esrf.TangoApi.events.TangoArchive;
+import fr.esrf.TangoApi.events.TangoArchiveEvent;
+import fr.esrf.TangoDs.TangoConst;
+import fr.esrf.tangoatk.core.NumberScalarEvent;
+import fr.soleil.archiving.hdbtdb.api.tools.ScalarEvent;
+import org.slf4j.Logger;
+import org.tango.utils.DevFailedUtils;
+
+public class NumberScalar_WO extends NumberScalar {
+
+    private static final long serialVersionUID = -2482536152899273835L;
+
+    public NumberScalar_WO(final HdbModeHandler modeHandler, boolean useEvents, final Logger logger) {
+        super(modeHandler, useEvents, logger);
+    }
+
+    @Override
+    protected int getWritableValue() {
+        return AttrWriteType._WRITE;
+    }
+
+    @Override
+    public void numberScalarChange(final NumberScalarEvent event) {
+        final int tryNumber = DEFAULT_TRY_NUMBER;
+        final ScalarEvent scalarEvent = new ScalarEvent();
+
+        String attributeName = event.getNumberSource().getName();
+        try {
+            removeErrorMessage(attributeName);
+            scalarEvent.setAttributeCompleteName(attributeName);
+
+            scalarEvent.setDataFormat(AttrDataFormat._SCALAR);
+            scalarEvent.setWritable(getWritableValue());
+            scalarEvent.setDataType(event.getNumberSource().getAttribute().getType());
+
+            scalarEvent.setTimeStamp(event.getTimeStamp());
+
+            switch (scalarEvent.getDataType()) {
+                case TangoConst.Tango_DEV_SHORT:
+                case TangoConst.Tango_DEV_USHORT:
+                case TangoConst.Tango_DEV_UCHAR:
+                    scalarEvent.setValue((short) event.getNumberSource().getNumberScalarSetPoint(), null);
+                    break;
+                case TangoConst.Tango_DEV_LONG:
+                case TangoConst.Tango_DEV_ULONG:
+                    scalarEvent.setValue((int) event.getNumberSource().getNumberScalarSetPoint(), null);
+                    break;
+                case TangoConst.Tango_DEV_LONG64:
+                case TangoConst.Tango_DEV_ULONG64:
+                    scalarEvent.setValue((long) event.getNumberSource().getNumberScalarValue(), null);
+                    break;
+                case TangoConst.Tango_DEV_FLOAT:
+                    scalarEvent.setValue((float) event.getNumberSource().getNumberScalarSetPoint(), null);
+                    break;
+                case TangoConst.Tango_DEV_DOUBLE:
+                default:
+                    scalarEvent.setValue(event.getNumberSource().getNumberScalarSetPoint(), null);
+                    break;
+            }
+            processEventScalar(scalarEvent, tryNumber);
+
+        } catch (final DevFailed devFailed) {
+            registerErrorMessage(attributeName, devFailed);
+            logger.error(DevFailedUtils.toString(devFailed));
+            scalarEvent.setValue(null, null);
+            processEventScalar(scalarEvent, tryNumber);
+        } catch (final Exception e) {
+            registerErrorMessage(attributeName, e);
+            scalarEvent.setValue(null, null);
+            processEventScalar(scalarEvent, tryNumber);
+
+            final String message = "Problem in NumberScalar_RW/numberScalarChange";
+            logger.error(message, e);
+        }
+    }
+
+    // --------------------------------------------------------------------------//
+    // ELETTRA : Archiving Events
+    // --------------------------------------------------------------------------//
+    /* Invoked on the reception of a tango archive event. */
+    @Override
+    public void archive(final TangoArchiveEvent event) {
+        final int tryNumber = DEFAULT_TRY_NUMBER;
+        DeviceAttribute attrib = null;
+        TangoArchive arch;
+        DeviceProxy proxy;
+        /* The scalar event which must be filled in and finally archived. */
+        final ScalarEvent scalarEvent = new ScalarEvent();
+
+        try {
+            attrib = event.getValue();
+        } catch (final DevFailed f) {
+            logger.error(DevFailedUtils.toString(f));
+            return;
+        } catch (final Exception e) /* Shouldn't be reached */ {
+            logger.error("error", e);
+            return;
+        }
+
+        try {
+            /*
+             * To correctly archive the attribute, we have to know its complete
+             * name. To acquire this information, we must o back to the
+             * TangoArchive object (which contains the DeviceProxy).
+             */
+            arch = (TangoArchive) event.getSource();
+            proxy = arch.getEventSupplier(); /*
+                                              * The device that supplied the
+                                              * event
+                                              */
+            if (arch == null || proxy == null || attrib == null) {
+                logger.debug("\033[1;31mNumberScalar_WO.java: event.getValue() or event.getSource() or event.getSource().getEventSupplier()) returned null!\033[0m");
+                return;
+            }
+
+            logger.debug(proxy.name() + ": " + attrib.getName() + "{scalar, WO} [\033[1;32mEVENT\033[0m]: ");
+
+            scalarEvent.setAttributeCompleteName(proxy.name() + "/" + attrib.getName());
+            scalarEvent.setTimeStamp(attrib.getTime());
+            scalarEvent.setDataFormat(AttrDataFormat._SCALAR);
+            scalarEvent.setWritable(AttrWriteType._WRITE);
+            scalarEvent.setDataType(attrib.getType());
+
+            switch (scalarEvent.getDataType()) {
+                case TangoConst.Tango_DEV_SHORT:
+                    Short sval = attrib.extractShort();
+                    scalarEvent.setValue(sval, null);
+                    logger.debug("value {}", sval);
+                    break;
+                case TangoConst.Tango_DEV_USHORT:
+                    sval = (short) attrib.extractUShort();
+                    scalarEvent.setValue(sval, null);
+                    logger.debug("value {}", sval);
+                    break;
+                case TangoConst.Tango_DEV_LONG:
+                    /* extractLong() returns an int */
+                    final int longval = attrib.extractLong();
+                    scalarEvent.setValue(longval, null);
+                    logger.debug("value {}", longval);
+                    break;
+                case TangoConst.Tango_DEV_ULONG:
+                    final int longintval = attrib.extractLong();
+                    scalarEvent.setValue(longintval, null);
+                    logger.debug("value {}", longintval);
+                    break;
+                case TangoConst.Tango_DEV_DOUBLE:
+                    final Double dval = attrib.extractDouble();
+                    scalarEvent.setValue(dval, null);
+                    logger.debug("value {}", dval);
+                    break;
+                case TangoConst.Tango_DEV_FLOAT:
+                    final Float floatval = attrib.extractFloat();
+                    scalarEvent.setValue(floatval, null);
+                    logger.debug("value {}", floatval);
+                    break;
+                case TangoConst.Tango_DEV_BOOLEAN:
+                    scalarEvent.setValue(attrib.extractBoolean(), null);
+                    break;
+                default:
+                    scalarEvent.setValue(attrib.extractDouble(), null);
+                    break;
+            }
+            processEventScalar(scalarEvent, tryNumber);
+
+        } catch (final DevFailed devFailed) {
+            logger.error(DevFailedUtils.toString(devFailed));
+            scalarEvent.setValue(null, null);
+            processEventScalar(scalarEvent, tryNumber);
+        } catch (final Exception exE) {
+            logger.error("error", exE);
+            scalarEvent.setValue(null, null);
+            processEventScalar(scalarEvent, tryNumber);
+        }
+
+    }
+    // --------------------------------------------------------------------------//
+    // ELETTRA : Archiving Events
+    // --------------------------------------------------------------------------//
+}
diff --git a/src/main/java/HdbArchiver/Collector/scalar/StateScalar.java b/hdbarchiver/src/main/java/HdbArchiver/Collector/scalar/StateScalar.java
similarity index 94%
rename from src/main/java/HdbArchiver/Collector/scalar/StateScalar.java
rename to hdbarchiver/src/main/java/HdbArchiver/Collector/scalar/StateScalar.java
index 0982eb6911ad2cf50faddd44d23b84001db15141..a868abd5fb85e10cacd848b613623ae94b306aeb 100644
--- a/src/main/java/HdbArchiver/Collector/scalar/StateScalar.java
+++ b/hdbarchiver/src/main/java/HdbArchiver/Collector/scalar/StateScalar.java
@@ -1,338 +1,331 @@
-package HdbArchiver.Collector.scalar;
-
-/**
- * Project: Tango Archiving Service
- * 
- * Description: Java source code for the class StringScalar.
- * This abstract class hosts the collector for the state attributes
- * (Chinkumo Jean) - Feb 28, 2006
- * 
- * $Source: /cvsroot/tango-cs/tango/jserver/archiving/HdbArchiver/Collector/scalar/StateScalar.java,v $
- * 
- * $Author: pierrejoseph $
- * 
- * $Revision: 1.20 $
- * 
- * $Log: StateScalar.java,v $
- * Revision 1.20 2007/10/03 15:23:29 pierrejoseph
- * Minor changes
- * 
- * Revision 1.19 2007/10/02 06:51:05 pierrejoseph
- * other test for comments
- * 
- * Revision 1.18 2007/10/02 06:25:32 pierrejoseph
- * test for comments
- * 
- * Revision 1.17 2007/09/28 14:49:23 pierrejoseph
- * Merged between Polling and Events code
- */
-
-import java.util.HashMap;
-import java.util.Map;
-
-import org.slf4j.Logger;
-import org.tango.utils.DevFailedUtils;
-
-import Common.Archiver.Collector.ModesCounters;
-import HdbArchiver.HdbArchiver;
-import HdbArchiver.Collector.HdbCollector;
-import HdbArchiver.Collector.HdbModeHandler;
-import fr.esrf.Tango.DevError;
-import fr.esrf.Tango.DevFailed;
-import fr.esrf.Tango.ErrSeverity;
-import fr.esrf.TangoApi.events.ITangoArchiveListener;
-import fr.esrf.TangoApi.events.TangoEventsAdapter;
-import fr.esrf.TangoDs.TangoConst;
-import fr.esrf.tangoatk.core.AttributeStateEvent;
-import fr.esrf.tangoatk.core.ConnectionException;
-import fr.esrf.tangoatk.core.Device;
-import fr.esrf.tangoatk.core.ErrorEvent;
-import fr.esrf.tangoatk.core.IDevStateScalar;
-import fr.esrf.tangoatk.core.IDevStateScalarListener;
-import fr.esrf.tangoatk.core.attribute.AttributeFactory;
-import fr.soleil.archiving.common.api.exception.ArchivingException;
-import fr.soleil.archiving.common.api.tools.GlobalConst;
-import fr.soleil.archiving.hdbtdb.api.tools.AttributeLightMode;
-import fr.soleil.archiving.hdbtdb.api.tools.ScalarEvent;
-
-public abstract class StateScalar extends HdbCollector implements IDevStateScalarListener, ITangoArchiveListener {
-
-    private static final long serialVersionUID = 5789477472551487305L;
-
-    private final Map<Device, TangoEventsAdapter> evtAdaptHMap;
-
-    public StateScalar(final HdbModeHandler modeHandler, final Logger logger) {
-        super(modeHandler, logger);
-
-        evtAdaptHMap = new HashMap<Device, TangoEventsAdapter>();
-    }
-
-    /* synchronized */@Override
-    public synchronized void removeSource(final String attributeName) throws ArchivingException {
-        logger.debug("StateScalar.removeSource");
-
-        if (HdbArchiver.isUseEvents) {
-            removeSourceForEvents(attributeName);
-        }
-        try {
-            /*
-             * while ( ( IDevStateScalar ) attributeList.get(attributeName) !=
-             * null ) {
-             */
-            stopCollecting();
-            final IDevStateScalar attribute = (IDevStateScalar) attributeList.get(attributeName);
-            if (attribute != null) {
-                attribute.removeDevStateScalarListener(this);
-                attribute.removeErrorListener(this);
-                attributeList.remove(attributeName);
-                isFirstValueList.remove(attributeName.toLowerCase());
-                logger.debug("\t The attribute named " + attributeName + " was fired from the Collector list...");
-                // informs the mother class that one new attribute must be
-                // removed
-                removeAttribute(attributeName);
-                removeTimestamps(attributeName);
-            }
-        } catch (final Exception e) {
-            final String message = GlobalConst.ARCHIVING_ERROR_PREFIX + "Failed removing '" + attributeName
-                    + "' from sources";
-            final String reason = GlobalConst.TANGO_COMM_EXCEPTION;
-            final String desc = "Failed while executing " + this.getClass().getSimpleName()
-                    + ".removeSource() method...";
-            throw new ArchivingException(message, reason, ErrSeverity.WARN, desc, "", e);
-        } finally {
-            startCollecting();
-        }
-    }
-
-    @Override
-    protected void doAddSourceForPolling(final AttributeLightMode attributeLightMode) throws ArchivingException {
-        String attName = null;
-        try {
-            attName = attributeLightMode.getAttributeCompleteName();
-            if (attName != null) {
-                // while ( ( IDevStateScalar ) attributeList.get(att_name)
-                // ==
-                // null )
-                // {
-                stopCollecting();
-                IDevStateScalar attribute = null;
-                attribute = (IDevStateScalar) attributeList.add(attName);
-
-                attribute.addDevStateScalarListener(this);
-                attribute.addErrorListener(this);
-                // informs the mother class that one new attribute must be
-                // managed
-                addAttribute(attName);
-                logger.debug("add archiving for " + attName);
-            }
-
-        } catch (final ConnectionException e) {
-            registerErrorMessage(attName, e);
-            final String message = GlobalConst.ARCHIVING_ERROR_PREFIX + "Failed adding '"
-                    + attributeLightMode.getAttributeCompleteName() + "' as source";
-            final String reason = GlobalConst.TANGO_COMM_EXCEPTION;
-            final String desc = "Failed while executing " + this.getClass().getSimpleName() + ".addSource() method...";
-            throw new ArchivingException(message, reason, ErrSeverity.WARN, desc, "", e);
-
-        } catch (final Exception e) {
-            registerErrorMessage(attName, e);
-            final String message = GlobalConst.ARCHIVING_ERROR_PREFIX + "Failed adding '"
-                    + attributeLightMode.getAttributeCompleteName() + "' as source";
-            final String reason = GlobalConst.TANGO_COMM_EXCEPTION;
-            final String desc = "Failed while executing " + this.getClass().getSimpleName() + ".addSource() method...";
-            throw new ArchivingException(message, reason, ErrSeverity.WARN, desc, "", e);
-        } finally {
-            startCollecting();
-        }
-    }
-
-    // --------------------------------------------------------------------------//
-    // ELETTRA : Archiving Events
-    // --------------------------------------------------------------------------//
-    @Override
-    protected void addSourceForEvents(final AttributeLightMode attributeLightMode) throws ArchivingException {
-        /* Adapter for the Tango archive events */
-        TangoEventsAdapter evtAdapt = null;
-        IDevStateScalar attribute = null;
-
-        try {
-            /*
-             * Get the attribute from the AttributeFactory, so that it is not
-             * added to the attribute polled list. Remember that `attributeList'
-             * is an AttributePolledList().
-             */
-            attribute = (IDevStateScalar) AttributeFactory.getInstance().getAttribute(
-                    attributeLightMode.getAttributeCompleteName());
-            if (attribute == null) {
-                logger.debug("\033[1;31mStateScalar.java: the attribute \""
-                        + attributeLightMode.getAttributeCompleteName() + " is null (StateScalar.java): not adding it!");
-                return;
-            }
-        } catch (final DevFailed e) {
-            logger.error(DevFailedUtils.toString(e));
-            final String message = GlobalConst.ARCHIVING_ERROR_PREFIX + "Failed adding '"
-                    + attributeLightMode.getAttributeCompleteName() + "' as source";
-            final String reason = "DevFailed exception while calling AttributeFactory.getInstance().getAttribute();";
-            final String desc = "Failed while executing Spectrum_RW.addSource() method...\nSpectrum_RW.java: Failed to get the attribute from the AttributeFactory";
-            throw new ArchivingException(message, reason, ErrSeverity.WARN, desc, "", e);
-        } catch (final ConnectionException e) {
-            final String message = GlobalConst.ARCHIVING_ERROR_PREFIX + "Failed adding '"
-                    + attributeLightMode.getAttributeCompleteName() + "' as source";
-            final String reason = GlobalConst.TANGO_COMM_EXCEPTION;
-            final String desc = "Failed while executing StateScalar.addSource() method...\nStateScalar.java: Failed to get the attribute from the AttributeFactory";
-            throw new ArchivingException(message, reason, ErrSeverity.WARN, desc, "", e);
-        } /*
-           * end of first try/catch block, to retrieve the attribute from the
-           * AttributeFactory
-           */
-
-        logger.debug("scalar attribute \"" + attribute.getNameSansDevice() + "\"...\t");
-
-        /*
-         * If an attribute (name + device server) is already in the map, it
-         * means it has already been registered for the Tango Archive events. So
-         * it does not have to be added to the archive events once again, nor to
-         * the attributePolledList: we can return. The same goes for an
-         * attribute already present in the attributePolledList `attributeList'.
-         */
-        /*
-         * if(HdbArchiver.useEvents.equalsIgnoreCase("no")) {
-         * System.out.print("[\033[1;35mEVENTS DISABLED\033[0m]. ");
-         * registerForScalarListener(attributeLightMode); } else {
-         */
-        try {
-            synchronized (evtAdaptHMap) {
-                evtAdapt = evtAdaptHMap.get(attribute.getDevice());
-                if (evtAdapt == null) {
-                    evtAdapt = new TangoEventsAdapter(attribute.getDevice());
-                    evtAdaptHMap.put(attribute.getDevice(), evtAdapt);
-                } else {
-                    logger.debug("\nThe adapter for the attribute is already configured");
-                }
-            }
-            final String[] filter = new String[0];
-
-            /*
-             * Try to register for the archive events: evtAdapt is the new
-             * adapter or the one already found in the map.
-             */
-            evtAdapt.addTangoArchiveListener(this, attribute.getNameSansDevice(), filter);
-            archiveListenersCounter++;
-            logger.debug("[\033[1;32mEVENTS\033[0m].");
-        } catch (final DevFailed e) {
-            /*
-             * If archive events are not enabled for the attribute, we will poll
-             * it
-             */
-            for (final DevError error : e.errors) {
-                // // System.out.println("error registering: " +
-                // e.errors[err].desc);
-                if (error.desc.contains("Already connected to event")) {
-                    logger.debug("Already connected to events for attribute");
-                    return;
-                }
-            }
-            /* Register for polling */
-            addSourceForPolling(attributeLightMode);
-            /* unlock the attributeList */
-        }
-        // } /* function finishes */
-    }
-
-    private void removeSourceForEvents(final String attributeName) {
-        logger.debug("state: removing source for \"" + attributeName + "\"...\t");
-        TangoEventsAdapter adapter;
-        IDevStateScalar attribute;
-        /*
-         * If useEvents is enabled, we should remove the eventListener, if not
-         * we can skip this piece of code
-         */
-        // if (HdbArchiver.useEvents.equalsIgnoreCase("yes"))
-        // {
-        try {
-            synchronized (evtAdaptHMap) {
-                attribute = (IDevStateScalar) AttributeFactory.getInstance().getAttribute(attributeName);
-                /*
-                 * Retrieve in the hash table the event adapter associated to
-                 * the attributeName.
-                 */
-                if (attribute == null) {
-                    logger.debug("\033[1;31mThe attribute " + attributeName + " is null\033[0m");
-                }
-                adapter = evtAdaptHMap.get(attribute.getDevice());
-
-                if (adapter != null) {
-                    adapter.removeTangoArchiveListener(this, attribute.getNameSansDevice());
-                    archiveListenersCounter--;
-                    logger.debug("[\033[1;32mEVENTS\033[0m].");
-                    logger.debug(" (adapter: " + adapter.device_name() + ")");
-                    /* Should be ok now to return */
-                    return;
-                }
-            } /* unlock event adapters map */
-        } catch (final ConnectionException e) /* getAttribute() failed */
-        {
-            logger.error("error", e);
-        } catch (final DevFailed f) {
-            logger.error(DevFailedUtils.toString(f));
-        }
-    }
-
-    // --------------------------------------------------------------------------//
-    // ELETTRA : Archiving Events
-    // --------------------------------------------------------------------------//
-    public void processEventScalar(final ScalarEvent scalarEvent, int try_number) {
-        if (isDataArchivableTimestampWise(scalarEvent)) {
-            final String attributeName = scalarEvent.getAttributeCompleteName();
-            try {
-                boolean doArchive = false;
-                if (isFirstValueList.get(attributeName.toLowerCase())) {
-                    doArchive = true;
-                    isFirstValueList.put(attributeName.toLowerCase(), false);
-                    logger.debug(attributeName + " first value, forcing archiving");
-                } else {
-
-                    final ModesCounters mc = getModeCounter(attributeName);
-                    if (mc == null) {
-                        logger.debug(attributeName + "attribute Counters unknown");
-                    } else {
-                        doArchive = doArchiveEvent(mc, scalarEvent.getDataType(), scalarEvent.getReadValue(),
-                                getLastValue(scalarEvent), attributeName);
-                    }
-                }
-
-                if (doArchive) {
-                    super.dbProxy.store(scalarEvent);
-                }
-
-                setLastValue(scalarEvent, scalarEvent.getReadValue());
-            } catch (final Exception e) {
-                final String message = "Problem storing StateScalar value";
-                logger.error(message, e);
-
-                try_number--;
-                if (try_number > 0) {
-                    logger.debug("StateScalar.processEventScalar : retry " + try_number + "failed...");
-                    processEventScalar(scalarEvent, try_number);
-                }
-            }
-        }
-    }
-
-    @Override
-    public void stateChange(final AttributeStateEvent e) {
-    }
-
-    protected abstract int getWritableValue();
-
-    @Override
-    protected void treatErrorEventAfterLogging(ErrorEvent errorEvent) {
-        try {
-            processEventScalar(getNullValueScalarEvent(errorEvent, TangoConst.Tango_DEV_STATE, getWritableValue()),
-                    DEFAULT_TRY_NUMBER);
-        } catch (final Exception e) {
-            logger.error(this.getClass().getSimpleName() + ".errorChange : during processEventScalar creation execp : "
-                    + e);
-        }
-    }
-}
+package HdbArchiver.Collector.scalar;
+
+/**
+ * Project: Tango Archiving Service
+ *
+ * Description: Java source code for the class StringScalar.
+ * This abstract class hosts the collector for the state attributes
+ * (Chinkumo Jean) - Feb 28, 2006
+ *
+ * $Source: /cvsroot/tango-cs/tango/jserver/archiving/HdbArchiver/Collector/scalar/StateScalar.java,v $
+ *
+ * $Author: pierrejoseph $
+ *
+ * $Revision: 1.20 $
+ *
+ * $Log: StateScalar.java,v $
+ * Revision 1.20 2007/10/03 15:23:29 pierrejoseph
+ * Minor changes
+ *
+ * Revision 1.19 2007/10/02 06:51:05 pierrejoseph
+ * other test for comments
+ *
+ * Revision 1.18 2007/10/02 06:25:32 pierrejoseph
+ * test for comments
+ *
+ * Revision 1.17 2007/09/28 14:49:23 pierrejoseph
+ * Merged between Polling and Events code
+ */
+
+import Common.Archiver.Collector.ModesCounters;
+import HdbArchiver.Collector.HdbCollector;
+import HdbArchiver.Collector.HdbModeHandler;
+import fr.esrf.Tango.DevError;
+import fr.esrf.Tango.DevFailed;
+import fr.esrf.Tango.ErrSeverity;
+import fr.esrf.TangoApi.events.ITangoArchiveListener;
+import fr.esrf.TangoApi.events.TangoEventsAdapter;
+import fr.esrf.TangoDs.TangoConst;
+import fr.esrf.tangoatk.core.*;
+import fr.esrf.tangoatk.core.attribute.AttributeFactory;
+import fr.soleil.archiving.common.api.exception.ArchivingException;
+import fr.soleil.archiving.common.api.tools.GlobalConst;
+import fr.soleil.archiving.hdbtdb.api.tools.AttributeLightMode;
+import fr.soleil.archiving.hdbtdb.api.tools.ScalarEvent;
+import org.slf4j.Logger;
+import org.tango.utils.DevFailedUtils;
+
+import java.util.HashMap;
+import java.util.Map;
+
+public abstract class StateScalar extends HdbCollector implements IDevStateScalarListener, ITangoArchiveListener {
+
+    private static final long serialVersionUID = 5789477472551487305L;
+
+    private final Map<Device, TangoEventsAdapter> evtAdaptHMap;
+
+    public StateScalar(final HdbModeHandler modeHandler, boolean useEvents, final Logger logger) {
+        super(modeHandler, useEvents, logger);
+
+        evtAdaptHMap = new HashMap<Device, TangoEventsAdapter>();
+    }
+
+    /* synchronized */
+    @Override
+    public synchronized void removeSource(final String attributeName) throws ArchivingException {
+        logger.debug("StateScalar.removeSource");
+
+        if (useEvents) {
+            removeSourceForEvents(attributeName);
+        }
+        try {
+            /*
+             * while ( ( IDevStateScalar ) attributeList.get(attributeName) !=
+             * null ) {
+             */
+            stopCollecting();
+            final IDevStateScalar attribute = (IDevStateScalar) attributeList.get(attributeName);
+            if (attribute != null) {
+                attribute.removeDevStateScalarListener(this);
+                attribute.removeErrorListener(this);
+                attributeList.remove(attributeName);
+                isFirstValueList.remove(attributeName.toLowerCase());
+                logger.debug("\t The attribute named " + attributeName + " was fired from the Collector list...");
+                // informs the mother class that one new attribute must be
+                // removed
+                removeAttribute(attributeName);
+                removeTimestamps(attributeName);
+            }
+        } catch (final Exception e) {
+            final String message = GlobalConst.ARCHIVING_ERROR_PREFIX + "Failed removing '" + attributeName
+                    + "' from sources";
+            final String reason = GlobalConst.TANGO_COMM_EXCEPTION;
+            final String desc = "Failed while executing " + this.getClass().getSimpleName()
+                    + ".removeSource() method...";
+            throw new ArchivingException(message, reason, ErrSeverity.WARN, desc, "", e);
+        } finally {
+            startCollecting();
+        }
+    }
+
+    @Override
+    protected void doAddSourceForPolling(final AttributeLightMode attributeLightMode) throws ArchivingException {
+        String attName = null;
+        try {
+            attName = attributeLightMode.getAttributeCompleteName();
+            if (attName != null) {
+                // while ( ( IDevStateScalar ) attributeList.get(att_name)
+                // ==
+                // null )
+                // {
+                stopCollecting();
+                IDevStateScalar attribute = null;
+                attribute = (IDevStateScalar) attributeList.add(attName);
+
+                attribute.addDevStateScalarListener(this);
+                attribute.addErrorListener(this);
+                // informs the mother class that one new attribute must be
+                // managed
+                addAttribute(attName);
+                logger.debug("add archiving for " + attName);
+            }
+
+        } catch (final ConnectionException e) {
+            registerErrorMessage(attName, e);
+            final String message = GlobalConst.ARCHIVING_ERROR_PREFIX + "Failed adding '"
+                    + attributeLightMode.getAttributeCompleteName() + "' as source";
+            final String reason = GlobalConst.TANGO_COMM_EXCEPTION;
+            final String desc = "Failed while executing " + this.getClass().getSimpleName() + ".addSource() method...";
+            throw new ArchivingException(message, reason, ErrSeverity.WARN, desc, "", e);
+
+        } catch (final Exception e) {
+            registerErrorMessage(attName, e);
+            final String message = GlobalConst.ARCHIVING_ERROR_PREFIX + "Failed adding '"
+                    + attributeLightMode.getAttributeCompleteName() + "' as source";
+            final String reason = GlobalConst.TANGO_COMM_EXCEPTION;
+            final String desc = "Failed while executing " + this.getClass().getSimpleName() + ".addSource() method...";
+            throw new ArchivingException(message, reason, ErrSeverity.WARN, desc, "", e);
+        } finally {
+            startCollecting();
+        }
+    }
+
+    // --------------------------------------------------------------------------//
+    // ELETTRA : Archiving Events
+    // --------------------------------------------------------------------------//
+    @Override
+    protected void addSourceForEvents(final AttributeLightMode attributeLightMode) throws ArchivingException {
+        /* Adapter for the Tango archive events */
+        TangoEventsAdapter evtAdapt = null;
+        IDevStateScalar attribute = null;
+
+        try {
+            /*
+             * Get the attribute from the AttributeFactory, so that it is not
+             * added to the attribute polled list. Remember that `attributeList'
+             * is an AttributePolledList().
+             */
+            attribute = (IDevStateScalar) AttributeFactory.getInstance().getAttribute(
+                    attributeLightMode.getAttributeCompleteName());
+            if (attribute == null) {
+                logger.debug("\033[1;31mStateScalar.java: the attribute \""
+                        + attributeLightMode.getAttributeCompleteName() + " is null (StateScalar.java): not adding it!");
+                return;
+            }
+        } catch (final DevFailed e) {
+            logger.error(DevFailedUtils.toString(e));
+            final String message = GlobalConst.ARCHIVING_ERROR_PREFIX + "Failed adding '"
+                    + attributeLightMode.getAttributeCompleteName() + "' as source";
+            final String reason = "DevFailed exception while calling AttributeFactory.getInstance().getAttribute();";
+            final String desc = "Failed while executing Spectrum_RW.addSource() method...\nSpectrum_RW.java: Failed to get the attribute from the AttributeFactory";
+            throw new ArchivingException(message, reason, ErrSeverity.WARN, desc, "", e);
+        } catch (final ConnectionException e) {
+            final String message = GlobalConst.ARCHIVING_ERROR_PREFIX + "Failed adding '"
+                    + attributeLightMode.getAttributeCompleteName() + "' as source";
+            final String reason = GlobalConst.TANGO_COMM_EXCEPTION;
+            final String desc = "Failed while executing StateScalar.addSource() method...\nStateScalar.java: Failed to get the attribute from the AttributeFactory";
+            throw new ArchivingException(message, reason, ErrSeverity.WARN, desc, "", e);
+        } /*
+           * end of first try/catch block, to retrieve the attribute from the
+           * AttributeFactory
+           */
+
+        logger.debug("scalar attribute \"" + attribute.getNameSansDevice() + "\"...\t");
+
+        /*
+         * If an attribute (name + device server) is already in the map, it
+         * means it has already been registered for the Tango Archive events. So
+         * it does not have to be added to the archive events once again, nor to
+         * the attributePolledList: we can return. The same goes for an
+         * attribute already present in the attributePolledList `attributeList'.
+         */
+        /*
+         * if(HdbArchiver.useEvents.equalsIgnoreCase("no")) {
+         * System.out.print("[\033[1;35mEVENTS DISABLED\033[0m]. ");
+         * registerForScalarListener(attributeLightMode); } else {
+         */
+        try {
+            synchronized (evtAdaptHMap) {
+                evtAdapt = evtAdaptHMap.get(attribute.getDevice());
+                if (evtAdapt == null) {
+                    evtAdapt = new TangoEventsAdapter(attribute.getDevice());
+                    evtAdaptHMap.put(attribute.getDevice(), evtAdapt);
+                } else {
+                    logger.debug("\nThe adapter for the attribute is already configured");
+                }
+            }
+            final String[] filter = new String[0];
+
+            /*
+             * Try to register for the archive events: evtAdapt is the new
+             * adapter or the one already found in the map.
+             */
+            evtAdapt.addTangoArchiveListener(this, attribute.getNameSansDevice(), filter);
+            archiveListenersCounter++;
+            logger.debug("[\033[1;32mEVENTS\033[0m].");
+        } catch (final DevFailed e) {
+            /*
+             * If archive events are not enabled for the attribute, we will poll
+             * it
+             */
+            for (final DevError error : e.errors) {
+                // // System.out.println("error registering: " +
+                // e.errors[err].desc);
+                if (error.desc.contains("Already connected to event")) {
+                    logger.debug("Already connected to events for attribute");
+                    return;
+                }
+            }
+            /* Register for polling */
+            addSourceForPolling(attributeLightMode);
+            /* unlock the attributeList */
+        }
+        // } /* function finishes */
+    }
+
+    private void removeSourceForEvents(final String attributeName) {
+        logger.debug("state: removing source for \"" + attributeName + "\"...\t");
+        TangoEventsAdapter adapter;
+        IDevStateScalar attribute;
+        /*
+         * If useEvents is enabled, we should remove the eventListener, if not
+         * we can skip this piece of code
+         */
+        // if (HdbArchiver.useEvents.equalsIgnoreCase("yes"))
+        // {
+        try {
+            synchronized (evtAdaptHMap) {
+                attribute = (IDevStateScalar) AttributeFactory.getInstance().getAttribute(attributeName);
+                /*
+                 * Retrieve in the hash table the event adapter associated to
+                 * the attributeName.
+                 */
+                if (attribute == null) {
+                    logger.debug("\033[1;31mThe attribute " + attributeName + " is null\033[0m");
+                }
+                adapter = evtAdaptHMap.get(attribute.getDevice());
+
+                if (adapter != null) {
+                    adapter.removeTangoArchiveListener(this, attribute.getNameSansDevice());
+                    archiveListenersCounter--;
+                    logger.debug("[\033[1;32mEVENTS\033[0m].");
+                    logger.debug(" (adapter: " + adapter.device_name() + ")");
+                    /* Should be ok now to return */
+                    return;
+                }
+            } /* unlock event adapters map */
+        } catch (final ConnectionException e) /* getAttribute() failed */ {
+            logger.error("error", e);
+        } catch (final DevFailed f) {
+            logger.error(DevFailedUtils.toString(f));
+        }
+    }
+
+    // --------------------------------------------------------------------------//
+    // ELETTRA : Archiving Events
+    // --------------------------------------------------------------------------//
+    public void processEventScalar(final ScalarEvent scalarEvent, int try_number) {
+        if (isDataArchivableTimestampWise(scalarEvent)) {
+            final String attributeName = scalarEvent.getAttributeCompleteName();
+            try {
+                boolean doArchive = false;
+                if (isFirstValueList.get(attributeName.toLowerCase())) {
+                    doArchive = true;
+                    isFirstValueList.put(attributeName.toLowerCase(), false);
+                    logger.debug(attributeName + " first value, forcing archiving");
+                } else {
+
+                    final ModesCounters mc = getModeCounter(attributeName);
+                    if (mc == null) {
+                        logger.debug(attributeName + "attribute Counters unknown");
+                    } else {
+                        doArchive = doArchiveEvent(mc, scalarEvent.getDataType(), scalarEvent.getReadValue(),
+                                getLastValue(scalarEvent), attributeName);
+                    }
+                }
+
+                if (doArchive) {
+                    super.dbProxy.store(scalarEvent);
+                }
+
+                setLastValue(scalarEvent, scalarEvent.getReadValue());
+            } catch (final Exception e) {
+                logger.error("error storing attribute {}, {}",attributeName, e.getMessage());
+                logger.error("Problem storing value", e);
+
+                try_number--;
+                if (try_number > 0) {
+                    logger.debug("StateScalar.processEventScalar : retry " + try_number + "failed...");
+                    processEventScalar(scalarEvent, try_number);
+                }
+            }
+        }
+    }
+
+    @Override
+    public void stateChange(final AttributeStateEvent e) {
+    }
+
+    protected abstract int getWritableValue();
+
+    @Override
+    protected void treatErrorEventAfterLogging(ErrorEvent errorEvent) {
+        try {
+            processEventScalar(getNullValueScalarEvent(errorEvent, TangoConst.Tango_DEV_STATE, getWritableValue()),
+                    DEFAULT_TRY_NUMBER);
+        } catch (final Exception e) {
+            logger.error(this.getClass().getSimpleName() + ".errorChange : during processEventScalar creation execp : "
+                    + e);
+        }
+    }
+}
diff --git a/src/main/java/HdbArchiver/Collector/scalar/StateScalar_RO.java b/hdbarchiver/src/main/java/HdbArchiver/Collector/scalar/StateScalar_RO.java
similarity index 95%
rename from src/main/java/HdbArchiver/Collector/scalar/StateScalar_RO.java
rename to hdbarchiver/src/main/java/HdbArchiver/Collector/scalar/StateScalar_RO.java
index a1b2a67a0efc7e31b9aedbdf0af56b51f4153e4e..4f7d5e3fe5e2f97bc042e6c88dffbf2a0103f191 100644
--- a/src/main/java/HdbArchiver/Collector/scalar/StateScalar_RO.java
+++ b/hdbarchiver/src/main/java/HdbArchiver/Collector/scalar/StateScalar_RO.java
@@ -1,168 +1,166 @@
-// +======================================================================
-// $Source: /cvsroot/tango-cs/tango/jserver/archiving/HdbArchiver/Collector/scalar/StateScalar_RO.java,v $
-//
-// Project:      Tango Archiving Service
-//
-// Description:  Java source code for the class  StateScalar_RO.
-//						(Chinkumo Jean) - March 8, 2006
-//
-// $Author: pierrejoseph $
-//
-// $Revision: 1.9 $
-//
-// $Log: StateScalar_RO.java,v $
-// Revision 1.9  2007/10/03 15:23:29  pierrejoseph
-// Minor changes
-//
-// Revision 1.8  2007/09/28 14:49:23  pierrejoseph
-// Merged between Polling and Events code
-//
-//
-// copyleft :		Synchrotron SOLEIL
-//					L'Orme des Merisiers
-//					Saint-Aubin - BP 48
-//					91192 GIF-sur-YVETTE CEDEX
-//
-//-======================================================================
-package HdbArchiver.Collector.scalar;
-
-import org.slf4j.Logger;
-import org.tango.utils.DevFailedUtils;
-
-import HdbArchiver.Collector.HdbModeHandler;
-import fr.esrf.Tango.AttrDataFormat;
-import fr.esrf.Tango.AttrWriteType;
-import fr.esrf.Tango.DevFailed;
-import fr.esrf.TangoApi.DeviceAttribute;
-import fr.esrf.TangoApi.DeviceProxy;
-import fr.esrf.TangoApi.StateUtilities;
-import fr.esrf.TangoApi.events.TangoArchive;
-import fr.esrf.TangoApi.events.TangoArchiveEvent;
-import fr.esrf.tangoatk.core.DevStateScalarEvent;
-import fr.esrf.tangoatk.core.IDevStateScalar;
-import fr.soleil.archiving.hdbtdb.api.tools.ScalarEvent;
-
-//--------------------------------------------------------------------------//
-//ELETTRA : Archiving Events
-//--------------------------------------------------------------------------//
-public class StateScalar_RO extends StateScalar {
-
-    private static final long serialVersionUID = 7073927310923945926L;
-
-    public StateScalar_RO(final HdbModeHandler modeHandler, final Logger logger) {
-        super(modeHandler, logger);
-    }
-
-    @Override
-    protected int getWritableValue() {
-        return AttrWriteType._READ;
-    }
-
-    @Override
-    public void devStateScalarChange(final DevStateScalarEvent event) {
-        final int tryNumber = DEFAULT_TRY_NUMBER;
-        final ScalarEvent scalarEvent = new ScalarEvent();
-
-        String attributeName = ((IDevStateScalar) event.getSource()).getName();
-        try {
-            removeErrorMessage(attributeName);
-            scalarEvent.setAttributeCompleteName(attributeName);
-
-            scalarEvent.setDataFormat(AttrDataFormat._SCALAR);
-            scalarEvent.setWritable(getWritableValue());
-            scalarEvent.setDataType(((IDevStateScalar) event.getSource()).getAttribute().getType());
-
-            scalarEvent.setTimeStamp(event.getTimeStamp());
-            // --------------------------------------------------------------------------//
-            // ELETTRA : Archiving Events
-            // --------------------------------------------------------------------------//
-            /*
-             * String value = ( ( IDevStateScalar ) event).getValue();
-             */
-            // --------------------------------------------------------------------------//
-            // ELETTRA : Archiving Events
-            // --------------------------------------------------------------------------//
-            final String value = ((IDevStateScalar) event.getSource()).getValue();
-            scalarEvent.setValue(StateUtilities.getStateForName(value), null);
-            processEventScalar(scalarEvent, tryNumber);
-
-        } catch (final DevFailed devFailed) {
-            registerErrorMessage(attributeName, devFailed);
-            logger.error(DevFailedUtils.toString(devFailed));
-            scalarEvent.setValue(null, null);
-            processEventScalar(scalarEvent, tryNumber);
-        } catch (final Exception e) {
-            registerErrorMessage(attributeName, e);
-            scalarEvent.setValue(null, null);
-            processEventScalar(scalarEvent, tryNumber);
-
-            final String message = "Problem in StateScalar_RO/devStateScalarChange";
-            logger.error(message, e);
-        }
-    }
-
-    // --------------------------------------------------------------------------//
-    // ELETTRA : Archiving Events
-    // --------------------------------------------------------------------------//
-    @Override
-    public void archive(final TangoArchiveEvent event) {
-        final int tryNumber = DEFAULT_TRY_NUMBER;
-        DeviceAttribute attrib = null;
-        TangoArchive arch;
-        DeviceProxy proxy;
-
-        final ScalarEvent scalarEvent = new ScalarEvent();
-
-        try {
-            attrib = event.getValue();
-        } catch (final DevFailed f) {
-            logger.error(DevFailedUtils.toString(f));
-            return;
-        } catch (final Exception e) /* Shouldn't be reached */
-        {
-            logger.error("error", e);
-            return;
-        }
-
-        try {
-            /*
-             * To correctly archive the attribute, we have to know its complete
-             * name. To acquire this information, we must o back to the
-             * TangoArchive object (which contains the DeviceProxy).
-             */
-            arch = (TangoArchive) event.getSource();
-            proxy = arch.getEventSupplier(); /*
-                                              * The device that supplied the
-                                              * event
-                                              */
-            if (arch == null || proxy == null || attrib == null) {
-                logger.debug("\033[1;31mStateScalar_RO: event.getValue() or event.getSource() or event.getSource().getEventSupplier()) returned null!\033[0m");
-                return;
-            }
-            logger.debug(proxy.name() + ": " + attrib.getName() + "{state scalar, RO} [\033[1;32mEVENT\033[0m]: ");
-
-            scalarEvent.setAttributeCompleteName(proxy.name() + "/" + attrib.getName());
-            scalarEvent.setTimeStamp(attrib.getTime());
-            scalarEvent.setDataFormat(AttrDataFormat._SCALAR);
-            scalarEvent.setWritable(AttrWriteType._READ);
-            scalarEvent.setDataType(attrib.getType());
-
-            scalarEvent.setValue(attrib.extractState(), null);
-            processEventScalar(scalarEvent, tryNumber);
-            logger.debug("state: {}", attrib.extractState());
-
-        } catch (final DevFailed devFailed) {
-            logger.error(DevFailedUtils.toString(devFailed));
-            scalarEvent.setValue(null, null);
-            processEventScalar(scalarEvent, tryNumber);
-        } catch (final Exception exE) {
-            logger.error("error", exE);
-            scalarEvent.setValue(null, null);
-            processEventScalar(scalarEvent, tryNumber);
-        }
-
-    }
-    // --------------------------------------------------------------------------//
-    // ELETTRA : Archiving Events
-    // --------------------------------------------------------------------------//
-}
+// +======================================================================
+// $Source: /cvsroot/tango-cs/tango/jserver/archiving/HdbArchiver/Collector/scalar/StateScalar_RO.java,v $
+//
+// Project:      Tango Archiving Service
+//
+// Description:  Java source code for the class  StateScalar_RO.
+//						(Chinkumo Jean) - March 8, 2006
+//
+// $Author: pierrejoseph $
+//
+// $Revision: 1.9 $
+//
+// $Log: StateScalar_RO.java,v $
+// Revision 1.9  2007/10/03 15:23:29  pierrejoseph
+// Minor changes
+//
+// Revision 1.8  2007/09/28 14:49:23  pierrejoseph
+// Merged between Polling and Events code
+//
+//
+// copyleft :		Synchrotron SOLEIL
+//					L'Orme des Merisiers
+//					Saint-Aubin - BP 48
+//					91192 GIF-sur-YVETTE CEDEX
+//
+//-======================================================================
+package HdbArchiver.Collector.scalar;
+
+import HdbArchiver.Collector.HdbModeHandler;
+import fr.esrf.Tango.AttrDataFormat;
+import fr.esrf.Tango.AttrWriteType;
+import fr.esrf.Tango.DevFailed;
+import fr.esrf.TangoApi.DeviceAttribute;
+import fr.esrf.TangoApi.DeviceProxy;
+import fr.esrf.TangoApi.StateUtilities;
+import fr.esrf.TangoApi.events.TangoArchive;
+import fr.esrf.TangoApi.events.TangoArchiveEvent;
+import fr.esrf.tangoatk.core.DevStateScalarEvent;
+import fr.esrf.tangoatk.core.IDevStateScalar;
+import fr.soleil.archiving.hdbtdb.api.tools.ScalarEvent;
+import org.slf4j.Logger;
+import org.tango.utils.DevFailedUtils;
+
+//--------------------------------------------------------------------------//
+//ELETTRA : Archiving Events
+//--------------------------------------------------------------------------//
+public class StateScalar_RO extends StateScalar {
+
+    private static final long serialVersionUID = 7073927310923945926L;
+
+    public StateScalar_RO(final HdbModeHandler modeHandler, final boolean useEvents, final Logger logger) {
+        super(modeHandler, useEvents, logger);
+    }
+
+    @Override
+    protected int getWritableValue() {
+        return AttrWriteType._READ;
+    }
+
+    @Override
+    public void devStateScalarChange(final DevStateScalarEvent event) {
+        final int tryNumber = DEFAULT_TRY_NUMBER;
+        final ScalarEvent scalarEvent = new ScalarEvent();
+
+        String attributeName = ((IDevStateScalar) event.getSource()).getName();
+        try {
+            removeErrorMessage(attributeName);
+            scalarEvent.setAttributeCompleteName(attributeName);
+
+            scalarEvent.setDataFormat(AttrDataFormat._SCALAR);
+            scalarEvent.setWritable(getWritableValue());
+            scalarEvent.setDataType(((IDevStateScalar) event.getSource()).getAttribute().getType());
+
+            scalarEvent.setTimeStamp(event.getTimeStamp());
+            // --------------------------------------------------------------------------//
+            // ELETTRA : Archiving Events
+            // --------------------------------------------------------------------------//
+            /*
+             * String value = ( ( IDevStateScalar ) event).getValue();
+             */
+            // --------------------------------------------------------------------------//
+            // ELETTRA : Archiving Events
+            // --------------------------------------------------------------------------//
+            final String value = ((IDevStateScalar) event.getSource()).getValue();
+            scalarEvent.setValue(StateUtilities.getStateForName(value), null);
+            processEventScalar(scalarEvent, tryNumber);
+
+        } catch (final DevFailed devFailed) {
+            registerErrorMessage(attributeName, devFailed);
+            logger.error(DevFailedUtils.toString(devFailed));
+            scalarEvent.setValue(null, null);
+            processEventScalar(scalarEvent, tryNumber);
+        } catch (final Exception e) {
+            registerErrorMessage(attributeName, e);
+            scalarEvent.setValue(null, null);
+            processEventScalar(scalarEvent, tryNumber);
+
+            final String message = "Problem in StateScalar_RO/devStateScalarChange";
+            logger.error(message, e);
+        }
+    }
+
+    // --------------------------------------------------------------------------//
+    // ELETTRA : Archiving Events
+    // --------------------------------------------------------------------------//
+    @Override
+    public void archive(final TangoArchiveEvent event) {
+        final int tryNumber = DEFAULT_TRY_NUMBER;
+        DeviceAttribute attrib = null;
+        TangoArchive arch;
+        DeviceProxy proxy;
+
+        final ScalarEvent scalarEvent = new ScalarEvent();
+
+        try {
+            attrib = event.getValue();
+        } catch (final DevFailed f) {
+            logger.error(DevFailedUtils.toString(f));
+            return;
+        } catch (final Exception e) /* Shouldn't be reached */ {
+            logger.error("error", e);
+            return;
+        }
+
+        try {
+            /*
+             * To correctly archive the attribute, we have to know its complete
+             * name. To acquire this information, we must o back to the
+             * TangoArchive object (which contains the DeviceProxy).
+             */
+            arch = (TangoArchive) event.getSource();
+            proxy = arch.getEventSupplier(); /*
+                                              * The device that supplied the
+                                              * event
+                                              */
+            if (arch == null || proxy == null || attrib == null) {
+                logger.debug("\033[1;31mStateScalar_RO: event.getValue() or event.getSource() or event.getSource().getEventSupplier()) returned null!\033[0m");
+                return;
+            }
+            logger.debug(proxy.name() + ": " + attrib.getName() + "{state scalar, RO} [\033[1;32mEVENT\033[0m]: ");
+
+            scalarEvent.setAttributeCompleteName(proxy.name() + "/" + attrib.getName());
+            scalarEvent.setTimeStamp(attrib.getTime());
+            scalarEvent.setDataFormat(AttrDataFormat._SCALAR);
+            scalarEvent.setWritable(AttrWriteType._READ);
+            scalarEvent.setDataType(attrib.getType());
+
+            scalarEvent.setValue(attrib.extractState(), null);
+            processEventScalar(scalarEvent, tryNumber);
+            logger.debug("state: {}", attrib.extractState());
+
+        } catch (final DevFailed devFailed) {
+            logger.error(DevFailedUtils.toString(devFailed));
+            scalarEvent.setValue(null, null);
+            processEventScalar(scalarEvent, tryNumber);
+        } catch (final Exception exE) {
+            logger.error("error", exE);
+            scalarEvent.setValue(null, null);
+            processEventScalar(scalarEvent, tryNumber);
+        }
+
+    }
+    // --------------------------------------------------------------------------//
+    // ELETTRA : Archiving Events
+    // --------------------------------------------------------------------------//
+}
diff --git a/src/main/java/HdbArchiver/Collector/scalar/StringScalar.java b/hdbarchiver/src/main/java/HdbArchiver/Collector/scalar/StringScalar.java
similarity index 94%
rename from src/main/java/HdbArchiver/Collector/scalar/StringScalar.java
rename to hdbarchiver/src/main/java/HdbArchiver/Collector/scalar/StringScalar.java
index 6baf166defca4bc71256b4703b056780ccbb40bd..461cc78a8ced910b7bfd2644e45df6b441922cdc 100644
--- a/src/main/java/HdbArchiver/Collector/scalar/StringScalar.java
+++ b/hdbarchiver/src/main/java/HdbArchiver/Collector/scalar/StringScalar.java
@@ -1,341 +1,332 @@
-// +======================================================================
-// $Source: /cvsroot/tango-cs/tango/jserver/archiving/HdbArchiver/Collector/scalar/StringScalar.java,v $
-//
-// Project:      Tango Archiving Service
-//
-// Description:  Java source code for the class  StringScalar.
-//						(Chinkumo Jean) - Feb. 28, 2006
-//
-// $Author: pierrejoseph $
-//
-// $Revision: 1.16 $
-//
-// $Log: StringScalar.java,v $
-// Revision 1.16  2007/10/03 15:23:29  pierrejoseph
-// Minor changes
-//
-// Revision 1.15  2007/09/28 14:49:23  pierrejoseph
-// Merged between Polling and Events code
-//
-//
-// copyleft :		Synchrotron SOLEIL
-//					L'Orme des Merisiers
-//					Saint-Aubin - BP 48
-//					91192 GIF-sur-YVETTE CEDEX
-//
-//-======================================================================
-
-package HdbArchiver.Collector.scalar;
-
-import java.util.HashMap;
-import java.util.Map;
-
-import org.slf4j.Logger;
-import org.tango.utils.DevFailedUtils;
-
-import Common.Archiver.Collector.ModesCounters;
-import HdbArchiver.HdbArchiver;
-import HdbArchiver.Collector.HdbCollector;
-import HdbArchiver.Collector.HdbModeHandler;
-import fr.esrf.Tango.DevError;
-import fr.esrf.Tango.DevFailed;
-import fr.esrf.Tango.ErrSeverity;
-import fr.esrf.TangoApi.events.ITangoArchiveListener;
-import fr.esrf.TangoApi.events.TangoEventsAdapter;
-import fr.esrf.TangoDs.TangoConst;
-import fr.esrf.TangoDs.Util;
-import fr.esrf.tangoatk.core.AttributeStateEvent;
-import fr.esrf.tangoatk.core.ConnectionException;
-import fr.esrf.tangoatk.core.Device;
-import fr.esrf.tangoatk.core.ErrorEvent;
-import fr.esrf.tangoatk.core.IStringScalar;
-import fr.esrf.tangoatk.core.IStringScalarListener;
-import fr.esrf.tangoatk.core.attribute.AttributeFactory;
-import fr.soleil.archiving.common.api.exception.ArchivingException;
-import fr.soleil.archiving.common.api.tools.GlobalConst;
-import fr.soleil.archiving.hdbtdb.api.tools.AttributeLightMode;
-import fr.soleil.archiving.hdbtdb.api.tools.ScalarEvent;
-
-//--------------------------------------------------------------------------//
-//ELETTRA : Archiving Events
-//--------------------------------------------------------------------------//
-public abstract class StringScalar extends HdbCollector implements IStringScalarListener, ITangoArchiveListener {
-
-    private static final long serialVersionUID = -78967585352670881L;
-
-    private final Map<Device, TangoEventsAdapter> evtAdaptHMap;
-
-    public StringScalar(final HdbModeHandler modeHandler, final Logger logger) {
-        super(modeHandler, logger);
-
-        evtAdaptHMap = new HashMap<Device, TangoEventsAdapter>();
-    }
-
-    @Override
-    public synchronized void removeSource(final String attributeName) throws ArchivingException {
-        logger.debug("StringScalar.removeSource");
-
-        if (HdbArchiver.isUseEvents) {
-            removeSourceForEvents(attributeName);
-        }
-        try {
-            /*
-             * while ( ( IStringScalar ) attributeList.get(attributeName) !=
-             * null ) {
-             */
-            stopCollecting();
-            final IStringScalar attribute = (IStringScalar) attributeList.get(attributeName);
-            if (attribute != null) {
-                attribute.removeStringScalarListener(this);
-                attribute.removeErrorListener(this);
-                attributeList.remove(attributeName);
-                isFirstValueList.remove(attributeName.toLowerCase());
-                logger.debug("\t The attribute named " + attributeName + " was fired from the Collector list...");
-                // informs the mother class that one new attribute must be
-                // removed
-                removeAttribute(attributeName);
-                removeTimestamps(attributeName);
-                removeErrorMessage(attributeName);
-                Util.out4.println("\t The attribute named " + attributeName + " was fired from the Collector list...");
-            }
-        } catch (final Exception e) {
-            final String message = GlobalConst.ARCHIVING_ERROR_PREFIX + "Failed removing '" + attributeName
-                    + "' from sources";
-            final String reason = GlobalConst.TANGO_COMM_EXCEPTION;
-            final String desc = "Failed while executing " + this.getClass().getSimpleName()
-                    + ".removeSource() method...";
-            throw new ArchivingException(message, reason, ErrSeverity.WARN, desc, "", e);
-        } finally {
-            startCollecting();
-        }
-    }
-
-    @Override
-    protected void doAddSourceForPolling(final AttributeLightMode attributeLightMode) throws ArchivingException {
-        try {
-            final String attName = attributeLightMode.getAttributeCompleteName();
-            if (attName != null) {
-                stopCollecting();
-                IStringScalar attribute = null;
-                attribute = (IStringScalar) attributeList.add(attName);
-
-                attribute.addStringScalarListener(this);
-                attribute.addErrorListener(this);
-                // informs the mother class that one new attribute must be
-                // managed
-                addAttribute(attName);
-                logger.debug("add archiving for " + attName);
-            }
-        } catch (final ConnectionException e) {
-            final String message = GlobalConst.ARCHIVING_ERROR_PREFIX + "Failed adding '"
-                    + attributeLightMode.getAttributeCompleteName() + "' as source";
-            final String reason = GlobalConst.TANGO_COMM_EXCEPTION;
-            final String desc = "Failed while executing " + this.getClass().getSimpleName() + ".addSource() method...";
-            throw new ArchivingException(message, reason, ErrSeverity.WARN, desc, "", e);
-
-        } catch (final Exception e) {
-            final String message = GlobalConst.ARCHIVING_ERROR_PREFIX + "Failed adding '"
-                    + attributeLightMode.getAttributeCompleteName() + "' as source";
-            final String reason = GlobalConst.TANGO_COMM_EXCEPTION;
-            final String desc = "Failed while executing " + this.getClass().getSimpleName() + ".addSource() method...";
-            throw new ArchivingException(message, reason, ErrSeverity.WARN, desc, "", e);
-        } finally {
-            startCollecting();
-        }
-    }
-
-    // --------------------------------------------------------------------------//
-    // ELETTRA : Archiving Events
-    // --------------------------------------------------------------------------//
-    @Override
-    protected void addSourceForEvents(final AttributeLightMode attributeLightMode) throws ArchivingException {
-        /* Adapter for the Tango archive events */
-        TangoEventsAdapter evtAdapt = null;
-        IStringScalar attribute = null;
-
-        try {
-            /*
-             * Get the attribute from the AttributeFactory, so that it is not
-             * added to the attribute polled list. Remember that `attributeList'
-             * is an AttributePolledList().
-             */
-            attribute = (IStringScalar) AttributeFactory.getInstance().getAttribute(
-                    attributeLightMode.getAttributeCompleteName());
-            if (attribute == null) {
-                logger.debug("\033[1;31mStringScalar.java: the attribute \""
-                        + attributeLightMode.getAttributeCompleteName()
-                        + " is null (StringScalar.java): not adding it!");
-                return;
-            }
-        } catch (final DevFailed e) {
-            logger.error(DevFailedUtils.toString(e));
-            final String message = GlobalConst.ARCHIVING_ERROR_PREFIX + "Failed adding '"
-                    + attributeLightMode.getAttributeCompleteName() + "' as source";
-            final String reason = "DevFailed exception while calling AttributeFactory.getInstance().getAttribute();";
-            final String desc = "Failed while executing Spectrum_RW.addSource() method...\nSpectrum_RW.java: Failed to get the attribute from the AttributeFactory";
-            throw new ArchivingException(message, reason, ErrSeverity.WARN, desc, "", e);
-        } catch (final ConnectionException e) {
-            final String message = GlobalConst.ARCHIVING_ERROR_PREFIX + "Failed adding '"
-                    + attributeLightMode.getAttributeCompleteName() + "' as source";
-            final String reason = GlobalConst.TANGO_COMM_EXCEPTION;
-            final String desc = "Failed while executing StringScalar.addSource() method...\nStateScalar.java: Failed to get the attribute from the AttributeFactory";
-            throw new ArchivingException(message, reason, ErrSeverity.WARN, desc, "", e);
-        } /*
-           * end of first try/catch block, to retrieve the attribute from the
-           * AttributeFactory
-           */
-
-        logger.debug("scalar attribute \"" + attribute.getNameSansDevice() + "\"...\t");
-
-        /*
-         * If an attribute (name + device server) is already in the map, it
-         * means it has already been registered for the Tango Archive events. So
-         * it does not have to be added to the archive events once again, nor to
-         * the attributePolledList: we can return. The same goes for an
-         * attribute already present in the attributePolledList `attributeList'.
-         */
-        /*
-         * if(HdbArchiver.useEvents.equalsIgnoreCase("no")) {
-         * System.out.print("[\033[1;35mEVENTS DISABLED\033[0m]. ");
-         * registerForScalarListener(attributeLightMode); } else {
-         */
-        try {
-            synchronized (evtAdaptHMap) {
-                evtAdapt = evtAdaptHMap.get(attribute.getDevice());
-                if (evtAdapt == null) {
-                    evtAdapt = new TangoEventsAdapter(attribute.getDevice());
-                    evtAdaptHMap.put(attribute.getDevice(), evtAdapt);
-                } else {
-                    System.out.println("\nThe adapter for the attribute is already configured");
-                }
-            }
-            final String[] filter = new String[0];
-
-            /*
-             * Try to register for the archive events: evtAdapt is the new
-             * adapter or the one already found in the map.
-             */
-            evtAdapt.addTangoArchiveListener(this, attribute.getNameSansDevice(), filter);
-            archiveListenersCounter++;
-            System.out.println("[\033[1;32mEVENTS\033[0m].");
-        } catch (final DevFailed e) {
-            /*
-             * If archive events are not enabled for the attribute, we will poll
-             * it
-             */
-            for (final DevError error : e.errors) {
-                // // System.out.println("error registering: " +
-                // e.errors[err].desc);
-                if (error.desc.contains("Already connected to event")) {
-                    System.out.println("Already connected to events for attribute");
-                    return;
-                }
-            }
-            /* Register for polling */
-            addSourceForPolling(attributeLightMode);
-            /* unlock the attributeList */
-        }
-        // } /* function finishes */
-    }
-
-    private void removeSourceForEvents(final String attributeName) {
-        Util.out2.println("StringScalar.removeSource");
-        System.out.print("state: removing source for \"" + attributeName + "\"...\t");
-        final TangoEventsAdapter adapter;
-        final IStringScalar attribute;
-        /*
-         * If useEvents is enabled, we should remove the eventListener, if not
-         * we can skip this piece of code
-         */
-        // if (HdbArchiver.useEvents.equalsIgnoreCase("yes"))
-        // {
-        try {
-            synchronized (evtAdaptHMap) {
-                attribute = (IStringScalar) AttributeFactory.getInstance().getAttribute(attributeName);
-                /*
-                 * Retrieve in the hash table the event adapter associated to
-                 * the attributeName.
-                 */
-                if (attribute == null) {
-                    System.out.println("\033[1;31mThe attribute " + attributeName + " is null\033[0m");
-                }
-                adapter = evtAdaptHMap.get(attribute.getDevice());
-
-                if (adapter != null) {
-                    adapter.removeTangoArchiveListener(this, attribute.getNameSansDevice());
-                    archiveListenersCounter--;
-                    System.out.println("[\033[1;32mEVENTS\033[0m].");
-                    Util.out2.println(" (adapter: " + adapter.device_name() + ")");
-                    /* Should be ok now to return */
-                    return;
-                }
-            } /* unlock event adapters map */
-        } catch (final ConnectionException e) /* getAttribute() failed */
-        {
-            logger.error("error", e);
-        } catch (final DevFailed f) {
-            logger.error(DevFailedUtils.toString(f));
-        }
-        // }
-    }
-
-    // --------------------------------------------------------------------------//
-    // ELETTRA : Archiving Events
-    // --------------------------------------------------------------------------//
-
-    @Override
-    public void stateChange(final AttributeStateEvent e) {
-    }
-
-    public void processEventScalar(final ScalarEvent scalarEvent, int try_number) {
-        if (isDataArchivableTimestampWise(scalarEvent)) {
-            final String attributeName = scalarEvent.getAttributeCompleteName();
-            try {
-                boolean doArchive = false;
-                if (isFirstValueList.get(attributeName.toLowerCase())) {
-                    doArchive = true;
-                    isFirstValueList.put(attributeName.toLowerCase(), false);
-                    logger.debug(attributeName + " first value, forcing archiving");
-                } else {
-
-                    final ModesCounters mc = getModeCounter(attributeName);
-                    if (mc == null) {
-                        logger.debug(attributeName + " Attribute Counters unknown");
-                    } else {
-                        doArchive = doArchiveEvent(mc, scalarEvent.getDataType(), scalarEvent.getReadValue(),
-                                getLastValue(scalarEvent), attributeName);
-                    }
-                }
-
-                if (doArchive) {
-                    super.dbProxy.store(scalarEvent);
-                }
-
-                setLastValue(scalarEvent, scalarEvent.getReadValue());
-            } catch (final Exception e) {
-                registerErrorMessage(attributeName, e.getMessage());
-                final String message = "Problem storing StringScalar value";
-                logger.error(message);
-
-                try_number--;
-                if (try_number > 0) {
-                    logger.debug("NumberScalar.processEventScalar : retry " + try_number + "failed...");
-                    processEventScalar(scalarEvent, try_number);
-                }
-            }
-        }
-    }
-
-    protected abstract int getWritableValue();
-
-    @Override
-    protected void treatErrorEventAfterLogging(ErrorEvent errorEvent) {
-        try {
-            processEventScalar(getNullValueScalarEvent(errorEvent, TangoConst.Tango_DEV_STRING, getWritableValue()),
-                    DEFAULT_TRY_NUMBER);
-        } catch (final Exception e) {
-            logger.error(this.getClass().getSimpleName() + ".errorChange : during processEventScalar creation execp : "
-                    + e);
-        }
-    }
-}
+// +======================================================================
+// $Source: /cvsroot/tango-cs/tango/jserver/archiving/HdbArchiver/Collector/scalar/StringScalar.java,v $
+//
+// Project:      Tango Archiving Service
+//
+// Description:  Java source code for the class  StringScalar.
+//						(Chinkumo Jean) - Feb. 28, 2006
+//
+// $Author: pierrejoseph $
+//
+// $Revision: 1.16 $
+//
+// $Log: StringScalar.java,v $
+// Revision 1.16  2007/10/03 15:23:29  pierrejoseph
+// Minor changes
+//
+// Revision 1.15  2007/09/28 14:49:23  pierrejoseph
+// Merged between Polling and Events code
+//
+//
+// copyleft :		Synchrotron SOLEIL
+//					L'Orme des Merisiers
+//					Saint-Aubin - BP 48
+//					91192 GIF-sur-YVETTE CEDEX
+//
+//-======================================================================
+
+package HdbArchiver.Collector.scalar;
+
+import Common.Archiver.Collector.ModesCounters;
+import HdbArchiver.Collector.HdbCollector;
+import HdbArchiver.Collector.HdbModeHandler;
+import fr.esrf.Tango.DevError;
+import fr.esrf.Tango.DevFailed;
+import fr.esrf.Tango.ErrSeverity;
+import fr.esrf.TangoApi.events.ITangoArchiveListener;
+import fr.esrf.TangoApi.events.TangoEventsAdapter;
+import fr.esrf.TangoDs.TangoConst;
+import fr.esrf.TangoDs.Util;
+import fr.esrf.tangoatk.core.*;
+import fr.esrf.tangoatk.core.attribute.AttributeFactory;
+import fr.soleil.archiving.common.api.exception.ArchivingException;
+import fr.soleil.archiving.common.api.tools.GlobalConst;
+import fr.soleil.archiving.hdbtdb.api.tools.AttributeLightMode;
+import fr.soleil.archiving.hdbtdb.api.tools.ScalarEvent;
+import org.slf4j.Logger;
+import org.tango.utils.DevFailedUtils;
+
+import java.util.HashMap;
+import java.util.Map;
+
+//--------------------------------------------------------------------------//
+//ELETTRA : Archiving Events
+//--------------------------------------------------------------------------//
+public abstract class StringScalar extends HdbCollector implements IStringScalarListener, ITangoArchiveListener {
+
+    private static final long serialVersionUID = -78967585352670881L;
+
+    private final Map<Device, TangoEventsAdapter> evtAdaptHMap;
+
+    public StringScalar(final HdbModeHandler modeHandler, boolean useEvents, final Logger logger) {
+        super(modeHandler, useEvents, logger);
+
+        evtAdaptHMap = new HashMap<Device, TangoEventsAdapter>();
+    }
+
+    @Override
+    public synchronized void removeSource(final String attributeName) throws ArchivingException {
+        logger.debug("StringScalar.removeSource");
+
+        if (useEvents) {
+            removeSourceForEvents(attributeName);
+        }
+        try {
+            /*
+             * while ( ( IStringScalar ) attributeList.get(attributeName) !=
+             * null ) {
+             */
+            stopCollecting();
+            final IStringScalar attribute = (IStringScalar) attributeList.get(attributeName);
+            if (attribute != null) {
+                attribute.removeStringScalarListener(this);
+                attribute.removeErrorListener(this);
+                attributeList.remove(attributeName);
+                isFirstValueList.remove(attributeName.toLowerCase());
+                logger.debug("\t The attribute named " + attributeName + " was fired from the Collector list...");
+                // informs the mother class that one new attribute must be
+                // removed
+                removeAttribute(attributeName);
+                removeTimestamps(attributeName);
+                removeErrorMessage(attributeName);
+            }
+        } catch (final Exception e) {
+            final String message = GlobalConst.ARCHIVING_ERROR_PREFIX + "Failed removing '" + attributeName
+                    + "' from sources";
+            final String reason = GlobalConst.TANGO_COMM_EXCEPTION;
+            final String desc = "Failed while executing " + this.getClass().getSimpleName()
+                    + ".removeSource() method...";
+            throw new ArchivingException(message, reason, ErrSeverity.WARN, desc, "", e);
+        } finally {
+            startCollecting();
+        }
+    }
+
+    @Override
+    protected void doAddSourceForPolling(final AttributeLightMode attributeLightMode) throws ArchivingException {
+        try {
+            final String attName = attributeLightMode.getAttributeCompleteName();
+            if (attName != null) {
+                stopCollecting();
+                IStringScalar attribute = null;
+                attribute = (IStringScalar) attributeList.add(attName);
+
+                attribute.addStringScalarListener(this);
+                attribute.addErrorListener(this);
+                // informs the mother class that one new attribute must be
+                // managed
+                addAttribute(attName);
+                logger.debug("add archiving for " + attName);
+            }
+        } catch (final ConnectionException e) {
+            final String message = GlobalConst.ARCHIVING_ERROR_PREFIX + "Failed adding '"
+                    + attributeLightMode.getAttributeCompleteName() + "' as source";
+            final String reason = GlobalConst.TANGO_COMM_EXCEPTION;
+            final String desc = "Failed while executing " + this.getClass().getSimpleName() + ".addSource() method...";
+            throw new ArchivingException(message, reason, ErrSeverity.WARN, desc, "", e);
+
+        } catch (final Exception e) {
+            final String message = GlobalConst.ARCHIVING_ERROR_PREFIX + "Failed adding '"
+                    + attributeLightMode.getAttributeCompleteName() + "' as source";
+            final String reason = GlobalConst.TANGO_COMM_EXCEPTION;
+            final String desc = "Failed while executing " + this.getClass().getSimpleName() + ".addSource() method...";
+            throw new ArchivingException(message, reason, ErrSeverity.WARN, desc, "", e);
+        } finally {
+            startCollecting();
+        }
+    }
+
+    // --------------------------------------------------------------------------//
+    // ELETTRA : Archiving Events
+    // --------------------------------------------------------------------------//
+    @Override
+    protected void addSourceForEvents(final AttributeLightMode attributeLightMode) throws ArchivingException {
+        /* Adapter for the Tango archive events */
+        TangoEventsAdapter evtAdapt = null;
+        IStringScalar attribute = null;
+
+        try {
+            /*
+             * Get the attribute from the AttributeFactory, so that it is not
+             * added to the attribute polled list. Remember that `attributeList'
+             * is an AttributePolledList().
+             */
+            attribute = (IStringScalar) AttributeFactory.getInstance().getAttribute(
+                    attributeLightMode.getAttributeCompleteName());
+            if (attribute == null) {
+                logger.debug("\033[1;31mStringScalar.java: the attribute \""
+                        + attributeLightMode.getAttributeCompleteName()
+                        + " is null (StringScalar.java): not adding it!");
+                return;
+            }
+        } catch (final DevFailed e) {
+            logger.error(DevFailedUtils.toString(e));
+            final String message = GlobalConst.ARCHIVING_ERROR_PREFIX + "Failed adding '"
+                    + attributeLightMode.getAttributeCompleteName() + "' as source";
+            final String reason = "DevFailed exception while calling AttributeFactory.getInstance().getAttribute();";
+            final String desc = "Failed while executing Spectrum_RW.addSource() method...\nSpectrum_RW.java: Failed to get the attribute from the AttributeFactory";
+            throw new ArchivingException(message, reason, ErrSeverity.WARN, desc, "", e);
+        } catch (final ConnectionException e) {
+            final String message = GlobalConst.ARCHIVING_ERROR_PREFIX + "Failed adding '"
+                    + attributeLightMode.getAttributeCompleteName() + "' as source";
+            final String reason = GlobalConst.TANGO_COMM_EXCEPTION;
+            final String desc = "Failed while executing StringScalar.addSource() method...\nStateScalar.java: Failed to get the attribute from the AttributeFactory";
+            throw new ArchivingException(message, reason, ErrSeverity.WARN, desc, "", e);
+        } /*
+           * end of first try/catch block, to retrieve the attribute from the
+           * AttributeFactory
+           */
+
+        logger.debug("scalar attribute \"" + attribute.getNameSansDevice() + "\"...\t");
+
+        /*
+         * If an attribute (name + device server) is already in the map, it
+         * means it has already been registered for the Tango Archive events. So
+         * it does not have to be added to the archive events once again, nor to
+         * the attributePolledList: we can return. The same goes for an
+         * attribute already present in the attributePolledList `attributeList'.
+         */
+        /*
+         * if(HdbArchiver.useEvents.equalsIgnoreCase("no")) {
+         * System.out.print("[\033[1;35mEVENTS DISABLED\033[0m]. ");
+         * registerForScalarListener(attributeLightMode); } else {
+         */
+        try {
+            synchronized (evtAdaptHMap) {
+                evtAdapt = evtAdaptHMap.get(attribute.getDevice());
+                if (evtAdapt == null) {
+                    evtAdapt = new TangoEventsAdapter(attribute.getDevice());
+                    evtAdaptHMap.put(attribute.getDevice(), evtAdapt);
+                } else {
+                    System.out.println("\nThe adapter for the attribute is already configured");
+                }
+            }
+            final String[] filter = new String[0];
+
+            /*
+             * Try to register for the archive events: evtAdapt is the new
+             * adapter or the one already found in the map.
+             */
+            evtAdapt.addTangoArchiveListener(this, attribute.getNameSansDevice(), filter);
+            archiveListenersCounter++;
+            System.out.println("[\033[1;32mEVENTS\033[0m].");
+        } catch (final DevFailed e) {
+            /*
+             * If archive events are not enabled for the attribute, we will poll
+             * it
+             */
+            for (final DevError error : e.errors) {
+                // // System.out.println("error registering: " +
+                // e.errors[err].desc);
+                if (error.desc.contains("Already connected to event")) {
+                    System.out.println("Already connected to events for attribute");
+                    return;
+                }
+            }
+            /* Register for polling */
+            addSourceForPolling(attributeLightMode);
+            /* unlock the attributeList */
+        }
+        // } /* function finishes */
+    }
+
+    private void removeSourceForEvents(final String attributeName) {
+        System.out.print("state: removing source for \"" + attributeName + "\"...\t");
+        final TangoEventsAdapter adapter;
+        final IStringScalar attribute;
+        /*
+         * If useEvents is enabled, we should remove the eventListener, if not
+         * we can skip this piece of code
+         */
+        // if (HdbArchiver.useEvents.equalsIgnoreCase("yes"))
+        // {
+        try {
+            synchronized (evtAdaptHMap) {
+                attribute = (IStringScalar) AttributeFactory.getInstance().getAttribute(attributeName);
+                /*
+                 * Retrieve in the hash table the event adapter associated to
+                 * the attributeName.
+                 */
+                if (attribute == null) {
+                    System.out.println("\033[1;31mThe attribute " + attributeName + " is null\033[0m");
+                }
+                adapter = evtAdaptHMap.get(attribute.getDevice());
+
+                if (adapter != null) {
+                    adapter.removeTangoArchiveListener(this, attribute.getNameSansDevice());
+                    archiveListenersCounter--;
+                    System.out.println("[\033[1;32mEVENTS\033[0m].");
+                    /* Should be ok now to return */
+                    return;
+                }
+            } /* unlock event adapters map */
+        } catch (final ConnectionException e) /* getAttribute() failed */ {
+            logger.error("error", e);
+        } catch (final DevFailed f) {
+            logger.error(DevFailedUtils.toString(f));
+        }
+        // }
+    }
+
+    // --------------------------------------------------------------------------//
+    // ELETTRA : Archiving Events
+    // --------------------------------------------------------------------------//
+
+    @Override
+    public void stateChange(final AttributeStateEvent e) {
+    }
+
+    public void processEventScalar(final ScalarEvent scalarEvent, int try_number) {
+        if (isDataArchivableTimestampWise(scalarEvent)) {
+            final String attributeName = scalarEvent.getAttributeCompleteName();
+            try {
+                boolean doArchive = false;
+                if (isFirstValueList.get(attributeName.toLowerCase())) {
+                    doArchive = true;
+                    isFirstValueList.put(attributeName.toLowerCase(), false);
+                    logger.debug(attributeName + " first value, forcing archiving");
+                } else {
+
+                    final ModesCounters mc = getModeCounter(attributeName);
+                    if (mc == null) {
+                        logger.debug(attributeName + " Attribute Counters unknown");
+                    } else {
+                        doArchive = doArchiveEvent(mc, scalarEvent.getDataType(), scalarEvent.getReadValue(),
+                                getLastValue(scalarEvent), attributeName);
+                    }
+                }
+
+                if (doArchive) {
+                    super.dbProxy.store(scalarEvent);
+                }
+                System.out.println("insert " + scalarEvent);
+                setLastValue(scalarEvent, scalarEvent.getReadValue());
+            } catch (final Exception e) {
+                e.printStackTrace();
+                System.out.println(e.getMessage());
+                registerErrorMessage(attributeName, e.getMessage());
+                logger.error("error storing attribute {}, {}",attributeName, e.getMessage());
+                logger.error("Problem storing value", e);
+
+                try_number--;
+                if (try_number > 0) {
+                    logger.debug("NumberScalar.processEventScalar : retry " + try_number + "failed...");
+                    processEventScalar(scalarEvent, try_number);
+                }
+            }
+        }
+    }
+
+    protected abstract int getWritableValue();
+
+    @Override
+    protected void treatErrorEventAfterLogging(ErrorEvent errorEvent) {
+        try {
+            processEventScalar(getNullValueScalarEvent(errorEvent, TangoConst.Tango_DEV_STRING, getWritableValue()),
+                    DEFAULT_TRY_NUMBER);
+        } catch (final Exception e) {
+            logger.error(this.getClass().getSimpleName() + ".errorChange : during processEventScalar creation execp : "
+                    + e);
+        }
+    }
+}
diff --git a/src/main/java/HdbArchiver/Collector/scalar/StringScalar_RO.java b/hdbarchiver/src/main/java/HdbArchiver/Collector/scalar/StringScalar_RO.java
similarity index 95%
rename from src/main/java/HdbArchiver/Collector/scalar/StringScalar_RO.java
rename to hdbarchiver/src/main/java/HdbArchiver/Collector/scalar/StringScalar_RO.java
index e57eedbeab0673b76123a2b0aebe018f0ba0fb19..d65354b56fb0247009aeca379d0c356a4603dc35 100644
--- a/src/main/java/HdbArchiver/Collector/scalar/StringScalar_RO.java
+++ b/hdbarchiver/src/main/java/HdbArchiver/Collector/scalar/StringScalar_RO.java
@@ -1,169 +1,167 @@
-// +======================================================================
-// $Source: /cvsroot/tango-cs/tango/jserver/archiving/HdbArchiver/Collector/scalar/StringScalar_RO.java,v $
-//
-// Project:      Tango Archiving Service
-//
-// Description:  Java source code for the class  StringScalar_RO.
-//						(Chinkumo Jean) - Feb 28, 2006
-//
-// $Author: pierrejoseph $
-//
-// $Revision: 1.9 $
-//
-// $Log: StringScalar_RO.java,v $
-// Revision 1.9  2007/10/03 15:23:29  pierrejoseph
-// Minor changes
-//
-// Revision 1.8  2007/09/28 14:49:23  pierrejoseph
-// Merged between Polling and Events code
-//
-//
-// copyleft :		Synchrotron SOLEIL
-//					L'Orme des Merisiers
-//					Saint-Aubin - BP 48
-//					91192 GIF-sur-YVETTE CEDEX
-//
-//-======================================================================
-package HdbArchiver.Collector.scalar;
-
-import org.slf4j.Logger;
-import org.tango.utils.DevFailedUtils;
-
-import HdbArchiver.Collector.HdbModeHandler;
-import fr.esrf.Tango.AttrDataFormat;
-import fr.esrf.Tango.AttrWriteType;
-import fr.esrf.Tango.DevFailed;
-import fr.esrf.TangoApi.DeviceAttribute;
-import fr.esrf.TangoApi.DeviceProxy;
-import fr.esrf.TangoApi.events.TangoArchive;
-import fr.esrf.TangoApi.events.TangoArchiveEvent;
-import fr.esrf.tangoatk.core.IStringScalar;
-import fr.esrf.tangoatk.core.StringScalarEvent;
-import fr.soleil.archiving.hdbtdb.api.tools.ScalarEvent;
-
-public class StringScalar_RO extends StringScalar {
-
-    private static final long serialVersionUID = -9086795421498660010L;
-
-    public StringScalar_RO(final HdbModeHandler modeHandler, final Logger logger) {
-        super(modeHandler, logger);
-    }
-
-    @Override
-    protected int getWritableValue() {
-        return AttrWriteType._READ;
-    }
-
-    @Override
-    public void stringScalarChange(final StringScalarEvent event) {
-        final int tryNumber = DEFAULT_TRY_NUMBER;
-        final ScalarEvent scalarEvent = new ScalarEvent();
-
-        String attributeName = ((IStringScalar) event.getSource()).getName();
-        try {
-            removeErrorMessage(attributeName);
-            scalarEvent.setAttributeCompleteName(attributeName);
-
-            scalarEvent.setDataFormat(AttrDataFormat._SCALAR);
-            scalarEvent.setWritable(getWritableValue());
-            scalarEvent.setDataType(((IStringScalar) event.getSource()).getAttribute().getType());
-
-            scalarEvent.setTimeStamp(event.getTimeStamp());
-            // --------------------------------------------------------------------------//
-            // ELETTRA : Archiving Events
-            // --------------------------------------------------------------------------//
-            /*
-             * String value = new String( ( (IStringScalar)
-             * (event)).getStringValue());
-             */
-            // --------------------------------------------------------------------------//
-            // ELETTRA : Archiving Events
-            // --------------------------------------------------------------------------//
-            final String value = ((IStringScalar) event.getSource()).getStringValue();
-            scalarEvent.setValue(value, null);
-            processEventScalar(scalarEvent, tryNumber);
-
-        } catch (final DevFailed devFailed) {
-            registerErrorMessage(attributeName, devFailed);
-            logger.error(DevFailedUtils.toString(devFailed));
-            final Object value = null;
-            scalarEvent.setValue(value, null);
-            processEventScalar(scalarEvent, tryNumber);
-        } catch (final Exception e) {
-            registerErrorMessage(attributeName, e);
-            final Object value = null;
-            scalarEvent.setValue(value, null);
-            processEventScalar(scalarEvent, tryNumber);
-
-            final String message = "Problem in StringScalar_RO/stringScalarChange";
-            logger.error(message, e);
-        }
-
-    }
-
-    // --------------------------------------------------------------------------//
-    // ELETTRA : Archiving Events
-    // --------------------------------------------------------------------------//
-    @Override
-    public void archive(final TangoArchiveEvent event) {
-        final int tryNumber = DEFAULT_TRY_NUMBER;
-        DeviceAttribute attrib = null;
-        TangoArchive arch;
-        DeviceProxy proxy;
-        /* The scalar event which must be filled in and finally archived. */
-        final ScalarEvent scalarEvent = new ScalarEvent();
-        String svalue;
-
-        try {
-            attrib = event.getValue();
-        } catch (final DevFailed f) {
-            logger.error(DevFailedUtils.toString(f));
-            return;
-        } catch (final Exception e) /* Shouldn't be reached */
-        {
-            logger.error("error", e);
-        }
-
-        try {
-            /* See NumberScalar_RW.java for comments */
-            arch = (TangoArchive) event.getSource();
-            proxy = arch.getEventSupplier(); /*
-                                              * The device that supplied the
-                                              * event
-                                              */
-            if (arch == null || proxy == null || attrib == null) {
-                logger.debug("\033[1;31mStringScalar_RO.java: event.getValue() or event.getSource() or event.getSource().getEventSupplier()) returned null!\033[0m");
-                return;
-            }
-            logger.debug(proxy.name() + ": " + attrib.getName() + "{string scalar, RO} [\033[1;32mEVENT\033[0m]: ");
-
-            scalarEvent.setAttributeCompleteName(proxy.name() + "/" + attrib.getName());
-            scalarEvent.setTimeStamp(attrib.getTime());
-            scalarEvent.setDataFormat(AttrDataFormat._SCALAR);
-            scalarEvent.setWritable(AttrWriteType._READ);
-            scalarEvent.setDataType(attrib.getType());
-
-            /* Extract the string */
-            svalue = attrib.extractString();
-            /* The code goes on as in the stringScalarChange() below */
-            logger.debug(svalue);
-
-            scalarEvent.setValue(svalue, null); /* complete the scalarEvent */
-            processEventScalar(scalarEvent, tryNumber);
-        } catch (final DevFailed devFailed) {
-            logger.error(DevFailedUtils.toString(devFailed));
-            final Object value = null;
-            scalarEvent.setValue(value, null);
-            processEventScalar(scalarEvent, tryNumber);
-        } catch (final Exception exE) {
-            logger.error("error", exE);
-            final Object value = null;
-            scalarEvent.setValue(value, null);
-            processEventScalar(scalarEvent, tryNumber);
-        }
-    }
-
-    // --------------------------------------------------------------------------//
-    // ELETTRA : Archiving Events
-    // --------------------------------------------------------------------------//
-}
+// +======================================================================
+// $Source: /cvsroot/tango-cs/tango/jserver/archiving/HdbArchiver/Collector/scalar/StringScalar_RO.java,v $
+//
+// Project:      Tango Archiving Service
+//
+// Description:  Java source code for the class  StringScalar_RO.
+//						(Chinkumo Jean) - Feb 28, 2006
+//
+// $Author: pierrejoseph $
+//
+// $Revision: 1.9 $
+//
+// $Log: StringScalar_RO.java,v $
+// Revision 1.9  2007/10/03 15:23:29  pierrejoseph
+// Minor changes
+//
+// Revision 1.8  2007/09/28 14:49:23  pierrejoseph
+// Merged between Polling and Events code
+//
+//
+// copyleft :		Synchrotron SOLEIL
+//					L'Orme des Merisiers
+//					Saint-Aubin - BP 48
+//					91192 GIF-sur-YVETTE CEDEX
+//
+//-======================================================================
+package HdbArchiver.Collector.scalar;
+
+import HdbArchiver.Collector.HdbModeHandler;
+import fr.esrf.Tango.AttrDataFormat;
+import fr.esrf.Tango.AttrWriteType;
+import fr.esrf.Tango.DevFailed;
+import fr.esrf.TangoApi.DeviceAttribute;
+import fr.esrf.TangoApi.DeviceProxy;
+import fr.esrf.TangoApi.events.TangoArchive;
+import fr.esrf.TangoApi.events.TangoArchiveEvent;
+import fr.esrf.tangoatk.core.IStringScalar;
+import fr.esrf.tangoatk.core.StringScalarEvent;
+import fr.soleil.archiving.hdbtdb.api.tools.ScalarEvent;
+import org.slf4j.Logger;
+import org.tango.utils.DevFailedUtils;
+
+public class StringScalar_RO extends StringScalar {
+
+    private static final long serialVersionUID = -9086795421498660010L;
+
+    public StringScalar_RO(final HdbModeHandler modeHandler, final boolean useEvents, final Logger logger) {
+        super(modeHandler, useEvents, logger);
+    }
+
+    @Override
+    protected int getWritableValue() {
+        return AttrWriteType._READ;
+    }
+
+    @Override
+    public void stringScalarChange(final StringScalarEvent event) {
+        final int tryNumber = DEFAULT_TRY_NUMBER;
+        final ScalarEvent scalarEvent = new ScalarEvent();
+
+        String attributeName = ((IStringScalar) event.getSource()).getName();
+        try {
+            removeErrorMessage(attributeName);
+            scalarEvent.setAttributeCompleteName(attributeName);
+
+            scalarEvent.setDataFormat(AttrDataFormat._SCALAR);
+            scalarEvent.setWritable(getWritableValue());
+            scalarEvent.setDataType(((IStringScalar) event.getSource()).getAttribute().getType());
+
+            scalarEvent.setTimeStamp(event.getTimeStamp());
+            // --------------------------------------------------------------------------//
+            // ELETTRA : Archiving Events
+            // --------------------------------------------------------------------------//
+            /*
+             * String value = new String( ( (IStringScalar)
+             * (event)).getStringValue());
+             */
+            // --------------------------------------------------------------------------//
+            // ELETTRA : Archiving Events
+            // --------------------------------------------------------------------------//
+            final String value = ((IStringScalar) event.getSource()).getStringValue();
+            scalarEvent.setValue(value, null);
+            processEventScalar(scalarEvent, tryNumber);
+
+        } catch (final DevFailed devFailed) {
+            registerErrorMessage(attributeName, devFailed);
+            logger.error(DevFailedUtils.toString(devFailed));
+            final Object value = null;
+            scalarEvent.setValue(value, null);
+            processEventScalar(scalarEvent, tryNumber);
+        } catch (final Exception e) {
+            registerErrorMessage(attributeName, e);
+            final Object value = null;
+            scalarEvent.setValue(value, null);
+            processEventScalar(scalarEvent, tryNumber);
+
+            final String message = "Problem in StringScalar_RO/stringScalarChange";
+            logger.error(message, e);
+        }
+
+    }
+
+    // --------------------------------------------------------------------------//
+    // ELETTRA : Archiving Events
+    // --------------------------------------------------------------------------//
+    @Override
+    public void archive(final TangoArchiveEvent event) {
+        final int tryNumber = DEFAULT_TRY_NUMBER;
+        DeviceAttribute attrib = null;
+        TangoArchive arch;
+        DeviceProxy proxy;
+        /* The scalar event which must be filled in and finally archived. */
+        final ScalarEvent scalarEvent = new ScalarEvent();
+        String svalue;
+
+        try {
+            attrib = event.getValue();
+        } catch (final DevFailed f) {
+            logger.error(DevFailedUtils.toString(f));
+            return;
+        } catch (final Exception e) /* Shouldn't be reached */ {
+            logger.error("error", e);
+        }
+
+        try {
+            /* See NumberScalar_RW.java for comments */
+            arch = (TangoArchive) event.getSource();
+            proxy = arch.getEventSupplier(); /*
+                                              * The device that supplied the
+                                              * event
+                                              */
+            if (arch == null || proxy == null || attrib == null) {
+                logger.debug("\033[1;31mStringScalar_RO.java: event.getValue() or event.getSource() or event.getSource().getEventSupplier()) returned null!\033[0m");
+                return;
+            }
+            logger.debug(proxy.name() + ": " + attrib.getName() + "{string scalar, RO} [\033[1;32mEVENT\033[0m]: ");
+
+            scalarEvent.setAttributeCompleteName(proxy.name() + "/" + attrib.getName());
+            scalarEvent.setTimeStamp(attrib.getTime());
+            scalarEvent.setDataFormat(AttrDataFormat._SCALAR);
+            scalarEvent.setWritable(AttrWriteType._READ);
+            scalarEvent.setDataType(attrib.getType());
+
+            /* Extract the string */
+            svalue = attrib.extractString();
+            /* The code goes on as in the stringScalarChange() below */
+            logger.debug(svalue);
+
+            scalarEvent.setValue(svalue, null); /* complete the scalarEvent */
+            processEventScalar(scalarEvent, tryNumber);
+        } catch (final DevFailed devFailed) {
+            logger.error(DevFailedUtils.toString(devFailed));
+            final Object value = null;
+            scalarEvent.setValue(value, null);
+            processEventScalar(scalarEvent, tryNumber);
+        } catch (final Exception exE) {
+            logger.error("error", exE);
+            final Object value = null;
+            scalarEvent.setValue(value, null);
+            processEventScalar(scalarEvent, tryNumber);
+        }
+    }
+
+    // --------------------------------------------------------------------------//
+    // ELETTRA : Archiving Events
+    // --------------------------------------------------------------------------//
+}
diff --git a/src/main/java/HdbArchiver/Collector/scalar/StringScalar_RW.java b/hdbarchiver/src/main/java/HdbArchiver/Collector/scalar/StringScalar_RW.java
similarity index 95%
rename from src/main/java/HdbArchiver/Collector/scalar/StringScalar_RW.java
rename to hdbarchiver/src/main/java/HdbArchiver/Collector/scalar/StringScalar_RW.java
index 76bd995a5be6bfe6bd579915aa773f7be9c6b617..e5b4d025261eed4f37b40a633946ead1048c5860 100644
--- a/src/main/java/HdbArchiver/Collector/scalar/StringScalar_RW.java
+++ b/hdbarchiver/src/main/java/HdbArchiver/Collector/scalar/StringScalar_RW.java
@@ -1,182 +1,180 @@
-// +======================================================================
-// $Source: /cvsroot/tango-cs/tango/jserver/archiving/HdbArchiver/Collector/scalar/StringScalar_RW.java,v $
-//
-// Project:      Tango Archiving Service
-//
-// Description:  Java source code for the class  StringScalar_RW.
-//						(Chinkumo Jean) - Feb. 28, 2006
-//
-// $Author: pierrejoseph $
-//
-// $Revision: 1.9 $
-//
-// $Log: StringScalar_RW.java,v $
-// Revision 1.9  2007/10/03 15:23:29  pierrejoseph
-// Minor changes
-//
-// Revision 1.8  2007/09/28 14:49:23  pierrejoseph
-// Merged between Polling and Events code
-//
-//
-// copyleft :		Synchrotron SOLEIL
-//					L'Orme des Merisiers
-//					Saint-Aubin - BP 48
-//					91192 GIF-sur-YVETTE CEDEX
-//
-//-======================================================================
-package HdbArchiver.Collector.scalar;
-
-import org.slf4j.Logger;
-import org.tango.utils.DevFailedUtils;
-
-import HdbArchiver.Collector.HdbModeHandler;
-import fr.esrf.Tango.AttrDataFormat;
-import fr.esrf.Tango.AttrWriteType;
-import fr.esrf.Tango.DevFailed;
-import fr.esrf.TangoApi.DeviceAttribute;
-import fr.esrf.TangoApi.DeviceProxy;
-import fr.esrf.TangoApi.events.TangoArchive;
-import fr.esrf.TangoApi.events.TangoArchiveEvent;
-import fr.esrf.tangoatk.core.IStringScalar;
-import fr.esrf.tangoatk.core.StringScalarEvent;
-import fr.soleil.archiving.common.api.tools.StringFormater;
-import fr.soleil.archiving.hdbtdb.api.tools.ScalarEvent;
-
-public class StringScalar_RW extends StringScalar {
-
-    private static final long serialVersionUID = 5829289567161231411L;
-
-    public StringScalar_RW(final HdbModeHandler _modeHandler, final Logger logger) {
-        super(_modeHandler, logger);
-    }
-
-    @Override
-    protected int getWritableValue() {
-        return AttrWriteType._READ_WRITE;
-    }
-
-    @Override
-    public void stringScalarChange(final StringScalarEvent event) {
-        final int tryNumber = DEFAULT_TRY_NUMBER;
-        final ScalarEvent scalarEvent = new ScalarEvent();
-        String[] svalue;
-
-        String attributeName = ((IStringScalar) event.getSource()).getName();
-        try {
-            removeErrorMessage(attributeName);
-            scalarEvent.setAttributeCompleteName(attributeName);
-
-            scalarEvent.setDataFormat(AttrDataFormat._SCALAR);
-            scalarEvent.setWritable(getWritableValue());
-            scalarEvent.setDataType(((IStringScalar) event.getSource()).getAttribute().getType());
-
-            scalarEvent.setTimeStamp(event.getTimeStamp());
-            // --------------------------------------------------------------------------//
-            // ELETTRA : Archiving Events
-            // --------------------------------------------------------------------------//
-            /*
-             * svalue[0] = event.getValue();
-             */
-            // --------------------------------------------------------------------------//
-            // ELETTRA : Archiving Events
-            // --------------------------------------------------------------------------//
-            svalue = new String[2];
-            svalue[0] = ((IStringScalar) event.getSource()).getStringValue();
-            svalue[1] = ((IStringScalar) event.getSource()).getStringSetPoint();
-            scalarEvent.setValue(svalue, null);
-            processEventScalar(scalarEvent, tryNumber);
-
-        } catch (final DevFailed devFailed) {
-            registerErrorMessage(attributeName, devFailed);
-            logger.error(DevFailedUtils.toString(devFailed));
-            scalarEvent.setValue(null, null);
-            processEventScalar(scalarEvent, tryNumber);
-        } catch (final Exception e) {
-            registerErrorMessage(attributeName, e);
-            scalarEvent.setValue(null, null);
-            processEventScalar(scalarEvent, tryNumber);
-
-            final String message = "Problem in StringScalar_RW/stringScalarChange";
-            logger.error(message, e);
-        }
-    }
-
-    // --------------------------------------------------------------------------//
-    // ELETTRA : Archiving Events
-    // --------------------------------------------------------------------------//
-    /* Invoked on the reception of a tango archive event. */
-    @Override
-    public void archive(final TangoArchiveEvent event) {
-        final int tryNumber = DEFAULT_TRY_NUMBER;
-        DeviceAttribute attrib = null;
-        TangoArchive arch;
-        DeviceProxy proxy;
-        /* The scalar event which must be filled in and finally archived. */
-        final ScalarEvent scalarEvent = new ScalarEvent();
-        String svalue[];
-
-        try {
-            attrib = event.getValue();
-        } catch (final DevFailed f) {
-            logger.error(DevFailedUtils.toString(f));
-            return;
-        } catch (final Exception e) /* Shouldn't be reached */
-        {
-            logger.error("error", e);
-            return;
-        }
-
-        try {
-            /*
-             * To correctly archive the attribute, we have to know its complete
-             * name. To acquire this information, we must o back to the
-             * TangoArchive object (which contains the DeviceProxy).
-             */
-            arch = (TangoArchive) event.getSource();
-            proxy = arch.getEventSupplier(); /*
-                                              * The device that supplied the
-                                              * event
-                                              */
-            if (arch == null || proxy == null || attrib == null) {
-                logger.debug("\033[1;31mStringScalar_RW.java: event.getValue() or event.getSource() or event.getSource().getEventSupplier()) returned null!\033[0m");
-                return;
-            }
-            logger.debug("\033[1;35marchive() [String Scalar RW]: [EVENT]: \033[1;32m" + proxy.name() + "/"
-                    + attrib.getName() + "\033[0m");
-
-            scalarEvent.setAttributeCompleteName(proxy.name() + "/" + attrib.getName());
-            scalarEvent.setTimeStamp(attrib.getTime());
-            scalarEvent.setDataFormat(AttrDataFormat._SCALAR);
-            scalarEvent.setWritable(AttrWriteType._READ_WRITE);
-            scalarEvent.setDataType(attrib.getType());
-
-            /* Extract the string (get value and set value) */
-            svalue = attrib.extractStringArray();
-            /* The code goes on as in the stringScalarChange() below */
-            for (int i = 0; i < svalue.length; i++) {
-                final String value = StringFormater.formatStringToWrite(svalue[i]);
-                svalue[i] = value;
-
-            }
-            logger.debug(proxy.name() + ": " + attrib.getName() + "{string scalar, RW} [\033[1;32mEVENT\033[0m]: ");
-
-            logger.debug("\033[1;35m(R): " + svalue[0] + "\033[0m, (Set):\033[1;36m " + svalue[1] + "\033[0m");
-            scalarEvent.setValue(svalue, null); /* complete the scalarEvent */
-
-            processEventScalar(scalarEvent, tryNumber);
-        } catch (final DevFailed devFailed) {
-            logger.error(DevFailedUtils.toString(devFailed));
-            final Object value = null;
-            scalarEvent.setValue(value, null);
-            processEventScalar(scalarEvent, tryNumber);
-        } catch (final Exception exE) {
-            logger.error("error", exE);
-            final Object value = null;
-            scalarEvent.setValue(value, null);
-            processEventScalar(scalarEvent, tryNumber);
-        }
-    }
-    // --------------------------------------------------------------------------//
-    // ELETTRA : Archiving Events
-    // --------------------------------------------------------------------------//
-}
+// +======================================================================
+// $Source: /cvsroot/tango-cs/tango/jserver/archiving/HdbArchiver/Collector/scalar/StringScalar_RW.java,v $
+//
+// Project:      Tango Archiving Service
+//
+// Description:  Java source code for the class  StringScalar_RW.
+//						(Chinkumo Jean) - Feb. 28, 2006
+//
+// $Author: pierrejoseph $
+//
+// $Revision: 1.9 $
+//
+// $Log: StringScalar_RW.java,v $
+// Revision 1.9  2007/10/03 15:23:29  pierrejoseph
+// Minor changes
+//
+// Revision 1.8  2007/09/28 14:49:23  pierrejoseph
+// Merged between Polling and Events code
+//
+//
+// copyleft :		Synchrotron SOLEIL
+//					L'Orme des Merisiers
+//					Saint-Aubin - BP 48
+//					91192 GIF-sur-YVETTE CEDEX
+//
+//-======================================================================
+package HdbArchiver.Collector.scalar;
+
+import HdbArchiver.Collector.HdbModeHandler;
+import fr.esrf.Tango.AttrDataFormat;
+import fr.esrf.Tango.AttrWriteType;
+import fr.esrf.Tango.DevFailed;
+import fr.esrf.TangoApi.DeviceAttribute;
+import fr.esrf.TangoApi.DeviceProxy;
+import fr.esrf.TangoApi.events.TangoArchive;
+import fr.esrf.TangoApi.events.TangoArchiveEvent;
+import fr.esrf.tangoatk.core.IStringScalar;
+import fr.esrf.tangoatk.core.StringScalarEvent;
+import fr.soleil.archiving.common.api.tools.StringFormater;
+import fr.soleil.archiving.hdbtdb.api.tools.ScalarEvent;
+import org.slf4j.Logger;
+import org.tango.utils.DevFailedUtils;
+
+public class StringScalar_RW extends StringScalar {
+
+    private static final long serialVersionUID = 5829289567161231411L;
+
+    public StringScalar_RW(final HdbModeHandler _modeHandler, final boolean useEvents, final Logger logger) {
+        super(_modeHandler, useEvents, logger);
+    }
+
+    @Override
+    protected int getWritableValue() {
+        return AttrWriteType._READ_WRITE;
+    }
+
+    @Override
+    public void stringScalarChange(final StringScalarEvent event) {
+        final int tryNumber = DEFAULT_TRY_NUMBER;
+        final ScalarEvent scalarEvent = new ScalarEvent();
+        String[] svalue;
+
+        String attributeName = ((IStringScalar) event.getSource()).getName();
+        try {
+            removeErrorMessage(attributeName);
+            scalarEvent.setAttributeCompleteName(attributeName);
+
+            scalarEvent.setDataFormat(AttrDataFormat._SCALAR);
+            scalarEvent.setWritable(getWritableValue());
+            scalarEvent.setDataType(((IStringScalar) event.getSource()).getAttribute().getType());
+
+            scalarEvent.setTimeStamp(event.getTimeStamp());
+            // --------------------------------------------------------------------------//
+            // ELETTRA : Archiving Events
+            // --------------------------------------------------------------------------//
+            /*
+             * svalue[0] = event.getValue();
+             */
+            // --------------------------------------------------------------------------//
+            // ELETTRA : Archiving Events
+            // --------------------------------------------------------------------------//
+            svalue = new String[2];
+            svalue[0] = ((IStringScalar) event.getSource()).getStringValue();
+            svalue[1] = ((IStringScalar) event.getSource()).getStringSetPoint();
+            scalarEvent.setValue(svalue, null);
+            processEventScalar(scalarEvent, tryNumber);
+
+        } catch (final DevFailed devFailed) {
+            registerErrorMessage(attributeName, devFailed);
+            logger.error(DevFailedUtils.toString(devFailed));
+            scalarEvent.setValue(null, null);
+            processEventScalar(scalarEvent, tryNumber);
+        } catch (final Exception e) {
+            registerErrorMessage(attributeName, e);
+            scalarEvent.setValue(null, null);
+            processEventScalar(scalarEvent, tryNumber);
+
+            final String message = "Problem in StringScalar_RW/stringScalarChange";
+            logger.error(message, e);
+        }
+    }
+
+    // --------------------------------------------------------------------------//
+    // ELETTRA : Archiving Events
+    // --------------------------------------------------------------------------//
+    /* Invoked on the reception of a tango archive event. */
+    @Override
+    public void archive(final TangoArchiveEvent event) {
+        final int tryNumber = DEFAULT_TRY_NUMBER;
+        DeviceAttribute attrib = null;
+        TangoArchive arch;
+        DeviceProxy proxy;
+        /* The scalar event which must be filled in and finally archived. */
+        final ScalarEvent scalarEvent = new ScalarEvent();
+        String svalue[];
+
+        try {
+            attrib = event.getValue();
+        } catch (final DevFailed f) {
+            logger.error(DevFailedUtils.toString(f));
+            return;
+        } catch (final Exception e) /* Shouldn't be reached */ {
+            logger.error("error", e);
+            return;
+        }
+
+        try {
+            /*
+             * To correctly archive the attribute, we have to know its complete
+             * name. To acquire this information, we must o back to the
+             * TangoArchive object (which contains the DeviceProxy).
+             */
+            arch = (TangoArchive) event.getSource();
+            proxy = arch.getEventSupplier(); /*
+                                              * The device that supplied the
+                                              * event
+                                              */
+            if (arch == null || proxy == null || attrib == null) {
+                logger.debug("\033[1;31mStringScalar_RW.java: event.getValue() or event.getSource() or event.getSource().getEventSupplier()) returned null!\033[0m");
+                return;
+            }
+            logger.debug("\033[1;35marchive() [String Scalar RW]: [EVENT]: \033[1;32m" + proxy.name() + "/"
+                    + attrib.getName() + "\033[0m");
+
+            scalarEvent.setAttributeCompleteName(proxy.name() + "/" + attrib.getName());
+            scalarEvent.setTimeStamp(attrib.getTime());
+            scalarEvent.setDataFormat(AttrDataFormat._SCALAR);
+            scalarEvent.setWritable(AttrWriteType._READ_WRITE);
+            scalarEvent.setDataType(attrib.getType());
+
+            /* Extract the string (get value and set value) */
+            svalue = attrib.extractStringArray();
+            /* The code goes on as in the stringScalarChange() below */
+            for (int i = 0; i < svalue.length; i++) {
+                final String value = StringFormater.formatStringToWrite(svalue[i]);
+                svalue[i] = value;
+
+            }
+            logger.debug(proxy.name() + ": " + attrib.getName() + "{string scalar, RW} [\033[1;32mEVENT\033[0m]: ");
+
+            logger.debug("\033[1;35m(R): " + svalue[0] + "\033[0m, (Set):\033[1;36m " + svalue[1] + "\033[0m");
+            scalarEvent.setValue(svalue, null); /* complete the scalarEvent */
+
+            processEventScalar(scalarEvent, tryNumber);
+        } catch (final DevFailed devFailed) {
+            logger.error(DevFailedUtils.toString(devFailed));
+            final Object value = null;
+            scalarEvent.setValue(value, null);
+            processEventScalar(scalarEvent, tryNumber);
+        } catch (final Exception exE) {
+            logger.error("error", exE);
+            final Object value = null;
+            scalarEvent.setValue(value, null);
+            processEventScalar(scalarEvent, tryNumber);
+        }
+    }
+    // --------------------------------------------------------------------------//
+    // ELETTRA : Archiving Events
+    // --------------------------------------------------------------------------//
+}
diff --git a/src/main/java/HdbArchiver/Collector/scalar/StringScalar_WO.java b/hdbarchiver/src/main/java/HdbArchiver/Collector/scalar/StringScalar_WO.java
similarity index 94%
rename from src/main/java/HdbArchiver/Collector/scalar/StringScalar_WO.java
rename to hdbarchiver/src/main/java/HdbArchiver/Collector/scalar/StringScalar_WO.java
index 26ad8055dc29c39e1d8120b6f8d414e7580cbd36..c0e32e7b7a35181afc2067be11666d08fa5c6b31 100644
--- a/src/main/java/HdbArchiver/Collector/scalar/StringScalar_WO.java
+++ b/hdbarchiver/src/main/java/HdbArchiver/Collector/scalar/StringScalar_WO.java
@@ -1,171 +1,170 @@
-// +======================================================================
-// $Source: /cvsroot/tango-cs/tango/jserver/archiving/HdbArchiver/Collector/scalar/StringScalar_WO.java,v $
-//
-// Project:      Tango Archiving Service
-//
-// Description:  Java source code for the class  StringScalar_WO.
-//						(Chinkumo Jean) - Feb. 28, 2006
-//
-// $Author: pierrejoseph $
-//
-// $Revision: 1.9 $
-//
-// $Log: StringScalar_WO.java,v $
-// Revision 1.9  2007/10/03 15:23:29  pierrejoseph
-// Minor changes
-//
-// Revision 1.8  2007/09/28 14:49:23  pierrejoseph
-// Merged between Polling and Events code
-//
-//
-// copyleft :		Synchrotron SOLEIL
-//					L'Orme des Merisiers
-//					Saint-Aubin - BP 48
-//					91192 GIF-sur-YVETTE CEDEX
-//
-//-======================================================================
-package HdbArchiver.Collector.scalar;
-
-import org.slf4j.Logger;
-import org.tango.utils.DevFailedUtils;
-
-import HdbArchiver.Collector.HdbModeHandler;
-import fr.esrf.Tango.AttrDataFormat;
-import fr.esrf.Tango.AttrWriteType;
-import fr.esrf.Tango.DevFailed;
-import fr.esrf.TangoApi.DeviceAttribute;
-import fr.esrf.TangoApi.DeviceProxy;
-import fr.esrf.TangoApi.events.TangoArchive;
-import fr.esrf.TangoApi.events.TangoArchiveEvent;
-import fr.esrf.tangoatk.core.IStringScalar;
-import fr.esrf.tangoatk.core.StringScalarEvent;
-import fr.soleil.archiving.common.api.tools.GlobalConst;
-import fr.soleil.archiving.hdbtdb.api.tools.ScalarEvent;
-
-//--------------------------------------------------------------------------//
-//ELETTRA : Archiving Events
-//--------------------------------------------------------------------------//
-public class StringScalar_WO extends StringScalar {
-
-    private static final long serialVersionUID = -1406302479873490529L;
-
-    public StringScalar_WO(final HdbModeHandler _modeHandler, final Logger logger) {
-        super(_modeHandler, logger);
-    }
-
-    @Override
-    protected int getWritableValue() {
-        return AttrWriteType._WRITE;
-    }
-
-    @Override
-    public void stringScalarChange(final StringScalarEvent event) {
-        final int tryNumber = DEFAULT_TRY_NUMBER;
-        final ScalarEvent scalarEvent = new ScalarEvent();
-
-        String attributeName = ((IStringScalar) event.getSource()).getName();
-        try {
-            removeErrorMessage(attributeName);
-            scalarEvent.setAttributeCompleteName(attributeName);
-
-            scalarEvent.setDataFormat(AttrDataFormat._SCALAR);
-            scalarEvent.setWritable(getWritableValue());
-            scalarEvent.setDataType(((IStringScalar) event.getSource()).getAttribute().getType());
-
-            scalarEvent.setTimeStamp(event.getTimeStamp());
-
-            final String value = new String(((IStringScalar) event.getSource()).getStringSetPoint());
-            scalarEvent.setValue(value, null);
-            processEventScalar(scalarEvent, tryNumber);
-
-        } catch (final DevFailed devFailed) {
-            registerErrorMessage(attributeName, devFailed);
-            logger.error(DevFailedUtils.toString(devFailed));
-            final Object value = null;
-            scalarEvent.setValue(value, null);
-            processEventScalar(scalarEvent, tryNumber);
-        } catch (final Exception e) {
-            registerErrorMessage(attributeName, e);
-            System.err.println("StringScalar_WO.stringScalarChange : " + GlobalConst.ARCHIVING_ERROR_PREFIX + "\r\n\t"
-                    + "Problem while reading " + scalarEvent.getAttributeCompleteName() + " values...");
-            e.printStackTrace();
-            final Object value = null;
-            scalarEvent.setValue(value, null);
-            processEventScalar(scalarEvent, tryNumber);
-
-            final String message = "Problem in StringScalar_WO/stringScalarChange";
-            logger.error(message, e);
-        }
-    }
-
-    // --------------------------------------------------------------------------//
-    // ELETTRA : Archiving Events
-    // --------------------------------------------------------------------------//
-    /**
-     * @since events
-     * @author giacomo
-     * 
-     *         manages archive events for StringScalar, Write Only.
-     */
-    @Override
-    public void archive(final TangoArchiveEvent event) {
-        final int tryNumber = DEFAULT_TRY_NUMBER;
-        DeviceAttribute attrib = null;
-        TangoArchive arch;
-        DeviceProxy proxy;
-        /* The scalar event which must be filled in and finally archived. */
-        final ScalarEvent scalarEvent = new ScalarEvent();
-        String svalue;
-
-        try {
-            attrib = event.getValue();
-        } catch (final DevFailed f) {
-            logger.error(DevFailedUtils.toString(f));
-            return;
-        } catch (final Exception e) /* Shouldn't be reached */
-        {
-            logger.error("error", e);
-            return;
-        }
-
-        try {
-            /* See NumberScalar_RW.java for comments */
-            arch = (TangoArchive) event.getSource();
-            proxy = arch.getEventSupplier(); /*
-                                              * The device that supplied the
-                                              * event
-                                              */
-            if (arch == null || proxy == null || attrib == null) {
-                logger.debug("\033[1;31mStringScalar_WO.java: event.getValue() or event.getSource() or event.getSource().getEventSupplier()) returned null!\033[0m");
-                return;
-            }
-            logger.debug("\033[1;35marchive() [String Scalar WO]: [EVENT]: \033[1;32m" + proxy.name() + "/"
-                    + attrib.getName() + "\033[0m");
-            scalarEvent.setAttributeCompleteName(proxy.name() + "/" + attrib.getName());
-            scalarEvent.setTimeStamp(attrib.getTime());
-            scalarEvent.setDataFormat(AttrDataFormat._SCALAR);
-            scalarEvent.setWritable(AttrWriteType._WRITE);
-            scalarEvent.setDataType(attrib.getType());
-
-            /* Extract the string */
-            svalue = attrib.extractString();
-            /* The code goes on as in the stringScalarChange() below */
-
-            scalarEvent.setValue(svalue, null); /* complete the scalarEvent */
-            processEventScalar(scalarEvent, tryNumber);
-        } catch (final DevFailed devFailed) {
-            logger.error(DevFailedUtils.toString(devFailed));
-            final Object value = null;
-            scalarEvent.setValue(value, null);
-            processEventScalar(scalarEvent, tryNumber);
-        } catch (final Exception exE) {
-            logger.error("error", exE);
-            final Object value = null;
-            scalarEvent.setValue(value, null);
-            processEventScalar(scalarEvent, tryNumber);
-        }
-    }
-    // --------------------------------------------------------------------------//
-    // ELETTRA : Archiving Events
-    // --------------------------------------------------------------------------//
-}
+// +======================================================================
+// $Source: /cvsroot/tango-cs/tango/jserver/archiving/HdbArchiver/Collector/scalar/StringScalar_WO.java,v $
+//
+// Project:      Tango Archiving Service
+//
+// Description:  Java source code for the class  StringScalar_WO.
+//						(Chinkumo Jean) - Feb. 28, 2006
+//
+// $Author: pierrejoseph $
+//
+// $Revision: 1.9 $
+//
+// $Log: StringScalar_WO.java,v $
+// Revision 1.9  2007/10/03 15:23:29  pierrejoseph
+// Minor changes
+//
+// Revision 1.8  2007/09/28 14:49:23  pierrejoseph
+// Merged between Polling and Events code
+//
+//
+// copyleft :		Synchrotron SOLEIL
+//					L'Orme des Merisiers
+//					Saint-Aubin - BP 48
+//					91192 GIF-sur-YVETTE CEDEX
+//
+//-======================================================================
+package HdbArchiver.Collector.scalar;
+
+import HdbArchiver.Collector.HdbModeHandler;
+import fr.esrf.Tango.AttrDataFormat;
+import fr.esrf.Tango.AttrWriteType;
+import fr.esrf.Tango.DevFailed;
+import fr.esrf.TangoApi.DeviceAttribute;
+import fr.esrf.TangoApi.DeviceProxy;
+import fr.esrf.TangoApi.events.TangoArchive;
+import fr.esrf.TangoApi.events.TangoArchiveEvent;
+import fr.esrf.tangoatk.core.IStringScalar;
+import fr.esrf.tangoatk.core.StringScalarEvent;
+import fr.soleil.archiving.common.api.tools.GlobalConst;
+import fr.soleil.archiving.hdbtdb.api.tools.ScalarEvent;
+import org.slf4j.Logger;
+import org.tango.utils.DevFailedUtils;
+
+//--------------------------------------------------------------------------//
+//ELETTRA : Archiving Events
+//--------------------------------------------------------------------------//
+public class StringScalar_WO extends StringScalar {
+
+    private static final long serialVersionUID = -1406302479873490529L;
+
+    public StringScalar_WO(final HdbModeHandler _modeHandler, final boolean useEvents, final Logger logger) {
+        super(_modeHandler, useEvents, logger);
+    }
+
+    @Override
+    protected int getWritableValue() {
+        return AttrWriteType._WRITE;
+    }
+
+    @Override
+    public void stringScalarChange(final StringScalarEvent event) {
+        final int tryNumber = DEFAULT_TRY_NUMBER;
+        final ScalarEvent scalarEvent = new ScalarEvent();
+
+        String attributeName = ((IStringScalar) event.getSource()).getName();
+        try {
+            removeErrorMessage(attributeName);
+            scalarEvent.setAttributeCompleteName(attributeName);
+
+            scalarEvent.setDataFormat(AttrDataFormat._SCALAR);
+            scalarEvent.setWritable(getWritableValue());
+            scalarEvent.setDataType(((IStringScalar) event.getSource()).getAttribute().getType());
+
+            scalarEvent.setTimeStamp(event.getTimeStamp());
+
+            final String value = new String(((IStringScalar) event.getSource()).getStringSetPoint());
+            scalarEvent.setValue(value, null);
+            processEventScalar(scalarEvent, tryNumber);
+
+        } catch (final DevFailed devFailed) {
+            registerErrorMessage(attributeName, devFailed);
+            logger.error(DevFailedUtils.toString(devFailed));
+            final Object value = null;
+            scalarEvent.setValue(value, null);
+            processEventScalar(scalarEvent, tryNumber);
+        } catch (final Exception e) {
+            registerErrorMessage(attributeName, e);
+            System.err.println("StringScalar_WO.stringScalarChange : " + GlobalConst.ARCHIVING_ERROR_PREFIX + "\r\n\t"
+                    + "Problem while reading " + scalarEvent.getAttributeCompleteName() + " values...");
+            e.printStackTrace();
+            final Object value = null;
+            scalarEvent.setValue(value, null);
+            processEventScalar(scalarEvent, tryNumber);
+
+            final String message = "Problem in StringScalar_WO/stringScalarChange";
+            logger.error(message, e);
+        }
+    }
+
+    // --------------------------------------------------------------------------//
+    // ELETTRA : Archiving Events
+    // --------------------------------------------------------------------------//
+
+    /**
+     * @author giacomo
+     * <p/>
+     * manages archive events for StringScalar, Write Only.
+     * @since events
+     */
+    @Override
+    public void archive(final TangoArchiveEvent event) {
+        final int tryNumber = DEFAULT_TRY_NUMBER;
+        DeviceAttribute attrib = null;
+        TangoArchive arch;
+        DeviceProxy proxy;
+        /* The scalar event which must be filled in and finally archived. */
+        final ScalarEvent scalarEvent = new ScalarEvent();
+        String svalue;
+
+        try {
+            attrib = event.getValue();
+        } catch (final DevFailed f) {
+            logger.error(DevFailedUtils.toString(f));
+            return;
+        } catch (final Exception e) /* Shouldn't be reached */ {
+            logger.error("error", e);
+            return;
+        }
+
+        try {
+            /* See NumberScalar_RW.java for comments */
+            arch = (TangoArchive) event.getSource();
+            proxy = arch.getEventSupplier(); /*
+                                              * The device that supplied the
+                                              * event
+                                              */
+            if (arch == null || proxy == null || attrib == null) {
+                logger.debug("\033[1;31mStringScalar_WO.java: event.getValue() or event.getSource() or event.getSource().getEventSupplier()) returned null!\033[0m");
+                return;
+            }
+            logger.debug("\033[1;35marchive() [String Scalar WO]: [EVENT]: \033[1;32m" + proxy.name() + "/"
+                    + attrib.getName() + "\033[0m");
+            scalarEvent.setAttributeCompleteName(proxy.name() + "/" + attrib.getName());
+            scalarEvent.setTimeStamp(attrib.getTime());
+            scalarEvent.setDataFormat(AttrDataFormat._SCALAR);
+            scalarEvent.setWritable(AttrWriteType._WRITE);
+            scalarEvent.setDataType(attrib.getType());
+
+            /* Extract the string */
+            svalue = attrib.extractString();
+            /* The code goes on as in the stringScalarChange() below */
+
+            scalarEvent.setValue(svalue, null); /* complete the scalarEvent */
+            processEventScalar(scalarEvent, tryNumber);
+        } catch (final DevFailed devFailed) {
+            logger.error(DevFailedUtils.toString(devFailed));
+            final Object value = null;
+            scalarEvent.setValue(value, null);
+            processEventScalar(scalarEvent, tryNumber);
+        } catch (final Exception exE) {
+            logger.error("error", exE);
+            final Object value = null;
+            scalarEvent.setValue(value, null);
+            processEventScalar(scalarEvent, tryNumber);
+        }
+    }
+    // --------------------------------------------------------------------------//
+    // ELETTRA : Archiving Events
+    // --------------------------------------------------------------------------//
+}
diff --git a/src/main/java/HdbArchiver/Collector/spectrum/BooleanSpectrum_RO.java b/hdbarchiver/src/main/java/HdbArchiver/Collector/spectrum/BooleanSpectrum_RO.java
similarity index 95%
rename from src/main/java/HdbArchiver/Collector/spectrum/BooleanSpectrum_RO.java
rename to hdbarchiver/src/main/java/HdbArchiver/Collector/spectrum/BooleanSpectrum_RO.java
index 68e8ee958eb59b802951e1d2ac6b99faf05e8d07..82b3c87f6d26eef6fe300990d48c242b0ef0a786 100644
--- a/src/main/java/HdbArchiver/Collector/spectrum/BooleanSpectrum_RO.java
+++ b/hdbarchiver/src/main/java/HdbArchiver/Collector/spectrum/BooleanSpectrum_RO.java
@@ -1,456 +1,443 @@
-// +======================================================================
-// $Source$
-//
-// Project:      Tango Archiving Service
-//
-// Description:  Java source code for the class  Spectrum_RO.
-//						(Chinkumo Jean) - Mar 24, 2004
-//
-// $Author$
-//
-// $Revision$
-//
-// $Log$
-// Revision 1.13  2007/10/03 15:23:29  pierrejoseph
-// Minor changes
-//
-// Revision 1.12  2007/09/28 14:49:22  pierrejoseph
-// Merged between Polling and Events code
-//
-// Revision 1.11  2007/09/25 14:59:17  pierrejoseph
-// 5251 : sometimes the device stayed in Running state sue to a blocking while in  the addAttribute method.
-//
-// Revision 1.10  2007/06/11 12:18:51  pierrejoseph
-// m_logger from the mother class (ArchiverCollector)
-//
-// Revision 1.9  2007/03/05 16:25:20  ounsy
-// non-static DataBase
-//
-// Revision 1.8  2006/10/31 16:54:12  ounsy
-// milliseconds and null values management
-//
-// Revision 1.7  2006/07/26 08:37:21  ounsy
-// try number no more static and reinitialized with change events (errorchange, numberscalarchange, etc...)
-//
-// Revision 1.6  2006/07/21 14:39:26  ounsy
-// removed useless logs
-//
-// Revision 1.5  2006/07/18 08:03:18  ounsy
-// minor changes
-//
-// Revision 1.4  2006/06/16 09:25:33  ounsy
-// changed imports because of the diary package moving to the javaapi project
-//
-// Revision 1.3  2006/06/13 13:28:19  ounsy
-// added a file logging system (diary) that records data storing errors
-//
-// Revision 1.2  2006/05/23 11:57:17  ounsy
-// now checks the timeCondition condition before calling DbProxy.store
-//
-// Revision 1.1  2006/04/05 13:49:51  ounsy
-// new types full support
-//
-// Revision 1.8  2006/03/28 11:13:49  ounsy
-// better spectrum management
-//
-// Revision 1.7  2005/11/29 17:33:53  chinkumo
-// no message
-//
-// Revision 1.6.10.2  2005/11/29 16:16:05  chinkumo
-// Code reformated (pogo compatible)
-//
-// Revision 1.6.10.1  2005/11/15 13:46:08  chinkumo
-// ...
-//
-// Revision 1.6  2005/06/24 12:06:27  chinkumo
-// Some constants were moved from fr.soleil.hdbtdbArchivingApi.ArchivingApi.ConfigConst to fr.soleil.hdbtdbArchivingApi.ArchivingTools.Tools.GlobalConst.
-
-// This change was reported here.
-//
-// Revision 1.5  2005/06/14 10:30:28  chinkumo
-// Branch (hdbArchiver_1_0_1-branch_0)  and HEAD merged.
-//
-// Revision 1.4.2.1  2005/06/13 14:01:07  chinkumo
-// Changes made to improve the management of exceptions were reported here.
-//
-// Revision 1.4  2005/04/08 15:37:00  chinkumo
-// errorChange method filled.
-
-// The aim of this method is to manage possible attribute's problem while polling attributes.
-
-// In case of unavailable value, a record is nevertheless carried out with the event timestamp, but with a kind of NULL value.
-//
-// Revision 1.3  2005/02/04 17:10:14  chinkumo
-// The trouble with the grouped stopping strategy was fixed.
-//
-// Revision 1.2  2005/01/26 16:38:14  chinkumo
-// Ultimate synchronization before real sharing.
-//
-// Revision 1.1  2004/12/06 16:43:25  chinkumo
-// First commit (new architecture).
-//
-//
-// copyleft :	Synchrotron SOLEIL
-//					L'Orme des Merisiers
-//					Saint-Aubin - BP 48
-//					91192 GIF-sur-YVETTE CEDEX
-//
-//-======================================================================
-
-package HdbArchiver.Collector.spectrum;
-
-import java.util.Arrays;
-import java.util.HashMap;
-import java.util.Map;
-
-import org.slf4j.Logger;
-import org.tango.utils.DevFailedUtils;
-
-import HdbArchiver.HdbArchiver;
-import HdbArchiver.Collector.HdbCollector;
-import HdbArchiver.Collector.HdbModeHandler;
-import fr.esrf.Tango.AttrWriteType;
-import fr.esrf.Tango.DevError;
-import fr.esrf.Tango.DevFailed;
-import fr.esrf.Tango.ErrSeverity;
-import fr.esrf.TangoApi.DeviceAttribute;
-import fr.esrf.TangoApi.DeviceProxy;
-import fr.esrf.TangoApi.events.ITangoArchiveListener;
-import fr.esrf.TangoApi.events.TangoArchive;
-import fr.esrf.TangoApi.events.TangoArchiveEvent;
-import fr.esrf.TangoApi.events.TangoEventsAdapter;
-import fr.esrf.TangoDs.Util;
-import fr.esrf.tangoatk.core.AttributeStateEvent;
-import fr.esrf.tangoatk.core.BooleanSpectrumEvent;
-import fr.esrf.tangoatk.core.ConnectionException;
-import fr.esrf.tangoatk.core.Device;
-import fr.esrf.tangoatk.core.ErrorEvent;
-import fr.esrf.tangoatk.core.IBooleanSpectrum;
-import fr.esrf.tangoatk.core.IBooleanSpectrumListener;
-import fr.esrf.tangoatk.core.attribute.AttributeFactory;
-import fr.soleil.archiving.common.api.exception.ArchivingException;
-import fr.soleil.archiving.common.api.tools.GlobalConst;
-import fr.soleil.archiving.hdbtdb.api.tools.AttributeLightMode;
-import fr.soleil.archiving.hdbtdb.api.tools.SpectrumEvent_RO;
-
-public class BooleanSpectrum_RO extends HdbCollector implements IBooleanSpectrumListener, ITangoArchiveListener {
-
-    private static final long serialVersionUID = 551234411442031509L;
-
-    private final Map<Device, TangoEventsAdapter> evtAdaptHMap;
-
-    public BooleanSpectrum_RO(final HdbModeHandler hdbModeHandler, final Logger logger) {
-        super(hdbModeHandler, logger);
-
-        evtAdaptHMap = new HashMap<Device, TangoEventsAdapter>();
-    }
-
-    @Override
-    public synchronized void removeSource(final String attributeName) throws ArchivingException {
-        logger.debug("BooleanSpectrum_RO.removeSource");
-
-        if (HdbArchiver.isUseEvents) {
-            removeSourceForEvents(attributeName);
-        }
-
-        try {
-            stopCollecting();
-            final IBooleanSpectrum attribute = (IBooleanSpectrum) attributeList.get(attributeName);
-            if (attribute != null) {
-                attribute.removeBooleanSpectrumListener(this);
-                attribute.removeErrorListener(this);
-                attributeList.remove(attributeName);
-                removeTimestamps(attributeName);
-                removeErrorMessage(attributeName);
-                Util.out4.println("\t The attribute named " + attributeName + " was fired from the Collector list...");
-            }
-        } catch (final Exception e) {
-            final String message = GlobalConst.ARCHIVING_ERROR_PREFIX + "Failed removing '" + attributeName
-                    + "' from sources";
-            final String reason = GlobalConst.TANGO_COMM_EXCEPTION;
-            final String desc = "Failed while executing BooleanSpectrum_RO.removeSource() method...";
-            throw new ArchivingException(message, reason, ErrSeverity.WARN, desc, "", e);
-        } finally {
-            startCollecting();
-        }
-    }
-
-    @Override
-    protected void doAddSourceForPolling(final AttributeLightMode attributeLightMode) throws ArchivingException {
-        String attributeName = null;
-        try {
-            attributeName = attributeLightMode.getAttributeCompleteName();
-            stopCollecting();
-            final IBooleanSpectrum attribute = (IBooleanSpectrum) attributeList.add(attributeName);
-            attribute.addBooleanSpectrumListener(this);
-            attribute.addErrorListener(this);
-            Util.out4.println("\t The attribute named " + attributeLightMode.getAttributeCompleteName()
-                    + " was hired to the Collector list...");
-        } catch (final ConnectionException e) {
-            registerErrorMessage(attributeName, e);
-            final String message = GlobalConst.ARCHIVING_ERROR_PREFIX + "Failed adding '"
-                    + attributeLightMode.getAttributeCompleteName() + "' as source";
-            final String reason = GlobalConst.TANGO_COMM_EXCEPTION;
-            final String desc = "Failed while executing Spectrum_RO.addSource() method...";
-            throw new ArchivingException(message, reason, ErrSeverity.WARN, desc, "", e);
-        } finally {
-            startCollecting();
-        }
-    }
-
-    // --------------------------------------------------------------------------//
-    // ELETTRA : Archiving Events
-    // --------------------------------------------------------------------------//
-    @Override
-    protected void addSourceForEvents(final AttributeLightMode attributeLightMode) throws ArchivingException {
-        /* Adapter for the Tango archive events */
-        TangoEventsAdapter evtAdapt = null;
-        IBooleanSpectrum attribute = null;
-
-        try {
-            /*
-             * Get the attribute from the AttributeFactory, so that it is not
-             * added to the attribute polled list. Remember that `attributeList'
-             * is an AttributePolledList().
-             */
-            attribute = (IBooleanSpectrum) AttributeFactory.getInstance().getAttribute(
-                    attributeLightMode.getAttributeCompleteName());
-            if (attribute == null) {
-                logger.debug("\033[1;31mSpectrum_RO.java: the attribute \""
-                        + attributeLightMode.getAttributeCompleteName() + " is null (Spectrum_RO.java): not adding it!");
-                return;
-            }
-        } catch (final DevFailed e) {
-            logger.error(DevFailedUtils.toString(e));
-            final String message = GlobalConst.ARCHIVING_ERROR_PREFIX + "Failed adding '"
-                    + attributeLightMode.getAttributeCompleteName() + "' as source";
-            final String reason = "DevFailed exception while calling AttributeFactory.getInstance().getAttribute();";
-            final String desc = "Failed while executing Spectrum_RO.addSource() method...\nSpectrum_RO.java: Failed to get the attribute from the AttributeFactory";
-            throw new ArchivingException(message, reason, ErrSeverity.WARN, desc, "", e);
-        } catch (final ConnectionException e) {
-            final String message = GlobalConst.ARCHIVING_ERROR_PREFIX + "Failed adding '"
-                    + attributeLightMode.getAttributeCompleteName() + "' as source";
-            final String reason = GlobalConst.TANGO_COMM_EXCEPTION;
-            final String desc = "Failed while executing Spectrum_RO.addSource() method...\nSpectrum_RO.java: Failed to get the attribute from the AttributeFactory";
-            throw new ArchivingException(message, reason, ErrSeverity.WARN, desc, "", e);
-        } /*
-           * end of first try/catch block, to retrieve the attribute from the
-           * AttributeFactory
-           */
-
-        logger.debug("boolean SPECTRUM [RO] attribute \"" + attribute.getNameSansDevice() + "\"...\t");
-
-        /*
-         * If an attribute (name + device server) is already in the map, it
-         * means it has already been registered for the Tango Archive events. So
-         * it does not have to be added to the archive events once again, nor to
-         * the attributePolledList: we can return. The same goes for an
-         * attribute already present in the attributePolledList `attributeList'.
-         */
-        /*
-         * if(HdbArchiver.useEvents.equalsIgnoreCase("no")) {
-         * System.out.print("[\033[1;35mEVENTS DISABLED\033[0m].");
-         * registerForScalarListener(attributeLightMode); } else {
-         */
-        try {
-            synchronized (evtAdaptHMap) {
-                evtAdapt = evtAdaptHMap.get(attribute.getDevice());
-                if (evtAdapt == null) {
-                    evtAdapt = new TangoEventsAdapter(attribute.getDevice());
-                    evtAdaptHMap.put(attribute.getDevice(), evtAdapt);
-                } else {
-                    logger.debug("\nThe adapter for the attribute is already configured");
-                }
-            }
-            final String[] filter = new String[0];
-
-            /*
-             * Try to register for the archive events: evtAdapt is the new
-             * adapter or the one already found in the map.
-             */
-            evtAdapt.addTangoArchiveListener(this, attribute.getNameSansDevice(), filter);
-            archiveListenersCounter++;
-            logger.debug("[\033[1;32mEVENTS\033[0m].");
-        } catch (final DevFailed e) {
-            /*
-             * If archive events are not enabled for the attribute, we will poll
-             * it
-             */
-            for (final DevError error : e.errors) {
-                // // System.out.println("error registering: " +
-                // e.errors[err].desc);
-                if (error.desc.contains("Already connected to event")) {
-                    logger.debug("Already connected to events for attribute");
-                    return;
-                }
-            }
-            /* Register for polling */
-            addSourceForPolling(attributeLightMode);
-            /* unlock the attributeList */
-        }
-        // } /* function finishes */
-    }
-
-    private void removeSourceForEvents(final String attributeName) {
-        logger.debug("boolean spectrum [RO]: removing source for \"" + attributeName + "\"...\t");
-        TangoEventsAdapter adapter;
-        IBooleanSpectrum attribute;
-        /*
-         * If useEvents is enabled, we should remove the eventListener, if not
-         * we can skip this piece of code
-         */
-        // if (HdbArchiver.useEvents.equalsIgnoreCase("yes"))
-        // {
-        try {
-            synchronized (evtAdaptHMap) {
-                attribute = (IBooleanSpectrum) AttributeFactory.getInstance().getAttribute(attributeName);
-                /*
-                 * Retrieve in the hash table the event adapter associated to
-                 * the attributeName.
-                 */
-                if (attribute == null) {
-                    logger.debug("\033[1;31mThe attribute " + attributeName + " is null\033[0m");
-                }
-                adapter = evtAdaptHMap.get(attribute.getDevice());
-
-                if (adapter != null) {
-                    adapter.removeTangoArchiveListener(this, attribute.getNameSansDevice());
-                    archiveListenersCounter--;
-                    logger.debug("[\033[1;32mEVENTS\033[0m].");
-                    logger.debug(" (adapter: " + adapter.device_name() + ")");
-                    /* Should be ok now to return */
-                    return;
-                }
-            } /* unlock event adapters map */
-        } catch (final ConnectionException e) /* getAttribute() failed */
-        {
-            logger.error("\033[1;31mConnection exception while retrieving the attribute from the AttributeFactory!\033[0m");
-        } catch (final DevFailed f) {
-            logger.error(DevFailedUtils.toString(f));
-        }
-        // }
-    }
-
-    @Override
-    public void archive(final TangoArchiveEvent event) {
-        final int tryNumber = DEFAULT_TRY_NUMBER;
-        DeviceAttribute attrib = null;
-        TangoArchive arch;
-        DeviceProxy proxy;
-        final SpectrumEvent_RO spectrumEvent_ro = new SpectrumEvent_RO();
-
-        try {
-            attrib = event.getValue();
-        } catch (final DevFailed f) {
-            logger.error(DevFailedUtils.toString(f));
-            return;
-        } catch (final Exception e) /* Shouldn't be reached */
-        {
-            System.out.println("Spectrum_RO.java.archive.getValue() failed, caught generic Exception, code failure");
-            e.printStackTrace();
-            return;
-        }
-        try {
-            /*
-             * To correctly archive the attribute, we have to know its complete
-             * name. To acquire this information, we must o back to the
-             * TangoArchive object (which contains the DeviceProxy).
-             */
-            arch = (TangoArchive) event.getSource();
-            proxy = arch.getEventSupplier(); /*
-                                              * The device that supplied the
-                                              * event
-                                              */
-            if (arch == null || proxy == null || attrib == null) {
-                System.out
-                        .println("\033[1;31mBooleanSpectrum_RO.java: event.getValue() or event.getSource() or event.getSource().getEventSupplier()) returned null!\033[0m");
-                return;
-            }
-
-            final int dim = attrib.getDimX();
-            final boolean[] bvaluetmp = attrib.extractBooleanArray();
-            final boolean[] bvalue = Arrays.copyOf(bvaluetmp, dim);
-
-            spectrumEvent_ro.setValue(bvalue, null);
-
-            System.out.println(proxy.name() + ": " + attrib.getName()
-                    + "{boolean spectrum, RO} [\033[1;32mEVENT\033[0m]" + " (dim: " + attrib.getDimX() + ")");
-            spectrumEvent_ro.setAttributeCompleteName(proxy.name() + "/" + attrib.getName());
-            spectrumEvent_ro.setTimeStamp(attrib.getTime());
-            spectrumEvent_ro.setDataType(attrib.getType());
-            spectrumEvent_ro.setWritable(AttrWriteType._READ);
-            spectrumEvent_ro.setDimX(dim);
-            /* Process the just built spectrum event */
-            processEventSpectrum(spectrumEvent_ro, tryNumber);
-
-        } catch (final DevFailed devFailed) {
-            logger.error(DevFailedUtils.toString(devFailed));
-            spectrumEvent_ro.setValue(null, null);
-            processEventSpectrum(spectrumEvent_ro, tryNumber);
-        } catch (final Exception exE) {
-            logger.error("error ", exE);
-            spectrumEvent_ro.setValue(null, null);
-            processEventSpectrum(spectrumEvent_ro, tryNumber);
-        }
-
-    }
-
-    // --------------------------------------------------------------------------//
-    // ELETTRA : Archiving Events
-    // --------------------------------------------------------------------------//
-
-    @Override
-    protected void treatErrorEventAfterLogging(ErrorEvent errorEvent) {
-        final boolean[] value = null;
-        final SpectrumEvent_RO spectrumEventRO = new SpectrumEvent_RO();
-        spectrumEventRO.setAttributeCompleteName(errorEvent.getSource().toString());
-        spectrumEventRO.setTimeStamp(errorEvent.getTimeStamp());
-        spectrumEventRO.setValue(value, null);
-        processEventSpectrum(spectrumEventRO, DEFAULT_TRY_NUMBER);
-    }
-
-    @Override
-    public void booleanSpectrumChange(final BooleanSpectrumEvent event) {
-        final int tryNumber = DEFAULT_TRY_NUMBER;
-        final boolean[] spectrumvalue = event.getValue();
-        boolean[] value;
-        if (spectrumvalue == null) {
-            value = null;
-        } else {
-            value = spectrumvalue.clone();
-        }
-        final SpectrumEvent_RO spectrumEvent_ro = new SpectrumEvent_RO();
-        String attributeName = ((IBooleanSpectrum) event.getSource()).getName();
-        removeErrorMessage(attributeName);
-        spectrumEvent_ro.setAttributeCompleteName(attributeName);
-        spectrumEvent_ro.setDimX(value.length);
-        spectrumEvent_ro.setTimeStamp(event.getTimeStamp());
-        spectrumEvent_ro.setValue(value, null);
-        processEventSpectrum(spectrumEvent_ro, tryNumber);
-    }
-
-    @Override
-    public void stateChange(final AttributeStateEvent event) {
-    }
-
-    public void processEventSpectrum(final SpectrumEvent_RO event, int try_number) {
-        if (isDataArchivableTimestampWise(event)) {
-            final String attributeName = event.getAttributeCompleteName();
-            // spectrum values can only have periodic modes, we don't need their lastValue
-            try {
-                super.dbProxy.store(event);
-                super.setLastTimestamp(event);
-            } catch (final ArchivingException e) {
-                registerErrorMessage(attributeName, e.getMessage());
-                final String message = "Problem (ArchivingException) storing BooleanSpectrum_RO value";
-                logger.error(message, e);
-
-                try_number--;
-                if (try_number > 0) {
-                    logger.debug("BooleanSpectrum_RO.processEventSpectrum : retry " + try_number + "failed...");
-                    processEventSpectrum(event, try_number);
-                }
-            }
-        }
-    }
-}
+// +======================================================================
+// $Source$
+//
+// Project:      Tango Archiving Service
+//
+// Description:  Java source code for the class  Spectrum_RO.
+//						(Chinkumo Jean) - Mar 24, 2004
+//
+// $Author$
+//
+// $Revision$
+//
+// $Log$
+// Revision 1.13  2007/10/03 15:23:29  pierrejoseph
+// Minor changes
+//
+// Revision 1.12  2007/09/28 14:49:22  pierrejoseph
+// Merged between Polling and Events code
+//
+// Revision 1.11  2007/09/25 14:59:17  pierrejoseph
+// 5251 : sometimes the device stayed in Running state sue to a blocking while in  the addAttribute method.
+//
+// Revision 1.10  2007/06/11 12:18:51  pierrejoseph
+// m_logger from the mother class (ArchiverCollector)
+//
+// Revision 1.9  2007/03/05 16:25:20  ounsy
+// non-static DataBase
+//
+// Revision 1.8  2006/10/31 16:54:12  ounsy
+// milliseconds and null values management
+//
+// Revision 1.7  2006/07/26 08:37:21  ounsy
+// try number no more static and reinitialized with change events (errorchange, numberscalarchange, etc...)
+//
+// Revision 1.6  2006/07/21 14:39:26  ounsy
+// removed useless logs
+//
+// Revision 1.5  2006/07/18 08:03:18  ounsy
+// minor changes
+//
+// Revision 1.4  2006/06/16 09:25:33  ounsy
+// changed imports because of the diary package moving to the javaapi project
+//
+// Revision 1.3  2006/06/13 13:28:19  ounsy
+// added a file logging system (diary) that records data storing errors
+//
+// Revision 1.2  2006/05/23 11:57:17  ounsy
+// now checks the timeCondition condition before calling DbProxy.store
+//
+// Revision 1.1  2006/04/05 13:49:51  ounsy
+// new types full support
+//
+// Revision 1.8  2006/03/28 11:13:49  ounsy
+// better spectrum management
+//
+// Revision 1.7  2005/11/29 17:33:53  chinkumo
+// no message
+//
+// Revision 1.6.10.2  2005/11/29 16:16:05  chinkumo
+// Code reformated (pogo compatible)
+//
+// Revision 1.6.10.1  2005/11/15 13:46:08  chinkumo
+// ...
+//
+// Revision 1.6  2005/06/24 12:06:27  chinkumo
+// Some constants were moved from fr.soleil.hdbtdbArchivingApi.ArchivingApi.ConfigConst to fr.soleil.hdbtdbArchivingApi.ArchivingTools.Tools.GlobalConst.
+
+// This change was reported here.
+//
+// Revision 1.5  2005/06/14 10:30:28  chinkumo
+// Branch (hdbArchiver_1_0_1-branch_0)  and HEAD merged.
+//
+// Revision 1.4.2.1  2005/06/13 14:01:07  chinkumo
+// Changes made to improve the management of exceptions were reported here.
+//
+// Revision 1.4  2005/04/08 15:37:00  chinkumo
+// errorChange method filled.
+
+// The aim of this method is to manage possible attribute's problem while polling attributes.
+
+// In case of unavailable value, a record is nevertheless carried out with the event timestamp, but with a kind of NULL value.
+//
+// Revision 1.3  2005/02/04 17:10:14  chinkumo
+// The trouble with the grouped stopping strategy was fixed.
+//
+// Revision 1.2  2005/01/26 16:38:14  chinkumo
+// Ultimate synchronization before real sharing.
+//
+// Revision 1.1  2004/12/06 16:43:25  chinkumo
+// First commit (new architecture).
+//
+//
+// copyleft :	Synchrotron SOLEIL
+//					L'Orme des Merisiers
+//					Saint-Aubin - BP 48
+//					91192 GIF-sur-YVETTE CEDEX
+//
+//-======================================================================
+
+package HdbArchiver.Collector.spectrum;
+
+import HdbArchiver.Collector.HdbCollector;
+import HdbArchiver.Collector.HdbModeHandler;
+import fr.esrf.Tango.AttrWriteType;
+import fr.esrf.Tango.DevError;
+import fr.esrf.Tango.DevFailed;
+import fr.esrf.Tango.ErrSeverity;
+import fr.esrf.TangoApi.DeviceAttribute;
+import fr.esrf.TangoApi.DeviceProxy;
+import fr.esrf.TangoApi.events.ITangoArchiveListener;
+import fr.esrf.TangoApi.events.TangoArchive;
+import fr.esrf.TangoApi.events.TangoArchiveEvent;
+import fr.esrf.TangoApi.events.TangoEventsAdapter;
+import fr.esrf.TangoDs.Util;
+import fr.esrf.tangoatk.core.*;
+import fr.esrf.tangoatk.core.attribute.AttributeFactory;
+import fr.soleil.archiving.common.api.exception.ArchivingException;
+import fr.soleil.archiving.common.api.tools.GlobalConst;
+import fr.soleil.archiving.hdbtdb.api.tools.AttributeLightMode;
+import fr.soleil.archiving.hdbtdb.api.tools.SpectrumEvent_RO;
+import org.slf4j.Logger;
+import org.tango.utils.DevFailedUtils;
+
+import java.util.Arrays;
+import java.util.HashMap;
+import java.util.Map;
+
+public class BooleanSpectrum_RO extends HdbCollector implements IBooleanSpectrumListener, ITangoArchiveListener {
+
+    private static final long serialVersionUID = 551234411442031509L;
+
+    private final Map<Device, TangoEventsAdapter> evtAdaptHMap;
+
+    public BooleanSpectrum_RO(final HdbModeHandler hdbModeHandler, final boolean useEvents, final Logger logger) {
+        super(hdbModeHandler, useEvents, logger);
+
+        evtAdaptHMap = new HashMap<Device, TangoEventsAdapter>();
+    }
+
+    @Override
+    public synchronized void removeSource(final String attributeName) throws ArchivingException {
+        logger.debug("BooleanSpectrum_RO.removeSource");
+
+        if (useEvents) {
+            removeSourceForEvents(attributeName);
+        }
+
+        try {
+            stopCollecting();
+            final IBooleanSpectrum attribute = (IBooleanSpectrum) attributeList.get(attributeName);
+            if (attribute != null) {
+                attribute.removeBooleanSpectrumListener(this);
+                attribute.removeErrorListener(this);
+                attributeList.remove(attributeName);
+                removeTimestamps(attributeName);
+                removeErrorMessage(attributeName);
+            }
+        } catch (final Exception e) {
+            final String message = GlobalConst.ARCHIVING_ERROR_PREFIX + "Failed removing '" + attributeName
+                    + "' from sources";
+            final String reason = GlobalConst.TANGO_COMM_EXCEPTION;
+            final String desc = "Failed while executing BooleanSpectrum_RO.removeSource() method...";
+            throw new ArchivingException(message, reason, ErrSeverity.WARN, desc, "", e);
+        } finally {
+            startCollecting();
+        }
+    }
+
+    @Override
+    protected void doAddSourceForPolling(final AttributeLightMode attributeLightMode) throws ArchivingException {
+        String attributeName = null;
+        try {
+            attributeName = attributeLightMode.getAttributeCompleteName();
+            stopCollecting();
+            final IBooleanSpectrum attribute = (IBooleanSpectrum) attributeList.add(attributeName);
+            attribute.addBooleanSpectrumListener(this);
+            attribute.addErrorListener(this);
+        } catch (final ConnectionException e) {
+            registerErrorMessage(attributeName, e);
+            final String message = GlobalConst.ARCHIVING_ERROR_PREFIX + "Failed adding '"
+                    + attributeLightMode.getAttributeCompleteName() + "' as source";
+            final String reason = GlobalConst.TANGO_COMM_EXCEPTION;
+            final String desc = "Failed while executing Spectrum_RO.addSource() method...";
+            throw new ArchivingException(message, reason, ErrSeverity.WARN, desc, "", e);
+        } finally {
+            startCollecting();
+        }
+    }
+
+    // --------------------------------------------------------------------------//
+    // ELETTRA : Archiving Events
+    // --------------------------------------------------------------------------//
+    @Override
+    protected void addSourceForEvents(final AttributeLightMode attributeLightMode) throws ArchivingException {
+        /* Adapter for the Tango archive events */
+        TangoEventsAdapter evtAdapt = null;
+        IBooleanSpectrum attribute = null;
+
+        try {
+            /*
+             * Get the attribute from the AttributeFactory, so that it is not
+             * added to the attribute polled list. Remember that `attributeList'
+             * is an AttributePolledList().
+             */
+            attribute = (IBooleanSpectrum) AttributeFactory.getInstance().getAttribute(
+                    attributeLightMode.getAttributeCompleteName());
+            if (attribute == null) {
+                logger.debug("\033[1;31mSpectrum_RO.java: the attribute \""
+                        + attributeLightMode.getAttributeCompleteName() + " is null (Spectrum_RO.java): not adding it!");
+                return;
+            }
+        } catch (final DevFailed e) {
+            logger.error(DevFailedUtils.toString(e));
+            final String message = GlobalConst.ARCHIVING_ERROR_PREFIX + "Failed adding '"
+                    + attributeLightMode.getAttributeCompleteName() + "' as source";
+            final String reason = "DevFailed exception while calling AttributeFactory.getInstance().getAttribute();";
+            final String desc = "Failed while executing Spectrum_RO.addSource() method...\nSpectrum_RO.java: Failed to get the attribute from the AttributeFactory";
+            throw new ArchivingException(message, reason, ErrSeverity.WARN, desc, "", e);
+        } catch (final ConnectionException e) {
+            final String message = GlobalConst.ARCHIVING_ERROR_PREFIX + "Failed adding '"
+                    + attributeLightMode.getAttributeCompleteName() + "' as source";
+            final String reason = GlobalConst.TANGO_COMM_EXCEPTION;
+            final String desc = "Failed while executing Spectrum_RO.addSource() method...\nSpectrum_RO.java: Failed to get the attribute from the AttributeFactory";
+            throw new ArchivingException(message, reason, ErrSeverity.WARN, desc, "", e);
+        } /*
+           * end of first try/catch block, to retrieve the attribute from the
+           * AttributeFactory
+           */
+
+        logger.debug("boolean SPECTRUM [RO] attribute \"" + attribute.getNameSansDevice() + "\"...\t");
+
+        /*
+         * If an attribute (name + device server) is already in the map, it
+         * means it has already been registered for the Tango Archive events. So
+         * it does not have to be added to the archive events once again, nor to
+         * the attributePolledList: we can return. The same goes for an
+         * attribute already present in the attributePolledList `attributeList'.
+         */
+        /*
+         * if(HdbArchiver.useEvents.equalsIgnoreCase("no")) {
+         * System.out.print("[\033[1;35mEVENTS DISABLED\033[0m].");
+         * registerForScalarListener(attributeLightMode); } else {
+         */
+        try {
+            synchronized (evtAdaptHMap) {
+                evtAdapt = evtAdaptHMap.get(attribute.getDevice());
+                if (evtAdapt == null) {
+                    evtAdapt = new TangoEventsAdapter(attribute.getDevice());
+                    evtAdaptHMap.put(attribute.getDevice(), evtAdapt);
+                } else {
+                    logger.debug("\nThe adapter for the attribute is already configured");
+                }
+            }
+            final String[] filter = new String[0];
+
+            /*
+             * Try to register for the archive events: evtAdapt is the new
+             * adapter or the one already found in the map.
+             */
+            evtAdapt.addTangoArchiveListener(this, attribute.getNameSansDevice(), filter);
+            archiveListenersCounter++;
+            logger.debug("[\033[1;32mEVENTS\033[0m].");
+        } catch (final DevFailed e) {
+            /*
+             * If archive events are not enabled for the attribute, we will poll
+             * it
+             */
+            for (final DevError error : e.errors) {
+                // // System.out.println("error registering: " +
+                // e.errors[err].desc);
+                if (error.desc.contains("Already connected to event")) {
+                    logger.debug("Already connected to events for attribute");
+                    return;
+                }
+            }
+            /* Register for polling */
+            addSourceForPolling(attributeLightMode);
+            /* unlock the attributeList */
+        }
+        // } /* function finishes */
+    }
+
+    private void removeSourceForEvents(final String attributeName) {
+        logger.debug("boolean spectrum [RO]: removing source for \"" + attributeName + "\"...\t");
+        TangoEventsAdapter adapter;
+        IBooleanSpectrum attribute;
+        /*
+         * If useEvents is enabled, we should remove the eventListener, if not
+         * we can skip this piece of code
+         */
+        // if (HdbArchiver.useEvents.equalsIgnoreCase("yes"))
+        // {
+        try {
+            synchronized (evtAdaptHMap) {
+                attribute = (IBooleanSpectrum) AttributeFactory.getInstance().getAttribute(attributeName);
+                /*
+                 * Retrieve in the hash table the event adapter associated to
+                 * the attributeName.
+                 */
+                if (attribute == null) {
+                    logger.debug("\033[1;31mThe attribute " + attributeName + " is null\033[0m");
+                }
+                adapter = evtAdaptHMap.get(attribute.getDevice());
+
+                if (adapter != null) {
+                    adapter.removeTangoArchiveListener(this, attribute.getNameSansDevice());
+                    archiveListenersCounter--;
+                    logger.debug("[\033[1;32mEVENTS\033[0m].");
+                    logger.debug(" (adapter: " + adapter.device_name() + ")");
+                    /* Should be ok now to return */
+                    return;
+                }
+            } /* unlock event adapters map */
+        } catch (final ConnectionException e) /* getAttribute() failed */ {
+            logger.error("\033[1;31mConnection exception while retrieving the attribute from the AttributeFactory!\033[0m");
+        } catch (final DevFailed f) {
+            logger.error(DevFailedUtils.toString(f));
+        }
+        // }
+    }
+
+    @Override
+    public void archive(final TangoArchiveEvent event) {
+        final int tryNumber = DEFAULT_TRY_NUMBER;
+        DeviceAttribute attrib = null;
+        TangoArchive arch;
+        DeviceProxy proxy;
+        final SpectrumEvent_RO spectrumEvent_ro = new SpectrumEvent_RO();
+
+        try {
+            attrib = event.getValue();
+        } catch (final DevFailed f) {
+            logger.error(DevFailedUtils.toString(f));
+            return;
+        } catch (final Exception e) /* Shouldn't be reached */ {
+            System.out.println("Spectrum_RO.java.archive.getValue() failed, caught generic Exception, code failure");
+            e.printStackTrace();
+            return;
+        }
+        try {
+            /*
+             * To correctly archive the attribute, we have to know its complete
+             * name. To acquire this information, we must o back to the
+             * TangoArchive object (which contains the DeviceProxy).
+             */
+            arch = (TangoArchive) event.getSource();
+            proxy = arch.getEventSupplier(); /*
+                                              * The device that supplied the
+                                              * event
+                                              */
+            if (arch == null || proxy == null || attrib == null) {
+                System.out
+                        .println("\033[1;31mBooleanSpectrum_RO.java: event.getValue() or event.getSource() or event.getSource().getEventSupplier()) returned null!\033[0m");
+                return;
+            }
+
+            final int dim = attrib.getDimX();
+            final boolean[] bvaluetmp = attrib.extractBooleanArray();
+            final boolean[] bvalue = Arrays.copyOf(bvaluetmp, dim);
+
+            spectrumEvent_ro.setValue(bvalue, null);
+
+            System.out.println(proxy.name() + ": " + attrib.getName()
+                    + "{boolean spectrum, RO} [\033[1;32mEVENT\033[0m]" + " (dim: " + attrib.getDimX() + ")");
+            spectrumEvent_ro.setAttributeCompleteName(proxy.name() + "/" + attrib.getName());
+            spectrumEvent_ro.setTimeStamp(attrib.getTime());
+            spectrumEvent_ro.setDataType(attrib.getType());
+            spectrumEvent_ro.setWritable(AttrWriteType._READ);
+            spectrumEvent_ro.setDimX(dim);
+            /* Process the just built spectrum event */
+            processEventSpectrum(spectrumEvent_ro, tryNumber);
+
+        } catch (final DevFailed devFailed) {
+            logger.error(DevFailedUtils.toString(devFailed));
+            spectrumEvent_ro.setValue(null, null);
+            processEventSpectrum(spectrumEvent_ro, tryNumber);
+        } catch (final Exception exE) {
+            logger.error("error ", exE);
+            spectrumEvent_ro.setValue(null, null);
+            processEventSpectrum(spectrumEvent_ro, tryNumber);
+        }
+
+    }
+
+    // --------------------------------------------------------------------------//
+    // ELETTRA : Archiving Events
+    // --------------------------------------------------------------------------//
+
+    @Override
+    protected void treatErrorEventAfterLogging(ErrorEvent errorEvent) {
+        final boolean[] value = null;
+        final SpectrumEvent_RO spectrumEventRO = new SpectrumEvent_RO();
+        spectrumEventRO.setAttributeCompleteName(errorEvent.getSource().toString());
+        spectrumEventRO.setTimeStamp(errorEvent.getTimeStamp());
+        spectrumEventRO.setValue(value, null);
+        processEventSpectrum(spectrumEventRO, DEFAULT_TRY_NUMBER);
+    }
+
+    @Override
+    public void booleanSpectrumChange(final BooleanSpectrumEvent event) {
+        final int tryNumber = DEFAULT_TRY_NUMBER;
+        final boolean[] spectrumvalue = event.getValue();
+        boolean[] value;
+        if (spectrumvalue == null) {
+            value = null;
+        } else {
+            value = spectrumvalue.clone();
+        }
+        final SpectrumEvent_RO spectrumEvent_ro = new SpectrumEvent_RO();
+        String attributeName = ((IBooleanSpectrum) event.getSource()).getName();
+        removeErrorMessage(attributeName);
+        spectrumEvent_ro.setAttributeCompleteName(attributeName);
+        spectrumEvent_ro.setDimX(value.length);
+        spectrumEvent_ro.setTimeStamp(event.getTimeStamp());
+        spectrumEvent_ro.setValue(value, null);
+        processEventSpectrum(spectrumEvent_ro, tryNumber);
+    }
+
+    @Override
+    public void stateChange(final AttributeStateEvent event) {
+    }
+
+    public void processEventSpectrum(final SpectrumEvent_RO event, int try_number) {
+        if (isDataArchivableTimestampWise(event)) {
+            final String attributeName = event.getAttributeCompleteName();
+            // spectrum values can only have periodic modes, we don't need their lastValue
+            try {
+                super.dbProxy.store(event);
+                super.setLastTimestamp(event);
+            } catch (final ArchivingException e) {
+                registerErrorMessage(attributeName, e.getMessage());
+                final String message = "Problem (ArchivingException) storing BooleanSpectrum_RO value";
+                logger.error(message, e);
+
+                try_number--;
+                if (try_number > 0) {
+                    logger.debug("BooleanSpectrum_RO.processEventSpectrum : retry " + try_number + "failed...");
+                    processEventSpectrum(event, try_number);
+                }
+            }
+        }
+    }
+}
diff --git a/src/main/java/HdbArchiver/Collector/spectrum/BooleanSpectrum_RW.java b/hdbarchiver/src/main/java/HdbArchiver/Collector/spectrum/BooleanSpectrum_RW.java
similarity index 94%
rename from src/main/java/HdbArchiver/Collector/spectrum/BooleanSpectrum_RW.java
rename to hdbarchiver/src/main/java/HdbArchiver/Collector/spectrum/BooleanSpectrum_RW.java
index c6251b0e17c405c02b32474ba31f7c2929a11bf7..7a9dfcd3490f5bc86a6cc02571ca8b49733916f9 100644
--- a/src/main/java/HdbArchiver/Collector/spectrum/BooleanSpectrum_RW.java
+++ b/hdbarchiver/src/main/java/HdbArchiver/Collector/spectrum/BooleanSpectrum_RW.java
@@ -1,401 +1,385 @@
-// +======================================================================
-// $Source$
-//
-// Project:      Tango Archiving Service
-//
-// Description:  Java source code for the class  BooleanSpectrum_RW.
-//						(Chinkumo Jean) - March 24, 2004
-//
-// $Author$
-//
-// $Revision$
-//
-// $Log$
-// Revision 1.13  2007/10/03 15:23:29  pierrejoseph
-// Minor changes
-//
-// Revision 1.12  2007/09/28 14:49:22  pierrejoseph
-// Merged between Polling and Events code
-//
-//
-// copyleft :		Synchrotron SOLEIL
-//					L'Orme des Merisiers
-//					Saint-Aubin - BP 48
-//					91192 GIF-sur-YVETTE CEDEX
-//
-//-======================================================================
-
-package HdbArchiver.Collector.spectrum;
-
-import java.util.Arrays;
-import java.util.HashMap;
-import java.util.Map;
-
-import org.slf4j.Logger;
-import org.tango.utils.DevFailedUtils;
-
-import HdbArchiver.HdbArchiver;
-import HdbArchiver.Collector.HdbCollector;
-import HdbArchiver.Collector.HdbModeHandler;
-import fr.esrf.Tango.AttrWriteType;
-import fr.esrf.Tango.DevError;
-import fr.esrf.Tango.DevFailed;
-import fr.esrf.Tango.ErrSeverity;
-import fr.esrf.TangoApi.DeviceAttribute;
-import fr.esrf.TangoApi.DeviceProxy;
-import fr.esrf.TangoApi.events.ITangoArchiveListener;
-import fr.esrf.TangoApi.events.TangoArchive;
-import fr.esrf.TangoApi.events.TangoArchiveEvent;
-import fr.esrf.TangoApi.events.TangoEventsAdapter;
-import fr.esrf.TangoDs.Util;
-import fr.esrf.tangoatk.core.AttributeStateEvent;
-import fr.esrf.tangoatk.core.BooleanSpectrumEvent;
-import fr.esrf.tangoatk.core.ConnectionException;
-import fr.esrf.tangoatk.core.Device;
-import fr.esrf.tangoatk.core.ErrorEvent;
-import fr.esrf.tangoatk.core.IBooleanSpectrum;
-import fr.esrf.tangoatk.core.IBooleanSpectrumListener;
-import fr.esrf.tangoatk.core.attribute.AttributeFactory;
-import fr.soleil.archiving.common.api.exception.ArchivingException;
-import fr.soleil.archiving.common.api.tools.GlobalConst;
-import fr.soleil.archiving.hdbtdb.api.tools.AttributeLightMode;
-import fr.soleil.archiving.hdbtdb.api.tools.SpectrumEvent_RW;
-
-public class BooleanSpectrum_RW extends HdbCollector implements IBooleanSpectrumListener, ITangoArchiveListener {
-
-    private static final long serialVersionUID = -2582758166180474432L;
-
-    private final Map<Device, TangoEventsAdapter> evtAdaptHMap;
-
-    public BooleanSpectrum_RW(final HdbModeHandler hdbModeHandler, final Logger logger) {
-        super(hdbModeHandler, logger);
-        evtAdaptHMap = new HashMap<Device, TangoEventsAdapter>();
-    }
-
-    @Override
-    public synchronized void removeSource(final String attributeName) throws ArchivingException {
-        logger.debug("BooleanSpectrum_RW.removeSource");
-        if (HdbArchiver.isUseEvents) {
-            removeSourceForEvents(attributeName);
-        }
-        try {
-            stopCollecting();
-            final IBooleanSpectrum attribute = (IBooleanSpectrum) attributeList.get(attributeName);
-            if (attribute != null) {
-                attribute.removeBooleanSpectrumListener(this);
-                attribute.removeErrorListener(this);
-                removeTimestamps(attributeName);
-                attributeList.remove(attributeName);
-                removeErrorMessage(attributeName);
-                logger.debug("\t The attribute named " + attributeName + " was fired from the Collector list...");
-            }
-        } catch (final Exception e) {
-            final String message = GlobalConst.ARCHIVING_ERROR_PREFIX + "Failed removing '" + attributeName
-                    + "' from sources";
-            final String reason = GlobalConst.TANGO_COMM_EXCEPTION;
-            final String desc = "Failed while executing Spectrum_RO.removeSource() method...";
-            throw new ArchivingException(message, reason, ErrSeverity.WARN, desc, "", e);
-        } finally {
-            startCollecting();
-        }
-    }
-
-    @Override
-    protected void doAddSourceForPolling(final AttributeLightMode attributeLightMode) throws ArchivingException {
-        try {
-            stopCollecting();
-            final IBooleanSpectrum attribute = (IBooleanSpectrum) attributeList.add(attributeLightMode
-                    .getAttributeCompleteName());
-            attribute.addBooleanSpectrumListener(this);
-            attribute.addErrorListener(this);
-            logger.debug("\t The attribute named " + attributeLightMode.getAttributeCompleteName()
-                    + " was hired to the Collector list...");
-        } catch (final ConnectionException e) {
-            final String message = GlobalConst.ARCHIVING_ERROR_PREFIX + "Failed adding '"
-                    + attributeLightMode.getAttributeCompleteName() + "' as source";
-            final String reason = GlobalConst.TANGO_COMM_EXCEPTION;
-            final String desc = "Failed while executing Spectrum_RO.addSource() method...";
-            throw new ArchivingException(message, reason, ErrSeverity.WARN, desc, "", e);
-        } finally {
-            startCollecting();
-        }
-    }
-
-    // --------------------------------------------------------------------------//
-    // ELETTRA : Archiving Events
-    // --------------------------------------------------------------------------//
-    @Override
-    protected void addSourceForEvents(final AttributeLightMode attributeLightMode) throws ArchivingException {
-        /* Adapter for the Tango archive events */
-        TangoEventsAdapter evtAdapt = null;
-        IBooleanSpectrum attribute = null;
-
-        try {
-            /*
-             * Get the attribute from the AttributeFactory, so that it is not
-             * added to the attribute polled list. Remember that `attributeList'
-             * is an AttributePolledList().
-             */
-            attribute = (IBooleanSpectrum) AttributeFactory.getInstance().getAttribute(
-                    attributeLightMode.getAttributeCompleteName());
-            if (attribute == null) {
-                logger.debug("\033[1;31mSpectrum_RW.java: the attribute \""
-                        + attributeLightMode.getAttributeCompleteName() + " is null (Spectrum_RW.java): not adding it!");
-                return;
-            }
-        } catch (final DevFailed e) {
-            logger.error(DevFailedUtils.toString(e));
-            final String message = GlobalConst.ARCHIVING_ERROR_PREFIX + "Failed adding '"
-                    + attributeLightMode.getAttributeCompleteName() + "' as source";
-            final String reason = "DevFailed exception while calling AttributeFactory.getInstance().getAttribute();";
-            final String desc = "Failed while executing Spectrum_RW.addSource() method...\nSpectrum_RW.java: Failed to get the attribute from the AttributeFactory";
-            throw new ArchivingException(message, reason, ErrSeverity.WARN, desc, "", e);
-        } catch (final ConnectionException e) {
-            final String message = GlobalConst.ARCHIVING_ERROR_PREFIX + "Failed adding '"
-                    + attributeLightMode.getAttributeCompleteName() + "' as source";
-            final String reason = GlobalConst.TANGO_COMM_EXCEPTION;
-            final String desc = "Failed while executing Spectrum_RW.addSource() method...\nSpectrum_RW.java: Failed to get the attribute from the AttributeFactory";
-            throw new ArchivingException(message, reason, ErrSeverity.WARN, desc, "", e);
-        } /*
-           * end of first try/catch block, to retrieve the attribute from the
-           * AttributeFactory
-           */
-
-        logger.debug("boolean SPECTRUM [RW] attribute \"" + attribute.getNameSansDevice() + "\"...\t");
-
-        /*
-         * If an attribute (name + device server) is already in the map, it
-         * means it has already been registered for the Tango Archive events. So
-         * it does not have to be added to the archive events once again, nor to
-         * the attributePolledList: we can return. The same goes for an
-         * attribute already present in the attributePolledList `attributeList'.
-         */
-        /*
-         * if(HdbArchiver.useEvents.equalsIgnoreCase("no")) {
-         * System.out.print("[\033[1;35mEVENTS DISABLED\033[0m]. ");
-         * registerForScalarListener(attributeLightMode); } else {
-         */
-        try {
-            synchronized (evtAdaptHMap) {
-                evtAdapt = evtAdaptHMap.get(attribute.getDevice());
-                if (evtAdapt == null) {
-                    evtAdapt = new TangoEventsAdapter(attribute.getDevice());
-                    evtAdaptHMap.put(attribute.getDevice(), evtAdapt);
-                } else {
-                    logger.debug("\nThe adapter for the attribute is already configured");
-                }
-            }
-            final String[] filter = new String[0];
-
-            /*
-             * Try to register for the archive events: evtAdapt is the new
-             * adapter or the one already found in the map.
-             */
-            evtAdapt.addTangoArchiveListener(this, attribute.getNameSansDevice(), filter);
-            archiveListenersCounter++;
-            logger.debug("[\033[1;32mEVENTS\033[0m].");
-        } catch (final DevFailed e) {
-            /*
-             * If archive events are not enabled for the attribute, we will poll
-             * it
-             */
-            for (final DevError error : e.errors) {
-                // // System.out.println("error registering: " +
-                // e.errors[err].desc);
-                if (error.desc.contains("Already connected to event")) {
-                    logger.debug("Already connected to events for attribute");
-                    return;
-                }
-            }
-            /* Register for polling */
-            addSourceForPolling(attributeLightMode);
-            /* unlock the attributeList */
-        }
-        // } /* function finishes */
-    }
-
-    private void removeSourceForEvents(final String attributeName) {
-        logger.debug("BooleanSpectrum_RW.removeSource");
-        logger.debug("boolean spectrum [RW]: removing source for \"" + attributeName + "\"...\t");
-        TangoEventsAdapter adapter;
-        IBooleanSpectrum attribute;
-        /*
-         * If useEvents is enabled, we should remove the eventListener, if not
-         * we can skip this piece of code
-         */
-        // if (HdbArchiver.useEvents.equalsIgnoreCase("yes"))
-        // {
-        try {
-            synchronized (evtAdaptHMap) {
-                attribute = (IBooleanSpectrum) AttributeFactory.getInstance().getAttribute(attributeName);
-                /*
-                 * Retrieve in the hash table the event adapter associated to
-                 * the attributeName.
-                 */
-                if (attribute == null) {
-                    logger.debug("\033[1;31mThe attribute " + attributeName + " is null\033[0m");
-                }
-                adapter = evtAdaptHMap.get(attribute.getDevice());
-
-                if (adapter != null) {
-                    adapter.removeTangoArchiveListener(this, attribute.getNameSansDevice());
-                    archiveListenersCounter--;
-                    logger.debug("[\033[1;32mEVENTS\033[0m].");
-                    Util.out2.println(" (adapter: " + adapter.device_name() + ")");
-                    /* Should be ok now to return */
-                    return;
-                }
-            } /* unlock event adapters map */
-        } catch (final ConnectionException e) /* getAttribute() failed */
-        {
-            Util.out2
-                    .println("\033[1;31mConnection exception while retrieving the attribute from the AttributeFactory!\033[0m");
-        } catch (final DevFailed f) {
-            Util.out2.println("Error removing tangoArchiveListener");
-            for (final DevError error : f.errors) {
-                Util.out2.println("error: " + error.desc);
-            }
-        }
-        // }
-    }
-
-    @Override
-    public void archive(final TangoArchiveEvent event) {
-        final int tryNumber = DEFAULT_TRY_NUMBER;
-        DeviceAttribute attrib = null;
-        TangoArchive arch;
-        DeviceProxy proxy;
-        final SpectrumEvent_RW spectrumEvent_rw = new SpectrumEvent_RW();
-
-        try {
-            attrib = event.getValue();
-        } catch (final DevFailed f) {
-            System.out.println("Spectrum_RW.java: archive(): Error getting archive event attribute value");
-            f.printStackTrace();
-            return;
-        } catch (final Exception e) /* Shouldn't be reached */
-        {
-            System.out.println("Spectrum_RW.java.archive.getValue() failed, caught generic Exception, code failure");
-            e.printStackTrace();
-            return;
-        }
-        try {
-            /*
-             * To correctly archive the attribute, we have to know its complete
-             * name. To acquire this information, we must o back to the
-             * TangoArchive object (which contains the DeviceProxy).
-             */
-            arch = (TangoArchive) event.getSource();
-            proxy = arch.getEventSupplier(); /*
-                                              * The device that supplied the
-                                              * event
-                                              */
-            if (arch == null || proxy == null || attrib == null) {
-                System.out
-                        .println("\033[1;31mBooleanSpectrum_RW.java: event.getValue() or event.getSource() or event.getSource().getEventSupplier()) returned null!\033[0m");
-                return;
-            }
-
-            final int dim = attrib.getDimX();
-            final boolean[] bvaluetmp = attrib.extractBooleanArray();
-            final boolean[] bvalue = Arrays.copyOf(bvaluetmp, dim);
-
-            /* Set the boolean spectrum */
-            spectrumEvent_rw.setValue(bvalue, null);
-
-            System.out.println(proxy.name() + ": " + attrib.getName()
-                    + "{boolean spectrum, RW} [\033[1;32mEVENT\033[0m]" + " (dim: " + attrib.getDimX() + ")");
-            spectrumEvent_rw.setAttributeCompleteName(proxy.name() + "/" + attrib.getName());
-            spectrumEvent_rw.setTimeStamp(attrib.getTime());
-            spectrumEvent_rw.setDataType(attrib.getType());
-            spectrumEvent_rw.setWritable(AttrWriteType._READ_WRITE);
-            spectrumEvent_rw.setDimX(dim);
-            /* Process the just built spectrum event */
-            processEventSpectrum(spectrumEvent_rw, tryNumber);
-
-        } catch (final DevFailed devFailed) {
-            System.err.println("BooleanSpectrum_RW.java: archive() : " + GlobalConst.ARCHIVING_ERROR_PREFIX + "\r\n\t"
-                    + "Problem while reading " + spectrumEvent_rw.getAttributeCompleteName() + " values...");
-            // printException(GlobalConst.DATA_TYPE_EXCEPTION ,
-            // AttrDataFormat._SCALAR ,
-            // spectrumEvent_ro.getAttribute_complete_name() , devFailed);
-
-            final Object value = null;
-            spectrumEvent_rw.setValue(value, null);
-            processEventSpectrum(spectrumEvent_rw, tryNumber);
-        } catch (final Exception exE) {
-            System.err.println("Boolean.Spectrum_RW.java: archive : " + GlobalConst.ARCHIVING_ERROR_PREFIX + "\r\n\t"
-                    + "Problem while reading " + spectrumEvent_rw.getAttributeCompleteName() + " values...");
-            exE.printStackTrace();
-            final Object value = null;
-            spectrumEvent_rw.setValue(value, null);
-            processEventSpectrum(spectrumEvent_rw, tryNumber);
-        }
-
-    }
-
-    // --------------------------------------------------------------------------//
-    // ELETTRA : Archiving Events
-    // --------------------------------------------------------------------------//
-
-    @Override
-    protected void treatErrorEventAfterLogging(ErrorEvent errorEvent) {
-        final boolean[] value = null;
-        final SpectrumEvent_RW spectrumEvent_rw = new SpectrumEvent_RW();
-        spectrumEvent_rw.setAttributeCompleteName(errorEvent.getSource().toString());
-        spectrumEvent_rw.setTimeStamp(errorEvent.getTimeStamp());
-        spectrumEvent_rw.setValue(value, null);
-        processEventSpectrum(spectrumEvent_rw, DEFAULT_TRY_NUMBER);
-    }
-
-    @Override
-    public void booleanSpectrumChange(final BooleanSpectrumEvent event) {
-        final int tryNumber = DEFAULT_TRY_NUMBER;
-
-        final IBooleanSpectrum eventSrc = (IBooleanSpectrum) event.getSource();
-        final boolean[] spectrumvalueR = eventSrc.getValue();
-        final boolean[] spectrumvalueW = eventSrc.getSetPoint();
-        boolean[] value = null;
-        if (spectrumvalueR != null && spectrumvalueW != null) {
-            value = new boolean[spectrumvalueR.length + spectrumvalueW.length];
-            System.arraycopy(spectrumvalueR, 0, value, 0, spectrumvalueR.length);
-            System.arraycopy(spectrumvalueW, 0, value, spectrumvalueR.length, spectrumvalueW.length);
-        }
-        // System.out.println (
-        // "CLA/Spectrum_RW/spectrumChange/value.length/"+value.length+"/" );
-        final SpectrumEvent_RW spectrumEvent_rw = new SpectrumEvent_RW();
-        String attributeName = ((IBooleanSpectrum) event.getSource()).getName();
-        removeErrorMessage(attributeName);
-        spectrumEvent_rw.setAttributeCompleteName(attributeName);
-        spectrumEvent_rw.setDimX(((IBooleanSpectrum) event.getSource()).getXDimension());
-        spectrumEvent_rw.setTimeStamp(event.getTimeStamp());
-        spectrumEvent_rw.setValue(value, null);
-        processEventSpectrum(spectrumEvent_rw, tryNumber);
-    }
-
-    @Override
-    public void stateChange(final AttributeStateEvent event) {
-    }
-
-    public void processEventSpectrum(final SpectrumEvent_RW event, int try_number) {
-        if (isDataArchivableTimestampWise(event)) {
-            final String attributeName = event.getAttributeCompleteName();
-            try {
-                // spectrum values can only have periodic modes, we don't need their lastValue
-                super.dbProxy.store(event);
-                super.setLastTimestamp(event);
-            } catch (final ArchivingException e) {
-                registerErrorMessage(attributeName, e.getMessage());
-                final String message = "Problem (ArchivingException) storing BooleanSpectrum_RW value";
-                logger.error(message, e);
-
-                try_number--;
-                if (try_number > 0) {
-                    Util.out2.println("BooleanSpectrumEvent_RW.processEventSpectrum : retry " + try_number
-                            + "failed...");
-                    processEventSpectrum(event, try_number);
-                }
-            }
-        }
-    }
-}
+// +======================================================================
+// $Source$
+//
+// Project:      Tango Archiving Service
+//
+// Description:  Java source code for the class  BooleanSpectrum_RW.
+//						(Chinkumo Jean) - March 24, 2004
+//
+// $Author$
+//
+// $Revision$
+//
+// $Log$
+// Revision 1.13  2007/10/03 15:23:29  pierrejoseph
+// Minor changes
+//
+// Revision 1.12  2007/09/28 14:49:22  pierrejoseph
+// Merged between Polling and Events code
+//
+//
+// copyleft :		Synchrotron SOLEIL
+//					L'Orme des Merisiers
+//					Saint-Aubin - BP 48
+//					91192 GIF-sur-YVETTE CEDEX
+//
+//-======================================================================
+
+package HdbArchiver.Collector.spectrum;
+
+import HdbArchiver.Collector.HdbCollector;
+import HdbArchiver.Collector.HdbModeHandler;
+import fr.esrf.Tango.AttrWriteType;
+import fr.esrf.Tango.DevError;
+import fr.esrf.Tango.DevFailed;
+import fr.esrf.Tango.ErrSeverity;
+import fr.esrf.TangoApi.DeviceAttribute;
+import fr.esrf.TangoApi.DeviceProxy;
+import fr.esrf.TangoApi.events.ITangoArchiveListener;
+import fr.esrf.TangoApi.events.TangoArchive;
+import fr.esrf.TangoApi.events.TangoArchiveEvent;
+import fr.esrf.TangoApi.events.TangoEventsAdapter;
+import fr.esrf.TangoDs.Util;
+import fr.esrf.tangoatk.core.*;
+import fr.esrf.tangoatk.core.attribute.AttributeFactory;
+import fr.soleil.archiving.common.api.exception.ArchivingException;
+import fr.soleil.archiving.common.api.tools.GlobalConst;
+import fr.soleil.archiving.hdbtdb.api.tools.AttributeLightMode;
+import fr.soleil.archiving.hdbtdb.api.tools.SpectrumEvent_RW;
+import org.slf4j.Logger;
+import org.tango.utils.DevFailedUtils;
+
+import java.util.Arrays;
+import java.util.HashMap;
+import java.util.Map;
+
+public class BooleanSpectrum_RW extends HdbCollector implements IBooleanSpectrumListener, ITangoArchiveListener {
+
+    private static final long serialVersionUID = -2582758166180474432L;
+
+    private final Map<Device, TangoEventsAdapter> evtAdaptHMap;
+
+    public BooleanSpectrum_RW(final HdbModeHandler hdbModeHandler, final boolean useEvents, final Logger logger) {
+        super(hdbModeHandler, useEvents, logger);
+        evtAdaptHMap = new HashMap<Device, TangoEventsAdapter>();
+    }
+
+    @Override
+    public synchronized void removeSource(final String attributeName) throws ArchivingException {
+        logger.debug("BooleanSpectrum_RW.removeSource");
+        if (useEvents) {
+            removeSourceForEvents(attributeName);
+        }
+        try {
+            stopCollecting();
+            final IBooleanSpectrum attribute = (IBooleanSpectrum) attributeList.get(attributeName);
+            if (attribute != null) {
+                attribute.removeBooleanSpectrumListener(this);
+                attribute.removeErrorListener(this);
+                removeTimestamps(attributeName);
+                attributeList.remove(attributeName);
+                removeErrorMessage(attributeName);
+                logger.debug("\t The attribute named " + attributeName + " was fired from the Collector list...");
+            }
+        } catch (final Exception e) {
+            final String message = GlobalConst.ARCHIVING_ERROR_PREFIX + "Failed removing '" + attributeName
+                    + "' from sources";
+            final String reason = GlobalConst.TANGO_COMM_EXCEPTION;
+            final String desc = "Failed while executing Spectrum_RO.removeSource() method...";
+            throw new ArchivingException(message, reason, ErrSeverity.WARN, desc, "", e);
+        } finally {
+            startCollecting();
+        }
+    }
+
+    @Override
+    protected void doAddSourceForPolling(final AttributeLightMode attributeLightMode) throws ArchivingException {
+        try {
+            stopCollecting();
+            final IBooleanSpectrum attribute = (IBooleanSpectrum) attributeList.add(attributeLightMode
+                    .getAttributeCompleteName());
+            attribute.addBooleanSpectrumListener(this);
+            attribute.addErrorListener(this);
+            logger.debug("\t The attribute named " + attributeLightMode.getAttributeCompleteName()
+                    + " was hired to the Collector list...");
+        } catch (final ConnectionException e) {
+            final String message = GlobalConst.ARCHIVING_ERROR_PREFIX + "Failed adding '"
+                    + attributeLightMode.getAttributeCompleteName() + "' as source";
+            final String reason = GlobalConst.TANGO_COMM_EXCEPTION;
+            final String desc = "Failed while executing Spectrum_RO.addSource() method...";
+            throw new ArchivingException(message, reason, ErrSeverity.WARN, desc, "", e);
+        } finally {
+            startCollecting();
+        }
+    }
+
+    // --------------------------------------------------------------------------//
+    // ELETTRA : Archiving Events
+    // --------------------------------------------------------------------------//
+    @Override
+    protected void addSourceForEvents(final AttributeLightMode attributeLightMode) throws ArchivingException {
+        /* Adapter for the Tango archive events */
+        TangoEventsAdapter evtAdapt = null;
+        IBooleanSpectrum attribute = null;
+
+        try {
+            /*
+             * Get the attribute from the AttributeFactory, so that it is not
+             * added to the attribute polled list. Remember that `attributeList'
+             * is an AttributePolledList().
+             */
+            attribute = (IBooleanSpectrum) AttributeFactory.getInstance().getAttribute(
+                    attributeLightMode.getAttributeCompleteName());
+            if (attribute == null) {
+                logger.debug("\033[1;31mSpectrum_RW.java: the attribute \""
+                        + attributeLightMode.getAttributeCompleteName() + " is null (Spectrum_RW.java): not adding it!");
+                return;
+            }
+        } catch (final DevFailed e) {
+            logger.error(DevFailedUtils.toString(e));
+            final String message = GlobalConst.ARCHIVING_ERROR_PREFIX + "Failed adding '"
+                    + attributeLightMode.getAttributeCompleteName() + "' as source";
+            final String reason = "DevFailed exception while calling AttributeFactory.getInstance().getAttribute();";
+            final String desc = "Failed while executing Spectrum_RW.addSource() method...\nSpectrum_RW.java: Failed to get the attribute from the AttributeFactory";
+            throw new ArchivingException(message, reason, ErrSeverity.WARN, desc, "", e);
+        } catch (final ConnectionException e) {
+            final String message = GlobalConst.ARCHIVING_ERROR_PREFIX + "Failed adding '"
+                    + attributeLightMode.getAttributeCompleteName() + "' as source";
+            final String reason = GlobalConst.TANGO_COMM_EXCEPTION;
+            final String desc = "Failed while executing Spectrum_RW.addSource() method...\nSpectrum_RW.java: Failed to get the attribute from the AttributeFactory";
+            throw new ArchivingException(message, reason, ErrSeverity.WARN, desc, "", e);
+        } /*
+           * end of first try/catch block, to retrieve the attribute from the
+           * AttributeFactory
+           */
+
+        logger.debug("boolean SPECTRUM [RW] attribute \"" + attribute.getNameSansDevice() + "\"...\t");
+
+        /*
+         * If an attribute (name + device server) is already in the map, it
+         * means it has already been registered for the Tango Archive events. So
+         * it does not have to be added to the archive events once again, nor to
+         * the attributePolledList: we can return. The same goes for an
+         * attribute already present in the attributePolledList `attributeList'.
+         */
+        /*
+         * if(HdbArchiver.useEvents.equalsIgnoreCase("no")) {
+         * System.out.print("[\033[1;35mEVENTS DISABLED\033[0m]. ");
+         * registerForScalarListener(attributeLightMode); } else {
+         */
+        try {
+            synchronized (evtAdaptHMap) {
+                evtAdapt = evtAdaptHMap.get(attribute.getDevice());
+                if (evtAdapt == null) {
+                    evtAdapt = new TangoEventsAdapter(attribute.getDevice());
+                    evtAdaptHMap.put(attribute.getDevice(), evtAdapt);
+                } else {
+                    logger.debug("\nThe adapter for the attribute is already configured");
+                }
+            }
+            final String[] filter = new String[0];
+
+            /*
+             * Try to register for the archive events: evtAdapt is the new
+             * adapter or the one already found in the map.
+             */
+            evtAdapt.addTangoArchiveListener(this, attribute.getNameSansDevice(), filter);
+            archiveListenersCounter++;
+            logger.debug("[\033[1;32mEVENTS\033[0m].");
+        } catch (final DevFailed e) {
+            /*
+             * If archive events are not enabled for the attribute, we will poll
+             * it
+             */
+            for (final DevError error : e.errors) {
+                // // System.out.println("error registering: " +
+                // e.errors[err].desc);
+                if (error.desc.contains("Already connected to event")) {
+                    logger.debug("Already connected to events for attribute");
+                    return;
+                }
+            }
+            /* Register for polling */
+            addSourceForPolling(attributeLightMode);
+            /* unlock the attributeList */
+        }
+        // } /* function finishes */
+    }
+
+    private void removeSourceForEvents(final String attributeName) {
+        logger.debug("BooleanSpectrum_RW.removeSource");
+        logger.debug("boolean spectrum [RW]: removing source for \"" + attributeName + "\"...\t");
+        TangoEventsAdapter adapter;
+        IBooleanSpectrum attribute;
+        /*
+         * If useEvents is enabled, we should remove the eventListener, if not
+         * we can skip this piece of code
+         */
+        // if (HdbArchiver.useEvents.equalsIgnoreCase("yes"))
+        // {
+        try {
+            synchronized (evtAdaptHMap) {
+                attribute = (IBooleanSpectrum) AttributeFactory.getInstance().getAttribute(attributeName);
+                /*
+                 * Retrieve in the hash table the event adapter associated to
+                 * the attributeName.
+                 */
+                if (attribute == null) {
+                    logger.debug("\033[1;31mThe attribute " + attributeName + " is null\033[0m");
+                }
+                adapter = evtAdaptHMap.get(attribute.getDevice());
+
+                if (adapter != null) {
+                    adapter.removeTangoArchiveListener(this, attribute.getNameSansDevice());
+                    archiveListenersCounter--;
+                    logger.debug("[\033[1;32mEVENTS\033[0m].");
+                    /* Should be ok now to return */
+                    return;
+                }
+            } /* unlock event adapters map */
+        } catch (final ConnectionException e) /* getAttribute() failed */ {
+        } catch (final DevFailed f) {
+            for (final DevError error : f.errors) {
+                logger.error("error: " + error.desc);
+            }
+        }
+        // }
+    }
+
+    @Override
+    public void archive(final TangoArchiveEvent event) {
+        final int tryNumber = DEFAULT_TRY_NUMBER;
+        DeviceAttribute attrib = null;
+        TangoArchive arch;
+        DeviceProxy proxy;
+        final SpectrumEvent_RW spectrumEvent_rw = new SpectrumEvent_RW();
+
+        try {
+            attrib = event.getValue();
+        } catch (final DevFailed f) {
+            System.out.println("Spectrum_RW.java: archive(): Error getting archive event attribute value");
+            f.printStackTrace();
+            return;
+        } catch (final Exception e) /* Shouldn't be reached */ {
+            System.out.println("Spectrum_RW.java.archive.getValue() failed, caught generic Exception, code failure");
+            e.printStackTrace();
+            return;
+        }
+        try {
+            /*
+             * To correctly archive the attribute, we have to know its complete
+             * name. To acquire this information, we must o back to the
+             * TangoArchive object (which contains the DeviceProxy).
+             */
+            arch = (TangoArchive) event.getSource();
+            proxy = arch.getEventSupplier(); /*
+                                              * The device that supplied the
+                                              * event
+                                              */
+            if (arch == null || proxy == null || attrib == null) {
+                System.out
+                        .println("\033[1;31mBooleanSpectrum_RW.java: event.getValue() or event.getSource() or event.getSource().getEventSupplier()) returned null!\033[0m");
+                return;
+            }
+
+            final int dim = attrib.getDimX();
+            final boolean[] bvaluetmp = attrib.extractBooleanArray();
+            final boolean[] bvalue = Arrays.copyOf(bvaluetmp, dim);
+
+            /* Set the boolean spectrum */
+            spectrumEvent_rw.setValue(bvalue, null);
+
+            System.out.println(proxy.name() + ": " + attrib.getName()
+                    + "{boolean spectrum, RW} [\033[1;32mEVENT\033[0m]" + " (dim: " + attrib.getDimX() + ")");
+            spectrumEvent_rw.setAttributeCompleteName(proxy.name() + "/" + attrib.getName());
+            spectrumEvent_rw.setTimeStamp(attrib.getTime());
+            spectrumEvent_rw.setDataType(attrib.getType());
+            spectrumEvent_rw.setWritable(AttrWriteType._READ_WRITE);
+            spectrumEvent_rw.setDimX(dim);
+            /* Process the just built spectrum event */
+            processEventSpectrum(spectrumEvent_rw, tryNumber);
+
+        } catch (final DevFailed devFailed) {
+            System.err.println("BooleanSpectrum_RW.java: archive() : " + GlobalConst.ARCHIVING_ERROR_PREFIX + "\r\n\t"
+                    + "Problem while reading " + spectrumEvent_rw.getAttributeCompleteName() + " values...");
+            // printException(GlobalConst.DATA_TYPE_EXCEPTION ,
+            // AttrDataFormat._SCALAR ,
+            // spectrumEvent_ro.getAttribute_complete_name() , devFailed);
+
+            final Object value = null;
+            spectrumEvent_rw.setValue(value, null);
+            processEventSpectrum(spectrumEvent_rw, tryNumber);
+        } catch (final Exception exE) {
+            System.err.println("Boolean.Spectrum_RW.java: archive : " + GlobalConst.ARCHIVING_ERROR_PREFIX + "\r\n\t"
+                    + "Problem while reading " + spectrumEvent_rw.getAttributeCompleteName() + " values...");
+            exE.printStackTrace();
+            final Object value = null;
+            spectrumEvent_rw.setValue(value, null);
+            processEventSpectrum(spectrumEvent_rw, tryNumber);
+        }
+
+    }
+
+    // --------------------------------------------------------------------------//
+    // ELETTRA : Archiving Events
+    // --------------------------------------------------------------------------//
+
+    @Override
+    protected void treatErrorEventAfterLogging(ErrorEvent errorEvent) {
+        final boolean[] value = null;
+        final SpectrumEvent_RW spectrumEvent_rw = new SpectrumEvent_RW();
+        spectrumEvent_rw.setAttributeCompleteName(errorEvent.getSource().toString());
+        spectrumEvent_rw.setTimeStamp(errorEvent.getTimeStamp());
+        spectrumEvent_rw.setValue(value, null);
+        processEventSpectrum(spectrumEvent_rw, DEFAULT_TRY_NUMBER);
+    }
+
+    @Override
+    public void booleanSpectrumChange(final BooleanSpectrumEvent event) {
+        final int tryNumber = DEFAULT_TRY_NUMBER;
+
+        final IBooleanSpectrum eventSrc = (IBooleanSpectrum) event.getSource();
+        final boolean[] spectrumvalueR = eventSrc.getValue();
+        final boolean[] spectrumvalueW = eventSrc.getSetPoint();
+        boolean[] value = null;
+        if (spectrumvalueR != null && spectrumvalueW != null) {
+            value = new boolean[spectrumvalueR.length + spectrumvalueW.length];
+            System.arraycopy(spectrumvalueR, 0, value, 0, spectrumvalueR.length);
+            System.arraycopy(spectrumvalueW, 0, value, spectrumvalueR.length, spectrumvalueW.length);
+        }
+        // System.out.println (
+        // "CLA/Spectrum_RW/spectrumChange/value.length/"+value.length+"/" );
+        final SpectrumEvent_RW spectrumEvent_rw = new SpectrumEvent_RW();
+        String attributeName = ((IBooleanSpectrum) event.getSource()).getName();
+        removeErrorMessage(attributeName);
+        spectrumEvent_rw.setAttributeCompleteName(attributeName);
+        spectrumEvent_rw.setDimX(((IBooleanSpectrum) event.getSource()).getXDimension());
+        spectrumEvent_rw.setTimeStamp(event.getTimeStamp());
+        spectrumEvent_rw.setValue(value, null);
+        processEventSpectrum(spectrumEvent_rw, tryNumber);
+    }
+
+    @Override
+    public void stateChange(final AttributeStateEvent event) {
+    }
+
+    public void processEventSpectrum(final SpectrumEvent_RW event, int try_number) {
+        if (isDataArchivableTimestampWise(event)) {
+            final String attributeName = event.getAttributeCompleteName();
+            try {
+                // spectrum values can only have periodic modes, we don't need their lastValue
+                super.dbProxy.store(event);
+                super.setLastTimestamp(event);
+            } catch (final ArchivingException e) {
+                registerErrorMessage(attributeName, e.getMessage());
+                final String message = "Problem (ArchivingException) storing BooleanSpectrum_RW value";
+                logger.error(message, e);
+
+                try_number--;
+                if (try_number > 0) {
+                    processEventSpectrum(event, try_number);
+                }
+            }
+        }
+    }
+}
diff --git a/src/main/java/HdbArchiver/Collector/spectrum/NumberSpectrum_RO.java b/hdbarchiver/src/main/java/HdbArchiver/Collector/spectrum/NumberSpectrum_RO.java
similarity index 94%
rename from src/main/java/HdbArchiver/Collector/spectrum/NumberSpectrum_RO.java
rename to hdbarchiver/src/main/java/HdbArchiver/Collector/spectrum/NumberSpectrum_RO.java
index 610ba1606cc014b8d69a1f2bfbed1a1bc39a4835..d9532b76d4c5e6a1739b51dbd0837f8ec0fc7f77 100644
--- a/src/main/java/HdbArchiver/Collector/spectrum/NumberSpectrum_RO.java
+++ b/hdbarchiver/src/main/java/HdbArchiver/Collector/spectrum/NumberSpectrum_RO.java
@@ -1,509 +1,494 @@
-// +======================================================================
-// $Source$
-//
-// Project:      Tango Archiving Service
-//
-// Description:  Java source code for the class  NumberSpectrum_RO.
-//						(Chinkumo Jean) - Mar 24, 2004
-//
-// $Author$
-//
-// $Revision$
-//
-// $Log$
-// Revision 1.13  2007/10/03 15:23:29  pierrejoseph
-// Minor changes
-//
-// Revision 1.12  2007/09/28 14:49:22  pierrejoseph
-// Merged between Polling and Events code
-//
-// Revision 1.11  2007/09/25 14:59:17  pierrejoseph
-// 5251 : sometimes the device stayed in Running state sue to a blocking while in  the addAttribute method.
-//
-// Revision 1.10  2007/06/11 12:18:51  pierrejoseph
-// m_logger from the mother class (ArchiverCollector)
-//
-// Revision 1.9  2007/03/05 16:25:20  ounsy
-// non-static DataBase
-//
-// Revision 1.8  2006/10/31 16:54:12  ounsy
-// milliseconds and null values management
-//
-// Revision 1.7  2006/07/26 08:37:21  ounsy
-// try number no more static and reinitialized with change events (errorchange, numberscalarchange, etc...)
-//
-// Revision 1.6  2006/07/21 14:39:26  ounsy
-// removed useless logs
-//
-// Revision 1.5  2006/07/18 08:03:18  ounsy
-// minor changes
-//
-// Revision 1.4  2006/06/16 09:25:33  ounsy
-// changed imports because of the diary package moving to the javaapi project
-//
-// Revision 1.3  2006/06/13 13:28:19  ounsy
-// added a file logging system (diary) that records data storing errors
-//
-// Revision 1.2  2006/05/23 11:57:17  ounsy
-// now checks the timeCondition condition before calling DbProxy.store
-//
-// Revision 1.1  2006/05/03 14:28:16  ounsy
-// renamed Spectrum_... into NumberSpectrum_...
-//
-// Revision 1.9  2006/04/05 13:49:51  ounsy
-// new types full support
-//
-// Revision 1.8  2006/03/28 11:13:49  ounsy
-// better spectrum management
-//
-// Revision 1.7  2005/11/29 17:33:53  chinkumo
-// no message
-//
-// Revision 1.6.10.2  2005/11/29 16:16:05  chinkumo
-// Code reformated (pogo compatible)
-//
-// Revision 1.6.10.1  2005/11/15 13:46:08  chinkumo
-// ...
-//
-// Revision 1.6  2005/06/24 12:06:27  chinkumo
-// Some constants were moved from fr.soleil.hdbtdbArchivingApi.ArchivingApi.ConfigConst to fr.soleil.hdbtdbArchivingApi.ArchivingTools.Tools.GlobalConst.
-
-// This change was reported here.
-//
-// Revision 1.5  2005/06/14 10:30:28  chinkumo
-// Branch (hdbArchiver_1_0_1-branch_0)  and HEAD merged.
-//
-// Revision 1.4.2.1  2005/06/13 14:01:07  chinkumo
-// Changes made to improve the management of exceptions were reported here.
-//
-// Revision 1.4  2005/04/08 15:37:00  chinkumo
-// errorChange method filled.
-
-// The aim of this method is to manage possible attribute's problem while polling attributes.
-
-// In case of unavailable value, a record is nevertheless carried out with the event timestamp, but with a kind of NULL value.
-//
-// Revision 1.3  2005/02/04 17:10:14  chinkumo
-// The trouble with the grouped stopping strategy was fixed.
-//
-// Revision 1.2  2005/01/26 16:38:14  chinkumo
-// Ultimate synchronization before real sharing.
-//
-// Revision 1.1  2004/12/06 16:43:25  chinkumo
-// First commit (new architecture).
-//
-//
-// copyleft :	Synchrotron SOLEIL
-//					L'Orme des Merisiers
-//					Saint-Aubin - BP 48
-//					91192 GIF-sur-YVETTE CEDEX
-//
-//-======================================================================
-
-package HdbArchiver.Collector.spectrum;
-
-import java.util.HashMap;
-import java.util.Map;
-
-import org.slf4j.Logger;
-import org.tango.utils.DevFailedUtils;
-
-import HdbArchiver.HdbArchiver;
-import HdbArchiver.Collector.HdbCollector;
-import HdbArchiver.Collector.HdbModeHandler;
-import fr.esrf.Tango.AttrWriteType;
-import fr.esrf.Tango.DevError;
-import fr.esrf.Tango.DevFailed;
-import fr.esrf.Tango.ErrSeverity;
-import fr.esrf.TangoApi.DeviceAttribute;
-import fr.esrf.TangoApi.DeviceProxy;
-import fr.esrf.TangoApi.events.ITangoArchiveListener;
-import fr.esrf.TangoApi.events.TangoArchive;
-import fr.esrf.TangoApi.events.TangoArchiveEvent;
-import fr.esrf.TangoApi.events.TangoEventsAdapter;
-import fr.esrf.TangoDs.TangoConst;
-import fr.esrf.TangoDs.Util;
-import fr.esrf.tangoatk.core.AttributeStateEvent;
-import fr.esrf.tangoatk.core.ConnectionException;
-import fr.esrf.tangoatk.core.Device;
-import fr.esrf.tangoatk.core.ErrorEvent;
-import fr.esrf.tangoatk.core.INumberSpectrum;
-import fr.esrf.tangoatk.core.ISpectrumListener;
-import fr.esrf.tangoatk.core.NumberSpectrumEvent;
-import fr.esrf.tangoatk.core.attribute.AttributeFactory;
-import fr.soleil.archiving.common.api.exception.ArchivingException;
-import fr.soleil.archiving.common.api.tools.GlobalConst;
-import fr.soleil.archiving.hdbtdb.api.tools.AttributeLightMode;
-import fr.soleil.archiving.hdbtdb.api.tools.SpectrumEvent_RO;
-
-public class NumberSpectrum_RO extends HdbCollector implements ISpectrumListener, ITangoArchiveListener {
-
-    private static final long serialVersionUID = -1127931702976825590L;
-
-    private final Map<Device, TangoEventsAdapter> evtAdaptHMap;
-
-    public NumberSpectrum_RO(final HdbModeHandler hdbModeHandler, final Logger logger) {
-        super(hdbModeHandler, logger);
-        evtAdaptHMap = new HashMap<Device, TangoEventsAdapter>();
-    }
-
-    @Override
-    public synchronized void removeSource(final String attributeName) throws ArchivingException {
-        Util.out2.println("NumberSpectrum_RO.removeSource");
-
-        if (HdbArchiver.isUseEvents) {
-            removeSourceForEvents(attributeName);
-        }
-
-        try {
-            /*
-             * while ( ( INumberSpectrum ) attributeList.get(attributeName) !=
-             * null ) {
-             */
-            stopCollecting();
-            final INumberSpectrum attribute = (INumberSpectrum) attributeList.get(attributeName);
-            if (attribute != null) {
-                attribute.removeSpectrumListener(this);
-                attribute.removeErrorListener(this);
-                removeTimestamps(attributeName);
-                attributeList.remove(attributeName);
-                removeErrorMessage(attributeName);
-                Util.out4.println("\t The attribute named " + attributeName + " was fired from the Collector list...");
-            }
-        } catch (final Exception e) {
-            final String message = GlobalConst.ARCHIVING_ERROR_PREFIX + "Failed removing '" + attributeName
-                    + "' from sources";
-            final String reason = GlobalConst.TANGO_COMM_EXCEPTION;
-            final String desc = "Failed while executing NumberSpectrum_RO.removeSource() method...";
-            throw new ArchivingException(message, reason, ErrSeverity.WARN, desc, "", e);
-        } finally {
-            startCollecting();
-        }
-    }
-
-    @Override
-    protected void doAddSourceForPolling(final AttributeLightMode attributeLightMode) throws ArchivingException {
-        String attributeName = null;
-        try {
-            attributeName = attributeLightMode.getAttributeCompleteName();
-            stopCollecting();
-            final INumberSpectrum attribute = (INumberSpectrum) attributeList.add(attributeName);
-            attribute.addSpectrumListener(this);
-            attribute.addErrorListener(this);
-            logger.debug("\t The attribute named " + attributeLightMode.getAttributeCompleteName()
-                    + " was hired to the Collector list...");
-
-        } catch (final ConnectionException e) {
-            registerErrorMessage(attributeName, e);
-            final String message = GlobalConst.ARCHIVING_ERROR_PREFIX + "Failed adding '"
-                    + attributeLightMode.getAttributeCompleteName() + "' as source";
-            final String reason = GlobalConst.TANGO_COMM_EXCEPTION;
-            final String desc = "Failed while executing NumberSpectrum_RO.addSource() method...";
-            throw new ArchivingException(message, reason, ErrSeverity.WARN, desc, "", e);
-        } finally {
-            startCollecting();
-        }
-    }
-
-    // --------------------------------------------------------------------------//
-    // ELETTRA : Archiving Events
-    // --------------------------------------------------------------------------//
-    @Override
-    protected void addSourceForEvents(final AttributeLightMode attributeLightMode) throws ArchivingException {
-        /* Adapter for the Tango archive events */
-        TangoEventsAdapter evtAdapt = null;
-        INumberSpectrum attribute = null;
-
-        try {
-            /*
-             * Get the attribute from the AttributeFactory, so that it is not
-             * added to the attribute polled list. Remember that `attributeList'
-             * is an AttributePolledList().
-             */
-            attribute = (INumberSpectrum) AttributeFactory.getInstance().getAttribute(
-                    attributeLightMode.getAttributeCompleteName());
-            if (attribute == null) {
-                logger.debug("\033[1;31mNumberSpectrum_RO.java: the attribute \""
-                        + attributeLightMode.getAttributeCompleteName()
-                        + " is null (NumberSpectrum_RO.java): not adding it!");
-                return;
-            }
-        } catch (final DevFailed e) {
-            logger.error(DevFailedUtils.toString(e));
-            final String message = GlobalConst.ARCHIVING_ERROR_PREFIX + "Failed adding '"
-                    + attributeLightMode.getAttributeCompleteName() + "' as source";
-            final String reason = "DevFailed exception while calling AttributeFactory.getInstance().getAttribute();";
-            final String desc = "Failed while executing Spectrum_RO.addSource() method...\nSpectrum_RO.java: Failed to get the attribute from the AttributeFactory";
-            throw new ArchivingException(message, reason, ErrSeverity.WARN, desc, "", e);
-        } catch (final ConnectionException e) {
-            final String message = GlobalConst.ARCHIVING_ERROR_PREFIX + "Failed adding '"
-                    + attributeLightMode.getAttributeCompleteName() + "' as source";
-            final String reason = GlobalConst.TANGO_COMM_EXCEPTION;
-            final String desc = "Failed while executing NumberSpectrum_RO.addSource() method...\nNumberSpectrum_RO.java: Failed to get the attribute from the AttributeFactory";
-            throw new ArchivingException(message, reason, ErrSeverity.WARN, desc, "", e);
-        } /*
-           * end of first try/catch block, to retrieve the attribute from the
-           * AttributeFactory
-           */
-
-        logger.debug("\033[1;44mregistering\033[0m the \033[4mSPECTRUM\033[0m [RO] attribute \""
-                + attribute.getNameSansDevice() + "\"...\t");
-
-        /*
-         * If an attribute (name + device server) is already in the map, it
-         * means it has already been registered for the Tango Archive events. So
-         * it does not have to be added to the archive events once again, nor to
-         * the attributePolledList: we can return. The same goes for an
-         * attribute already present in the attributePolledList `attributeList'.
-         */
-        /*
-         * if(HdbArchiver.useEvents.equalsIgnoreCase("no")) {
-         * System.out.print("[\033[1;35mEVENTS DISABLED\033[0m].");
-         * registerForScalarListener(attributeLightMode); } else {
-         */
-        try {
-            synchronized (evtAdaptHMap) {
-                evtAdapt = evtAdaptHMap.get(attribute.getDevice());
-                if (evtAdapt == null) {
-                    evtAdapt = new TangoEventsAdapter(attribute.getDevice());
-                    evtAdaptHMap.put(attribute.getDevice(), evtAdapt);
-                } else {
-                    logger.debug("\nThe adapter for the attribute is already configured");
-                }
-            }
-            final String[] filter = new String[0];
-
-            /*
-             * Try to register for the archive events: evtAdapt is the new
-             * adapter or the one already found in the map.
-             */
-            evtAdapt.addTangoArchiveListener(this, attribute.getNameSansDevice(), filter);
-            archiveListenersCounter++;
-            logger.debug("[\033[0;42mEVENTS\033[0m].");
-        } catch (final DevFailed e) {
-            /*
-             * If archive events are not enabled for the attribute, we will poll
-             * it
-             */
-            for (final DevError error : e.errors) {
-
-                if (error.desc.contains("Already connected to event")) {
-                    logger.debug("Already connected to events for attribute");
-                    return;
-                } else if (error.desc.contains("The polling (necessary to send events) for the attribute")) {
-                    logger.debug(" {\033[1;35mpoller not started\033[0m} ");
-                    break;
-                } else if (error.desc.contains("Archive event properties")) {
-                    logger.debug(" {\033[1;35marchive event properties not set\033[0m} ");
-                    break;
-                } else {
-                    logger.debug("error registering: " + error.desc);
-                }
-
-            }
-            /* Register for polling */
-            addSourceForPolling(attributeLightMode);
-            /* unlock the attributeList */
-        }
-        // } /* function finishes */
-    }
-
-    private void removeSourceForEvents(final String attributeName) {
-        logger.debug("NumberSpectrum_RO.removeSource");
-        logger.debug("\033[0;42mremoving\033[0m source for \033[4mspectrum\033[0m [RO]: " + attributeName + "\"...\t");
-        TangoEventsAdapter adapter;
-        INumberSpectrum attribute;
-        /*
-         * If useEvents is enabled, we should remove the eventListener, if not
-         * we can skip this piece of code
-         */
-        // if (HdbArchiver.useEvents.equalsIgnoreCase("yes"))
-        // {
-        try {
-            synchronized (evtAdaptHMap) {
-                attribute = (INumberSpectrum) AttributeFactory.getInstance().getAttribute(attributeName);
-                /*
-                 * Retrieve in the hash table the event adapter associated to
-                 * the attributeName.
-                 */
-                if (attribute == null) {
-                    logger.debug("\033[1;31mThe attribute " + attributeName + " is null\033[0m");
-                }
-                adapter = evtAdaptHMap.get(attribute.getDevice());
-
-                if (adapter != null) {
-                    adapter.removeTangoArchiveListener(this, attribute.getNameSansDevice());
-                    archiveListenersCounter--;
-                    logger.debug("[\033[0;42mEVENTS\033[0m].");
-                    Util.out2.println(" (adapter: " + adapter.device_name() + ")");
-                    /* Should be ok now to return */
-                    return;
-                }
-            } /* unlock event adapters map */
-        } catch (final ConnectionException e) /* getAttribute() failed */
-        {
-            Util.out2
-                    .println("\033[1;31mConnection exception while retrieving the attribute from the AttributeFactory!\033[0m");
-        } catch (final DevFailed f) {
-            Util.out2.println("Error removing tangoArchiveListener");
-            for (final DevError error : f.errors) {
-                Util.out2.println("error: " + error.desc);
-            }
-        }
-        // }
-    }
-
-    /**
-     * @since events
-     * @author giacomo S. elettra This is called when a Tango archive event is
-     *         sent from the server (the attribute has changed)
-     */
-    @Override
-    public void archive(final TangoArchiveEvent event) {
-        final int tryNumber = DEFAULT_TRY_NUMBER;
-        DeviceAttribute attrib = null;
-        TangoArchive arch;
-        DeviceProxy proxy;
-        final SpectrumEvent_RO spectrumEvent_ro = new SpectrumEvent_RO();
-
-        try {
-            attrib = event.getValue();
-        } catch (final DevFailed f) {
-            logger.error(DevFailedUtils.toString(f));
-            return;
-        } catch (final Exception e) /* Shouldn't be reached */
-        {
-            logger.error("error", e);
-            return;
-        }
-        try {
-            /*
-             * To correctly archive the attribute, we have to know its complete
-             * name. To acquire this information, we must o back to the
-             * TangoArchive object (which contains the DeviceProxy).
-             */
-            arch = (TangoArchive) event.getSource();
-            proxy = arch.getEventSupplier(); /*
-                                              * The device that supplied the
-                                              * event
-                                              */
-            if (arch == null || proxy == null || attrib == null) {
-                System.out
-                        .println("\033[1;31mSpectrum_RO.java: event.getValue() or event.getSource() or event.getSource().getEventSupplier()) returned null!\033[0m");
-                return;
-            }
-            final int dim = attrib.getDimX();
-            spectrumEvent_ro.setAttributeCompleteName(proxy.name() + "/" + attrib.getName());
-            spectrumEvent_ro.setTimeStamp(attrib.getTime());
-            spectrumEvent_ro.setDataType(attrib.getType());
-            spectrumEvent_ro.setWritable(AttrWriteType._READ);
-            spectrumEvent_ro.setDimX(dim);
-
-            switch (attrib.getType()) {
-                case TangoConst.Tango_DEV_SHORT:
-                    transmitShortArray(spectrumEvent_ro, dim, attrib.extractShortArray(), null);
-                    break;
-
-                case TangoConst.Tango_DEV_USHORT:
-                    /* Unsigned short is mapped to an integer */
-                    transmitIntArray(spectrumEvent_ro, dim, attrib.extractUShortArray(), null);
-                    break;
-
-                case TangoConst.Tango_DEV_LONG:
-                case TangoConst.Tango_DEV_ULONG:
-                    transmitIntArray(spectrumEvent_ro, dim, attrib.extractLongArray(), null);
-                    break;
-
-                case TangoConst.Tango_DEV_FLOAT:
-                    transmitFloatArray(spectrumEvent_ro, dim, attrib.extractFloatArray(), null);
-                    break;
-
-                case TangoConst.Tango_DEV_BOOLEAN:
-                    transmitBooleanArray(spectrumEvent_ro, dim, attrib.extractBooleanArray(), null);
-                    logger.debug("\033[1;31mboolean spectrum here? In NumberSpectrum_RW!!??\033[0m");
-                    break;
-
-                case TangoConst.Tango_DEV_DOUBLE:
-                default:
-                    transmitDoubleArray(spectrumEvent_ro, dim, attrib.extractDoubleArray(), null);
-                    break;
-
-            }
-            logger.debug(proxy.name() + ": " + attrib.getName()
-                    + " {\033[4mspectrum\033[0m, RO} [\033[1;32mEVENT\033[0m]" + " (dim: " + attrib.getDimX() + ")");
-
-            /* Process the just built spectrum event */
-            processEventSpectrum(spectrumEvent_ro, tryNumber);
-
-        } catch (final DevFailed devFailed) {
-            logger.error(DevFailedUtils.toString(devFailed));
-            final Object value = null;
-            spectrumEvent_ro.setValue(value, null);
-            processEventSpectrum(spectrumEvent_ro, tryNumber);
-        } catch (final Exception exE) {
-            logger.error("error", exE);
-            final Object value = null;
-            spectrumEvent_ro.setValue(value, null);
-            processEventSpectrum(spectrumEvent_ro, tryNumber);
-        }
-
-    }
-
-    // --------------------------------------------------------------------------//
-    // ELETTRA : Archiving Events
-    // --------------------------------------------------------------------------//
-    @Override
-    protected void treatErrorEventAfterLogging(ErrorEvent errorEvent) {
-        final double[] value = null;
-        final SpectrumEvent_RO spectrumEventRO = new SpectrumEvent_RO();
-        spectrumEventRO.setAttributeCompleteName(errorEvent.getSource().toString());
-        spectrumEventRO.setTimeStamp(errorEvent.getTimeStamp());
-        spectrumEventRO.setValue(value, null);
-        processEventSpectrum(spectrumEventRO, DEFAULT_TRY_NUMBER);
-    }
-
-    @Override
-    public void spectrumChange(final NumberSpectrumEvent event) {
-        final int tryNumber = DEFAULT_TRY_NUMBER;
-        final double[] spectrumvalue = event.getValue();
-        double[] value;
-        if (spectrumvalue == null) {
-            value = null;
-        } else {
-            value = spectrumvalue.clone();
-        }
-        String attributeName = ((INumberSpectrum) event.getSource()).getName();
-        removeErrorMessage(attributeName);
-        final SpectrumEvent_RO spectrumEventRO = new SpectrumEvent_RO();
-        spectrumEventRO.setAttributeCompleteName(attributeName);
-        spectrumEventRO.setDimX(value.length);
-        spectrumEventRO.setTimeStamp(event.getTimeStamp());
-        spectrumEventRO.setValue(value, null);
-        processEventSpectrum(spectrumEventRO, tryNumber);
-    }
-
-    @Override
-    public void stateChange(final AttributeStateEvent event) {
-    }
-
-    public void processEventSpectrum(final SpectrumEvent_RO event, int try_number) {
-        if (isDataArchivableTimestampWise(event)) {
-            final String attributeName = event.getAttributeCompleteName();
-            try {
-                // spectrum values can only have periodic modes, we don't need their lastValue
-                super.dbProxy.store(event);
-                super.setLastTimestamp(event);
-            } catch (final ArchivingException e) {
-                registerErrorMessage(attributeName, e.getMessage());
-                final String message = "Problem (ArchivingException) storing NumberSpectrum_RO value";
-                logger.error(message, e);
-
-                try_number--;
-                if (try_number > 0) {
-                    logger.debug("NumberSpectrum_RO.processEventSpectrum : retry " + try_number + "failed...");
-                    processEventSpectrum(event, try_number);
-                }
-            }
-        }
-    }
-}
+// +======================================================================
+// $Source$
+//
+// Project:      Tango Archiving Service
+//
+// Description:  Java source code for the class  NumberSpectrum_RO.
+//						(Chinkumo Jean) - Mar 24, 2004
+//
+// $Author$
+//
+// $Revision$
+//
+// $Log$
+// Revision 1.13  2007/10/03 15:23:29  pierrejoseph
+// Minor changes
+//
+// Revision 1.12  2007/09/28 14:49:22  pierrejoseph
+// Merged between Polling and Events code
+//
+// Revision 1.11  2007/09/25 14:59:17  pierrejoseph
+// 5251 : sometimes the device stayed in Running state sue to a blocking while in  the addAttribute method.
+//
+// Revision 1.10  2007/06/11 12:18:51  pierrejoseph
+// m_logger from the mother class (ArchiverCollector)
+//
+// Revision 1.9  2007/03/05 16:25:20  ounsy
+// non-static DataBase
+//
+// Revision 1.8  2006/10/31 16:54:12  ounsy
+// milliseconds and null values management
+//
+// Revision 1.7  2006/07/26 08:37:21  ounsy
+// try number no more static and reinitialized with change events (errorchange, numberscalarchange, etc...)
+//
+// Revision 1.6  2006/07/21 14:39:26  ounsy
+// removed useless logs
+//
+// Revision 1.5  2006/07/18 08:03:18  ounsy
+// minor changes
+//
+// Revision 1.4  2006/06/16 09:25:33  ounsy
+// changed imports because of the diary package moving to the javaapi project
+//
+// Revision 1.3  2006/06/13 13:28:19  ounsy
+// added a file logging system (diary) that records data storing errors
+//
+// Revision 1.2  2006/05/23 11:57:17  ounsy
+// now checks the timeCondition condition before calling DbProxy.store
+//
+// Revision 1.1  2006/05/03 14:28:16  ounsy
+// renamed Spectrum_... into NumberSpectrum_...
+//
+// Revision 1.9  2006/04/05 13:49:51  ounsy
+// new types full support
+//
+// Revision 1.8  2006/03/28 11:13:49  ounsy
+// better spectrum management
+//
+// Revision 1.7  2005/11/29 17:33:53  chinkumo
+// no message
+//
+// Revision 1.6.10.2  2005/11/29 16:16:05  chinkumo
+// Code reformated (pogo compatible)
+//
+// Revision 1.6.10.1  2005/11/15 13:46:08  chinkumo
+// ...
+//
+// Revision 1.6  2005/06/24 12:06:27  chinkumo
+// Some constants were moved from fr.soleil.hdbtdbArchivingApi.ArchivingApi.ConfigConst to fr.soleil.hdbtdbArchivingApi.ArchivingTools.Tools.GlobalConst.
+
+// This change was reported here.
+//
+// Revision 1.5  2005/06/14 10:30:28  chinkumo
+// Branch (hdbArchiver_1_0_1-branch_0)  and HEAD merged.
+//
+// Revision 1.4.2.1  2005/06/13 14:01:07  chinkumo
+// Changes made to improve the management of exceptions were reported here.
+//
+// Revision 1.4  2005/04/08 15:37:00  chinkumo
+// errorChange method filled.
+
+// The aim of this method is to manage possible attribute's problem while polling attributes.
+
+// In case of unavailable value, a record is nevertheless carried out with the event timestamp, but with a kind of NULL value.
+//
+// Revision 1.3  2005/02/04 17:10:14  chinkumo
+// The trouble with the grouped stopping strategy was fixed.
+//
+// Revision 1.2  2005/01/26 16:38:14  chinkumo
+// Ultimate synchronization before real sharing.
+//
+// Revision 1.1  2004/12/06 16:43:25  chinkumo
+// First commit (new architecture).
+//
+//
+// copyleft :	Synchrotron SOLEIL
+//					L'Orme des Merisiers
+//					Saint-Aubin - BP 48
+//					91192 GIF-sur-YVETTE CEDEX
+//
+//-======================================================================
+
+package HdbArchiver.Collector.spectrum;
+
+import HdbArchiver.Collector.HdbCollector;
+import HdbArchiver.Collector.HdbModeHandler;
+import fr.esrf.Tango.AttrWriteType;
+import fr.esrf.Tango.DevError;
+import fr.esrf.Tango.DevFailed;
+import fr.esrf.Tango.ErrSeverity;
+import fr.esrf.TangoApi.DeviceAttribute;
+import fr.esrf.TangoApi.DeviceProxy;
+import fr.esrf.TangoApi.events.ITangoArchiveListener;
+import fr.esrf.TangoApi.events.TangoArchive;
+import fr.esrf.TangoApi.events.TangoArchiveEvent;
+import fr.esrf.TangoApi.events.TangoEventsAdapter;
+import fr.esrf.TangoDs.TangoConst;
+import fr.esrf.TangoDs.Util;
+import fr.esrf.tangoatk.core.*;
+import fr.esrf.tangoatk.core.attribute.AttributeFactory;
+import fr.soleil.archiving.common.api.exception.ArchivingException;
+import fr.soleil.archiving.common.api.tools.GlobalConst;
+import fr.soleil.archiving.hdbtdb.api.tools.AttributeLightMode;
+import fr.soleil.archiving.hdbtdb.api.tools.SpectrumEvent_RO;
+import org.slf4j.Logger;
+import org.tango.utils.DevFailedUtils;
+
+import java.util.HashMap;
+import java.util.Map;
+
+public class NumberSpectrum_RO extends HdbCollector implements ISpectrumListener, ITangoArchiveListener {
+
+    private static final long serialVersionUID = -1127931702976825590L;
+
+    private final Map<Device, TangoEventsAdapter> evtAdaptHMap;
+
+    public NumberSpectrum_RO(final HdbModeHandler hdbModeHandler, final boolean useEvents, final Logger logger) {
+        super(hdbModeHandler, useEvents, logger);
+        evtAdaptHMap = new HashMap<Device, TangoEventsAdapter>();
+    }
+
+    @Override
+    public synchronized void removeSource(final String attributeName) throws ArchivingException {
+
+        if (useEvents) {
+            removeSourceForEvents(attributeName);
+        }
+
+        try {
+            /*
+             * while ( ( INumberSpectrum ) attributeList.get(attributeName) !=
+             * null ) {
+             */
+            stopCollecting();
+            final INumberSpectrum attribute = (INumberSpectrum) attributeList.get(attributeName);
+            if (attribute != null) {
+                attribute.removeSpectrumListener(this);
+                attribute.removeErrorListener(this);
+                removeTimestamps(attributeName);
+                attributeList.remove(attributeName);
+                removeErrorMessage(attributeName);
+            }
+        } catch (final Exception e) {
+            final String message = GlobalConst.ARCHIVING_ERROR_PREFIX + "Failed removing '" + attributeName
+                    + "' from sources";
+            final String reason = GlobalConst.TANGO_COMM_EXCEPTION;
+            final String desc = "Failed while executing NumberSpectrum_RO.removeSource() method...";
+            throw new ArchivingException(message, reason, ErrSeverity.WARN, desc, "", e);
+        } finally {
+            startCollecting();
+        }
+    }
+
+    @Override
+    protected void doAddSourceForPolling(final AttributeLightMode attributeLightMode) throws ArchivingException {
+        String attributeName = null;
+        try {
+            attributeName = attributeLightMode.getAttributeCompleteName();
+            stopCollecting();
+            final INumberSpectrum attribute = (INumberSpectrum) attributeList.add(attributeName);
+            attribute.addSpectrumListener(this);
+            attribute.addErrorListener(this);
+            logger.debug("\t The attribute named " + attributeLightMode.getAttributeCompleteName()
+                    + " was hired to the Collector list...");
+
+        } catch (final ConnectionException e) {
+            registerErrorMessage(attributeName, e);
+            final String message = GlobalConst.ARCHIVING_ERROR_PREFIX + "Failed adding '"
+                    + attributeLightMode.getAttributeCompleteName() + "' as source";
+            final String reason = GlobalConst.TANGO_COMM_EXCEPTION;
+            final String desc = "Failed while executing NumberSpectrum_RO.addSource() method...";
+            throw new ArchivingException(message, reason, ErrSeverity.WARN, desc, "", e);
+        } finally {
+            startCollecting();
+        }
+    }
+
+    // --------------------------------------------------------------------------//
+    // ELETTRA : Archiving Events
+    // --------------------------------------------------------------------------//
+    @Override
+    protected void addSourceForEvents(final AttributeLightMode attributeLightMode) throws ArchivingException {
+        /* Adapter for the Tango archive events */
+        TangoEventsAdapter evtAdapt = null;
+        INumberSpectrum attribute = null;
+
+        try {
+            /*
+             * Get the attribute from the AttributeFactory, so that it is not
+             * added to the attribute polled list. Remember that `attributeList'
+             * is an AttributePolledList().
+             */
+            attribute = (INumberSpectrum) AttributeFactory.getInstance().getAttribute(
+                    attributeLightMode.getAttributeCompleteName());
+            if (attribute == null) {
+                logger.debug("\033[1;31mNumberSpectrum_RO.java: the attribute \""
+                        + attributeLightMode.getAttributeCompleteName()
+                        + " is null (NumberSpectrum_RO.java): not adding it!");
+                return;
+            }
+        } catch (final DevFailed e) {
+            logger.error(DevFailedUtils.toString(e));
+            final String message = GlobalConst.ARCHIVING_ERROR_PREFIX + "Failed adding '"
+                    + attributeLightMode.getAttributeCompleteName() + "' as source";
+            final String reason = "DevFailed exception while calling AttributeFactory.getInstance().getAttribute();";
+            final String desc = "Failed while executing Spectrum_RO.addSource() method...\nSpectrum_RO.java: Failed to get the attribute from the AttributeFactory";
+            throw new ArchivingException(message, reason, ErrSeverity.WARN, desc, "", e);
+        } catch (final ConnectionException e) {
+            final String message = GlobalConst.ARCHIVING_ERROR_PREFIX + "Failed adding '"
+                    + attributeLightMode.getAttributeCompleteName() + "' as source";
+            final String reason = GlobalConst.TANGO_COMM_EXCEPTION;
+            final String desc = "Failed while executing NumberSpectrum_RO.addSource() method...\nNumberSpectrum_RO.java: Failed to get the attribute from the AttributeFactory";
+            throw new ArchivingException(message, reason, ErrSeverity.WARN, desc, "", e);
+        } /*
+           * end of first try/catch block, to retrieve the attribute from the
+           * AttributeFactory
+           */
+
+        logger.debug("\033[1;44mregistering\033[0m the \033[4mSPECTRUM\033[0m [RO] attribute \""
+                + attribute.getNameSansDevice() + "\"...\t");
+
+        /*
+         * If an attribute (name + device server) is already in the map, it
+         * means it has already been registered for the Tango Archive events. So
+         * it does not have to be added to the archive events once again, nor to
+         * the attributePolledList: we can return. The same goes for an
+         * attribute already present in the attributePolledList `attributeList'.
+         */
+        /*
+         * if(HdbArchiver.useEvents.equalsIgnoreCase("no")) {
+         * System.out.print("[\033[1;35mEVENTS DISABLED\033[0m].");
+         * registerForScalarListener(attributeLightMode); } else {
+         */
+        try {
+            synchronized (evtAdaptHMap) {
+                evtAdapt = evtAdaptHMap.get(attribute.getDevice());
+                if (evtAdapt == null) {
+                    evtAdapt = new TangoEventsAdapter(attribute.getDevice());
+                    evtAdaptHMap.put(attribute.getDevice(), evtAdapt);
+                } else {
+                    logger.debug("\nThe adapter for the attribute is already configured");
+                }
+            }
+            final String[] filter = new String[0];
+
+            /*
+             * Try to register for the archive events: evtAdapt is the new
+             * adapter or the one already found in the map.
+             */
+            evtAdapt.addTangoArchiveListener(this, attribute.getNameSansDevice(), filter);
+            archiveListenersCounter++;
+            logger.debug("[\033[0;42mEVENTS\033[0m].");
+        } catch (final DevFailed e) {
+            /*
+             * If archive events are not enabled for the attribute, we will poll
+             * it
+             */
+            for (final DevError error : e.errors) {
+
+                if (error.desc.contains("Already connected to event")) {
+                    logger.debug("Already connected to events for attribute");
+                    return;
+                } else if (error.desc.contains("The polling (necessary to send events) for the attribute")) {
+                    logger.debug(" {\033[1;35mpoller not started\033[0m} ");
+                    break;
+                } else if (error.desc.contains("Archive event properties")) {
+                    logger.debug(" {\033[1;35marchive event properties not set\033[0m} ");
+                    break;
+                } else {
+                    logger.debug("error registering: " + error.desc);
+                }
+
+            }
+            /* Register for polling */
+            addSourceForPolling(attributeLightMode);
+            /* unlock the attributeList */
+        }
+        // } /* function finishes */
+    }
+
+    private void removeSourceForEvents(final String attributeName) {
+        logger.debug("NumberSpectrum_RO.removeSource");
+        logger.debug("\033[0;42mremoving\033[0m source for \033[4mspectrum\033[0m [RO]: " + attributeName + "\"...\t");
+        TangoEventsAdapter adapter;
+        INumberSpectrum attribute;
+        /*
+         * If useEvents is enabled, we should remove the eventListener, if not
+         * we can skip this piece of code
+         */
+        // if (HdbArchiver.useEvents.equalsIgnoreCase("yes"))
+        // {
+        try {
+            synchronized (evtAdaptHMap) {
+                attribute = (INumberSpectrum) AttributeFactory.getInstance().getAttribute(attributeName);
+                /*
+                 * Retrieve in the hash table the event adapter associated to
+                 * the attributeName.
+                 */
+                if (attribute == null) {
+                    logger.debug("\033[1;31mThe attribute " + attributeName + " is null\033[0m");
+                }
+                adapter = evtAdaptHMap.get(attribute.getDevice());
+
+                if (adapter != null) {
+                    adapter.removeTangoArchiveListener(this, attribute.getNameSansDevice());
+                    archiveListenersCounter--;
+                    logger.debug("[\033[0;42mEVENTS\033[0m].");
+                    /* Should be ok now to return */
+                    return;
+                }
+            } /* unlock event adapters map */
+        } catch (final ConnectionException e) /* getAttribute() failed */ {
+            logger.error("error",e);
+        } catch (final DevFailed f) {
+            for (final DevError error : f.errors) {
+                logger.error("error",error.desc);
+            }
+        }
+        // }
+    }
+
+    /**
+     * @author giacomo S. elettra This is called when a Tango archive event is
+     * sent from the server (the attribute has changed)
+     * @since events
+     */
+    @Override
+    public void archive(final TangoArchiveEvent event) {
+        final int tryNumber = DEFAULT_TRY_NUMBER;
+        DeviceAttribute attrib = null;
+        TangoArchive arch;
+        DeviceProxy proxy;
+        final SpectrumEvent_RO spectrumEvent_ro = new SpectrumEvent_RO();
+
+        try {
+            attrib = event.getValue();
+        } catch (final DevFailed f) {
+            logger.error(DevFailedUtils.toString(f));
+            return;
+        } catch (final Exception e) /* Shouldn't be reached */ {
+            logger.error("error", e);
+            return;
+        }
+        try {
+            /*
+             * To correctly archive the attribute, we have to know its complete
+             * name. To acquire this information, we must o back to the
+             * TangoArchive object (which contains the DeviceProxy).
+             */
+            arch = (TangoArchive) event.getSource();
+            proxy = arch.getEventSupplier(); /*
+                                              * The device that supplied the
+                                              * event
+                                              */
+            if (arch == null || proxy == null || attrib == null) {
+                System.out
+                        .println("\033[1;31mSpectrum_RO.java: event.getValue() or event.getSource() or event.getSource().getEventSupplier()) returned null!\033[0m");
+                return;
+            }
+            final int dim = attrib.getDimX();
+            spectrumEvent_ro.setAttributeCompleteName(proxy.name() + "/" + attrib.getName());
+            spectrumEvent_ro.setTimeStamp(attrib.getTime());
+            spectrumEvent_ro.setDataType(attrib.getType());
+            spectrumEvent_ro.setWritable(AttrWriteType._READ);
+            spectrumEvent_ro.setDimX(dim);
+
+            switch (attrib.getType()) {
+                case TangoConst.Tango_DEV_SHORT:
+                    transmitShortArray(spectrumEvent_ro, dim, attrib.extractShortArray(), null);
+                    break;
+
+                case TangoConst.Tango_DEV_USHORT:
+                    /* Unsigned short is mapped to an integer */
+                    transmitIntArray(spectrumEvent_ro, dim, attrib.extractUShortArray(), null);
+                    break;
+
+                case TangoConst.Tango_DEV_LONG:
+                case TangoConst.Tango_DEV_ULONG:
+                    transmitIntArray(spectrumEvent_ro, dim, attrib.extractLongArray(), null);
+                    break;
+
+                case TangoConst.Tango_DEV_FLOAT:
+                    transmitFloatArray(spectrumEvent_ro, dim, attrib.extractFloatArray(), null);
+                    break;
+
+                case TangoConst.Tango_DEV_BOOLEAN:
+                    transmitBooleanArray(spectrumEvent_ro, dim, attrib.extractBooleanArray(), null);
+                    logger.debug("\033[1;31mboolean spectrum here? In NumberSpectrum_RW!!??\033[0m");
+                    break;
+
+                case TangoConst.Tango_DEV_DOUBLE:
+                default:
+                    transmitDoubleArray(spectrumEvent_ro, dim, attrib.extractDoubleArray(), null);
+                    break;
+
+            }
+            logger.debug(proxy.name() + ": " + attrib.getName()
+                    + " {\033[4mspectrum\033[0m, RO} [\033[1;32mEVENT\033[0m]" + " (dim: " + attrib.getDimX() + ")");
+
+            /* Process the just built spectrum event */
+            processEventSpectrum(spectrumEvent_ro, tryNumber);
+
+        } catch (final DevFailed devFailed) {
+            logger.error(DevFailedUtils.toString(devFailed));
+            final Object value = null;
+            spectrumEvent_ro.setValue(value, null);
+            processEventSpectrum(spectrumEvent_ro, tryNumber);
+        } catch (final Exception exE) {
+            logger.error("error", exE);
+            final Object value = null;
+            spectrumEvent_ro.setValue(value, null);
+            processEventSpectrum(spectrumEvent_ro, tryNumber);
+        }
+
+    }
+
+    // --------------------------------------------------------------------------//
+    // ELETTRA : Archiving Events
+    // --------------------------------------------------------------------------//
+    @Override
+    protected void treatErrorEventAfterLogging(ErrorEvent errorEvent) {
+        final double[] value = null;
+        final SpectrumEvent_RO spectrumEventRO = new SpectrumEvent_RO();
+        spectrumEventRO.setAttributeCompleteName(errorEvent.getSource().toString());
+        spectrumEventRO.setTimeStamp(errorEvent.getTimeStamp());
+        spectrumEventRO.setValue(value, null);
+        processEventSpectrum(spectrumEventRO, DEFAULT_TRY_NUMBER);
+    }
+
+    @Override
+    public void spectrumChange(final NumberSpectrumEvent event) {
+        final int tryNumber = DEFAULT_TRY_NUMBER;
+        final double[] spectrumvalue = event.getValue();
+        double[] value;
+        if (spectrumvalue == null) {
+            value = null;
+        } else {
+            value = spectrumvalue.clone();
+        }
+        String attributeName = ((INumberSpectrum) event.getSource()).getName();
+        removeErrorMessage(attributeName);
+        final SpectrumEvent_RO spectrumEventRO = new SpectrumEvent_RO();
+        spectrumEventRO.setAttributeCompleteName(attributeName);
+        spectrumEventRO.setDimX(value.length);
+        spectrumEventRO.setTimeStamp(event.getTimeStamp());
+        spectrumEventRO.setValue(value, null);
+        processEventSpectrum(spectrumEventRO, tryNumber);
+    }
+
+    @Override
+    public void stateChange(final AttributeStateEvent event) {
+    }
+
+    public void processEventSpectrum(final SpectrumEvent_RO event, int try_number) {
+        if (isDataArchivableTimestampWise(event)) {
+            final String attributeName = event.getAttributeCompleteName();
+            try {
+                // spectrum values can only have periodic modes, we don't need their lastValue
+                super.dbProxy.store(event);
+                super.setLastTimestamp(event);
+            } catch (final ArchivingException e) {
+                registerErrorMessage(attributeName, e.getMessage());
+                final String message = "Problem (ArchivingException) storing NumberSpectrum_RO value";
+                logger.error(message, e);
+
+                try_number--;
+                if (try_number > 0) {
+                    logger.debug("NumberSpectrum_RO.processEventSpectrum : retry " + try_number + "failed...");
+                    processEventSpectrum(event, try_number);
+                }
+            }
+        }
+    }
+}
diff --git a/src/main/java/HdbArchiver/Collector/spectrum/NumberSpectrum_RW.java b/hdbarchiver/src/main/java/HdbArchiver/Collector/spectrum/NumberSpectrum_RW.java
similarity index 95%
rename from src/main/java/HdbArchiver/Collector/spectrum/NumberSpectrum_RW.java
rename to hdbarchiver/src/main/java/HdbArchiver/Collector/spectrum/NumberSpectrum_RW.java
index c084a1b1143f0506670626a6ecc88771ce044c69..6452e249a2134c3e0b9b08c618be76e88b9dbe62 100644
--- a/src/main/java/HdbArchiver/Collector/spectrum/NumberSpectrum_RW.java
+++ b/hdbarchiver/src/main/java/HdbArchiver/Collector/spectrum/NumberSpectrum_RW.java
@@ -1,428 +1,416 @@
-// +======================================================================
-// $Source$
-//
-// Project:      Tango Archiving Service
-//
-// Description:  Java source code for the class  NumberSpectrum_RW.
-//						(Chinkumo Jean) - March 24, 2004
-//
-// $Author$
-//
-// $Revision$
-//
-// $Log$
-// Revision 1.13  2007/10/03 15:23:29  pierrejoseph
-// Minor changes
-//
-// Revision 1.12  2007/09/28 14:49:22  pierrejoseph
-// Merged between Polling and Events code
-//
-//
-// copyleft :		Synchrotron SOLEIL
-//					L'Orme des Merisiers
-//					Saint-Aubin - BP 48
-//					91192 GIF-sur-YVETTE CEDEX
-//
-//-======================================================================
-package HdbArchiver.Collector.spectrum;
-
-import java.util.HashMap;
-import java.util.Map;
-
-import org.slf4j.Logger;
-import org.tango.utils.DevFailedUtils;
-
-import HdbArchiver.HdbArchiver;
-import HdbArchiver.Collector.HdbCollector;
-import HdbArchiver.Collector.HdbModeHandler;
-import fr.esrf.Tango.AttrWriteType;
-import fr.esrf.Tango.DevError;
-import fr.esrf.Tango.DevFailed;
-import fr.esrf.Tango.ErrSeverity;
-import fr.esrf.TangoApi.DeviceAttribute;
-import fr.esrf.TangoApi.DeviceProxy;
-import fr.esrf.TangoApi.events.ITangoArchiveListener;
-import fr.esrf.TangoApi.events.TangoArchive;
-import fr.esrf.TangoApi.events.TangoArchiveEvent;
-import fr.esrf.TangoApi.events.TangoEventsAdapter;
-import fr.esrf.TangoDs.TangoConst;
-import fr.esrf.TangoDs.Util;
-import fr.esrf.tangoatk.core.AttributeStateEvent;
-import fr.esrf.tangoatk.core.ConnectionException;
-import fr.esrf.tangoatk.core.Device;
-import fr.esrf.tangoatk.core.ErrorEvent;
-import fr.esrf.tangoatk.core.INumberSpectrum;
-import fr.esrf.tangoatk.core.ISpectrumListener;
-import fr.esrf.tangoatk.core.NumberSpectrumEvent;
-import fr.esrf.tangoatk.core.attribute.AttributeFactory;
-import fr.soleil.archiving.common.api.exception.ArchivingException;
-import fr.soleil.archiving.common.api.tools.GlobalConst;
-import fr.soleil.archiving.hdbtdb.api.tools.AttributeLightMode;
-import fr.soleil.archiving.hdbtdb.api.tools.SpectrumEvent_RW;
-
-public class NumberSpectrum_RW extends HdbCollector implements ISpectrumListener, ITangoArchiveListener {
-
-    private static final long serialVersionUID = -5743386643781837059L;
-
-    private final Map<Device, TangoEventsAdapter> evtAdaptHMap;
-
-    public NumberSpectrum_RW(final HdbModeHandler hdbModeHandler, final Logger logger) {
-        super(hdbModeHandler, logger);
-        evtAdaptHMap = new HashMap<Device, TangoEventsAdapter>();
-    }
-
-    @Override
-    public synchronized void removeSource(final String attributeName) throws ArchivingException {
-        logger.debug("NumberSpectrum_RW.removeSource");
-
-        if (HdbArchiver.isUseEvents) {
-            removeSourceForEvents(attributeName);
-        }
-
-        try {
-            /*
-             * while ( ( INumberSpectrum ) attributeList.get(attributeName) !=
-             * null ) {
-             */
-            stopCollecting();
-            final INumberSpectrum attribute = (INumberSpectrum) attributeList.get(attributeName);
-            if (attribute != null) {
-                attribute.removeSpectrumListener(this);
-                attribute.removeErrorListener(this);
-                removeTimestamps(attributeName);
-                attributeList.remove(attributeName);
-                removeErrorMessage(attributeName);
-                Util.out4.println("\t The attribute named " + attributeName + " was fired from the Collector list...");
-            }
-
-        } catch (final Exception e) {
-            final String message = GlobalConst.ARCHIVING_ERROR_PREFIX + "Failed removing '" + attributeName
-                    + "' from sources";
-            final String reason = GlobalConst.TANGO_COMM_EXCEPTION;
-            final String desc = "Failed while executing NumberSpectrum_RW.removeSource() method...";
-            throw new ArchivingException(message, reason, ErrSeverity.WARN, desc, "", e);
-        } finally {
-            startCollecting();
-        }
-    }
-
-    @Override
-    protected void doAddSourceForPolling(final AttributeLightMode attributeLightMode) throws ArchivingException {
-        String attributeName = null;
-        try {
-            stopCollecting();
-            attributeName = attributeLightMode.getAttributeCompleteName();
-            final INumberSpectrum attribute = (INumberSpectrum) attributeList.add(attributeName);
-            attribute.addSpectrumListener(this);
-            attribute.addErrorListener(this);
-            logger.debug("\t The attribute named " + attributeLightMode.getAttributeCompleteName()
-                    + " was hired to the Collector list...");
-        } catch (final ConnectionException e) {
-            registerErrorMessage(attributeName, e);
-            final String message = GlobalConst.ARCHIVING_ERROR_PREFIX + "Failed adding '" + attributeName
-                    + "' as source";
-            final String reason = GlobalConst.TANGO_COMM_EXCEPTION;
-            final String desc = "Failed while executing NumberSpectrum_RW.addSource() method...";
-            throw new ArchivingException(message, reason, ErrSeverity.WARN, desc, "", e);
-        } finally {
-            startCollecting();
-        }
-    }
-
-    // --------------------------------------------------------------------------//
-    // ELETTRA : Archiving Events
-    // --------------------------------------------------------------------------//
-    @Override
-    protected void addSourceForEvents(final AttributeLightMode attributeLightMode) throws ArchivingException {
-        /* Adapter for the Tango archive events */
-        TangoEventsAdapter evtAdapt = null;
-        INumberSpectrum attribute = null;
-
-        try {
-            /*
-             * Get the attribute from the AttributeFactory, so that it is not
-             * added to the attribute polled list. Remember that `attributeList'
-             * is an AttributePolledList().
-             */
-            attribute = (INumberSpectrum) AttributeFactory.getInstance().getAttribute(
-                    attributeLightMode.getAttributeCompleteName());
-            if (attribute == null) {
-                logger.debug("\033[1;31mNumberSpectrum_RW.java: the attribute \""
-                        + attributeLightMode.getAttributeCompleteName()
-                        + " is null (NumberSpectrum_RW.java): not adding it!");
-                return;
-            }
-        } catch (final DevFailed e) {
-            logger.error(DevFailedUtils.toString(e));
-            final String message = GlobalConst.ARCHIVING_ERROR_PREFIX + "Failed adding '"
-                    + attributeLightMode.getAttributeCompleteName() + "' as source";
-            final String reason = "DevFailed exception while calling AttributeFactory.getInstance().getAttribute();";
-            final String desc = "Failed while executing Spectrum_RW.addSource() method...\nSpectrum_RW.java: Failed to get the attribute from the AttributeFactory";
-            throw new ArchivingException(message, reason, ErrSeverity.WARN, desc, "", e);
-        } catch (final ConnectionException e) {
-            final String message = GlobalConst.ARCHIVING_ERROR_PREFIX + "Failed adding '"
-                    + attributeLightMode.getAttributeCompleteName() + "' as source";
-            final String reason = GlobalConst.TANGO_COMM_EXCEPTION;
-            final String desc = "Failed while executing NumberSpectrum_RW.addSource() method...\nNumberSpectrum_RW.java: Failed to get the attribute from the AttributeFactory";
-            throw new ArchivingException(message, reason, ErrSeverity.WARN, desc, "", e);
-        } /*
-           * end of first try/catch block, to retrieve the attribute from the
-           * AttributeFactory
-           */
-
-        logger.debug("\033[0;44mregistering\033[0m the \033[4mSPECTRUM\033[0m [RO] attribute \""
-                + attribute.getNameSansDevice() + "\"...\t");
-
-        /*
-         * If an attribute (name + device server) is already in the map, it
-         * means it has already been registered for the Tango Archive events. So
-         * it does not have to be added to the archive events once again, nor to
-         * the attributePolledList: we can return. The same goes for an
-         * attribute already present in the attributePolledList `attributeList'.
-         */
-        /*
-         * if(HdbArchiver.useEvents.equalsIgnoreCase("no")) {
-         * System.out.print("[\033[1;45mEVENTS DISABLED\033[0m].");
-         * registerForScalarListener(attributeLightMode); } else {
-         */
-        try {
-            synchronized (evtAdaptHMap) {
-                evtAdapt = evtAdaptHMap.get(attribute.getDevice());
-                if (evtAdapt == null) {
-                    evtAdapt = new TangoEventsAdapter(attribute.getDevice());
-                    evtAdaptHMap.put(attribute.getDevice(), evtAdapt);
-                } else {
-                    logger.debug("\nThe adapter for the attribute is already configured");
-                }
-            }
-            final String[] filter = new String[0];
-
-            /*
-             * Try to register for the archive events: evtAdapt is the new
-             * adapter or the one already found in the map.
-             */
-            evtAdapt.addTangoArchiveListener(this, attribute.getNameSansDevice(), filter);
-            archiveListenersCounter++;
-            logger.debug("[\033[0;42mEVENTS\033[0m].");
-        } catch (final DevFailed e) {
-            /*
-             * If archive events are not enabled for the attribute, we will poll
-             * it
-             */
-            for (final DevError error : e.errors) {
-
-                if (error.desc.contains("Already connected to event")) {
-                    logger.debug("Already connected to events for attribute");
-                    return;
-                } else if (error.desc.contains("The polling (necessary to send events) for the attribute")) {
-                    logger.debug(" {\033[1;35mpoller not started\033[0m} ");
-                    break;
-                } else if (error.desc.contains("Archive event properties")) {
-                    logger.debug(" {\033[1;35marchive event properties not set\033[0m} ");
-                    break;
-                } else {
-                    logger.debug("error registering: " + error.desc);
-                }
-
-            }
-            /* Register for polling */
-            addSourceForPolling(attributeLightMode);
-            /* unlock the attributeList */
-        }
-        // } /* function finishes */
-    }
-
-    private void removeSourceForEvents(final String attributeName) {
-        logger.debug("NumberSpectrum_RW.removeSource");
-        logger.debug("\033[0;44mremoving\033[0m source for \033[4mspectrum\033[0m [RW]:\"" + attributeName + "\"...\t");
-        TangoEventsAdapter adapter;
-        INumberSpectrum attribute;
-        /*
-         * If useEvents is enabled, we should remove the eventListener, if not
-         * we can skip this piece of code
-         */
-        // if (HdbArchiver.useEvents.equalsIgnoreCase("yes"))
-        // {
-        try {
-            synchronized (evtAdaptHMap) {
-                attribute = (INumberSpectrum) AttributeFactory.getInstance().getAttribute(attributeName);
-                /*
-                 * Retrieve in the hash table the event adapter associated to
-                 * the attributeName.
-                 */
-                if (attribute == null) {
-                    logger.debug("\033[1;31mThe attribute " + attributeName + " is null\033[0m");
-                }
-                adapter = evtAdaptHMap.get(attribute.getDevice());
-
-                if (adapter != null) {
-                    adapter.removeTangoArchiveListener(this, attribute.getNameSansDevice());
-                    archiveListenersCounter--;
-                    logger.debug("[\033[0;42mEVENTS\033[0m].");
-                    logger.debug(" (adapter: " + adapter.device_name() + ")");
-                    /* Should be ok now to return */
-                    return;
-                }
-            } /* unlock event adapters map */
-        } catch (final ConnectionException e) /* getAttribute() failed */
-        {
-            Util.out2
-                    .println("\033[1;31mConnection exception while retrieving the attribute from the AttributeFactory!\033[0m");
-        } catch (final DevFailed f) {
-            logger.error(DevFailedUtils.toString(f));
-        }
-        // }
-    }
-
-    /**
-     * @since events
-     * @author giacomo S. elettra This is called when a Tango archive event is
-     *         sent from the server (the attribute has changed)
-     */
-    @Override
-    public void archive(final TangoArchiveEvent event) {
-        final int tryNumber = DEFAULT_TRY_NUMBER;
-        DeviceAttribute attrib = null;
-        TangoArchive arch;
-        DeviceProxy proxy;
-        final SpectrumEvent_RW spectrumEventRw = new SpectrumEvent_RW();
-
-        try {
-            attrib = event.getValue();
-        } catch (final DevFailed f) {
-            logger.error(DevFailedUtils.toString(f));
-            return;
-        } catch (final Exception e) /* Shouldn't be reached */
-        {
-            logger.error("error", e);
-            return;
-        }
-        try {
-            /*
-             * To correctly archive the attribute, we have to know its complete
-             * name. To acquire this information, we must o back to the
-             * TangoArchive object (which contains the DeviceProxy).
-             */
-            arch = (TangoArchive) event.getSource();
-            proxy = arch.getEventSupplier(); /*
-                                              * The device that supplied the
-                                              * event
-                                              */
-            if (arch == null || proxy == null || attrib == null) {
-                logger.debug("\033[1;31mSpectrum_RW.java: event.getValue() or event.getSource() or event.getSource().getEventSupplier()) returned null!\033[0m");
-                return;
-            }
-            final int dim = attrib.getDimX();
-            switch (attrib.getType()) {
-                case TangoConst.Tango_DEV_SHORT:
-                    transmitShortArray(spectrumEventRw, dim, attrib.extractShortArray(), null);
-                    break;
-
-                case TangoConst.Tango_DEV_USHORT:
-                    transmitIntArray(spectrumEventRw, dim, attrib.extractUShortArray(), null);
-                    break;
-
-                case TangoConst.Tango_DEV_LONG:
-                case TangoConst.Tango_DEV_ULONG:
-                    transmitIntArray(spectrumEventRw, dim, attrib.extractLongArray(), null);
-                    break;
-
-                case TangoConst.Tango_DEV_FLOAT:
-                    transmitFloatArray(spectrumEventRw, dim, attrib.extractFloatArray(), null);
-                    break;
-
-                case TangoConst.Tango_DEV_BOOLEAN:
-                    transmitBooleanArray(spectrumEventRw, dim, attrib.extractBooleanArray(), null);
-                    logger.debug("\033[1;31mboolean spectrum here? In NumberSpectrum_RW!!??\033[0m");
-                    break;
-
-                case TangoConst.Tango_DEV_DOUBLE:
-                default:
-                    transmitDoubleArray(spectrumEventRw, dim, attrib.extractDoubleArray(), null);
-                    break;
-
-            }
-            logger.debug(proxy.name() + ": " + attrib.getName()
-                    + " {\033[4mspectrum\033[0m, RW} [\033[1;32mEVENT\033[0m]" + " (dim: " + attrib.getDimX() + ")");
-            spectrumEventRw.setAttributeCompleteName(proxy.name() + "/" + attrib.getName());
-            spectrumEventRw.setTimeStamp(attrib.getTime());
-            spectrumEventRw.setDataType(attrib.getType());
-            spectrumEventRw.setWritable(AttrWriteType._READ_WRITE);
-            spectrumEventRw.setDimX(dim);
-            /* Process the just built spectrum event */
-            processEventSpectrum(spectrumEventRw, tryNumber);
-
-        } catch (final DevFailed devFailed) {
-            logger.error(DevFailedUtils.toString(devFailed));
-            final Object value = null;
-            spectrumEventRw.setValue(value, null);
-            processEventSpectrum(spectrumEventRw, tryNumber);
-        } catch (final Exception exE) {
-            logger.error("error", exE);
-            final Object value = null;
-            spectrumEventRw.setValue(value, null);
-            processEventSpectrum(spectrumEventRw, tryNumber);
-        }
-
-    }
-
-    // --------------------------------------------------------------------------//
-    // ELETTRA : Archiving Events
-    // --------------------------------------------------------------------------//
-    @Override
-    protected void treatErrorEventAfterLogging(ErrorEvent errorEvent) {
-        final double[] value = null;
-        final SpectrumEvent_RW spectrumEventRw = new SpectrumEvent_RW();
-        spectrumEventRw.setAttributeCompleteName(errorEvent.getSource().toString());
-        spectrumEventRw.setTimeStamp(errorEvent.getTimeStamp());
-        spectrumEventRw.setValue(value, null);
-        processEventSpectrum(spectrumEventRw, DEFAULT_TRY_NUMBER);
-    }
-
-    @Override
-    public void spectrumChange(final NumberSpectrumEvent event) {
-        final int tryNumber = DEFAULT_TRY_NUMBER;
-        final INumberSpectrum eventSrc = (INumberSpectrum) event.getSource();
-        final double[] spectrumvalueR = eventSrc.getSpectrumDeviceValue();
-        final double[] spectrumvalueW = eventSrc.getSpectrumSetPoint();
-        double[] value = null;
-        if (spectrumvalueR != null && spectrumvalueW != null) {
-            value = new double[spectrumvalueR.length + spectrumvalueW.length];
-            System.arraycopy(spectrumvalueR, 0, value, 0, spectrumvalueR.length);
-            System.arraycopy(spectrumvalueW, 0, value, spectrumvalueR.length, spectrumvalueW.length);
-        }
-        final SpectrumEvent_RW spectrumEvent_rw = new SpectrumEvent_RW();
-        String attributeName = ((INumberSpectrum) event.getSource()).getName();
-        removeErrorMessage(attributeName);
-        spectrumEvent_rw.setAttributeCompleteName(attributeName);
-        spectrumEvent_rw.setDimX(((INumberSpectrum) event.getSource()).getXDimension());
-        spectrumEvent_rw.setTimeStamp(event.getTimeStamp());
-        spectrumEvent_rw.setValue(value, null);
-        processEventSpectrum(spectrumEvent_rw, tryNumber);
-    }
-
-    @Override
-    public void stateChange(final AttributeStateEvent event) {
-    }
-
-    public void processEventSpectrum(final SpectrumEvent_RW event, int try_number) {
-        if (isDataArchivableTimestampWise(event)) {
-            final String attributeName = event.getAttributeCompleteName();
-            try {
-                // spectrum values can only have periodic modes, we don't need their lastValue
-                super.dbProxy.store(event);
-                super.setLastTimestamp(event);
-            } catch (final ArchivingException e) {
-                registerErrorMessage(attributeName, e.getMessage());
-                final String message = "Problem (ArchivingException) storing NumberSpectrum_RW value";
-                logger.error(message, e);
-
-                try_number--;
-                if (try_number > 0) {
-                    logger.debug("SpectrumEvent_RW.processEventSpectrum : retry " + try_number + "failed...");
-                    processEventSpectrum(event, try_number);
-                }
-            }
-        }
-    }
-}
+// +======================================================================
+// $Source$
+//
+// Project:      Tango Archiving Service
+//
+// Description:  Java source code for the class  NumberSpectrum_RW.
+//						(Chinkumo Jean) - March 24, 2004
+//
+// $Author$
+//
+// $Revision$
+//
+// $Log$
+// Revision 1.13  2007/10/03 15:23:29  pierrejoseph
+// Minor changes
+//
+// Revision 1.12  2007/09/28 14:49:22  pierrejoseph
+// Merged between Polling and Events code
+//
+//
+// copyleft :		Synchrotron SOLEIL
+//					L'Orme des Merisiers
+//					Saint-Aubin - BP 48
+//					91192 GIF-sur-YVETTE CEDEX
+//
+//-======================================================================
+package HdbArchiver.Collector.spectrum;
+
+import HdbArchiver.Collector.HdbCollector;
+import HdbArchiver.Collector.HdbModeHandler;
+import fr.esrf.Tango.AttrWriteType;
+import fr.esrf.Tango.DevError;
+import fr.esrf.Tango.DevFailed;
+import fr.esrf.Tango.ErrSeverity;
+import fr.esrf.TangoApi.DeviceAttribute;
+import fr.esrf.TangoApi.DeviceProxy;
+import fr.esrf.TangoApi.events.ITangoArchiveListener;
+import fr.esrf.TangoApi.events.TangoArchive;
+import fr.esrf.TangoApi.events.TangoArchiveEvent;
+import fr.esrf.TangoApi.events.TangoEventsAdapter;
+import fr.esrf.TangoDs.TangoConst;
+import fr.esrf.TangoDs.Util;
+import fr.esrf.tangoatk.core.*;
+import fr.esrf.tangoatk.core.attribute.AttributeFactory;
+import fr.soleil.archiving.common.api.exception.ArchivingException;
+import fr.soleil.archiving.common.api.tools.GlobalConst;
+import fr.soleil.archiving.hdbtdb.api.tools.AttributeLightMode;
+import fr.soleil.archiving.hdbtdb.api.tools.SpectrumEvent_RW;
+import org.slf4j.Logger;
+import org.tango.utils.DevFailedUtils;
+
+import java.util.HashMap;
+import java.util.Map;
+
+public class NumberSpectrum_RW extends HdbCollector implements ISpectrumListener, ITangoArchiveListener {
+
+    private static final long serialVersionUID = -5743386643781837059L;
+
+    private final Map<Device, TangoEventsAdapter> evtAdaptHMap;
+
+    public NumberSpectrum_RW(final HdbModeHandler hdbModeHandler, final boolean useEvents, final Logger logger) {
+        super(hdbModeHandler, useEvents, logger);
+        evtAdaptHMap = new HashMap<Device, TangoEventsAdapter>();
+    }
+
+    @Override
+    public synchronized void removeSource(final String attributeName) throws ArchivingException {
+        logger.debug("NumberSpectrum_RW.removeSource");
+
+        if (useEvents) {
+            removeSourceForEvents(attributeName);
+        }
+
+        try {
+            /*
+             * while ( ( INumberSpectrum ) attributeList.get(attributeName) !=
+             * null ) {
+             */
+            stopCollecting();
+            final INumberSpectrum attribute = (INumberSpectrum) attributeList.get(attributeName);
+            if (attribute != null) {
+                attribute.removeSpectrumListener(this);
+                attribute.removeErrorListener(this);
+                removeTimestamps(attributeName);
+                attributeList.remove(attributeName);
+                removeErrorMessage(attributeName);
+            }
+
+        } catch (final Exception e) {
+            final String message = GlobalConst.ARCHIVING_ERROR_PREFIX + "Failed removing '" + attributeName
+                    + "' from sources";
+            final String reason = GlobalConst.TANGO_COMM_EXCEPTION;
+            final String desc = "Failed while executing NumberSpectrum_RW.removeSource() method...";
+            throw new ArchivingException(message, reason, ErrSeverity.WARN, desc, "", e);
+        } finally {
+            startCollecting();
+        }
+    }
+
+    @Override
+    protected void doAddSourceForPolling(final AttributeLightMode attributeLightMode) throws ArchivingException {
+        String attributeName = null;
+        try {
+            stopCollecting();
+            attributeName = attributeLightMode.getAttributeCompleteName();
+            final INumberSpectrum attribute = (INumberSpectrum) attributeList.add(attributeName);
+            attribute.addSpectrumListener(this);
+            attribute.addErrorListener(this);
+            logger.debug("\t The attribute named " + attributeLightMode.getAttributeCompleteName()
+                    + " was hired to the Collector list...");
+        } catch (final ConnectionException e) {
+            registerErrorMessage(attributeName, e);
+            final String message = GlobalConst.ARCHIVING_ERROR_PREFIX + "Failed adding '" + attributeName
+                    + "' as source";
+            final String reason = GlobalConst.TANGO_COMM_EXCEPTION;
+            final String desc = "Failed while executing NumberSpectrum_RW.addSource() method...";
+            throw new ArchivingException(message, reason, ErrSeverity.WARN, desc, "", e);
+        } finally {
+            startCollecting();
+        }
+    }
+
+    // --------------------------------------------------------------------------//
+    // ELETTRA : Archiving Events
+    // --------------------------------------------------------------------------//
+    @Override
+    protected void addSourceForEvents(final AttributeLightMode attributeLightMode) throws ArchivingException {
+        /* Adapter for the Tango archive events */
+        TangoEventsAdapter evtAdapt = null;
+        INumberSpectrum attribute = null;
+
+        try {
+            /*
+             * Get the attribute from the AttributeFactory, so that it is not
+             * added to the attribute polled list. Remember that `attributeList'
+             * is an AttributePolledList().
+             */
+            attribute = (INumberSpectrum) AttributeFactory.getInstance().getAttribute(
+                    attributeLightMode.getAttributeCompleteName());
+            if (attribute == null) {
+                logger.debug("\033[1;31mNumberSpectrum_RW.java: the attribute \""
+                        + attributeLightMode.getAttributeCompleteName()
+                        + " is null (NumberSpectrum_RW.java): not adding it!");
+                return;
+            }
+        } catch (final DevFailed e) {
+            logger.error(DevFailedUtils.toString(e));
+            final String message = GlobalConst.ARCHIVING_ERROR_PREFIX + "Failed adding '"
+                    + attributeLightMode.getAttributeCompleteName() + "' as source";
+            final String reason = "DevFailed exception while calling AttributeFactory.getInstance().getAttribute();";
+            final String desc = "Failed while executing Spectrum_RW.addSource() method...\nSpectrum_RW.java: Failed to get the attribute from the AttributeFactory";
+            throw new ArchivingException(message, reason, ErrSeverity.WARN, desc, "", e);
+        } catch (final ConnectionException e) {
+            final String message = GlobalConst.ARCHIVING_ERROR_PREFIX + "Failed adding '"
+                    + attributeLightMode.getAttributeCompleteName() + "' as source";
+            final String reason = GlobalConst.TANGO_COMM_EXCEPTION;
+            final String desc = "Failed while executing NumberSpectrum_RW.addSource() method...\nNumberSpectrum_RW.java: Failed to get the attribute from the AttributeFactory";
+            throw new ArchivingException(message, reason, ErrSeverity.WARN, desc, "", e);
+        } /*
+           * end of first try/catch block, to retrieve the attribute from the
+           * AttributeFactory
+           */
+
+        logger.debug("\033[0;44mregistering\033[0m the \033[4mSPECTRUM\033[0m [RO] attribute \""
+                + attribute.getNameSansDevice() + "\"...\t");
+
+        /*
+         * If an attribute (name + device server) is already in the map, it
+         * means it has already been registered for the Tango Archive events. So
+         * it does not have to be added to the archive events once again, nor to
+         * the attributePolledList: we can return. The same goes for an
+         * attribute already present in the attributePolledList `attributeList'.
+         */
+        /*
+         * if(HdbArchiver.useEvents.equalsIgnoreCase("no")) {
+         * System.out.print("[\033[1;45mEVENTS DISABLED\033[0m].");
+         * registerForScalarListener(attributeLightMode); } else {
+         */
+        try {
+            synchronized (evtAdaptHMap) {
+                evtAdapt = evtAdaptHMap.get(attribute.getDevice());
+                if (evtAdapt == null) {
+                    evtAdapt = new TangoEventsAdapter(attribute.getDevice());
+                    evtAdaptHMap.put(attribute.getDevice(), evtAdapt);
+                } else {
+                    logger.debug("\nThe adapter for the attribute is already configured");
+                }
+            }
+            final String[] filter = new String[0];
+
+            /*
+             * Try to register for the archive events: evtAdapt is the new
+             * adapter or the one already found in the map.
+             */
+            evtAdapt.addTangoArchiveListener(this, attribute.getNameSansDevice(), filter);
+            archiveListenersCounter++;
+            logger.debug("[\033[0;42mEVENTS\033[0m].");
+        } catch (final DevFailed e) {
+            /*
+             * If archive events are not enabled for the attribute, we will poll
+             * it
+             */
+            for (final DevError error : e.errors) {
+
+                if (error.desc.contains("Already connected to event")) {
+                    logger.debug("Already connected to events for attribute");
+                    return;
+                } else if (error.desc.contains("The polling (necessary to send events) for the attribute")) {
+                    logger.debug(" {\033[1;35mpoller not started\033[0m} ");
+                    break;
+                } else if (error.desc.contains("Archive event properties")) {
+                    logger.debug(" {\033[1;35marchive event properties not set\033[0m} ");
+                    break;
+                } else {
+                    logger.debug("error registering: " + error.desc);
+                }
+
+            }
+            /* Register for polling */
+            addSourceForPolling(attributeLightMode);
+            /* unlock the attributeList */
+        }
+        // } /* function finishes */
+    }
+
+    private void removeSourceForEvents(final String attributeName) {
+        logger.debug("NumberSpectrum_RW.removeSource");
+        logger.debug("\033[0;44mremoving\033[0m source for \033[4mspectrum\033[0m [RW]:\"" + attributeName + "\"...\t");
+        TangoEventsAdapter adapter;
+        INumberSpectrum attribute;
+        /*
+         * If useEvents is enabled, we should remove the eventListener, if not
+         * we can skip this piece of code
+         */
+        // if (HdbArchiver.useEvents.equalsIgnoreCase("yes"))
+        // {
+        try {
+            synchronized (evtAdaptHMap) {
+                attribute = (INumberSpectrum) AttributeFactory.getInstance().getAttribute(attributeName);
+                /*
+                 * Retrieve in the hash table the event adapter associated to
+                 * the attributeName.
+                 */
+                if (attribute == null) {
+                    logger.debug("\033[1;31mThe attribute " + attributeName + " is null\033[0m");
+                }
+                adapter = evtAdaptHMap.get(attribute.getDevice());
+
+                if (adapter != null) {
+                    adapter.removeTangoArchiveListener(this, attribute.getNameSansDevice());
+                    archiveListenersCounter--;
+                    logger.debug("[\033[0;42mEVENTS\033[0m].");
+                    logger.debug(" (adapter: " + adapter.device_name() + ")");
+                    /* Should be ok now to return */
+                    return;
+                }
+            } /* unlock event adapters map */
+        } catch (final ConnectionException e) /* getAttribute() failed */ {
+            logger.error("",e);
+        } catch (final DevFailed f) {
+            logger.error(DevFailedUtils.toString(f));
+        }
+        // }
+    }
+
+    /**
+     * @author giacomo S. elettra This is called when a Tango archive event is
+     * sent from the server (the attribute has changed)
+     * @since events
+     */
+    @Override
+    public void archive(final TangoArchiveEvent event) {
+        final int tryNumber = DEFAULT_TRY_NUMBER;
+        DeviceAttribute attrib = null;
+        TangoArchive arch;
+        DeviceProxy proxy;
+        final SpectrumEvent_RW spectrumEventRw = new SpectrumEvent_RW();
+
+        try {
+            attrib = event.getValue();
+        } catch (final DevFailed f) {
+            logger.error(DevFailedUtils.toString(f));
+            return;
+        } catch (final Exception e) /* Shouldn't be reached */ {
+            logger.error("error", e);
+            return;
+        }
+        try {
+            /*
+             * To correctly archive the attribute, we have to know its complete
+             * name. To acquire this information, we must o back to the
+             * TangoArchive object (which contains the DeviceProxy).
+             */
+            arch = (TangoArchive) event.getSource();
+            proxy = arch.getEventSupplier(); /*
+                                              * The device that supplied the
+                                              * event
+                                              */
+            if (arch == null || proxy == null || attrib == null) {
+                logger.debug("\033[1;31mSpectrum_RW.java: event.getValue() or event.getSource() or event.getSource().getEventSupplier()) returned null!\033[0m");
+                return;
+            }
+            final int dim = attrib.getDimX();
+            switch (attrib.getType()) {
+                case TangoConst.Tango_DEV_SHORT:
+                    transmitShortArray(spectrumEventRw, dim, attrib.extractShortArray(), null);
+                    break;
+
+                case TangoConst.Tango_DEV_USHORT:
+                    transmitIntArray(spectrumEventRw, dim, attrib.extractUShortArray(), null);
+                    break;
+
+                case TangoConst.Tango_DEV_LONG:
+                case TangoConst.Tango_DEV_ULONG:
+                    transmitIntArray(spectrumEventRw, dim, attrib.extractLongArray(), null);
+                    break;
+
+                case TangoConst.Tango_DEV_FLOAT:
+                    transmitFloatArray(spectrumEventRw, dim, attrib.extractFloatArray(), null);
+                    break;
+
+                case TangoConst.Tango_DEV_BOOLEAN:
+                    transmitBooleanArray(spectrumEventRw, dim, attrib.extractBooleanArray(), null);
+                    logger.debug("\033[1;31mboolean spectrum here? In NumberSpectrum_RW!!??\033[0m");
+                    break;
+
+                case TangoConst.Tango_DEV_DOUBLE:
+                default:
+                    transmitDoubleArray(spectrumEventRw, dim, attrib.extractDoubleArray(), null);
+                    break;
+
+            }
+            logger.debug(proxy.name() + ": " + attrib.getName()
+                    + " {\033[4mspectrum\033[0m, RW} [\033[1;32mEVENT\033[0m]" + " (dim: " + attrib.getDimX() + ")");
+            spectrumEventRw.setAttributeCompleteName(proxy.name() + "/" + attrib.getName());
+            spectrumEventRw.setTimeStamp(attrib.getTime());
+            spectrumEventRw.setDataType(attrib.getType());
+            spectrumEventRw.setWritable(AttrWriteType._READ_WRITE);
+            spectrumEventRw.setDimX(dim);
+            /* Process the just built spectrum event */
+            processEventSpectrum(spectrumEventRw, tryNumber);
+
+        } catch (final DevFailed devFailed) {
+            logger.error(DevFailedUtils.toString(devFailed));
+            final Object value = null;
+            spectrumEventRw.setValue(value, null);
+            processEventSpectrum(spectrumEventRw, tryNumber);
+        } catch (final Exception exE) {
+            logger.error("error", exE);
+            final Object value = null;
+            spectrumEventRw.setValue(value, null);
+            processEventSpectrum(spectrumEventRw, tryNumber);
+        }
+
+    }
+
+    // --------------------------------------------------------------------------//
+    // ELETTRA : Archiving Events
+    // --------------------------------------------------------------------------//
+    @Override
+    protected void treatErrorEventAfterLogging(ErrorEvent errorEvent) {
+        final double[] value = null;
+        final SpectrumEvent_RW spectrumEventRw = new SpectrumEvent_RW();
+        spectrumEventRw.setAttributeCompleteName(errorEvent.getSource().toString());
+        spectrumEventRw.setTimeStamp(errorEvent.getTimeStamp());
+        spectrumEventRw.setValue(value, null);
+        processEventSpectrum(spectrumEventRw, DEFAULT_TRY_NUMBER);
+    }
+
+    @Override
+    public void spectrumChange(final NumberSpectrumEvent event) {
+        final int tryNumber = DEFAULT_TRY_NUMBER;
+        final INumberSpectrum eventSrc = (INumberSpectrum) event.getSource();
+        final double[] spectrumvalueR = eventSrc.getSpectrumDeviceValue();
+        final double[] spectrumvalueW = eventSrc.getSpectrumSetPoint();
+        double[] value = null;
+        if (spectrumvalueR != null && spectrumvalueW != null) {
+            value = new double[spectrumvalueR.length + spectrumvalueW.length];
+            System.arraycopy(spectrumvalueR, 0, value, 0, spectrumvalueR.length);
+            System.arraycopy(spectrumvalueW, 0, value, spectrumvalueR.length, spectrumvalueW.length);
+        }
+        final SpectrumEvent_RW spectrumEvent_rw = new SpectrumEvent_RW();
+        String attributeName = ((INumberSpectrum) event.getSource()).getName();
+        removeErrorMessage(attributeName);
+        spectrumEvent_rw.setAttributeCompleteName(attributeName);
+        spectrumEvent_rw.setDimX(((INumberSpectrum) event.getSource()).getXDimension());
+        spectrumEvent_rw.setTimeStamp(event.getTimeStamp());
+        spectrumEvent_rw.setValue(value, null);
+        processEventSpectrum(spectrumEvent_rw, tryNumber);
+    }
+
+    @Override
+    public void stateChange(final AttributeStateEvent event) {
+    }
+
+    public void processEventSpectrum(final SpectrumEvent_RW event, int try_number) {
+        if (isDataArchivableTimestampWise(event)) {
+            final String attributeName = event.getAttributeCompleteName();
+            try {
+                // spectrum values can only have periodic modes, we don't need their lastValue
+                super.dbProxy.store(event);
+                super.setLastTimestamp(event);
+            } catch (final ArchivingException e) {
+                registerErrorMessage(attributeName, e.getMessage());
+                final String message = "Problem (ArchivingException) storing NumberSpectrum_RW value";
+                logger.error(message, e);
+
+                try_number--;
+                if (try_number > 0) {
+                    logger.debug("SpectrumEvent_RW.processEventSpectrum : retry " + try_number + "failed...");
+                    processEventSpectrum(event, try_number);
+                }
+            }
+        }
+    }
+}
diff --git a/src/main/java/HdbArchiver/Collector/spectrum/StringSpectrum_RO.java b/hdbarchiver/src/main/java/HdbArchiver/Collector/spectrum/StringSpectrum_RO.java
similarity index 93%
rename from src/main/java/HdbArchiver/Collector/spectrum/StringSpectrum_RO.java
rename to hdbarchiver/src/main/java/HdbArchiver/Collector/spectrum/StringSpectrum_RO.java
index 5b67b81ec5e453c27ea5c39e47dd536d264da236..ec7b846a34cd33022b97c47e2abe8035a4583a53 100644
--- a/src/main/java/HdbArchiver/Collector/spectrum/StringSpectrum_RO.java
+++ b/hdbarchiver/src/main/java/HdbArchiver/Collector/spectrum/StringSpectrum_RO.java
@@ -1,480 +1,462 @@
-// +======================================================================
-// $Source$
-//
-// Project:      Tango Archiving Service
-//
-// Description:  Java source code for the class  Spectrum_RO.
-//						(Chinkumo Jean) - Mar 24, 2004
-//
-// $Author$
-//
-// $Revision$
-//
-// $Log$
-// Revision 1.13  2007/10/03 15:23:29  pierrejoseph
-// Minor changes
-//
-// Revision 1.12  2007/09/28 14:49:22  pierrejoseph
-// Merged between Polling and Events code
-//
-// Revision 1.11  2007/09/25 14:59:17  pierrejoseph
-// 5251 : sometimes the device stayed in Running state sue to a blocking while in  the addAttribute method.
-//
-// Revision 1.10  2007/06/11 12:18:51  pierrejoseph
-// m_logger from the mother class (ArchiverCollector)
-//
-// Revision 1.9  2007/03/05 16:25:20  ounsy
-// non-static DataBase
-//
-// Revision 1.8  2006/10/31 16:54:12  ounsy
-// milliseconds and null values management
-//
-// Revision 1.7  2006/07/26 08:37:21  ounsy
-// try number no more static and reinitialized with change events (errorchange, numberscalarchange, etc...)
-//
-// Revision 1.6  2006/07/21 14:39:26  ounsy
-// removed useless logs
-//
-// Revision 1.5  2006/07/18 08:03:18  ounsy
-// minor changes
-//
-// Revision 1.4  2006/06/16 09:25:33  ounsy
-// changed imports because of the diary package moving to the javaapi project
-//
-// Revision 1.3  2006/06/13 13:28:19  ounsy
-// added a file logging system (diary) that records data storing errors
-//
-// Revision 1.2  2006/05/23 11:57:17  ounsy
-// now checks the timeCondition condition before calling DbProxy.store
-//
-// Revision 1.1  2006/04/05 13:49:51  ounsy
-// new types full support
-//
-// Revision 1.8  2006/03/28 11:13:49  ounsy
-// better spectrum management
-//
-// Revision 1.7  2005/11/29 17:33:53  chinkumo
-// no message
-//
-// Revision 1.6.10.2  2005/11/29 16:16:05  chinkumo
-// Code reformated (pogo compatible)
-//
-// Revision 1.6.10.1  2005/11/15 13:46:08  chinkumo
-// ...
-//
-// Revision 1.6  2005/06/24 12:06:27  chinkumo
-// Some constants were moved from fr.soleil.hdbtdbArchivingApi.ArchivingApi.ConfigConst to fr.soleil.hdbtdbArchivingApi.ArchivingTools.Tools.GlobalConst.
-
-// This change was reported here.
-//
-// Revision 1.5  2005/06/14 10:30:28  chinkumo
-// Branch (hdbArchiver_1_0_1-branch_0)  and HEAD merged.
-//
-// Revision 1.4.2.1  2005/06/13 14:01:07  chinkumo
-// Changes made to improve the management of exceptions were reported here.
-//
-// Revision 1.4  2005/04/08 15:37:00  chinkumo
-// errorChange method filled.
-
-// The aim of this method is to manage possible attribute's problem while polling attributes.
-
-// In case of unavailable value, a record is nevertheless carried out with the event timestamp, but with a kind of NULL value.
-//
-// Revision 1.3  2005/02/04 17:10:14  chinkumo
-// The trouble with the grouped stopping strategy was fixed.
-//
-// Revision 1.2  2005/01/26 16:38:14  chinkumo
-// Ultimate synchronization before real sharing.
-//
-// Revision 1.1  2004/12/06 16:43:25  chinkumo
-// First commit (new architecture).
-//
-//
-// copyleft :	Synchrotron SOLEIL
-//					L'Orme des Merisiers
-//					Saint-Aubin - BP 48
-//					91192 GIF-sur-YVETTE CEDEX
-//
-//-======================================================================
-
-package HdbArchiver.Collector.spectrum;
-
-import java.util.HashMap;
-import java.util.Map;
-
-import org.slf4j.Logger;
-import org.tango.utils.DevFailedUtils;
-
-import Common.Archiver.Collector.ModesCounters;
-import HdbArchiver.HdbArchiver;
-import HdbArchiver.Collector.HdbCollector;
-import HdbArchiver.Collector.HdbModeHandler;
-import fr.esrf.Tango.AttrWriteType;
-import fr.esrf.Tango.DevError;
-import fr.esrf.Tango.DevFailed;
-import fr.esrf.Tango.ErrSeverity;
-import fr.esrf.TangoApi.DeviceAttribute;
-import fr.esrf.TangoApi.DeviceProxy;
-import fr.esrf.TangoApi.events.ITangoArchiveListener;
-import fr.esrf.TangoApi.events.TangoArchive;
-import fr.esrf.TangoApi.events.TangoArchiveEvent;
-import fr.esrf.TangoApi.events.TangoEventsAdapter;
-import fr.esrf.TangoDs.Util;
-import fr.esrf.tangoatk.core.AttributeStateEvent;
-import fr.esrf.tangoatk.core.ConnectionException;
-import fr.esrf.tangoatk.core.Device;
-import fr.esrf.tangoatk.core.ErrorEvent;
-import fr.esrf.tangoatk.core.IStringSpectrum;
-import fr.esrf.tangoatk.core.IStringSpectrumListener;
-import fr.esrf.tangoatk.core.StringSpectrumEvent;
-import fr.esrf.tangoatk.core.attribute.AttributeFactory;
-import fr.soleil.archiving.common.api.exception.ArchivingException;
-import fr.soleil.archiving.common.api.tools.GlobalConst;
-import fr.soleil.archiving.hdbtdb.api.tools.AttributeLightMode;
-import fr.soleil.archiving.hdbtdb.api.tools.SpectrumEvent_RO;
-
-public class StringSpectrum_RO extends HdbCollector implements IStringSpectrumListener, ITangoArchiveListener {
-
-    private static final long serialVersionUID = 1125906538995861445L;
-
-    private final Map<Device, TangoEventsAdapter> evtAdaptHMap;
-
-    public StringSpectrum_RO(final HdbModeHandler hdbModeHandler, final Logger logger) {
-        super(hdbModeHandler, logger);
-        evtAdaptHMap = new HashMap<Device, TangoEventsAdapter>();
-    }
-
-    @Override
-    public synchronized void removeSource(final String attributeName) throws ArchivingException {
-        logger.debug("StringSpectrum_RO.removeSource");
-
-        if (HdbArchiver.isUseEvents) {
-            removeSourceForEvents(attributeName);
-        }
-
-        try {
-            /*
-             * while ( ( IStringSpectrum ) attributeList.get(attributeName) !=
-             * null ) {
-             */
-            stopCollecting();
-            final IStringSpectrum attribute = (IStringSpectrum) attributeList.get(attributeName);
-            if (attribute != null) {
-                attribute.removeListener(this);
-                attribute.removeErrorListener(this);
-                removeAttribute(attributeName);
-                removeTimestamps(attributeName);
-                attributeList.remove(attributeName);
-                removeErrorMessage(attributeName);
-                logger.debug("\t The attribute named " + attributeName + " was fired from the Collector list...");
-            }
-        } catch (final Exception e) {
-            final String message = GlobalConst.ARCHIVING_ERROR_PREFIX + "Failed removing '" + attributeName
-                    + "' from sources";
-            final String reason = GlobalConst.TANGO_COMM_EXCEPTION;
-            final String desc = "Failed while executing Spectrum_RO.removeSource() method...";
-            throw new ArchivingException(message, reason, ErrSeverity.WARN, desc, "", e);
-        } finally {
-            startCollecting();
-        }
-    }
-
-    @Override
-    protected void doAddSourceForPolling(final AttributeLightMode attributeLightMode) throws ArchivingException {
-        try {
-            stopCollecting();
-            final String attrName = attributeLightMode.getAttributeCompleteName();
-            final IStringSpectrum attribute = (IStringSpectrum) attributeList.add(attrName);
-            attribute.addListener(this);
-            attribute.addErrorListener(this);
-            addAttribute(attrName);
-            Util.out4.println("\t The attribute named " + attributeLightMode.getAttributeCompleteName()
-                    + " was hired to the Collector list...");
-        } catch (final ConnectionException e) {
-            final String message = GlobalConst.ARCHIVING_ERROR_PREFIX + "Failed adding '"
-                    + attributeLightMode.getAttributeCompleteName() + "' as source";
-            final String reason = GlobalConst.TANGO_COMM_EXCEPTION;
-            final String desc = "Failed while executing Spectrum_RO.addSource() method...";
-            throw new ArchivingException(message, reason, ErrSeverity.WARN, desc, "", e);
-        } finally {
-            startCollecting();
-        }
-    }
-
-    // --------------------------------------------------------------------------//
-    // ELETTRA : Archiving Events
-    // --------------------------------------------------------------------------//
-    @Override
-    protected void addSourceForEvents(final AttributeLightMode attributeLightMode) throws ArchivingException {
-        /* Adapter for the Tango archive events */
-        TangoEventsAdapter evtAdapt = null;
-        IStringSpectrum attribute = null;
-
-        try {
-            /*
-             * Get the attribute from the AttributeFactory, so that it is not
-             * added to the attribute polled list. Remember that `attributeList'
-             * is an AttributePolledList().
-             */
-            attribute = (IStringSpectrum) AttributeFactory.getInstance().getAttribute(
-                    attributeLightMode.getAttributeCompleteName());
-            if (attribute == null) {
-                logger.debug("\033[1;31mStringStringSpectrum_RO.java: the attribute \""
-                        + attributeLightMode.getAttributeCompleteName()
-                        + " is null (StringStringSpectrum_RO.java): not adding it!");
-                return;
-            }
-        } catch (final DevFailed e) {
-            logger.error(DevFailedUtils.toString(e));
-            final String message = GlobalConst.ARCHIVING_ERROR_PREFIX + "Failed adding '"
-                    + attributeLightMode.getAttributeCompleteName() + "' as source";
-            final String reason = "DevFailed exception while calling AttributeFactory.getInstance().getAttribute();";
-            final String desc = "Failed while executing Spectrum_RO.addSource() method...\nStringSpectrum_RO.java: Failed to get the attribute from the AttributeFactory";
-            throw new ArchivingException(message, reason, ErrSeverity.WARN, desc, "", e);
-        } catch (final ConnectionException e) {
-            final String message = GlobalConst.ARCHIVING_ERROR_PREFIX + "Failed adding '"
-                    + attributeLightMode.getAttributeCompleteName() + "' as source";
-            final String reason = GlobalConst.TANGO_COMM_EXCEPTION;
-            final String desc = "Failed while executing NumberSpectrum_RO.addSource() method...\nStringStringSpectrum_RO.java: Failed to get the attribute from the AttributeFactory";
-            throw new ArchivingException(message, reason, ErrSeverity.WARN, desc, "", e);
-        } /*
-           * end of first try/catch block, to retrieve the attribute from the
-           * AttributeFactory
-           */
-
-        logger.debug("STRING SPECTRUM [RO] attribute \"" + attribute.getNameSansDevice() + "\"...\t");
-
-        /*
-         * If an attribute (name + device server) is already in the map, it
-         * means it has already been registered for the Tango Archive events. So
-         * it does not have to be added to the archive events once again, nor to
-         * the attributePolledList: we can return. The same goes for an
-         * attribute already present in the attributePolledList `attributeList'.
-         */
-        /*
-         * if(HdbArchiver.useEvents.equalsIgnoreCase("no")) {
-         * System.out.print("[\033[1;35mEVENTS DISABLED\033[0m].");
-         * registerForScalarListener(attributeLightMode); } else {
-         */
-        try {
-            synchronized (evtAdaptHMap) {
-                evtAdapt = evtAdaptHMap.get(attribute.getDevice());
-                if (evtAdapt == null) {
-                    evtAdapt = new TangoEventsAdapter(attribute.getDevice());
-                    evtAdaptHMap.put(attribute.getDevice(), evtAdapt);
-                } else {
-                    logger.debug("\nThe adapter for the attribute is already configured");
-                }
-            }
-            final String[] filter = new String[0];
-
-            /*
-             * Try to register for the archive events: evtAdapt is the new
-             * adapter or the one already found in the map.
-             */
-            evtAdapt.addTangoArchiveListener(this, attribute.getNameSansDevice(), filter);
-            archiveListenersCounter++;
-            logger.debug("[\033[1;32mEVENTS\033[0m].");
-        } catch (final DevFailed e) {
-            /*
-             * If archive events are not enabled for the attribute, we will poll
-             * it
-             */
-            for (final DevError error : e.errors) {
-                // // System.out.println("error registering: " +
-                // e.errors[err].desc);
-                if (error.desc.contains("Already connected to event")) {
-                    logger.debug("Already connected to events for attribute");
-                    return;
-                }
-            }
-            /* Register for polling */
-            addSourceForPolling(attributeLightMode);
-            /* unlock the attributeList */
-        }
-        // } /* function finishes */
-    }
-
-    private void removeSourceForEvents(final String attributeName) {
-        logger.debug("NumberSpectrum_RO.removeSource");
-        logger.debug("spectrum [RO]: removing source for \"" + attributeName + "\"...\t");
-        final TangoEventsAdapter adapter;
-        final IStringSpectrum attribute;
-        /*
-         * If useEvents is enabled, we should remove the eventListener, if not
-         * we can skip this piece of code
-         */
-        // if (HdbArchiver.useEvents.equalsIgnoreCase("yes"))
-        // {
-        try {
-            synchronized (evtAdaptHMap) {
-                attribute = (IStringSpectrum) AttributeFactory.getInstance().getAttribute(attributeName);
-                /*
-                 * Retrieve in the hash table the event adapter associated to
-                 * the attributeName.
-                 */
-                if (attribute == null) {
-                    logger.debug("\033[1;31mThe attribute " + attributeName + " is null\033[0m");
-                }
-                adapter = evtAdaptHMap.get(attribute.getDevice());
-
-                if (adapter != null) {
-                    adapter.removeTangoArchiveListener(this, attribute.getNameSansDevice());
-                    archiveListenersCounter--;
-                    logger.debug("[\033[1;32mEVENTS\033[0m].");
-                    logger.debug(" (adapter: " + adapter.device_name() + ")");
-                    /* Should be ok now to return */
-                    return;
-                }
-            } /* unlock event adapters map */
-        } catch (final ConnectionException e) /* getAttribute() failed */
-        {
-            Util.out2
-                    .println("\033[1;31mConnection exception while retrieving the attribute from the AttributeFactory!\033[0m");
-        } catch (final DevFailed f) {
-            Util.out2.println("Error removing tangoArchiveListener");
-            for (final DevError error : f.errors) {
-                Util.out2.println("error: " + error.desc);
-            }
-        }
-        // }
-    }
-
-    /**
-     * @since events
-     * @author giacomo S. elettra This is called when a Tango archive event is
-     *         sent from the server (the attribute has changed)
-     */
-    @Override
-    public void archive(final TangoArchiveEvent event) {
-        final int tryNumber = DEFAULT_TRY_NUMBER;
-        DeviceAttribute attrib = null;
-        TangoArchive arch;
-        DeviceProxy proxy;
-        final SpectrumEvent_RO spectrumEventRo = new SpectrumEvent_RO();
-
-        try {
-            attrib = event.getValue();
-        } catch (final DevFailed f) {
-            logger.error(DevFailedUtils.toString(f));
-            return;
-        } catch (final Exception e) /* Shouldn't be reached */
-        {
-            logger.error("StringSpectrum_RO.java.archive.getValue() failed, caught generic Exception, code failure", e);
-            return;
-        }
-        try {
-            /*
-             * To correctly archive the attribute, we have to know its complete
-             * name. To acquire this information, we must o back to the
-             * TangoArchive object (which contains the DeviceProxy).
-             */
-            arch = (TangoArchive) event.getSource();
-            proxy = arch.getEventSupplier(); /*
-                                              * The device that supplied the
-                                              * event
-                                              */
-            if (arch == null || proxy == null || attrib == null) {
-                logger.debug("\033[1;31mBooleanStringSpectrum_RO.java: event.getValue() or event.getSource() or event.getSource().getEventSupplier()) returned null!\033[0m");
-                return;
-            }
-            int dim = attrib.getDimX(); // ??
-            final String[] svalue = attrib.extractStringArray();
-            dim = svalue.length;
-            spectrumEventRo.setValue(svalue, null);
-            logger.debug(proxy.name() + ": " + attrib.getName() + "{string spectrum, RO} [\033[1;32mEVENT\033[0m]"
-                    + " (dim: " + attrib.getDimX());
-            spectrumEventRo.setAttributeCompleteName(proxy.name() + "/" + attrib.getName());
-            spectrumEventRo.setTimeStamp(attrib.getTime());
-            spectrumEventRo.setDataType(attrib.getType());
-            spectrumEventRo.setWritable(AttrWriteType._READ);
-            spectrumEventRo.setDimX(dim);
-            /* Process the just built spectrum event */
-            processEventSpectrum(spectrumEventRo, tryNumber);
-
-        } catch (final DevFailed devFailed) {
-            logger.error(DevFailedUtils.toString(devFailed));
-
-            final Object value = null;
-            spectrumEventRo.setValue(value, null);
-            processEventSpectrum(spectrumEventRo, tryNumber);
-        } catch (final Exception e) {
-            logger.error("Boolean.StringSpectrum_RO.java: archive : " + GlobalConst.ARCHIVING_ERROR_PREFIX + "\r\n\t"
-                    + "Problem while reading " + spectrumEventRo.getAttributeCompleteName() + " values...", e);
-            final Object value = null;
-            spectrumEventRo.setValue(value, null);
-            processEventSpectrum(spectrumEventRo, tryNumber);
-        }
-
-    }
-
-    // --------------------------------------------------------------------------//
-    // ELETTRA : Archiving Events
-    // --------------------------------------------------------------------------//
-    @Override
-    protected void treatErrorEventAfterLogging(ErrorEvent errorEvent) {
-        final String[] value = null;
-        final SpectrumEvent_RO spectrumEventRo = new SpectrumEvent_RO();
-        spectrumEventRo.setAttributeCompleteName(errorEvent.getSource().toString());
-        spectrumEventRo.setTimeStamp(errorEvent.getTimeStamp());
-        spectrumEventRo.setValue(value, null);
-        processEventSpectrum(spectrumEventRo, DEFAULT_TRY_NUMBER);
-    }
-
-    @Override
-    public void stringSpectrumChange(final StringSpectrumEvent event) {
-        final int tryNumber = DEFAULT_TRY_NUMBER;
-        final String[] value = event.getValue();
-        final SpectrumEvent_RO spectrumEvent_ro = new SpectrumEvent_RO();
-        String attributeName = ((IStringSpectrum) event.getSource()).getName();
-        removeErrorMessage(attributeName);
-        spectrumEvent_ro.setAttributeCompleteName(attributeName);
-        spectrumEvent_ro.setDimX(((IStringSpectrum) event.getSource()).getXDimension());
-        spectrumEvent_ro.setTimeStamp(event.getTimeStamp());
-        spectrumEvent_ro.setValue(value, null);
-        processEventSpectrum(spectrumEvent_ro, tryNumber);
-    }
-
-    @Override
-    public void stateChange(final AttributeStateEvent event) {
-    }
-
-    public void processEventSpectrum(final SpectrumEvent_RO event, int try_number) {
-        if (isDataArchivableTimestampWise(event)) {
-            final String attributeName = event.getAttributeCompleteName();
-
-            try {
-                boolean doArchive = false;
-                if (isFirstValueList.get(attributeName.toLowerCase())) {
-                    doArchive = true;
-                    isFirstValueList.put(attributeName.toLowerCase(), false);
-                    logger.debug(attributeName + " first value, forcing archiving");
-                } else {
-
-                    final ModesCounters mc = getModeCounter(attributeName);
-                    if (mc == null) {
-                        logger.debug(attributeName + " Attribute Counters unknown");
-                    } else {
-                        doArchive = doArchiveEvent(mc, event.getDataType(), event.getValueAsString(),
-                                getLastValue(event), attributeName);
-                    }
-                }
-                if (doArchive) {
-                    super.dbProxy.store(event);
-                }
-                setLastValue(event, event.getValueAsString());
-            } catch (final ArchivingException e) {
-                registerErrorMessage(attributeName, e.getMessage());
-                final String message = "Problem (ArchivingException) storing StringSpectrum_RO value";
-                logger.error(message, e);
-
-                try_number--;
-                if (try_number > 0) {
-                    Util.out2.println("NumberScalar.processEventScalar : retry " + try_number + "failed...");
-                    processEventSpectrum(event, try_number);
-                }
-            }
-        }
-    }
-
-}
+// +======================================================================
+// $Source$
+//
+// Project:      Tango Archiving Service
+//
+// Description:  Java source code for the class  Spectrum_RO.
+//						(Chinkumo Jean) - Mar 24, 2004
+//
+// $Author$
+//
+// $Revision$
+//
+// $Log$
+// Revision 1.13  2007/10/03 15:23:29  pierrejoseph
+// Minor changes
+//
+// Revision 1.12  2007/09/28 14:49:22  pierrejoseph
+// Merged between Polling and Events code
+//
+// Revision 1.11  2007/09/25 14:59:17  pierrejoseph
+// 5251 : sometimes the device stayed in Running state sue to a blocking while in  the addAttribute method.
+//
+// Revision 1.10  2007/06/11 12:18:51  pierrejoseph
+// m_logger from the mother class (ArchiverCollector)
+//
+// Revision 1.9  2007/03/05 16:25:20  ounsy
+// non-static DataBase
+//
+// Revision 1.8  2006/10/31 16:54:12  ounsy
+// milliseconds and null values management
+//
+// Revision 1.7  2006/07/26 08:37:21  ounsy
+// try number no more static and reinitialized with change events (errorchange, numberscalarchange, etc...)
+//
+// Revision 1.6  2006/07/21 14:39:26  ounsy
+// removed useless logs
+//
+// Revision 1.5  2006/07/18 08:03:18  ounsy
+// minor changes
+//
+// Revision 1.4  2006/06/16 09:25:33  ounsy
+// changed imports because of the diary package moving to the javaapi project
+//
+// Revision 1.3  2006/06/13 13:28:19  ounsy
+// added a file logging system (diary) that records data storing errors
+//
+// Revision 1.2  2006/05/23 11:57:17  ounsy
+// now checks the timeCondition condition before calling DbProxy.store
+//
+// Revision 1.1  2006/04/05 13:49:51  ounsy
+// new types full support
+//
+// Revision 1.8  2006/03/28 11:13:49  ounsy
+// better spectrum management
+//
+// Revision 1.7  2005/11/29 17:33:53  chinkumo
+// no message
+//
+// Revision 1.6.10.2  2005/11/29 16:16:05  chinkumo
+// Code reformated (pogo compatible)
+//
+// Revision 1.6.10.1  2005/11/15 13:46:08  chinkumo
+// ...
+//
+// Revision 1.6  2005/06/24 12:06:27  chinkumo
+// Some constants were moved from fr.soleil.hdbtdbArchivingApi.ArchivingApi.ConfigConst to fr.soleil.hdbtdbArchivingApi.ArchivingTools.Tools.GlobalConst.
+
+// This change was reported here.
+//
+// Revision 1.5  2005/06/14 10:30:28  chinkumo
+// Branch (hdbArchiver_1_0_1-branch_0)  and HEAD merged.
+//
+// Revision 1.4.2.1  2005/06/13 14:01:07  chinkumo
+// Changes made to improve the management of exceptions were reported here.
+//
+// Revision 1.4  2005/04/08 15:37:00  chinkumo
+// errorChange method filled.
+
+// The aim of this method is to manage possible attribute's problem while polling attributes.
+
+// In case of unavailable value, a record is nevertheless carried out with the event timestamp, but with a kind of NULL value.
+//
+// Revision 1.3  2005/02/04 17:10:14  chinkumo
+// The trouble with the grouped stopping strategy was fixed.
+//
+// Revision 1.2  2005/01/26 16:38:14  chinkumo
+// Ultimate synchronization before real sharing.
+//
+// Revision 1.1  2004/12/06 16:43:25  chinkumo
+// First commit (new architecture).
+//
+//
+// copyleft :	Synchrotron SOLEIL
+//					L'Orme des Merisiers
+//					Saint-Aubin - BP 48
+//					91192 GIF-sur-YVETTE CEDEX
+//
+//-======================================================================
+
+package HdbArchiver.Collector.spectrum;
+
+import Common.Archiver.Collector.ModesCounters;
+import HdbArchiver.Collector.HdbCollector;
+import HdbArchiver.Collector.HdbModeHandler;
+import fr.esrf.Tango.AttrWriteType;
+import fr.esrf.Tango.DevError;
+import fr.esrf.Tango.DevFailed;
+import fr.esrf.Tango.ErrSeverity;
+import fr.esrf.TangoApi.DeviceAttribute;
+import fr.esrf.TangoApi.DeviceProxy;
+import fr.esrf.TangoApi.events.ITangoArchiveListener;
+import fr.esrf.TangoApi.events.TangoArchive;
+import fr.esrf.TangoApi.events.TangoArchiveEvent;
+import fr.esrf.TangoApi.events.TangoEventsAdapter;
+import fr.esrf.TangoDs.Util;
+import fr.esrf.tangoatk.core.*;
+import fr.esrf.tangoatk.core.attribute.AttributeFactory;
+import fr.soleil.archiving.common.api.exception.ArchivingException;
+import fr.soleil.archiving.common.api.tools.GlobalConst;
+import fr.soleil.archiving.hdbtdb.api.tools.AttributeLightMode;
+import fr.soleil.archiving.hdbtdb.api.tools.SpectrumEvent_RO;
+import org.slf4j.Logger;
+import org.tango.utils.DevFailedUtils;
+
+import java.util.HashMap;
+import java.util.Map;
+
+public class StringSpectrum_RO extends HdbCollector implements IStringSpectrumListener, ITangoArchiveListener {
+
+    private static final long serialVersionUID = 1125906538995861445L;
+
+    private final Map<Device, TangoEventsAdapter> evtAdaptHMap;
+
+    public StringSpectrum_RO(final HdbModeHandler hdbModeHandler, final boolean useEvents, final Logger logger) {
+        super(hdbModeHandler, useEvents, logger);
+        evtAdaptHMap = new HashMap<Device, TangoEventsAdapter>();
+    }
+
+    @Override
+    public synchronized void removeSource(final String attributeName) throws ArchivingException {
+        logger.debug("StringSpectrum_RO.removeSource");
+
+        if (useEvents) {
+            removeSourceForEvents(attributeName);
+        }
+
+        try {
+            /*
+             * while ( ( IStringSpectrum ) attributeList.get(attributeName) !=
+             * null ) {
+             */
+            stopCollecting();
+            final IStringSpectrum attribute = (IStringSpectrum) attributeList.get(attributeName);
+            if (attribute != null) {
+                attribute.removeListener(this);
+                attribute.removeErrorListener(this);
+                removeAttribute(attributeName);
+                removeTimestamps(attributeName);
+                attributeList.remove(attributeName);
+                removeErrorMessage(attributeName);
+                logger.debug("\t The attribute named " + attributeName + " was fired from the Collector list...");
+            }
+        } catch (final Exception e) {
+            final String message = GlobalConst.ARCHIVING_ERROR_PREFIX + "Failed removing '" + attributeName
+                    + "' from sources";
+            final String reason = GlobalConst.TANGO_COMM_EXCEPTION;
+            final String desc = "Failed while executing Spectrum_RO.removeSource() method...";
+            throw new ArchivingException(message, reason, ErrSeverity.WARN, desc, "", e);
+        } finally {
+            startCollecting();
+        }
+    }
+
+    @Override
+    protected void doAddSourceForPolling(final AttributeLightMode attributeLightMode) throws ArchivingException {
+        try {
+            stopCollecting();
+            final String attrName = attributeLightMode.getAttributeCompleteName();
+            final IStringSpectrum attribute = (IStringSpectrum) attributeList.add(attrName);
+            attribute.addListener(this);
+            addAttribute(attrName);
+        } catch (final ConnectionException e) {
+            final String message = GlobalConst.ARCHIVING_ERROR_PREFIX + "Failed adding '"
+                    + attributeLightMode.getAttributeCompleteName() + "' as source";
+            final String reason = GlobalConst.TANGO_COMM_EXCEPTION;
+            final String desc = "Failed while executing Spectrum_RO.addSource() method...";
+            throw new ArchivingException(message, reason, ErrSeverity.WARN, desc, "", e);
+        } finally {
+            startCollecting();
+        }
+    }
+
+    // --------------------------------------------------------------------------//
+    // ELETTRA : Archiving Events
+    // --------------------------------------------------------------------------//
+    @Override
+    protected void addSourceForEvents(final AttributeLightMode attributeLightMode) throws ArchivingException {
+        /* Adapter for the Tango archive events */
+        TangoEventsAdapter evtAdapt = null;
+        IStringSpectrum attribute = null;
+
+        try {
+            /*
+             * Get the attribute from the AttributeFactory, so that it is not
+             * added to the attribute polled list. Remember that `attributeList'
+             * is an AttributePolledList().
+             */
+            attribute = (IStringSpectrum) AttributeFactory.getInstance().getAttribute(
+                    attributeLightMode.getAttributeCompleteName());
+            if (attribute == null) {
+                logger.debug("\033[1;31mStringStringSpectrum_RO.java: the attribute \""
+                        + attributeLightMode.getAttributeCompleteName()
+                        + " is null (StringStringSpectrum_RO.java): not adding it!");
+                return;
+            }
+        } catch (final DevFailed e) {
+            logger.error(DevFailedUtils.toString(e));
+            final String message = GlobalConst.ARCHIVING_ERROR_PREFIX + "Failed adding '"
+                    + attributeLightMode.getAttributeCompleteName() + "' as source";
+            final String reason = "DevFailed exception while calling AttributeFactory.getInstance().getAttribute();";
+            final String desc = "Failed while executing Spectrum_RO.addSource() method...\nStringSpectrum_RO.java: Failed to get the attribute from the AttributeFactory";
+            throw new ArchivingException(message, reason, ErrSeverity.WARN, desc, "", e);
+        } catch (final ConnectionException e) {
+            final String message = GlobalConst.ARCHIVING_ERROR_PREFIX + "Failed adding '"
+                    + attributeLightMode.getAttributeCompleteName() + "' as source";
+            final String reason = GlobalConst.TANGO_COMM_EXCEPTION;
+            final String desc = "Failed while executing NumberSpectrum_RO.addSource() method...\nStringStringSpectrum_RO.java: Failed to get the attribute from the AttributeFactory";
+            throw new ArchivingException(message, reason, ErrSeverity.WARN, desc, "", e);
+        } /*
+           * end of first try/catch block, to retrieve the attribute from the
+           * AttributeFactory
+           */
+
+        logger.debug("STRING SPECTRUM [RO] attribute \"" + attribute.getNameSansDevice() + "\"...\t");
+
+        /*
+         * If an attribute (name + device server) is already in the map, it
+         * means it has already been registered for the Tango Archive events. So
+         * it does not have to be added to the archive events once again, nor to
+         * the attributePolledList: we can return. The same goes for an
+         * attribute already present in the attributePolledList `attributeList'.
+         */
+        /*
+         * if(HdbArchiver.useEvents.equalsIgnoreCase("no")) {
+         * System.out.print("[\033[1;35mEVENTS DISABLED\033[0m].");
+         * registerForScalarListener(attributeLightMode); } else {
+         */
+        try {
+            synchronized (evtAdaptHMap) {
+                evtAdapt = evtAdaptHMap.get(attribute.getDevice());
+                if (evtAdapt == null) {
+                    evtAdapt = new TangoEventsAdapter(attribute.getDevice());
+                    evtAdaptHMap.put(attribute.getDevice(), evtAdapt);
+                } else {
+                    logger.debug("\nThe adapter for the attribute is already configured");
+                }
+            }
+            final String[] filter = new String[0];
+
+            /*
+             * Try to register for the archive events: evtAdapt is the new
+             * adapter or the one already found in the map.
+             */
+            evtAdapt.addTangoArchiveListener(this, attribute.getNameSansDevice(), filter);
+            archiveListenersCounter++;
+            logger.debug("[\033[1;32mEVENTS\033[0m].");
+        } catch (final DevFailed e) {
+            /*
+             * If archive events are not enabled for the attribute, we will poll
+             * it
+             */
+            for (final DevError error : e.errors) {
+                // // System.out.println("error registering: " +
+                // e.errors[err].desc);
+                if (error.desc.contains("Already connected to event")) {
+                    logger.debug("Already connected to events for attribute");
+                    return;
+                }
+            }
+            /* Register for polling */
+            addSourceForPolling(attributeLightMode);
+            /* unlock the attributeList */
+        }
+        // } /* function finishes */
+    }
+
+    private void removeSourceForEvents(final String attributeName) {
+        logger.debug("NumberSpectrum_RO.removeSource");
+        logger.debug("spectrum [RO]: removing source for \"" + attributeName + "\"...\t");
+        final TangoEventsAdapter adapter;
+        final IStringSpectrum attribute;
+        /*
+         * If useEvents is enabled, we should remove the eventListener, if not
+         * we can skip this piece of code
+         */
+        // if (HdbArchiver.useEvents.equalsIgnoreCase("yes"))
+        // {
+        try {
+            synchronized (evtAdaptHMap) {
+                attribute = (IStringSpectrum) AttributeFactory.getInstance().getAttribute(attributeName);
+                /*
+                 * Retrieve in the hash table the event adapter associated to
+                 * the attributeName.
+                 */
+                if (attribute == null) {
+                    logger.debug("\033[1;31mThe attribute " + attributeName + " is null\033[0m");
+                }
+                adapter = evtAdaptHMap.get(attribute.getDevice());
+
+                if (adapter != null) {
+                    adapter.removeTangoArchiveListener(this, attribute.getNameSansDevice());
+                    archiveListenersCounter--;
+                    logger.debug("[\033[1;32mEVENTS\033[0m].");
+                    logger.debug(" (adapter: " + adapter.device_name() + ")");
+                    /* Should be ok now to return */
+                    return;
+                }
+            } /* unlock event adapters map */
+        } catch (final ConnectionException e) /* getAttribute() failed */ {
+            logger.error("",e);
+        } catch (final DevFailed f) {
+            logger.error( DevFailedUtils.toString(f));
+        }
+        // }
+    }
+
+    /**
+     * @author giacomo S. elettra This is called when a Tango archive event is
+     * sent from the server (the attribute has changed)
+     * @since events
+     */
+    @Override
+    public void archive(final TangoArchiveEvent event) {
+        final int tryNumber = DEFAULT_TRY_NUMBER;
+        DeviceAttribute attrib = null;
+        TangoArchive arch;
+        DeviceProxy proxy;
+        final SpectrumEvent_RO spectrumEventRo = new SpectrumEvent_RO();
+
+        try {
+            attrib = event.getValue();
+        } catch (final DevFailed f) {
+            logger.error(DevFailedUtils.toString(f));
+            return;
+        } catch (final Exception e) /* Shouldn't be reached */ {
+            logger.error("StringSpectrum_RO.java.archive.getValue() failed, caught generic Exception, code failure", e);
+            return;
+        }
+        try {
+            /*
+             * To correctly archive the attribute, we have to know its complete
+             * name. To acquire this information, we must o back to the
+             * TangoArchive object (which contains the DeviceProxy).
+             */
+            arch = (TangoArchive) event.getSource();
+            proxy = arch.getEventSupplier(); /*
+                                              * The device that supplied the
+                                              * event
+                                              */
+            if (arch == null || proxy == null || attrib == null) {
+                logger.debug("\033[1;31mBooleanStringSpectrum_RO.java: event.getValue() or event.getSource() or event.getSource().getEventSupplier()) returned null!\033[0m");
+                return;
+            }
+            int dim = attrib.getDimX(); // ??
+            final String[] svalue = attrib.extractStringArray();
+            dim = svalue.length;
+            spectrumEventRo.setValue(svalue, null);
+            logger.debug(proxy.name() + ": " + attrib.getName() + "{string spectrum, RO} [\033[1;32mEVENT\033[0m]"
+                    + " (dim: " + attrib.getDimX());
+            spectrumEventRo.setAttributeCompleteName(proxy.name() + "/" + attrib.getName());
+            spectrumEventRo.setTimeStamp(attrib.getTime());
+            spectrumEventRo.setDataType(attrib.getType());
+            spectrumEventRo.setWritable(AttrWriteType._READ);
+            spectrumEventRo.setDimX(dim);
+            /* Process the just built spectrum event */
+            processEventSpectrum(spectrumEventRo, tryNumber);
+
+        } catch (final DevFailed devFailed) {
+            logger.error(DevFailedUtils.toString(devFailed));
+
+            final Object value = null;
+            spectrumEventRo.setValue(value, null);
+            processEventSpectrum(spectrumEventRo, tryNumber);
+        } catch (final Exception e) {
+            logger.error("Boolean.StringSpectrum_RO.java: archive : " + GlobalConst.ARCHIVING_ERROR_PREFIX + "\r\n\t"
+                    + "Problem while reading " + spectrumEventRo.getAttributeCompleteName() + " values...", e);
+            final Object value = null;
+            spectrumEventRo.setValue(value, null);
+            processEventSpectrum(spectrumEventRo, tryNumber);
+        }
+
+    }
+
+    // --------------------------------------------------------------------------//
+    // ELETTRA : Archiving Events
+    // --------------------------------------------------------------------------//
+    @Override
+    protected void treatErrorEventAfterLogging(ErrorEvent errorEvent) {
+        final String[] value = null;
+        final SpectrumEvent_RO spectrumEventRo = new SpectrumEvent_RO();
+        spectrumEventRo.setAttributeCompleteName(errorEvent.getSource().toString());
+        spectrumEventRo.setTimeStamp(errorEvent.getTimeStamp());
+        spectrumEventRo.setValue(value, null);
+        processEventSpectrum(spectrumEventRo, DEFAULT_TRY_NUMBER);
+    }
+
+    @Override
+    public void stringSpectrumChange(final StringSpectrumEvent event) {
+        final int tryNumber = DEFAULT_TRY_NUMBER;
+        final String[] value = event.getValue();
+        final SpectrumEvent_RO spectrumEvent_ro = new SpectrumEvent_RO();
+        String attributeName = ((IStringSpectrum) event.getSource()).getName();
+        removeErrorMessage(attributeName);
+        spectrumEvent_ro.setAttributeCompleteName(attributeName);
+        spectrumEvent_ro.setDimX(((IStringSpectrum) event.getSource()).getXDimension());
+        spectrumEvent_ro.setTimeStamp(event.getTimeStamp());
+        spectrumEvent_ro.setValue(value, null);
+        processEventSpectrum(spectrumEvent_ro, tryNumber);
+    }
+
+    @Override
+    public void stateChange(final AttributeStateEvent event) {
+    }
+
+    public void processEventSpectrum(final SpectrumEvent_RO event, int try_number) {
+        if (isDataArchivableTimestampWise(event)) {
+            final String attributeName = event.getAttributeCompleteName();
+
+            try {
+                boolean doArchive = false;
+                if (isFirstValueList.get(attributeName.toLowerCase())) {
+                    doArchive = true;
+                    isFirstValueList.put(attributeName.toLowerCase(), false);
+                    logger.debug(attributeName + " first value, forcing archiving");
+                } else {
+
+                    final ModesCounters mc = getModeCounter(attributeName);
+                    if (mc == null) {
+                        logger.debug(attributeName + " Attribute Counters unknown");
+                    } else {
+                        doArchive = doArchiveEvent(mc, event.getDataType(), event.getValueAsString(),
+                                getLastValue(event), attributeName);
+                    }
+                }
+                if (doArchive) {
+                    super.dbProxy.store(event);
+                }
+                setLastValue(event, event.getValueAsString());
+            } catch (final ArchivingException e) {
+                registerErrorMessage(attributeName, e.getMessage());
+                final String message = "Problem (ArchivingException) storing StringSpectrum_RO value";
+                logger.error(message, e);
+
+                try_number--;
+                if (try_number > 0) {
+                    processEventSpectrum(event, try_number);
+                }
+            }
+        }
+    }
+
+}
diff --git a/src/main/java/HdbArchiver/Collector/spectrum/StringSpectrum_RW.java b/hdbarchiver/src/main/java/HdbArchiver/Collector/spectrum/StringSpectrum_RW.java
similarity index 92%
rename from src/main/java/HdbArchiver/Collector/spectrum/StringSpectrum_RW.java
rename to hdbarchiver/src/main/java/HdbArchiver/Collector/spectrum/StringSpectrum_RW.java
index 61a9c87e9628e5a9a55032b2898d48a4b191c168..64a0c6cbc3f964ff4b9b3675e603f45675ccb336 100644
--- a/src/main/java/HdbArchiver/Collector/spectrum/StringSpectrum_RW.java
+++ b/hdbarchiver/src/main/java/HdbArchiver/Collector/spectrum/StringSpectrum_RW.java
@@ -1,414 +1,396 @@
-// +======================================================================
-// $Source$
-//
-// Project:      Tango Archiving Service
-//
-// Description:  Java source code for the class  StringSpectrum_RW.
-//						(Chinkumo Jean) - March 24, 2004
-//
-// $Author$
-//
-// $Revision$
-//
-// $Log$
-// Revision 1.13  2007/10/03 15:23:29  pierrejoseph
-// Minor changes
-//
-// Revision 1.12  2007/09/28 14:49:22  pierrejoseph
-// Merged between Polling and Events code
-//
-//
-// copyleft :		Synchrotron SOLEIL
-//					L'Orme des Merisiers
-//					Saint-Aubin - BP 48
-//					91192 GIF-sur-YVETTE CEDEX
-//
-//-======================================================================
-package HdbArchiver.Collector.spectrum;
-
-import java.util.HashMap;
-import java.util.Map;
-
-import org.apache.commons.lang.ArrayUtils;
-import org.slf4j.Logger;
-import org.tango.utils.DevFailedUtils;
-
-import Common.Archiver.Collector.ModesCounters;
-import HdbArchiver.HdbArchiver;
-import HdbArchiver.Collector.HdbCollector;
-import HdbArchiver.Collector.HdbModeHandler;
-import fr.esrf.Tango.AttrWriteType;
-import fr.esrf.Tango.DevError;
-import fr.esrf.Tango.DevFailed;
-import fr.esrf.Tango.ErrSeverity;
-import fr.esrf.TangoApi.DeviceAttribute;
-import fr.esrf.TangoApi.DeviceProxy;
-import fr.esrf.TangoApi.events.ITangoArchiveListener;
-import fr.esrf.TangoApi.events.TangoArchive;
-import fr.esrf.TangoApi.events.TangoArchiveEvent;
-import fr.esrf.TangoApi.events.TangoEventsAdapter;
-import fr.esrf.TangoDs.Util;
-import fr.esrf.tangoatk.core.AttributeStateEvent;
-import fr.esrf.tangoatk.core.ConnectionException;
-import fr.esrf.tangoatk.core.Device;
-import fr.esrf.tangoatk.core.ErrorEvent;
-import fr.esrf.tangoatk.core.IStringSpectrum;
-import fr.esrf.tangoatk.core.IStringSpectrumListener;
-import fr.esrf.tangoatk.core.StringSpectrumEvent;
-import fr.esrf.tangoatk.core.attribute.AttributeFactory;
-import fr.soleil.archiving.common.api.exception.ArchivingException;
-import fr.soleil.archiving.common.api.tools.GlobalConst;
-import fr.soleil.archiving.hdbtdb.api.tools.AttributeLightMode;
-import fr.soleil.archiving.hdbtdb.api.tools.SpectrumEvent_RW;
-
-public class StringSpectrum_RW extends HdbCollector implements IStringSpectrumListener, ITangoArchiveListener {
-
-    private static final long serialVersionUID = 3102969755623779442L;
-
-    private final Map<Device, TangoEventsAdapter> evtAdaptHMap;
-
-    public StringSpectrum_RW(final HdbModeHandler hdbModeHandler, final Logger logger) {
-        super(hdbModeHandler, logger);
-        evtAdaptHMap = new HashMap<Device, TangoEventsAdapter>();
-    }
-
-    @Override
-    public synchronized void removeSource(final String attributeName) throws ArchivingException {
-        logger.debug("StringSpectrum_RW.removeSource");
-
-        if (HdbArchiver.isUseEvents) {
-            removeSourceForEvents(attributeName);
-        }
-        try {
-            /*
-             * while ( ( IStringSpectrum ) attributeList.get(attributeName) !=
-             * null ) {
-             */
-            stopCollecting();
-            final IStringSpectrum attribute = (IStringSpectrum) attributeList.get(attributeName);
-            if (attribute != null) {
-                attribute.removeListener(this);
-                attribute.removeErrorListener(this);
-                removeAttribute(attributeName);
-                removeTimestamps(attributeName);
-                attributeList.remove(attributeName);
-                removeErrorMessage(attributeName);
-                Util.out4.println("\t The attribute named " + attributeName + " was fired from the Collector list...");
-            }
-        } catch (final Exception e) {
-            final String message = GlobalConst.ARCHIVING_ERROR_PREFIX + "Failed removing '" + attributeName
-                    + "' from sources";
-            final String reason = GlobalConst.TANGO_COMM_EXCEPTION;
-            final String desc = "Failed while executing Spectrum_RO.removeSource() method...";
-            throw new ArchivingException(message, reason, ErrSeverity.WARN, desc, "", e);
-        } finally {
-            startCollecting();
-        }
-    }
-
-    @Override
-    protected void doAddSourceForPolling(final AttributeLightMode attributeLightMode) throws ArchivingException {
-        final String attrName = attributeLightMode.getAttributeCompleteName();
-        try {
-            stopCollecting();
-            final IStringSpectrum attribute = (IStringSpectrum) attributeList.add(attrName);
-            attribute.addListener(this);
-            attribute.addErrorListener(this);
-            addAttribute(attrName);
-            logger.debug("\t The attribute named " + attrName + " was hired to the Collector list...");
-        } catch (final ConnectionException e) {
-            registerErrorMessage(attrName, e);
-            final String message = GlobalConst.ARCHIVING_ERROR_PREFIX + "Failed adding '" + attrName + "' as source";
-            final String reason = GlobalConst.TANGO_COMM_EXCEPTION;
-            final String desc = "Failed while executing Spectrum_RO.addSource() method...";
-            throw new ArchivingException(message, reason, ErrSeverity.WARN, desc, "", e);
-        } finally {
-            startCollecting();
-        }
-    }
-
-    // --------------------------------------------------------------------------//
-    // ELETTRA : Archiving Events
-    // --------------------------------------------------------------------------//
-    @Override
-    protected void addSourceForEvents(final AttributeLightMode attributeLightMode) throws ArchivingException {
-        /* Adapter for the Tango archive events */
-        TangoEventsAdapter evtAdapt = null;
-        IStringSpectrum attribute = null;
-
-        try {
-            /*
-             * Get the attribute from the AttributeFactory, so that it is not
-             * added to the attribute polled list. Remember that `attributeList'
-             * is an AttributePolledList().
-             */
-            attribute = (IStringSpectrum) AttributeFactory.getInstance().getAttribute(
-                    attributeLightMode.getAttributeCompleteName());
-            if (attribute == null) {
-                logger.debug("\033[1;31mStringSpectrum_RW.java: the attribute \""
-                        + attributeLightMode.getAttributeCompleteName()
-                        + " is null (StringStringSpectrum_RW.java): not adding it!");
-                return;
-            }
-        } catch (final DevFailed e) {
-            logger.error(DevFailedUtils.toString(e));
-            final String message = GlobalConst.ARCHIVING_ERROR_PREFIX + "Failed adding '"
-                    + attributeLightMode.getAttributeCompleteName() + "' as source";
-            final String reason = "DevFailed exception while calling AttributeFactory.getInstance().getAttribute();";
-            final String desc = "Failed while executing Spectrum_RO.addSource() method...\nStringSpectrum_RW.java: Failed to get the attribute from the AttributeFactory";
-            throw new ArchivingException(message, reason, ErrSeverity.WARN, desc, "", e);
-        } catch (final ConnectionException e) {
-            final String message = GlobalConst.ARCHIVING_ERROR_PREFIX + "Failed adding '"
-                    + attributeLightMode.getAttributeCompleteName() + "' as source";
-            final String reason = GlobalConst.TANGO_COMM_EXCEPTION;
-            final String desc = "Failed while executing NumberSpectrum_RO.addSource() method...\nStringStringSpectrum_RW.java: Failed to get the attribute from the AttributeFactory";
-            throw new ArchivingException(message, reason, ErrSeverity.WARN, desc, "", e);
-        } /*
-           * end of first try/catch block, to retrieve the attribute from the
-           * AttributeFactory
-           */
-
-        logger.debug("STRING SPECTRUM [RO] attribute \"" + attribute.getNameSansDevice() + "\"...\t");
-
-        /*
-         * If an attribute (name + device server) is already in the map, it
-         * means it has already been registered for the Tango Archive events. So
-         * it does not have to be added to the archive events once again, nor to
-         * the attributePolledList: we can return. The same goes for an
-         * attribute already present in the attributePolledList `attributeList'.
-         */
-        /*
-         * if(HdbArchiver.useEvents.equalsIgnoreCase("no")) {
-         * System.out.print("[\033[1;35mEVENTS DISABLED\033[0m].");
-         * registerForScalarListener(attributeLightMode); } else {
-         */
-        try {
-            synchronized (evtAdaptHMap) {
-                evtAdapt = evtAdaptHMap.get(attribute.getDevice());
-                if (evtAdapt == null) {
-                    evtAdapt = new TangoEventsAdapter(attribute.getDevice());
-                    evtAdaptHMap.put(attribute.getDevice(), evtAdapt);
-                } else {
-                    System.out.println("\nThe adapter for the attribute is already configured");
-                }
-            }
-            final String[] filter = new String[0];
-
-            /*
-             * Try to register for the archive events: evtAdapt is the new
-             * adapter or the one already found in the map.
-             */
-            evtAdapt.addTangoArchiveListener(this, attribute.getNameSansDevice(), filter);
-            archiveListenersCounter++;
-            logger.debug("[\033[1;32mEVENTS\033[0m].");
-        } catch (final DevFailed e) {
-            /*
-             * If archive events are not enabled for the attribute, we will poll
-             * it
-             */
-            for (final DevError error : e.errors) {
-                // // System.out.println("error registering: " +
-                // e.errors[err].desc);
-                if (error.desc.contains("Already connected to event")) {
-                    logger.debug("Already connected to events for attribute");
-                    return;
-                }
-            }
-            /* Register for polling */
-            addSourceForPolling(attributeLightMode);
-            /* unlock the attributeList */
-        }
-        // } /* function finishes */
-    }
-
-    private void removeSourceForEvents(final String attributeName) {
-        logger.debug("NumberSpectrum_RO.removeSource");
-        logger.debug("spectrum [RO]: removing source for \"" + attributeName + "\"...\t");
-        TangoEventsAdapter adapter;
-        IStringSpectrum attribute;
-        /*
-         * If useEvents is enabled, we should remove the eventListener, if not
-         * we can skip this piece of code
-         */
-        // if (HdbArchiver.useEvents.equalsIgnoreCase("yes"))
-        // {
-        try {
-            synchronized (evtAdaptHMap) {
-                attribute = (IStringSpectrum) AttributeFactory.getInstance().getAttribute(attributeName);
-                /*
-                 * Retrieve in the hash table the event adapter associated to
-                 * the attributeName.
-                 */
-                if (attribute == null) {
-                    logger.debug("\033[1;31mThe attribute " + attributeName + " is null\033[0m");
-                }
-                adapter = evtAdaptHMap.get(attribute.getDevice());
-
-                if (adapter != null) {
-                    adapter.removeTangoArchiveListener(this, attribute.getNameSansDevice());
-                    archiveListenersCounter--;
-                    logger.debug("[\033[1;32mEVENTS\033[0m].");
-                    logger.debug(" (adapter: " + adapter.device_name() + ")");
-                    /* Should be ok now to return */
-                    return;
-                }
-            } /* unlock event adapters map */
-        } catch (final ConnectionException e) /* getAttribute() failed */
-        {
-            Util.out2
-                    .println("\033[1;31mConnection exception while retrieving the attribute from the AttributeFactory!\033[0m");
-        } catch (final DevFailed f) {
-            Util.out2.println("Error removing tangoArchiveListener");
-            for (final DevError error : f.errors) {
-                Util.out2.println("error: " + error.desc);
-            }
-        }
-        // }
-
-    }
-
-    /**
-     * @since events
-     * @author giacomo S. elettra This is called when a Tango archive event is
-     *         sent from the server (the attribute has changed)
-     */
-    @Override
-    public void archive(final TangoArchiveEvent event) {
-        final int tryNumber = DEFAULT_TRY_NUMBER;
-        DeviceAttribute attrib = null;
-        TangoArchive arch;
-        DeviceProxy proxy;
-        final SpectrumEvent_RW spectrumEventRw = new SpectrumEvent_RW();
-
-        try {
-            attrib = event.getValue();
-        } catch (final DevFailed f) {
-            logger.error(DevFailedUtils.toString(f));
-            return;
-        } catch (final Exception e) /* Shouldn't be reached */
-        {
-            logger.error("StringSpectrum_RW.java.archive.getValue() failed, caught generic Exception, code failure", e);
-            return;
-        }
-        try {
-            /*
-             * To correctly archive the attribute, we have to know its complete
-             * name. To acquire this information, we must o back to the
-             * TangoArchive object (which contains the DeviceProxy).
-             */
-            arch = (TangoArchive) event.getSource();
-            proxy = arch.getEventSupplier(); /*
-                                              * The device that supplied the
-                                              * event
-                                              */
-            if (arch == null || proxy == null || attrib == null) {
-                System.out
-                        .println("\033[1;31mBooleanStringSpectrum_RW.java: event.getValue() or event.getSource() or event.getSource().getEventSupplier()) returned null!\033[0m");
-                return;
-            }
-            int dim = attrib.getDimX(); // ??
-            final String[] svalue = attrib.extractStringArray();
-            dim = svalue.length;
-            spectrumEventRw.setValue(svalue, null);
-            logger.debug(proxy.name() + ": " + attrib.getName() + "{string spectrum, RO} [\033[1;32mEVENT\033[0m]"
-                    + " (dim: " + attrib.getDimX());
-            spectrumEventRw.setAttributeCompleteName(proxy.name() + "/" + attrib.getName());
-            spectrumEventRw.setTimeStamp(attrib.getTime());
-            spectrumEventRw.setDataType(attrib.getType());
-            spectrumEventRw.setWritable(AttrWriteType._READ_WRITE);
-            spectrumEventRw.setDimX(dim);
-            /* Process the just built spectrum event */
-            processEventSpectrum(spectrumEventRw, tryNumber);
-
-        } catch (final DevFailed devFailed) {
-            logger.error(DevFailedUtils.toString(devFailed));
-            // printException(GlobalConst.DATA_TYPE_EXCEPTION ,
-            // AttrDataFormat._SCALAR ,
-            // spectrumEvent_rw.getAttribute_complete_name() , devFailed);
-            spectrumEventRw.setValue(null, null);
-            processEventSpectrum(spectrumEventRw, tryNumber);
-        } catch (final Exception e) {
-            logger.error("Boolean.StringSpectrum_RW.java: archive : " + GlobalConst.ARCHIVING_ERROR_PREFIX + "\r\n\t"
-                    + "Problem while reading " + spectrumEventRw.getAttributeCompleteName() + " values...", e);
-            spectrumEventRw.setValue(null, null);
-            processEventSpectrum(spectrumEventRw, tryNumber);
-        }
-
-    }
-
-    // --------------------------------------------------------------------------//
-    // ELETTRA : Archiving Events
-    // --------------------------------------------------------------------------//
-    @Override
-    protected void treatErrorEventAfterLogging(ErrorEvent errorEvent) {
-        final String[] value = null;
-        final SpectrumEvent_RW spectrumEventRw = new SpectrumEvent_RW();
-        spectrumEventRw.setAttributeCompleteName(errorEvent.getSource().toString());
-        spectrumEventRw.setTimeStamp(errorEvent.getTimeStamp());
-        spectrumEventRw.setValue(value, null);
-        processEventSpectrum(spectrumEventRw, DEFAULT_TRY_NUMBER);
-    }
-
-    @Override
-    public void stringSpectrumChange(final StringSpectrumEvent event) {
-        final int tryNumber = DEFAULT_TRY_NUMBER;
-        final IStringSpectrum eventSrc = (IStringSpectrum) event.getSource();
-        final String[] valueR = eventSrc.getStringSpectrumValue();
-        final String[] valueW = eventSrc.getStringSpectrumSetPoint();
-        // System.out.println (
-        // "CLA/Spectrum_RW/spectrumChange/value.length/"+value.length+"/" );
-        final SpectrumEvent_RW spectrumEvent_rw = new SpectrumEvent_RW();
-        // spectrumEvent_rw.getValue_AsString()
-
-        String attributeName = ((IStringSpectrum) event.getSource()).getName();
-        removeErrorMessage(attributeName);
-        spectrumEvent_rw.setAttributeCompleteName(attributeName);
-        spectrumEvent_rw.setDimX(((IStringSpectrum) event.getSource()).getXDimension());
-        spectrumEvent_rw.setDimX(valueR.length);
-        spectrumEvent_rw.setTimeStamp(event.getTimeStamp());
-        spectrumEvent_rw.setValue(ArrayUtils.addAll(valueR, valueW), null);
-        processEventSpectrum(spectrumEvent_rw, tryNumber);
-    }
-
-    @Override
-    public void stateChange(final AttributeStateEvent event) {
-    }
-
-    public void processEventSpectrum(final SpectrumEvent_RW event, int try_number) {
-        if (isDataArchivableTimestampWise(event)) {
-            final String attributeName = event.getAttributeCompleteName();
-            try {
-                boolean doArchive = false;
-                if (isFirstValueList.get(attributeName.toLowerCase())) {
-                    doArchive = true;
-                    isFirstValueList.put(attributeName.toLowerCase(), false);
-                    logger.debug(attributeName + " first value, forcing archiving");
-                } else {
-
-                    final ModesCounters mc = getModeCounter(attributeName);
-                    if (mc == null) {
-                        logger.debug(attributeName + " Attribute Counters unknown");
-                    } else {
-                        doArchive = doArchiveEvent(mc, event.getDataType(), event.getValueAsString(),
-                                getLastValue(event), attributeName);
-                    }
-                }
-                if (doArchive) {
-                    super.dbProxy.store(event);
-                }
-                setLastValue(event, event.getValueAsString());
-            } catch (final ArchivingException e) {
-                registerErrorMessage(attributeName, e.getMessage());
-                final String message = "Problem (ArchivingException) storing StringSpectrum_RW value";
-                logger.error(message, e);
-                Util.out4.println("StringSpectrumEvent_RW.processEventSpectrum/ArchivingException");
-                try_number--;
-                if (try_number > 0) {
-                    Util.out2
-                            .println("StringSpectrumEvent_RW.processEventSpectrum : retry " + try_number + "failed...");
-                    processEventSpectrum(event, try_number);
-                }
-            }
-        }
-    }
-}
+// +======================================================================
+// $Source$
+//
+// Project:      Tango Archiving Service
+//
+// Description:  Java source code for the class  StringSpectrum_RW.
+//						(Chinkumo Jean) - March 24, 2004
+//
+// $Author$
+//
+// $Revision$
+//
+// $Log$
+// Revision 1.13  2007/10/03 15:23:29  pierrejoseph
+// Minor changes
+//
+// Revision 1.12  2007/09/28 14:49:22  pierrejoseph
+// Merged between Polling and Events code
+//
+//
+// copyleft :		Synchrotron SOLEIL
+//					L'Orme des Merisiers
+//					Saint-Aubin - BP 48
+//					91192 GIF-sur-YVETTE CEDEX
+//
+//-======================================================================
+package HdbArchiver.Collector.spectrum;
+
+import Common.Archiver.Collector.ModesCounters;
+import HdbArchiver.Collector.HdbCollector;
+import HdbArchiver.Collector.HdbModeHandler;
+import fr.esrf.Tango.AttrWriteType;
+import fr.esrf.Tango.DevError;
+import fr.esrf.Tango.DevFailed;
+import fr.esrf.Tango.ErrSeverity;
+import fr.esrf.TangoApi.DeviceAttribute;
+import fr.esrf.TangoApi.DeviceProxy;
+import fr.esrf.TangoApi.events.ITangoArchiveListener;
+import fr.esrf.TangoApi.events.TangoArchive;
+import fr.esrf.TangoApi.events.TangoArchiveEvent;
+import fr.esrf.TangoApi.events.TangoEventsAdapter;
+import fr.esrf.TangoDs.Util;
+import fr.esrf.tangoatk.core.*;
+import fr.esrf.tangoatk.core.attribute.AttributeFactory;
+import fr.soleil.archiving.common.api.exception.ArchivingException;
+import fr.soleil.archiving.common.api.tools.GlobalConst;
+import fr.soleil.archiving.hdbtdb.api.tools.AttributeLightMode;
+import fr.soleil.archiving.hdbtdb.api.tools.SpectrumEvent_RW;
+import org.apache.commons.lang.ArrayUtils;
+import org.slf4j.Logger;
+import org.tango.utils.DevFailedUtils;
+
+import java.util.HashMap;
+import java.util.Map;
+
+public class StringSpectrum_RW extends HdbCollector implements IStringSpectrumListener, ITangoArchiveListener {
+
+    private static final long serialVersionUID = 3102969755623779442L;
+
+    private final Map<Device, TangoEventsAdapter> evtAdaptHMap;
+
+    public StringSpectrum_RW(final HdbModeHandler hdbModeHandler, final boolean useEvents, final Logger logger) {
+        super(hdbModeHandler, useEvents, logger);
+        evtAdaptHMap = new HashMap<Device, TangoEventsAdapter>();
+    }
+
+    @Override
+    public synchronized void removeSource(final String attributeName) throws ArchivingException {
+        logger.debug("StringSpectrum_RW.removeSource");
+
+        if (useEvents) {
+            removeSourceForEvents(attributeName);
+        }
+        try {
+            /*
+             * while ( ( IStringSpectrum ) attributeList.get(attributeName) !=
+             * null ) {
+             */
+            stopCollecting();
+            final IStringSpectrum attribute = (IStringSpectrum) attributeList.get(attributeName);
+            if (attribute != null) {
+                attribute.removeListener(this);
+                attribute.removeErrorListener(this);
+                removeAttribute(attributeName);
+                removeTimestamps(attributeName);
+                attributeList.remove(attributeName);
+                removeErrorMessage(attributeName);
+            }
+        } catch (final Exception e) {
+            final String message = GlobalConst.ARCHIVING_ERROR_PREFIX + "Failed removing '" + attributeName
+                    + "' from sources";
+            final String reason = GlobalConst.TANGO_COMM_EXCEPTION;
+            final String desc = "Failed while executing Spectrum_RO.removeSource() method...";
+            throw new ArchivingException(message, reason, ErrSeverity.WARN, desc, "", e);
+        } finally {
+            startCollecting();
+        }
+    }
+
+    @Override
+    protected void doAddSourceForPolling(final AttributeLightMode attributeLightMode) throws ArchivingException {
+        final String attrName = attributeLightMode.getAttributeCompleteName();
+        try {
+            stopCollecting();
+            final IStringSpectrum attribute = (IStringSpectrum) attributeList.add(attrName);
+            attribute.addListener(this);
+            attribute.addErrorListener(this);
+            addAttribute(attrName);
+            logger.debug("\t The attribute named " + attrName + " was hired to the Collector list...");
+        } catch (final ConnectionException e) {
+            registerErrorMessage(attrName, e);
+            final String message = GlobalConst.ARCHIVING_ERROR_PREFIX + "Failed adding '" + attrName + "' as source";
+            final String reason = GlobalConst.TANGO_COMM_EXCEPTION;
+            final String desc = "Failed while executing Spectrum_RO.addSource() method...";
+            throw new ArchivingException(message, reason, ErrSeverity.WARN, desc, "", e);
+        } finally {
+            startCollecting();
+        }
+    }
+
+    // --------------------------------------------------------------------------//
+    // ELETTRA : Archiving Events
+    // --------------------------------------------------------------------------//
+    @Override
+    protected void addSourceForEvents(final AttributeLightMode attributeLightMode) throws ArchivingException {
+        /* Adapter for the Tango archive events */
+        TangoEventsAdapter evtAdapt = null;
+        IStringSpectrum attribute = null;
+
+        try {
+            /*
+             * Get the attribute from the AttributeFactory, so that it is not
+             * added to the attribute polled list. Remember that `attributeList'
+             * is an AttributePolledList().
+             */
+            attribute = (IStringSpectrum) AttributeFactory.getInstance().getAttribute(
+                    attributeLightMode.getAttributeCompleteName());
+            if (attribute == null) {
+                logger.debug("\033[1;31mStringSpectrum_RW.java: the attribute \""
+                        + attributeLightMode.getAttributeCompleteName()
+                        + " is null (StringStringSpectrum_RW.java): not adding it!");
+                return;
+            }
+        } catch (final DevFailed e) {
+            logger.error(DevFailedUtils.toString(e));
+            final String message = GlobalConst.ARCHIVING_ERROR_PREFIX + "Failed adding '"
+                    + attributeLightMode.getAttributeCompleteName() + "' as source";
+            final String reason = "DevFailed exception while calling AttributeFactory.getInstance().getAttribute();";
+            final String desc = "Failed while executing Spectrum_RO.addSource() method...\nStringSpectrum_RW.java: Failed to get the attribute from the AttributeFactory";
+            throw new ArchivingException(message, reason, ErrSeverity.WARN, desc, "", e);
+        } catch (final ConnectionException e) {
+            final String message = GlobalConst.ARCHIVING_ERROR_PREFIX + "Failed adding '"
+                    + attributeLightMode.getAttributeCompleteName() + "' as source";
+            final String reason = GlobalConst.TANGO_COMM_EXCEPTION;
+            final String desc = "Failed while executing NumberSpectrum_RO.addSource() method...\nStringStringSpectrum_RW.java: Failed to get the attribute from the AttributeFactory";
+            throw new ArchivingException(message, reason, ErrSeverity.WARN, desc, "", e);
+        } /*
+           * end of first try/catch block, to retrieve the attribute from the
+           * AttributeFactory
+           */
+
+        logger.debug("STRING SPECTRUM [RO] attribute \"" + attribute.getNameSansDevice() + "\"...\t");
+
+        /*
+         * If an attribute (name + device server) is already in the map, it
+         * means it has already been registered for the Tango Archive events. So
+         * it does not have to be added to the archive events once again, nor to
+         * the attributePolledList: we can return. The same goes for an
+         * attribute already present in the attributePolledList `attributeList'.
+         */
+        /*
+         * if(HdbArchiver.useEvents.equalsIgnoreCase("no")) {
+         * System.out.print("[\033[1;35mEVENTS DISABLED\033[0m].");
+         * registerForScalarListener(attributeLightMode); } else {
+         */
+        try {
+            synchronized (evtAdaptHMap) {
+                evtAdapt = evtAdaptHMap.get(attribute.getDevice());
+                if (evtAdapt == null) {
+                    evtAdapt = new TangoEventsAdapter(attribute.getDevice());
+                    evtAdaptHMap.put(attribute.getDevice(), evtAdapt);
+                } else {
+                    System.out.println("\nThe adapter for the attribute is already configured");
+                }
+            }
+            final String[] filter = new String[0];
+
+            /*
+             * Try to register for the archive events: evtAdapt is the new
+             * adapter or the one already found in the map.
+             */
+            evtAdapt.addTangoArchiveListener(this, attribute.getNameSansDevice(), filter);
+            archiveListenersCounter++;
+            logger.debug("[\033[1;32mEVENTS\033[0m].");
+        } catch (final DevFailed e) {
+            /*
+             * If archive events are not enabled for the attribute, we will poll
+             * it
+             */
+            for (final DevError error : e.errors) {
+                // // System.out.println("error registering: " +
+                // e.errors[err].desc);
+                if (error.desc.contains("Already connected to event")) {
+                    logger.debug("Already connected to events for attribute");
+                    return;
+                }
+            }
+            /* Register for polling */
+            addSourceForPolling(attributeLightMode);
+            /* unlock the attributeList */
+        }
+        // } /* function finishes */
+    }
+
+    private void removeSourceForEvents(final String attributeName) {
+        logger.debug("NumberSpectrum_RO.removeSource");
+        logger.debug("spectrum [RO]: removing source for \"" + attributeName + "\"...\t");
+        TangoEventsAdapter adapter;
+        IStringSpectrum attribute;
+        /*
+         * If useEvents is enabled, we should remove the eventListener, if not
+         * we can skip this piece of code
+         */
+        // if (HdbArchiver.useEvents.equalsIgnoreCase("yes"))
+        // {
+        try {
+            synchronized (evtAdaptHMap) {
+                attribute = (IStringSpectrum) AttributeFactory.getInstance().getAttribute(attributeName);
+                /*
+                 * Retrieve in the hash table the event adapter associated to
+                 * the attributeName.
+                 */
+                if (attribute == null) {
+                    logger.debug("\033[1;31mThe attribute " + attributeName + " is null\033[0m");
+                }
+                adapter = evtAdaptHMap.get(attribute.getDevice());
+
+                if (adapter != null) {
+                    adapter.removeTangoArchiveListener(this, attribute.getNameSansDevice());
+                    archiveListenersCounter--;
+                    logger.debug("[\033[1;32mEVENTS\033[0m].");
+                    logger.debug(" (adapter: " + adapter.device_name() + ")");
+                    /* Should be ok now to return */
+                    return;
+                }
+            } /* unlock event adapters map */
+        } catch (final ConnectionException e) /* getAttribute() failed */ {
+            logger.error("",e);
+        } catch (final DevFailed f) {
+            logger.error(DevFailedUtils.toString(f));
+        }
+        // }
+
+    }
+
+    /**
+     * @author giacomo S. elettra This is called when a Tango archive event is
+     * sent from the server (the attribute has changed)
+     * @since events
+     */
+    @Override
+    public void archive(final TangoArchiveEvent event) {
+        final int tryNumber = DEFAULT_TRY_NUMBER;
+        DeviceAttribute attrib = null;
+        TangoArchive arch;
+        DeviceProxy proxy;
+        final SpectrumEvent_RW spectrumEventRw = new SpectrumEvent_RW();
+
+        try {
+            attrib = event.getValue();
+        } catch (final DevFailed f) {
+            logger.error(DevFailedUtils.toString(f));
+            return;
+        } catch (final Exception e) /* Shouldn't be reached */ {
+            logger.error("StringSpectrum_RW.java.archive.getValue() failed, caught generic Exception, code failure", e);
+            return;
+        }
+        try {
+            /*
+             * To correctly archive the attribute, we have to know its complete
+             * name. To acquire this information, we must o back to the
+             * TangoArchive object (which contains the DeviceProxy).
+             */
+            arch = (TangoArchive) event.getSource();
+            proxy = arch.getEventSupplier(); /*
+                                              * The device that supplied the
+                                              * event
+                                              */
+            if (arch == null || proxy == null || attrib == null) {
+                System.out
+                        .println("\033[1;31mBooleanStringSpectrum_RW.java: event.getValue() or event.getSource() or event.getSource().getEventSupplier()) returned null!\033[0m");
+                return;
+            }
+            int dim = attrib.getDimX(); // ??
+            final String[] svalue = attrib.extractStringArray();
+            dim = svalue.length;
+            spectrumEventRw.setValue(svalue, null);
+            logger.debug(proxy.name() + ": " + attrib.getName() + "{string spectrum, RO} [\033[1;32mEVENT\033[0m]"
+                    + " (dim: " + attrib.getDimX());
+            spectrumEventRw.setAttributeCompleteName(proxy.name() + "/" + attrib.getName());
+            spectrumEventRw.setTimeStamp(attrib.getTime());
+            spectrumEventRw.setDataType(attrib.getType());
+            spectrumEventRw.setWritable(AttrWriteType._READ_WRITE);
+            spectrumEventRw.setDimX(dim);
+            /* Process the just built spectrum event */
+            processEventSpectrum(spectrumEventRw, tryNumber);
+
+        } catch (final DevFailed devFailed) {
+            logger.error(DevFailedUtils.toString(devFailed));
+            // printException(GlobalConst.DATA_TYPE_EXCEPTION ,
+            // AttrDataFormat._SCALAR ,
+            // spectrumEvent_rw.getAttribute_complete_name() , devFailed);
+            spectrumEventRw.setValue(null, null);
+            processEventSpectrum(spectrumEventRw, tryNumber);
+        } catch (final Exception e) {
+            logger.error("Boolean.StringSpectrum_RW.java: archive : " + GlobalConst.ARCHIVING_ERROR_PREFIX + "\r\n\t"
+                    + "Problem while reading " + spectrumEventRw.getAttributeCompleteName() + " values...", e);
+            spectrumEventRw.setValue(null, null);
+            processEventSpectrum(spectrumEventRw, tryNumber);
+        }
+
+    }
+
+    // --------------------------------------------------------------------------//
+    // ELETTRA : Archiving Events
+    // --------------------------------------------------------------------------//
+    @Override
+    protected void treatErrorEventAfterLogging(ErrorEvent errorEvent) {
+        final String[] value = null;
+        final SpectrumEvent_RW spectrumEventRw = new SpectrumEvent_RW();
+        spectrumEventRw.setAttributeCompleteName(errorEvent.getSource().toString());
+        spectrumEventRw.setTimeStamp(errorEvent.getTimeStamp());
+        spectrumEventRw.setValue(value, null);
+        processEventSpectrum(spectrumEventRw, DEFAULT_TRY_NUMBER);
+    }
+
+    @Override
+    public void stringSpectrumChange(final StringSpectrumEvent event) {
+        final int tryNumber = DEFAULT_TRY_NUMBER;
+        final IStringSpectrum eventSrc = (IStringSpectrum) event.getSource();
+        final String[] valueR = eventSrc.getStringSpectrumValue();
+        final String[] valueW = eventSrc.getStringSpectrumSetPoint();
+        // System.out.println (
+        // "CLA/Spectrum_RW/spectrumChange/value.length/"+value.length+"/" );
+        final SpectrumEvent_RW spectrumEvent_rw = new SpectrumEvent_RW();
+        // spectrumEvent_rw.getValue_AsString()
+
+        String attributeName = ((IStringSpectrum) event.getSource()).getName();
+        removeErrorMessage(attributeName);
+        spectrumEvent_rw.setAttributeCompleteName(attributeName);
+        spectrumEvent_rw.setDimX(((IStringSpectrum) event.getSource()).getXDimension());
+        spectrumEvent_rw.setDimX(valueR.length);
+        spectrumEvent_rw.setTimeStamp(event.getTimeStamp());
+        spectrumEvent_rw.setValue(ArrayUtils.addAll(valueR, valueW), null);
+        processEventSpectrum(spectrumEvent_rw, tryNumber);
+    }
+
+    @Override
+    public void stateChange(final AttributeStateEvent event) {
+    }
+
+    public void processEventSpectrum(final SpectrumEvent_RW event, int try_number) {
+        if (isDataArchivableTimestampWise(event)) {
+            final String attributeName = event.getAttributeCompleteName();
+            try {
+                boolean doArchive = false;
+                if (isFirstValueList.get(attributeName.toLowerCase())) {
+                    doArchive = true;
+                    isFirstValueList.put(attributeName.toLowerCase(), false);
+                    logger.debug(attributeName + " first value, forcing archiving");
+                } else {
+
+                    final ModesCounters mc = getModeCounter(attributeName);
+                    if (mc == null) {
+                        logger.debug(attributeName + " Attribute Counters unknown");
+                    } else {
+                        doArchive = doArchiveEvent(mc, event.getDataType(), event.getValueAsString(),
+                                getLastValue(event), attributeName);
+                    }
+                }
+                if (doArchive) {
+                    super.dbProxy.store(event);
+                }
+                setLastValue(event, event.getValueAsString());
+            } catch (final ArchivingException e) {
+                registerErrorMessage(attributeName, e.getMessage());
+                final String message = "Problem (ArchivingException) storing StringSpectrum_RW value";
+                logger.error(message, e);
+                try_number--;
+                if (try_number > 0) {
+                    processEventSpectrum(event, try_number);
+                }
+            }
+        }
+    }
+}
diff --git a/src/main/java/HdbArchiver/GetErrorDomainsInternal.java b/hdbarchiver/src/main/java/HdbArchiver/GetErrorDomainsInternal.java
similarity index 97%
rename from src/main/java/HdbArchiver/GetErrorDomainsInternal.java
rename to hdbarchiver/src/main/java/HdbArchiver/GetErrorDomainsInternal.java
index 5648453c431f87afd14d2668291d96cb931af66c..f830386c2df1fedfc4c6019bf97cb3dee53b7281 100644
--- a/src/main/java/HdbArchiver/GetErrorDomainsInternal.java
+++ b/hdbarchiver/src/main/java/HdbArchiver/GetErrorDomainsInternal.java
@@ -1,123 +1,123 @@
-/**
- * @author $Author: ounsy $
- * @version $Revision: 1.1 $
- */
-package HdbArchiver;
-
-import org.omg.CORBA.Any;
-
-import fr.esrf.Tango.DevFailed;
-import fr.esrf.Tango.DevState;
-import fr.esrf.Tango.DispLevel;
-import fr.esrf.TangoDs.Command;
-import fr.esrf.TangoDs.DeviceImpl;
-import fr.esrf.TangoDs.Except;
-import fr.esrf.TangoDs.TangoConst;
-import fr.esrf.TangoDs.Util;
-import fr.soleil.archiving.hdbtdb.api.ConfigConst;
-
-/**
- * Class Description:
- * 
- */
-
-public class GetErrorDomainsInternal extends Command implements TangoConst {
-    // ===============================================================
-    /**
-     * Constructor for Command class GetErrorDomainsCurrentClass
-     * 
-     * @param name
-     *            command name
-     * @param in
-     *            argin type
-     * @param out
-     *            argout type
-     */
-    // ===============================================================
-    public GetErrorDomainsInternal(final String name, final int in, final int out) {
-        super(name, in, out);
-    }
-
-    // ===============================================================
-    /**
-     * Constructor for Command class GetErrorDomainsCurrentClass
-     * 
-     * @param name
-     *            command name
-     * @param in
-     *            argin type
-     * @param in_comments
-     *            argin description
-     * @param out
-     *            argout type
-     * @param out_comments
-     *            argout description
-     */
-    // ===============================================================
-    public GetErrorDomainsInternal(final String name, final int in, final int out, final String in_comments,
-            final String out_comments) {
-        super(name, in, out, in_comments, out_comments);
-    }
-
-    // ===============================================================
-    /**
-     * Constructor for Command class GetErrorDomainsCurrentClass
-     * 
-     * @param name
-     *            command name
-     * @param in
-     *            argin type
-     * @param in_comments
-     *            argin description
-     * @param out
-     *            argout type
-     * @param out_comments
-     *            argout description
-     * @param level
-     *            The command display type OPERATOR or EXPERT
-     */
-    // ===============================================================
-    public GetErrorDomainsInternal(final String name, final int in, final int out, final String in_comments,
-            final String out_comments, final DispLevel level) {
-        super(name, in, out, in_comments, out_comments, level);
-    }
-
-    // ===============================================================
-    /**
-     * return the result of the device's command.
-     */
-    // ===============================================================
-    @Override
-    public Any execute(final DeviceImpl device, final Any in_any) throws DevFailed {
-        Util.out2.println("GetErrorDomainsCurrentClass.execute(): arrived");
-
-        if (!(device instanceof HdbArchiver)) {
-            Except.throw_exception("DEVICE_ERROR", "Device parameter is not instance of HdbArchiver",
-                    ConfigConst.HDB_CLASS_DEVICE);
-        }
-
-        return insert(((HdbArchiver) device).get_error_domains_internal());
-    }
-
-    // ===============================================================
-    /**
-     * Check if it is allowed to execute the command.
-     */
-    // ===============================================================
-    @Override
-    public boolean is_allowed(final DeviceImpl device, final Any data_in) {
-        if (device.get_state() == DevState.OFF || device.get_state() == DevState.INIT) {
-            // End of Generated Code
-
-            // Re-Start of Generated Code
-            return false;
-        }
-        return true;
-    }
-}
-// -----------------------------------------------------------------------------
-/*
- * end of $Source:
- * /cvsroot/tango-cs/tango/jserver/archiving/HdbArchiver/GetErrorDomainsInternal
- * .java,v $
- */
+/**
+ * @author $Author: ounsy $
+ * @version $Revision: 1.1 $
+ */
+package HdbArchiver;
+
+import org.omg.CORBA.Any;
+
+import fr.esrf.Tango.DevFailed;
+import fr.esrf.Tango.DevState;
+import fr.esrf.Tango.DispLevel;
+import fr.esrf.TangoDs.Command;
+import fr.esrf.TangoDs.DeviceImpl;
+import fr.esrf.TangoDs.Except;
+import fr.esrf.TangoDs.TangoConst;
+import fr.esrf.TangoDs.Util;
+import fr.soleil.archiving.hdbtdb.api.ConfigConst;
+
+/**
+ * Class Description:
+ * 
+ */
+
+public class GetErrorDomainsInternal extends Command implements TangoConst {
+    // ===============================================================
+    /**
+     * Constructor for Command class GetErrorDomainsCurrentClass
+     * 
+     * @param name
+     *            command name
+     * @param in
+     *            argin type
+     * @param out
+     *            argout type
+     */
+    // ===============================================================
+    public GetErrorDomainsInternal(final String name, final int in, final int out) {
+        super(name, in, out);
+    }
+
+    // ===============================================================
+    /**
+     * Constructor for Command class GetErrorDomainsCurrentClass
+     * 
+     * @param name
+     *            command name
+     * @param in
+     *            argin type
+     * @param in_comments
+     *            argin description
+     * @param out
+     *            argout type
+     * @param out_comments
+     *            argout description
+     */
+    // ===============================================================
+    public GetErrorDomainsInternal(final String name, final int in, final int out, final String in_comments,
+            final String out_comments) {
+        super(name, in, out, in_comments, out_comments);
+    }
+
+    // ===============================================================
+    /**
+     * Constructor for Command class GetErrorDomainsCurrentClass
+     * 
+     * @param name
+     *            command name
+     * @param in
+     *            argin type
+     * @param in_comments
+     *            argin description
+     * @param out
+     *            argout type
+     * @param out_comments
+     *            argout description
+     * @param level
+     *            The command display type OPERATOR or EXPERT
+     */
+    // ===============================================================
+    public GetErrorDomainsInternal(final String name, final int in, final int out, final String in_comments,
+            final String out_comments, final DispLevel level) {
+        super(name, in, out, in_comments, out_comments, level);
+    }
+
+    // ===============================================================
+    /**
+     * return the result of the device's command.
+     */
+    // ===============================================================
+    @Override
+    public Any execute(final DeviceImpl device, final Any in_any) throws DevFailed {
+        Util.out2.println("GetErrorDomainsCurrentClass.execute(): arrived");
+
+        if (!(device instanceof HdbArchiver)) {
+            Except.throw_exception("DEVICE_ERROR", "Device parameter is not instance of HdbArchiver",
+                    ConfigConst.HDB_CLASS_DEVICE);
+        }
+
+        return insert(((HdbArchiver) device).get_error_domains_internal());
+    }
+
+    // ===============================================================
+    /**
+     * Check if it is allowed to execute the command.
+     */
+    // ===============================================================
+    @Override
+    public boolean is_allowed(final DeviceImpl device, final Any data_in) {
+        if (device.get_state() == DevState.OFF || device.get_state() == DevState.INIT) {
+            // End of Generated Code
+
+            // Re-Start of Generated Code
+            return false;
+        }
+        return true;
+    }
+}
+// -----------------------------------------------------------------------------
+/*
+ * end of $Source:
+ * /cvsroot/tango-cs/tango/jserver/archiving/HdbArchiver/GetErrorDomainsInternal
+ * .java,v $
+ */
diff --git a/src/main/java/HdbArchiver/GetErrorMessageForAttribute.java b/hdbarchiver/src/main/java/HdbArchiver/GetErrorMessageForAttribute.java
similarity index 100%
rename from src/main/java/HdbArchiver/GetErrorMessageForAttribute.java
rename to hdbarchiver/src/main/java/HdbArchiver/GetErrorMessageForAttribute.java
diff --git a/src/main/java/HdbArchiver/GetErrorsForAttributeInternal.java b/hdbarchiver/src/main/java/HdbArchiver/GetErrorsForAttributeInternal.java
similarity index 97%
rename from src/main/java/HdbArchiver/GetErrorsForAttributeInternal.java
rename to hdbarchiver/src/main/java/HdbArchiver/GetErrorsForAttributeInternal.java
index a8b1358062bea20f0a6cde6f76df9408e24180db..e5c8c834f37f5b3e9315eb5de716d13731076737 100644
--- a/src/main/java/HdbArchiver/GetErrorsForAttributeInternal.java
+++ b/hdbarchiver/src/main/java/HdbArchiver/GetErrorsForAttributeInternal.java
@@ -1,123 +1,123 @@
-/**
- * @author $Author: ounsy $
- * @version $Revision: 1.1 $
- */
-package HdbArchiver;
-
-import org.omg.CORBA.Any;
-
-import fr.esrf.Tango.DevFailed;
-import fr.esrf.Tango.DevState;
-import fr.esrf.Tango.DispLevel;
-import fr.esrf.TangoDs.Command;
-import fr.esrf.TangoDs.DeviceImpl;
-import fr.esrf.TangoDs.Except;
-import fr.esrf.TangoDs.TangoConst;
-import fr.esrf.TangoDs.Util;
-import fr.soleil.archiving.hdbtdb.api.ConfigConst;
-
-/**
- * Class Description:
- * 
- */
-
-public class GetErrorsForAttributeInternal extends Command implements TangoConst {
-    // ===============================================================
-    /**
-     * Constructor for Command class GetErrorsForAttributeCurrentClass
-     * 
-     * @param name
-     *            command name
-     * @param in
-     *            argin type
-     * @param out
-     *            argout type
-     */
-    // ===============================================================
-    public GetErrorsForAttributeInternal(final String name, final int in, final int out) {
-        super(name, in, out);
-    }
-
-    // ===============================================================
-    /**
-     * Constructor for Command class GetErrorsForAttributeCurrentClass
-     * 
-     * @param name
-     *            command name
-     * @param in
-     *            argin type
-     * @param in_comments
-     *            argin description
-     * @param out
-     *            argout type
-     * @param out_comments
-     *            argout description
-     */
-    // ===============================================================
-    public GetErrorsForAttributeInternal(final String name, final int in, final int out, final String in_comments,
-            final String out_comments) {
-        super(name, in, out, in_comments, out_comments);
-    }
-
-    // ===============================================================
-    /**
-     * Constructor for Command class GetErrorsForAttributeCurrentClass
-     * 
-     * @param name
-     *            command name
-     * @param in
-     *            argin type
-     * @param in_comments
-     *            argin description
-     * @param out
-     *            argout type
-     * @param out_comments
-     *            argout description
-     * @param level
-     *            The command display type OPERATOR or EXPERT
-     */
-    // ===============================================================
-    public GetErrorsForAttributeInternal(final String name, final int in, final int out, final String in_comments,
-            final String out_comments, final DispLevel level) {
-        super(name, in, out, in_comments, out_comments, level);
-    }
-
-    // ===============================================================
-    /**
-     * return the result of the device's command.
-     */
-    // ===============================================================
-    @Override
-    public Any execute(final DeviceImpl device, final Any in_any) throws DevFailed {
-        Util.out2.println("GetErrorsForAttributeCurrentClass.execute(): arrived");
-        final String argin = extract_DevString(in_any);
-
-        if (!(device instanceof HdbArchiver)) {
-            Except.throw_exception("DEVICE_ERROR", "Device parameter is not instance of HdbArchiver",
-                    ConfigConst.HDB_CLASS_DEVICE);
-        }
-
-        return insert(((HdbArchiver) device).get_errors_for_attribute_internal(argin));
-    }
-
-    // ===============================================================
-    /**
-     * Check if it is allowed to execute the command.
-     */
-    // ===============================================================
-    @Override
-    public boolean is_allowed(final DeviceImpl device, final Any data_in) {
-        if (device.get_state() == DevState.OFF || device.get_state() == DevState.INIT) {
-            // End of Generated Code
-
-            // Re-Start of Generated Code
-            return false;
-        }
-        return true;
-    }
-}
-// -----------------------------------------------------------------------------
-/*
- * end of $Source:/cvsroot/tango-cs/tango/jserver/archiving/HdbArchiver/
- * GetErrorsForAttributeInternal.java,v $
- */
+/**
+ * @author $Author: ounsy $
+ * @version $Revision: 1.1 $
+ */
+package HdbArchiver;
+
+import org.omg.CORBA.Any;
+
+import fr.esrf.Tango.DevFailed;
+import fr.esrf.Tango.DevState;
+import fr.esrf.Tango.DispLevel;
+import fr.esrf.TangoDs.Command;
+import fr.esrf.TangoDs.DeviceImpl;
+import fr.esrf.TangoDs.Except;
+import fr.esrf.TangoDs.TangoConst;
+import fr.esrf.TangoDs.Util;
+import fr.soleil.archiving.hdbtdb.api.ConfigConst;
+
+/**
+ * Class Description:
+ * 
+ */
+
+public class GetErrorsForAttributeInternal extends Command implements TangoConst {
+    // ===============================================================
+    /**
+     * Constructor for Command class GetErrorsForAttributeCurrentClass
+     * 
+     * @param name
+     *            command name
+     * @param in
+     *            argin type
+     * @param out
+     *            argout type
+     */
+    // ===============================================================
+    public GetErrorsForAttributeInternal(final String name, final int in, final int out) {
+        super(name, in, out);
+    }
+
+    // ===============================================================
+    /**
+     * Constructor for Command class GetErrorsForAttributeCurrentClass
+     * 
+     * @param name
+     *            command name
+     * @param in
+     *            argin type
+     * @param in_comments
+     *            argin description
+     * @param out
+     *            argout type
+     * @param out_comments
+     *            argout description
+     */
+    // ===============================================================
+    public GetErrorsForAttributeInternal(final String name, final int in, final int out, final String in_comments,
+            final String out_comments) {
+        super(name, in, out, in_comments, out_comments);
+    }
+
+    // ===============================================================
+    /**
+     * Constructor for Command class GetErrorsForAttributeCurrentClass
+     * 
+     * @param name
+     *            command name
+     * @param in
+     *            argin type
+     * @param in_comments
+     *            argin description
+     * @param out
+     *            argout type
+     * @param out_comments
+     *            argout description
+     * @param level
+     *            The command display type OPERATOR or EXPERT
+     */
+    // ===============================================================
+    public GetErrorsForAttributeInternal(final String name, final int in, final int out, final String in_comments,
+            final String out_comments, final DispLevel level) {
+        super(name, in, out, in_comments, out_comments, level);
+    }
+
+    // ===============================================================
+    /**
+     * return the result of the device's command.
+     */
+    // ===============================================================
+    @Override
+    public Any execute(final DeviceImpl device, final Any in_any) throws DevFailed {
+        Util.out2.println("GetErrorsForAttributeCurrentClass.execute(): arrived");
+        final String argin = extract_DevString(in_any);
+
+        if (!(device instanceof HdbArchiver)) {
+            Except.throw_exception("DEVICE_ERROR", "Device parameter is not instance of HdbArchiver",
+                    ConfigConst.HDB_CLASS_DEVICE);
+        }
+
+        return insert(((HdbArchiver) device).get_errors_for_attribute_internal(argin));
+    }
+
+    // ===============================================================
+    /**
+     * Check if it is allowed to execute the command.
+     */
+    // ===============================================================
+    @Override
+    public boolean is_allowed(final DeviceImpl device, final Any data_in) {
+        if (device.get_state() == DevState.OFF || device.get_state() == DevState.INIT) {
+            // End of Generated Code
+
+            // Re-Start of Generated Code
+            return false;
+        }
+        return true;
+    }
+}
+// -----------------------------------------------------------------------------
+/*
+ * end of $Source:/cvsroot/tango-cs/tango/jserver/archiving/HdbArchiver/
+ * GetErrorsForAttributeInternal.java,v $
+ */
diff --git a/src/main/java/HdbArchiver/GetErrorsForDomainInternal.java b/hdbarchiver/src/main/java/HdbArchiver/GetErrorsForDomainInternal.java
similarity index 97%
rename from src/main/java/HdbArchiver/GetErrorsForDomainInternal.java
rename to hdbarchiver/src/main/java/HdbArchiver/GetErrorsForDomainInternal.java
index b1588619597dcf5d919b7a9711b239a889db9034..49d8f63fb876ee47e4b26ae47b164b7115ccd4f8 100644
--- a/src/main/java/HdbArchiver/GetErrorsForDomainInternal.java
+++ b/hdbarchiver/src/main/java/HdbArchiver/GetErrorsForDomainInternal.java
@@ -1,124 +1,124 @@
-/**
- * @author $Author: ounsy $
- * @version $Revision: 1.2 $
- */
-package HdbArchiver;
-
-import org.omg.CORBA.Any;
-
-import fr.esrf.Tango.DevFailed;
-import fr.esrf.Tango.DevState;
-import fr.esrf.Tango.DispLevel;
-import fr.esrf.TangoDs.Command;
-import fr.esrf.TangoDs.DeviceImpl;
-import fr.esrf.TangoDs.Except;
-import fr.esrf.TangoDs.TangoConst;
-import fr.esrf.TangoDs.Util;
-import fr.soleil.archiving.hdbtdb.api.ConfigConst;
-
-/**
- * Class Description:
- * 
- */
-
-public class GetErrorsForDomainInternal extends Command implements TangoConst {
-    // ===============================================================
-    /**
-     * Constructor for Command class GetErrorsForDomainCurrentClass
-     * 
-     * @param name
-     *            command name
-     * @param in
-     *            argin type
-     * @param out
-     *            argout type
-     */
-    // ===============================================================
-    public GetErrorsForDomainInternal(final String name, final int in, final int out) {
-        super(name, in, out);
-    }
-
-    // ===============================================================
-    /**
-     * Constructor for Command class GetErrorsForDomainCurrentClass
-     * 
-     * @param name
-     *            command name
-     * @param in
-     *            argin type
-     * @param in_comments
-     *            argin description
-     * @param out
-     *            argout type
-     * @param out_comments
-     *            argout description
-     */
-    // ===============================================================
-    public GetErrorsForDomainInternal(final String name, final int in, final int out, final String in_comments,
-            final String out_comments) {
-        super(name, in, out, in_comments, out_comments);
-    }
-
-    // ===============================================================
-    /**
-     * Constructor for Command class GetErrorsForDomainCurrentClass
-     * 
-     * @param name
-     *            command name
-     * @param in
-     *            argin type
-     * @param in_comments
-     *            argin description
-     * @param out
-     *            argout type
-     * @param out_comments
-     *            argout description
-     * @param level
-     *            The command display type OPERATOR or EXPERT
-     */
-    // ===============================================================
-    public GetErrorsForDomainInternal(final String name, final int in, final int out, final String in_comments,
-            final String out_comments, final DispLevel level) {
-        super(name, in, out, in_comments, out_comments, level);
-    }
-
-    // ===============================================================
-    /**
-     * return the result of the device's command.
-     */
-    // ===============================================================
-    @Override
-    public Any execute(final DeviceImpl device, final Any in_any) throws DevFailed {
-        Util.out2.println("GetErrorsForDomainCurrentClass.execute(): arrived");
-        final String argin = extract_DevString(in_any);
-
-        if (!(device instanceof HdbArchiver)) {
-            Except.throw_exception("DEVICE_ERROR", "Device parameter is not instance of HdbArchiver",
-                    ConfigConst.HDB_CLASS_DEVICE);
-        }
-
-        return insert(((HdbArchiver) device).get_errors_for_domain_internal(argin));
-    }
-
-    // ===============================================================
-    /**
-     * Check if it is allowed to execute the command.
-     */
-    // ===============================================================
-    @Override
-    public boolean is_allowed(final DeviceImpl device, final Any data_in) {
-        if (device.get_state() == DevState.OFF || device.get_state() == DevState.INIT) {
-            // End of Generated Code
-
-            // Re-Start of Generated Code
-            return false;
-        }
-        return true;
-    }
-}
-// -----------------------------------------------------------------------------
-/*
- * end of $Source:
- * /cvsroot/tango-cs/tango/jserver/archiving/HdbArchiver/GetErrorsForDomainInternal
- * .java,v $
- */
+/**
+ * @author $Author: ounsy $
+ * @version $Revision: 1.2 $
+ */
+package HdbArchiver;
+
+import org.omg.CORBA.Any;
+
+import fr.esrf.Tango.DevFailed;
+import fr.esrf.Tango.DevState;
+import fr.esrf.Tango.DispLevel;
+import fr.esrf.TangoDs.Command;
+import fr.esrf.TangoDs.DeviceImpl;
+import fr.esrf.TangoDs.Except;
+import fr.esrf.TangoDs.TangoConst;
+import fr.esrf.TangoDs.Util;
+import fr.soleil.archiving.hdbtdb.api.ConfigConst;
+
+/**
+ * Class Description:
+ * 
+ */
+
+public class GetErrorsForDomainInternal extends Command implements TangoConst {
+    // ===============================================================
+    /**
+     * Constructor for Command class GetErrorsForDomainCurrentClass
+     * 
+     * @param name
+     *            command name
+     * @param in
+     *            argin type
+     * @param out
+     *            argout type
+     */
+    // ===============================================================
+    public GetErrorsForDomainInternal(final String name, final int in, final int out) {
+        super(name, in, out);
+    }
+
+    // ===============================================================
+    /**
+     * Constructor for Command class GetErrorsForDomainCurrentClass
+     * 
+     * @param name
+     *            command name
+     * @param in
+     *            argin type
+     * @param in_comments
+     *            argin description
+     * @param out
+     *            argout type
+     * @param out_comments
+     *            argout description
+     */
+    // ===============================================================
+    public GetErrorsForDomainInternal(final String name, final int in, final int out, final String in_comments,
+            final String out_comments) {
+        super(name, in, out, in_comments, out_comments);
+    }
+
+    // ===============================================================
+    /**
+     * Constructor for Command class GetErrorsForDomainCurrentClass
+     * 
+     * @param name
+     *            command name
+     * @param in
+     *            argin type
+     * @param in_comments
+     *            argin description
+     * @param out
+     *            argout type
+     * @param out_comments
+     *            argout description
+     * @param level
+     *            The command display type OPERATOR or EXPERT
+     */
+    // ===============================================================
+    public GetErrorsForDomainInternal(final String name, final int in, final int out, final String in_comments,
+            final String out_comments, final DispLevel level) {
+        super(name, in, out, in_comments, out_comments, level);
+    }
+
+    // ===============================================================
+    /**
+     * return the result of the device's command.
+     */
+    // ===============================================================
+    @Override
+    public Any execute(final DeviceImpl device, final Any in_any) throws DevFailed {
+        Util.out2.println("GetErrorsForDomainCurrentClass.execute(): arrived");
+        final String argin = extract_DevString(in_any);
+
+        if (!(device instanceof HdbArchiver)) {
+            Except.throw_exception("DEVICE_ERROR", "Device parameter is not instance of HdbArchiver",
+                    ConfigConst.HDB_CLASS_DEVICE);
+        }
+
+        return insert(((HdbArchiver) device).get_errors_for_domain_internal(argin));
+    }
+
+    // ===============================================================
+    /**
+     * Check if it is allowed to execute the command.
+     */
+    // ===============================================================
+    @Override
+    public boolean is_allowed(final DeviceImpl device, final Any data_in) {
+        if (device.get_state() == DevState.OFF || device.get_state() == DevState.INIT) {
+            // End of Generated Code
+
+            // Re-Start of Generated Code
+            return false;
+        }
+        return true;
+    }
+}
+// -----------------------------------------------------------------------------
+/*
+ * end of $Source:
+ * /cvsroot/tango-cs/tango/jserver/archiving/HdbArchiver/GetErrorsForDomainInternal
+ * .java,v $
+ */
diff --git a/src/main/java/HdbArchiver/HdbArchiver.java b/hdbarchiver/src/main/java/HdbArchiver/HdbArchiver.java
similarity index 96%
rename from src/main/java/HdbArchiver/HdbArchiver.java
rename to hdbarchiver/src/main/java/HdbArchiver/HdbArchiver.java
index 25b36dee0745475037805949d0b5a16de3fda622..b779a05d2de2d535843af72afd4487cc83f95b87 100644
--- a/src/main/java/HdbArchiver/HdbArchiver.java
+++ b/hdbarchiver/src/main/java/HdbArchiver/HdbArchiver.java
@@ -1,1831 +1,1825 @@
-// +============================================================================
-// $Source:
-// /cvsroot/tango-cs/tango/jserver/archiving/HdbArchiver/HdbArchiver.java,v $
-//
-// project : Tango Device Server
-//
-// Description: java source code for the HdbArchiver class and its commands.
-// This class is derived from DeviceImpl class.
-// It represents the CORBA servant obbject which
-// will be accessed from the network. All commands which
-// can be executed on the HdbArchiver are implemented
-// in this file.
-//
-// $Author: pierrejoseph $
-//
-// $Revision: 1.89 $
-//
-// $Log: HdbArchiver.java,v $
-// Revision 1.89 2007/10/03 15:23:46 pierrejoseph
-// Merged between Polling and Events code
-//
-// Revision 1.88.2.1 2007/09/28 14:48:08 pierrejoseph
-// Merged between Polling and Events code
-//
-// Revision 1.88 2007/08/27 14:14:50 pierrejoseph
-// Traces addition
-//
-// Revision 1.87 2007/06/15 07:46:47 pierrejoseph
-// add traces in trigger to locate the collector freezing
-//
-// Revision 1.86 2007/06/07 09:54:21 pierrejoseph
-// Traces addition to locate when the device stays in the RUNNING state
-//
-// Revision 1.85 2007/05/11 13:58:34 pierrejoseph
-// Attribute addition : release version
-//
-// Revision 1.84 2007/05/10 16:23:45 chinkumo
-// Archiving Version 1.2.0 for Tango 5.5.8
-//
-// Revision 1.83 2007/04/05 10:06:04 chinkumo
-// New Release 5.5.7
-//
-// Revision 1.82 2007/03/27 09:17:52 ounsy
-// move the AMT updating upwards in stop_archive_att so that the archiving can
-// be stopped even if no collector was created (as can happen for reserved
-// attributes of formerly-dedicated archivers).
-//
-// Revision 1.81 2007/03/05 16:25:20 ounsy
-// non-static DataBase
-//
-// Revision 1.80 2007/02/26 16:14:24 ounsy
-// archiving devices now inherits just from DeviceImpl instead of
-// DeviceImplWithShutdownRunnable (they're nonlonger unexported onn shutdown)
-//
-// Revision 1.79 2007/02/26 08:31:47 chinkumo
-// For Tango 5.5.6
-//
-// Revision 1.78 2007/02/19 13:01:45 pierrejoseph
-// Add a trace in case of insertion error in amt table.
-//
-// Revision 1.77 2007/02/19 09:06:26 chinkumo
-// Release 19 - 02 - 2007 for Tango 5.5.6
-//
-// Revision 1.76 2007/01/11 07:35:52 chinkumo
-// Release / 2007-01-11
-//
-// Revision 1.75 2007/01/09 16:44:58 ounsy
-// commands that lock the device into the RUNNING state now set it back to ON
-// even if they encountered exceptions. in this case an entry is logged into the
-// archiver's diary.
-//
-// Revision 1.74 2007/01/09 15:16:04 ounsy
-// put the Giacomo version back for XDBCollectorFactory.removeAllForAttribute
-//
-// Revision 1.73 2007/01/05 12:56:35 pierrejoseph
-// Modification of the ArchivingMessConfig object creation and the
-// trigger_archive_conf method argin has lost its first value.
-//
-// Revision 1.72 2007/01/04 08:48:02 chinkumo
-// Production of the dated version 2007-01-04
-//
-// Revision 1.71 2006/12/08 07:45:14 chinkumo
-// date of the version : 2006-12-08
-//
-// Revision 1.70 2006/11/24 14:54:17 ounsy
-// we re-use the old removeAllForAttribute
-//
-// Revision 1.69 2006/11/24 14:04:16 ounsy
-// the diary entry in case of missing collector is now done by he archiver
-//
-// Revision 1.68 2006/11/24 13:19:35 ounsy
-// TdbCollectorFactory.get(attrLightMode) has a new parameter
-// "doCreateCollectorIfMissing". A missing collector will only be created if
-// this is true, otherwise a message in logged into the archiver's diary and an
-// exception launched
-//
-// Revision 1.67 2006/11/20 09:23:51 ounsy
-// minor changes
-//
-// Revision 1.65 2006/11/13 15:57:37 ounsy
-// all java devices now inherit from UnexportOnShutdownDeviceImpl instead of
-// from DeviceImpl
-//
-// Revision 1.64 2006/10/30 14:34:49 ounsy
-// minor change
-//
-// Revision 1.63 2006/10/18 14:50:45 ounsy
-// release date updated
-//
-// Revision 1.62 2006/10/17 14:50:09 ounsy
-// release date updated
-//
-// Revision 1.61 2006/10/13 15:00:20 ounsy
-// release date updated
-//
-// Revision 1.60 2006/10/11 08:44:15 ounsy
-// release date updated
-//
-// Revision 1.59 2006/10/11 08:31:19 ounsy
-// modified the trigger_archive_conf commands to accept the same parameters as
-// the archiving manager
-//
-// Revision 1.58 2006/10/09 13:55:34 ounsy
-// removed logs
-//
-// Revision 1.57 2006/10/05 15:42:04 ounsy
-// added archivingMessConfig.filter in trigger_archive_conf
-//
-// Revision 1.56 2006/09/26 15:51:42 ounsy
-// minor changes
-//
-// Revision 1.55 2006/09/15 08:56:54 ounsy
-// release date updated
-//
-// Revision 1.54 2006/09/13 09:49:43 ounsy
-// corrected a bug in getDeviceproperty
-//
-// Revision 1.53 2006/09/12 13:01:42 ounsy
-// methods that put the archiver in the RUNNING state now do it from the start
-// and only go to the ON state at the end of the method
-//
-// Revision 1.52 2006/09/08 14:17:20 ounsy
-// added missing descriptions of properties
-//
-// Revision 1.51 2006/08/29 15:14:42 ounsy
-// release date updated
-//
-// Revision 1.50 2006/08/29 08:44:51 ounsy
-// corrected a bug in getControlResult()
-//
-// Revision 1.49 2006/08/23 09:41:01 ounsy
-// minor changes
-//
-// Revision 1.48 2006/08/10 09:28:28 ounsy
-// release date updated
-//
-// Revision 1.47 2006/08/08 12:22:39 ounsy
-// release date updated
-//
-// Revision 1.46 2006/07/31 08:01:23 ounsy
-// release date updated
-//
-// Revision 1.45 2006/07/31 08:00:55 ounsy
-// release date updated
-//
-// Revision 1.44 2006/07/28 13:50:40 ounsy
-// corrected the method name in logRetry
-//
-// Revision 1.43 2006/07/28 09:33:39 ounsy
-// added diary logging on retryForXXXmethods
-//
-// Revision 1.42 2006/07/26 08:35:22 ounsy
-// initDevice synchronized + minor changes
-//
-// Revision 1.41 2006/07/25 16:24:17 ounsy
-// HdbCollectorFactory no more static
-//
-// Revision 1.40 2006/07/25 13:39:14 ounsy
-// correcting bad merge
-//
-// Revision 1.39 2006/07/25 13:22:32 ounsy
-// added a "version" attribute
-//
-// Revision 1.38 2006/07/25 09:45:25 ounsy
-// changed the XXX_charge management
-//
-// Revision 1.37 2006/07/21 14:39:02 ounsy
-// minor changes
-//
-// Revision 1.36 2006/07/18 15:11:55 ounsy
-// added a diaryLogLevel property
-//
-// Revision 1.35 2006/07/12 14:00:24 ounsy
-// added the synchronized keyword on all trigger_XXX and stop_XXX methods
-//
-// Revision 1.34 2006/07/06 09:14:18 ounsy
-// modified the retryForXXX methods so that they retry in a separate thread to
-// void timeouts
-//
-// Revision 1.33 2006/06/29 08:45:10 ounsy
-// added a hasDiary property (default false) that has to be set to true for the
-// logging to do anything
-//
-// Revision 1.32 2006/06/27 08:35:05 ounsy
-// Corrected a grave bug in logging by removing the "synchronized" tag from the
-// trace methods, that was causing deadlocks
-//
-// Revision 1.31 2006/06/16 09:25:33 ounsy
-// changed imports because of the diary package moving to the javaapi project
-//
-// Revision 1.30 2006/06/13 13:28:19 ounsy
-// added a file logging system (diary) that records data storing errors
-//
-// Revision 1.29 2006/06/07 12:55:56 ounsy
-// added period, lastInsert and lastInsertRequest to the data of each line
-// representing a KO attribute
-//
-// Revision 1.28 2006/06/02 08:39:12 ounsy
-// minor changes
-//
-// Revision 1.27 2006/05/23 07:39:34 ounsy
-// +added a hasThreadedStartup which if true does the AMT inserts in a separate
-// thread
-// -removed TDB-specific useless attributes
-//
-// Revision 1.26 2006/05/17 15:02:09 ounsy
-// made the logs more coherent
-//
-// Revision 1.25 2006/04/11 09:11:49 ounsy
-// double archiving protection
-//
-// Revision 1.24 2006/03/29 10:20:51 ounsy
-// Added content to the error message:
-// each atribute with an invalid mode has a specific log
-//
-// Revision 1.23 2006/03/27 13:51:10 ounsy
-// catched the ArchivingException on checkMode so that if an attribute's mode
-// is invalid, the other attributes can still be archived
-//
-// Revision 1.22 2006/03/14 13:09:56 ounsy
-// removed useless logs
-//
-// Revision 1.21 2006/03/08 16:26:24 ounsy
-// added the global POGO class comments for the devices:
-// -HDBArchiver
-// -TDBArchiver
-// -ArchivingWatcher
-//
-// Revision 1.20 2006/03/08 14:36:21 ounsy
-// added pogo comments
-//
-// Revision 1.19 2006/03/01 15:45:33 ounsy
-// if the safetyPeriod property is missing, the default (absolute+15mn) mode is
-// chosen
-//
-// Revision 1.18 2006/02/28 10:38:31 ounsy
-// lastInsertRequest added for HDBArchiver internal controls
-//
-// Revision 1.17 2006/02/27 12:17:47 ounsy
-// the HdbArchiver internal diagnosis function's safety period calculation is
-// now defined
-// by the safetyPeriod property
-// (for example safetyPeriod=absolute/minutes/15 or safetyPeriod=relative/2)
-//
-// Revision 1.16 2006/02/24 12:07:30 ounsy
-// removed useless logs
-//
-// Revision 1.15 2006/02/15 13:11:31 ounsy
-// organized imports
-//
-// Revision 1.14 2006/02/15 13:01:25 ounsy
-// added HdbArchiver internal diagnosis commands
-//
-// Revision 1.13 2006/02/15 11:08:59 chinkumo
-// Javadoc comment update.
-//
-// Revision 1.12 2006/02/08 15:00:05 ounsy
-// added comments for the new commands
-//
-// Revision 1.11 2006/02/06 13:00:46 ounsy
-// new commands RetryForAttribute and RetryForAttributes
-//
-// Revision 1.10 2006/01/23 09:11:17 ounsy
-// minor changes (reorganized imports + methods set deprecated)
-//
-// Revision 1.9 2006/01/13 14:28:28 chinkumo
-// Changes made to avoid multi lines in AMT table when archivers are rebooted.
-//
-// Revision 1.8 2005/11/29 17:33:53 chinkumo
-// no message
-//
-// Revision 1.7.10.6 2005/11/29 16:16:05 chinkumo
-// Code reformated (pogo compatible)
-//
-// Revision 1.7.10.5 2005/11/15 13:46:08 chinkumo
-// ...
-//
-// Revision 1.7.10.4 2005/09/26 08:01:20 chinkumo
-// Minor changes !
-//
-// Revision 1.7.10.3 2005/09/16 08:08:46 chinkumo
-// Minor changes.
-//
-// Revision 1.7.10.2 2005/09/14 14:25:01 chinkumo
-// 'trigger_archive_conf' methods were changed to allow the management of
-// ArchivingMessConfig objects.
-//
-// Revision 1.7.10.1 2005/09/09 10:16:41 chinkumo
-// Since the checkAttributeSupport was implemented, this class was modified.
-// This enhances the support of attributes types.
-//
-// Revision 1.7 2005/06/24 12:06:27 chinkumo
-// Some constants were moved from
-// fr.soleil.hdbtdbArchivingApi.ArchivingApi.ConfigConst to
-// fr.soleil.hdbtdbArchivingApi.ArchivingTools.Tools.GlobalConst.
-// This change was reported here.
-//
-// Revision 1.6 2005/06/15 14:00:37 chinkumo
-// The device was regenerated in Tango V5.
-//
-// Revision 1.5 2005/06/14 10:30:28 chinkumo
-// Branch (hdbArchiver_1_0_1-branch_0) and HEAD merged.
-//
-// Revision 1.4.4.2 2005/06/13 14:04:27 chinkumo
-// Changes made to improve the management of exceptions were reported here.
-//
-// Revision 1.4.4.1 2005/05/03 16:30:56 chinkumo
-// Some constants in the class
-// 'fr.soleil.hdbtdbArchivingApi.ArchivingApi.ConfigConst' were renamed. Changes
-// reported here.
-// Some unused references removed.
-//
-// Revision 1.4 2005/02/04 17:10:16 chinkumo
-// The trouble with the grouped stopping strategy was fixed.
-//
-// Revision 1.3 2005/01/31 17:12:16 chinkumo
-// Minors changes made into the logging messages of the method named
-// 'stop_archive_att'.
-//
-// Revision 1.2 2005/01/26 16:38:14 chinkumo
-// Ultimate synchronization before real sharing.
-//
-// Revision 1.1 2004/12/06 16:43:24 chinkumo
-// First commit (new architecture).
-//
-//
-// copyleft : European Synchrotron Radiation Facility
-// BP 220, Grenoble 38043
-// FRANCE
-//
-// -============================================================================
-//
-// This file is generated by POGO
-// (Program Obviously used to Generate tango Object)
-//
-// (c) - Software Engineering Group - ESRF
-// =============================================================================
-
-package HdbArchiver;
-
-import java.io.IOException;
-import java.sql.Timestamp;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.Collection;
-import java.util.Collections;
-import java.util.HashMap;
-import java.util.Map;
-import java.util.Set;
-import java.util.concurrent.ConcurrentHashMap;
-import java.util.concurrent.Executors;
-
-import org.omg.CORBA.SystemException;
-import org.omg.CORBA.UserException;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.tango.utils.DevFailedUtils;
-
-import HdbArchiver.Collector.DbProxy;
-import HdbArchiver.Collector.HdbCollector;
-import HdbArchiver.Collector.HdbCollectorFactory;
-import fr.esrf.Tango.DevFailed;
-import fr.esrf.TangoApi.DbDatum;
-import fr.esrf.TangoDs.Attribute;
-import fr.esrf.TangoDs.DeviceClass;
-import fr.esrf.TangoDs.DeviceImpl;
-import fr.esrf.TangoDs.Except;
-import fr.esrf.TangoDs.TangoConst;
-import fr.esrf.TangoDs.Util;
-import fr.soleil.archiving.common.api.exception.ArchivingException;
-import fr.soleil.archiving.common.api.tools.GlobalConst;
-import fr.soleil.archiving.common.api.utils.LoggingUtils;
-import fr.soleil.archiving.common.api.utils.TangoStateUtils;
-import fr.soleil.archiving.hdbtdb.api.ConfigConst;
-import fr.soleil.archiving.hdbtdb.api.HdbTdbConnectionParameters;
-import fr.soleil.archiving.hdbtdb.api.manager.ArchivingManagerApiRef;
-import fr.soleil.archiving.hdbtdb.api.tools.ArchivingMessConfig;
-import fr.soleil.archiving.hdbtdb.api.tools.AttributeLightMode;
-import fr.soleil.archiving.hdbtdb.api.tools.AttributeSupport;
-import fr.soleil.archiving.hdbtdb.api.tools.DBTools;
-
-/**
- * Class Description: This device is in charge of archiving Tango attributes to
- * the Historic Database, as known as HDB. On startup, it looks up in database
- * the attributes it is in charge of. A collector thread retrieves attribute
- * values, with the associated timestamp. For each attribute, the values are
- * then inserted into HDB every [base period], and if so required, when its
- * value meets certain user-defined criterions.
- * 
- * @author $Author: pierrejoseph $
- * @version $Revision: 1.89 $
- */
-
-// --------- Start of States Description ----------
-/*
- * Device States Description: DevState.RUNNING : The device is not avalaible
- * because it is executing a command DevState.ON : The device is ready to use
- * DevState.INIT : The device has been initialized but not ready to use
- * DevState.FAULT : The device has been initialized but the connection to the
- * database crashed.
- */
-// --------- End of States Description ----------
-public class HdbArchiver extends DeviceImpl implements TangoConst {
-
-    protected int state;
-    private DbProxy dbProxy;
-    private InitDeviceTask initDeviceTast;
-
-    // --------- Start of attributes data members ----------
-
-    protected int attr_scalar_charge_read;
-    protected int attr_spectrum_charge_read;
-    protected int attr_image_charge_read;
-
-    private final String m_version;
-
-    // --------- End of attributes data members ----------
-
-    // --------- Start of properties data members ----------
-
-//    /**
-//     * Describes how tightly effective archiving periods have to match
-//     * theoretical archiving periods, for an attribute to be declared "OK" (ie.
-//     * archiving correctly) Can be either:
-//     * <UL>
-//     * <LI>absolute/[hours minutes seconds]/[amount]: the effective period = the theoretical period + the specified
-//     * amount
-//     * <LI>relative/[multiplier]: the effective period = the theoretical period * the specified multiplier
-//     * </UL>
-//     * <b>Default value : </b>absolute/minutes/15
-//     */
-//    private String safetyPeriod;
-
-    /**
-     * Property used to describe the startup behaviour of the device. <br>
-     * If set to true, the inserts in AMT are done in another thread so that the
-     * device can be exported earlier. <br>
-     * If set to false, the inserts in AMT are done in the main thread
-     * sequentially.<br>
-     * <b>Default value : </b>false
-     */
-    private boolean hasThreadedStartup;
-
-    /**
-     * Defines whether the archiver is a "dedicated archiver". A
-     * "dedicated archiver" is an archiver specialized in archiving a specific
-     * list of attributes, and none others. If the value is false, the related
-     * attribute "reservedAttributes" won't be used. <b>Default value :
-     * </b>false
-     */
-    private boolean isDedicated;
-
-    /**
-     * Defines whether the archiver will log to a diary. <b>Default value :
-     * </b>false
-     */
-    private boolean hasDiary;
-
-    /**
-     * The criticity threshold of the archiver's logging. Only messages with a
-     * criticity higher than this attribute will be logged to the diary.
-     * Possible values are:
-     * <UL>
-     * <LI>DEBUG
-     * <LI>INFO
-     * <LI>WARNING
-     * <LI>ERROR
-     * <LI>CRITIC
-     * </UL>
-     * <b>Default value : </b>DEBUG
-     */
-    private String diaryLogLevel;
-
-    /**
-     * The path of the diary logs. Don't include a filename, diary files are
-     * named automatically.
-     */
-    private String diaryPath;
-
-    /**
-     * The list of attributes that will always be archived on this archiver no
-     * matter the load-balancing situation. Be aware that: - this list will be
-     * ignored if the related attribute "isDedicated" is false or missing - one
-     * attribute shouldn't be on the reservedAttributes list of several
-     * archivers
-     */
-    private String[] reservedAttributes;
-
-    // --------- End of properties data members ----------
-
-    protected HdbCollectorFactory collectorFactory;
-    public static final short NA = 10;
-    public static final short SUCCEEDED = 20;
-    public static final short FAILED = 30;
-    private final Set<String> koAttributes = Collections.newSetFromMap(new ConcurrentHashMap<String, Boolean>());
-    private final Set<String> okAttributes = Collections.newSetFromMap(new ConcurrentHashMap<String, Boolean>());
-
-    private Logger logger;
-    private boolean isHighRate;
-    // --------------------------------------
-
-    // --------------------------------------------------------------------------//
-    // ELETTRA : Archiving Events
-    // --------------------------------------------------------------------------//
-    /* Archiving related properties */
-    public static Boolean isUseEvents = false;
-    public static String eventDBUpdatePolicy = "amt";
-
-    // --------------------------------------------------------------------------//
-    // ELETTRA : Archiving Events
-    // --------------------------------------------------------------------------//
-
-    // =========================================================
-    /**
-     * Constructor for simulated Time Device Server.
-     * 
-     * @param cl
-     *            The DeviceClass object
-     * @param s
-     *            The Device name.
-     * @param version
-     *            The device version
-     */
-    // =========================================================
-    HdbArchiver(final DeviceClass cl, final String s, final String version) throws DevFailed {
-        super(cl, s);
-        m_version = version;
-        init_device();
-    }
-
-    // =========================================================
-    /**
-     * Constructor for simulated Time Device Server.
-     * 
-     * @param cl
-     *            The DeviceClass object
-     * @param s
-     *            The Device name.
-     * @param d
-     *            Device description.
-     * @param version
-     *            The device version
-     */
-    // =========================================================
-    HdbArchiver(final DeviceClass cl, final String s, final String d, final String version) throws DevFailed {
-        super(cl, s, d);
-        m_version = version;
-        init_device();
-    }
-
-    // =========================================================
-    /**
-     * Initialize the device.
-     */
-    // =========================================================
-    @Override
-    public void init_device() throws DevFailed {
-        // PROBLEM-310: read device properties before logging configuration
-        get_device_property();
-
-        try {
-            logger = LoggingUtils.configureLogging(device_name, hasDiary, diaryPath, diaryLogLevel);
-        } catch (final IOException e) {
-            logger = LoggerFactory.getLogger(device_name); // ensure logger is not null
-            TangoStateUtils.setFault(this, "logging configuration failed");
-        }
-
-        logger.info("HdbArchiver() create " + device_name);
-        // Initialise variables to default values
-        // -------------------------------------------
-
-        // stop archiving before doing anything else
-        if (collectorFactory != null) {
-            collectorFactory.clear();
-        }
-
-        collectorFactory = new HdbCollectorFactory(logger);
-        attr_image_charge_read = 0;
-        attr_spectrum_charge_read = 0;
-        attr_scalar_charge_read = 0;
-        koAttributes.clear();
-        okAttributes.clear();
-
-        StringBuilder builder = new StringBuilder();
-
-        builder.append("HasThreadedStartup = ").append(hasThreadedStartup).append('\n');
-        builder.append("isDedicated = ").append(isDedicated).append('\n');
-        builder.append("reservedAttributes = ").append(Arrays.toString(reservedAttributes)).append('\n');
-        builder.append("diaryPath = ").append(diaryPath).append('\n');
-        builder.append("hasDiary = ").append(hasDiary).append('\n');
-        builder.append("diaryLogLevel = ").append(diaryLogLevel);
-        logger.info(builder.toString());
-        connectDatabase();
-        logger.debug("init done");
-    }
-
-    private void connectDatabase() {
-        try {
-            HdbTdbConnectionParameters.performHDBInit(get_db_device(), true, true);
-
-            String dbHost = HdbTdbConnectionParameters.getHDbHost();
-            String dbName = HdbTdbConnectionParameters.getHDbName();
-            String dbSchema = HdbTdbConnectionParameters.getHDbSchema();
-            String dbUser = HdbTdbConnectionParameters.getHDBUser();
-            String dbPassword = HdbTdbConnectionParameters.getHDBPassword();
-            boolean isRac = HdbTdbConnectionParameters.isHDbRac();
-
-            HdbTdbConnectionParameters.printHDBConnectionInfoLog();
-
-            if (dbProxy != null) {
-                dbProxy.closeConnection();
-            }
-            dbProxy = new DbProxy(dbHost, dbName, dbSchema, dbUser, dbPassword, isRac, logger);
-            // setControlMode(safetyPeriod);
-            // start archiving in a thread
-            if (initDeviceTast == null) {
-                initDeviceTast = new InitDeviceTask();
-            }
-            Executors.newSingleThreadExecutor().submit(initDeviceTast);
-
-        } catch (final ArchivingException e) {
-            TangoStateUtils.setFault(this, "Historical database connection failed: " + e);
-            logger.error("ERROR : Database unconnected !!", e);
-        }
-    }
-
-    private synchronized void reconnectDatabaseIfNecessary() {
-        if (dbProxy == null) {
-            connectDatabase();
-        }
-    }
-
-    /**
-     * @param archivingMessConfig
-     * @param forceThreadedMode
-     */
-    private void launchStartArchivingTask(final ArchivingMessConfig archivingMessConfig,
-            final boolean forceThreadedMode, final boolean updateAMTTable) {
-        logger.info("startArchiving - hasThreadedStartup : " + hasThreadedStartup);
-        final StartArchivingRunnable startArchivingRunnable = new StartArchivingRunnable(archivingMessConfig,
-                updateAMTTable);
-
-        if (hasThreadedStartup || forceThreadedMode) {
-            final Thread startArchivingThread = new Thread(startArchivingRunnable, "HDBStartArchivingThread "
-                    + device_name);
-            startArchivingThread.start();
-        } else {
-            startArchivingRunnable.run();
-        }
-    }
-
-    private void logArchivingError(DevFailed df, ArchivingMessConfig config) {
-        StringBuilder errorBuilder = new StringBuilder(getClass().getSimpleName());
-        errorBuilder.append(" failed to start archiving:");
-        String[] lines = config.toArray();
-        if (lines != null) {
-            for (String line : lines) {
-                if (line != null) {
-                    errorBuilder.append("\n").append(line);
-                }
-            }
-        }
-        errorBuilder.append("\n--> reason: ").append(DevFailedUtils.toString(df));
-        logger.error(errorBuilder.toString());
-    }
-
-    private class InitDeviceTask implements Runnable {
-        @Override
-        public void run() {
-            Collection<AttributeLightMode> myCurrentTasks = null;
-            if (dbProxy != null) {
-                try {
-                    myCurrentTasks = dbProxy.getArchiverCurrentTasks(device_name);
-                } catch (final ArchivingException e) {
-                    e.printStackTrace();
-                    logger.debug("cannot getArchiverCurrentTasks " + e);
-                    TangoStateUtils.setFault(HdbArchiver.this, e.getMessage());
-                }
-            }
-            final ArchivingMessConfig archivingMessConfig = ArchivingMessConfig.basicObjectCreation();
-            try {
-                if (myCurrentTasks != null && myCurrentTasks.size() > 0) {
-                    for (final AttributeLightMode attributeLightMode : myCurrentTasks) {
-                        archivingMessConfig.add(attributeLightMode);
-                    }
-                    triggerArchiving(archivingMessConfig.toArray(), false);
-                }
-            } catch (final DevFailed devFailed) {
-                logArchivingError(devFailed, archivingMessConfig);
-            } finally {
-                TangoStateUtils.updateState(HdbArchiver.this, koAttributes, okAttributes);
-            }
-        }
-    }
-
-    private class StartArchivingRunnable implements Runnable {
-
-        private final ArchivingMessConfig archivingMessConfig;
-        private final boolean updateAMTTable;
-
-        public StartArchivingRunnable(final ArchivingMessConfig archivingMessConfig, final boolean updateAMTTable) {
-            this.archivingMessConfig = archivingMessConfig;
-            this.updateAMTTable = updateAMTTable;
-        }
-
-        @Override
-        public void run() {
-            try {
-                triggerArchiving(archivingMessConfig.toArray(), updateAMTTable);
-            } catch (final DevFailed devFailed) {
-                logArchivingError(devFailed, archivingMessConfig);
-            } finally {
-                TangoStateUtils.updateState(HdbArchiver.this, koAttributes, okAttributes);
-            }
-
-        }
-    }
-
-    public String[] getKOAttributes() {
-        return koAttributes.toArray(new String[koAttributes.size()]);
-    }
-
-    // /**
-    // * @param safetyPeriod2
-    // */
-    // private void setControlMode(final String _safetyPeriod) throws DevFailed
-    // {
-    // logger.info("setControlMode/safetyPeriod/" + _safetyPeriod);
-    // final ISaferPeriodCalculator saferPeriodCalculator =
-    // SaferPeriodCalculatorFactory.getImpl(_safetyPeriod);
-    // logger.info("setControlMode/success/desription/" +
-    // saferPeriodCalculator.getDescription());
-    // }
-
-    // ===================================================================
-    /**
-     * Read the device properties from database.
-     */
-    // ===================================================================
-    public void get_device_property() throws DevFailed {
-        // Initialize your default values here.
-        // ------------------------------------------
-        hasThreadedStartup = false;
-        isDedicated = false;
-        reservedAttributes = null;
-        diaryPath = null;
-        hasDiary = false;
-        diaryLogLevel = "DEBUG";
-        isHighRate = false;
-
-        // Read device properties from database.(Automatic code generation)
-        // -------------------------------------------------------------
-        if (Util._UseDb == false) {
-            return;
-        }
-        final String[] propnames = { "SafetyPeriod", "HasThreadedStartup", "IsDedicated", "ReservedAttributes",
-                "DiaryPath", "HasDiary", "DiaryLogLevel", "IsHighRate",
-                // --------------------------------------------------------------------------//
-                // ELETTRA : Archiving Events
-                // --------------------------------------------------------------------------//
-                "UseEvents", "EventsDBUpdatePolicy"
-        // --------------------------------------------------------------------------//
-        // ELETTRA : Archiving Events
-        // --------------------------------------------------------------------------//
-        };
-
-        // Call database and extract values
-        // --------------------------------------------
-        final DbDatum[] dev_prop = get_db_device().get_property(propnames);
-        final HdbArchiverClass ds_class = (HdbArchiverClass) get_device_class();
-//        int i = -1;
-//
-//        // Extract SafetyPeriod value
-//        if (dev_prop[++i].is_empty() == false) {
-//            safetyPeriod = dev_prop[i].extractString();
-//        } else {
-//            // Try to get value from class property
-//            final DbDatum cl_prop = ds_class.get_class_property(dev_prop[i].name);
-//            if (cl_prop.is_empty() == false) {
-//                safetyPeriod = cl_prop.extractString();
-//            }
-//        }
-        int i = 0;
-
-        // Extract HasThreadedStartup value
-        if (dev_prop[++i].is_empty() == false) {
-            hasThreadedStartup = dev_prop[i].extractBoolean();
-        } else {
-            // Try to get value from class property
-            final DbDatum cl_prop = ds_class.get_class_property(dev_prop[i].name);
-            if (cl_prop.is_empty() == false) {
-                hasThreadedStartup = cl_prop.extractBoolean();
-            }
-        }
-
-        // Extract IsDedicated value
-        if (dev_prop[++i].is_empty() == false) {
-            isDedicated = dev_prop[i].extractBoolean();
-        } else {
-            // Try to get value from class property
-            final DbDatum cl_prop = ds_class.get_class_property(dev_prop[i].name);
-            if (cl_prop.is_empty() == false) {
-                isDedicated = cl_prop.extractBoolean();
-            }
-        }
-
-        // Extract ReservedAttributes value
-        if (dev_prop[++i].is_empty() == false) {
-            reservedAttributes = dev_prop[i].extractStringArray();
-        } else {
-            // Try to get value from class property
-            final DbDatum cl_prop = ds_class.get_class_property(dev_prop[i].name);
-            if (cl_prop.is_empty() == false) {
-                reservedAttributes = cl_prop.extractStringArray();
-            }
-        }
-
-        // Extract DiaryPath value
-        if (dev_prop[++i].is_empty() == false) {
-            diaryPath = dev_prop[i].extractString();
-        } else {
-            // Try to get value from class property
-            final DbDatum cl_prop = ds_class.get_class_property(dev_prop[i].name);
-            if (cl_prop.is_empty() == false) {
-                diaryPath = cl_prop.extractString();
-            }
-        }
-
-        // Extract HasDiary value
-        if (dev_prop[++i].is_empty() == false) {
-            hasDiary = dev_prop[i].extractBoolean();
-        } else {
-            // Try to get value from class property
-            final DbDatum cl_prop = ds_class.get_class_property(dev_prop[i].name);
-            if (cl_prop.is_empty() == false) {
-                hasDiary = cl_prop.extractBoolean();
-            }
-        }
-
-        // Extract DiaryLogLevel value
-        if (dev_prop[++i].is_empty() == false) {
-            diaryLogLevel = dev_prop[i].extractString();
-        } else {
-            // Try to get value from class property
-            final DbDatum cl_prop = ds_class.get_class_property(dev_prop[i].name);
-            if (cl_prop.is_empty() == false) {
-                diaryLogLevel = cl_prop.extractString();
-            }
-        }
-
-        // Extract IsHighRate value
-        if (dev_prop[++i].is_empty() == false) {
-            isHighRate = dev_prop[i].extractBoolean();
-        } else {
-            // Try to get value from class property
-            final DbDatum cl_prop = ds_class.get_class_property(dev_prop[i].name);
-            if (cl_prop.is_empty() == false) {
-                isHighRate = cl_prop.extractBoolean();
-            }
-        }
-        // End of Automatic code generation
-        // -------------------------------------------------------------
-
-        // --------------------------------------------------------------------------//
-        // ELETTRA : Archiving Events
-        // --------------------------------------------------------------------------//
-        // Extract UseEvents value
-        System.out.print("Seeing if events are enabled...");
-        if (dev_prop[++i].is_empty() == false) {
-            System.out.print(" in the device properties (" + dev_prop[i].name + ")... ");
-            isUseEvents = dev_prop[i].extractBoolean();
-        } else {
-            // Try to get value from class property
-            System.out.print(" (empty)\nLooking in class properties (" + dev_prop[i].name + ")... ");
-            final DbDatum cl_prop = ds_class.get_class_property(dev_prop[i].name);
-            if (cl_prop.is_empty() == false) {
-                isUseEvents = cl_prop.extractBoolean();
-            } else {
-                System.out.print("(empty) ");
-            }
-        }
-        System.out.println(isUseEvents);
-
-        // Extract EventsDBUpdatePolicy value
-        if (dev_prop[++i].is_empty() == false) {
-            eventDBUpdatePolicy = dev_prop[i].extractString();
-        } else {
-            // Try to get value from class property
-            final DbDatum cl_prop = ds_class.get_class_property(dev_prop[i].name);
-            if (cl_prop.is_empty() == false) {
-                eventDBUpdatePolicy = cl_prop.extractString();
-            }
-        }
-        System.out.println("The database priority is set to " + eventDBUpdatePolicy);
-
-        // --------------------------------------------------------------------------//
-        // ELETTRA : Archiving Events
-        // --------------------------------------------------------------------------//
-
-    }
-
-    // =========================================================
-    /**
-     * Method always executed before command execution.
-     */
-    // =========================================================
-    @Override
-    public void always_executed_hook() throws DevFailed {
-        // Uncomment to allow the device to trying reconnection when a commend
-        // is triggered. May not work with Oracle jdbc drivers.
-
-        // System.out.println(">>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> always executed hook");
-        // System.out.println("======================================== isDbProxy null : "
-        // + (dbProxy == null));
-        // if (dbProxy != null) {
-        // System.out.println("======================================== isDbConnected : "
-        // + dbProxy.isDbConnected());
-        // }
-        //
-        // if (dbProxy == null || (dbProxy != null && !dbProxy.isDbConnected()))
-        // {
-        // logger.info("Trying to reconnect database...");
-        // delete_device();
-        // init_device();
-        // }
-    }
-
-    // ===================================================================
-    /**
-     * Method called by the read_attributes CORBA operation to set internal
-     * attribute value.
-     * 
-     * @param attr
-     *            reference to the Attribute object
-     */
-    // ===================================================================
-    @Override
-    public void read_attr(final Attribute attr) throws DevFailed {
-        final String attr_name = attr.get_name();
-
-        // Switch on attribute name
-        // ---------------------------------
-        if (attr_name == "scalar_charge") {
-            // Add your own code here
-            attr.set_value(attr_scalar_charge_read);
-        } else if (attr_name == "spectrum_charge") {
-            // Add your own code here
-            attr.set_value(attr_spectrum_charge_read);
-        } else if (attr_name == "image_charge") {
-            // Add your own code here
-            attr.set_value(attr_image_charge_read);
-        } else if (attr_name == "version") {
-            // Add your own code here
-            attr.set_value(m_version);
-        }
-    }
-
-    // =========================================================
-    /**
-     * Execute command "TriggerArchiveConf" on device. This command is invoked
-     * when the archiving of a group of attributes is triggered. The group of
-     * attributes is therefore encapsulated in an ArchivingMessConfig type
-     * object. The use of this command suppose that the database is ready to
-     * host those attributes's values. That means registrations were made, the
-     * associated tables built, ...
-     * 
-     * @param argin
-     *            The group of attributes to archive
-     * @see ArchivingMessConfig
-     * @see AttributeLightMode
-     */
-    // =========================================================
-    public void trigger_archive_conf(final String[] argin) throws DevFailed {
-        TangoStateUtils.isAllowed(this);
-        try {
-            triggerArchiving(argin, true);
-        } finally {
-            TangoStateUtils.updateState(this, koAttributes, okAttributes);
-        }
-    }
-
-    private void triggerArchiving(final String[] argin, final boolean updateAMTTable) throws DevFailed {
-        TangoStateUtils.setRunning(this);
-        logger.debug("trigger_archive_conf - in");
-        final ArchivingException archivingException = new ArchivingException();
-
-        final ArchivingMessConfig archivingMessConfig = ArchivingMessConfig.creationWithFullInformation(argin);
-        archivingMessConfig.filter(isDedicated, reservedAttributes);
-        final Set<String> attributes = archivingMessConfig.getAttributeListKeys();
-        for (final String attributeName : attributes) {
-            // logger.trace(ILogger.LEVEL_INFO, "===> Attribute Name = " +
-            // attributeName);
-            final AttributeLightMode attributeLightMode = archivingMessConfig.getAttribute(attributeName);
-            attributeLightMode.setTrigger_time(new Timestamp(System.currentTimeMillis()));
-            boolean attSupport = false;
-            final String attCompleteName = attributeLightMode.getAttributeCompleteName();
-            logger.debug("managing " + attCompleteName);
-            try {
-                attSupport = AttributeSupport.checkAttributeSupport(attCompleteName, attributeLightMode.getDataType(),
-                        attributeLightMode.getDataFormat(), attributeLightMode.getWritable());
-                logger.debug(attCompleteName + " support " + attSupport);
-                if (attSupport) {
-                    if (isHighRate) {
-                        attributeLightMode.getMode().checkMode(false, attCompleteName);
-                    } else {
-                        attributeLightMode.getMode().checkMode(true, attCompleteName);
-                    }
-                    attributeLightMode.setDevice_in_charge(device_name);
-
-                    // if (
-                    // this.dbProxy.isArchived(attributeLightMode.getAttribute_complete_name())
-                    // )
-                    // this.dbProxy.updateModeRecord(attributeLightMode.getAttribute_complete_name());
-
-                    // --------------------------------------------------------------------------//
-                    // ELETTRA : Archiving Events Begin
-                    // --------------------------------------------------------------------------//
-                    // ////////////////////////////new method //////////
-                    /*
-                     * Can be put in the hdbArchiver.java. We can call it
-                     * updateAMT()
-                     */
-
-                    /*
-                     * if(events_enabled() ) { if(overwriteAMTFromTangoDB() ) {
-                     * getDataFromTangoDB(); attributeLightMode.setPeriod();
-                     * attributeLightMode.setAbsChange();
-                     * attributeLightMode.setRelativeChange(); } }
-                     */
-
-                    // SPZJ : Is it really the good place ?
-                    // --------------------------------------------------------------------------//
-                    // ELETTRA : Archiving Events End
-                    // --------------------------------------------------------------------------//
-
-                    // remove attribute from current collector
-                    collectorFactory.remove(attCompleteName);
-                    if (dbProxy != null) {
-                        // start collector
-                        final HdbCollector m_collector = collectorFactory.get(attributeLightMode);
-                        if (m_collector == null) {
-                            logger.debug("createCollectorAndAddSource " + attCompleteName);
-                            collectorFactory.createCollectorAndAddSource(attributeLightMode, dbProxy);
-                        } else {
-                            logger.debug("addSource " + attCompleteName);
-                            m_collector.addSource(attributeLightMode);
-                        }
-                        // update AMT table in db with attribute config
-                        if (updateAMTTable) {
-                            if (dbProxy.isArchived(attCompleteName, device_name)) {
-                                logger.debug("updateModeRecord - in");
-                                dbProxy.updateModeRecord(attCompleteName);
-                                logger.debug("updateModeRecord - out");
-                            }
-
-                            logger.debug("insertModeRecord - in");
-                            dbProxy.insertModeRecord(attributeLightMode);
-                            logger.debug("insertModeRecord - out");
-                        }
-
-                        // update period in dbProxy, used in cmd
-                        // retry_for_ko_attributes
-                        final int period = attributeLightMode.getMode().getModeP().getPeriod();
-                        logger.debug(attCompleteName + "'s period is " + period);
-                        dbProxy.setPeriodForAttribute(attCompleteName, period);
-                    }
-                    // --------------------------------------------------------------------------//
-                    // ELETTRA : Archiving Events
-                    // --------------------------------------------------------------------------//
-                    /*
-                     * here we could call another new method to update the tango
-                     * db
-                     */
-                    /*
-                     * if(events_enabled() ) { if(overwriteTangoDbFromAMT() ) {
-                     * // attributeLightMode contains the properies from amt
-                     * updateTangoDbFromAmt(attributeLightMode); } }
-                     */
-                    // ////////// end new method /////////////////
-                    // --------------------------------------------------------------------------//
-                    // ELETTRA : Archiving Events
-                    // --------------------------------------------------------------------------//
-
-                }
-                okAttributes.add(attCompleteName.toLowerCase());
-                koAttributes.remove(attCompleteName.toLowerCase());
-                logger.debug("OK: " + attCompleteName);
-            } catch (final ArchivingException e) {
-                try {
-                    collectorFactory.remove(attCompleteName);
-                } catch (final ArchivingException e1) {
-                }
-                e.printStackTrace();
-                final String message = GlobalConst.ARCHIVING_ERROR_PREFIX + " : ";
-                archivingException.addStack(message, e);
-                logger.error("start failed", e);
-                String name = attCompleteName.toLowerCase();
-                koAttributes.add(name);
-                okAttributes.remove(name);
-                collectorFactory.registerError(attCompleteName, e);
-                logger.error("KO: " + attCompleteName);
-            } catch (final Exception e) {
-                try {
-                    collectorFactory.remove(attCompleteName);
-                } catch (final ArchivingException e1) {
-                }
-                String name = attCompleteName.toLowerCase();
-                koAttributes.add(name);
-                okAttributes.remove(name);
-                e.printStackTrace();
-                collectorFactory.registerError(attCompleteName, e);
-                logger.error("KO " + attCompleteName + " unexpected " + e);
-            }
-        }
-
-        computeLoads();
-        if (!archivingException.getMessage().equals("")) {
-            logger.error("trigger_archive_conf ERROR - out");
-            throw archivingException.toTangoException();
-        }
-
-        logger.debug("trigger_archive_conf - out");
-    }
-
-    // =========================================================
-    /**
-     * Execute command "TriggerArchiveAtt" on device. This command is invoked
-     * when the archiving of an attribute is triggered. The attribute to archive
-     * is therefore encapsulated in a
-     * fr.soleil.hdbtdbArchivingApi.ArchivingTools.Tools.AttributeLight type
-     * object. The use of this command suppose that the HDB database is ready to
-     * host that attribute's values. That means the registration was made, the
-     * associated table built, ...
-     * 
-     * @param argin
-     *            The attribute to archive
-     * @see ArchivingMessConfig
-     * @see AttributeLightMode
-     * @deprecated use trigger_archive_conf(String[] argin) instead
-     */
-    // =========================================================
-    @Deprecated
-    public void trigger_archive_att(final String[] argin) throws DevFailed {
-    }
-
-    // =========================================================
-    /**
-     * Execute command "TriggerArchiveAttCheck" on device. This command is
-     * invoked when the archiving of an attribute is triggered. Before
-     * archiving, this command checks that HDB database is ready to host the
-     * given attribute values. If not registrations is done and the associated
-     * table is built.
-     * 
-     * @param argin
-     *            The name of the attribute to archive
-     * @deprecated use trigger_archive_conf(String[] argin) instead
-     */
-    // =========================================================
-    @Deprecated
-    public void trigger_archive_att_check(final String argin) throws DevFailed {
-        logger.info("Entering trigger_archive_att_check()");
-        logger.info("Exiting trigger_archive_att_check()");
-    }
-
-    // =========================================================
-    /**
-     * Execute command "StopArchiveConf" on device. This command is invoked when
-     * stopping the archiving of a group of attributes.
-     * 
-     * @param argin
-     *            The group of attributes
-     */
-    // =========================================================
-    public void stop_archive_conf(final String[] argin) throws DevFailed {
-        // TangoStateUtils.isAllowed(this);
-        // TangoStateUtils.setRunning(this);
-        try {
-            logger.debug("stop_archive_conf - in");
-            final Collection<AttributeLightMode> myConf = ArchivingManagerApiRef.stoppingVector(argin);
-            for (AttributeLightMode attrMode : myConf) {
-                stop_archive_att(attrMode.toArray());
-            }
-
-        } finally {
-            logger.debug("stop_archive_conf - out");
-        }
-    }
-
-    // =========================================================
-    /**
-     * Execute command "RetryForAttribute" on device. Tries to start archiving
-     * for a given attribute, specified by its complete name.
-     * 
-     * @param attributeToRetry
-     *            The complete name of the attribute
-     * @return A return code, can be either: 10 (the archiver isn't in charge of
-     *         the specified attribute) 20 (the retry succeeded) or 30 (the
-     *         retry failed)
-     * @throws DevFailed
-     */
-    // =========================================================
-    public short retry_for_attribute(final String attributeToRetry) throws DevFailed {
-        reconnectDatabaseIfNecessary();
-        TangoStateUtils.isAllowed(this);
-        short result;
-        if ((attributeToRetry == null) || attributeToRetry.isEmpty()) {
-            logger.debug("no retry done - no attribute");
-            result = NA;
-        } else if (dbProxy == null) {
-            logger.debug("no retry done - no connection to the database");
-            result = NA;
-        } else {
-            try {
-                final Collection<AttributeLightMode> myCurrentTasks = dbProxy.getArchiverCurrentTasks(device_name);
-
-                final ArchivingMessConfig archivingMessConfig = ArchivingMessConfig.basicObjectCreation();
-
-                boolean configIsNotEmpty = false;
-                for (final AttributeLightMode attributeLightMode : myCurrentTasks) {
-                    final String attrName = attributeLightMode.getAttributeCompleteName();
-                    if (attrName.equalsIgnoreCase(attributeToRetry)) {
-                        archivingMessConfig.add(attributeLightMode);
-                        configIsNotEmpty = true;
-                        break;
-                    }
-                }
-                if (configIsNotEmpty) {
-                    final boolean forceThreadedMode = true;
-                    logger.debug("retry attribute {}", attributeToRetry);
-                    launchStartArchivingTask(archivingMessConfig, forceThreadedMode, false);
-                    result = SUCCEEDED;
-                } else {
-                    logger.debug(attributeToRetry + " no retry done - config is empty");
-                    result = NA;
-                }
-            } catch (final ArchivingException e) {
-                logger.error("Failed during retry_for_attribute ( " + attributeToRetry + " ):", e);
-                result = FAILED;
-            }
-        }
-        return result;
-    }
-
-    // =========================================================
-    /**
-     * Execute command "RetryForAttributes" on device. Tries to start archiving
-     * for a given list of attributes, specified by their complete names.
-     * 
-     * @param attributesToRetry
-     *            The complete names of the attributes
-     * @return A return code, can be either: 10 (the archiver isn't in charge of
-     *         any of the specified attributes) 20 (the retry succeeded) or 30
-     *         (the retry failed)
-     * @throws DevFailed
-     */
-    // =========================================================
-    public short retry_for_attributes(final String[] attributesToRetry) throws DevFailed {
-        reconnectDatabaseIfNecessary();
-        TangoStateUtils.isAllowed(this);
-        short result;
-        if ((attributesToRetry == null) || (attributesToRetry.length == 0) || (dbProxy == null)) {
-            result = NA;
-        } else {
-            try {
-                final Collection<AttributeLightMode> myCurrentTasks = dbProxy.getArchiverCurrentTasks(device_name);
-                final Map<String, AttributeLightMode> modes = new HashMap<String, AttributeLightMode>(
-                        myCurrentTasks.size());
-                for (final AttributeLightMode attributeLightMode : myCurrentTasks) {
-                    final String attrName = attributeLightMode.getAttributeCompleteName();
-                    modes.put(attrName.toLowerCase().trim(), attributeLightMode);
-                }
-                boolean configIsNotEmpty = false;
-                final ArchivingMessConfig archivingMessConfig = ArchivingMessConfig.basicObjectCreation();
-                Collection<String> attributeNotRetried = new ArrayList<String>(attributesToRetry.length);
-                Collection<String> attributeRetried = new ArrayList<String>(attributesToRetry.length);
-                if (modes.isEmpty()) {
-                    for (final String currentName : attributesToRetry) {
-                        attributeNotRetried.add(currentName);
-                    }
-                } else {
-                    for (final String currentName : attributesToRetry) {
-                        final AttributeLightMode attributeLightMode = modes.get(currentName.toLowerCase().trim());
-                        if (attributeLightMode == null) {
-                            attributeNotRetried.add(currentName);
-                        } else {
-                            attributeRetried.add(currentName);
-                            archivingMessConfig.add(attributeLightMode);
-                            configIsNotEmpty = true;
-                        }
-                    }
-                }
-                StringBuilder builder = new StringBuilder("Retry asked for ");
-                builder.append(Arrays.toString(attributesToRetry));
-                if (configIsNotEmpty) {
-                    final boolean forceThreadedMode = true;
-                    builder.append("\n\t- Retried attributes ").append(attributeRetried);
-                    launchStartArchivingTask(archivingMessConfig, forceThreadedMode, false);
-                    result = SUCCEEDED;
-                } else {
-                    result = NA;
-                }
-                if (!attributeNotRetried.isEmpty()) {
-                    builder.append("\n\t- Could not retry attributes ").append(attributeNotRetried);
-                }
-                attributeRetried.clear();
-                attributeNotRetried.clear();
-                logger.debug(builder.toString());
-            } catch (final Throwable t) {
-                final DevFailed devFailed = new DevFailed();
-                devFailed.initCause(t);
-                devFailed.setStackTrace(t.getStackTrace());
-                final String message = DBTools.getCompleteMessage(devFailed);
-                logger.error(message);
-                logger.error("Failed during retry_for_attributes ( " + Arrays.toString(attributesToRetry) + " ):");
-                result = FAILED;
-            }
-        }
-        return result;
-    }
-
-    // =========================================================
-    /**
-     * Execute command "RetryForKoAttributes" on device. Looks up the complete
-     * list of attributes that:
-     * <UL>
-     * <LI>the archiver is supposed to be taking care of
-     * <LI>aren't correctly archiving, according to the archiver's internal controls
-     * </UL>
-     * , then starts archiving on all of them.
-     * 
-     * @return A return code, can be either: 10 (the archiver isn't in charge of
-     *         any attribute, or they are all correctly archiving) 20 (the retry
-     *         succeeded) or 30 (the retry failed)
-     * @throws DevFailed
-     */
-    // =========================================================
-    public short retry_for_ko_attributes() throws DevFailed {
-        logger.debug("retry_for_ko_attributes");
-        reconnectDatabaseIfNecessary();
-        TangoStateUtils.isAllowed(this);
-        return retry_for_attributes(koAttributes.toArray(new String[koAttributes.size()]));
-    }
-
-    // private ControlResult getControlResult() throws DevFailed,
-    // ArchivingException {
-    // try {
-    // final ControlResult cr = new ControlResult();
-    // final Vector[] listOfControlledAttributes = getControlledAttributes();
-    //
-    // cr.setLines(listOfControlledAttributes);
-    //
-    // return cr;
-    // } catch (final DevFailed e) {
-    // e.printStackTrace();
-    // final String message = DBTools.getCompleteMessage(e);
-    // logger.error(message);
-    // throw e;
-    // } catch (final Exception e) {
-    // e.printStackTrace();
-    // }
-    // return null;
-    // }
-
-    // =========================================================
-    /**
-     * Execute command "IsAttributeCorrectlyArchivedCurrent" on device. Returns
-     * whether a given attribute, specified by its complete name, is correctly
-     * archiving, based on the archiver's internal controls.
-     * 
-     * @param argin
-     *            The complete name of the attribute
-     * @return True if this attribute is archiving correctly
-     */
-    // =========================================================
-    public boolean is_attribute_correctly_archived_internal(final String argin) throws DevFailed {
-        // ControlResult _controlResult = null;
-        // try {
-        // _controlResult = getControlResult();
-        // } catch (final DevFailed e) {
-        // final String message = DBTools.getCompleteMessage(e);
-        // logger.error(message);
-        //
-        // throw e;
-        // } catch (final ArchivingException t) {
-        // t.printStackTrace();
-        // DBTools.throwDevFailed(t);
-        // }
-        //
-        // if (_controlResult == null) {
-        // throw new DevFailed(getNotYetReadyError());
-        // }
-
-        // return _controlResult.isAttributeCorrectlyArchived(argin);
-        return true;
-    }
-
-    // =========================================================
-    /**
-     * Execute command "getErrorsForDomainInternal" on device. Returns the list
-     * of all KO attributes (attributes that aren't correctly archiving) for a
-     * given domain name, based on the archiver's internal controls.
-     * 
-     * @param argin
-     *            The domain name
-     * @return The list of all KO attributes for this domain
-     */
-    // =========================================================
-    public String[] get_errors_for_domain_internal(final String argin) throws DevFailed {
-        // final String[] empty = new String[0];
-        // ControlResult _controlResult = null;
-        // // System.out.println ( "CLA--------------------------1" );
-        // try {
-        // _controlResult = getControlResult();
-        // } catch (final DevFailed e) {
-        // final String message = DBTools.getCompleteMessage(e);
-        // logger.error(message);
-        // throw e;
-        // } catch (final ArchivingException t) {
-        // t.printStackTrace();
-        // DBTools.throwDevFailed(t);
-        // }
-        //
-        // if (_controlResult == null) {
-        // return empty;
-        // }
-        //
-        // final Map<String, Domain> _errorDomains =
-        // _controlResult.getErrorDomains();
-        // if (_errorDomains == null) {
-        // return empty;
-        // }
-        //
-        // final Domain domain = _errorDomains.get(argin);
-        // if (domain == null) {
-        // return empty;
-        // }
-        //
-        // final Hashtable _errorAttributes = domain.getKOAttributes();
-        // if (_errorAttributes == null) {
-        // return empty;
-        // }
-        //
-        // final String[] argout = new String[_errorAttributes.size()];
-        // final Enumeration keys = _errorAttributes.keys();
-        // int i = 0;
-        //
-        // while (keys.hasMoreElements()) {
-        // final String key = (String) keys.nextElement();
-        // final ArchivingAttribute attribute = (ArchivingAttribute)
-        // _errorAttributes.get(key);
-        //
-        // final String line = formatLine(attribute);
-        //
-        // argout[i] = line;
-        // i++;
-        // }
-        //
-        // return argout;
-        return new String[0];
-    }
-
-    // private String formatLine(final ArchivingAttribute attribute) {
-    // final StringBuilder buff = new StringBuilder();
-    //
-    // final String completeName = attribute.getCompleteName();
-    // final int period = attribute.getPeriod();
-    // final Timestamp lastInsert = attribute.getLastInsert();
-    // final Timestamp lastInsertRequest = attribute.getLastInsertRequest();
-    //
-    // buff.append(completeName);
-    // buff.append("          period: " + period);
-    // buff.append("     lastInsert: " + lastInsert);
-    // buff.append("     lastInsertRequest: " + lastInsertRequest);
-    //
-    // final String ret = buff.toString();
-    // return ret;
-    // }
-
-    // =========================================================
-    /**
-     * Execute command "getErrorDomainsInternal" on device. Returns the list of
-     * all domains that have at least one attribute not correctly archiving,
-     * based on the archiver's internal controls.
-     * 
-     * @return The list of all domains that have at least one attribute not
-     *         correctly archiving
-     */
-    // =========================================================
-    public String[] get_error_domains_internal() throws DevFailed {
-        // System.out.println("get_error_domains_internal in ");
-        // ControlResult _controlResult = null;
-        // try {
-        // _controlResult = getControlResult();
-        // } catch (final DevFailed e) {
-        // final String message = DBTools.getCompleteMessage(e);
-        // logger.error(message);
-        // throw e;
-        // } catch (final ArchivingException t) {
-        // t.printStackTrace();
-        // DBTools.throwDevFailed(t);
-        // }
-        //
-        // final String[] empty = new String[0];
-        // if (_controlResult == null) {
-        // return empty;
-        // }
-        //
-        // final Map<String, Domain> _errorDomains =
-        // _controlResult.getErrorDomains();
-        // return _errorDomains.keySet().toArray(new
-        // String[_errorDomains.size()]);
-        return new String[0];
-    }
-
-    // =========================================================
-    /**
-     * Execute command "getErrorsForAttributeInternal" on device. Returns the
-     * list of all KO attributes (attributes that aren't correctly archiving)
-     * for a given attribute name, based on the archiver's internal controls.
-     * 
-     * @param argin
-     *            The attribute name
-     * @return The list of all KO attributes sharing this name
-     */
-    // =========================================================
-    public String[] get_errors_for_attribute_internal(final String argin) throws DevFailed {
-        // ControlResult _controlResult = null;
-        // // System.out.println ( "CLA--------------------------1" );
-        // try {
-        // _controlResult = getControlResult();
-        // } catch (final DevFailed e) {
-        // final String message = DBTools.getCompleteMessage(e);
-        // logger.error(message);
-        // throw e;
-        // } catch (final Throwable t) {
-        // t.printStackTrace();
-        // DBTools.throwDevFailed(t);
-        // }
-        //
-        // final String[] empty = new String[0];
-        // if (_controlResult == null) {
-        // return empty;
-        // }
-        //
-        // final Map<String, ArchivingAttributeSubName> _errorAttributeSubNames
-        // = _controlResult.getErrorSubAttributes();
-        // if (_errorAttributeSubNames == null) {
-        // return empty;
-        // }
-        //
-        // final ArchivingAttributeSubName attributeSubName =
-        // _errorAttributeSubNames.get(argin);
-        // if (attributeSubName == null) {
-        // return empty;
-        // }
-        //
-        // final Hashtable _errorAttributes =
-        // attributeSubName.getKOAttributes();
-        // if (_errorAttributes == null) {
-        // return empty;
-        // }
-        //
-        // final String[] argout = new String[_errorAttributes.size()];
-        // final Enumeration keys = _errorAttributes.keys();
-        // int i = 0;
-        //
-        // while (keys.hasMoreElements()) {
-        // final String key = (String) keys.nextElement();
-        // final ArchivingAttribute attribute = (ArchivingAttribute)
-        // _errorAttributes.get(key);
-        //
-        // final String line = formatLine(attribute);
-        //
-        // argout[i] = line;
-        // i++;
-        // }
-
-        // return argout;
-        return new String[0];
-    }
-
-    public String getErrorMessageForAttribute(String attributeName) {
-        final HdbCollector hdbCollector = collectorFactory.quickGet(attributeName);
-        String result;
-        if (hdbCollector == null) {
-            StringBuilder builder = new StringBuilder("No HdbCollector found for attribute '");
-            builder.append(attributeName).append("' - Reason: ");
-            try {
-                if (dbProxy != null) {
-                    final Collection<AttributeLightMode> myCurrentTasks = dbProxy.getArchiverCurrentTasks(device_name);
-                    boolean done = false;
-                    for (final AttributeLightMode attributeLightMode : myCurrentTasks) {
-                        final String attrName = attributeLightMode.getAttributeCompleteName();
-                        if (attrName.equalsIgnoreCase(attributeName)) {
-                            done = true;
-                            String message = collectorFactory.getLastError(attributeLightMode);
-                            if ((message == null) || (message.trim().isEmpty())) {
-                                builder.append(" no valid reason found");
-                            } else {
-                                builder.append(message);
-                            }
-                            break;
-                        }
-                    }
-                    if (!done) {
-                        builder.append(" this attribute does not seem to be managed by this archiver");
-                    }
-                }
-            } catch (Exception e) {
-                builder.append(" Could not recover attribute archiving configuration: ").append(e.getMessage());
-            }
-            result = builder.toString();
-        } else {
-            result = hdbCollector.getErrorMessage(attributeName);
-        }
-        if (result == null) {
-            result = "";
-        }
-        return result;
-    }
-
-    // =========================================================
-    /**
-     * Execute command "RetryForAll" on device. Looks up the complete list of
-     * attributes the archiver is supposed to be taking care of, then starts
-     * archiving on all of them. Those that are already archiving aren't
-     * impacted.
-     * 
-     * @return A return code, can be either: 10 (the archiver isn't in charge of
-     *         any attribute) 20 (the retry succeeded) or 30 (the retry failed)
-     * @throws DevFailed
-     */
-    // =========================================================
-    public short retry_for_all() throws DevFailed {
-        reconnectDatabaseIfNecessary();
-        TangoStateUtils.isAllowed(this);
-        short result;
-        if (dbProxy == null) {
-            result = FAILED;
-        } else {
-            try {
-                final Collection<AttributeLightMode> myCurrentTasks = dbProxy.getArchiverCurrentTasks(device_name);
-
-                final ArchivingMessConfig archivingMessConfig = ArchivingMessConfig.basicObjectCreation();
-                for (AttributeLightMode mode : myCurrentTasks) {
-                    archivingMessConfig.add(mode);
-                }
-
-                if (myCurrentTasks.size() > 0) {
-                    logger.debug("retry for all attributes");
-                    final boolean forceThreadedMode = true;
-                    launchStartArchivingTask(archivingMessConfig, forceThreadedMode, false);
-
-                    result = SUCCEEDED;
-                } else {
-                    result = NA;
-                }
-            } catch (final ArchivingException t) {
-                final DevFailed devFailed = new DevFailed();
-                devFailed.initCause(t);
-                devFailed.setStackTrace(t.getStackTrace());
-
-                final String message = DBTools.getCompleteMessage(devFailed);
-                logger.warn("Failed during retry_for_all ():");
-                logger.warn(message);
-
-                result = FAILED;
-            }
-        }
-        return result;
-    }
-
-    private void computeLoads() {
-        final int[] loads = collectorFactory.factoryLoadAssessment();
-        attr_scalar_charge_read = loads[0];
-        attr_spectrum_charge_read = loads[1];
-        attr_image_charge_read = loads[2];
-    }
-
-    // =========================================================
-    /**
-     * Execute command "StopArchiveAtt" on device. Command that stops the
-     * archiving of an attibute. This command need an AttributeLightMode type
-     * object. An AttributeLightMode type object encapsulate all the
-     * informations needed to found the Collector in charge of the archiving of
-     * the specified attribute The informations needed are the type, the format,
-     * the writable property and the archiving mode
-     * 
-     * @param argin
-     *            the attribute on witch archiving must be stopped
-     */
-    // =========================================================
-    public void stop_archive_att(final String[] argin) throws DevFailed {
-        TangoStateUtils.isAllowed(this);
-        TangoStateUtils.setRunning(this);
-        logger.debug("stop_archive_att - in");
-        try {
-            final String attributeName = argin[0];
-            // final AttributeLightMode attributeLightMode =
-            // AttributeLightMode.creationWithFullInformation(argin);
-            logger.debug("attribute: " + attributeName);
-            if ((dbProxy != null)
-                    && (koAttributes.contains(attributeName.toLowerCase()) || okAttributes.contains(attributeName
-                            .toLowerCase()))) {
-                // stop only if attribute is managed by this archiver
-                dbProxy.updateModeRecord(attributeName);
-                final HdbCollector hdbCollector = collectorFactory.get(attributeName);
-                if (hdbCollector != null) {
-                    hdbCollector.removeSource(attributeName);
-                }
-                koAttributes.remove(attributeName.toLowerCase());
-                okAttributes.remove(attributeName.toLowerCase());
-            } else {
-                DevFailedUtils.throwDevFailed(attributeName + " is not archived by this device");
-            }
-        } catch (final ArchivingException e) {
-            logger.error("stop failed", e);
-            e.printStackTrace();
-            throw e.toTangoException();
-        } finally {
-            computeLoads();
-            TangoStateUtils.updateState(this, koAttributes, okAttributes);
-            logger.debug("stop_archive_att - out");
-        }
-    }
-
-    // =========================================================
-    /**
-     * Execute command "StateDetailed" on device. This command returns a
-     * detailed state of the device.
-     * 
-     * @return The detailed state
-     */
-    // =========================================================
-    public String state_detailed() throws DevFailed {
-        String argout = new String();
-        logger.info("Entering state_detailed()");
-
-        // ---Add your Own code to control device here ---
-        final StringBuilder stringBuffer = new StringBuilder();
-        stringBuffer.append(TangoStateUtils.statusToString(koAttributes, okAttributes));
-        stringBuffer.append(collectorFactory.factoryAssessment());
-
-        argout = stringBuffer.toString();
-        logger.info("Exiting state_detailed()");
-        return argout;
-    }
-
-    // private static DevError[] getNotYetReadyError() {
-    // final ErrSeverity severity = ErrSeverity.WARN;
-    // final String reason = ControlResult.EMPTY_REPORT;
-    // final String desc = ControlResult.EMPTY_REPORT;
-    // final String origin = ControlResult.EMPTY_REPORT;
-    //
-    // final DevError devError = new DevError(reason, severity, desc, origin);
-    // final DevError[] ret = new DevError[1];
-    // ret[0] = devError;
-    // return ret;
-    // }
-
-    @Override
-    public void delete_device() throws DevFailed {
-        // if (dbProxy != null && dbProxy.isDbConnected()) {
-        // dbProxy.closeConnection();
-        // // Except.throw_exception("not supported", "please, restart device",
-        // // "delete_device");
-        // }
-    }
-
-    // =========================================================
-    /**
-     * main part for the device server class
-     */
-    // =========================================================
-    public static void main(final String[] argv) {
-        try {
-            final Util tg = Util.init(argv, ConfigConst.HDB_CLASS_DEVICE);
-            // UtilCLA tg = (UtilCLA) UtilCLA.init(argv , ConfigConst.HDB_CLASS_DEVICE);
-            // UtilCLA tgCLA = UtilCLA.castToUtilCLA ( tg );
-
-            tg.server_init();
-
-            System.out.println("Ready to accept request");
-
-            // tgCLA.server_run();
-            tg.server_run();
-        } catch (final OutOfMemoryError ex) {
-            System.err.println("Can't allocate memory !!!!");
-            System.err.println("Exiting");
-        } catch (final UserException ex) {
-            Except.print_exception(ex);
-
-            System.err.println("Received a CORBA user exception");
-            System.err.println("Exiting");
-        } catch (final SystemException ex) {
-            Except.print_exception(ex);
-
-            System.err.println("Received a CORBA system exception");
-            System.err.println("Exiting");
-        }
-
-        System.exit(-1);
-    }
-
-}
-
-// --------------------------------------------------------------------------
-/*
- * end of $Source:
- * /cvsroot/tango-cs/tango/jserver/archiving/HdbArchiver/HdbArchiver.java,v $
- */
+// +============================================================================
+// $Source:
+// /cvsroot/tango-cs/tango/jserver/archiving/HdbArchiver/HdbArchiver.java,v $
+//
+// project : Tango Device Server
+//
+// Description: java source code for the HdbArchiver class and its commands.
+// This class is derived from DeviceImpl class.
+// It represents the CORBA servant obbject which
+// will be accessed from the network. All commands which
+// can be executed on the HdbArchiver are implemented
+// in this file.
+//
+// $Author: pierrejoseph $
+//
+// $Revision: 1.89 $
+//
+// $Log: HdbArchiver.java,v $
+// Revision 1.89 2007/10/03 15:23:46 pierrejoseph
+// Merged between Polling and Events code
+//
+// Revision 1.88.2.1 2007/09/28 14:48:08 pierrejoseph
+// Merged between Polling and Events code
+//
+// Revision 1.88 2007/08/27 14:14:50 pierrejoseph
+// Traces addition
+//
+// Revision 1.87 2007/06/15 07:46:47 pierrejoseph
+// add traces in trigger to locate the collector freezing
+//
+// Revision 1.86 2007/06/07 09:54:21 pierrejoseph
+// Traces addition to locate when the device stays in the RUNNING state
+//
+// Revision 1.85 2007/05/11 13:58:34 pierrejoseph
+// Attribute addition : release version
+//
+// Revision 1.84 2007/05/10 16:23:45 chinkumo
+// Archiving Version 1.2.0 for Tango 5.5.8
+//
+// Revision 1.83 2007/04/05 10:06:04 chinkumo
+// New Release 5.5.7
+//
+// Revision 1.82 2007/03/27 09:17:52 ounsy
+// move the AMT updating upwards in stop_archive_att so that the archiving can
+// be stopped even if no collector was created (as can happen for reserved
+// attributes of formerly-dedicated archivers).
+//
+// Revision 1.81 2007/03/05 16:25:20 ounsy
+// non-static DataBase
+//
+// Revision 1.80 2007/02/26 16:14:24 ounsy
+// archiving devices now inherits just from DeviceImpl instead of
+// DeviceImplWithShutdownRunnable (they're nonlonger unexported onn shutdown)
+//
+// Revision 1.79 2007/02/26 08:31:47 chinkumo
+// For Tango 5.5.6
+//
+// Revision 1.78 2007/02/19 13:01:45 pierrejoseph
+// Add a trace in case of insertion error in amt table.
+//
+// Revision 1.77 2007/02/19 09:06:26 chinkumo
+// Release 19 - 02 - 2007 for Tango 5.5.6
+//
+// Revision 1.76 2007/01/11 07:35:52 chinkumo
+// Release / 2007-01-11
+//
+// Revision 1.75 2007/01/09 16:44:58 ounsy
+// commands that lock the device into the RUNNING state now set it back to ON
+// even if they encountered exceptions. in this case an entry is logged into the
+// archiver's diary.
+//
+// Revision 1.74 2007/01/09 15:16:04 ounsy
+// put the Giacomo version back for XDBCollectorFactory.removeAllForAttribute
+//
+// Revision 1.73 2007/01/05 12:56:35 pierrejoseph
+// Modification of the ArchivingMessConfig object creation and the
+// trigger_archive_conf method argin has lost its first value.
+//
+// Revision 1.72 2007/01/04 08:48:02 chinkumo
+// Production of the dated version 2007-01-04
+//
+// Revision 1.71 2006/12/08 07:45:14 chinkumo
+// date of the version : 2006-12-08
+//
+// Revision 1.70 2006/11/24 14:54:17 ounsy
+// we re-use the old removeAllForAttribute
+//
+// Revision 1.69 2006/11/24 14:04:16 ounsy
+// the diary entry in case of missing collector is now done by he archiver
+//
+// Revision 1.68 2006/11/24 13:19:35 ounsy
+// TdbCollectorFactory.get(attrLightMode) has a new parameter
+// "doCreateCollectorIfMissing". A missing collector will only be created if
+// this is true, otherwise a message in logged into the archiver's diary and an
+// exception launched
+//
+// Revision 1.67 2006/11/20 09:23:51 ounsy
+// minor changes
+//
+// Revision 1.65 2006/11/13 15:57:37 ounsy
+// all java devices now inherit from UnexportOnShutdownDeviceImpl instead of
+// from DeviceImpl
+//
+// Revision 1.64 2006/10/30 14:34:49 ounsy
+// minor change
+//
+// Revision 1.63 2006/10/18 14:50:45 ounsy
+// release date updated
+//
+// Revision 1.62 2006/10/17 14:50:09 ounsy
+// release date updated
+//
+// Revision 1.61 2006/10/13 15:00:20 ounsy
+// release date updated
+//
+// Revision 1.60 2006/10/11 08:44:15 ounsy
+// release date updated
+//
+// Revision 1.59 2006/10/11 08:31:19 ounsy
+// modified the trigger_archive_conf commands to accept the same parameters as
+// the archiving manager
+//
+// Revision 1.58 2006/10/09 13:55:34 ounsy
+// removed logs
+//
+// Revision 1.57 2006/10/05 15:42:04 ounsy
+// added archivingMessConfig.filter in trigger_archive_conf
+//
+// Revision 1.56 2006/09/26 15:51:42 ounsy
+// minor changes
+//
+// Revision 1.55 2006/09/15 08:56:54 ounsy
+// release date updated
+//
+// Revision 1.54 2006/09/13 09:49:43 ounsy
+// corrected a bug in getDeviceproperty
+//
+// Revision 1.53 2006/09/12 13:01:42 ounsy
+// methods that put the archiver in the RUNNING state now do it from the start
+// and only go to the ON state at the end of the method
+//
+// Revision 1.52 2006/09/08 14:17:20 ounsy
+// added missing descriptions of properties
+//
+// Revision 1.51 2006/08/29 15:14:42 ounsy
+// release date updated
+//
+// Revision 1.50 2006/08/29 08:44:51 ounsy
+// corrected a bug in getControlResult()
+//
+// Revision 1.49 2006/08/23 09:41:01 ounsy
+// minor changes
+//
+// Revision 1.48 2006/08/10 09:28:28 ounsy
+// release date updated
+//
+// Revision 1.47 2006/08/08 12:22:39 ounsy
+// release date updated
+//
+// Revision 1.46 2006/07/31 08:01:23 ounsy
+// release date updated
+//
+// Revision 1.45 2006/07/31 08:00:55 ounsy
+// release date updated
+//
+// Revision 1.44 2006/07/28 13:50:40 ounsy
+// corrected the method name in logRetry
+//
+// Revision 1.43 2006/07/28 09:33:39 ounsy
+// added diary logging on retryForXXXmethods
+//
+// Revision 1.42 2006/07/26 08:35:22 ounsy
+// initDevice synchronized + minor changes
+//
+// Revision 1.41 2006/07/25 16:24:17 ounsy
+// HdbCollectorFactory no more static
+//
+// Revision 1.40 2006/07/25 13:39:14 ounsy
+// correcting bad merge
+//
+// Revision 1.39 2006/07/25 13:22:32 ounsy
+// added a "version" attribute
+//
+// Revision 1.38 2006/07/25 09:45:25 ounsy
+// changed the XXX_charge management
+//
+// Revision 1.37 2006/07/21 14:39:02 ounsy
+// minor changes
+//
+// Revision 1.36 2006/07/18 15:11:55 ounsy
+// added a diaryLogLevel property
+//
+// Revision 1.35 2006/07/12 14:00:24 ounsy
+// added the synchronized keyword on all trigger_XXX and stop_XXX methods
+//
+// Revision 1.34 2006/07/06 09:14:18 ounsy
+// modified the retryForXXX methods so that they retry in a separate thread to
+// void timeouts
+//
+// Revision 1.33 2006/06/29 08:45:10 ounsy
+// added a hasDiary property (default false) that has to be set to true for the
+// logging to do anything
+//
+// Revision 1.32 2006/06/27 08:35:05 ounsy
+// Corrected a grave bug in logging by removing the "synchronized" tag from the
+// trace methods, that was causing deadlocks
+//
+// Revision 1.31 2006/06/16 09:25:33 ounsy
+// changed imports because of the diary package moving to the javaapi project
+//
+// Revision 1.30 2006/06/13 13:28:19 ounsy
+// added a file logging system (diary) that records data storing errors
+//
+// Revision 1.29 2006/06/07 12:55:56 ounsy
+// added period, lastInsert and lastInsertRequest to the data of each line
+// representing a KO attribute
+//
+// Revision 1.28 2006/06/02 08:39:12 ounsy
+// minor changes
+//
+// Revision 1.27 2006/05/23 07:39:34 ounsy
+// +added a hasThreadedStartup which if true does the AMT inserts in a separate
+// thread
+// -removed TDB-specific useless attributes
+//
+// Revision 1.26 2006/05/17 15:02:09 ounsy
+// made the logs more coherent
+//
+// Revision 1.25 2006/04/11 09:11:49 ounsy
+// double archiving protection
+//
+// Revision 1.24 2006/03/29 10:20:51 ounsy
+// Added content to the error message:
+// each atribute with an invalid mode has a specific log
+//
+// Revision 1.23 2006/03/27 13:51:10 ounsy
+// catched the ArchivingException on checkMode so that if an attribute's mode
+// is invalid, the other attributes can still be archived
+//
+// Revision 1.22 2006/03/14 13:09:56 ounsy
+// removed useless logs
+//
+// Revision 1.21 2006/03/08 16:26:24 ounsy
+// added the global POGO class comments for the devices:
+// -HDBArchiver
+// -TDBArchiver
+// -ArchivingWatcher
+//
+// Revision 1.20 2006/03/08 14:36:21 ounsy
+// added pogo comments
+//
+// Revision 1.19 2006/03/01 15:45:33 ounsy
+// if the safetyPeriod property is missing, the default (absolute+15mn) mode is
+// chosen
+//
+// Revision 1.18 2006/02/28 10:38:31 ounsy
+// lastInsertRequest added for HDBArchiver internal controls
+//
+// Revision 1.17 2006/02/27 12:17:47 ounsy
+// the HdbArchiver internal diagnosis function's safety period calculation is
+// now defined
+// by the safetyPeriod property
+// (for example safetyPeriod=absolute/minutes/15 or safetyPeriod=relative/2)
+//
+// Revision 1.16 2006/02/24 12:07:30 ounsy
+// removed useless logs
+//
+// Revision 1.15 2006/02/15 13:11:31 ounsy
+// organized imports
+//
+// Revision 1.14 2006/02/15 13:01:25 ounsy
+// added HdbArchiver internal diagnosis commands
+//
+// Revision 1.13 2006/02/15 11:08:59 chinkumo
+// Javadoc comment update.
+//
+// Revision 1.12 2006/02/08 15:00:05 ounsy
+// added comments for the new commands
+//
+// Revision 1.11 2006/02/06 13:00:46 ounsy
+// new commands RetryForAttribute and RetryForAttributes
+//
+// Revision 1.10 2006/01/23 09:11:17 ounsy
+// minor changes (reorganized imports + methods set deprecated)
+//
+// Revision 1.9 2006/01/13 14:28:28 chinkumo
+// Changes made to avoid multi lines in AMT table when archivers are rebooted.
+//
+// Revision 1.8 2005/11/29 17:33:53 chinkumo
+// no message
+//
+// Revision 1.7.10.6 2005/11/29 16:16:05 chinkumo
+// Code reformated (pogo compatible)
+//
+// Revision 1.7.10.5 2005/11/15 13:46:08 chinkumo
+// ...
+//
+// Revision 1.7.10.4 2005/09/26 08:01:20 chinkumo
+// Minor changes !
+//
+// Revision 1.7.10.3 2005/09/16 08:08:46 chinkumo
+// Minor changes.
+//
+// Revision 1.7.10.2 2005/09/14 14:25:01 chinkumo
+// 'trigger_archive_conf' methods were changed to allow the management of
+// ArchivingMessConfig objects.
+//
+// Revision 1.7.10.1 2005/09/09 10:16:41 chinkumo
+// Since the checkAttributeSupport was implemented, this class was modified.
+// This enhances the support of attributes types.
+//
+// Revision 1.7 2005/06/24 12:06:27 chinkumo
+// Some constants were moved from
+// fr.soleil.hdbtdbArchivingApi.ArchivingApi.ConfigConst to
+// fr.soleil.hdbtdbArchivingApi.ArchivingTools.Tools.GlobalConst.
+// This change was reported here.
+//
+// Revision 1.6 2005/06/15 14:00:37 chinkumo
+// The device was regenerated in Tango V5.
+//
+// Revision 1.5 2005/06/14 10:30:28 chinkumo
+// Branch (hdbArchiver_1_0_1-branch_0) and HEAD merged.
+//
+// Revision 1.4.4.2 2005/06/13 14:04:27 chinkumo
+// Changes made to improve the management of exceptions were reported here.
+//
+// Revision 1.4.4.1 2005/05/03 16:30:56 chinkumo
+// Some constants in the class
+// 'fr.soleil.hdbtdbArchivingApi.ArchivingApi.ConfigConst' were renamed. Changes
+// reported here.
+// Some unused references removed.
+//
+// Revision 1.4 2005/02/04 17:10:16 chinkumo
+// The trouble with the grouped stopping strategy was fixed.
+//
+// Revision 1.3 2005/01/31 17:12:16 chinkumo
+// Minors changes made into the logging messages of the method named
+// 'stop_archive_att'.
+//
+// Revision 1.2 2005/01/26 16:38:14 chinkumo
+// Ultimate synchronization before real sharing.
+//
+// Revision 1.1 2004/12/06 16:43:24 chinkumo
+// First commit (new architecture).
+//
+//
+// copyleft : European Synchrotron Radiation Facility
+// BP 220, Grenoble 38043
+// FRANCE
+//
+// -============================================================================
+//
+// This file is generated by POGO
+// (Program Obviously used to Generate tango Object)
+//
+// (c) - Software Engineering Group - ESRF
+// =============================================================================
+
+package HdbArchiver;
+
+import java.io.IOException;
+import java.sql.Timestamp;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Collection;
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.Map;
+import java.util.Set;
+import java.util.concurrent.ConcurrentHashMap;
+import java.util.concurrent.Executors;
+
+import fr.soleil.database.connection.DataBaseParameters;
+import org.omg.CORBA.SystemException;
+import org.omg.CORBA.UserException;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.tango.utils.DevFailedUtils;
+
+import HdbArchiver.Collector.DbProxy;
+import HdbArchiver.Collector.HdbCollector;
+import HdbArchiver.Collector.HdbCollectorFactory;
+import fr.esrf.Tango.DevFailed;
+import fr.esrf.TangoApi.DbDatum;
+import fr.esrf.TangoDs.Attribute;
+import fr.esrf.TangoDs.DeviceClass;
+import fr.esrf.TangoDs.DeviceImpl;
+import fr.esrf.TangoDs.Except;
+import fr.esrf.TangoDs.TangoConst;
+import fr.esrf.TangoDs.Util;
+import fr.soleil.archiving.common.api.exception.ArchivingException;
+import fr.soleil.archiving.common.api.tools.GlobalConst;
+import fr.soleil.archiving.common.api.utils.LoggingUtils;
+import fr.soleil.archiving.common.api.utils.TangoStateUtils;
+import fr.soleil.archiving.hdbtdb.api.ConfigConst;
+import fr.soleil.archiving.hdbtdb.api.HdbTdbConnectionParameters;
+import fr.soleil.archiving.hdbtdb.api.manager.ArchivingManagerApiRef;
+import fr.soleil.archiving.hdbtdb.api.tools.ArchivingMessConfig;
+import fr.soleil.archiving.hdbtdb.api.tools.AttributeLightMode;
+import fr.soleil.archiving.hdbtdb.api.tools.AttributeSupport;
+import fr.soleil.archiving.hdbtdb.api.tools.DBTools;
+
+/**
+ * Class Description: This device is in charge of archiving Tango attributes to
+ * the Historic Database, as known as HDB. On startup, it looks up in database
+ * the attributes it is in charge of. A collector thread retrieves attribute
+ * values, with the associated timestamp. For each attribute, the values are
+ * then inserted into HDB every [base period], and if so required, when its
+ * value meets certain user-defined criterions.
+ * 
+ * @author $Author: pierrejoseph $
+ * @version $Revision: 1.89 $
+ */
+
+// --------- Start of States Description ----------
+/*
+ * Device States Description: DevState.RUNNING : The device is not avalaible
+ * because it is executing a command DevState.ON : The device is ready to use
+ * DevState.INIT : The device has been initialized but not ready to use
+ * DevState.FAULT : The device has been initialized but the connection to the
+ * database crashed.
+ */
+// --------- End of States Description ----------
+public class HdbArchiver extends DeviceImpl implements TangoConst {
+
+    protected int state;
+    private DbProxy dbProxy;
+    private InitDeviceTask initDeviceTast;
+
+    // --------- Start of attributes data members ----------
+
+    protected int attr_scalar_charge_read;
+    protected int attr_spectrum_charge_read;
+    protected int attr_image_charge_read;
+
+    private final String m_version;
+
+    // --------- End of attributes data members ----------
+
+    // --------- Start of properties data members ----------
+
+//    /**
+//     * Describes how tightly effective archiving periods have to match
+//     * theoretical archiving periods, for an attribute to be declared "OK" (ie.
+//     * archiving correctly) Can be either:
+//     * <UL>
+//     * <LI>absolute/[hours minutes seconds]/[amount]: the effective period = the theoretical period + the specified
+//     * amount
+//     * <LI>relative/[multiplier]: the effective period = the theoretical period * the specified multiplier
+//     * </UL>
+//     * <b>Default value : </b>absolute/minutes/15
+//     */
+//    private String safetyPeriod;
+
+    /**
+     * Property used to describe the startup behaviour of the device. <br>
+     * If set to true, the inserts in AMT are done in another thread so that the
+     * device can be exported earlier. <br>
+     * If set to false, the inserts in AMT are done in the main thread
+     * sequentially.<br>
+     * <b>Default value : </b>false
+     */
+    private boolean hasThreadedStartup;
+
+    /**
+     * Defines whether the archiver is a "dedicated archiver". A
+     * "dedicated archiver" is an archiver specialized in archiving a specific
+     * list of attributes, and none others. If the value is false, the related
+     * attribute "reservedAttributes" won't be used. <b>Default value :
+     * </b>false
+     */
+    private boolean isDedicated;
+
+    /**
+     * Defines whether the archiver will log to a diary. <b>Default value :
+     * </b>false
+     */
+    private boolean hasDiary;
+
+    /**
+     * The criticity threshold of the archiver's logging. Only messages with a
+     * criticity higher than this attribute will be logged to the diary.
+     * Possible values are:
+     * <UL>
+     * <LI>DEBUG
+     * <LI>INFO
+     * <LI>WARNING
+     * <LI>ERROR
+     * <LI>CRITIC
+     * </UL>
+     * <b>Default value : </b>DEBUG
+     */
+    private String diaryLogLevel;
+
+    /**
+     * The path of the diary logs. Don't include a filename, diary files are
+     * named automatically.
+     */
+    private String diaryPath;
+
+    /**
+     * The list of attributes that will always be archived on this archiver no
+     * matter the load-balancing situation. Be aware that: - this list will be
+     * ignored if the related attribute "isDedicated" is false or missing - one
+     * attribute shouldn't be on the reservedAttributes list of several
+     * archivers
+     */
+    private String[] reservedAttributes;
+
+    // --------- End of properties data members ----------
+
+    protected HdbCollectorFactory collectorFactory;
+    public static final short NA = 10;
+    public static final short SUCCEEDED = 20;
+    public static final short FAILED = 30;
+    private final Set<String> koAttributes = Collections.newSetFromMap(new ConcurrentHashMap<String, Boolean>());
+    private final Set<String> okAttributes = Collections.newSetFromMap(new ConcurrentHashMap<String, Boolean>());
+
+    private Logger logger;
+    private boolean isHighRate;
+    // --------------------------------------
+
+    // --------------------------------------------------------------------------//
+    // ELETTRA : Archiving Events
+    // --------------------------------------------------------------------------//
+    /* Archiving related properties */
+    public static Boolean isUseEvents = false;
+    public static String eventDBUpdatePolicy = "amt";
+
+    // --------------------------------------------------------------------------//
+    // ELETTRA : Archiving Events
+    // --------------------------------------------------------------------------//
+
+    // =========================================================
+    /**
+     * Constructor for simulated Time Device Server.
+     * 
+     * @param cl
+     *            The DeviceClass object
+     * @param s
+     *            The Device name.
+     * @param version
+     *            The device version
+     */
+    // =========================================================
+    HdbArchiver(final DeviceClass cl, final String s, final String version) throws DevFailed {
+        super(cl, s);
+        m_version = version;
+        init_device();
+    }
+
+    // =========================================================
+    /**
+     * Constructor for simulated Time Device Server.
+     * 
+     * @param cl
+     *            The DeviceClass object
+     * @param s
+     *            The Device name.
+     * @param d
+     *            Device description.
+     * @param version
+     *            The device version
+     */
+    // =========================================================
+    HdbArchiver(final DeviceClass cl, final String s, final String d, final String version) throws DevFailed {
+        super(cl, s, d);
+        m_version = version;
+        init_device();
+    }
+
+    // =========================================================
+    /**
+     * Initialize the device.
+     */
+    // =========================================================
+    @Override
+    public void init_device() throws DevFailed {
+        // PROBLEM-310: read device properties before logging configuration
+        get_device_property();
+
+        try {
+            logger = LoggingUtils.configureLogging(device_name, hasDiary, diaryPath, diaryLogLevel);
+        } catch (final IOException e) {
+            logger = LoggerFactory.getLogger(device_name); // ensure logger is not null
+            TangoStateUtils.setFault(this, "logging configuration failed");
+        }
+
+        logger.info("HdbArchiver() create " + device_name);
+        // Initialise variables to default values
+        // -------------------------------------------
+
+        // stop archiving before doing anything else
+        if (collectorFactory != null) {
+            collectorFactory.clear();
+        }
+
+        collectorFactory = new HdbCollectorFactory(logger);
+        attr_image_charge_read = 0;
+        attr_spectrum_charge_read = 0;
+        attr_scalar_charge_read = 0;
+        koAttributes.clear();
+        okAttributes.clear();
+
+        StringBuilder builder = new StringBuilder();
+
+        builder.append("HasThreadedStartup = ").append(hasThreadedStartup).append('\n');
+        builder.append("isDedicated = ").append(isDedicated).append('\n');
+        builder.append("reservedAttributes = ").append(Arrays.toString(reservedAttributes)).append('\n');
+        builder.append("diaryPath = ").append(diaryPath).append('\n');
+        builder.append("hasDiary = ").append(hasDiary).append('\n');
+        builder.append("diaryLogLevel = ").append(diaryLogLevel);
+        logger.info(builder.toString());
+        connectDatabase();
+        logger.debug("init done");
+    }
+
+    private void connectDatabase() throws DevFailed{
+        try {
+            DataBaseParameters parameters = new DataBaseParameters();
+            parameters.setParametersFromTango(ConfigConst.TDB_CLASS_DEVICE);
+
+
+            if (dbProxy != null) {
+                dbProxy.closeConnection();
+            }
+            dbProxy = new DbProxy(parameters);
+            // setControlMode(safetyPeriod);
+            // start archiving in a thread
+            if (initDeviceTast == null) {
+                initDeviceTast = new InitDeviceTask();
+            }
+            Executors.newSingleThreadExecutor().submit(initDeviceTast);
+
+        } catch (final ArchivingException e) {
+            TangoStateUtils.setFault(this, "Historical database connection failed: " + e);
+            logger.error("ERROR : Database unconnected !!", e);
+        }
+    }
+
+    private synchronized void reconnectDatabaseIfNecessary() throws  DevFailed{
+        if (dbProxy == null) {
+            connectDatabase();
+        }
+    }
+
+    /**
+     * @param archivingMessConfig
+     * @param forceThreadedMode
+     */
+    private void launchStartArchivingTask(final ArchivingMessConfig archivingMessConfig,
+            final boolean forceThreadedMode, final boolean updateAMTTable) {
+        logger.info("startArchiving - hasThreadedStartup : " + hasThreadedStartup);
+        final StartArchivingRunnable startArchivingRunnable = new StartArchivingRunnable(archivingMessConfig,
+                updateAMTTable);
+
+        if (hasThreadedStartup || forceThreadedMode) {
+            final Thread startArchivingThread = new Thread(startArchivingRunnable, "HDBStartArchivingThread "
+                    + device_name);
+            startArchivingThread.start();
+        } else {
+            startArchivingRunnable.run();
+        }
+    }
+
+    private void logArchivingError(DevFailed df, ArchivingMessConfig config) {
+        StringBuilder errorBuilder = new StringBuilder(getClass().getSimpleName());
+        errorBuilder.append(" failed to start archiving:");
+        String[] lines = config.toArray();
+        if (lines != null) {
+            for (String line : lines) {
+                if (line != null) {
+                    errorBuilder.append("\n").append(line);
+                }
+            }
+        }
+        errorBuilder.append("\n--> reason: ").append(DevFailedUtils.toString(df));
+        logger.error(errorBuilder.toString());
+    }
+
+    private class InitDeviceTask implements Runnable {
+        @Override
+        public void run() {
+            Collection<AttributeLightMode> myCurrentTasks = null;
+            if (dbProxy != null) {
+                try {
+                    myCurrentTasks = dbProxy.getArchiverCurrentTasks(device_name);
+                } catch (final ArchivingException e) {
+                    e.printStackTrace();
+                    logger.debug("cannot getArchiverCurrentTasks " + e);
+                    TangoStateUtils.setFault(HdbArchiver.this, e.getMessage());
+                }
+            }
+            final ArchivingMessConfig archivingMessConfig = ArchivingMessConfig.basicObjectCreation();
+            try {
+                if (myCurrentTasks != null && myCurrentTasks.size() > 0) {
+                    for (final AttributeLightMode attributeLightMode : myCurrentTasks) {
+                        archivingMessConfig.add(attributeLightMode);
+                    }
+                    triggerArchiving(archivingMessConfig.toArray(), false);
+                }
+            } catch (final DevFailed devFailed) {
+                logArchivingError(devFailed, archivingMessConfig);
+            } finally {
+                TangoStateUtils.updateState(HdbArchiver.this, koAttributes, okAttributes);
+            }
+        }
+    }
+
+    private class StartArchivingRunnable implements Runnable {
+
+        private final ArchivingMessConfig archivingMessConfig;
+        private final boolean updateAMTTable;
+
+        public StartArchivingRunnable(final ArchivingMessConfig archivingMessConfig, final boolean updateAMTTable) {
+            this.archivingMessConfig = archivingMessConfig;
+            this.updateAMTTable = updateAMTTable;
+        }
+
+        @Override
+        public void run() {
+            try {
+                triggerArchiving(archivingMessConfig.toArray(), updateAMTTable);
+            } catch (final DevFailed devFailed) {
+                logArchivingError(devFailed, archivingMessConfig);
+            } finally {
+                TangoStateUtils.updateState(HdbArchiver.this, koAttributes, okAttributes);
+            }
+
+        }
+    }
+
+    public String[] getKOAttributes() {
+        return koAttributes.toArray(new String[koAttributes.size()]);
+    }
+
+    // /**
+    // * @param safetyPeriod2
+    // */
+    // private void setControlMode(final String _safetyPeriod) throws DevFailed
+    // {
+    // logger.info("setControlMode/safetyPeriod/" + _safetyPeriod);
+    // final ISaferPeriodCalculator saferPeriodCalculator =
+    // SaferPeriodCalculatorFactory.getImpl(_safetyPeriod);
+    // logger.info("setControlMode/success/desription/" +
+    // saferPeriodCalculator.getDescription());
+    // }
+
+    // ===================================================================
+    /**
+     * Read the device properties from database.
+     */
+    // ===================================================================
+    public void get_device_property() throws DevFailed {
+        // Initialize your default values here.
+        // ------------------------------------------
+        hasThreadedStartup = false;
+        isDedicated = false;
+        reservedAttributes = null;
+        diaryPath = null;
+        hasDiary = false;
+        diaryLogLevel = "DEBUG";
+        isHighRate = false;
+
+        // Read device properties from database.(Automatic code generation)
+        // -------------------------------------------------------------
+        if (Util._UseDb == false) {
+            return;
+        }
+        final String[] propnames = { "SafetyPeriod", "HasThreadedStartup", "IsDedicated", "ReservedAttributes",
+                "DiaryPath", "HasDiary", "DiaryLogLevel", "IsHighRate",
+                // --------------------------------------------------------------------------//
+                // ELETTRA : Archiving Events
+                // --------------------------------------------------------------------------//
+                "UseEvents", "EventsDBUpdatePolicy"
+        // --------------------------------------------------------------------------//
+        // ELETTRA : Archiving Events
+        // --------------------------------------------------------------------------//
+        };
+
+        // Call database and extract values
+        // --------------------------------------------
+        final DbDatum[] dev_prop = get_db_device().get_property(propnames);
+        final HdbArchiverClass ds_class = (HdbArchiverClass) get_device_class();
+//        int i = -1;
+//
+//        // Extract SafetyPeriod value
+//        if (dev_prop[++i].is_empty() == false) {
+//            safetyPeriod = dev_prop[i].extractString();
+//        } else {
+//            // Try to get value from class property
+//            final DbDatum cl_prop = ds_class.get_class_property(dev_prop[i].name);
+//            if (cl_prop.is_empty() == false) {
+//                safetyPeriod = cl_prop.extractString();
+//            }
+//        }
+        int i = 0;
+
+        // Extract HasThreadedStartup value
+        if (dev_prop[++i].is_empty() == false) {
+            hasThreadedStartup = dev_prop[i].extractBoolean();
+        } else {
+            // Try to get value from class property
+            final DbDatum cl_prop = ds_class.get_class_property(dev_prop[i].name);
+            if (cl_prop.is_empty() == false) {
+                hasThreadedStartup = cl_prop.extractBoolean();
+            }
+        }
+
+        // Extract IsDedicated value
+        if (dev_prop[++i].is_empty() == false) {
+            isDedicated = dev_prop[i].extractBoolean();
+        } else {
+            // Try to get value from class property
+            final DbDatum cl_prop = ds_class.get_class_property(dev_prop[i].name);
+            if (cl_prop.is_empty() == false) {
+                isDedicated = cl_prop.extractBoolean();
+            }
+        }
+
+        // Extract ReservedAttributes value
+        if (dev_prop[++i].is_empty() == false) {
+            reservedAttributes = dev_prop[i].extractStringArray();
+        } else {
+            // Try to get value from class property
+            final DbDatum cl_prop = ds_class.get_class_property(dev_prop[i].name);
+            if (cl_prop.is_empty() == false) {
+                reservedAttributes = cl_prop.extractStringArray();
+            }
+        }
+
+        // Extract DiaryPath value
+        if (dev_prop[++i].is_empty() == false) {
+            diaryPath = dev_prop[i].extractString();
+        } else {
+            // Try to get value from class property
+            final DbDatum cl_prop = ds_class.get_class_property(dev_prop[i].name);
+            if (cl_prop.is_empty() == false) {
+                diaryPath = cl_prop.extractString();
+            }
+        }
+
+        // Extract HasDiary value
+        if (dev_prop[++i].is_empty() == false) {
+            hasDiary = dev_prop[i].extractBoolean();
+        } else {
+            // Try to get value from class property
+            final DbDatum cl_prop = ds_class.get_class_property(dev_prop[i].name);
+            if (cl_prop.is_empty() == false) {
+                hasDiary = cl_prop.extractBoolean();
+            }
+        }
+
+        // Extract DiaryLogLevel value
+        if (dev_prop[++i].is_empty() == false) {
+            diaryLogLevel = dev_prop[i].extractString();
+        } else {
+            // Try to get value from class property
+            final DbDatum cl_prop = ds_class.get_class_property(dev_prop[i].name);
+            if (cl_prop.is_empty() == false) {
+                diaryLogLevel = cl_prop.extractString();
+            }
+        }
+
+        // Extract IsHighRate value
+        if (dev_prop[++i].is_empty() == false) {
+            isHighRate = dev_prop[i].extractBoolean();
+        } else {
+            // Try to get value from class property
+            final DbDatum cl_prop = ds_class.get_class_property(dev_prop[i].name);
+            if (cl_prop.is_empty() == false) {
+                isHighRate = cl_prop.extractBoolean();
+            }
+        }
+        // End of Automatic code generation
+        // -------------------------------------------------------------
+
+        // --------------------------------------------------------------------------//
+        // ELETTRA : Archiving Events
+        // --------------------------------------------------------------------------//
+        // Extract UseEvents value
+        System.out.print("Seeing if events are enabled...");
+        if (dev_prop[++i].is_empty() == false) {
+            System.out.print(" in the device properties (" + dev_prop[i].name + ")... ");
+            isUseEvents = dev_prop[i].extractBoolean();
+        } else {
+            // Try to get value from class property
+            System.out.print(" (empty)\nLooking in class properties (" + dev_prop[i].name + ")... ");
+            final DbDatum cl_prop = ds_class.get_class_property(dev_prop[i].name);
+            if (cl_prop.is_empty() == false) {
+                isUseEvents = cl_prop.extractBoolean();
+            } else {
+                System.out.print("(empty) ");
+            }
+        }
+        System.out.println(isUseEvents);
+
+        // Extract EventsDBUpdatePolicy value
+        if (dev_prop[++i].is_empty() == false) {
+            eventDBUpdatePolicy = dev_prop[i].extractString();
+        } else {
+            // Try to get value from class property
+            final DbDatum cl_prop = ds_class.get_class_property(dev_prop[i].name);
+            if (cl_prop.is_empty() == false) {
+                eventDBUpdatePolicy = cl_prop.extractString();
+            }
+        }
+        System.out.println("The database priority is set to " + eventDBUpdatePolicy);
+
+        // --------------------------------------------------------------------------//
+        // ELETTRA : Archiving Events
+        // --------------------------------------------------------------------------//
+
+    }
+
+    // =========================================================
+    /**
+     * Method always executed before command execution.
+     */
+    // =========================================================
+    @Override
+    public void always_executed_hook() throws DevFailed {
+        // Uncomment to allow the device to trying reconnection when a commend
+        // is triggered. May not work with Oracle jdbc drivers.
+
+        // System.out.println(">>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> always executed hook");
+        // System.out.println("======================================== isDbProxy null : "
+        // + (dbProxy == null));
+        // if (dbProxy != null) {
+        // System.out.println("======================================== isDbConnected : "
+        // + dbProxy.isDbConnected());
+        // }
+        //
+        // if (dbProxy == null || (dbProxy != null && !dbProxy.isDbConnected()))
+        // {
+        // logger.info("Trying to reconnect database...");
+        // delete_device();
+        // init_device();
+        // }
+    }
+
+    // ===================================================================
+    /**
+     * Method called by the read_attributes CORBA operation to set internal
+     * attribute value.
+     * 
+     * @param attr
+     *            reference to the Attribute object
+     */
+    // ===================================================================
+    @Override
+    public void read_attr(final Attribute attr) throws DevFailed {
+        final String attr_name = attr.get_name();
+
+        // Switch on attribute name
+        // ---------------------------------
+        if (attr_name == "scalar_charge") {
+            // Add your own code here
+            attr.set_value(attr_scalar_charge_read);
+        } else if (attr_name == "spectrum_charge") {
+            // Add your own code here
+            attr.set_value(attr_spectrum_charge_read);
+        } else if (attr_name == "image_charge") {
+            // Add your own code here
+            attr.set_value(attr_image_charge_read);
+        } else if (attr_name == "version") {
+            // Add your own code here
+            attr.set_value(m_version);
+        }
+    }
+
+    // =========================================================
+    /**
+     * Execute command "TriggerArchiveConf" on device. This command is invoked
+     * when the archiving of a group of attributes is triggered. The group of
+     * attributes is therefore encapsulated in an ArchivingMessConfig type
+     * object. The use of this command suppose that the database is ready to
+     * host those attributes's values. That means registrations were made, the
+     * associated tables built, ...
+     * 
+     * @param argin
+     *            The group of attributes to archive
+     * @see ArchivingMessConfig
+     * @see AttributeLightMode
+     */
+    // =========================================================
+    public void trigger_archive_conf(final String[] argin) throws DevFailed {
+        TangoStateUtils.isAllowed(this);
+        try {
+            triggerArchiving(argin, true);
+        } finally {
+            TangoStateUtils.updateState(this, koAttributes, okAttributes);
+        }
+    }
+
+    private void triggerArchiving(final String[] argin, final boolean updateAMTTable) throws DevFailed {
+        TangoStateUtils.setRunning(this);
+        logger.debug("trigger_archive_conf - in");
+        final ArchivingException archivingException = new ArchivingException();
+
+        final ArchivingMessConfig archivingMessConfig = ArchivingMessConfig.creationWithFullInformation(argin);
+        archivingMessConfig.filter(isDedicated, reservedAttributes);
+        final Set<String> attributes = archivingMessConfig.getAttributeListKeys();
+        for (final String attributeName : attributes) {
+            // logger.trace(ILogger.LEVEL_INFO, "===> Attribute Name = " +
+            // attributeName);
+            final AttributeLightMode attributeLightMode = archivingMessConfig.getAttribute(attributeName);
+            attributeLightMode.setTrigger_time(new Timestamp(System.currentTimeMillis()));
+            boolean attSupport = false;
+            final String attCompleteName = attributeLightMode.getAttributeCompleteName();
+            logger.debug("managing " + attCompleteName);
+            try {
+                attSupport = AttributeSupport.checkAttributeSupport(attCompleteName, attributeLightMode.getDataType(),
+                        attributeLightMode.getDataFormat(), attributeLightMode.getWritable());
+                logger.debug(attCompleteName + " support " + attSupport);
+                if (attSupport) {
+                    if (isHighRate) {
+                        attributeLightMode.getMode().checkMode(false, attCompleteName);
+                    } else {
+                        attributeLightMode.getMode().checkMode(true, attCompleteName);
+                    }
+                    attributeLightMode.setDevice_in_charge(device_name);
+
+                    // if (
+                    // this.dbProxy.isArchived(attributeLightMode.getAttribute_complete_name())
+                    // )
+                    // this.dbProxy.updateModeRecord(attributeLightMode.getAttribute_complete_name());
+
+                    // --------------------------------------------------------------------------//
+                    // ELETTRA : Archiving Events Begin
+                    // --------------------------------------------------------------------------//
+                    // ////////////////////////////new method //////////
+                    /*
+                     * Can be put in the hdbArchiver.java. We can call it
+                     * updateAMT()
+                     */
+
+                    /*
+                     * if(events_enabled() ) { if(overwriteAMTFromTangoDB() ) {
+                     * getDataFromTangoDB(); attributeLightMode.setPeriod();
+                     * attributeLightMode.setAbsChange();
+                     * attributeLightMode.setRelativeChange(); } }
+                     */
+
+                    // SPZJ : Is it really the good place ?
+                    // --------------------------------------------------------------------------//
+                    // ELETTRA : Archiving Events End
+                    // --------------------------------------------------------------------------//
+
+                    // remove attribute from current collector
+                    collectorFactory.remove(attCompleteName);
+                    if (dbProxy != null) {
+                        // start collector
+                        final HdbCollector m_collector = collectorFactory.get(attributeLightMode);
+                        if (m_collector == null) {
+                            logger.debug("createCollectorAndAddSource " + attCompleteName);
+                            collectorFactory.createCollectorAndAddSource(attributeLightMode, dbProxy, isUseEvents);
+                        } else {
+                            logger.debug("addSource " + attCompleteName);
+                            m_collector.addSource(attributeLightMode);
+                        }
+                        // update AMT table in db with attribute config
+                        if (updateAMTTable) {
+                            if (dbProxy.isArchived(attCompleteName, device_name)) {
+                                logger.debug("updateModeRecord - in");
+                                dbProxy.updateModeRecord(attCompleteName);
+                                logger.debug("updateModeRecord - out");
+                            }
+
+                            logger.debug("insertModeRecord - in");
+                            dbProxy.insertModeRecord(attributeLightMode);
+                            logger.debug("insertModeRecord - out");
+                        }
+
+                        // update period in dbProxy, used in cmd
+                        // retry_for_ko_attributes
+                        final int period = attributeLightMode.getMode().getModeP().getPeriod();
+                        logger.debug(attCompleteName + "'s period is " + period);
+                        dbProxy.setPeriodForAttribute(attCompleteName, period);
+                    }
+                    // --------------------------------------------------------------------------//
+                    // ELETTRA : Archiving Events
+                    // --------------------------------------------------------------------------//
+                    /*
+                     * here we could call another new method to update the tango
+                     * db
+                     */
+                    /*
+                     * if(events_enabled() ) { if(overwriteTangoDbFromAMT() ) {
+                     * // attributeLightMode contains the properies from amt
+                     * updateTangoDbFromAmt(attributeLightMode); } }
+                     */
+                    // ////////// end new method /////////////////
+                    // --------------------------------------------------------------------------//
+                    // ELETTRA : Archiving Events
+                    // --------------------------------------------------------------------------//
+
+                }
+                okAttributes.add(attCompleteName.toLowerCase());
+                koAttributes.remove(attCompleteName.toLowerCase());
+                logger.debug("OK: " + attCompleteName);
+            } catch (final ArchivingException e) {
+                try {
+                    collectorFactory.remove(attCompleteName);
+                } catch (final ArchivingException e1) {
+                }
+                e.printStackTrace();
+                final String message = GlobalConst.ARCHIVING_ERROR_PREFIX + " : ";
+                archivingException.addStack(message, e);
+                logger.error("start failed", e);
+                String name = attCompleteName.toLowerCase();
+                koAttributes.add(name);
+                okAttributes.remove(name);
+                collectorFactory.registerError(attCompleteName, e);
+                logger.error("KO: " + attCompleteName);
+            } catch (final Exception e) {
+                try {
+                    collectorFactory.remove(attCompleteName);
+                } catch (final ArchivingException e1) {
+                }
+                String name = attCompleteName.toLowerCase();
+                koAttributes.add(name);
+                okAttributes.remove(name);
+                e.printStackTrace();
+                collectorFactory.registerError(attCompleteName, e);
+                logger.error("KO " + attCompleteName + " unexpected " + e);
+            }
+        }
+
+        computeLoads();
+        if (!archivingException.getMessage().equals("")) {
+            logger.error("trigger_archive_conf ERROR - out");
+            throw archivingException.toTangoException();
+        }
+
+        logger.debug("trigger_archive_conf - out");
+    }
+
+    // =========================================================
+    /**
+     * Execute command "TriggerArchiveAtt" on device. This command is invoked
+     * when the archiving of an attribute is triggered. The attribute to archive
+     * is therefore encapsulated in a
+     * fr.soleil.hdbtdbArchivingApi.ArchivingTools.Tools.AttributeLight type
+     * object. The use of this command suppose that the HDB database is ready to
+     * host that attribute's values. That means the registration was made, the
+     * associated table built, ...
+     * 
+     * @param argin
+     *            The attribute to archive
+     * @see ArchivingMessConfig
+     * @see AttributeLightMode
+     * @deprecated use trigger_archive_conf(String[] argin) instead
+     */
+    // =========================================================
+    @Deprecated
+    public void trigger_archive_att(final String[] argin) throws DevFailed {
+    }
+
+    // =========================================================
+    /**
+     * Execute command "TriggerArchiveAttCheck" on device. This command is
+     * invoked when the archiving of an attribute is triggered. Before
+     * archiving, this command checks that HDB database is ready to host the
+     * given attribute values. If not registrations is done and the associated
+     * table is built.
+     * 
+     * @param argin
+     *            The name of the attribute to archive
+     * @deprecated use trigger_archive_conf(String[] argin) instead
+     */
+    // =========================================================
+    @Deprecated
+    public void trigger_archive_att_check(final String argin) throws DevFailed {
+        logger.info("Entering trigger_archive_att_check()");
+        logger.info("Exiting trigger_archive_att_check()");
+    }
+
+    // =========================================================
+    /**
+     * Execute command "StopArchiveConf" on device. This command is invoked when
+     * stopping the archiving of a group of attributes.
+     * 
+     * @param argin
+     *            The group of attributes
+     */
+    // =========================================================
+    public void stop_archive_conf(final String[] argin) throws DevFailed {
+        // TangoStateUtils.isAllowed(this);
+        // TangoStateUtils.setRunning(this);
+        try {
+            logger.debug("stop_archive_conf - in");
+            final Collection<AttributeLightMode> myConf = ArchivingManagerApiRef.stoppingVector(argin);
+            for (AttributeLightMode attrMode : myConf) {
+                stop_archive_att(attrMode.toArray());
+            }
+
+        } finally {
+            logger.debug("stop_archive_conf - out");
+        }
+    }
+
+    // =========================================================
+    /**
+     * Execute command "RetryForAttribute" on device. Tries to start archiving
+     * for a given attribute, specified by its complete name.
+     * 
+     * @param attributeToRetry
+     *            The complete name of the attribute
+     * @return A return code, can be either: 10 (the archiver isn't in charge of
+     *         the specified attribute) 20 (the retry succeeded) or 30 (the
+     *         retry failed)
+     * @throws DevFailed
+     */
+    // =========================================================
+    public short retry_for_attribute(final String attributeToRetry) throws DevFailed {
+        reconnectDatabaseIfNecessary();
+        TangoStateUtils.isAllowed(this);
+        short result;
+        if ((attributeToRetry == null) || attributeToRetry.isEmpty()) {
+            logger.debug("no retry done - no attribute");
+            result = NA;
+        } else if (dbProxy == null) {
+            logger.debug("no retry done - no connection to the database");
+            result = NA;
+        } else {
+            try {
+                final Collection<AttributeLightMode> myCurrentTasks = dbProxy.getArchiverCurrentTasks(device_name);
+
+                final ArchivingMessConfig archivingMessConfig = ArchivingMessConfig.basicObjectCreation();
+
+                boolean configIsNotEmpty = false;
+                for (final AttributeLightMode attributeLightMode : myCurrentTasks) {
+                    final String attrName = attributeLightMode.getAttributeCompleteName();
+                    if (attrName.equalsIgnoreCase(attributeToRetry)) {
+                        archivingMessConfig.add(attributeLightMode);
+                        configIsNotEmpty = true;
+                        break;
+                    }
+                }
+                if (configIsNotEmpty) {
+                    final boolean forceThreadedMode = true;
+                    logger.debug("retry attribute {}", attributeToRetry);
+                    launchStartArchivingTask(archivingMessConfig, forceThreadedMode, false);
+                    result = SUCCEEDED;
+                } else {
+                    logger.debug(attributeToRetry + " no retry done - config is empty");
+                    result = NA;
+                }
+            } catch (final ArchivingException e) {
+                logger.error("Failed during retry_for_attribute ( " + attributeToRetry + " ):", e);
+                result = FAILED;
+            }
+        }
+        return result;
+    }
+
+    // =========================================================
+    /**
+     * Execute command "RetryForAttributes" on device. Tries to start archiving
+     * for a given list of attributes, specified by their complete names.
+     * 
+     * @param attributesToRetry
+     *            The complete names of the attributes
+     * @return A return code, can be either: 10 (the archiver isn't in charge of
+     *         any of the specified attributes) 20 (the retry succeeded) or 30
+     *         (the retry failed)
+     * @throws DevFailed
+     */
+    // =========================================================
+    public short retry_for_attributes(final String[] attributesToRetry) throws DevFailed {
+        reconnectDatabaseIfNecessary();
+        TangoStateUtils.isAllowed(this);
+        short result;
+        if ((attributesToRetry == null) || (attributesToRetry.length == 0) || (dbProxy == null)) {
+            result = NA;
+        } else {
+            try {
+                final Collection<AttributeLightMode> myCurrentTasks = dbProxy.getArchiverCurrentTasks(device_name);
+                final Map<String, AttributeLightMode> modes = new HashMap<String, AttributeLightMode>(
+                        myCurrentTasks.size());
+                for (final AttributeLightMode attributeLightMode : myCurrentTasks) {
+                    final String attrName = attributeLightMode.getAttributeCompleteName();
+                    modes.put(attrName.toLowerCase().trim(), attributeLightMode);
+                }
+                boolean configIsNotEmpty = false;
+                final ArchivingMessConfig archivingMessConfig = ArchivingMessConfig.basicObjectCreation();
+                Collection<String> attributeNotRetried = new ArrayList<String>(attributesToRetry.length);
+                Collection<String> attributeRetried = new ArrayList<String>(attributesToRetry.length);
+                if (modes.isEmpty()) {
+                    for (final String currentName : attributesToRetry) {
+                        attributeNotRetried.add(currentName);
+                    }
+                } else {
+                    for (final String currentName : attributesToRetry) {
+                        final AttributeLightMode attributeLightMode = modes.get(currentName.toLowerCase().trim());
+                        if (attributeLightMode == null) {
+                            attributeNotRetried.add(currentName);
+                        } else {
+                            attributeRetried.add(currentName);
+                            archivingMessConfig.add(attributeLightMode);
+                            configIsNotEmpty = true;
+                        }
+                    }
+                }
+                StringBuilder builder = new StringBuilder("Retry asked for ");
+                builder.append(Arrays.toString(attributesToRetry));
+                if (configIsNotEmpty) {
+                    final boolean forceThreadedMode = true;
+                    builder.append("\n\t- Retried attributes ").append(attributeRetried);
+                    launchStartArchivingTask(archivingMessConfig, forceThreadedMode, false);
+                    result = SUCCEEDED;
+                } else {
+                    result = NA;
+                }
+                if (!attributeNotRetried.isEmpty()) {
+                    builder.append("\n\t- Could not retry attributes ").append(attributeNotRetried);
+                }
+                attributeRetried.clear();
+                attributeNotRetried.clear();
+                logger.debug(builder.toString());
+            } catch (final Throwable t) {
+                final DevFailed devFailed = new DevFailed();
+                devFailed.initCause(t);
+                devFailed.setStackTrace(t.getStackTrace());
+                final String message = DBTools.getCompleteMessage(devFailed);
+                logger.error(message);
+                logger.error("Failed during retry_for_attributes ( " + Arrays.toString(attributesToRetry) + " ):");
+                result = FAILED;
+            }
+        }
+        return result;
+    }
+
+    // =========================================================
+    /**
+     * Execute command "RetryForKoAttributes" on device. Looks up the complete
+     * list of attributes that:
+     * <UL>
+     * <LI>the archiver is supposed to be taking care of
+     * <LI>aren't correctly archiving, according to the archiver's internal controls
+     * </UL>
+     * , then starts archiving on all of them.
+     * 
+     * @return A return code, can be either: 10 (the archiver isn't in charge of
+     *         any attribute, or they are all correctly archiving) 20 (the retry
+     *         succeeded) or 30 (the retry failed)
+     * @throws DevFailed
+     */
+    // =========================================================
+    public short retry_for_ko_attributes() throws DevFailed {
+        logger.debug("retry_for_ko_attributes");
+        reconnectDatabaseIfNecessary();
+        TangoStateUtils.isAllowed(this);
+        return retry_for_attributes(koAttributes.toArray(new String[koAttributes.size()]));
+    }
+
+    // private ControlResult getControlResult() throws DevFailed,
+    // ArchivingException {
+    // try {
+    // final ControlResult cr = new ControlResult();
+    // final Vector[] listOfControlledAttributes = getControlledAttributes();
+    //
+    // cr.setLines(listOfControlledAttributes);
+    //
+    // return cr;
+    // } catch (final DevFailed e) {
+    // e.printStackTrace();
+    // final String message = DBTools.getCompleteMessage(e);
+    // logger.error(message);
+    // throw e;
+    // } catch (final Exception e) {
+    // e.printStackTrace();
+    // }
+    // return null;
+    // }
+
+    // =========================================================
+    /**
+     * Execute command "IsAttributeCorrectlyArchivedCurrent" on device. Returns
+     * whether a given attribute, specified by its complete name, is correctly
+     * archiving, based on the archiver's internal controls.
+     * 
+     * @param argin
+     *            The complete name of the attribute
+     * @return True if this attribute is archiving correctly
+     */
+    // =========================================================
+    public boolean is_attribute_correctly_archived_internal(final String argin) throws DevFailed {
+        // ControlResult _controlResult = null;
+        // try {
+        // _controlResult = getControlResult();
+        // } catch (final DevFailed e) {
+        // final String message = DBTools.getCompleteMessage(e);
+        // logger.error(message);
+        //
+        // throw e;
+        // } catch (final ArchivingException t) {
+        // t.printStackTrace();
+        // DBTools.throwDevFailed(t);
+        // }
+        //
+        // if (_controlResult == null) {
+        // throw new DevFailed(getNotYetReadyError());
+        // }
+
+        // return _controlResult.isAttributeCorrectlyArchived(argin);
+        return true;
+    }
+
+    // =========================================================
+    /**
+     * Execute command "getErrorsForDomainInternal" on device. Returns the list
+     * of all KO attributes (attributes that aren't correctly archiving) for a
+     * given domain name, based on the archiver's internal controls.
+     * 
+     * @param argin
+     *            The domain name
+     * @return The list of all KO attributes for this domain
+     */
+    // =========================================================
+    public String[] get_errors_for_domain_internal(final String argin) throws DevFailed {
+        // final String[] empty = new String[0];
+        // ControlResult _controlResult = null;
+        // // System.out.println ( "CLA--------------------------1" );
+        // try {
+        // _controlResult = getControlResult();
+        // } catch (final DevFailed e) {
+        // final String message = DBTools.getCompleteMessage(e);
+        // logger.error(message);
+        // throw e;
+        // } catch (final ArchivingException t) {
+        // t.printStackTrace();
+        // DBTools.throwDevFailed(t);
+        // }
+        //
+        // if (_controlResult == null) {
+        // return empty;
+        // }
+        //
+        // final Map<String, Domain> _errorDomains =
+        // _controlResult.getErrorDomains();
+        // if (_errorDomains == null) {
+        // return empty;
+        // }
+        //
+        // final Domain domain = _errorDomains.get(argin);
+        // if (domain == null) {
+        // return empty;
+        // }
+        //
+        // final Hashtable _errorAttributes = domain.getKOAttributes();
+        // if (_errorAttributes == null) {
+        // return empty;
+        // }
+        //
+        // final String[] argout = new String[_errorAttributes.size()];
+        // final Enumeration keys = _errorAttributes.keys();
+        // int i = 0;
+        //
+        // while (keys.hasMoreElements()) {
+        // final String key = (String) keys.nextElement();
+        // final ArchivingAttribute attribute = (ArchivingAttribute)
+        // _errorAttributes.get(key);
+        //
+        // final String line = formatLine(attribute);
+        //
+        // argout[i] = line;
+        // i++;
+        // }
+        //
+        // return argout;
+        return new String[0];
+    }
+
+    // private String formatLine(final ArchivingAttribute attribute) {
+    // final StringBuilder buff = new StringBuilder();
+    //
+    // final String completeName = attribute.getCompleteName();
+    // final int period = attribute.getPeriod();
+    // final Timestamp lastInsert = attribute.getLastInsert();
+    // final Timestamp lastInsertRequest = attribute.getLastInsertRequest();
+    //
+    // buff.append(completeName);
+    // buff.append("          period: " + period);
+    // buff.append("     lastInsert: " + lastInsert);
+    // buff.append("     lastInsertRequest: " + lastInsertRequest);
+    //
+    // final String ret = buff.toString();
+    // return ret;
+    // }
+
+    // =========================================================
+    /**
+     * Execute command "getErrorDomainsInternal" on device. Returns the list of
+     * all domains that have at least one attribute not correctly archiving,
+     * based on the archiver's internal controls.
+     * 
+     * @return The list of all domains that have at least one attribute not
+     *         correctly archiving
+     */
+    // =========================================================
+    public String[] get_error_domains_internal() throws DevFailed {
+        // System.out.println("get_error_domains_internal in ");
+        // ControlResult _controlResult = null;
+        // try {
+        // _controlResult = getControlResult();
+        // } catch (final DevFailed e) {
+        // final String message = DBTools.getCompleteMessage(e);
+        // logger.error(message);
+        // throw e;
+        // } catch (final ArchivingException t) {
+        // t.printStackTrace();
+        // DBTools.throwDevFailed(t);
+        // }
+        //
+        // final String[] empty = new String[0];
+        // if (_controlResult == null) {
+        // return empty;
+        // }
+        //
+        // final Map<String, Domain> _errorDomains =
+        // _controlResult.getErrorDomains();
+        // return _errorDomains.keySet().toArray(new
+        // String[_errorDomains.size()]);
+        return new String[0];
+    }
+
+    // =========================================================
+    /**
+     * Execute command "getErrorsForAttributeInternal" on device. Returns the
+     * list of all KO attributes (attributes that aren't correctly archiving)
+     * for a given attribute name, based on the archiver's internal controls.
+     * 
+     * @param argin
+     *            The attribute name
+     * @return The list of all KO attributes sharing this name
+     */
+    // =========================================================
+    public String[] get_errors_for_attribute_internal(final String argin) throws DevFailed {
+        // ControlResult _controlResult = null;
+        // // System.out.println ( "CLA--------------------------1" );
+        // try {
+        // _controlResult = getControlResult();
+        // } catch (final DevFailed e) {
+        // final String message = DBTools.getCompleteMessage(e);
+        // logger.error(message);
+        // throw e;
+        // } catch (final Throwable t) {
+        // t.printStackTrace();
+        // DBTools.throwDevFailed(t);
+        // }
+        //
+        // final String[] empty = new String[0];
+        // if (_controlResult == null) {
+        // return empty;
+        // }
+        //
+        // final Map<String, ArchivingAttributeSubName> _errorAttributeSubNames
+        // = _controlResult.getErrorSubAttributes();
+        // if (_errorAttributeSubNames == null) {
+        // return empty;
+        // }
+        //
+        // final ArchivingAttributeSubName attributeSubName =
+        // _errorAttributeSubNames.get(argin);
+        // if (attributeSubName == null) {
+        // return empty;
+        // }
+        //
+        // final Hashtable _errorAttributes =
+        // attributeSubName.getKOAttributes();
+        // if (_errorAttributes == null) {
+        // return empty;
+        // }
+        //
+        // final String[] argout = new String[_errorAttributes.size()];
+        // final Enumeration keys = _errorAttributes.keys();
+        // int i = 0;
+        //
+        // while (keys.hasMoreElements()) {
+        // final String key = (String) keys.nextElement();
+        // final ArchivingAttribute attribute = (ArchivingAttribute)
+        // _errorAttributes.get(key);
+        //
+        // final String line = formatLine(attribute);
+        //
+        // argout[i] = line;
+        // i++;
+        // }
+
+        // return argout;
+        return new String[0];
+    }
+
+    public String getErrorMessageForAttribute(String attributeName) {
+        final HdbCollector hdbCollector = collectorFactory.quickGet(attributeName);
+        String result;
+        if (hdbCollector == null) {
+            StringBuilder builder = new StringBuilder("No HdbCollector found for attribute '");
+            builder.append(attributeName).append("' - Reason: ");
+            try {
+                if (dbProxy != null) {
+                    final Collection<AttributeLightMode> myCurrentTasks = dbProxy.getArchiverCurrentTasks(device_name);
+                    boolean done = false;
+                    for (final AttributeLightMode attributeLightMode : myCurrentTasks) {
+                        final String attrName = attributeLightMode.getAttributeCompleteName();
+                        if (attrName.equalsIgnoreCase(attributeName)) {
+                            done = true;
+                            String message = collectorFactory.getLastError(attributeLightMode);
+                            if ((message == null) || (message.trim().isEmpty())) {
+                                builder.append(" no valid reason found");
+                            } else {
+                                builder.append(message);
+                            }
+                            break;
+                        }
+                    }
+                    if (!done) {
+                        builder.append(" this attribute does not seem to be managed by this archiver");
+                    }
+                }
+            } catch (Exception e) {
+                builder.append(" Could not recover attribute archiving configuration: ").append(e.getMessage());
+            }
+            result = builder.toString();
+        } else {
+            result = hdbCollector.getErrorMessage(attributeName);
+        }
+        if (result == null) {
+            result = "";
+        }
+        return result;
+    }
+
+    // =========================================================
+    /**
+     * Execute command "RetryForAll" on device. Looks up the complete list of
+     * attributes the archiver is supposed to be taking care of, then starts
+     * archiving on all of them. Those that are already archiving aren't
+     * impacted.
+     * 
+     * @return A return code, can be either: 10 (the archiver isn't in charge of
+     *         any attribute) 20 (the retry succeeded) or 30 (the retry failed)
+     * @throws DevFailed
+     */
+    // =========================================================
+    public short retry_for_all() throws DevFailed {
+        reconnectDatabaseIfNecessary();
+        TangoStateUtils.isAllowed(this);
+        short result;
+        if (dbProxy == null) {
+            result = FAILED;
+        } else {
+            try {
+                final Collection<AttributeLightMode> myCurrentTasks = dbProxy.getArchiverCurrentTasks(device_name);
+
+                final ArchivingMessConfig archivingMessConfig = ArchivingMessConfig.basicObjectCreation();
+                for (AttributeLightMode mode : myCurrentTasks) {
+                    archivingMessConfig.add(mode);
+                }
+
+                if (myCurrentTasks.size() > 0) {
+                    logger.debug("retry for all attributes");
+                    final boolean forceThreadedMode = true;
+                    launchStartArchivingTask(archivingMessConfig, forceThreadedMode, false);
+
+                    result = SUCCEEDED;
+                } else {
+                    result = NA;
+                }
+            } catch (final ArchivingException t) {
+                final DevFailed devFailed = new DevFailed();
+                devFailed.initCause(t);
+                devFailed.setStackTrace(t.getStackTrace());
+
+                final String message = DBTools.getCompleteMessage(devFailed);
+                logger.warn("Failed during retry_for_all ():");
+                logger.warn(message);
+
+                result = FAILED;
+            }
+        }
+        return result;
+    }
+
+    private void computeLoads() {
+        final int[] loads = collectorFactory.factoryLoadAssessment();
+        attr_scalar_charge_read = loads[0];
+        attr_spectrum_charge_read = loads[1];
+        attr_image_charge_read = loads[2];
+    }
+
+    // =========================================================
+    /**
+     * Execute command "StopArchiveAtt" on device. Command that stops the
+     * archiving of an attibute. This command need an AttributeLightMode type
+     * object. An AttributeLightMode type object encapsulate all the
+     * informations needed to found the Collector in charge of the archiving of
+     * the specified attribute The informations needed are the type, the format,
+     * the writable property and the archiving mode
+     * 
+     * @param argin
+     *            the attribute on witch archiving must be stopped
+     */
+    // =========================================================
+    public void stop_archive_att(final String[] argin) throws DevFailed {
+        TangoStateUtils.isAllowed(this);
+        TangoStateUtils.setRunning(this);
+        logger.debug("stop_archive_att - in");
+        try {
+            final String attributeName = argin[0];
+            // final AttributeLightMode attributeLightMode =
+            // AttributeLightMode.creationWithFullInformation(argin);
+            logger.debug("attribute: " + attributeName);
+            if ((dbProxy != null)
+                    && (koAttributes.contains(attributeName.toLowerCase()) || okAttributes.contains(attributeName
+                            .toLowerCase()))) {
+                // stop only if attribute is managed by this archiver
+                dbProxy.updateModeRecord(attributeName);
+                final HdbCollector hdbCollector = collectorFactory.get(attributeName);
+                if (hdbCollector != null) {
+                    hdbCollector.removeSource(attributeName);
+                }
+                koAttributes.remove(attributeName.toLowerCase());
+                okAttributes.remove(attributeName.toLowerCase());
+            } else {
+                DevFailedUtils.throwDevFailed(attributeName + " is not archived by this device");
+            }
+        } catch (final ArchivingException e) {
+            logger.error("stop failed", e);
+            e.printStackTrace();
+            throw e.toTangoException();
+        } finally {
+            computeLoads();
+            TangoStateUtils.updateState(this, koAttributes, okAttributes);
+            logger.debug("stop_archive_att - out");
+        }
+    }
+
+    // =========================================================
+    /**
+     * Execute command "StateDetailed" on device. This command returns a
+     * detailed state of the device.
+     * 
+     * @return The detailed state
+     */
+    // =========================================================
+    public String state_detailed() throws DevFailed {
+        String argout = new String();
+        logger.info("Entering state_detailed()");
+
+        // ---Add your Own code to control device here ---
+        final StringBuilder stringBuffer = new StringBuilder();
+        stringBuffer.append(TangoStateUtils.statusToString(koAttributes, okAttributes));
+        stringBuffer.append(collectorFactory.factoryAssessment());
+
+        argout = stringBuffer.toString();
+        logger.info("Exiting state_detailed()");
+        return argout;
+    }
+
+    // private static DevError[] getNotYetReadyError() {
+    // final ErrSeverity severity = ErrSeverity.WARN;
+    // final String reason = ControlResult.EMPTY_REPORT;
+    // final String desc = ControlResult.EMPTY_REPORT;
+    // final String origin = ControlResult.EMPTY_REPORT;
+    //
+    // final DevError devError = new DevError(reason, severity, desc, origin);
+    // final DevError[] ret = new DevError[1];
+    // ret[0] = devError;
+    // return ret;
+    // }
+
+    @Override
+    public void delete_device() throws DevFailed {
+        // if (dbProxy != null && dbProxy.isDbConnected()) {
+        // dbProxy.closeConnection();
+        // // Except.throw_exception("not supported", "please, restart device",
+        // // "delete_device");
+        // }
+    }
+
+    // =========================================================
+    /**
+     * main part for the device server class
+     */
+    // =========================================================
+    public static void main(final String[] argv) {
+        try {
+            final Util tg = Util.init(argv, ConfigConst.HDB_CLASS_DEVICE);
+            // UtilCLA tg = (UtilCLA) UtilCLA.init(argv , ConfigConst.HDB_CLASS_DEVICE);
+            // UtilCLA tgCLA = UtilCLA.castToUtilCLA ( tg );
+
+            tg.server_init();
+
+            System.out.println("Ready to accept request");
+
+            // tgCLA.server_run();
+            tg.server_run();
+        } catch (final OutOfMemoryError ex) {
+            System.err.println("Can't allocate memory !!!!");
+            System.err.println("Exiting");
+        } catch (final UserException ex) {
+            Except.print_exception(ex);
+
+            System.err.println("Received a CORBA user exception");
+            System.err.println("Exiting");
+        } catch (final SystemException ex) {
+            Except.print_exception(ex);
+
+            System.err.println("Received a CORBA system exception");
+            System.err.println("Exiting");
+        }
+
+        System.exit(-1);
+    }
+
+}
+
+// --------------------------------------------------------------------------
+/*
+ * end of $Source:
+ * /cvsroot/tango-cs/tango/jserver/archiving/HdbArchiver/HdbArchiver.java,v $
+ */
diff --git a/src/main/java/HdbArchiver/HdbArchiverClass.java b/hdbarchiver/src/main/java/HdbArchiver/HdbArchiverClass.java
similarity index 97%
rename from src/main/java/HdbArchiver/HdbArchiverClass.java
rename to hdbarchiver/src/main/java/HdbArchiver/HdbArchiverClass.java
index 78fbc8436b709a33c0fe8c1381c9167517c396e2..475365dbb9432f5359416c7aee1220b0079c1ffc 100644
--- a/src/main/java/HdbArchiver/HdbArchiverClass.java
+++ b/hdbarchiver/src/main/java/HdbArchiver/HdbArchiverClass.java
@@ -1,383 +1,383 @@
-// +======================================================================
-// $Source:
-// /cvsroot/tango-cs/tango/jserver/archiving/HdbArchiver/HdbArchiverClass.java,v
-// $
-//
-// Project: Tango Device Server
-//
-// Description: java source code for the HdbArchiver class .
-// This class is a singleton class and implements everything
-// which exists only once for all the HdbArchiver object
-// It inherits from the DeviceClass class.
-//
-// $Author: ounsy $
-//
-// $Revision: 1.12 $
-//
-// $Log: HdbArchiverClass.java,v $
-// Revision 1.12 2006/08/23 09:41:23 ounsy
-// minor changes
-//
-// Revision 1.11 2006/07/25 13:22:32 ounsy
-// added a "version" attribute
-//
-// Revision 1.10 2006/03/08 14:36:21 ounsy
-// added pogo comments
-//
-// Revision 1.9 2006/02/15 13:11:31 ounsy
-// organized imports
-//
-// Revision 1.8 2006/02/15 12:49:55 ounsy
-// added support for HdbArchiver internal support
-//
-// Revision 1.7 2006/02/06 13:00:46 ounsy
-// new commands RetryForAttribute and RetryForAttributes
-//
-// Revision 1.6 2006/01/27 13:06:40 ounsy
-// organised imports
-//
-// Revision 1.5 2005/11/29 17:33:53 chinkumo
-// no message
-//
-// Revision 1.4.12.3 2005/11/29 16:16:05 chinkumo
-// Code reformated (pogo compatible)
-//
-// Revision 1.4.12.2 2005/11/15 13:46:08 chinkumo
-// ...
-//
-// Revision 1.4.12.1 2005/09/26 08:01:20 chinkumo
-// Minor changes !
-//
-// Revision 1.4 2005/06/15 13:58:48 chinkumo
-// The device was regenerated in Tango V5.
-//
-//
-// copyleft : European Synchrotron Radiation Facility
-// BP 220, Grenoble 38043
-// FRANCE
-//
-// -======================================================================
-//
-// This file is generated by POGO
-// (Program Obviously used to Generate tango Object)
-//
-// (c) - Software Engineering Group - ESRF
-// =============================================================================
-
-package HdbArchiver;
-
-import java.util.ResourceBundle;
-import java.util.Vector;
-
-import fr.esrf.Tango.AttrWriteType;
-import fr.esrf.Tango.DevFailed;
-import fr.esrf.Tango.DispLevel;
-import fr.esrf.TangoApi.DbDatum;
-import fr.esrf.TangoDs.Attr;
-import fr.esrf.TangoDs.DeviceClass;
-import fr.esrf.TangoDs.DeviceImpl;
-import fr.esrf.TangoDs.TangoConst;
-import fr.esrf.TangoDs.TemplCommandOut;
-import fr.esrf.TangoDs.Util;
-import fr.soleil.archiving.common.api.exception.ArchivingException;
-import fr.soleil.archiving.hdbtdb.api.tools.mode.ShortPeriodAttributesManager;
-
-public class HdbArchiverClass extends DeviceClass implements TangoConst {
-
-    /**
-     * HdbArchiverClass class instance (it is a singleton).
-     */
-    private static HdbArchiverClass _instance = null;
-
-    // /**
-    // * Class properties array.
-    // */
-    // private final DbDatum[] cl_prop = null;
-
-    // --------- Start of properties data members ----------
-
-    /**
-     * Computer identifier on wich is settled the database HDB. The identifier
-     * can be the computer name or its IP address. <br>
-     * <b>Default value : </b> localhost
-     */
-    String dbHost;
-    /**
-     * Database name.<br>
-     * <b>Default value : </b> hdb
-     */
-    String dbName;
-    /**
-     * true if the 'facility' information is appended to all device's (or
-     * attributes) name. false otherwise.<br>
-     * <b>Default value : </b> false
-     */
-    boolean facility;
-
-    /**
-     * true if the ORACLE RAC connection is activated. This information is
-     * appended to all device's (or attributes) name. false otherwise.<br>
-     * <b>Default value : </b> false
-     */
-    boolean RacConnection;
-
-    // --------- End of properties data members ----------
-
-    // ===================================================================
-    //
-    // method : instance()
-    //
-    // description : static method to retrieve the HdbArchiverClass object
-    // once it has been initialised
-    //
-    // ===================================================================
-    public static HdbArchiverClass instance() {
-        if (_instance == null) {
-            System.err.println("HdbArchiverClass is not initialised !!!");
-            System.err.println("Exiting");
-            System.exit(-1);
-        }
-        return _instance;
-    }
-
-    // ===================================================================
-    //
-    // method : Init()
-    //
-    // description : static method to create/retrieve the HdbArchiverClass
-    // object. This method is the only one which enables a
-    // user to create the object
-    //
-    // in : - class_name : The class name
-    //
-    // ===================================================================
-    public static synchronized HdbArchiverClass init(String class_name) throws DevFailed {
-        if (_instance == null) {
-            try {
-                // First call to this method.
-                // It initializes the short period attributes map
-                ShortPeriodAttributesManager.getShortPeriodAttributes();
-            } catch (ArchivingException e) {
-                e.printStackTrace();
-                throw new DevFailed();
-            }
-            _instance = new HdbArchiverClass(class_name);
-        }
-        return _instance;
-    }
-
-    // ===================================================================
-    //
-    // method : HdbArchiverClass()
-    //
-    // description : constructor for the HdbArchiverClass class
-    //
-    // argument : in : - name : The class name
-    //
-    // ===================================================================
-    protected HdbArchiverClass(String name) throws DevFailed {
-        super(name);
-
-        Util.out2.println("Entering HdbArchiverClass constructor");
-        // write_class_property();
-        get_class_property();
-
-        Util.out2.println("Leaving HdbArchiverClass constructor");
-    }
-
-    // ===================================================================
-    //
-    // method : command_factory()
-    //
-    // description : Create the command object(s) and store them in the
-    // command list
-    // ===================================================================
-    @SuppressWarnings("unchecked")
-    @Override
-    public void command_factory() {
-        command_list
-                .addElement(new GetErrorDomainsInternal("GetErrorDomainsInternal", Tango_DEV_VOID,
-                        Tango_DEVVAR_STRINGARRAY, "",
-                        "The list of all domains that have at least one attribute not correctly archiving",
-                        DispLevel.OPERATOR));
-
-        command_list.addElement(new GetErrorsForDomainInternal("GetErrorsForDomainInternal", Tango_DEV_STRING,
-                Tango_DEVVAR_STRINGARRAY, "The domain name", "The list of all KO attributes for this domain",
-                DispLevel.OPERATOR));
-
-        command_list.addElement(new GetErrorsForAttributeInternal("GetErrorsForAttributeInternal", Tango_DEV_STRING,
-                Tango_DEVVAR_STRINGARRAY, "The attribute name (NOT the complete name)",
-                "The list of all KO attributes sharing this name", DispLevel.OPERATOR));
-
-        command_list.addElement(new IsAttributeCorrectlyArchivedInternal("IsAttributeCorrectlyArchivedInternal",
-                Tango_DEV_STRING, Tango_DEV_BOOLEAN, "The complete name of the attribute",
-                "True if this attribute is archiving correctly", DispLevel.OPERATOR));
-
-        command_list
-                .addElement(new RetryForKOAttributes(
-                        "RetryForKOAttributes",
-                        Tango_DEV_VOID,
-                        Tango_DEV_SHORT,
-                        "",
-                        "A return code, can be either: 10 (the archiver isn't in charge of any attribute, or they are all correctly archiving) 20 (the retry succeeded) or 30 (the retry failed)",
-                        DispLevel.OPERATOR));
-
-        command_list
-                .addElement(new RetryForAll(
-                        "RetryForAll",
-                        Tango_DEV_VOID,
-                        Tango_DEV_SHORT,
-                        "",
-                        "A return code, can be either: 10 (the archiver isn't in charge of any attribute) 20 (the retry succeeded) or 30 (the retry failed)",
-                        DispLevel.OPERATOR));
-
-        command_list
-                .addElement(new RetryForAttributesCmd(
-                        "RetryForAttributes",
-                        Tango_DEVVAR_STRINGARRAY,
-                        Tango_DEV_SHORT,
-                        "The complete names of the attributes",
-                        "A return code, can be either: 10 (the archiver isn't in charge of any of the specified attributes) 20 (the retry succeeded) or 30 (the retry failed)",
-                        DispLevel.OPERATOR));
-
-        command_list
-                .addElement(new RetryForAttributeCmd(
-                        "RetryForAttribute",
-                        Tango_DEV_STRING,
-                        Tango_DEV_SHORT,
-                        "The complete name of the attribute",
-                        "A return code, can be either: 10 (the archiver isn't in charge of the specified attribute) 20 (the retry succeeded) or 30 (the retry failed)",
-                        DispLevel.OPERATOR));
-
-        command_list.addElement(new TriggerArchiveConfCmd("TriggerArchiveConf", Tango_DEVVAR_STRINGARRAY,
-                Tango_DEV_VOID, "The group of attributes to archive", "", DispLevel.OPERATOR));
-        command_list.addElement(new TriggerArchiveAttCmd("TriggerArchiveAtt", Tango_DEVVAR_STRINGARRAY, Tango_DEV_VOID,
-                "The attribute to archive", "", DispLevel.OPERATOR));
-        command_list.addElement(new TriggerArchiveAttCheckCmd("TriggerArchiveAttCheck", Tango_DEV_STRING,
-                Tango_DEV_VOID, "The name of the attribute to archive", "", DispLevel.OPERATOR));
-        command_list.addElement(new StopArchiveConfCmd("StopArchiveConf", Tango_DEVVAR_STRINGARRAY, Tango_DEV_VOID,
-                "The group of attributes", "", DispLevel.OPERATOR));
-        command_list.addElement(new StopArchiveAttCmd("StopArchiveAtt", Tango_DEVVAR_STRINGARRAY, Tango_DEV_VOID,
-                "the attribute on witch archiving must be stopped", "", DispLevel.OPERATOR));
-        command_list.addElement(new StateDetailedClass("StateDetailed", Tango_DEV_VOID, Tango_DEV_STRING, "",
-                "The detailed state", DispLevel.EXPERT));
-        command_list.addElement(new TemplCommandOut("GetKOAttributes", "getKOAttributes"));
-        command_list.addElement(new GetErrorMessageForAttribute(GetErrorMessageForAttribute.class.getSimpleName(),
-                Tango_DEV_STRING, Tango_DEV_STRING, "The attribute name",
-                "The last error message obtained at attribute value insertion in database", DispLevel.OPERATOR));
-        // add polling if any
-        /*
-         * for (int i = 0; i < command_list.size(); i++) { // Command cmd = (
-         * Command ) command_list.elementAt(i); }
-         */
-    }
-
-    // ===================================================================
-    //
-    // method : device_factory()
-    //
-    // description : Create the device object(s) and store them in the
-    // device list
-    //
-    // argument : in : String[] devlist : The device name list
-    //
-    // ===================================================================
-    @SuppressWarnings("unchecked")
-    @Override
-    public void device_factory(String[] devlist) throws DevFailed {
-        String device_version = ResourceBundle.getBundle("application").getString("project.version");
-
-        for (int i = 0; i < devlist.length; i++) {
-            // Util.out4.println("Device name : " + devlist[ i ]);
-
-            // Create device and add it into the device list
-            // ----------------------------------------------
-
-            device_list.addElement(new HdbArchiver(this, devlist[i], device_version));
-
-            // Export device to the outside world
-            // ----------------------------------------------
-            if (Util._UseDb == true) {
-                export_device(((DeviceImpl) device_list.elementAt(i)));
-            } else {
-                export_device(((DeviceImpl) device_list.elementAt(i)), devlist[i]);
-            }
-        }
-    }
-
-    // =============================================================================
-    //
-    // Method: attribute_factory(Vector att_list)
-    //
-    // =============================================================================
-    @SuppressWarnings("unchecked")
-    @Override
-    public void attribute_factory(Vector att_list) throws DevFailed {
-        // Attribute : scalar_charge
-        Attr scalar_charge = new Attr("scalar_charge", Tango_DEV_LONG, AttrWriteType.READ);
-        att_list.addElement(scalar_charge);
-
-        // Attribute : spectrum_charge
-        Attr spectrum_charge = new Attr("spectrum_charge", Tango_DEV_LONG, AttrWriteType.READ);
-        att_list.addElement(spectrum_charge);
-
-        // Attribute : image_charge
-        Attr image_charge = new Attr("image_charge", Tango_DEV_LONG, AttrWriteType.READ);
-        att_list.addElement(image_charge);
-
-        // Attribute : version
-        Attr version = new Attr("version", Tango_DEV_STRING, AttrWriteType.READ);
-        att_list.addElement(version);
-
-    }
-
-    // ===================================================================
-    /**
-     * Get the class property for specified name.
-     * 
-     * @param name
-     *            The property name.
-     * @throws DevFailed
-     */
-    // ===================================================================
-    public DbDatum get_class_property(String name) throws DevFailed {
-        DbDatum[] classProps = get_db_class().get_property(new String[] { name });
-        return classProps[0];
-    }
-
-    // ===================================================================
-    /**
-     * Read the class properties from database.
-     */
-    // ===================================================================
-    public void get_class_property() throws DevFailed {
-
-    }
-
-    // ===================================================================
-    /**
-     * Set class description as property in database
-     */
-    // ===================================================================
-    // private void write_class_property() throws DevFailed {
-    // // First time, check if database used
-    // // --------------------------------------------
-    // if (Util._UseDb == false) {
-    // return;
-    // }
-    //
-    // // Prepeare DbDatum
-    // // --------------------------------------------
-    // DbDatum[] data = new DbDatum[2];
-    // data[0] = new DbDatum("ProjectTitle");
-    // data[0].insert("Tango Device Server");
-    //
-    // data[1] = new DbDatum("Description");
-    // data[1].insert("Device of Archiving system");
-    //
-    // // Call database and and values
-    // // --------------------------------------------
-    // get_db_class().put_property(data);
-    // }
-
-}
+// +======================================================================
+// $Source:
+// /cvsroot/tango-cs/tango/jserver/archiving/HdbArchiver/HdbArchiverClass.java,v
+// $
+//
+// Project: Tango Device Server
+//
+// Description: java source code for the HdbArchiver class .
+// This class is a singleton class and implements everything
+// which exists only once for all the HdbArchiver object
+// It inherits from the DeviceClass class.
+//
+// $Author: ounsy $
+//
+// $Revision: 1.12 $
+//
+// $Log: HdbArchiverClass.java,v $
+// Revision 1.12 2006/08/23 09:41:23 ounsy
+// minor changes
+//
+// Revision 1.11 2006/07/25 13:22:32 ounsy
+// added a "version" attribute
+//
+// Revision 1.10 2006/03/08 14:36:21 ounsy
+// added pogo comments
+//
+// Revision 1.9 2006/02/15 13:11:31 ounsy
+// organized imports
+//
+// Revision 1.8 2006/02/15 12:49:55 ounsy
+// added support for HdbArchiver internal support
+//
+// Revision 1.7 2006/02/06 13:00:46 ounsy
+// new commands RetryForAttribute and RetryForAttributes
+//
+// Revision 1.6 2006/01/27 13:06:40 ounsy
+// organised imports
+//
+// Revision 1.5 2005/11/29 17:33:53 chinkumo
+// no message
+//
+// Revision 1.4.12.3 2005/11/29 16:16:05 chinkumo
+// Code reformated (pogo compatible)
+//
+// Revision 1.4.12.2 2005/11/15 13:46:08 chinkumo
+// ...
+//
+// Revision 1.4.12.1 2005/09/26 08:01:20 chinkumo
+// Minor changes !
+//
+// Revision 1.4 2005/06/15 13:58:48 chinkumo
+// The device was regenerated in Tango V5.
+//
+//
+// copyleft : European Synchrotron Radiation Facility
+// BP 220, Grenoble 38043
+// FRANCE
+//
+// -======================================================================
+//
+// This file is generated by POGO
+// (Program Obviously used to Generate tango Object)
+//
+// (c) - Software Engineering Group - ESRF
+// =============================================================================
+
+package HdbArchiver;
+
+import java.util.ResourceBundle;
+import java.util.Vector;
+
+import fr.esrf.Tango.AttrWriteType;
+import fr.esrf.Tango.DevFailed;
+import fr.esrf.Tango.DispLevel;
+import fr.esrf.TangoApi.DbDatum;
+import fr.esrf.TangoDs.Attr;
+import fr.esrf.TangoDs.DeviceClass;
+import fr.esrf.TangoDs.DeviceImpl;
+import fr.esrf.TangoDs.TangoConst;
+import fr.esrf.TangoDs.TemplCommandOut;
+import fr.esrf.TangoDs.Util;
+import fr.soleil.archiving.common.api.exception.ArchivingException;
+import fr.soleil.archiving.hdbtdb.api.tools.mode.ShortPeriodAttributesManager;
+
+public class HdbArchiverClass extends DeviceClass implements TangoConst {
+
+    /**
+     * HdbArchiverClass class instance (it is a singleton).
+     */
+    private static HdbArchiverClass _instance = null;
+
+    // /**
+    // * Class properties array.
+    // */
+    // private final DbDatum[] cl_prop = null;
+
+    // --------- Start of properties data members ----------
+
+    /**
+     * Computer identifier on wich is settled the database HDB. The identifier
+     * can be the computer name or its IP address. <br>
+     * <b>Default value : </b> localhost
+     */
+    String dbHost;
+    /**
+     * Database name.<br>
+     * <b>Default value : </b> hdb
+     */
+    String dbName;
+    /**
+     * true if the 'facility' information is appended to all device's (or
+     * attributes) name. false otherwise.<br>
+     * <b>Default value : </b> false
+     */
+    boolean facility;
+
+    /**
+     * true if the ORACLE RAC connection is activated. This information is
+     * appended to all device's (or attributes) name. false otherwise.<br>
+     * <b>Default value : </b> false
+     */
+    boolean RacConnection;
+
+    // --------- End of properties data members ----------
+
+    // ===================================================================
+    //
+    // method : instance()
+    //
+    // description : static method to retrieve the HdbArchiverClass object
+    // once it has been initialised
+    //
+    // ===================================================================
+    public static HdbArchiverClass instance() {
+        if (_instance == null) {
+            System.err.println("HdbArchiverClass is not initialised !!!");
+            System.err.println("Exiting");
+            System.exit(-1);
+        }
+        return _instance;
+    }
+
+    // ===================================================================
+    //
+    // method : Init()
+    //
+    // description : static method to create/retrieve the HdbArchiverClass
+    // object. This method is the only one which enables a
+    // user to create the object
+    //
+    // in : - class_name : The class name
+    //
+    // ===================================================================
+    public static synchronized HdbArchiverClass init(String class_name) throws DevFailed {
+        if (_instance == null) {
+            try {
+                // First call to this method.
+                // It initializes the short period attributes map
+                ShortPeriodAttributesManager.getShortPeriodAttributes();
+            } catch (ArchivingException e) {
+                e.printStackTrace();
+                throw new DevFailed();
+            }
+            _instance = new HdbArchiverClass(class_name);
+        }
+        return _instance;
+    }
+
+    // ===================================================================
+    //
+    // method : HdbArchiverClass()
+    //
+    // description : constructor for the HdbArchiverClass class
+    //
+    // argument : in : - name : The class name
+    //
+    // ===================================================================
+    protected HdbArchiverClass(String name) throws DevFailed {
+        super(name);
+
+        Util.out2.println("Entering HdbArchiverClass constructor");
+        // write_class_property();
+        get_class_property();
+
+        Util.out2.println("Leaving HdbArchiverClass constructor");
+    }
+
+    // ===================================================================
+    //
+    // method : command_factory()
+    //
+    // description : Create the command object(s) and store them in the
+    // command list
+    // ===================================================================
+    @SuppressWarnings("unchecked")
+    @Override
+    public void command_factory() {
+        command_list
+                .addElement(new GetErrorDomainsInternal("GetErrorDomainsInternal", Tango_DEV_VOID,
+                        Tango_DEVVAR_STRINGARRAY, "",
+                        "The list of all domains that have at least one attribute not correctly archiving",
+                        DispLevel.OPERATOR));
+
+        command_list.addElement(new GetErrorsForDomainInternal("GetErrorsForDomainInternal", Tango_DEV_STRING,
+                Tango_DEVVAR_STRINGARRAY, "The domain name", "The list of all KO attributes for this domain",
+                DispLevel.OPERATOR));
+
+        command_list.addElement(new GetErrorsForAttributeInternal("GetErrorsForAttributeInternal", Tango_DEV_STRING,
+                Tango_DEVVAR_STRINGARRAY, "The attribute name (NOT the complete name)",
+                "The list of all KO attributes sharing this name", DispLevel.OPERATOR));
+
+        command_list.addElement(new IsAttributeCorrectlyArchivedInternal("IsAttributeCorrectlyArchivedInternal",
+                Tango_DEV_STRING, Tango_DEV_BOOLEAN, "The complete name of the attribute",
+                "True if this attribute is archiving correctly", DispLevel.OPERATOR));
+
+        command_list
+                .addElement(new RetryForKOAttributes(
+                        "RetryForKOAttributes",
+                        Tango_DEV_VOID,
+                        Tango_DEV_SHORT,
+                        "",
+                        "A return code, can be either: 10 (the archiver isn't in charge of any attribute, or they are all correctly archiving) 20 (the retry succeeded) or 30 (the retry failed)",
+                        DispLevel.OPERATOR));
+
+        command_list
+                .addElement(new RetryForAll(
+                        "RetryForAll",
+                        Tango_DEV_VOID,
+                        Tango_DEV_SHORT,
+                        "",
+                        "A return code, can be either: 10 (the archiver isn't in charge of any attribute) 20 (the retry succeeded) or 30 (the retry failed)",
+                        DispLevel.OPERATOR));
+
+        command_list
+                .addElement(new RetryForAttributesCmd(
+                        "RetryForAttributes",
+                        Tango_DEVVAR_STRINGARRAY,
+                        Tango_DEV_SHORT,
+                        "The complete names of the attributes",
+                        "A return code, can be either: 10 (the archiver isn't in charge of any of the specified attributes) 20 (the retry succeeded) or 30 (the retry failed)",
+                        DispLevel.OPERATOR));
+
+        command_list
+                .addElement(new RetryForAttributeCmd(
+                        "RetryForAttribute",
+                        Tango_DEV_STRING,
+                        Tango_DEV_SHORT,
+                        "The complete name of the attribute",
+                        "A return code, can be either: 10 (the archiver isn't in charge of the specified attribute) 20 (the retry succeeded) or 30 (the retry failed)",
+                        DispLevel.OPERATOR));
+
+        command_list.addElement(new TriggerArchiveConfCmd("TriggerArchiveConf", Tango_DEVVAR_STRINGARRAY,
+                Tango_DEV_VOID, "The group of attributes to archive", "", DispLevel.OPERATOR));
+        command_list.addElement(new TriggerArchiveAttCmd("TriggerArchiveAtt", Tango_DEVVAR_STRINGARRAY, Tango_DEV_VOID,
+                "The attribute to archive", "", DispLevel.OPERATOR));
+        command_list.addElement(new TriggerArchiveAttCheckCmd("TriggerArchiveAttCheck", Tango_DEV_STRING,
+                Tango_DEV_VOID, "The name of the attribute to archive", "", DispLevel.OPERATOR));
+        command_list.addElement(new StopArchiveConfCmd("StopArchiveConf", Tango_DEVVAR_STRINGARRAY, Tango_DEV_VOID,
+                "The group of attributes", "", DispLevel.OPERATOR));
+        command_list.addElement(new StopArchiveAttCmd("StopArchiveAtt", Tango_DEVVAR_STRINGARRAY, Tango_DEV_VOID,
+                "the attribute on witch archiving must be stopped", "", DispLevel.OPERATOR));
+        command_list.addElement(new StateDetailedClass("StateDetailed", Tango_DEV_VOID, Tango_DEV_STRING, "",
+                "The detailed state", DispLevel.EXPERT));
+        command_list.addElement(new TemplCommandOut("GetKOAttributes", "getKOAttributes"));
+        command_list.addElement(new GetErrorMessageForAttribute(GetErrorMessageForAttribute.class.getSimpleName(),
+                Tango_DEV_STRING, Tango_DEV_STRING, "The attribute name",
+                "The last error message obtained at attribute value insertion in database", DispLevel.OPERATOR));
+        // add polling if any
+        /*
+         * for (int i = 0; i < command_list.size(); i++) { // Command cmd = (
+         * Command ) command_list.elementAt(i); }
+         */
+    }
+
+    // ===================================================================
+    //
+    // method : device_factory()
+    //
+    // description : Create the device object(s) and store them in the
+    // device list
+    //
+    // argument : in : String[] devlist : The device name list
+    //
+    // ===================================================================
+    @SuppressWarnings("unchecked")
+    @Override
+    public void device_factory(String[] devlist) throws DevFailed {
+        String device_version = ResourceBundle.getBundle("application").getString("project.version");
+
+        for (int i = 0; i < devlist.length; i++) {
+            // Util.out4.println("Device name : " + devlist[ i ]);
+
+            // Create device and add it into the device list
+            // ----------------------------------------------
+
+            device_list.addElement(new HdbArchiver(this, devlist[i], device_version));
+
+            // Export device to the outside world
+            // ----------------------------------------------
+            if (Util._UseDb == true) {
+                export_device(((DeviceImpl) device_list.elementAt(i)));
+            } else {
+                export_device(((DeviceImpl) device_list.elementAt(i)), devlist[i]);
+            }
+        }
+    }
+
+    // =============================================================================
+    //
+    // Method: attribute_factory(Vector att_list)
+    //
+    // =============================================================================
+    @SuppressWarnings("unchecked")
+    @Override
+    public void attribute_factory(Vector att_list) throws DevFailed {
+        // Attribute : scalar_charge
+        Attr scalar_charge = new Attr("scalar_charge", Tango_DEV_LONG, AttrWriteType.READ);
+        att_list.addElement(scalar_charge);
+
+        // Attribute : spectrum_charge
+        Attr spectrum_charge = new Attr("spectrum_charge", Tango_DEV_LONG, AttrWriteType.READ);
+        att_list.addElement(spectrum_charge);
+
+        // Attribute : image_charge
+        Attr image_charge = new Attr("image_charge", Tango_DEV_LONG, AttrWriteType.READ);
+        att_list.addElement(image_charge);
+
+        // Attribute : version
+        Attr version = new Attr("version", Tango_DEV_STRING, AttrWriteType.READ);
+        att_list.addElement(version);
+
+    }
+
+    // ===================================================================
+    /**
+     * Get the class property for specified name.
+     * 
+     * @param name
+     *            The property name.
+     * @throws DevFailed
+     */
+    // ===================================================================
+    public DbDatum get_class_property(String name) throws DevFailed {
+        DbDatum[] classProps = get_db_class().get_property(new String[] { name });
+        return classProps[0];
+    }
+
+    // ===================================================================
+    /**
+     * Read the class properties from database.
+     */
+    // ===================================================================
+    public void get_class_property() throws DevFailed {
+
+    }
+
+    // ===================================================================
+    /**
+     * Set class description as property in database
+     */
+    // ===================================================================
+    // private void write_class_property() throws DevFailed {
+    // // First time, check if database used
+    // // --------------------------------------------
+    // if (Util._UseDb == false) {
+    // return;
+    // }
+    //
+    // // Prepeare DbDatum
+    // // --------------------------------------------
+    // DbDatum[] data = new DbDatum[2];
+    // data[0] = new DbDatum("ProjectTitle");
+    // data[0].insert("Tango Device Server");
+    //
+    // data[1] = new DbDatum("Description");
+    // data[1].insert("Device of Archiving system");
+    //
+    // // Call database and and values
+    // // --------------------------------------------
+    // get_db_class().put_property(data);
+    // }
+
+}
diff --git a/src/main/java/HdbArchiver/HdbStateDetailed.java b/hdbarchiver/src/main/java/HdbArchiver/HdbStateDetailed.java
similarity index 96%
rename from src/main/java/HdbArchiver/HdbStateDetailed.java
rename to hdbarchiver/src/main/java/HdbArchiver/HdbStateDetailed.java
index 75a7773b0390a5623c47c239692ed3bab197ae5d..d6ac6418ab8b1d96d563b6271b4cf8df1a310cc1 100644
--- a/src/main/java/HdbArchiver/HdbStateDetailed.java
+++ b/hdbarchiver/src/main/java/HdbArchiver/HdbStateDetailed.java
@@ -1,62 +1,62 @@
-package HdbArchiver;
-
-import fr.esrf.TangoApi.DeviceData;
-import fr.esrf.TangoApi.DeviceProxy;
-
-public class HdbStateDetailed {
-
-	private static final int NUMBER_OF_DSERVERS = 20;
-	private static final int NUMBER_OF_DEVICES_BY_DSERVER = 5;
-
-	/**
-	 * @param args
-	 *            8 juil. 2005
-	 */
-	public static void main(String[] args) {
-		String archiverPrefix = "archiving/hdbarchiver/";
-		String archiver = archiverPrefix;
-
-		for (int iDevices = 1; iDevices <= NUMBER_OF_DSERVERS; iDevices++) {
-			String device = leftPad(iDevices);
-
-			for (int iServers = 1; iServers <= NUMBER_OF_DEVICES_BY_DSERVER; iServers++) {
-				String server = leftPad(iServers);
-
-				archiver = archiverPrefix + device + "_" + server;
-
-				System.out
-						.println("-----------------------------------------------------"
-								+ archiver + "-----------------------");
-				deviceAssessment(archiver);
-				System.out
-						.println("--------------------------------------------------------------------------------------");
-			}
-		}
-
-	}
-
-	private static String leftPad(int i) {
-		String ret = "" + i;
-		if (i < 10) {
-			ret = "0" + ret;
-		}
-		return ret;
-	}
-
-	private static void deviceAssessment(String archiver) {
-		try {
-			DeviceProxy proxy = new DeviceProxy(archiver);
-			proxy.set_timeout_millis(10000);
-			DeviceData argin = new DeviceData();
-			// argin.insert ( parameters );
-			String CMD_NAME = "StateDetailed";
-
-			DeviceData argout = proxy.command_inout(CMD_NAME, argin);
-			String assessment = argout.extractString();
-
-			System.out.println(assessment);
-		} catch (Throwable t) {
-			t.printStackTrace();
-		}
-	}
+package HdbArchiver;
+
+import fr.esrf.TangoApi.DeviceData;
+import fr.esrf.TangoApi.DeviceProxy;
+
+public class HdbStateDetailed {
+
+	private static final int NUMBER_OF_DSERVERS = 20;
+	private static final int NUMBER_OF_DEVICES_BY_DSERVER = 5;
+
+	/**
+	 * @param args
+	 *            8 juil. 2005
+	 */
+	public static void main(String[] args) {
+		String archiverPrefix = "archiving/hdbarchiver/";
+		String archiver = archiverPrefix;
+
+		for (int iDevices = 1; iDevices <= NUMBER_OF_DSERVERS; iDevices++) {
+			String device = leftPad(iDevices);
+
+			for (int iServers = 1; iServers <= NUMBER_OF_DEVICES_BY_DSERVER; iServers++) {
+				String server = leftPad(iServers);
+
+				archiver = archiverPrefix + device + "_" + server;
+
+				System.out
+						.println("-----------------------------------------------------"
+								+ archiver + "-----------------------");
+				deviceAssessment(archiver);
+				System.out
+						.println("--------------------------------------------------------------------------------------");
+			}
+		}
+
+	}
+
+	private static String leftPad(int i) {
+		String ret = "" + i;
+		if (i < 10) {
+			ret = "0" + ret;
+		}
+		return ret;
+	}
+
+	private static void deviceAssessment(String archiver) {
+		try {
+			DeviceProxy proxy = new DeviceProxy(archiver);
+			proxy.set_timeout_millis(10000);
+			DeviceData argin = new DeviceData();
+			// argin.insert ( parameters );
+			String CMD_NAME = "StateDetailed";
+
+			DeviceData argout = proxy.command_inout(CMD_NAME, argin);
+			String assessment = argout.extractString();
+
+			System.out.println(assessment);
+		} catch (Throwable t) {
+			t.printStackTrace();
+		}
+	}
 }
\ No newline at end of file
diff --git a/src/main/java/HdbArchiver/IsAttributeCorrectlyArchivedInternal.java b/hdbarchiver/src/main/java/HdbArchiver/IsAttributeCorrectlyArchivedInternal.java
similarity index 97%
rename from src/main/java/HdbArchiver/IsAttributeCorrectlyArchivedInternal.java
rename to hdbarchiver/src/main/java/HdbArchiver/IsAttributeCorrectlyArchivedInternal.java
index b14362e9e12d69028db0bc9f620c013d5f0dc595..6b4920549b966394316d680a8c90385fc8d3eb08 100644
--- a/src/main/java/HdbArchiver/IsAttributeCorrectlyArchivedInternal.java
+++ b/hdbarchiver/src/main/java/HdbArchiver/IsAttributeCorrectlyArchivedInternal.java
@@ -1,109 +1,109 @@
-package HdbArchiver;
-
-import org.omg.CORBA.Any;
-
-import fr.esrf.Tango.DevFailed;
-import fr.esrf.Tango.DevState;
-import fr.esrf.Tango.DispLevel;
-import fr.esrf.TangoDs.Command;
-import fr.esrf.TangoDs.DeviceImpl;
-import fr.esrf.TangoDs.TangoConst;
-
-public class IsAttributeCorrectlyArchivedInternal extends Command implements TangoConst {
-    // ===============================================================
-    /**
-     * Constructor for Command class StopArchiveAttCmd
-     * 
-     * @param name
-     *            command name
-     * @param in
-     *            argin type
-     * @param out
-     *            argout type
-     */
-    // ===============================================================
-    public IsAttributeCorrectlyArchivedInternal(final String name, final int in, final int out) {
-	super(name, in, out);
-    }
-
-    // ===============================================================
-    /**
-     * Constructor for Command class StopArchiveAttCmd
-     * 
-     * @param name
-     *            command name
-     * @param in
-     *            argin type
-     * @param in_comments
-     *            argin description
-     * @param out
-     *            argout type
-     * @param out_comments
-     *            argout description
-     */
-    // ===============================================================
-    public IsAttributeCorrectlyArchivedInternal(final String name, final int in, final int out,
-	    final String in_comments, final String out_comments) {
-	super(name, in, out, in_comments, out_comments);
-    }
-
-    // ===============================================================
-    /**
-     * Constructor for Command class StopArchiveAttCmd
-     * 
-     * @param name
-     *            command name
-     * @param in
-     *            argin type
-     * @param in_comments
-     *            argin description
-     * @param out
-     *            argout type
-     * @param out_comments
-     *            argout description
-     * @param level
-     *            The command display type OPERATOR or EXPERT
-     */
-    // ===============================================================
-    public IsAttributeCorrectlyArchivedInternal(final String name, final int in, final int out,
-	    final String in_comments, final String out_comments, final DispLevel level) {
-	super(name, in, out, in_comments, out_comments, level);
-    }
-
-    // ===============================================================
-    /**
-     * return the result of the device's command.
-     */
-    // ===============================================================
-    @Override
-    public Any execute(final DeviceImpl device, final Any in_any) throws DevFailed {
-	final String argin = extract_DevString(in_any);
-	final Any result = insert();
-	if (device instanceof HdbArchiver) {
-	    ((HdbArchiver) device).is_attribute_correctly_archived_internal(argin);
-	}
-	return result;
-    }
-
-    // ===============================================================
-    /**
-     * Check if it is allowed to execute the command.
-     */
-    // ===============================================================
-    @Override
-    public boolean is_allowed(final DeviceImpl device, final Any data_in) {
-	if (device.get_state() == DevState.FAULT) {
-	    // End of Generated Code
-
-	    // Re-Start of Generated Code
-	    return false;
-	}
-	return true;
-    }
-}
-
-// -----------------------------------------------------------------------------
-/*
- * end of $Source:/cvsroot/tango-cs/tango/jserver/archiving/HdbArchiver/
- * IsAttributeCorrectlyArchivedInternal.java,v $
- */
+package HdbArchiver;
+
+import org.omg.CORBA.Any;
+
+import fr.esrf.Tango.DevFailed;
+import fr.esrf.Tango.DevState;
+import fr.esrf.Tango.DispLevel;
+import fr.esrf.TangoDs.Command;
+import fr.esrf.TangoDs.DeviceImpl;
+import fr.esrf.TangoDs.TangoConst;
+
+public class IsAttributeCorrectlyArchivedInternal extends Command implements TangoConst {
+    // ===============================================================
+    /**
+     * Constructor for Command class StopArchiveAttCmd
+     * 
+     * @param name
+     *            command name
+     * @param in
+     *            argin type
+     * @param out
+     *            argout type
+     */
+    // ===============================================================
+    public IsAttributeCorrectlyArchivedInternal(final String name, final int in, final int out) {
+	super(name, in, out);
+    }
+
+    // ===============================================================
+    /**
+     * Constructor for Command class StopArchiveAttCmd
+     * 
+     * @param name
+     *            command name
+     * @param in
+     *            argin type
+     * @param in_comments
+     *            argin description
+     * @param out
+     *            argout type
+     * @param out_comments
+     *            argout description
+     */
+    // ===============================================================
+    public IsAttributeCorrectlyArchivedInternal(final String name, final int in, final int out,
+	    final String in_comments, final String out_comments) {
+	super(name, in, out, in_comments, out_comments);
+    }
+
+    // ===============================================================
+    /**
+     * Constructor for Command class StopArchiveAttCmd
+     * 
+     * @param name
+     *            command name
+     * @param in
+     *            argin type
+     * @param in_comments
+     *            argin description
+     * @param out
+     *            argout type
+     * @param out_comments
+     *            argout description
+     * @param level
+     *            The command display type OPERATOR or EXPERT
+     */
+    // ===============================================================
+    public IsAttributeCorrectlyArchivedInternal(final String name, final int in, final int out,
+	    final String in_comments, final String out_comments, final DispLevel level) {
+	super(name, in, out, in_comments, out_comments, level);
+    }
+
+    // ===============================================================
+    /**
+     * return the result of the device's command.
+     */
+    // ===============================================================
+    @Override
+    public Any execute(final DeviceImpl device, final Any in_any) throws DevFailed {
+	final String argin = extract_DevString(in_any);
+	final Any result = insert();
+	if (device instanceof HdbArchiver) {
+	    ((HdbArchiver) device).is_attribute_correctly_archived_internal(argin);
+	}
+	return result;
+    }
+
+    // ===============================================================
+    /**
+     * Check if it is allowed to execute the command.
+     */
+    // ===============================================================
+    @Override
+    public boolean is_allowed(final DeviceImpl device, final Any data_in) {
+	if (device.get_state() == DevState.FAULT) {
+	    // End of Generated Code
+
+	    // Re-Start of Generated Code
+	    return false;
+	}
+	return true;
+    }
+}
+
+// -----------------------------------------------------------------------------
+/*
+ * end of $Source:/cvsroot/tango-cs/tango/jserver/archiving/HdbArchiver/
+ * IsAttributeCorrectlyArchivedInternal.java,v $
+ */
diff --git a/src/main/java/HdbArchiver/RetryForAll.java b/hdbarchiver/src/main/java/HdbArchiver/RetryForAll.java
similarity index 97%
rename from src/main/java/HdbArchiver/RetryForAll.java
rename to hdbarchiver/src/main/java/HdbArchiver/RetryForAll.java
index 15c82f636136f359c573a9233f1a0c690d54cb8f..b8cad2df9f0a267ffc1cb41543406e1e50373ddf 100644
--- a/src/main/java/HdbArchiver/RetryForAll.java
+++ b/hdbarchiver/src/main/java/HdbArchiver/RetryForAll.java
@@ -1,113 +1,113 @@
-package HdbArchiver;
-
-import org.omg.CORBA.Any;
-
-import fr.esrf.Tango.DevFailed;
-import fr.esrf.Tango.DevState;
-import fr.esrf.Tango.DispLevel;
-import fr.esrf.TangoDs.Command;
-import fr.esrf.TangoDs.DeviceImpl;
-import fr.esrf.TangoDs.Except;
-import fr.esrf.TangoDs.TangoConst;
-import fr.soleil.archiving.hdbtdb.api.ConfigConst;
-
-public class RetryForAll extends Command implements TangoConst {
-    // ===============================================================
-    /**
-     * Constructor for Command class StopArchiveAttCmd
-     * 
-     * @param name
-     *            command name
-     * @param in
-     *            argin type
-     * @param out
-     *            argout type
-     */
-    // ===============================================================
-    public RetryForAll(final String name, final int in, final int out) {
-        super(name, in, out);
-    }
-
-    // ===============================================================
-    /**
-     * Constructor for Command class StopArchiveAttCmd
-     * 
-     * @param name
-     *            command name
-     * @param in
-     *            argin type
-     * @param in_comments
-     *            argin description
-     * @param out
-     *            argout type
-     * @param out_comments
-     *            argout description
-     */
-    // ===============================================================
-    public RetryForAll(final String name, final int in, final int out, final String in_comments,
-            final String out_comments) {
-        super(name, in, out, in_comments, out_comments);
-    }
-
-    // ===============================================================
-    /**
-     * Constructor for Command class StopArchiveAttCmd
-     * 
-     * @param name
-     *            command name
-     * @param in
-     *            argin type
-     * @param in_comments
-     *            argin description
-     * @param out
-     *            argout type
-     * @param out_comments
-     *            argout description
-     * @param level
-     *            The command display type OPERATOR or EXPERT
-     */
-    // ===============================================================
-    public RetryForAll(final String name, final int in, final int out, final String in_comments,
-            final String out_comments, final DispLevel level) {
-        super(name, in, out, in_comments, out_comments, level);
-    }
-
-    // ===============================================================
-    /**
-     * return the result of the device's command.
-     */
-    // ===============================================================
-    @Override
-    public Any execute(final DeviceImpl device, final Any in_any) throws DevFailed {
-
-        if (!(device instanceof HdbArchiver)) {
-            Except.throw_exception("DEVICE_ERROR", "Device parameter is not instance of HdbArchiver",
-                    ConfigConst.HDB_CLASS_DEVICE);
-        }
-
-        return insert(((HdbArchiver) device).retry_for_all());
-    }
-
-    // ===============================================================
-    /**
-     * Check if it is allowed to execute the command.
-     */
-    // ===============================================================
-    @Override
-    public boolean is_allowed(final DeviceImpl device, final Any data_in) {
-        if (device.get_state() == DevState.FAULT) {
-            // if (device.get_state() != DevState.ON) {
-            // End of Generated Code
-
-            // Re-Start of Generated Code
-            return false;
-        }
-        return true;
-    }
-}
-
-// -----------------------------------------------------------------------------
-/*
- * end of $Source:
- * /cvsroot/tango-cs/tango/jserver/archiving/HdbArchiver/RetryForAll.java,v $
- */
+package HdbArchiver;
+
+import org.omg.CORBA.Any;
+
+import fr.esrf.Tango.DevFailed;
+import fr.esrf.Tango.DevState;
+import fr.esrf.Tango.DispLevel;
+import fr.esrf.TangoDs.Command;
+import fr.esrf.TangoDs.DeviceImpl;
+import fr.esrf.TangoDs.Except;
+import fr.esrf.TangoDs.TangoConst;
+import fr.soleil.archiving.hdbtdb.api.ConfigConst;
+
+public class RetryForAll extends Command implements TangoConst {
+    // ===============================================================
+    /**
+     * Constructor for Command class StopArchiveAttCmd
+     * 
+     * @param name
+     *            command name
+     * @param in
+     *            argin type
+     * @param out
+     *            argout type
+     */
+    // ===============================================================
+    public RetryForAll(final String name, final int in, final int out) {
+        super(name, in, out);
+    }
+
+    // ===============================================================
+    /**
+     * Constructor for Command class StopArchiveAttCmd
+     * 
+     * @param name
+     *            command name
+     * @param in
+     *            argin type
+     * @param in_comments
+     *            argin description
+     * @param out
+     *            argout type
+     * @param out_comments
+     *            argout description
+     */
+    // ===============================================================
+    public RetryForAll(final String name, final int in, final int out, final String in_comments,
+            final String out_comments) {
+        super(name, in, out, in_comments, out_comments);
+    }
+
+    // ===============================================================
+    /**
+     * Constructor for Command class StopArchiveAttCmd
+     * 
+     * @param name
+     *            command name
+     * @param in
+     *            argin type
+     * @param in_comments
+     *            argin description
+     * @param out
+     *            argout type
+     * @param out_comments
+     *            argout description
+     * @param level
+     *            The command display type OPERATOR or EXPERT
+     */
+    // ===============================================================
+    public RetryForAll(final String name, final int in, final int out, final String in_comments,
+            final String out_comments, final DispLevel level) {
+        super(name, in, out, in_comments, out_comments, level);
+    }
+
+    // ===============================================================
+    /**
+     * return the result of the device's command.
+     */
+    // ===============================================================
+    @Override
+    public Any execute(final DeviceImpl device, final Any in_any) throws DevFailed {
+
+        if (!(device instanceof HdbArchiver)) {
+            Except.throw_exception("DEVICE_ERROR", "Device parameter is not instance of HdbArchiver",
+                    ConfigConst.HDB_CLASS_DEVICE);
+        }
+
+        return insert(((HdbArchiver) device).retry_for_all());
+    }
+
+    // ===============================================================
+    /**
+     * Check if it is allowed to execute the command.
+     */
+    // ===============================================================
+    @Override
+    public boolean is_allowed(final DeviceImpl device, final Any data_in) {
+        if (device.get_state() == DevState.FAULT) {
+            // if (device.get_state() != DevState.ON) {
+            // End of Generated Code
+
+            // Re-Start of Generated Code
+            return false;
+        }
+        return true;
+    }
+}
+
+// -----------------------------------------------------------------------------
+/*
+ * end of $Source:
+ * /cvsroot/tango-cs/tango/jserver/archiving/HdbArchiver/RetryForAll.java,v $
+ */
diff --git a/src/main/java/HdbArchiver/RetryForAttributeCmd.java b/hdbarchiver/src/main/java/HdbArchiver/RetryForAttributeCmd.java
similarity index 97%
rename from src/main/java/HdbArchiver/RetryForAttributeCmd.java
rename to hdbarchiver/src/main/java/HdbArchiver/RetryForAttributeCmd.java
index 779f20c1ba9f8889f58bf174664244a43771c7c6..6c31a35692852d42f18fcde3f2ce96213c720aed 100644
--- a/src/main/java/HdbArchiver/RetryForAttributeCmd.java
+++ b/hdbarchiver/src/main/java/HdbArchiver/RetryForAttributeCmd.java
@@ -1,129 +1,129 @@
-/**
- * @author $Author: ounsy $
- * @version $Revision: 1.3 $
- */
-package HdbArchiver;
-
-import org.omg.CORBA.Any;
-
-import fr.esrf.Tango.DevFailed;
-import fr.esrf.Tango.DevState;
-import fr.esrf.Tango.DispLevel;
-import fr.esrf.TangoDs.Command;
-import fr.esrf.TangoDs.DeviceImpl;
-import fr.esrf.TangoDs.Except;
-import fr.esrf.TangoDs.TangoConst;
-import fr.esrf.TangoDs.Util;
-import fr.soleil.archiving.hdbtdb.api.ConfigConst;
-
-/**
- * Class Description: Command that stops the archiving of an attibute. This
- * command need an AttributeLightMode type object. An AttributeLightMode type
- * object encapsulate all the informations needed to found the Collector in
- * charge of the archiving of the specified attribute The informations needed
- * are the type, the format, the writable property and the archiving mode
- */
-
-public class RetryForAttributeCmd extends Command implements TangoConst {
-    // ===============================================================
-    /**
-     * Constructor for Command class StopArchiveAttCmd
-     * 
-     * @param name
-     *            command name
-     * @param in
-     *            argin type
-     * @param out
-     *            argout type
-     */
-    // ===============================================================
-    public RetryForAttributeCmd(final String name, final int in, final int out) {
-        super(name, in, out);
-    }
-
-    // ===============================================================
-    /**
-     * Constructor for Command class StopArchiveAttCmd
-     * 
-     * @param name
-     *            command name
-     * @param in
-     *            argin type
-     * @param in_comments
-     *            argin description
-     * @param out
-     *            argout type
-     * @param out_comments
-     *            argout description
-     */
-    // ===============================================================
-    public RetryForAttributeCmd(final String name, final int in, final int out, final String in_comments,
-            final String out_comments) {
-        super(name, in, out, in_comments, out_comments);
-    }
-
-    // ===============================================================
-    /**
-     * Constructor for Command class StopArchiveAttCmd
-     * 
-     * @param name
-     *            command name
-     * @param in
-     *            argin type
-     * @param in_comments
-     *            argin description
-     * @param out
-     *            argout type
-     * @param out_comments
-     *            argout description
-     * @param level
-     *            The command display type OPERATOR or EXPERT
-     */
-    // ===============================================================
-    public RetryForAttributeCmd(final String name, final int in, final int out, final String in_comments,
-            final String out_comments, final DispLevel level) {
-        super(name, in, out, in_comments, out_comments, level);
-    }
-
-    // ===============================================================
-    /**
-     * return the result of the device's command.
-     */
-    // ===============================================================
-    @Override
-    public Any execute(final DeviceImpl device, final Any in_any) throws DevFailed {
-        Util.out2.println("HDB RetryForAttributeCmd.execute(): arrived");
-        final String argin = super.extract_DevString(in_any);
-
-        if (!(device instanceof HdbArchiver)) {
-            Except.throw_exception("DEVICE_ERROR", "Device parameter is not instance of HdbArchiver",
-                    ConfigConst.HDB_CLASS_DEVICE);
-        }
-
-        return insert(((HdbArchiver) device).retry_for_attribute(argin));
-    }
-
-    // ===============================================================
-    /**
-     * Check if it is allowed to execute the command.
-     */
-    // ===============================================================
-    @Override
-    public boolean is_allowed(final DeviceImpl device, final Any data_in) {
-        if (device.get_state() == DevState.FAULT) {
-            // if (device.get_state() != DevState.ON) {
-            // End of Generated Code
-
-            // Re-Start of Generated Code
-            return false;
-        }
-        return true;
-    }
-}
-
-// -----------------------------------------------------------------------------
-/*
- * end of $Source:
- * /cvsroot/tango-cs/tango/jserver/archiving/HdbArchiver/RetryForAttributeCmd
- * .java,v $
- */
+/**
+ * @author $Author: ounsy $
+ * @version $Revision: 1.3 $
+ */
+package HdbArchiver;
+
+import org.omg.CORBA.Any;
+
+import fr.esrf.Tango.DevFailed;
+import fr.esrf.Tango.DevState;
+import fr.esrf.Tango.DispLevel;
+import fr.esrf.TangoDs.Command;
+import fr.esrf.TangoDs.DeviceImpl;
+import fr.esrf.TangoDs.Except;
+import fr.esrf.TangoDs.TangoConst;
+import fr.esrf.TangoDs.Util;
+import fr.soleil.archiving.hdbtdb.api.ConfigConst;
+
+/**
+ * Class Description: Command that stops the archiving of an attibute. This
+ * command need an AttributeLightMode type object. An AttributeLightMode type
+ * object encapsulate all the informations needed to found the Collector in
+ * charge of the archiving of the specified attribute The informations needed
+ * are the type, the format, the writable property and the archiving mode
+ */
+
+public class RetryForAttributeCmd extends Command implements TangoConst {
+    // ===============================================================
+    /**
+     * Constructor for Command class StopArchiveAttCmd
+     * 
+     * @param name
+     *            command name
+     * @param in
+     *            argin type
+     * @param out
+     *            argout type
+     */
+    // ===============================================================
+    public RetryForAttributeCmd(final String name, final int in, final int out) {
+        super(name, in, out);
+    }
+
+    // ===============================================================
+    /**
+     * Constructor for Command class StopArchiveAttCmd
+     * 
+     * @param name
+     *            command name
+     * @param in
+     *            argin type
+     * @param in_comments
+     *            argin description
+     * @param out
+     *            argout type
+     * @param out_comments
+     *            argout description
+     */
+    // ===============================================================
+    public RetryForAttributeCmd(final String name, final int in, final int out, final String in_comments,
+            final String out_comments) {
+        super(name, in, out, in_comments, out_comments);
+    }
+
+    // ===============================================================
+    /**
+     * Constructor for Command class StopArchiveAttCmd
+     * 
+     * @param name
+     *            command name
+     * @param in
+     *            argin type
+     * @param in_comments
+     *            argin description
+     * @param out
+     *            argout type
+     * @param out_comments
+     *            argout description
+     * @param level
+     *            The command display type OPERATOR or EXPERT
+     */
+    // ===============================================================
+    public RetryForAttributeCmd(final String name, final int in, final int out, final String in_comments,
+            final String out_comments, final DispLevel level) {
+        super(name, in, out, in_comments, out_comments, level);
+    }
+
+    // ===============================================================
+    /**
+     * return the result of the device's command.
+     */
+    // ===============================================================
+    @Override
+    public Any execute(final DeviceImpl device, final Any in_any) throws DevFailed {
+        Util.out2.println("HDB RetryForAttributeCmd.execute(): arrived");
+        final String argin = super.extract_DevString(in_any);
+
+        if (!(device instanceof HdbArchiver)) {
+            Except.throw_exception("DEVICE_ERROR", "Device parameter is not instance of HdbArchiver",
+                    ConfigConst.HDB_CLASS_DEVICE);
+        }
+
+        return insert(((HdbArchiver) device).retry_for_attribute(argin));
+    }
+
+    // ===============================================================
+    /**
+     * Check if it is allowed to execute the command.
+     */
+    // ===============================================================
+    @Override
+    public boolean is_allowed(final DeviceImpl device, final Any data_in) {
+        if (device.get_state() == DevState.FAULT) {
+            // if (device.get_state() != DevState.ON) {
+            // End of Generated Code
+
+            // Re-Start of Generated Code
+            return false;
+        }
+        return true;
+    }
+}
+
+// -----------------------------------------------------------------------------
+/*
+ * end of $Source:
+ * /cvsroot/tango-cs/tango/jserver/archiving/HdbArchiver/RetryForAttributeCmd
+ * .java,v $
+ */
diff --git a/src/main/java/HdbArchiver/RetryForAttributesCmd.java b/hdbarchiver/src/main/java/HdbArchiver/RetryForAttributesCmd.java
similarity index 96%
rename from src/main/java/HdbArchiver/RetryForAttributesCmd.java
rename to hdbarchiver/src/main/java/HdbArchiver/RetryForAttributesCmd.java
index 3d91769edcac1035fcfba52dfcdbff41696812fb..8e1370b1d8f12e057bb535de9bb986b744e16875 100644
--- a/src/main/java/HdbArchiver/RetryForAttributesCmd.java
+++ b/hdbarchiver/src/main/java/HdbArchiver/RetryForAttributesCmd.java
@@ -1,123 +1,123 @@
-package HdbArchiver;
-
-import org.omg.CORBA.Any;
-
-import fr.esrf.Tango.DevFailed;
-import fr.esrf.Tango.DevState;
-import fr.esrf.Tango.DispLevel;
-import fr.esrf.TangoDs.Command;
-import fr.esrf.TangoDs.DeviceImpl;
-import fr.esrf.TangoDs.Except;
-import fr.esrf.TangoDs.TangoConst;
-import fr.esrf.TangoDs.Util;
-import fr.soleil.archiving.hdbtdb.api.ConfigConst;
-
-/**
- * Class Description:
- * 
- */
-
-public class RetryForAttributesCmd extends Command implements TangoConst {
-    // ===============================================================
-    /**
-     * Constructor for Command class StopArchiveAttCmd
-     * 
-     * @param name
-     *            command name
-     * @param in
-     *            argin type
-     * @param out
-     *            argout type
-     */
-    // ===============================================================
-    public RetryForAttributesCmd(final String name, final int in, final int out) {
-        super(name, in, out);
-    }
-
-    // ===============================================================
-    /**
-     * Constructor for Command class StopArchiveAttCmd
-     * 
-     * @param name
-     *            command name
-     * @param in
-     *            argin type
-     * @param in_comments
-     *            argin description
-     * @param out
-     *            argout type
-     * @param out_comments
-     *            argout description
-     */
-    // ===============================================================
-    public RetryForAttributesCmd(final String name, final int in, final int out, final String in_comments,
-            final String out_comments) {
-        super(name, in, out, in_comments, out_comments);
-    }
-
-    // ===============================================================
-    /**
-     * Constructor for Command class StopArchiveAttCmd
-     * 
-     * @param name
-     *            command name
-     * @param in
-     *            argin type
-     * @param in_comments
-     *            argin description
-     * @param out
-     *            argout type
-     * @param out_comments
-     *            argout description
-     * @param level
-     *            The command display type OPERATOR or EXPERT
-     */
-    // ===============================================================
-    public RetryForAttributesCmd(final String name, final int in, final int out, final String in_comments,
-            final String out_comments, final DispLevel level) {
-        super(name, in, out, in_comments, out_comments, level);
-    }
-
-    // ===============================================================
-    /**
-     * return the result of the device's command.
-     */
-    // ===============================================================
-    @Override
-    public Any execute(final DeviceImpl device, final Any in_any) throws DevFailed {
-
-        Util.out2.println("RetryForAttributesCmd.execute(): arrived");
-        final String[] argin = super.extract_DevVarStringArray(in_any);
-
-        if (!(device instanceof HdbArchiver)) {
-            Except.throw_exception("DEVICE_ERROR", "Device parameter is not instance of HdbArchiver",
-                    ConfigConst.HDB_CLASS_DEVICE);
-        }
-
-        return insert(((HdbArchiver) device).retry_for_attributes(argin));
-    }
-
-    // ===============================================================
-    /**
-     * Check if it is allowed to execute the command.
-     */
-    // ===============================================================
-    @Override
-    public boolean is_allowed(final DeviceImpl device, final Any data_in) {
-        if (device.get_state() == DevState.FAULT) {
-            // if (device.get_state() != DevState.ON) {
-            // End of Generated Code
-
-            // Re-Start of Generated Code
-            return false;
-        }
-        return true;
-    }
-}
-
-// -----------------------------------------------------------------------------
-/*
- * end of $Source:
- * /cvsroot/tango-cs/tango/jserver/archiving/HdbArchiver/RetryForAttributesCmd
- * .java,v $
- */
+package HdbArchiver;
+
+import org.omg.CORBA.Any;
+
+import fr.esrf.Tango.DevFailed;
+import fr.esrf.Tango.DevState;
+import fr.esrf.Tango.DispLevel;
+import fr.esrf.TangoDs.Command;
+import fr.esrf.TangoDs.DeviceImpl;
+import fr.esrf.TangoDs.Except;
+import fr.esrf.TangoDs.TangoConst;
+import fr.esrf.TangoDs.Util;
+import fr.soleil.archiving.hdbtdb.api.ConfigConst;
+
+/**
+ * Class Description:
+ * 
+ */
+
+public class RetryForAttributesCmd extends Command implements TangoConst {
+    // ===============================================================
+    /**
+     * Constructor for Command class StopArchiveAttCmd
+     * 
+     * @param name
+     *            command name
+     * @param in
+     *            argin type
+     * @param out
+     *            argout type
+     */
+    // ===============================================================
+    public RetryForAttributesCmd(final String name, final int in, final int out) {
+        super(name, in, out);
+    }
+
+    // ===============================================================
+    /**
+     * Constructor for Command class StopArchiveAttCmd
+     * 
+     * @param name
+     *            command name
+     * @param in
+     *            argin type
+     * @param in_comments
+     *            argin description
+     * @param out
+     *            argout type
+     * @param out_comments
+     *            argout description
+     */
+    // ===============================================================
+    public RetryForAttributesCmd(final String name, final int in, final int out, final String in_comments,
+            final String out_comments) {
+        super(name, in, out, in_comments, out_comments);
+    }
+
+    // ===============================================================
+    /**
+     * Constructor for Command class StopArchiveAttCmd
+     * 
+     * @param name
+     *            command name
+     * @param in
+     *            argin type
+     * @param in_comments
+     *            argin description
+     * @param out
+     *            argout type
+     * @param out_comments
+     *            argout description
+     * @param level
+     *            The command display type OPERATOR or EXPERT
+     */
+    // ===============================================================
+    public RetryForAttributesCmd(final String name, final int in, final int out, final String in_comments,
+            final String out_comments, final DispLevel level) {
+        super(name, in, out, in_comments, out_comments, level);
+    }
+
+    // ===============================================================
+    /**
+     * return the result of the device's command.
+     */
+    // ===============================================================
+    @Override
+    public Any execute(final DeviceImpl device, final Any in_any) throws DevFailed {
+
+        Util.out2.println("RetryForAttributesCmd.execute(): arrived");
+        final String[] argin = super.extract_DevVarStringArray(in_any);
+
+        if (!(device instanceof HdbArchiver)) {
+            Except.throw_exception("DEVICE_ERROR", "Device parameter is not instance of HdbArchiver",
+                    ConfigConst.HDB_CLASS_DEVICE);
+        }
+
+        return insert(((HdbArchiver) device).retry_for_attributes(argin));
+    }
+
+    // ===============================================================
+    /**
+     * Check if it is allowed to execute the command.
+     */
+    // ===============================================================
+    @Override
+    public boolean is_allowed(final DeviceImpl device, final Any data_in) {
+        if (device.get_state() == DevState.FAULT) {
+            // if (device.get_state() != DevState.ON) {
+            // End of Generated Code
+
+            // Re-Start of Generated Code
+            return false;
+        }
+        return true;
+    }
+}
+
+// -----------------------------------------------------------------------------
+/*
+ * end of $Source:
+ * /cvsroot/tango-cs/tango/jserver/archiving/HdbArchiver/RetryForAttributesCmd
+ * .java,v $
+ */
diff --git a/src/main/java/HdbArchiver/RetryForKOAttributes.java b/hdbarchiver/src/main/java/HdbArchiver/RetryForKOAttributes.java
similarity index 97%
rename from src/main/java/HdbArchiver/RetryForKOAttributes.java
rename to hdbarchiver/src/main/java/HdbArchiver/RetryForKOAttributes.java
index e81ad80a6ce7c7387bee50830f88142b5fcaeb72..168a2bdadd1556a3665c65982dea5eba3924f9a3 100644
--- a/src/main/java/HdbArchiver/RetryForKOAttributes.java
+++ b/hdbarchiver/src/main/java/HdbArchiver/RetryForKOAttributes.java
@@ -1,114 +1,114 @@
-package HdbArchiver;
-
-import org.omg.CORBA.Any;
-
-import fr.esrf.Tango.DevFailed;
-import fr.esrf.Tango.DevState;
-import fr.esrf.Tango.DispLevel;
-import fr.esrf.TangoDs.Command;
-import fr.esrf.TangoDs.DeviceImpl;
-import fr.esrf.TangoDs.Except;
-import fr.esrf.TangoDs.TangoConst;
-import fr.soleil.archiving.hdbtdb.api.ConfigConst;
-
-public class RetryForKOAttributes extends Command implements TangoConst {
-    // ===============================================================
-    /**
-     * Constructor for Command class StopArchiveAttCmd
-     * 
-     * @param name
-     *            command name
-     * @param in
-     *            argin type
-     * @param out
-     *            argout type
-     */
-    // ===============================================================
-    public RetryForKOAttributes(final String name, final int in, final int out) {
-        super(name, in, out);
-    }
-
-    // ===============================================================
-    /**
-     * Constructor for Command class StopArchiveAttCmd
-     * 
-     * @param name
-     *            command name
-     * @param in
-     *            argin type
-     * @param in_comments
-     *            argin description
-     * @param out
-     *            argout type
-     * @param out_comments
-     *            argout description
-     */
-    // ===============================================================
-    public RetryForKOAttributes(final String name, final int in, final int out, final String in_comments,
-            final String out_comments) {
-        super(name, in, out, in_comments, out_comments);
-    }
-
-    // ===============================================================
-    /**
-     * Constructor for Command class StopArchiveAttCmd
-     * 
-     * @param name
-     *            command name
-     * @param in
-     *            argin type
-     * @param in_comments
-     *            argin description
-     * @param out
-     *            argout type
-     * @param out_comments
-     *            argout description
-     * @param level
-     *            The command display type OPERATOR or EXPERT
-     */
-    // ===============================================================
-    public RetryForKOAttributes(final String name, final int in, final int out, final String in_comments,
-            final String out_comments, final DispLevel level) {
-        super(name, in, out, in_comments, out_comments, level);
-    }
-
-    // ===============================================================
-    /**
-     * return the result of the device's command.
-     */
-    // ===============================================================
-    @Override
-    public Any execute(final DeviceImpl device, final Any in_any) throws DevFailed {
-
-        if (!(device instanceof HdbArchiver)) {
-            Except.throw_exception("DEVICE_ERROR", "Device parameter is not instance of HdbArchiver",
-                    ConfigConst.HDB_CLASS_DEVICE);
-        }
-
-        return insert(((HdbArchiver) device).retry_for_ko_attributes());
-    }
-
-    // ===============================================================
-    /**
-     * Check if it is allowed to execute the command.
-     */
-    // ===============================================================
-    @Override
-    public boolean is_allowed(final DeviceImpl device, final Any data_in) {
-        if (device.get_state() == DevState.FAULT) {
-            // if (device.get_state() != DevState.ON) {
-            // End of Generated Code
-
-            // Re-Start of Generated Code
-            return false;
-        }
-        return true;
-    }
-}
-
-// -----------------------------------------------------------------------------
-/*
- * end of $Source:
- * /cvsroot/tango-cs/tango/jserver/archiving/HdbArchiver/RetryForKOAttributes
- * .java,v $
- */
+package HdbArchiver;
+
+import org.omg.CORBA.Any;
+
+import fr.esrf.Tango.DevFailed;
+import fr.esrf.Tango.DevState;
+import fr.esrf.Tango.DispLevel;
+import fr.esrf.TangoDs.Command;
+import fr.esrf.TangoDs.DeviceImpl;
+import fr.esrf.TangoDs.Except;
+import fr.esrf.TangoDs.TangoConst;
+import fr.soleil.archiving.hdbtdb.api.ConfigConst;
+
+public class RetryForKOAttributes extends Command implements TangoConst {
+    // ===============================================================
+    /**
+     * Constructor for Command class StopArchiveAttCmd
+     * 
+     * @param name
+     *            command name
+     * @param in
+     *            argin type
+     * @param out
+     *            argout type
+     */
+    // ===============================================================
+    public RetryForKOAttributes(final String name, final int in, final int out) {
+        super(name, in, out);
+    }
+
+    // ===============================================================
+    /**
+     * Constructor for Command class StopArchiveAttCmd
+     * 
+     * @param name
+     *            command name
+     * @param in
+     *            argin type
+     * @param in_comments
+     *            argin description
+     * @param out
+     *            argout type
+     * @param out_comments
+     *            argout description
+     */
+    // ===============================================================
+    public RetryForKOAttributes(final String name, final int in, final int out, final String in_comments,
+            final String out_comments) {
+        super(name, in, out, in_comments, out_comments);
+    }
+
+    // ===============================================================
+    /**
+     * Constructor for Command class StopArchiveAttCmd
+     * 
+     * @param name
+     *            command name
+     * @param in
+     *            argin type
+     * @param in_comments
+     *            argin description
+     * @param out
+     *            argout type
+     * @param out_comments
+     *            argout description
+     * @param level
+     *            The command display type OPERATOR or EXPERT
+     */
+    // ===============================================================
+    public RetryForKOAttributes(final String name, final int in, final int out, final String in_comments,
+            final String out_comments, final DispLevel level) {
+        super(name, in, out, in_comments, out_comments, level);
+    }
+
+    // ===============================================================
+    /**
+     * return the result of the device's command.
+     */
+    // ===============================================================
+    @Override
+    public Any execute(final DeviceImpl device, final Any in_any) throws DevFailed {
+
+        if (!(device instanceof HdbArchiver)) {
+            Except.throw_exception("DEVICE_ERROR", "Device parameter is not instance of HdbArchiver",
+                    ConfigConst.HDB_CLASS_DEVICE);
+        }
+
+        return insert(((HdbArchiver) device).retry_for_ko_attributes());
+    }
+
+    // ===============================================================
+    /**
+     * Check if it is allowed to execute the command.
+     */
+    // ===============================================================
+    @Override
+    public boolean is_allowed(final DeviceImpl device, final Any data_in) {
+        if (device.get_state() == DevState.FAULT) {
+            // if (device.get_state() != DevState.ON) {
+            // End of Generated Code
+
+            // Re-Start of Generated Code
+            return false;
+        }
+        return true;
+    }
+}
+
+// -----------------------------------------------------------------------------
+/*
+ * end of $Source:
+ * /cvsroot/tango-cs/tango/jserver/archiving/HdbArchiver/RetryForKOAttributes
+ * .java,v $
+ */
diff --git a/src/main/java/HdbArchiver/StateDetailedClass.java b/hdbarchiver/src/main/java/HdbArchiver/StateDetailedClass.java
similarity index 96%
rename from src/main/java/HdbArchiver/StateDetailedClass.java
rename to hdbarchiver/src/main/java/HdbArchiver/StateDetailedClass.java
index c7060afe91683f8c346f3fee44932d38d57139c2..f5fb813d1cc0e5341e7f98a4afc316f3a8648faa 100644
--- a/src/main/java/HdbArchiver/StateDetailedClass.java
+++ b/hdbarchiver/src/main/java/HdbArchiver/StateDetailedClass.java
@@ -1,154 +1,154 @@
-// +======================================================================
-// $Source: /cvsroot/tango-cs/tango/jserver/archiving/HdbArchiver/StateDetailedClass.java,v $
-//
-// Project:      Tango Device Server
-//
-// Description:  Java source code for the command TemplateClass of the
-//               HdbArchiver class.
-//
-// $Author: chinkumo $
-//
-// $Revision: 1.2 $
-//
-// $Log: StateDetailedClass.java,v $
-// Revision 1.2  2005/11/29 17:33:53  chinkumo
-// no message
-//
-// Revision 1.1.2.2  2005/11/29 16:16:05  chinkumo
-// Code reformated (pogo compatible)
-//
-// Revision 1.1.2.1  2005/11/15 13:53:20  chinkumo
-// First commit !
-//
-//
-// copyleft :    European Synchrotron Radiation Facility
-//               BP 220, Grenoble 38043
-//               FRANCE
-//
-//-======================================================================
-//
-//  		This file is generated by POGO
-//	(Program Obviously used to Generate tango Object)
-//
-//         (c) - Software Engineering Group - ESRF
-//=============================================================================
-
-/**
- * @author $Author: chinkumo $
- * @version $Revision: 1.2 $
- */
-package HdbArchiver;
-
-import org.omg.CORBA.Any;
-
-import fr.esrf.Tango.DevFailed;
-import fr.esrf.Tango.DispLevel;
-import fr.esrf.TangoDs.Command;
-import fr.esrf.TangoDs.DeviceImpl;
-import fr.esrf.TangoDs.Except;
-import fr.esrf.TangoDs.TangoConst;
-import fr.esrf.TangoDs.Util;
-import fr.soleil.archiving.hdbtdb.api.ConfigConst;
-
-/**
- * Class Description: This command returns a detailed state of the device.
- */
-
-public class StateDetailedClass extends Command implements TangoConst {
-    // ===============================================================
-    /**
-     * Constructor for Command class StateDetailedClass
-     * 
-     * @param name
-     *            command name
-     * @param in
-     *            argin type
-     * @param out
-     *            argout type
-     */
-    // ===============================================================
-    public StateDetailedClass(final String name, final int in, final int out) {
-        super(name, in, out);
-    }
-
-    // ===============================================================
-    /**
-     * Constructor for Command class StateDetailedClass
-     * 
-     * @param name
-     *            command name
-     * @param in
-     *            argin type
-     * @param in_comments
-     *            argin description
-     * @param out
-     *            argout type
-     * @param out_comments
-     *            argout description
-     */
-    // ===============================================================
-    public StateDetailedClass(final String name, final int in, final int out, final String in_comments,
-            final String out_comments) {
-        super(name, in, out, in_comments, out_comments);
-    }
-
-    // ===============================================================
-    /**
-     * Constructor for Command class StateDetailedClass
-     * 
-     * @param name
-     *            command name
-     * @param in
-     *            argin type
-     * @param in_comments
-     *            argin description
-     * @param out
-     *            argout type
-     * @param out_comments
-     *            argout description
-     * @param level
-     *            The command display type OPERATOR or EXPERT
-     */
-    // ===============================================================
-    public StateDetailedClass(final String name, final int in, final int out, final String in_comments,
-            final String out_comments, final DispLevel level) {
-        super(name, in, out, in_comments, out_comments, level);
-    }
-
-    // ===============================================================
-    /**
-     * return the result of the device's command.
-     */
-    // ===============================================================
-    @Override
-    public Any execute(final DeviceImpl device, final Any in_any) throws DevFailed {
-        Util.out2.println("StateDetailedClass.execute(): arrived");
-
-        if (!(device instanceof HdbArchiver)) {
-            Except.throw_exception("DEVICE_ERROR", "Device parameter is not instance of HdbArchiver",
-                    ConfigConst.HDB_CLASS_DEVICE);
-        }
-
-        return insert(((HdbArchiver) device).state_detailed());
-    }
-
-    // ===============================================================
-    /**
-     * Check if it is allowed to execute the command.
-     */
-    // ===============================================================
-    @Override
-    public boolean is_allowed(final DeviceImpl device, final Any data_in) {
-        // End of Generated Code
-
-        // Re-Start of Generated Code
-        return true;
-    }
-}
-
-// -----------------------------------------------------------------------------
-/*
- * end of $Source:
- * /cvsroot/tango-cs/tango/jserver/archiving/HdbArchiver/StateDetailedClass
- * .java,v $
- */
+// +======================================================================
+// $Source: /cvsroot/tango-cs/tango/jserver/archiving/HdbArchiver/StateDetailedClass.java,v $
+//
+// Project:      Tango Device Server
+//
+// Description:  Java source code for the command TemplateClass of the
+//               HdbArchiver class.
+//
+// $Author: chinkumo $
+//
+// $Revision: 1.2 $
+//
+// $Log: StateDetailedClass.java,v $
+// Revision 1.2  2005/11/29 17:33:53  chinkumo
+// no message
+//
+// Revision 1.1.2.2  2005/11/29 16:16:05  chinkumo
+// Code reformated (pogo compatible)
+//
+// Revision 1.1.2.1  2005/11/15 13:53:20  chinkumo
+// First commit !
+//
+//
+// copyleft :    European Synchrotron Radiation Facility
+//               BP 220, Grenoble 38043
+//               FRANCE
+//
+//-======================================================================
+//
+//  		This file is generated by POGO
+//	(Program Obviously used to Generate tango Object)
+//
+//         (c) - Software Engineering Group - ESRF
+//=============================================================================
+
+/**
+ * @author $Author: chinkumo $
+ * @version $Revision: 1.2 $
+ */
+package HdbArchiver;
+
+import org.omg.CORBA.Any;
+
+import fr.esrf.Tango.DevFailed;
+import fr.esrf.Tango.DispLevel;
+import fr.esrf.TangoDs.Command;
+import fr.esrf.TangoDs.DeviceImpl;
+import fr.esrf.TangoDs.Except;
+import fr.esrf.TangoDs.TangoConst;
+import fr.esrf.TangoDs.Util;
+import fr.soleil.archiving.hdbtdb.api.ConfigConst;
+
+/**
+ * Class Description: This command returns a detailed state of the device.
+ */
+
+public class StateDetailedClass extends Command implements TangoConst {
+    // ===============================================================
+    /**
+     * Constructor for Command class StateDetailedClass
+     * 
+     * @param name
+     *            command name
+     * @param in
+     *            argin type
+     * @param out
+     *            argout type
+     */
+    // ===============================================================
+    public StateDetailedClass(final String name, final int in, final int out) {
+        super(name, in, out);
+    }
+
+    // ===============================================================
+    /**
+     * Constructor for Command class StateDetailedClass
+     * 
+     * @param name
+     *            command name
+     * @param in
+     *            argin type
+     * @param in_comments
+     *            argin description
+     * @param out
+     *            argout type
+     * @param out_comments
+     *            argout description
+     */
+    // ===============================================================
+    public StateDetailedClass(final String name, final int in, final int out, final String in_comments,
+            final String out_comments) {
+        super(name, in, out, in_comments, out_comments);
+    }
+
+    // ===============================================================
+    /**
+     * Constructor for Command class StateDetailedClass
+     * 
+     * @param name
+     *            command name
+     * @param in
+     *            argin type
+     * @param in_comments
+     *            argin description
+     * @param out
+     *            argout type
+     * @param out_comments
+     *            argout description
+     * @param level
+     *            The command display type OPERATOR or EXPERT
+     */
+    // ===============================================================
+    public StateDetailedClass(final String name, final int in, final int out, final String in_comments,
+            final String out_comments, final DispLevel level) {
+        super(name, in, out, in_comments, out_comments, level);
+    }
+
+    // ===============================================================
+    /**
+     * return the result of the device's command.
+     */
+    // ===============================================================
+    @Override
+    public Any execute(final DeviceImpl device, final Any in_any) throws DevFailed {
+        Util.out2.println("StateDetailedClass.execute(): arrived");
+
+        if (!(device instanceof HdbArchiver)) {
+            Except.throw_exception("DEVICE_ERROR", "Device parameter is not instance of HdbArchiver",
+                    ConfigConst.HDB_CLASS_DEVICE);
+        }
+
+        return insert(((HdbArchiver) device).state_detailed());
+    }
+
+    // ===============================================================
+    /**
+     * Check if it is allowed to execute the command.
+     */
+    // ===============================================================
+    @Override
+    public boolean is_allowed(final DeviceImpl device, final Any data_in) {
+        // End of Generated Code
+
+        // Re-Start of Generated Code
+        return true;
+    }
+}
+
+// -----------------------------------------------------------------------------
+/*
+ * end of $Source:
+ * /cvsroot/tango-cs/tango/jserver/archiving/HdbArchiver/StateDetailedClass
+ * .java,v $
+ */
diff --git a/src/main/java/HdbArchiver/StopArchiveAttCmd.java b/hdbarchiver/src/main/java/HdbArchiver/StopArchiveAttCmd.java
similarity index 96%
rename from src/main/java/HdbArchiver/StopArchiveAttCmd.java
rename to hdbarchiver/src/main/java/HdbArchiver/StopArchiveAttCmd.java
index ebaf3a23ab4d1ddf8be93cc49143b75a772b939b..20a195c141bb211d5232d853ed23e3c445027e0a 100644
--- a/src/main/java/HdbArchiver/StopArchiveAttCmd.java
+++ b/hdbarchiver/src/main/java/HdbArchiver/StopArchiveAttCmd.java
@@ -1,164 +1,164 @@
-//+======================================================================
-// $Source: /cvsroot/tango-cs/tango/jserver/archiving/HdbArchiver/StopArchiveAttCmd.java,v $
-//
-// Project:      Tango Device Server
-//
-// Description:  Java source code for the command TemplateClass of the
-//               HdbArchiver class.
-//
-// $Author: chinkumo $
-//
-// $Revision: 1.5 $
-//
-// $Log: StopArchiveAttCmd.java,v $
-// Revision 1.5  2005/11/29 17:33:53  chinkumo
-// no message
-//
-// Revision 1.4.12.3  2005/11/29 16:16:05  chinkumo
-// Code reformated (pogo compatible)
-//
-// Revision 1.4.12.2  2005/11/15 13:46:08  chinkumo
-// ...
-//
-// Revision 1.4.12.1  2005/09/26 08:01:20  chinkumo
-// Minor changes !
-//
-// Revision 1.4  2005/06/15 14:00:37  chinkumo
-// The device was regenerated in Tango V5.
-//
-//
-// copyleft :    European Synchrotron Radiation Facility
-//               BP 220, Grenoble 38043
-//               FRANCE
-//
-//-======================================================================
-//
-//  		This file is generated by POGO
-//	(Program Obviously used to Generate tango Object)
-//
-//         (c) - Software Engineering Group - ESRF
-//=============================================================================
-
-/**
- * @author	$Author: chinkumo $
- * @version	$Revision: 1.5 $
- */
-package HdbArchiver;
-
-import org.omg.CORBA.Any;
-
-import fr.esrf.Tango.DevFailed;
-import fr.esrf.Tango.DevState;
-import fr.esrf.Tango.DispLevel;
-import fr.esrf.TangoDs.Command;
-import fr.esrf.TangoDs.DeviceImpl;
-import fr.esrf.TangoDs.TangoConst;
-import fr.esrf.TangoDs.Util;
-
-/**
- * Class Description: Command that stops the archiving of an attibute. This
- * command need an AttributeLightMode type object. An AttributeLightMode type
- * object encapsulate all the informations needed to found the Collector in
- * charge of the archiving of the specified attribute The informations needed
- * are the type, the format, the writable property and the archiving mode
- */
-
-public class StopArchiveAttCmd extends Command implements TangoConst {
-    // ===============================================================
-    /**
-     * Constructor for Command class StopArchiveAttCmd
-     * 
-     * @param name
-     *            command name
-     * @param in
-     *            argin type
-     * @param out
-     *            argout type
-     */
-    // ===============================================================
-    public StopArchiveAttCmd(final String name, final int in, final int out) {
-	super(name, in, out);
-    }
-
-    // ===============================================================
-    /**
-     * Constructor for Command class StopArchiveAttCmd
-     * 
-     * @param name
-     *            command name
-     * @param in
-     *            argin type
-     * @param in_comments
-     *            argin description
-     * @param out
-     *            argout type
-     * @param out_comments
-     *            argout description
-     */
-    // ===============================================================
-    public StopArchiveAttCmd(final String name, final int in, final int out,
-	    final String in_comments, final String out_comments) {
-	super(name, in, out, in_comments, out_comments);
-    }
-
-    // ===============================================================
-    /**
-     * Constructor for Command class StopArchiveAttCmd
-     * 
-     * @param name
-     *            command name
-     * @param in
-     *            argin type
-     * @param in_comments
-     *            argin description
-     * @param out
-     *            argout type
-     * @param out_comments
-     *            argout description
-     * @param level
-     *            The command display type OPERATOR or EXPERT
-     */
-    // ===============================================================
-    public StopArchiveAttCmd(final String name, final int in, final int out,
-	    final String in_comments, final String out_comments, final DispLevel level) {
-	super(name, in, out, in_comments, out_comments, level);
-    }
-
-    // ===============================================================
-    /**
-     * return the result of the device's command.
-     */
-    // ===============================================================
-    @Override
-    public Any execute(final DeviceImpl device, final Any in_any) throws DevFailed {
-	Util.out2.println("StopArchiveAttCmd.execute(): arrived");
-	final String[] argin = extract_DevVarStringArray(in_any);
-	if (device instanceof HdbArchiver) {
-	    ((HdbArchiver) device).stop_archive_att(argin);
-	}
-	return insert();
-    }
-
-    // ===============================================================
-    /**
-     * Check if it is allowed to execute the command.
-     */
-    // ===============================================================
-    @Override
-    public boolean is_allowed(final DeviceImpl device, final Any data_in) {
-	if (device.get_state() == DevState.FAULT) {
-	    // End of Generated Code
-
-	    // Re-Start of Generated Code
-	    return false;
-	}
-	return true;
-    }
-}
-
-// -----------------------------------------------------------------------------
-/*
- * end of $Source:
- * /cvsroot/tango-cs/tango/jserver/archiving/HdbArchiver/StopArchiveAttCmd
- * .java,v $
- */
+//+======================================================================
+// $Source: /cvsroot/tango-cs/tango/jserver/archiving/HdbArchiver/StopArchiveAttCmd.java,v $
+//
+// Project:      Tango Device Server
+//
+// Description:  Java source code for the command TemplateClass of the
+//               HdbArchiver class.
+//
+// $Author: chinkumo $
+//
+// $Revision: 1.5 $
+//
+// $Log: StopArchiveAttCmd.java,v $
+// Revision 1.5  2005/11/29 17:33:53  chinkumo
+// no message
+//
+// Revision 1.4.12.3  2005/11/29 16:16:05  chinkumo
+// Code reformated (pogo compatible)
+//
+// Revision 1.4.12.2  2005/11/15 13:46:08  chinkumo
+// ...
+//
+// Revision 1.4.12.1  2005/09/26 08:01:20  chinkumo
+// Minor changes !
+//
+// Revision 1.4  2005/06/15 14:00:37  chinkumo
+// The device was regenerated in Tango V5.
+//
+//
+// copyleft :    European Synchrotron Radiation Facility
+//               BP 220, Grenoble 38043
+//               FRANCE
+//
+//-======================================================================
+//
+//  		This file is generated by POGO
+//	(Program Obviously used to Generate tango Object)
+//
+//         (c) - Software Engineering Group - ESRF
+//=============================================================================
+
+/**
+ * @author	$Author: chinkumo $
+ * @version	$Revision: 1.5 $
+ */
+package HdbArchiver;
+
+import org.omg.CORBA.Any;
+
+import fr.esrf.Tango.DevFailed;
+import fr.esrf.Tango.DevState;
+import fr.esrf.Tango.DispLevel;
+import fr.esrf.TangoDs.Command;
+import fr.esrf.TangoDs.DeviceImpl;
+import fr.esrf.TangoDs.TangoConst;
+import fr.esrf.TangoDs.Util;
+
+/**
+ * Class Description: Command that stops the archiving of an attibute. This
+ * command need an AttributeLightMode type object. An AttributeLightMode type
+ * object encapsulate all the informations needed to found the Collector in
+ * charge of the archiving of the specified attribute The informations needed
+ * are the type, the format, the writable property and the archiving mode
+ */
+
+public class StopArchiveAttCmd extends Command implements TangoConst {
+    // ===============================================================
+    /**
+     * Constructor for Command class StopArchiveAttCmd
+     * 
+     * @param name
+     *            command name
+     * @param in
+     *            argin type
+     * @param out
+     *            argout type
+     */
+    // ===============================================================
+    public StopArchiveAttCmd(final String name, final int in, final int out) {
+	super(name, in, out);
+    }
+
+    // ===============================================================
+    /**
+     * Constructor for Command class StopArchiveAttCmd
+     * 
+     * @param name
+     *            command name
+     * @param in
+     *            argin type
+     * @param in_comments
+     *            argin description
+     * @param out
+     *            argout type
+     * @param out_comments
+     *            argout description
+     */
+    // ===============================================================
+    public StopArchiveAttCmd(final String name, final int in, final int out,
+	    final String in_comments, final String out_comments) {
+	super(name, in, out, in_comments, out_comments);
+    }
+
+    // ===============================================================
+    /**
+     * Constructor for Command class StopArchiveAttCmd
+     * 
+     * @param name
+     *            command name
+     * @param in
+     *            argin type
+     * @param in_comments
+     *            argin description
+     * @param out
+     *            argout type
+     * @param out_comments
+     *            argout description
+     * @param level
+     *            The command display type OPERATOR or EXPERT
+     */
+    // ===============================================================
+    public StopArchiveAttCmd(final String name, final int in, final int out,
+	    final String in_comments, final String out_comments, final DispLevel level) {
+	super(name, in, out, in_comments, out_comments, level);
+    }
+
+    // ===============================================================
+    /**
+     * return the result of the device's command.
+     */
+    // ===============================================================
+    @Override
+    public Any execute(final DeviceImpl device, final Any in_any) throws DevFailed {
+	Util.out2.println("StopArchiveAttCmd.execute(): arrived");
+	final String[] argin = extract_DevVarStringArray(in_any);
+	if (device instanceof HdbArchiver) {
+	    ((HdbArchiver) device).stop_archive_att(argin);
+	}
+	return insert();
+    }
+
+    // ===============================================================
+    /**
+     * Check if it is allowed to execute the command.
+     */
+    // ===============================================================
+    @Override
+    public boolean is_allowed(final DeviceImpl device, final Any data_in) {
+	if (device.get_state() == DevState.FAULT) {
+	    // End of Generated Code
+
+	    // Re-Start of Generated Code
+	    return false;
+	}
+	return true;
+    }
+}
+
+// -----------------------------------------------------------------------------
+/*
+ * end of $Source:
+ * /cvsroot/tango-cs/tango/jserver/archiving/HdbArchiver/StopArchiveAttCmd
+ * .java,v $
+ */
diff --git a/src/main/java/HdbArchiver/StopArchiveConfCmd.java b/hdbarchiver/src/main/java/HdbArchiver/StopArchiveConfCmd.java
similarity index 96%
rename from src/main/java/HdbArchiver/StopArchiveConfCmd.java
rename to hdbarchiver/src/main/java/HdbArchiver/StopArchiveConfCmd.java
index 824883e2235a4c8f07a5f8cf12241006e2b5efd7..9a3a0dc92ffd31e23e0b6f300f2b9bc9cfa65364 100644
--- a/src/main/java/HdbArchiver/StopArchiveConfCmd.java
+++ b/hdbarchiver/src/main/java/HdbArchiver/StopArchiveConfCmd.java
@@ -1,161 +1,161 @@
-//+======================================================================
-// $Source: /cvsroot/tango-cs/tango/jserver/archiving/HdbArchiver/StopArchiveConfCmd.java,v $
-//
-// Project:      Tango Device Server
-//
-// Description:  Java source code for the command TemplateClass of the
-//               HdbArchiver class.
-//
-// $Author: chinkumo $
-//
-// $Revision: 1.5 $
-//
-// $Log: StopArchiveConfCmd.java,v $
-// Revision 1.5  2005/11/29 17:33:53  chinkumo
-// no message
-//
-// Revision 1.4.12.3  2005/11/29 16:16:05  chinkumo
-// Code reformated (pogo compatible)
-//
-// Revision 1.4.12.2  2005/11/15 13:46:08  chinkumo
-// ...
-//
-// Revision 1.4.12.1  2005/09/26 08:01:20  chinkumo
-// Minor changes !
-//
-// Revision 1.4  2005/06/15 14:00:37  chinkumo
-// The device was regenerated in Tango V5.
-//
-//
-// copyleft :    European Synchrotron Radiation Facility
-//               BP 220, Grenoble 38043
-//               FRANCE
-//
-//-======================================================================
-//
-//  		This file is generated by POGO
-//	(Program Obviously used to Generate tango Object)
-//
-//         (c) - Software Engineering Group - ESRF
-//=============================================================================
-
-/**
- * @author	$Author: chinkumo $
- * @version	$Revision: 1.5 $
- */
-package HdbArchiver;
-
-import org.omg.CORBA.Any;
-
-import fr.esrf.Tango.DevFailed;
-import fr.esrf.Tango.DevState;
-import fr.esrf.Tango.DispLevel;
-import fr.esrf.TangoDs.Command;
-import fr.esrf.TangoDs.DeviceImpl;
-import fr.esrf.TangoDs.TangoConst;
-import fr.esrf.TangoDs.Util;
-
-/**
- * Class Description: This command is invoked when stopping the archiving of a
- * group of attributes.
- */
-
-public class StopArchiveConfCmd extends Command implements TangoConst {
-    // ===============================================================
-    /**
-     * Constructor for Command class StopArchiveConfCmd
-     * 
-     * @param name
-     *            command name
-     * @param in
-     *            argin type
-     * @param out
-     *            argout type
-     */
-    // ===============================================================
-    public StopArchiveConfCmd(final String name, final int in, final int out) {
-	super(name, in, out);
-    }
-
-    // ===============================================================
-    /**
-     * Constructor for Command class StopArchiveConfCmd
-     * 
-     * @param name
-     *            command name
-     * @param in
-     *            argin type
-     * @param in_comments
-     *            argin description
-     * @param out
-     *            argout type
-     * @param out_comments
-     *            argout description
-     */
-    // ===============================================================
-    public StopArchiveConfCmd(final String name, final int in, final int out,
-	    final String in_comments, final String out_comments) {
-	super(name, in, out, in_comments, out_comments);
-    }
-
-    // ===============================================================
-    /**
-     * Constructor for Command class StopArchiveConfCmd
-     * 
-     * @param name
-     *            command name
-     * @param in
-     *            argin type
-     * @param in_comments
-     *            argin description
-     * @param out
-     *            argout type
-     * @param out_comments
-     *            argout description
-     * @param level
-     *            The command display type OPERATOR or EXPERT
-     */
-    // ===============================================================
-    public StopArchiveConfCmd(final String name, final int in, final int out,
-	    final String in_comments, final String out_comments, final DispLevel level) {
-	super(name, in, out, in_comments, out_comments, level);
-    }
-
-    // ===============================================================
-    /**
-     * return the result of the device's command.
-     */
-    // ===============================================================
-    @Override
-    public Any execute(final DeviceImpl device, final Any in_any) throws DevFailed {
-	Util.out2.println("StopArchiveConfCmd.execute(): arrived");
-	final String[] argin = extract_DevVarStringArray(in_any);
-	if (device instanceof HdbArchiver) {
-	    ((HdbArchiver) device).stop_archive_conf(argin);
-	}
-	return insert();
-    }
-
-    // ===============================================================
-    /**
-     * Check if it is allowed to execute the command.
-     */
-    // ===============================================================
-    @Override
-    public boolean is_allowed(final DeviceImpl device, final Any data_in) {
-	if (device.get_state() == DevState.FAULT) {
-	    // End of Generated Code
-
-	    // Re-Start of Generated Code
-	    return false;
-	}
-	return true;
-    }
-}
-
-// -----------------------------------------------------------------------------
-/*
- * end of $Source:
- * /cvsroot/tango-cs/tango/jserver/archiving/HdbArchiver/StopArchiveConfCmd
- * .java,v $
- */
+//+======================================================================
+// $Source: /cvsroot/tango-cs/tango/jserver/archiving/HdbArchiver/StopArchiveConfCmd.java,v $
+//
+// Project:      Tango Device Server
+//
+// Description:  Java source code for the command TemplateClass of the
+//               HdbArchiver class.
+//
+// $Author: chinkumo $
+//
+// $Revision: 1.5 $
+//
+// $Log: StopArchiveConfCmd.java,v $
+// Revision 1.5  2005/11/29 17:33:53  chinkumo
+// no message
+//
+// Revision 1.4.12.3  2005/11/29 16:16:05  chinkumo
+// Code reformated (pogo compatible)
+//
+// Revision 1.4.12.2  2005/11/15 13:46:08  chinkumo
+// ...
+//
+// Revision 1.4.12.1  2005/09/26 08:01:20  chinkumo
+// Minor changes !
+//
+// Revision 1.4  2005/06/15 14:00:37  chinkumo
+// The device was regenerated in Tango V5.
+//
+//
+// copyleft :    European Synchrotron Radiation Facility
+//               BP 220, Grenoble 38043
+//               FRANCE
+//
+//-======================================================================
+//
+//  		This file is generated by POGO
+//	(Program Obviously used to Generate tango Object)
+//
+//         (c) - Software Engineering Group - ESRF
+//=============================================================================
+
+/**
+ * @author	$Author: chinkumo $
+ * @version	$Revision: 1.5 $
+ */
+package HdbArchiver;
+
+import org.omg.CORBA.Any;
+
+import fr.esrf.Tango.DevFailed;
+import fr.esrf.Tango.DevState;
+import fr.esrf.Tango.DispLevel;
+import fr.esrf.TangoDs.Command;
+import fr.esrf.TangoDs.DeviceImpl;
+import fr.esrf.TangoDs.TangoConst;
+import fr.esrf.TangoDs.Util;
+
+/**
+ * Class Description: This command is invoked when stopping the archiving of a
+ * group of attributes.
+ */
+
+public class StopArchiveConfCmd extends Command implements TangoConst {
+    // ===============================================================
+    /**
+     * Constructor for Command class StopArchiveConfCmd
+     * 
+     * @param name
+     *            command name
+     * @param in
+     *            argin type
+     * @param out
+     *            argout type
+     */
+    // ===============================================================
+    public StopArchiveConfCmd(final String name, final int in, final int out) {
+	super(name, in, out);
+    }
+
+    // ===============================================================
+    /**
+     * Constructor for Command class StopArchiveConfCmd
+     * 
+     * @param name
+     *            command name
+     * @param in
+     *            argin type
+     * @param in_comments
+     *            argin description
+     * @param out
+     *            argout type
+     * @param out_comments
+     *            argout description
+     */
+    // ===============================================================
+    public StopArchiveConfCmd(final String name, final int in, final int out,
+	    final String in_comments, final String out_comments) {
+	super(name, in, out, in_comments, out_comments);
+    }
+
+    // ===============================================================
+    /**
+     * Constructor for Command class StopArchiveConfCmd
+     * 
+     * @param name
+     *            command name
+     * @param in
+     *            argin type
+     * @param in_comments
+     *            argin description
+     * @param out
+     *            argout type
+     * @param out_comments
+     *            argout description
+     * @param level
+     *            The command display type OPERATOR or EXPERT
+     */
+    // ===============================================================
+    public StopArchiveConfCmd(final String name, final int in, final int out,
+	    final String in_comments, final String out_comments, final DispLevel level) {
+	super(name, in, out, in_comments, out_comments, level);
+    }
+
+    // ===============================================================
+    /**
+     * return the result of the device's command.
+     */
+    // ===============================================================
+    @Override
+    public Any execute(final DeviceImpl device, final Any in_any) throws DevFailed {
+	Util.out2.println("StopArchiveConfCmd.execute(): arrived");
+	final String[] argin = extract_DevVarStringArray(in_any);
+	if (device instanceof HdbArchiver) {
+	    ((HdbArchiver) device).stop_archive_conf(argin);
+	}
+	return insert();
+    }
+
+    // ===============================================================
+    /**
+     * Check if it is allowed to execute the command.
+     */
+    // ===============================================================
+    @Override
+    public boolean is_allowed(final DeviceImpl device, final Any data_in) {
+	if (device.get_state() == DevState.FAULT) {
+	    // End of Generated Code
+
+	    // Re-Start of Generated Code
+	    return false;
+	}
+	return true;
+    }
+}
+
+// -----------------------------------------------------------------------------
+/*
+ * end of $Source:
+ * /cvsroot/tango-cs/tango/jserver/archiving/HdbArchiver/StopArchiveConfCmd
+ * .java,v $
+ */
diff --git a/src/main/java/HdbArchiver/TriggerArchiveAttCheckCmd.java b/hdbarchiver/src/main/java/HdbArchiver/TriggerArchiveAttCheckCmd.java
similarity index 96%
rename from src/main/java/HdbArchiver/TriggerArchiveAttCheckCmd.java
rename to hdbarchiver/src/main/java/HdbArchiver/TriggerArchiveAttCheckCmd.java
index db50033b3a5f81d7fb6a142bde91d7529e577c54..5cb154a4e3473f6bfbdd58e03ed73f0d7fd677e2 100644
--- a/src/main/java/HdbArchiver/TriggerArchiveAttCheckCmd.java
+++ b/hdbarchiver/src/main/java/HdbArchiver/TriggerArchiveAttCheckCmd.java
@@ -1,163 +1,163 @@
-//+======================================================================
-// $Source: /cvsroot/tango-cs/tango/jserver/archiving/HdbArchiver/TriggerArchiveAttCheckCmd.java,v $
-//
-// Project:      Tango Device Server
-//
-// Description:  Java source code for the command TemplateClass of the
-//               HdbArchiver class.
-//
-// $Author: chinkumo $
-//
-// $Revision: 1.5 $
-//
-// $Log: TriggerArchiveAttCheckCmd.java,v $
-// Revision 1.5  2005/11/29 17:33:53  chinkumo
-// no message
-//
-// Revision 1.4.12.3  2005/11/29 16:16:05  chinkumo
-// Code reformated (pogo compatible)
-//
-// Revision 1.4.12.2  2005/11/15 13:46:08  chinkumo
-// ...
-//
-// Revision 1.4.12.1  2005/09/26 08:01:20  chinkumo
-// Minor changes !
-//
-// Revision 1.4  2005/06/15 14:00:37  chinkumo
-// The device was regenerated in Tango V5.
-//
-//
-// copyleft :    European Synchrotron Radiation Facility
-//               BP 220, Grenoble 38043
-//               FRANCE
-//
-//-======================================================================
-//
-//  		This file is generated by POGO
-//	(Program Obviously used to Generate tango Object)
-//
-//         (c) - Software Engineering Group - ESRF
-//=============================================================================
-
-/**
- * @author	$Author: chinkumo $
- * @version	$Revision: 1.5 $
- */
-package HdbArchiver;
-
-import org.omg.CORBA.Any;
-
-import fr.esrf.Tango.DevFailed;
-import fr.esrf.Tango.DevState;
-import fr.esrf.Tango.DispLevel;
-import fr.esrf.TangoDs.Command;
-import fr.esrf.TangoDs.DeviceImpl;
-import fr.esrf.TangoDs.TangoConst;
-import fr.esrf.TangoDs.Util;
-
-/**
- * Class Description: This command is invoked when the archiving of an attribute
- * is triggered. Before archiving, this command checks that HDB database is
- * ready to host the given attribute values. If not registrations is done and
- * the associated table is built.
- */
-
-public class TriggerArchiveAttCheckCmd extends Command implements TangoConst {
-    // ===============================================================
-    /**
-     * Constructor for Command class TriggerArchiveAttCheckCmd
-     * 
-     * @param name
-     *            command name
-     * @param in
-     *            argin type
-     * @param out
-     *            argout type
-     */
-    // ===============================================================
-    public TriggerArchiveAttCheckCmd(final String name, final int in, final int out) {
-	super(name, in, out);
-    }
-
-    // ===============================================================
-    /**
-     * Constructor for Command class TriggerArchiveAttCheckCmd
-     * 
-     * @param name
-     *            command name
-     * @param in
-     *            argin type
-     * @param in_comments
-     *            argin description
-     * @param out
-     *            argout type
-     * @param out_comments
-     *            argout description
-     */
-    // ===============================================================
-    public TriggerArchiveAttCheckCmd(final String name, final int in, final int out,
-	    final String in_comments, final String out_comments) {
-	super(name, in, out, in_comments, out_comments);
-    }
-
-    // ===============================================================
-    /**
-     * Constructor for Command class TriggerArchiveAttCheckCmd
-     * 
-     * @param name
-     *            command name
-     * @param in
-     *            argin type
-     * @param in_comments
-     *            argin description
-     * @param out
-     *            argout type
-     * @param out_comments
-     *            argout description
-     * @param level
-     *            The command display type OPERATOR or EXPERT
-     */
-    // ===============================================================
-    public TriggerArchiveAttCheckCmd(final String name, final int in, final int out,
-	    final String in_comments, final String out_comments, final DispLevel level) {
-	super(name, in, out, in_comments, out_comments, level);
-    }
-
-    // ===============================================================
-    /**
-     * return the result of the device's command.
-     */
-    // ===============================================================
-    @Override
-    public Any execute(final DeviceImpl device, final Any in_any) throws DevFailed {
-	Util.out2.println("TriggerArchiveAttCheckCmd.execute(): arrived");
-	final String argin = extract_DevString(in_any);
-	if (device instanceof HdbArchiver) {
-	    ((HdbArchiver) device).trigger_archive_att_check(argin);
-	}
-	return insert();
-    }
-
-    // ===============================================================
-    /**
-     * Check if it is allowed to execute the command.
-     */
-    // ===============================================================
-    @Override
-    public boolean is_allowed(final DeviceImpl device, final Any data_in) {
-	if (device.get_state() == DevState.FAULT) {
-	    // End of Generated Code
-
-	    // Re-Start of Generated Code
-	    return false;
-	}
-	return true;
-    }
-}
-
-// -----------------------------------------------------------------------------
-/*
- * end of $Source:
- * /cvsroot/tango-cs/tango/jserver/archiving/HdbArchiver/TriggerArchiveAttCheckCmd
- * .java,v $
- */
+//+======================================================================
+// $Source: /cvsroot/tango-cs/tango/jserver/archiving/HdbArchiver/TriggerArchiveAttCheckCmd.java,v $
+//
+// Project:      Tango Device Server
+//
+// Description:  Java source code for the command TemplateClass of the
+//               HdbArchiver class.
+//
+// $Author: chinkumo $
+//
+// $Revision: 1.5 $
+//
+// $Log: TriggerArchiveAttCheckCmd.java,v $
+// Revision 1.5  2005/11/29 17:33:53  chinkumo
+// no message
+//
+// Revision 1.4.12.3  2005/11/29 16:16:05  chinkumo
+// Code reformated (pogo compatible)
+//
+// Revision 1.4.12.2  2005/11/15 13:46:08  chinkumo
+// ...
+//
+// Revision 1.4.12.1  2005/09/26 08:01:20  chinkumo
+// Minor changes !
+//
+// Revision 1.4  2005/06/15 14:00:37  chinkumo
+// The device was regenerated in Tango V5.
+//
+//
+// copyleft :    European Synchrotron Radiation Facility
+//               BP 220, Grenoble 38043
+//               FRANCE
+//
+//-======================================================================
+//
+//  		This file is generated by POGO
+//	(Program Obviously used to Generate tango Object)
+//
+//         (c) - Software Engineering Group - ESRF
+//=============================================================================
+
+/**
+ * @author	$Author: chinkumo $
+ * @version	$Revision: 1.5 $
+ */
+package HdbArchiver;
+
+import org.omg.CORBA.Any;
+
+import fr.esrf.Tango.DevFailed;
+import fr.esrf.Tango.DevState;
+import fr.esrf.Tango.DispLevel;
+import fr.esrf.TangoDs.Command;
+import fr.esrf.TangoDs.DeviceImpl;
+import fr.esrf.TangoDs.TangoConst;
+import fr.esrf.TangoDs.Util;
+
+/**
+ * Class Description: This command is invoked when the archiving of an attribute
+ * is triggered. Before archiving, this command checks that HDB database is
+ * ready to host the given attribute values. If not registrations is done and
+ * the associated table is built.
+ */
+
+public class TriggerArchiveAttCheckCmd extends Command implements TangoConst {
+    // ===============================================================
+    /**
+     * Constructor for Command class TriggerArchiveAttCheckCmd
+     * 
+     * @param name
+     *            command name
+     * @param in
+     *            argin type
+     * @param out
+     *            argout type
+     */
+    // ===============================================================
+    public TriggerArchiveAttCheckCmd(final String name, final int in, final int out) {
+	super(name, in, out);
+    }
+
+    // ===============================================================
+    /**
+     * Constructor for Command class TriggerArchiveAttCheckCmd
+     * 
+     * @param name
+     *            command name
+     * @param in
+     *            argin type
+     * @param in_comments
+     *            argin description
+     * @param out
+     *            argout type
+     * @param out_comments
+     *            argout description
+     */
+    // ===============================================================
+    public TriggerArchiveAttCheckCmd(final String name, final int in, final int out,
+	    final String in_comments, final String out_comments) {
+	super(name, in, out, in_comments, out_comments);
+    }
+
+    // ===============================================================
+    /**
+     * Constructor for Command class TriggerArchiveAttCheckCmd
+     * 
+     * @param name
+     *            command name
+     * @param in
+     *            argin type
+     * @param in_comments
+     *            argin description
+     * @param out
+     *            argout type
+     * @param out_comments
+     *            argout description
+     * @param level
+     *            The command display type OPERATOR or EXPERT
+     */
+    // ===============================================================
+    public TriggerArchiveAttCheckCmd(final String name, final int in, final int out,
+	    final String in_comments, final String out_comments, final DispLevel level) {
+	super(name, in, out, in_comments, out_comments, level);
+    }
+
+    // ===============================================================
+    /**
+     * return the result of the device's command.
+     */
+    // ===============================================================
+    @Override
+    public Any execute(final DeviceImpl device, final Any in_any) throws DevFailed {
+	Util.out2.println("TriggerArchiveAttCheckCmd.execute(): arrived");
+	final String argin = extract_DevString(in_any);
+	if (device instanceof HdbArchiver) {
+	    ((HdbArchiver) device).trigger_archive_att_check(argin);
+	}
+	return insert();
+    }
+
+    // ===============================================================
+    /**
+     * Check if it is allowed to execute the command.
+     */
+    // ===============================================================
+    @Override
+    public boolean is_allowed(final DeviceImpl device, final Any data_in) {
+	if (device.get_state() == DevState.FAULT) {
+	    // End of Generated Code
+
+	    // Re-Start of Generated Code
+	    return false;
+	}
+	return true;
+    }
+}
+
+// -----------------------------------------------------------------------------
+/*
+ * end of $Source:
+ * /cvsroot/tango-cs/tango/jserver/archiving/HdbArchiver/TriggerArchiveAttCheckCmd
+ * .java,v $
+ */
diff --git a/src/main/java/HdbArchiver/TriggerArchiveAttCmd.java b/hdbarchiver/src/main/java/HdbArchiver/TriggerArchiveAttCmd.java
similarity index 96%
rename from src/main/java/HdbArchiver/TriggerArchiveAttCmd.java
rename to hdbarchiver/src/main/java/HdbArchiver/TriggerArchiveAttCmd.java
index 3ec29e654f2fa2f7864513b2ecc8689979e066ac..157977fe0e334c1cbdd498d111aad809bc2fa9ee 100644
--- a/src/main/java/HdbArchiver/TriggerArchiveAttCmd.java
+++ b/hdbarchiver/src/main/java/HdbArchiver/TriggerArchiveAttCmd.java
@@ -1,168 +1,168 @@
-//+======================================================================
-// $Source: /cvsroot/tango-cs/tango/jserver/archiving/HdbArchiver/TriggerArchiveAttCmd.java,v $
-//
-// Project:      Tango Device Server
-//
-// Description:  Java source code for the command TemplateClass of the
-//               HdbArchiver class.
-//
-// $Author: chinkumo $
-//
-// $Revision: 1.6 $
-//
-// $Log: TriggerArchiveAttCmd.java,v $
-// Revision 1.6  2006/02/15 11:08:59  chinkumo
-// Javadoc comment update.
-//
-// Revision 1.5  2005/11/29 17:33:53  chinkumo
-// no message
-//
-// Revision 1.4.12.3  2005/11/29 16:16:05  chinkumo
-// Code reformated (pogo compatible)
-//
-// Revision 1.4.12.2  2005/11/15 13:46:08  chinkumo
-// ...
-//
-// Revision 1.4.12.1  2005/09/26 08:01:20  chinkumo
-// Minor changes !
-//
-// Revision 1.4  2005/06/15 14:00:37  chinkumo
-// The device was regenerated in Tango V5.
-//
-//
-// copyleft :    European Synchrotron Radiation Facility
-//               BP 220, Grenoble 38043
-//               FRANCE
-//
-//-======================================================================
-//
-//  		This file is generated by POGO
-//	(Program Obviously used to Generate tango Object)
-//
-//         (c) - Software Engineering Group - ESRF
-//=============================================================================
-
-/**
- * @author	$Author: chinkumo $
- * @version	$Revision: 1.6 $
- */
-package HdbArchiver;
-
-import org.omg.CORBA.Any;
-
-import fr.esrf.Tango.DevFailed;
-import fr.esrf.Tango.DevState;
-import fr.esrf.Tango.DispLevel;
-import fr.esrf.TangoDs.Command;
-import fr.esrf.TangoDs.DeviceImpl;
-import fr.esrf.TangoDs.TangoConst;
-import fr.esrf.TangoDs.Util;
-
-/**
- * Class Description: This command is invoked when the archiving of an attribute
- * is triggered. The attribute to archive is therefore encapsulated in a
- * fr.soleil.hdbtdbArchivingApi.ArchivingTools.Tools.AttributeLight type object.
- * The use of this command suppose that the HDB database is ready to host that
- * attribute's values. That means the registration was made, the associated
- * table built, ...
- */
-
-public class TriggerArchiveAttCmd extends Command implements TangoConst {
-    // ===============================================================
-    /**
-     * Constructor for Command class TriggerArchiveAttCmd
-     * 
-     * @param name
-     *            command name
-     * @param in
-     *            argin type
-     * @param out
-     *            argout type
-     */
-    // ===============================================================
-    public TriggerArchiveAttCmd(final String name, final int in, final int out) {
-	super(name, in, out);
-    }
-
-    // ===============================================================
-    /**
-     * Constructor for Command class TriggerArchiveAttCmd
-     * 
-     * @param name
-     *            command name
-     * @param in
-     *            argin type
-     * @param in_comments
-     *            argin description
-     * @param out
-     *            argout type
-     * @param out_comments
-     *            argout description
-     */
-    // ===============================================================
-    public TriggerArchiveAttCmd(final String name, final int in, final int out,
-	    final String in_comments, final String out_comments) {
-	super(name, in, out, in_comments, out_comments);
-    }
-
-    // ===============================================================
-    /**
-     * Constructor for Command class TriggerArchiveAttCmd
-     * 
-     * @param name
-     *            command name
-     * @param in
-     *            argin type
-     * @param in_comments
-     *            argin description
-     * @param out
-     *            argout type
-     * @param out_comments
-     *            argout description
-     * @param level
-     *            The command display type OPERATOR or EXPERT
-     */
-    // ===============================================================
-    public TriggerArchiveAttCmd(final String name, final int in, final int out,
-	    final String in_comments, final String out_comments, final DispLevel level) {
-	super(name, in, out, in_comments, out_comments, level);
-    }
-
-    // ===============================================================
-    /**
-     * return the result of the device's command.
-     */
-    // ===============================================================
-    @Override
-    public Any execute(final DeviceImpl device, final Any in_any) throws DevFailed {
-	Util.out2.println("TriggerArchiveAttCmd.execute(): arrived");
-	final String[] argin = extract_DevVarStringArray(in_any);
-	if (device instanceof HdbArchiver) {
-	    ((HdbArchiver) device).trigger_archive_att(argin);
-	}
-	return insert();
-    }
-
-    // ===============================================================
-    /**
-     * Check if it is allowed to execute the command.
-     */
-    // ===============================================================
-    @Override
-    public boolean is_allowed(final DeviceImpl device, final Any data_in) {
-	if (device.get_state() == DevState.FAULT) {
-	    // End of Generated Code
-
-	    // Re-Start of Generated Code
-	    return false;
-	}
-	return true;
-    }
-}
-
-// -----------------------------------------------------------------------------
-/*
- * end of $Source:
- * /cvsroot/tango-cs/tango/jserver/archiving/HdbArchiver/TriggerArchiveAttCmd
- * .java,v $
- */
+//+======================================================================
+// $Source: /cvsroot/tango-cs/tango/jserver/archiving/HdbArchiver/TriggerArchiveAttCmd.java,v $
+//
+// Project:      Tango Device Server
+//
+// Description:  Java source code for the command TemplateClass of the
+//               HdbArchiver class.
+//
+// $Author: chinkumo $
+//
+// $Revision: 1.6 $
+//
+// $Log: TriggerArchiveAttCmd.java,v $
+// Revision 1.6  2006/02/15 11:08:59  chinkumo
+// Javadoc comment update.
+//
+// Revision 1.5  2005/11/29 17:33:53  chinkumo
+// no message
+//
+// Revision 1.4.12.3  2005/11/29 16:16:05  chinkumo
+// Code reformated (pogo compatible)
+//
+// Revision 1.4.12.2  2005/11/15 13:46:08  chinkumo
+// ...
+//
+// Revision 1.4.12.1  2005/09/26 08:01:20  chinkumo
+// Minor changes !
+//
+// Revision 1.4  2005/06/15 14:00:37  chinkumo
+// The device was regenerated in Tango V5.
+//
+//
+// copyleft :    European Synchrotron Radiation Facility
+//               BP 220, Grenoble 38043
+//               FRANCE
+//
+//-======================================================================
+//
+//  		This file is generated by POGO
+//	(Program Obviously used to Generate tango Object)
+//
+//         (c) - Software Engineering Group - ESRF
+//=============================================================================
+
+/**
+ * @author	$Author: chinkumo $
+ * @version	$Revision: 1.6 $
+ */
+package HdbArchiver;
+
+import org.omg.CORBA.Any;
+
+import fr.esrf.Tango.DevFailed;
+import fr.esrf.Tango.DevState;
+import fr.esrf.Tango.DispLevel;
+import fr.esrf.TangoDs.Command;
+import fr.esrf.TangoDs.DeviceImpl;
+import fr.esrf.TangoDs.TangoConst;
+import fr.esrf.TangoDs.Util;
+
+/**
+ * Class Description: This command is invoked when the archiving of an attribute
+ * is triggered. The attribute to archive is therefore encapsulated in a
+ * fr.soleil.hdbtdbArchivingApi.ArchivingTools.Tools.AttributeLight type object.
+ * The use of this command suppose that the HDB database is ready to host that
+ * attribute's values. That means the registration was made, the associated
+ * table built, ...
+ */
+
+public class TriggerArchiveAttCmd extends Command implements TangoConst {
+    // ===============================================================
+    /**
+     * Constructor for Command class TriggerArchiveAttCmd
+     * 
+     * @param name
+     *            command name
+     * @param in
+     *            argin type
+     * @param out
+     *            argout type
+     */
+    // ===============================================================
+    public TriggerArchiveAttCmd(final String name, final int in, final int out) {
+	super(name, in, out);
+    }
+
+    // ===============================================================
+    /**
+     * Constructor for Command class TriggerArchiveAttCmd
+     * 
+     * @param name
+     *            command name
+     * @param in
+     *            argin type
+     * @param in_comments
+     *            argin description
+     * @param out
+     *            argout type
+     * @param out_comments
+     *            argout description
+     */
+    // ===============================================================
+    public TriggerArchiveAttCmd(final String name, final int in, final int out,
+	    final String in_comments, final String out_comments) {
+	super(name, in, out, in_comments, out_comments);
+    }
+
+    // ===============================================================
+    /**
+     * Constructor for Command class TriggerArchiveAttCmd
+     * 
+     * @param name
+     *            command name
+     * @param in
+     *            argin type
+     * @param in_comments
+     *            argin description
+     * @param out
+     *            argout type
+     * @param out_comments
+     *            argout description
+     * @param level
+     *            The command display type OPERATOR or EXPERT
+     */
+    // ===============================================================
+    public TriggerArchiveAttCmd(final String name, final int in, final int out,
+	    final String in_comments, final String out_comments, final DispLevel level) {
+	super(name, in, out, in_comments, out_comments, level);
+    }
+
+    // ===============================================================
+    /**
+     * return the result of the device's command.
+     */
+    // ===============================================================
+    @Override
+    public Any execute(final DeviceImpl device, final Any in_any) throws DevFailed {
+	Util.out2.println("TriggerArchiveAttCmd.execute(): arrived");
+	final String[] argin = extract_DevVarStringArray(in_any);
+	if (device instanceof HdbArchiver) {
+	    ((HdbArchiver) device).trigger_archive_att(argin);
+	}
+	return insert();
+    }
+
+    // ===============================================================
+    /**
+     * Check if it is allowed to execute the command.
+     */
+    // ===============================================================
+    @Override
+    public boolean is_allowed(final DeviceImpl device, final Any data_in) {
+	if (device.get_state() == DevState.FAULT) {
+	    // End of Generated Code
+
+	    // Re-Start of Generated Code
+	    return false;
+	}
+	return true;
+    }
+}
+
+// -----------------------------------------------------------------------------
+/*
+ * end of $Source:
+ * /cvsroot/tango-cs/tango/jserver/archiving/HdbArchiver/TriggerArchiveAttCmd
+ * .java,v $
+ */
diff --git a/src/main/java/HdbArchiver/TriggerArchiveConfCmd.java b/hdbarchiver/src/main/java/HdbArchiver/TriggerArchiveConfCmd.java
similarity index 96%
rename from src/main/java/HdbArchiver/TriggerArchiveConfCmd.java
rename to hdbarchiver/src/main/java/HdbArchiver/TriggerArchiveConfCmd.java
index 273f0a143c0384f94a3cbe6bca7d8973465ae7ca..a63499ea1772d8b0117c36f1e75cba7bbb8a428a 100644
--- a/src/main/java/HdbArchiver/TriggerArchiveConfCmd.java
+++ b/hdbarchiver/src/main/java/HdbArchiver/TriggerArchiveConfCmd.java
@@ -1,164 +1,164 @@
-//+======================================================================
-// $Source: /cvsroot/tango-cs/tango/jserver/archiving/HdbArchiver/TriggerArchiveConfCmd.java,v $
-//
-// Project:      Tango Device Server
-//
-// Description:  Java source code for the command TemplateClass of the
-//               HdbArchiver class.
-//
-// $Author: chinkumo $
-//
-// $Revision: 1.5 $
-//
-// $Log: TriggerArchiveConfCmd.java,v $
-// Revision 1.5  2005/11/29 17:33:53  chinkumo
-// no message
-//
-// Revision 1.4.12.3  2005/11/29 16:16:05  chinkumo
-// Code reformated (pogo compatible)
-//
-// Revision 1.4.12.2  2005/11/15 13:46:08  chinkumo
-// ...
-//
-// Revision 1.4.12.1  2005/09/26 08:01:20  chinkumo
-// Minor changes !
-//
-// Revision 1.4  2005/06/15 14:00:38  chinkumo
-// The device was regenerated in Tango V5.
-//
-//
-// copyleft :    European Synchrotron Radiation Facility
-//               BP 220, Grenoble 38043
-//               FRANCE
-//
-//-======================================================================
-//
-//  		This file is generated by POGO
-//	(Program Obviously used to Generate tango Object)
-//
-//         (c) - Software Engineering Group - ESRF
-//=============================================================================
-
-/**
- * @author	$Author: chinkumo $
- * @version	$Revision: 1.5 $
- */
-package HdbArchiver;
-
-import org.omg.CORBA.Any;
-
-import fr.esrf.Tango.DevFailed;
-import fr.esrf.Tango.DevState;
-import fr.esrf.Tango.DispLevel;
-import fr.esrf.TangoDs.Command;
-import fr.esrf.TangoDs.DeviceImpl;
-import fr.esrf.TangoDs.TangoConst;
-import fr.esrf.TangoDs.Util;
-
-/**
- * Class Description: This command is invoked when the archiving of a group of
- * attributes is triggered. The group of attributes is therefore encapsulated in
- * an ArchivingConfig type object. The use of this command suppose that the HDB
- * database is ready to host those attributes's values. That means registrations
- * were made, the associated tables built, ...
- */
-
-public class TriggerArchiveConfCmd extends Command implements TangoConst {
-    // ===============================================================
-    /**
-     * Constructor for Command class TriggerArchiveConfCmd
-     * 
-     * @param name
-     *            command name
-     * @param in
-     *            argin type
-     * @param out
-     *            argout type
-     */
-    // ===============================================================
-    public TriggerArchiveConfCmd(final String name, final int in, final int out) {
-	super(name, in, out);
-    }
-
-    // ===============================================================
-    /**
-     * Constructor for Command class TriggerArchiveConfCmd
-     * 
-     * @param name
-     *            command name
-     * @param in
-     *            argin type
-     * @param in_comments
-     *            argin description
-     * @param out
-     *            argout type
-     * @param out_comments
-     *            argout description
-     */
-    // ===============================================================
-    public TriggerArchiveConfCmd(final String name, final int in, final int out,
-	    final String in_comments, final String out_comments) {
-	super(name, in, out, in_comments, out_comments);
-    }
-
-    // ===============================================================
-    /**
-     * Constructor for Command class TriggerArchiveConfCmd
-     * 
-     * @param name
-     *            command name
-     * @param in
-     *            argin type
-     * @param in_comments
-     *            argin description
-     * @param out
-     *            argout type
-     * @param out_comments
-     *            argout description
-     * @param level
-     *            The command display type OPERATOR or EXPERT
-     */
-    // ===============================================================
-    public TriggerArchiveConfCmd(final String name, final int in, final int out,
-	    final String in_comments, final String out_comments, final DispLevel level) {
-	super(name, in, out, in_comments, out_comments, level);
-    }
-
-    // ===============================================================
-    /**
-     * return the result of the device's command.
-     */
-    // ===============================================================
-    @Override
-    public Any execute(final DeviceImpl device, final Any in_any) throws DevFailed {
-	Util.out2.println("TriggerArchiveConfCmd.execute(): arrived");
-	final String[] argin = extract_DevVarStringArray(in_any);
-	if (device instanceof HdbArchiver) {
-	    ((HdbArchiver) device).trigger_archive_conf(argin);
-	}
-	return insert();
-    }
-
-    // ===============================================================
-    /**
-     * Check if it is allowed to execute the command.
-     */
-    // ===============================================================
-    @Override
-    public boolean is_allowed(final DeviceImpl device, final Any data_in) {
-	if (device.get_state() == DevState.FAULT) {
-	    // End of Generated Code
-
-	    // Re-Start of Generated Code
-	    return false;
-	}
-	return true;
-    }
-}
-
-// -----------------------------------------------------------------------------
-/*
- * end of $Source:
- * /cvsroot/tango-cs/tango/jserver/archiving/HdbArchiver/TriggerArchiveConfCmd
- * .java,v $
- */
+//+======================================================================
+// $Source: /cvsroot/tango-cs/tango/jserver/archiving/HdbArchiver/TriggerArchiveConfCmd.java,v $
+//
+// Project:      Tango Device Server
+//
+// Description:  Java source code for the command TemplateClass of the
+//               HdbArchiver class.
+//
+// $Author: chinkumo $
+//
+// $Revision: 1.5 $
+//
+// $Log: TriggerArchiveConfCmd.java,v $
+// Revision 1.5  2005/11/29 17:33:53  chinkumo
+// no message
+//
+// Revision 1.4.12.3  2005/11/29 16:16:05  chinkumo
+// Code reformated (pogo compatible)
+//
+// Revision 1.4.12.2  2005/11/15 13:46:08  chinkumo
+// ...
+//
+// Revision 1.4.12.1  2005/09/26 08:01:20  chinkumo
+// Minor changes !
+//
+// Revision 1.4  2005/06/15 14:00:38  chinkumo
+// The device was regenerated in Tango V5.
+//
+//
+// copyleft :    European Synchrotron Radiation Facility
+//               BP 220, Grenoble 38043
+//               FRANCE
+//
+//-======================================================================
+//
+//  		This file is generated by POGO
+//	(Program Obviously used to Generate tango Object)
+//
+//         (c) - Software Engineering Group - ESRF
+//=============================================================================
+
+/**
+ * @author	$Author: chinkumo $
+ * @version	$Revision: 1.5 $
+ */
+package HdbArchiver;
+
+import org.omg.CORBA.Any;
+
+import fr.esrf.Tango.DevFailed;
+import fr.esrf.Tango.DevState;
+import fr.esrf.Tango.DispLevel;
+import fr.esrf.TangoDs.Command;
+import fr.esrf.TangoDs.DeviceImpl;
+import fr.esrf.TangoDs.TangoConst;
+import fr.esrf.TangoDs.Util;
+
+/**
+ * Class Description: This command is invoked when the archiving of a group of
+ * attributes is triggered. The group of attributes is therefore encapsulated in
+ * an ArchivingConfig type object. The use of this command suppose that the HDB
+ * database is ready to host those attributes's values. That means registrations
+ * were made, the associated tables built, ...
+ */
+
+public class TriggerArchiveConfCmd extends Command implements TangoConst {
+    // ===============================================================
+    /**
+     * Constructor for Command class TriggerArchiveConfCmd
+     * 
+     * @param name
+     *            command name
+     * @param in
+     *            argin type
+     * @param out
+     *            argout type
+     */
+    // ===============================================================
+    public TriggerArchiveConfCmd(final String name, final int in, final int out) {
+	super(name, in, out);
+    }
+
+    // ===============================================================
+    /**
+     * Constructor for Command class TriggerArchiveConfCmd
+     * 
+     * @param name
+     *            command name
+     * @param in
+     *            argin type
+     * @param in_comments
+     *            argin description
+     * @param out
+     *            argout type
+     * @param out_comments
+     *            argout description
+     */
+    // ===============================================================
+    public TriggerArchiveConfCmd(final String name, final int in, final int out,
+	    final String in_comments, final String out_comments) {
+	super(name, in, out, in_comments, out_comments);
+    }
+
+    // ===============================================================
+    /**
+     * Constructor for Command class TriggerArchiveConfCmd
+     * 
+     * @param name
+     *            command name
+     * @param in
+     *            argin type
+     * @param in_comments
+     *            argin description
+     * @param out
+     *            argout type
+     * @param out_comments
+     *            argout description
+     * @param level
+     *            The command display type OPERATOR or EXPERT
+     */
+    // ===============================================================
+    public TriggerArchiveConfCmd(final String name, final int in, final int out,
+	    final String in_comments, final String out_comments, final DispLevel level) {
+	super(name, in, out, in_comments, out_comments, level);
+    }
+
+    // ===============================================================
+    /**
+     * return the result of the device's command.
+     */
+    // ===============================================================
+    @Override
+    public Any execute(final DeviceImpl device, final Any in_any) throws DevFailed {
+	Util.out2.println("TriggerArchiveConfCmd.execute(): arrived");
+	final String[] argin = extract_DevVarStringArray(in_any);
+	if (device instanceof HdbArchiver) {
+	    ((HdbArchiver) device).trigger_archive_conf(argin);
+	}
+	return insert();
+    }
+
+    // ===============================================================
+    /**
+     * Check if it is allowed to execute the command.
+     */
+    // ===============================================================
+    @Override
+    public boolean is_allowed(final DeviceImpl device, final Any data_in) {
+	if (device.get_state() == DevState.FAULT) {
+	    // End of Generated Code
+
+	    // Re-Start of Generated Code
+	    return false;
+	}
+	return true;
+    }
+}
+
+// -----------------------------------------------------------------------------
+/*
+ * end of $Source:
+ * /cvsroot/tango-cs/tango/jserver/archiving/HdbArchiver/TriggerArchiveConfCmd
+ * .java,v $
+ */
diff --git a/hdbarchiver/src/main/java/org/tango/archiving/server/archiver/HdbArchiver.java b/hdbarchiver/src/main/java/org/tango/archiving/server/archiver/HdbArchiver.java
new file mode 100644
index 0000000000000000000000000000000000000000..b3df1627dd777707c7639f566a939c27629c7ffe
--- /dev/null
+++ b/hdbarchiver/src/main/java/org/tango/archiving/server/archiver/HdbArchiver.java
@@ -0,0 +1,998 @@
+package org.tango.archiving.server.archiver;
+
+import HdbArchiver.Collector.DbProxy;
+import HdbArchiver.Collector.HdbCollector;
+import HdbArchiver.Collector.HdbCollectorFactory;
+import fr.esrf.Tango.DevFailed;
+import fr.soleil.archiving.common.api.exception.ArchivingException;
+import fr.soleil.archiving.common.api.tools.GlobalConst;
+import fr.soleil.archiving.common.api.utils.TangoStateUtils;
+import fr.soleil.archiving.hdbtdb.api.manager.ArchivingManagerApiRef;
+import fr.soleil.archiving.hdbtdb.api.tools.ArchivingMessConfig;
+import fr.soleil.archiving.hdbtdb.api.tools.AttributeLightMode;
+import fr.soleil.archiving.hdbtdb.api.tools.AttributeSupport;
+import fr.soleil.archiving.hdbtdb.api.tools.DBTools;
+import fr.soleil.database.connection.DataBaseParameters;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.tango.DeviceState;
+import org.tango.logging.LoggingLevel;
+import org.tango.logging.LoggingManager;
+import org.tango.server.ServerManager;
+import org.tango.server.annotation.*;
+import org.tango.server.attribute.log.LogAttribute;
+import org.tango.server.device.DeviceManager;
+import org.tango.server.dynamic.DynamicManager;
+import org.tango.utils.DevFailedUtils;
+
+import java.sql.Timestamp;
+import java.util.*;
+
+@Device
+public class HdbArchiver {
+
+    private static final short NA = 10;
+    private static final short SUCCEEDED = 20;
+    private static final short FAILED = 30;
+
+
+    // --------- Start of attributes data members ----------
+    // --------------------------------------------------------------------------//
+    // ELETTRA : Archiving Events
+    // --------------------------------------------------------------------------//
+    /* Archiving related properties */
+    @DeviceProperty
+    public boolean isUseEvents = false;
+
+
+    @DeviceProperty
+    private String dbType;
+
+    public void setUseEvents(boolean isUseEvents) {
+        this.isUseEvents = isUseEvents;
+    }
+
+    public void setEventDBUpdatePolicy(String eventDBUpdatePolicy) {
+        this.eventDBUpdatePolicy = eventDBUpdatePolicy;
+    }
+
+    @DeviceProperty
+    public String eventDBUpdatePolicy = "amt";
+
+    @DeviceProperty
+    private String dbHost;
+
+    @DeviceProperty
+    private String dbName;
+    @DeviceProperty
+    private String dbSchema;
+    @DeviceProperty
+    private String dbUser;
+    @DeviceProperty
+    private String dbPassword;
+    @DeviceProperty
+    private String dbTnsNames;
+    @DeviceProperty
+    private String dbOnsConf;
+    @DeviceProperty
+    private boolean isRac;
+
+    @DeviceProperty
+    private String dbMinPoolSize;
+    @DeviceProperty
+    private String dbMaxPoolSize;
+
+    @DeviceProperty
+    private int dbCnxInactivityTimeout;
+
+
+    private final Map<String, String> koAttributes = new HashMap<String, String>();
+
+
+    // --------- End of attributes data members ----------
+    private final Set<String> okAttributes = new HashSet<String>();
+
+
+    @State
+    private DeviceState state = DeviceState.OFF;
+    private DbProxy dbProxy;
+
+
+    @org.tango.server.annotation.Attribute
+    private int scalarCharge;
+    @org.tango.server.annotation.Attribute
+    private int spectrumCharge;
+    @org.tango.server.annotation.Attribute
+    private int imageCharge;
+
+    // --------------------------------------------------------------------------//
+    // ELETTRA : Archiving Events
+    // --------------------------------------------------------------------------//
+    // --------- End of properties data members ----------
+    /**
+     * Defines whether the archiver is a "dedicated archiver". A
+     * "dedicated archiver" is an archiver specialized in archiving a specific
+     * list of attributes, and none others. If the value is false, the related
+     * attribute "reservedAttributes" won't be used. <b>Default value :
+     * </b>false
+     */
+    @DeviceProperty
+    private boolean isDedicated;
+    /**
+     * Defines whether the archiver will log to a diary. <b>Default value :
+     * </b>false
+     */
+    @DeviceProperty
+    private boolean hasDiary = false;
+    /**
+     * The criticity threshold of the archiver's logging. Only messages with a
+     * criticity higher than this attribute will be logged to the diary.
+     * Possible values are:
+     * <UL>
+     * <LI>DEBUG
+     * <LI>INFO
+     * <LI>WARNING
+     * <LI>ERROR
+     * <LI>CRITIC
+     * </UL>
+     * <b>Default value : </b>DEBUG
+     */
+    @DeviceProperty
+    private String diaryLogLevel = "DEBUG";
+
+
+    /**
+     * The path of the diary logs. Don't include a filename, diary files are
+     * named automatically.
+     */
+    @DeviceProperty
+    private String diaryPath;
+
+
+    /**
+     * The list of attributes that will always be archived on this archiver no
+     * matter the load-balancing situation. Be aware that: - this list will be
+     * ignored if the related attribute "isDedicated" is false or missing - one
+     * attribute shouldn't be on the reservedAttributes list of several
+     * archivers
+     */
+    @DeviceProperty
+    private String[] reservedAttributes;
+
+
+    private HdbCollectorFactory collectorFactory;
+    private Logger logger = LoggerFactory.getLogger(HdbArchiver.class);
+    private boolean isHighRate;
+
+    @Status
+    private String status;
+
+    @DeviceManagement
+    private DeviceManager deviceManager;
+
+
+  //  @DynamicManagement
+    //private DynamicManager dynMngt;
+
+
+    private String deviceName;
+
+    private static String VERSION;
+
+    public static void main(final String[] args) {
+        VERSION = ResourceBundle.getBundle("application").getString("project.version");
+        ServerManager.getInstance().start(args, HdbArchiver.class);
+    }
+
+    @Attribute
+    public String getVersion() {
+        return VERSION;
+    }
+
+    // =========================================================
+
+    @Delete
+    public void delete() {
+        // stop archiving
+        if (collectorFactory != null) {
+            collectorFactory.clear();
+        }
+        if (dbProxy != null) {
+            dbProxy.closeConnection();
+        }
+    }
+
+    /**
+     * Initialize the device.
+     */
+    // =========================================================
+    @Init(lazyLoading = true)
+    public void init() throws DevFailed, ArchivingException {
+       // logger = LoggerFactory.getLogger(HdbArchiver.class.getCanonicalName() + "- " + deviceName);
+       // dynMngt.addAttribute(new LogAttribute(1000, logger));
+        logger.info("init in");
+        collectorFactory = new HdbCollectorFactory(logger);
+        imageCharge = 0;
+        scalarCharge = 0;
+        spectrumCharge = 0;
+        koAttributes.clear();
+        okAttributes.clear();
+
+        StringBuilder builder = new StringBuilder();
+
+        logger.info("isDedicated = {}", isDedicated);
+        logger.info("reservedAttributes = {}", Arrays.toString(reservedAttributes));
+        // builder.append("diaryPath = ").append(diaryPath).append('\n');
+        //builder.append("hasDiary = ").append(hasDiary).append('\n');
+        //builder.append("diaryLogLevel = ").append(diaryLogLevel);
+        try {
+            if (hasDiary) {
+                LoggingManager.getInstance().addFileAppender(diaryPath, deviceName);
+                LoggingManager.getInstance().setLoggingLevel(deviceName, LoggingLevel.getLevelFromString(diaryLogLevel).toInt());
+            }
+        } catch (DevFailed e) {
+            logger.error("failed to configure logging {}", DevFailedUtils.toString(e));
+        }
+        connectDatabase();
+        state = DeviceState.ON;
+        logger.info("init device OK");
+    }
+
+    @Attribute
+    public String[] getKoAttributes() {
+        return koAttributes.keySet().toArray(new String[koAttributes.size()]);
+    }
+
+    @Attribute
+    public String[] getKoErrors() {
+        return koAttributes.values().toArray(new String[koAttributes.size()]);
+    }
+
+
+    @Attribute
+    public String[] getOkAttributes() {
+        return okAttributes.toArray(new String[okAttributes.size()]);
+    }
+
+    private void connectDatabase() throws ArchivingException, DevFailed {
+        final DataBaseParameters params = new DataBaseParameters();
+        params.setDbType(DataBaseParameters.DataBaseType.valueOf(dbType.toUpperCase()));
+        params.setHost(dbHost);
+        params.setUser(dbUser);
+        params.setPassword(dbPassword);
+        params.setName(dbName);
+        params.setSchema(dbSchema);
+        params.setRac(isRac);
+        params.setOnsConf(dbOnsConf);
+        params.setTnsNames(dbTnsNames);
+        params.setInactivityTimeout(dbCnxInactivityTimeout);
+        logger.debug("connecting to archiving DB {}", params);
+        dbProxy = new DbProxy(params);
+        logger.debug("starting archiving");
+        // start archiving
+        if (dbProxy != null) {
+            Collection<AttributeLightMode> myCurrentTasks = dbProxy.getArchiverCurrentTasks(deviceName);
+            final ArchivingMessConfig archivingMessConfig = ArchivingMessConfig.basicObjectCreation();
+            if (myCurrentTasks != null && myCurrentTasks.size() > 0) {
+                for (final AttributeLightMode attributeLightMode : myCurrentTasks) {
+                    archivingMessConfig.add(attributeLightMode);
+                }
+                triggerArchiving(archivingMessConfig.toArray(), false);
+
+            }
+        }
+        logger.debug("archiving started");
+    }
+
+    public int getScalarCharge() {
+        return scalarCharge;
+    }
+
+    public int getSpectrumCharge() {
+        return spectrumCharge;
+    }
+
+    public int getImageCharge() {
+        return imageCharge;
+    }
+
+    /**
+     * @param archivingMessConfig
+     */
+    private void launchStartArchivingTask(final ArchivingMessConfig archivingMessConfig, final boolean updateAMTTable) {
+        final StartArchivingRunnable startArchivingRunnable = new StartArchivingRunnable(archivingMessConfig,
+                updateAMTTable);
+        final Thread startArchivingThread = new Thread(startArchivingRunnable, "HDBStartArchivingThread "
+                + deviceName);
+        startArchivingThread.start();
+    }
+
+    private void logArchivingError(DevFailed df, ArchivingMessConfig config) {
+        StringBuilder errorBuilder = new StringBuilder(getClass().getSimpleName());
+        errorBuilder.append(" failed to start archiving:");
+        String[] lines = config.toArray();
+        if (lines != null) {
+            for (String line : lines) {
+                if (line != null) {
+                    errorBuilder.append("\n").append(line);
+                }
+            }
+        }
+        errorBuilder.append("\n--> reason: ").append(DevFailedUtils.toString(df));
+        logger.error(errorBuilder.toString());
+    }
+
+
+
+    // =========================================================
+
+    /**
+     * Execute command "TriggerArchiveConf" on device. This command is invoked
+     * when the archiving of a group of attributes is triggered. The group of
+     * attributes is therefore encapsulated in an ArchivingMessConfig type
+     * object. The use of this command suppose that the database is ready to
+     * host those attributes's values. That means registrations were made, the
+     * associated tables built, ...
+     *
+     * @param argin The group of attributes to archive
+     * @see fr.soleil.archiving.hdbtdb.api.tools.ArchivingMessConfig
+     * @see fr.soleil.archiving.hdbtdb.api.tools.AttributeLightMode
+     */
+    // =========================================================
+    @Command(name = "TriggerArchiveConf")
+    @StateMachine(deniedStates = {DeviceState.FAULT, DeviceState.RUNNING})
+    public void triggerArchiveConf(final String[] argin) throws DevFailed {
+        triggerArchiving(argin, true);
+    }
+
+    private void triggerArchiving(final String[] argin, final boolean updateAMTTable) throws DevFailed {
+        setRunning();
+
+        final ArchivingException archivingException = new ArchivingException();
+        final ArchivingMessConfig archivingMessConfig = ArchivingMessConfig.creationWithFullInformation(argin);
+        archivingMessConfig.filter(isDedicated, reservedAttributes);
+        final Set<String> attributes = archivingMessConfig.getAttributeListKeys();
+        logger.debug("start archiving of {}", attributes);
+        for (final String attributeName : attributes) {
+            // logger.trace(ILogger.LEVEL_INFO, "===> Attribute Name = " +
+            // attributeName);
+            final AttributeLightMode attributeLightMode = archivingMessConfig.getAttribute(attributeName);
+            attributeLightMode.setTrigger_time(new Timestamp(System.currentTimeMillis()));
+            boolean attSupport = false;
+            final String attCompleteName = attributeLightMode.getAttributeCompleteName();
+            logger.debug("managing " + attCompleteName);
+            try {
+                attSupport = AttributeSupport.checkAttributeSupport(attCompleteName, attributeLightMode.getDataType(),
+                        attributeLightMode.getDataFormat(), attributeLightMode.getWritable());
+                logger.debug(attCompleteName + " support " + attSupport);
+                if (attSupport) {
+                    if (isHighRate) {
+                        attributeLightMode.getMode().checkMode(false, attCompleteName);
+                    } else {
+                        attributeLightMode.getMode().checkMode(true, attCompleteName);
+                    }
+                    attributeLightMode.setDevice_in_charge(deviceName);
+
+                    // if (
+                    // this.dbProxy.isArchived(attributeLightMode.getAttribute_complete_name())
+                    // )
+                    // this.dbProxy.updateModeRecord(attributeLightMode.getAttribute_complete_name());
+
+                    // --------------------------------------------------------------------------//
+                    // ELETTRA : Archiving Events Begin
+                    // --------------------------------------------------------------------------//
+                    // ////////////////////////////new method //////////
+                    /*
+                     * Can be put in the hdbArchiver.java. We can call it
+                     * updateAMT()
+                     */
+
+                    /*
+                     * if(events_enabled() ) { if(overwriteAMTFromTangoDB() ) {
+                     * getDataFromTangoDB(); attributeLightMode.setPeriod();
+                     * attributeLightMode.setAbsChange();
+                     * attributeLightMode.setRelativeChange(); } }
+                     */
+
+                    // SPZJ : Is it really the good place ?
+                    // --------------------------------------------------------------------------//
+                    // ELETTRA : Archiving Events End
+                    // --------------------------------------------------------------------------//
+
+                    // remove attribute from current collector
+                    collectorFactory.remove(attCompleteName);
+                    if (dbProxy != null) {
+                        // start collector
+                        final HdbCollector m_collector = collectorFactory.get(attributeLightMode);
+                        if (m_collector == null) {
+                            logger.debug("createCollectorAndAddSource " + attCompleteName);
+                            collectorFactory.createCollectorAndAddSource(attributeLightMode, dbProxy, isUseEvents);
+                        } else {
+                            logger.debug("addSource " + attCompleteName);
+                            m_collector.addSource(attributeLightMode);
+                        }
+                        // update AMT table in db with attribute config
+                        if (updateAMTTable) {
+                            if (dbProxy.isArchived(attCompleteName, deviceName)) {
+                                logger.debug("updateModeRecord - in");
+                                dbProxy.updateModeRecord(attCompleteName);
+                                logger.debug("updateModeRecord - out");
+                            }
+
+                            logger.debug("insertModeRecord - in");
+                            dbProxy.insertModeRecord(attributeLightMode);
+                            logger.debug("insertModeRecord - out");
+                        }
+
+                        // update period in dbProxy, used in cmd
+                        // retry_for_ko_attributes
+                        final int period = attributeLightMode.getMode().getModeP().getPeriod();
+                        logger.debug(attCompleteName + "'s period is " + period);
+                        dbProxy.setPeriodForAttribute(attCompleteName, period);
+                    }
+                    // --------------------------------------------------------------------------//
+                    // ELETTRA : Archiving Events
+                    // --------------------------------------------------------------------------//
+                    /*
+                     * here we could call another new method to update the tango
+                     * db
+                     */
+                    /*
+                     * if(events_enabled() ) { if(overwriteTangoDbFromAMT() ) {
+                     * // attributeLightMode contains the properies from amt
+                     * updateTangoDbFromAmt(attributeLightMode); } }
+                     */
+                    // ////////// end new method /////////////////
+                    // --------------------------------------------------------------------------//
+                    // ELETTRA : Archiving Events
+                    // --------------------------------------------------------------------------//
+
+                }
+                okAttributes.add(attCompleteName.toLowerCase());
+                koAttributes.remove(attCompleteName.toLowerCase());
+                logger.debug("start {} OK ", attCompleteName);
+            } catch (final ArchivingException e) {
+                try {
+                    collectorFactory.remove(attCompleteName);
+                } catch (final ArchivingException e1) {
+                }
+                final String message = GlobalConst.ARCHIVING_ERROR_PREFIX + " : ";
+                archivingException.addStack(message, e);
+                String name = attCompleteName.toLowerCase();
+                koAttributes.put(name," - "+name+ ": "  + DevFailedUtils.toString(e.toTangoException()));
+                okAttributes.remove(name);
+                collectorFactory.registerError(attCompleteName, e);
+                e.printStackTrace();
+                logger.error("error", e.getMessage());
+                logger.error("attribute {} is KO ", attCompleteName);
+            } catch (final Exception e) {
+                try {
+                    collectorFactory.remove(attCompleteName);
+                } catch (final ArchivingException e1) {
+                }
+                String name = attCompleteName.toLowerCase();
+                koAttributes.put(name, e.getMessage());
+                okAttributes.remove(name);
+                e.printStackTrace();
+                collectorFactory.registerError(attCompleteName, e);
+                logger.error("KO ", e);
+            }
+        }
+
+        computeLoads();
+        // ignore error start device anyway
+       /* if (!archivingException.getMessage().equals("")) {
+            logger.error("trigger_archive_conf ERROR - out");
+            throw archivingException.toTangoException();
+        }*/
+
+        logger.debug("trigger_archive_conf - out");
+    }
+
+
+    // =========================================================
+
+    /**
+     * Execute command "StopArchiveConf" on device. This command is invoked when
+     * stopping the archiving of a group of attributes.
+     *
+     * @param argin The group of attributes
+     */
+    // =========================================================
+    @Command(name = "StopArchiveConf")
+    @StateMachine(deniedStates = {DeviceState.FAULT, DeviceState.RUNNING})
+    public void stopArchiveConf(final String[] argin) throws DevFailed {
+        try {
+            logger.debug("stop_archive_conf - in");
+            final Collection<AttributeLightMode> myConf = ArchivingManagerApiRef.stoppingVector(argin);
+            for (AttributeLightMode attrMode : myConf) {
+                stopArchiveAtt(attrMode.toArray());
+            }
+
+        } finally {
+            logger.debug("stop_archive_conf - out");
+        }
+    }
+
+    // =========================================================
+
+    /**
+     * Execute command "RetryForAttribute" on device. Tries to start archiving
+     * for a given attribute, specified by its complete name.
+     *
+     * @param attributeToRetry The complete name of the attribute
+     * @return A return code, can be either: 10 (the archiver isn't in charge of
+     * the specified attribute) 20 (the retry succeeded) or 30 (the
+     * retry failed)
+     * @throws fr.esrf.Tango.DevFailed
+     */
+    // =========================================================
+    @Command(name = "RetryForAttribute")
+    @StateMachine(deniedStates = {DeviceState.FAULT, DeviceState.RUNNING})
+    public short retryForAttribute(final String attributeToRetry) throws DevFailed {
+        short result;
+        if ((attributeToRetry == null) || attributeToRetry.isEmpty()) {
+            logger.debug("no retry done - no attribute");
+            result = NA;
+        } else if (dbProxy == null) {
+            logger.debug("no retry done - no connection to the database");
+            result = NA;
+        } else {
+            try {
+                final Collection<AttributeLightMode> myCurrentTasks = dbProxy.getArchiverCurrentTasks(deviceName);
+                final ArchivingMessConfig archivingMessConfig = ArchivingMessConfig.basicObjectCreation();
+                boolean configIsNotEmpty = false;
+                for (final AttributeLightMode attributeLightMode : myCurrentTasks) {
+                    final String attrName = attributeLightMode.getAttributeCompleteName();
+                    if (attrName.equalsIgnoreCase(attributeToRetry)) {
+                        archivingMessConfig.add(attributeLightMode);
+                        configIsNotEmpty = true;
+                        break;
+                    }
+                }
+                if (configIsNotEmpty) {
+                    logger.debug("retry attribute {}", attributeToRetry);
+                    launchStartArchivingTask(archivingMessConfig, false);
+                    result = SUCCEEDED;
+                } else {
+                    logger.debug(attributeToRetry + " no retry done - config is empty");
+                    result = NA;
+                }
+            } catch (final ArchivingException e) {
+                logger.error("Failed during retry_for_attribute ( " + attributeToRetry + " ):", e);
+                result = FAILED;
+            }
+        }
+        return result;
+    }
+
+    // =========================================================
+
+    /**
+     * Execute command "RetryForAttributes" on device. Tries to start archiving
+     * for a given list of attributes, specified by their complete names.
+     *
+     * @param attributesToRetry The complete names of the attributes
+     * @return A return code, can be either: 10 (the archiver isn't in charge of
+     * any of the specified attributes) 20 (the retry succeeded) or 30
+     * (the retry failed)
+     * @throws fr.esrf.Tango.DevFailed
+     */
+    // =========================================================
+    @Command(name = "RetryForAttributes")
+    @StateMachine(deniedStates = {DeviceState.FAULT, DeviceState.RUNNING})
+    public short retryForAttributes(final String[] attributesToRetry) throws DevFailed {
+        short result;
+        if ((attributesToRetry == null) || (attributesToRetry.length == 0) || (dbProxy == null)) {
+            result = NA;
+        } else {
+            try {
+                final Collection<AttributeLightMode> myCurrentTasks = dbProxy.getArchiverCurrentTasks(deviceName);
+                final Map<String, AttributeLightMode> modes = new HashMap<String, AttributeLightMode>(
+                        myCurrentTasks.size());
+                for (final AttributeLightMode attributeLightMode : myCurrentTasks) {
+                    final String attrName = attributeLightMode.getAttributeCompleteName();
+                    modes.put(attrName.toLowerCase().trim(), attributeLightMode);
+                }
+                boolean configIsNotEmpty = false;
+                final ArchivingMessConfig archivingMessConfig = ArchivingMessConfig.basicObjectCreation();
+                Collection<String> attributeNotRetried = new ArrayList<String>(attributesToRetry.length);
+                Collection<String> attributeRetried = new ArrayList<String>(attributesToRetry.length);
+                if (modes.isEmpty()) {
+                    for (final String currentName : attributesToRetry) {
+                        attributeNotRetried.add(currentName);
+                    }
+                } else {
+                    for (final String currentName : attributesToRetry) {
+                        final AttributeLightMode attributeLightMode = modes.get(currentName.toLowerCase().trim());
+                        if (attributeLightMode == null) {
+                            attributeNotRetried.add(currentName);
+                        } else {
+                            attributeRetried.add(currentName);
+                            archivingMessConfig.add(attributeLightMode);
+                            configIsNotEmpty = true;
+                        }
+                    }
+                }
+                StringBuilder builder = new StringBuilder("Retry asked for ");
+                builder.append(Arrays.toString(attributesToRetry));
+                if (configIsNotEmpty) {
+                    builder.append("\n\t- Retried attributes ").append(attributeRetried);
+                    launchStartArchivingTask(archivingMessConfig, false);
+                    result = SUCCEEDED;
+                } else {
+                    result = NA;
+                }
+                if (!attributeNotRetried.isEmpty()) {
+                    builder.append("\n\t- Could not retry attributes ").append(attributeNotRetried);
+                }
+                attributeRetried.clear();
+                attributeNotRetried.clear();
+                logger.debug(builder.toString());
+            } catch (final Throwable t) {
+                final DevFailed devFailed = new DevFailed();
+                devFailed.initCause(t);
+                devFailed.setStackTrace(t.getStackTrace());
+                final String message = DBTools.getCompleteMessage(devFailed);
+                logger.error(message);
+                logger.error("Failed during retry_for_attributes ( " + Arrays.toString(attributesToRetry) + " ):");
+                result = FAILED;
+            }
+        }
+        return result;
+    }
+
+    // =========================================================
+
+    /**
+     * Execute command "RetryForKoAttributes" on device. Looks up the complete
+     * list of attributes that:
+     * <UL>
+     * <LI>the archiver is supposed to be taking care of
+     * <LI>aren't correctly archiving, according to the archiver's internal controls
+     * </UL>
+     * , then starts archiving on all of them.
+     *
+     * @return A return code, can be either: 10 (the archiver isn't in charge of
+     * any attribute, or they are all correctly archiving) 20 (the retry
+     * succeeded) or 30 (the retry failed)
+     * @throws fr.esrf.Tango.DevFailed
+     */
+    // =========================================================
+    @Command(name = "RetryForKoAttributes")
+    @StateMachine(deniedStates = {DeviceState.FAULT, DeviceState.RUNNING})
+    public short retryForKoAttributes() throws DevFailed {
+        logger.debug("retry_for_ko_attributes");
+        return retryForAttributes(koAttributes.keySet().toArray(new String[koAttributes.size()]));
+    }
+
+    @Command(name ="GetErrorMessageForAttribute")
+    public String getErrorMessageForAttribute(String attributeName) {
+        final HdbCollector hdbCollector = collectorFactory.quickGet(attributeName);
+        String result;
+        if (hdbCollector == null) {
+            StringBuilder builder = new StringBuilder("No HdbCollector found for attribute '");
+            builder.append(attributeName).append("' - Reason: ");
+            try {
+                if (dbProxy != null) {
+                    final Collection<AttributeLightMode> myCurrentTasks = dbProxy.getArchiverCurrentTasks(deviceName);
+                    boolean done = false;
+                    for (final AttributeLightMode attributeLightMode : myCurrentTasks) {
+                        final String attrName = attributeLightMode.getAttributeCompleteName();
+                        if (attrName.equalsIgnoreCase(attributeName)) {
+                            done = true;
+                            String message = collectorFactory.getLastError(attributeLightMode);
+                            if ((message == null) || (message.trim().isEmpty())) {
+                                builder.append(" no valid reason found");
+                            } else {
+                                builder.append(message);
+                            }
+                            break;
+                        }
+                    }
+                    if (!done) {
+                        builder.append(" this attribute does not seem to be managed by this archiver");
+                    }
+                }
+            } catch (Exception e) {
+                builder.append(" Could not recover attribute archiving configuration: ").append(e.getMessage());
+            }
+            result = builder.toString();
+        } else {
+            result = hdbCollector.getErrorMessage(attributeName);
+        }
+        if (result == null) {
+            result = "";
+        }
+        return result;
+    }
+
+    // =========================================================
+
+    /**
+     * Execute command "RetryForAll" on device. Looks up the complete list of
+     * attributes the archiver is supposed to be taking care of, then starts
+     * archiving on all of them. Those that are already archiving aren't
+     * impacted.
+     *
+     * @return A return code, can be either: 10 (the archiver isn't in charge of
+     * any attribute) 20 (the retry succeeded) or 30 (the retry failed)
+     * @throws fr.esrf.Tango.DevFailed
+     */
+    // =========================================================
+    @Command(name = "RetryForAll")
+    @StateMachine(deniedStates = {DeviceState.RUNNING, DeviceState.FAULT})
+    public short retryForAll() throws DevFailed {
+        short result;
+        if (dbProxy == null) {
+            result = FAILED;
+        } else {
+            try {
+                final Collection<AttributeLightMode> myCurrentTasks = dbProxy.getArchiverCurrentTasks(deviceName);
+
+                final ArchivingMessConfig archivingMessConfig = ArchivingMessConfig.basicObjectCreation();
+                for (AttributeLightMode mode : myCurrentTasks) {
+                    archivingMessConfig.add(mode);
+                }
+                if (myCurrentTasks.size() > 0) {
+                    logger.debug("retry for all attributes");
+                    launchStartArchivingTask(archivingMessConfig, false);
+
+                    result = SUCCEEDED;
+                } else {
+                    result = NA;
+                }
+            } catch (final ArchivingException t) {
+                final DevFailed devFailed = new DevFailed();
+                devFailed.initCause(t);
+                devFailed.setStackTrace(t.getStackTrace());
+
+                final String message = DBTools.getCompleteMessage(devFailed);
+                logger.warn("Failed during retry_for_all ():");
+                logger.warn(message);
+
+                result = FAILED;
+            }
+        }
+        return result;
+    }
+
+    private void computeLoads() {
+        final int[] loads = collectorFactory.factoryLoadAssessment();
+        scalarCharge = loads[0];
+        spectrumCharge = loads[1];
+        imageCharge = loads[2];
+    }
+
+    // =========================================================
+
+    /**
+     * Execute command "StopArchiveAtt" on device. Command that stops the
+     * archiving of an attibute. This command need an AttributeLightMode type
+     * object. An AttributeLightMode type object encapsulate all the
+     * informations needed to found the Collector in charge of the archiving of
+     * the specified attribute The informations needed are the type, the format,
+     * the writable property and the archiving mode
+     *
+     * @param argin the attribute on witch archiving must be stopped
+     */
+    // =========================================================
+    @Command(name = "StopArchiveAtt")
+    @StateMachine(deniedStates = {DeviceState.FAULT, DeviceState.RUNNING})
+    public void stopArchiveAtt(final String[] argin) throws DevFailed {
+        setRunning();
+        logger.debug("stop_archive_att - in");
+        try {
+            final String attributeName = argin[0];
+            // final AttributeLightMode attributeLightMode =
+            // AttributeLightMode.creationWithFullInformation(argin);
+            logger.debug("attribute: " + attributeName);
+            if ((dbProxy != null)
+                    && (koAttributes.containsKey(attributeName.toLowerCase()) || okAttributes.contains(attributeName
+                    .toLowerCase()))) {
+                // stop only if attribute is managed by this archiver
+                dbProxy.updateModeRecord(attributeName);
+                final HdbCollector hdbCollector = collectorFactory.get(attributeName);
+                if (hdbCollector != null) {
+                    hdbCollector.removeSource(attributeName);
+                }
+                koAttributes.remove(attributeName.toLowerCase());
+                okAttributes.remove(attributeName.toLowerCase());
+            } else {
+                DevFailedUtils.throwDevFailed(attributeName + " is not archived by this device");
+            }
+        } catch (final ArchivingException e) {
+            logger.error("stop failed", e);
+            e.printStackTrace();
+            throw e.toTangoException();
+        } finally {
+            computeLoads();
+            updateStateStatus();
+            logger.debug("stop_archive_att - out");
+        }
+    }
+
+    // =========================================================
+
+    /**
+     * Execute command "StateDetailed" on device. This command returns a
+     * detailed state of the device.
+     *
+     * @return The detailed state
+     */
+    // =========================================================
+    @Command(name = "StateDetailed")
+    public String stateDetailed() throws DevFailed {
+        logger.info("Entering state_detailed()");
+        final StringBuilder stringBuffer = new StringBuilder();
+        stringBuffer.append(TangoStateUtils.statusToString(koAttributes.keySet(), okAttributes));
+        stringBuffer.append(collectorFactory.factoryAssessment());
+        logger.info("Exiting state_detailed()");
+        return stringBuffer.toString();
+    }
+
+    public DeviceState getState() {
+        updateStateStatus();
+        return state;
+    }
+
+    public String getStatus() {
+        updateStateStatus();
+        return status;
+    }
+
+    public void setStatus(String status) {
+        this.status = status;
+    }
+
+    public void setState(DeviceState state) {
+        this.state = state;
+    }
+
+    private void setRunning() {
+        state = DeviceState.RUNNING;
+        status = "Starting archiving";
+    }
+
+    private void updateStateStatus() {
+        if (state != DeviceState.RUNNING && state != DeviceState.FAULT) {
+            if (koAttributes.isEmpty() && okAttributes.isEmpty()) {
+                state = DeviceState.OFF;
+                status = "No attributes to archive";
+            } else if (!koAttributes.isEmpty()) {
+                state = DeviceState.DISABLE;
+                status = statusToString(koAttributes.keySet(), okAttributes);
+            } else {
+                state = DeviceState.ON;
+                status = statusToString(koAttributes.keySet(), okAttributes);
+            }
+        }
+    }
+
+    private String statusToString(Set<String> koAttributes, Set<String> okAttributes) {
+        StringBuilder sb = new StringBuilder("- KO [");
+        Iterator i$ = koAttributes.iterator();
+
+        String okS;
+        while (i$.hasNext()) {
+            okS = (String) i$.next();
+            sb.append("\n").append(okS);
+        }
+
+        sb.append("]\n- OK [");
+        i$ = okAttributes.iterator();
+
+        while (i$.hasNext()) {
+            okS = (String) i$.next();
+            sb.append("\n").append(okS);
+        }
+
+        sb.append("]");
+        return sb.toString();
+    }
+
+    // =========================================================
+
+    private class StartArchivingRunnable implements Runnable {
+
+        private final ArchivingMessConfig archivingMessConfig;
+        private final boolean updateAMTTable;
+
+        public StartArchivingRunnable(final ArchivingMessConfig archivingMessConfig, final boolean updateAMTTable) {
+            this.archivingMessConfig = archivingMessConfig;
+            this.updateAMTTable = updateAMTTable;
+        }
+
+        @Override
+        public void run() {
+            try {
+                triggerArchiving(archivingMessConfig.toArray(), updateAMTTable);
+                state =DeviceState.ON;
+            } catch (final DevFailed devFailed) {
+                logArchivingError(devFailed, archivingMessConfig);
+            } finally {
+                updateStateStatus();
+            }
+        }
+    }
+
+    public void setReservedAttributes(String[] reservedAttributes) {
+        this.reservedAttributes = reservedAttributes;
+    }
+
+    public void setDedicated(boolean isDedicated) {
+        this.isDedicated = isDedicated;
+    }
+
+    public void setDeviceManager(DeviceManager deviceManager) {
+        this.deviceManager = deviceManager;
+        deviceName = deviceManager.getName();
+    }
+
+    public void setDbOnsConf(String dbOnsConf) {
+        this.dbOnsConf = dbOnsConf;
+    }
+
+    public void setDbTnsNames(String dbTnsNames) {
+        this.dbTnsNames = dbTnsNames;
+    }
+
+
+    public void setDbCnxInactivityTimeout(int dbCnxInactivityTimeout) {
+        this.dbCnxInactivityTimeout = dbCnxInactivityTimeout;
+    }
+
+    public void setRac(boolean isRac) {
+        this.isRac = isRac;
+    }
+
+    public void setDbPassword(String dbPassword) {
+        this.dbPassword = dbPassword;
+    }
+
+    public void setDbUser(String dbUser) {
+        this.dbUser = dbUser;
+    }
+
+    public void setDbSchema(String dbSchema) {
+        this.dbSchema = dbSchema;
+    }
+
+    public void setDbName(String dbName) {
+        this.dbName = dbName;
+    }
+
+    public void setDbHost(String dbHost) {
+        this.dbHost = dbHost;
+    }
+
+
+    public void setDbMinPoolSize(String dbMinPoolSize) {
+        this.dbMinPoolSize = dbMinPoolSize;
+    }
+
+    public void setDbMaxPoolSize(String dbMaxPoolSize) {
+        this.dbMaxPoolSize = dbMaxPoolSize;
+    }
+
+    public void setDbType(String dbType) {
+        this.dbType = dbType;
+    }
+
+   // public void setDynMngt(DynamicManager dynMngt) {
+    //    this.dynMngt = dynMngt;
+    //}
+
+    public void setDiaryPath(String diaryPath) {
+        this.diaryPath = diaryPath;
+    }
+
+    public void setDiaryLogLevel(String diaryLogLevel) {
+        this.diaryLogLevel = diaryLogLevel;
+    }
+
+    public void setHasDiary(boolean hasDiary) {
+        this.hasDiary = hasDiary;
+    }
+
+}
\ No newline at end of file
diff --git a/hdbarchiver/src/main/resources/application.properties b/hdbarchiver/src/main/resources/application.properties
new file mode 100644
index 0000000000000000000000000000000000000000..256553fd996bcf6edfc00d2799b25e9767957e5d
--- /dev/null
+++ b/hdbarchiver/src/main/resources/application.properties
@@ -0,0 +1,5 @@
+#application properties
+project.name=${project.name}
+project.version=${project.version}
+build.date=${buildNumber}
+
diff --git a/hdbarchiver/src/main/resources/logback.xml b/hdbarchiver/src/main/resources/logback.xml
new file mode 100644
index 0000000000000000000000000000000000000000..16a599ca13875bf7626b5f9f3f795560232e6150
--- /dev/null
+++ b/hdbarchiver/src/main/resources/logback.xml
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<configuration>
+	<appender name="CONSOLE" class="ch.qos.logback.core.ConsoleAppender">
+		<layout class="ch.qos.logback.classic.PatternLayout">
+			<pattern>%-5level %d{HH:mm:ss.SSS} [%thread - %X{deviceName}] %logger{36}.%M:%L - %msg%n</pattern>
+		</layout>
+	</appender>
+	<logger name="org.jacorb" level="ERROR" />
+	<logger name="org.tango" level="INFO" />
+	<logger name="org.tango.archiving.server" level="DEBUG" />
+	<logger name="fr.soleil.lib" level="DEBUG" />
+	<logger name="TangoClientRequests" level="ERROR" />
+	<logger name="fr.soleil.archiving" level="INFO" />
+	<root level="INFO">
+		<appender-ref ref="CONSOLE" />
+	</root>
+</configuration>
\ No newline at end of file
diff --git a/hdbextractor/pom.xml b/hdbextractor/pom.xml
new file mode 100644
index 0000000000000000000000000000000000000000..76eb7f941dcf344e6193f354353ffa814d61db66
--- /dev/null
+++ b/hdbextractor/pom.xml
@@ -0,0 +1,40 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"
+  xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+  <modelVersion>4.0.0</modelVersion>
+
+  <parent>
+    <groupId>fr.soleil.deviceservers</groupId>
+    <artifactId>historicalarchivingservers</artifactId>
+    <version>2.6.1</version>
+  </parent>
+
+  <groupId>fr.soleil.deviceservers</groupId>
+  <artifactId>hdbextractor</artifactId>
+
+  <developers>
+    <developer>
+      <id>girardot</id>
+      <name>Raphaël GIRARDOT</name>
+      <email>raphael.girardot@synchrotron-soleil.fr</email>
+      <organization>Synchrotron Soleil</organization>
+      <organizationUrl>http://www.synchrotron-soleil.fr</organizationUrl>
+      <roles>
+        <role>Java Developer</role>
+      </roles>
+      <timezone>1</timezone>
+    </developer>
+  </developers>
+
+  <dependencies>
+    <dependency>
+      <artifactId>log4j</artifactId>
+      <groupId>log4j</groupId>
+    </dependency>
+  </dependencies>
+
+  <properties>
+    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
+  </properties>
+
+</project>
diff --git a/src/main/java/HdbExtractor/ExtractBetweenDatesClass.java b/hdbextractor/src/main/java/HdbExtractor/ExtractBetweenDatesClass.java
similarity index 100%
rename from src/main/java/HdbExtractor/ExtractBetweenDatesClass.java
rename to hdbextractor/src/main/java/HdbExtractor/ExtractBetweenDatesClass.java
diff --git a/src/main/java/HdbExtractor/GetArchivingModeClass.java b/hdbextractor/src/main/java/HdbExtractor/GetArchivingModeClass.java
similarity index 96%
rename from src/main/java/HdbExtractor/GetArchivingModeClass.java
rename to hdbextractor/src/main/java/HdbExtractor/GetArchivingModeClass.java
index 48e1667caa0a314285e529317983a957c9bd266d..087c577de31559e7d3610b638e556bcd31d1e781 100644
--- a/src/main/java/HdbExtractor/GetArchivingModeClass.java
+++ b/hdbextractor/src/main/java/HdbExtractor/GetArchivingModeClass.java
@@ -1,151 +1,151 @@
-//+======================================================================
-// $Source: /cvsroot/tango-cs/tango/jserver/archiving/HdbExtractor/GetArchivingModeClass.java,v $
-//
-// Project:      Tango Device Server
-//
-// Description:  Java source code for the command TemplateClass of the
-//               HdbExtractor class.
-//
-// $Author: chinkumo $
-//
-// $Revision: 1.3 $
-//
-// $Log: GetArchivingModeClass.java,v $
-// Revision 1.3  2005/11/29 16:17:37  chinkumo
-// Code reformated (pogo compatible)
-//
-// Revision 1.2  2005/11/15 13:45:51  chinkumo
-// ...
-//
-// Revision 1.1  2005/09/09 10:03:21  chinkumo
-// First commit !
-// (Dynamic attribut release)
-//
-//
-// copyleft :    European Synchrotron Radiation Facility
-//               BP 220, Grenoble 38043
-//               FRANCE
-//
-//-======================================================================
-//
-//  		This file is generated by POGO
-//	(Program Obviously used to Generate tango Object)
-//
-//         (c) - Software Engineering Group - ESRF
-//=============================================================================
-
-/**
- * @author	$Author: chinkumo $
- * @version	$Revision: 1.3 $
- */
-package HdbExtractor;
-
-import org.omg.CORBA.Any;
-
-import fr.esrf.Tango.DevFailed;
-import fr.esrf.Tango.DispLevel;
-import fr.esrf.TangoDs.Command;
-import fr.esrf.TangoDs.DeviceImpl;
-import fr.esrf.TangoDs.Except;
-import fr.esrf.TangoDs.TangoConst;
-import fr.esrf.TangoDs.Util;
-
-/**
- * Class Description: Gets the archiving mode used for the specified attribute.
- */
-
-public class GetArchivingModeClass extends Command implements TangoConst {
-	// ===============================================================
-	/**
-	 * Constructor for Command class GetArchivingModeClass
-	 * 
-	 * @param name
-	 *            command name
-	 * @param in
-	 *            argin type
-	 * @param out
-	 *            argout type
-	 */
-	// ===============================================================
-	public GetArchivingModeClass(final String name, final int in, final int out) {
-		super(name, in, out);
-	}
-
-	// ===============================================================
-	/**
-	 * Constructor for Command class GetArchivingModeClass
-	 * 
-	 * @param name
-	 *            command name
-	 * @param in
-	 *            argin type
-	 * @param in_comments
-	 *            argin description
-	 * @param out
-	 *            argout type
-	 * @param out_comments
-	 *            argout description
-	 */
-	// ===============================================================
-	public GetArchivingModeClass(final String name, final int in, final int out, final String in_comments, final String out_comments) {
-		super(name, in, out, in_comments, out_comments);
-	}
-
-	// ===============================================================
-	/**
-	 * Constructor for Command class GetArchivingModeClass
-	 * 
-	 * @param name
-	 *            command name
-	 * @param in
-	 *            argin type
-	 * @param in_comments
-	 *            argin description
-	 * @param out
-	 *            argout type
-	 * @param out_comments
-	 *            argout description
-	 * @param level
-	 *            The command display type OPERATOR or EXPERT
-	 */
-	// ===============================================================
-	public GetArchivingModeClass(final String name, final int in, final int out, final String in_comments, final String out_comments, final DispLevel level) {
-		super(name, in, out, in_comments, out_comments, level);
-	}
-
-	// ===============================================================
-	/**
-	 * return the result of the device's command.
-	 */
-	// ===============================================================
-	@Override
-	public Any execute(final DeviceImpl device, final Any in_any) throws DevFailed {
-		Util.out2.println("GetArchivingModeClass.execute(): arrived");
-		final String argin = extract_DevString(in_any);
-
-		if (!(device instanceof HdbExtractor)) {
-			Except.throw_exception("DEVICE_ERROR", "Device parameter is not instance of HdbExtractor", "HdbExtractor");
-		}
-		return insert(((HdbExtractor) device).get_archiving_mode(argin));
-	}
-
-	// ===============================================================
-	/**
-	 * Check if it is allowed to execute the command.
-	 */
-	// ===============================================================
-	@Override
-	public boolean is_allowed(final DeviceImpl device, final Any data_in) {
-		// End of Generated Code
-
-		// Re-Start of Generated Code
-		return true;
-	}
-}
-
-// -----------------------------------------------------------------------------
-/*
- * end of $Source:
- * /cvsroot/tango-cs/tango/jserver/archiving/HdbExtractor/GetArchivingModeClass
- * .java,v $
- */
+//+======================================================================
+// $Source: /cvsroot/tango-cs/tango/jserver/archiving/HdbExtractor/GetArchivingModeClass.java,v $
+//
+// Project:      Tango Device Server
+//
+// Description:  Java source code for the command TemplateClass of the
+//               HdbExtractor class.
+//
+// $Author: chinkumo $
+//
+// $Revision: 1.3 $
+//
+// $Log: GetArchivingModeClass.java,v $
+// Revision 1.3  2005/11/29 16:17:37  chinkumo
+// Code reformated (pogo compatible)
+//
+// Revision 1.2  2005/11/15 13:45:51  chinkumo
+// ...
+//
+// Revision 1.1  2005/09/09 10:03:21  chinkumo
+// First commit !
+// (Dynamic attribut release)
+//
+//
+// copyleft :    European Synchrotron Radiation Facility
+//               BP 220, Grenoble 38043
+//               FRANCE
+//
+//-======================================================================
+//
+//  		This file is generated by POGO
+//	(Program Obviously used to Generate tango Object)
+//
+//         (c) - Software Engineering Group - ESRF
+//=============================================================================
+
+/**
+ * @author	$Author: chinkumo $
+ * @version	$Revision: 1.3 $
+ */
+package HdbExtractor;
+
+import org.omg.CORBA.Any;
+
+import fr.esrf.Tango.DevFailed;
+import fr.esrf.Tango.DispLevel;
+import fr.esrf.TangoDs.Command;
+import fr.esrf.TangoDs.DeviceImpl;
+import fr.esrf.TangoDs.Except;
+import fr.esrf.TangoDs.TangoConst;
+import fr.esrf.TangoDs.Util;
+
+/**
+ * Class Description: Gets the archiving mode used for the specified attribute.
+ */
+
+public class GetArchivingModeClass extends Command implements TangoConst {
+	// ===============================================================
+	/**
+	 * Constructor for Command class GetArchivingModeClass
+	 * 
+	 * @param name
+	 *            command name
+	 * @param in
+	 *            argin type
+	 * @param out
+	 *            argout type
+	 */
+	// ===============================================================
+	public GetArchivingModeClass(final String name, final int in, final int out) {
+		super(name, in, out);
+	}
+
+	// ===============================================================
+	/**
+	 * Constructor for Command class GetArchivingModeClass
+	 * 
+	 * @param name
+	 *            command name
+	 * @param in
+	 *            argin type
+	 * @param in_comments
+	 *            argin description
+	 * @param out
+	 *            argout type
+	 * @param out_comments
+	 *            argout description
+	 */
+	// ===============================================================
+	public GetArchivingModeClass(final String name, final int in, final int out, final String in_comments, final String out_comments) {
+		super(name, in, out, in_comments, out_comments);
+	}
+
+	// ===============================================================
+	/**
+	 * Constructor for Command class GetArchivingModeClass
+	 * 
+	 * @param name
+	 *            command name
+	 * @param in
+	 *            argin type
+	 * @param in_comments
+	 *            argin description
+	 * @param out
+	 *            argout type
+	 * @param out_comments
+	 *            argout description
+	 * @param level
+	 *            The command display type OPERATOR or EXPERT
+	 */
+	// ===============================================================
+	public GetArchivingModeClass(final String name, final int in, final int out, final String in_comments, final String out_comments, final DispLevel level) {
+		super(name, in, out, in_comments, out_comments, level);
+	}
+
+	// ===============================================================
+	/**
+	 * return the result of the device's command.
+	 */
+	// ===============================================================
+	@Override
+	public Any execute(final DeviceImpl device, final Any in_any) throws DevFailed {
+		Util.out2.println("GetArchivingModeClass.execute(): arrived");
+		final String argin = extract_DevString(in_any);
+
+		if (!(device instanceof HdbExtractor)) {
+			Except.throw_exception("DEVICE_ERROR", "Device parameter is not instance of HdbExtractor", "HdbExtractor");
+		}
+		return insert(((HdbExtractor) device).get_archiving_mode(argin));
+	}
+
+	// ===============================================================
+	/**
+	 * Check if it is allowed to execute the command.
+	 */
+	// ===============================================================
+	@Override
+	public boolean is_allowed(final DeviceImpl device, final Any data_in) {
+		// End of Generated Code
+
+		// Re-Start of Generated Code
+		return true;
+	}
+}
+
+// -----------------------------------------------------------------------------
+/*
+ * end of $Source:
+ * /cvsroot/tango-cs/tango/jserver/archiving/HdbExtractor/GetArchivingModeClass
+ * .java,v $
+ */
diff --git a/src/main/java/HdbExtractor/GetAttCountAllClass.java b/hdbextractor/src/main/java/HdbExtractor/GetAttCountAllClass.java
similarity index 96%
rename from src/main/java/HdbExtractor/GetAttCountAllClass.java
rename to hdbextractor/src/main/java/HdbExtractor/GetAttCountAllClass.java
index f1ee91f01f68683a70cd948336563fcbbc8d110c..1945c03a64b4e5035674680696a0794ac6ae66ba 100644
--- a/src/main/java/HdbExtractor/GetAttCountAllClass.java
+++ b/hdbextractor/src/main/java/HdbExtractor/GetAttCountAllClass.java
@@ -1,150 +1,150 @@
-//+======================================================================
-// $Source: /cvsroot/tango-cs/tango/jserver/archiving/HdbExtractor/GetAttCountAllClass.java,v $
-//
-// Project:      Tango Device Server
-//
-// Description:  Java source code for the command TemplateClass of the
-//               HdbExtractor class.
-//
-// $Author: chinkumo $
-//
-// $Revision: 1.3 $
-//
-// $Log: GetAttCountAllClass.java,v $
-// Revision 1.3  2005/11/29 16:17:37  chinkumo
-// Code reformated (pogo compatible)
-//
-// Revision 1.2  2005/11/15 13:45:51  chinkumo
-// ...
-//
-// Revision 1.1  2005/09/09 10:03:21  chinkumo
-// First commit !
-// (Dynamic attribut release)
-//
-//
-// copyleft :    European Synchrotron Radiation Facility
-//               BP 220, Grenoble 38043
-//               FRANCE
-//
-//-======================================================================
-//
-//  		This file is generated by POGO
-//	(Program Obviously used to Generate tango Object)
-//
-//         (c) - Software Engineering Group - ESRF
-//=============================================================================
-
-/**
- * @author	$Author: chinkumo $
- * @version	$Revision: 1.3 $
- */
-package HdbExtractor;
-
-import org.omg.CORBA.Any;
-
-import fr.esrf.Tango.DevFailed;
-import fr.esrf.Tango.DispLevel;
-import fr.esrf.TangoDs.Command;
-import fr.esrf.TangoDs.DeviceImpl;
-import fr.esrf.TangoDs.Except;
-import fr.esrf.TangoDs.TangoConst;
-import fr.esrf.TangoDs.Util;
-
-/**
- * Class Description: Gets the total number of attributes defined in HDB.
- */
-
-public class GetAttCountAllClass extends Command implements TangoConst {
-	// ===============================================================
-	/**
-	 * Constructor for Command class GetAttCountAllClass
-	 * 
-	 * @param name
-	 *            command name
-	 * @param in
-	 *            argin type
-	 * @param out
-	 *            argout type
-	 */
-	// ===============================================================
-	public GetAttCountAllClass(final String name, final int in, final int out) {
-		super(name, in, out);
-	}
-
-	// ===============================================================
-	/**
-	 * Constructor for Command class GetAttCountAllClass
-	 * 
-	 * @param name
-	 *            command name
-	 * @param in
-	 *            argin type
-	 * @param in_comments
-	 *            argin description
-	 * @param out
-	 *            argout type
-	 * @param out_comments
-	 *            argout description
-	 */
-	// ===============================================================
-	public GetAttCountAllClass(final String name, final int in, final int out, final String in_comments, final String out_comments) {
-		super(name, in, out, in_comments, out_comments);
-	}
-
-	// ===============================================================
-	/**
-	 * Constructor for Command class GetAttCountAllClass
-	 * 
-	 * @param name
-	 *            command name
-	 * @param in
-	 *            argin type
-	 * @param in_comments
-	 *            argin description
-	 * @param out
-	 *            argout type
-	 * @param out_comments
-	 *            argout description
-	 * @param level
-	 *            The command display type OPERATOR or EXPERT
-	 */
-	// ===============================================================
-	public GetAttCountAllClass(final String name, final int in, final int out, final String in_comments, final String out_comments, final DispLevel level) {
-		super(name, in, out, in_comments, out_comments, level);
-	}
-
-	// ===============================================================
-	/**
-	 * return the result of the device's command.
-	 */
-	// ===============================================================
-	@Override
-	public Any execute(final DeviceImpl device, final Any in_any) throws DevFailed {
-		Util.out2.println("GetAttCountAllClass.execute(): arrived");
-		if (!(device instanceof HdbExtractor)) {
-			Except.throw_exception("DEVICE_ERROR", "Device parameter is not instance of HdbExtractor", "HdbExtractor");
-		}
-
-		return insert(((HdbExtractor) device).get_att_count_all());
-	}
-
-	// ===============================================================
-	/**
-	 * Check if it is allowed to execute the command.
-	 */
-	// ===============================================================
-	@Override
-	public boolean is_allowed(final DeviceImpl device, final Any data_in) {
-		// End of Generated Code
-
-		// Re-Start of Generated Code
-		return true;
-	}
-}
-
-// -----------------------------------------------------------------------------
-/*
- * end of $Source:
- * /cvsroot/tango-cs/tango/jserver/archiving/HdbExtractor/GetAttCountAllClass
- * .java,v $
- */
+//+======================================================================
+// $Source: /cvsroot/tango-cs/tango/jserver/archiving/HdbExtractor/GetAttCountAllClass.java,v $
+//
+// Project:      Tango Device Server
+//
+// Description:  Java source code for the command TemplateClass of the
+//               HdbExtractor class.
+//
+// $Author: chinkumo $
+//
+// $Revision: 1.3 $
+//
+// $Log: GetAttCountAllClass.java,v $
+// Revision 1.3  2005/11/29 16:17:37  chinkumo
+// Code reformated (pogo compatible)
+//
+// Revision 1.2  2005/11/15 13:45:51  chinkumo
+// ...
+//
+// Revision 1.1  2005/09/09 10:03:21  chinkumo
+// First commit !
+// (Dynamic attribut release)
+//
+//
+// copyleft :    European Synchrotron Radiation Facility
+//               BP 220, Grenoble 38043
+//               FRANCE
+//
+//-======================================================================
+//
+//  		This file is generated by POGO
+//	(Program Obviously used to Generate tango Object)
+//
+//         (c) - Software Engineering Group - ESRF
+//=============================================================================
+
+/**
+ * @author	$Author: chinkumo $
+ * @version	$Revision: 1.3 $
+ */
+package HdbExtractor;
+
+import org.omg.CORBA.Any;
+
+import fr.esrf.Tango.DevFailed;
+import fr.esrf.Tango.DispLevel;
+import fr.esrf.TangoDs.Command;
+import fr.esrf.TangoDs.DeviceImpl;
+import fr.esrf.TangoDs.Except;
+import fr.esrf.TangoDs.TangoConst;
+import fr.esrf.TangoDs.Util;
+
+/**
+ * Class Description: Gets the total number of attributes defined in HDB.
+ */
+
+public class GetAttCountAllClass extends Command implements TangoConst {
+	// ===============================================================
+	/**
+	 * Constructor for Command class GetAttCountAllClass
+	 * 
+	 * @param name
+	 *            command name
+	 * @param in
+	 *            argin type
+	 * @param out
+	 *            argout type
+	 */
+	// ===============================================================
+	public GetAttCountAllClass(final String name, final int in, final int out) {
+		super(name, in, out);
+	}
+
+	// ===============================================================
+	/**
+	 * Constructor for Command class GetAttCountAllClass
+	 * 
+	 * @param name
+	 *            command name
+	 * @param in
+	 *            argin type
+	 * @param in_comments
+	 *            argin description
+	 * @param out
+	 *            argout type
+	 * @param out_comments
+	 *            argout description
+	 */
+	// ===============================================================
+	public GetAttCountAllClass(final String name, final int in, final int out, final String in_comments, final String out_comments) {
+		super(name, in, out, in_comments, out_comments);
+	}
+
+	// ===============================================================
+	/**
+	 * Constructor for Command class GetAttCountAllClass
+	 * 
+	 * @param name
+	 *            command name
+	 * @param in
+	 *            argin type
+	 * @param in_comments
+	 *            argin description
+	 * @param out
+	 *            argout type
+	 * @param out_comments
+	 *            argout description
+	 * @param level
+	 *            The command display type OPERATOR or EXPERT
+	 */
+	// ===============================================================
+	public GetAttCountAllClass(final String name, final int in, final int out, final String in_comments, final String out_comments, final DispLevel level) {
+		super(name, in, out, in_comments, out_comments, level);
+	}
+
+	// ===============================================================
+	/**
+	 * return the result of the device's command.
+	 */
+	// ===============================================================
+	@Override
+	public Any execute(final DeviceImpl device, final Any in_any) throws DevFailed {
+		Util.out2.println("GetAttCountAllClass.execute(): arrived");
+		if (!(device instanceof HdbExtractor)) {
+			Except.throw_exception("DEVICE_ERROR", "Device parameter is not instance of HdbExtractor", "HdbExtractor");
+		}
+
+		return insert(((HdbExtractor) device).get_att_count_all());
+	}
+
+	// ===============================================================
+	/**
+	 * Check if it is allowed to execute the command.
+	 */
+	// ===============================================================
+	@Override
+	public boolean is_allowed(final DeviceImpl device, final Any data_in) {
+		// End of Generated Code
+
+		// Re-Start of Generated Code
+		return true;
+	}
+}
+
+// -----------------------------------------------------------------------------
+/*
+ * end of $Source:
+ * /cvsroot/tango-cs/tango/jserver/archiving/HdbExtractor/GetAttCountAllClass
+ * .java,v $
+ */
diff --git a/src/main/java/HdbExtractor/GetAttCountFilterFormatClass.java b/hdbextractor/src/main/java/HdbExtractor/GetAttCountFilterFormatClass.java
similarity index 96%
rename from src/main/java/HdbExtractor/GetAttCountFilterFormatClass.java
rename to hdbextractor/src/main/java/HdbExtractor/GetAttCountFilterFormatClass.java
index b8cbdab97999671197847083c9ec572395728ad3..f65022e935924fd3496b6fd8f2b55f901beb8737 100644
--- a/src/main/java/HdbExtractor/GetAttCountFilterFormatClass.java
+++ b/hdbextractor/src/main/java/HdbExtractor/GetAttCountFilterFormatClass.java
@@ -1,152 +1,152 @@
-//+======================================================================
-// $Source: /cvsroot/tango-cs/tango/jserver/archiving/HdbExtractor/GetAttCountFilterFormatClass.java,v $
-//
-// Project:      Tango Device Server
-//
-// Description:  Java source code for the command TemplateClass of the
-//               HdbExtractor class.
-//
-// $Author: chinkumo $
-//
-// $Revision: 1.3 $
-//
-// $Log: GetAttCountFilterFormatClass.java,v $
-// Revision 1.3  2005/11/29 16:17:37  chinkumo
-// Code reformated (pogo compatible)
-//
-// Revision 1.2  2005/11/15 13:45:51  chinkumo
-// ...
-//
-// Revision 1.1  2005/09/09 10:03:21  chinkumo
-// First commit !
-// (Dynamic attribut release)
-//
-//
-// copyleft :    European Synchrotron Radiation Facility
-//               BP 220, Grenoble 38043
-//               FRANCE
-//
-//-======================================================================
-//
-//  		This file is generated by POGO
-//	(Program Obviously used to Generate tango Object)
-//
-//         (c) - Software Engineering Group - ESRF
-//=============================================================================
-
-/**
- * @author	$Author: chinkumo $
- * @version	$Revision: 1.3 $
- */
-package HdbExtractor;
-
-import org.omg.CORBA.Any;
-
-import fr.esrf.Tango.DevFailed;
-import fr.esrf.Tango.DispLevel;
-import fr.esrf.TangoDs.Command;
-import fr.esrf.TangoDs.DeviceImpl;
-import fr.esrf.TangoDs.Except;
-import fr.esrf.TangoDs.TangoConst;
-import fr.esrf.TangoDs.Util;
-
-/**
- * Class Description: Gets the total number of attributes defined in HDB with
- * the given format.
- */
-
-public class GetAttCountFilterFormatClass extends Command implements TangoConst {
-	// ===============================================================
-	/**
-	 * Constructor for Command class GetAttCountFilterFormatClass
-	 * 
-	 * @param name
-	 *            command name
-	 * @param in
-	 *            argin type
-	 * @param out
-	 *            argout type
-	 */
-	// ===============================================================
-	public GetAttCountFilterFormatClass(final String name, final int in, final int out) {
-		super(name, in, out);
-	}
-
-	// ===============================================================
-	/**
-	 * Constructor for Command class GetAttCountFilterFormatClass
-	 * 
-	 * @param name
-	 *            command name
-	 * @param in
-	 *            argin type
-	 * @param in_comments
-	 *            argin description
-	 * @param out
-	 *            argout type
-	 * @param out_comments
-	 *            argout description
-	 */
-	// ===============================================================
-	public GetAttCountFilterFormatClass(final String name, final int in, final int out, final String in_comments, final String out_comments) {
-		super(name, in, out, in_comments, out_comments);
-	}
-
-	// ===============================================================
-	/**
-	 * Constructor for Command class GetAttCountFilterFormatClass
-	 * 
-	 * @param name
-	 *            command name
-	 * @param in
-	 *            argin type
-	 * @param in_comments
-	 *            argin description
-	 * @param out
-	 *            argout type
-	 * @param out_comments
-	 *            argout description
-	 * @param level
-	 *            The command display type OPERATOR or EXPERT
-	 */
-	// ===============================================================
-	public GetAttCountFilterFormatClass(final String name, final int in, final int out, final String in_comments, final String out_comments, final DispLevel level) {
-		super(name, in, out, in_comments, out_comments, level);
-	}
-
-	// ===============================================================
-	/**
-	 * return the result of the device's command.
-	 */
-	// ===============================================================
-	@Override
-	public Any execute(final DeviceImpl device, final Any in_any) throws DevFailed {
-		Util.out2.println("GetAttCountFilterFormatClass.execute(): arrived");
-		final short argin = extract_DevShort(in_any);
-
-		if (!(device instanceof HdbExtractor)) {
-			Except.throw_exception("DEVICE_ERROR", "Device parameter is not instance of HdbExtractor", "HdbExtractor");
-		}
-
-		return insert(((HdbExtractor) device).get_att_count_filter_format(argin));
-	}
-
-	// ===============================================================
-	/**
-	 * Check if it is allowed to execute the command.
-	 */
-	// ===============================================================
-	@Override
-	public boolean is_allowed(final DeviceImpl device, final Any data_in) {
-		// End of Generated Code
-
-		// Re-Start of Generated Code
-		return true;
-	}
-}
-
-// -----------------------------------------------------------------------------
-/*
- * end of $Source:/cvsroot/tango-cs/tango/jserver/archiving/HdbExtractor/
- * GetAttCountFilterFormatClass.java,v $
- */
+//+======================================================================
+// $Source: /cvsroot/tango-cs/tango/jserver/archiving/HdbExtractor/GetAttCountFilterFormatClass.java,v $
+//
+// Project:      Tango Device Server
+//
+// Description:  Java source code for the command TemplateClass of the
+//               HdbExtractor class.
+//
+// $Author: chinkumo $
+//
+// $Revision: 1.3 $
+//
+// $Log: GetAttCountFilterFormatClass.java,v $
+// Revision 1.3  2005/11/29 16:17:37  chinkumo
+// Code reformated (pogo compatible)
+//
+// Revision 1.2  2005/11/15 13:45:51  chinkumo
+// ...
+//
+// Revision 1.1  2005/09/09 10:03:21  chinkumo
+// First commit !
+// (Dynamic attribut release)
+//
+//
+// copyleft :    European Synchrotron Radiation Facility
+//               BP 220, Grenoble 38043
+//               FRANCE
+//
+//-======================================================================
+//
+//  		This file is generated by POGO
+//	(Program Obviously used to Generate tango Object)
+//
+//         (c) - Software Engineering Group - ESRF
+//=============================================================================
+
+/**
+ * @author	$Author: chinkumo $
+ * @version	$Revision: 1.3 $
+ */
+package HdbExtractor;
+
+import org.omg.CORBA.Any;
+
+import fr.esrf.Tango.DevFailed;
+import fr.esrf.Tango.DispLevel;
+import fr.esrf.TangoDs.Command;
+import fr.esrf.TangoDs.DeviceImpl;
+import fr.esrf.TangoDs.Except;
+import fr.esrf.TangoDs.TangoConst;
+import fr.esrf.TangoDs.Util;
+
+/**
+ * Class Description: Gets the total number of attributes defined in HDB with
+ * the given format.
+ */
+
+public class GetAttCountFilterFormatClass extends Command implements TangoConst {
+	// ===============================================================
+	/**
+	 * Constructor for Command class GetAttCountFilterFormatClass
+	 * 
+	 * @param name
+	 *            command name
+	 * @param in
+	 *            argin type
+	 * @param out
+	 *            argout type
+	 */
+	// ===============================================================
+	public GetAttCountFilterFormatClass(final String name, final int in, final int out) {
+		super(name, in, out);
+	}
+
+	// ===============================================================
+	/**
+	 * Constructor for Command class GetAttCountFilterFormatClass
+	 * 
+	 * @param name
+	 *            command name
+	 * @param in
+	 *            argin type
+	 * @param in_comments
+	 *            argin description
+	 * @param out
+	 *            argout type
+	 * @param out_comments
+	 *            argout description
+	 */
+	// ===============================================================
+	public GetAttCountFilterFormatClass(final String name, final int in, final int out, final String in_comments, final String out_comments) {
+		super(name, in, out, in_comments, out_comments);
+	}
+
+	// ===============================================================
+	/**
+	 * Constructor for Command class GetAttCountFilterFormatClass
+	 * 
+	 * @param name
+	 *            command name
+	 * @param in
+	 *            argin type
+	 * @param in_comments
+	 *            argin description
+	 * @param out
+	 *            argout type
+	 * @param out_comments
+	 *            argout description
+	 * @param level
+	 *            The command display type OPERATOR or EXPERT
+	 */
+	// ===============================================================
+	public GetAttCountFilterFormatClass(final String name, final int in, final int out, final String in_comments, final String out_comments, final DispLevel level) {
+		super(name, in, out, in_comments, out_comments, level);
+	}
+
+	// ===============================================================
+	/**
+	 * return the result of the device's command.
+	 */
+	// ===============================================================
+	@Override
+	public Any execute(final DeviceImpl device, final Any in_any) throws DevFailed {
+		Util.out2.println("GetAttCountFilterFormatClass.execute(): arrived");
+		final short argin = extract_DevShort(in_any);
+
+		if (!(device instanceof HdbExtractor)) {
+			Except.throw_exception("DEVICE_ERROR", "Device parameter is not instance of HdbExtractor", "HdbExtractor");
+		}
+
+		return insert(((HdbExtractor) device).get_att_count_filter_format(argin));
+	}
+
+	// ===============================================================
+	/**
+	 * Check if it is allowed to execute the command.
+	 */
+	// ===============================================================
+	@Override
+	public boolean is_allowed(final DeviceImpl device, final Any data_in) {
+		// End of Generated Code
+
+		// Re-Start of Generated Code
+		return true;
+	}
+}
+
+// -----------------------------------------------------------------------------
+/*
+ * end of $Source:/cvsroot/tango-cs/tango/jserver/archiving/HdbExtractor/
+ * GetAttCountFilterFormatClass.java,v $
+ */
diff --git a/src/main/java/HdbExtractor/GetAttCountFilterTypeClass.java b/hdbextractor/src/main/java/HdbExtractor/GetAttCountFilterTypeClass.java
similarity index 96%
rename from src/main/java/HdbExtractor/GetAttCountFilterTypeClass.java
rename to hdbextractor/src/main/java/HdbExtractor/GetAttCountFilterTypeClass.java
index b3642dc08c8b66feb359a9941c35624150e400e0..efaa5ffe0ffdf53892c9c3f51a9bf9cc10f1e16e 100644
--- a/src/main/java/HdbExtractor/GetAttCountFilterTypeClass.java
+++ b/hdbextractor/src/main/java/HdbExtractor/GetAttCountFilterTypeClass.java
@@ -1,153 +1,153 @@
-//+======================================================================
-// $Source: /cvsroot/tango-cs/tango/jserver/archiving/HdbExtractor/GetAttCountFilterTypeClass.java,v $
-//
-// Project:      Tango Device Server
-//
-// Description:  Java source code for the command TemplateClass of the
-//               HdbExtractor class.
-//
-// $Author: chinkumo $
-//
-// $Revision: 1.3 $
-//
-// $Log: GetAttCountFilterTypeClass.java,v $
-// Revision 1.3  2005/11/29 16:17:37  chinkumo
-// Code reformated (pogo compatible)
-//
-// Revision 1.2  2005/11/15 13:45:51  chinkumo
-// ...
-//
-// Revision 1.1  2005/09/09 10:03:21  chinkumo
-// First commit !
-// (Dynamic attribut release)
-//
-//
-// copyleft :    European Synchrotron Radiation Facility
-//               BP 220, Grenoble 38043
-//               FRANCE
-//
-//-======================================================================
-//
-//  		This file is generated by POGO
-//	(Program Obviously used to Generate tango Object)
-//
-//         (c) - Software Engineering Group - ESRF
-//=============================================================================
-
-/**
- * @author	$Author: chinkumo $
- * @version	$Revision: 1.3 $
- */
-package HdbExtractor;
-
-import org.omg.CORBA.Any;
-
-import fr.esrf.Tango.DevFailed;
-import fr.esrf.Tango.DispLevel;
-import fr.esrf.TangoDs.Command;
-import fr.esrf.TangoDs.DeviceImpl;
-import fr.esrf.TangoDs.Except;
-import fr.esrf.TangoDs.TangoConst;
-import fr.esrf.TangoDs.Util;
-
-/**
- * Class Description: Gets the total number of attributes defined in HDB with
- * the given type.
- */
-
-public class GetAttCountFilterTypeClass extends Command implements TangoConst {
-	// ===============================================================
-	/**
-	 * Constructor for Command class GetAttCountFilterTypeClass
-	 * 
-	 * @param name
-	 *            command name
-	 * @param in
-	 *            argin type
-	 * @param out
-	 *            argout type
-	 */
-	// ===============================================================
-	public GetAttCountFilterTypeClass(final String name, final int in, final int out) {
-		super(name, in, out);
-	}
-
-	// ===============================================================
-	/**
-	 * Constructor for Command class GetAttCountFilterTypeClass
-	 * 
-	 * @param name
-	 *            command name
-	 * @param in
-	 *            argin type
-	 * @param in_comments
-	 *            argin description
-	 * @param out
-	 *            argout type
-	 * @param out_comments
-	 *            argout description
-	 */
-	// ===============================================================
-	public GetAttCountFilterTypeClass(final String name, final int in, final int out, final String in_comments, final String out_comments) {
-		super(name, in, out, in_comments, out_comments);
-	}
-
-	// ===============================================================
-	/**
-	 * Constructor for Command class GetAttCountFilterTypeClass
-	 * 
-	 * @param name
-	 *            command name
-	 * @param in
-	 *            argin type
-	 * @param in_comments
-	 *            argin description
-	 * @param out
-	 *            argout type
-	 * @param out_comments
-	 *            argout description
-	 * @param level
-	 *            The command display type OPERATOR or EXPERT
-	 */
-	// ===============================================================
-	public GetAttCountFilterTypeClass(final String name, final int in, final int out, final String in_comments, final String out_comments, final DispLevel level) {
-		super(name, in, out, in_comments, out_comments, level);
-	}
-
-	// ===============================================================
-	/**
-	 * return the result of the device's command.
-	 */
-	// ===============================================================
-	@Override
-	public Any execute(final DeviceImpl device, final Any in_any) throws DevFailed {
-		Util.out2.println("GetAttCountFilterTypeClass.execute(): arrived");
-		final short argin = extract_DevShort(in_any);
-
-		if (!(device instanceof HdbExtractor)) {
-			Except.throw_exception("DEVICE_ERROR", "Device parameter is not instance of HdbExtractor", "HdbExtractor");
-		}
-
-		return insert(((HdbExtractor) device).get_att_count_filter_type(argin));
-	}
-
-	// ===============================================================
-	/**
-	 * Check if it is allowed to execute the command.
-	 */
-	// ===============================================================
-	@Override
-	public boolean is_allowed(final DeviceImpl device, final Any data_in) {
-		// End of Generated Code
-
-		// Re-Start of Generated Code
-		return true;
-	}
-}
-
-// -----------------------------------------------------------------------------
-/*
- * end of $Source:
- * /cvsroot/tango-cs/tango/jserver/archiving/HdbExtractor/GetAttCountFilterTypeClass
- * .java,v $
- */
+//+======================================================================
+// $Source: /cvsroot/tango-cs/tango/jserver/archiving/HdbExtractor/GetAttCountFilterTypeClass.java,v $
+//
+// Project:      Tango Device Server
+//
+// Description:  Java source code for the command TemplateClass of the
+//               HdbExtractor class.
+//
+// $Author: chinkumo $
+//
+// $Revision: 1.3 $
+//
+// $Log: GetAttCountFilterTypeClass.java,v $
+// Revision 1.3  2005/11/29 16:17:37  chinkumo
+// Code reformated (pogo compatible)
+//
+// Revision 1.2  2005/11/15 13:45:51  chinkumo
+// ...
+//
+// Revision 1.1  2005/09/09 10:03:21  chinkumo
+// First commit !
+// (Dynamic attribut release)
+//
+//
+// copyleft :    European Synchrotron Radiation Facility
+//               BP 220, Grenoble 38043
+//               FRANCE
+//
+//-======================================================================
+//
+//  		This file is generated by POGO
+//	(Program Obviously used to Generate tango Object)
+//
+//         (c) - Software Engineering Group - ESRF
+//=============================================================================
+
+/**
+ * @author	$Author: chinkumo $
+ * @version	$Revision: 1.3 $
+ */
+package HdbExtractor;
+
+import org.omg.CORBA.Any;
+
+import fr.esrf.Tango.DevFailed;
+import fr.esrf.Tango.DispLevel;
+import fr.esrf.TangoDs.Command;
+import fr.esrf.TangoDs.DeviceImpl;
+import fr.esrf.TangoDs.Except;
+import fr.esrf.TangoDs.TangoConst;
+import fr.esrf.TangoDs.Util;
+
+/**
+ * Class Description: Gets the total number of attributes defined in HDB with
+ * the given type.
+ */
+
+public class GetAttCountFilterTypeClass extends Command implements TangoConst {
+	// ===============================================================
+	/**
+	 * Constructor for Command class GetAttCountFilterTypeClass
+	 * 
+	 * @param name
+	 *            command name
+	 * @param in
+	 *            argin type
+	 * @param out
+	 *            argout type
+	 */
+	// ===============================================================
+	public GetAttCountFilterTypeClass(final String name, final int in, final int out) {
+		super(name, in, out);
+	}
+
+	// ===============================================================
+	/**
+	 * Constructor for Command class GetAttCountFilterTypeClass
+	 * 
+	 * @param name
+	 *            command name
+	 * @param in
+	 *            argin type
+	 * @param in_comments
+	 *            argin description
+	 * @param out
+	 *            argout type
+	 * @param out_comments
+	 *            argout description
+	 */
+	// ===============================================================
+	public GetAttCountFilterTypeClass(final String name, final int in, final int out, final String in_comments, final String out_comments) {
+		super(name, in, out, in_comments, out_comments);
+	}
+
+	// ===============================================================
+	/**
+	 * Constructor for Command class GetAttCountFilterTypeClass
+	 * 
+	 * @param name
+	 *            command name
+	 * @param in
+	 *            argin type
+	 * @param in_comments
+	 *            argin description
+	 * @param out
+	 *            argout type
+	 * @param out_comments
+	 *            argout description
+	 * @param level
+	 *            The command display type OPERATOR or EXPERT
+	 */
+	// ===============================================================
+	public GetAttCountFilterTypeClass(final String name, final int in, final int out, final String in_comments, final String out_comments, final DispLevel level) {
+		super(name, in, out, in_comments, out_comments, level);
+	}
+
+	// ===============================================================
+	/**
+	 * return the result of the device's command.
+	 */
+	// ===============================================================
+	@Override
+	public Any execute(final DeviceImpl device, final Any in_any) throws DevFailed {
+		Util.out2.println("GetAttCountFilterTypeClass.execute(): arrived");
+		final short argin = extract_DevShort(in_any);
+
+		if (!(device instanceof HdbExtractor)) {
+			Except.throw_exception("DEVICE_ERROR", "Device parameter is not instance of HdbExtractor", "HdbExtractor");
+		}
+
+		return insert(((HdbExtractor) device).get_att_count_filter_type(argin));
+	}
+
+	// ===============================================================
+	/**
+	 * Check if it is allowed to execute the command.
+	 */
+	// ===============================================================
+	@Override
+	public boolean is_allowed(final DeviceImpl device, final Any data_in) {
+		// End of Generated Code
+
+		// Re-Start of Generated Code
+		return true;
+	}
+}
+
+// -----------------------------------------------------------------------------
+/*
+ * end of $Source:
+ * /cvsroot/tango-cs/tango/jserver/archiving/HdbExtractor/GetAttCountFilterTypeClass
+ * .java,v $
+ */
diff --git a/src/main/java/HdbExtractor/GetAttDataAvgBetweenDatesClass.java b/hdbextractor/src/main/java/HdbExtractor/GetAttDataAvgBetweenDatesClass.java
similarity index 96%
rename from src/main/java/HdbExtractor/GetAttDataAvgBetweenDatesClass.java
rename to hdbextractor/src/main/java/HdbExtractor/GetAttDataAvgBetweenDatesClass.java
index 74fc1ea1c3ad6c508866edfe5c2e914e737b3032..3364771cf22017bacabaa6399ff5b8fc1cd85a43 100644
--- a/src/main/java/HdbExtractor/GetAttDataAvgBetweenDatesClass.java
+++ b/hdbextractor/src/main/java/HdbExtractor/GetAttDataAvgBetweenDatesClass.java
@@ -1,152 +1,152 @@
-//+======================================================================
-// $Source: /cvsroot/tango-cs/tango/jserver/archiving/HdbExtractor/GetAttDataAvgBetweenDatesClass.java,v $
-//
-// Project:      Tango Device Server
-//
-// Description:  Java source code for the command TemplateClass of the
-//               HdbExtractor class.
-//
-// $Author: chinkumo $
-//
-// $Revision: 1.3 $
-//
-// $Log: GetAttDataAvgBetweenDatesClass.java,v $
-// Revision 1.3  2005/11/29 16:17:37  chinkumo
-// Code reformated (pogo compatible)
-//
-// Revision 1.2  2005/11/15 13:45:51  chinkumo
-// ...
-//
-// Revision 1.1  2005/09/09 10:03:21  chinkumo
-// First commit !
-// (Dynamic attribut release)
-//
-//
-// copyleft :    European Synchrotron Radiation Facility
-//               BP 220, Grenoble 38043
-//               FRANCE
-//
-//-======================================================================
-//
-//  		This file is generated by POGO
-//	(Program Obviously used to Generate tango Object)
-//
-//         (c) - Software Engineering Group - ESRF
-//=============================================================================
-
-/**
- * @author	$Author: chinkumo $
- * @version	$Revision: 1.3 $
- */
-package HdbExtractor;
-
-import org.omg.CORBA.Any;
-
-import fr.esrf.Tango.DevFailed;
-import fr.esrf.Tango.DispLevel;
-import fr.esrf.TangoDs.Command;
-import fr.esrf.TangoDs.DeviceImpl;
-import fr.esrf.TangoDs.Except;
-import fr.esrf.TangoDs.TangoConst;
-import fr.esrf.TangoDs.Util;
-
-/**
- * Class Description: Returns the average value generated by the given attribute
- * and between the two given dates.
- */
-
-public class GetAttDataAvgBetweenDatesClass extends Command implements TangoConst {
-	// ===============================================================
-	/**
-	 * Constructor for Command class GetAttDataAvgBetweenDatesClass
-	 * 
-	 * @param name
-	 *            command name
-	 * @param in
-	 *            argin type
-	 * @param out
-	 *            argout type
-	 */
-	// ===============================================================
-	public GetAttDataAvgBetweenDatesClass(final String name, final int in, final int out) {
-		super(name, in, out);
-	}
-
-	// ===============================================================
-	/**
-	 * Constructor for Command class GetAttDataAvgBetweenDatesClass
-	 * 
-	 * @param name
-	 *            command name
-	 * @param in
-	 *            argin type
-	 * @param in_comments
-	 *            argin description
-	 * @param out
-	 *            argout type
-	 * @param out_comments
-	 *            argout description
-	 */
-	// ===============================================================
-	public GetAttDataAvgBetweenDatesClass(final String name, final int in, final int out, final String in_comments, final String out_comments) {
-		super(name, in, out, in_comments, out_comments);
-	}
-
-	// ===============================================================
-	/**
-	 * Constructor for Command class GetAttDataAvgBetweenDatesClass
-	 * 
-	 * @param name
-	 *            command name
-	 * @param in
-	 *            argin type
-	 * @param in_comments
-	 *            argin description
-	 * @param out
-	 *            argout type
-	 * @param out_comments
-	 *            argout description
-	 * @param level
-	 *            The command display type OPERATOR or EXPERT
-	 */
-	// ===============================================================
-	public GetAttDataAvgBetweenDatesClass(final String name, final int in, final int out, final String in_comments, final String out_comments, final DispLevel level) {
-		super(name, in, out, in_comments, out_comments, level);
-	}
-
-	// ===============================================================
-	/**
-	 * return the result of the device's command.
-	 */
-	// ===============================================================
-	@Override
-	public Any execute(final DeviceImpl device, final Any in_any) throws DevFailed {
-		Util.out2.println("GetAttDataAvgBetweenDatesClass.execute(): arrived");
-		final String[] argin = extract_DevVarStringArray(in_any);
-
-		if (!(device instanceof HdbExtractor)) {
-			Except.throw_exception("DEVICE_ERROR", "Device parameter is not instance of HdbExtractor", "HdbExtractor");
-		}
-
-		return insert(((HdbExtractor) device).get_att_data_avg_between_dates(argin));
-	}
-
-	// ===============================================================
-	/**
-	 * Check if it is allowed to execute the command.
-	 */
-	// ===============================================================
-	@Override
-	public boolean is_allowed(final DeviceImpl device, final Any data_in) {
-		// End of Generated Code
-
-		// Re-Start of Generated Code
-		return true;
-	}
-}
-
-// -----------------------------------------------------------------------------
-/*
- * end of $Source:/cvsroot/tango-cs/tango/jserver/archiving/HdbExtractor/
- * GetAttDataAvgBetweenDatesClass.java,v $
- */
+//+======================================================================
+// $Source: /cvsroot/tango-cs/tango/jserver/archiving/HdbExtractor/GetAttDataAvgBetweenDatesClass.java,v $
+//
+// Project:      Tango Device Server
+//
+// Description:  Java source code for the command TemplateClass of the
+//               HdbExtractor class.
+//
+// $Author: chinkumo $
+//
+// $Revision: 1.3 $
+//
+// $Log: GetAttDataAvgBetweenDatesClass.java,v $
+// Revision 1.3  2005/11/29 16:17:37  chinkumo
+// Code reformated (pogo compatible)
+//
+// Revision 1.2  2005/11/15 13:45:51  chinkumo
+// ...
+//
+// Revision 1.1  2005/09/09 10:03:21  chinkumo
+// First commit !
+// (Dynamic attribut release)
+//
+//
+// copyleft :    European Synchrotron Radiation Facility
+//               BP 220, Grenoble 38043
+//               FRANCE
+//
+//-======================================================================
+//
+//  		This file is generated by POGO
+//	(Program Obviously used to Generate tango Object)
+//
+//         (c) - Software Engineering Group - ESRF
+//=============================================================================
+
+/**
+ * @author	$Author: chinkumo $
+ * @version	$Revision: 1.3 $
+ */
+package HdbExtractor;
+
+import org.omg.CORBA.Any;
+
+import fr.esrf.Tango.DevFailed;
+import fr.esrf.Tango.DispLevel;
+import fr.esrf.TangoDs.Command;
+import fr.esrf.TangoDs.DeviceImpl;
+import fr.esrf.TangoDs.Except;
+import fr.esrf.TangoDs.TangoConst;
+import fr.esrf.TangoDs.Util;
+
+/**
+ * Class Description: Returns the average value generated by the given attribute
+ * and between the two given dates.
+ */
+
+public class GetAttDataAvgBetweenDatesClass extends Command implements TangoConst {
+	// ===============================================================
+	/**
+	 * Constructor for Command class GetAttDataAvgBetweenDatesClass
+	 * 
+	 * @param name
+	 *            command name
+	 * @param in
+	 *            argin type
+	 * @param out
+	 *            argout type
+	 */
+	// ===============================================================
+	public GetAttDataAvgBetweenDatesClass(final String name, final int in, final int out) {
+		super(name, in, out);
+	}
+
+	// ===============================================================
+	/**
+	 * Constructor for Command class GetAttDataAvgBetweenDatesClass
+	 * 
+	 * @param name
+	 *            command name
+	 * @param in
+	 *            argin type
+	 * @param in_comments
+	 *            argin description
+	 * @param out
+	 *            argout type
+	 * @param out_comments
+	 *            argout description
+	 */
+	// ===============================================================
+	public GetAttDataAvgBetweenDatesClass(final String name, final int in, final int out, final String in_comments, final String out_comments) {
+		super(name, in, out, in_comments, out_comments);
+	}
+
+	// ===============================================================
+	/**
+	 * Constructor for Command class GetAttDataAvgBetweenDatesClass
+	 * 
+	 * @param name
+	 *            command name
+	 * @param in
+	 *            argin type
+	 * @param in_comments
+	 *            argin description
+	 * @param out
+	 *            argout type
+	 * @param out_comments
+	 *            argout description
+	 * @param level
+	 *            The command display type OPERATOR or EXPERT
+	 */
+	// ===============================================================
+	public GetAttDataAvgBetweenDatesClass(final String name, final int in, final int out, final String in_comments, final String out_comments, final DispLevel level) {
+		super(name, in, out, in_comments, out_comments, level);
+	}
+
+	// ===============================================================
+	/**
+	 * return the result of the device's command.
+	 */
+	// ===============================================================
+	@Override
+	public Any execute(final DeviceImpl device, final Any in_any) throws DevFailed {
+		Util.out2.println("GetAttDataAvgBetweenDatesClass.execute(): arrived");
+		final String[] argin = extract_DevVarStringArray(in_any);
+
+		if (!(device instanceof HdbExtractor)) {
+			Except.throw_exception("DEVICE_ERROR", "Device parameter is not instance of HdbExtractor", "HdbExtractor");
+		}
+
+		return insert(((HdbExtractor) device).get_att_data_avg_between_dates(argin));
+	}
+
+	// ===============================================================
+	/**
+	 * Check if it is allowed to execute the command.
+	 */
+	// ===============================================================
+	@Override
+	public boolean is_allowed(final DeviceImpl device, final Any data_in) {
+		// End of Generated Code
+
+		// Re-Start of Generated Code
+		return true;
+	}
+}
+
+// -----------------------------------------------------------------------------
+/*
+ * end of $Source:/cvsroot/tango-cs/tango/jserver/archiving/HdbExtractor/
+ * GetAttDataAvgBetweenDatesClass.java,v $
+ */
diff --git a/src/main/java/HdbExtractor/GetAttDataAvgClass.java b/hdbextractor/src/main/java/HdbExtractor/GetAttDataAvgClass.java
similarity index 96%
rename from src/main/java/HdbExtractor/GetAttDataAvgClass.java
rename to hdbextractor/src/main/java/HdbExtractor/GetAttDataAvgClass.java
index e6dbade95b691cdca4615131bad1e2d660d1d076..b9ef23522099ca2d5de0db7bd49598385f740216 100644
--- a/src/main/java/HdbExtractor/GetAttDataAvgClass.java
+++ b/hdbextractor/src/main/java/HdbExtractor/GetAttDataAvgClass.java
@@ -1,152 +1,152 @@
-//+======================================================================
-// $Source: /cvsroot/tango-cs/tango/jserver/archiving/HdbExtractor/GetAttDataAvgClass.java,v $
-//
-// Project:      Tango Device Server
-//
-// Description:  Java source code for the command TemplateClass of the
-//               HdbExtractor class.
-//
-// $Author: chinkumo $
-//
-// $Revision: 1.3 $
-//
-// $Log: GetAttDataAvgClass.java,v $
-// Revision 1.3  2005/11/29 16:17:37  chinkumo
-// Code reformated (pogo compatible)
-//
-// Revision 1.2  2005/11/15 13:45:51  chinkumo
-// ...
-//
-// Revision 1.1  2005/09/09 10:03:21  chinkumo
-// First commit !
-// (Dynamic attribut release)
-//
-//
-// copyleft :    European Synchrotron Radiation Facility
-//               BP 220, Grenoble 38043
-//               FRANCE
-//
-//-======================================================================
-//
-//  		This file is generated by POGO
-//	(Program Obviously used to Generate tango Object)
-//
-//         (c) - Software Engineering Group - ESRF
-//=============================================================================
-
-/**
- * @author	$Author: chinkumo $
- * @version	$Revision: 1.3 $
- */
-package HdbExtractor;
-
-import org.omg.CORBA.Any;
-
-import fr.esrf.Tango.DevFailed;
-import fr.esrf.Tango.DispLevel;
-import fr.esrf.TangoDs.Command;
-import fr.esrf.TangoDs.DeviceImpl;
-import fr.esrf.TangoDs.Except;
-import fr.esrf.TangoDs.TangoConst;
-import fr.esrf.TangoDs.Util;
-
-/**
- * Class Description: Returns the average value generated by the given
- * attribute.
- */
-
-public class GetAttDataAvgClass extends Command implements TangoConst {
-	// ===============================================================
-	/**
-	 * Constructor for Command class GetAttDataAvgClass
-	 * 
-	 * @param name
-	 *            command name
-	 * @param in
-	 *            argin type
-	 * @param out
-	 *            argout type
-	 */
-	// ===============================================================
-	public GetAttDataAvgClass(final String name, final int in, final int out) {
-		super(name, in, out);
-	}
-
-	// ===============================================================
-	/**
-	 * Constructor for Command class GetAttDataAvgClass
-	 * 
-	 * @param name
-	 *            command name
-	 * @param in
-	 *            argin type
-	 * @param in_comments
-	 *            argin description
-	 * @param out
-	 *            argout type
-	 * @param out_comments
-	 *            argout description
-	 */
-	// ===============================================================
-	public GetAttDataAvgClass(final String name, final int in, final int out, final String in_comments, final String out_comments) {
-		super(name, in, out, in_comments, out_comments);
-	}
-
-	// ===============================================================
-	/**
-	 * Constructor for Command class GetAttDataAvgClass
-	 * 
-	 * @param name
-	 *            command name
-	 * @param in
-	 *            argin type
-	 * @param in_comments
-	 *            argin description
-	 * @param out
-	 *            argout type
-	 * @param out_comments
-	 *            argout description
-	 * @param level
-	 *            The command display type OPERATOR or EXPERT
-	 */
-	// ===============================================================
-	public GetAttDataAvgClass(final String name, final int in, final int out, final String in_comments, final String out_comments, final DispLevel level) {
-		super(name, in, out, in_comments, out_comments, level);
-	}
-
-	// ===============================================================
-	/**
-	 * return the result of the device's command.
-	 */
-	// ===============================================================
-	@Override
-	public Any execute(final DeviceImpl device, final Any in_any) throws DevFailed {
-		Util.out2.println("GetAttDataAvgClass.execute(): arrived");
-		final String argin = extract_DevString(in_any);
-		if (!(device instanceof HdbExtractor)) {
-			Except.throw_exception("DEVICE_ERROR", "Device parameter is not instance of HdbExtractor", "HdbExtractor");
-		}
-
-		return insert(((HdbExtractor) device).get_att_data_avg(argin));
-	}
-
-	// ===============================================================
-	/**
-	 * Check if it is allowed to execute the command.
-	 */
-	// ===============================================================
-	@Override
-	public boolean is_allowed(final DeviceImpl device, final Any data_in) {
-		// End of Generated Code
-
-		// Re-Start of Generated Code
-		return true;
-	}
-}
-
-// -----------------------------------------------------------------------------
-/*
- * end of $Source:
- * /cvsroot/tango-cs/tango/jserver/archiving/HdbExtractor/GetAttDataAvgClass
- * .java,v $
- */
+//+======================================================================
+// $Source: /cvsroot/tango-cs/tango/jserver/archiving/HdbExtractor/GetAttDataAvgClass.java,v $
+//
+// Project:      Tango Device Server
+//
+// Description:  Java source code for the command TemplateClass of the
+//               HdbExtractor class.
+//
+// $Author: chinkumo $
+//
+// $Revision: 1.3 $
+//
+// $Log: GetAttDataAvgClass.java,v $
+// Revision 1.3  2005/11/29 16:17:37  chinkumo
+// Code reformated (pogo compatible)
+//
+// Revision 1.2  2005/11/15 13:45:51  chinkumo
+// ...
+//
+// Revision 1.1  2005/09/09 10:03:21  chinkumo
+// First commit !
+// (Dynamic attribut release)
+//
+//
+// copyleft :    European Synchrotron Radiation Facility
+//               BP 220, Grenoble 38043
+//               FRANCE
+//
+//-======================================================================
+//
+//  		This file is generated by POGO
+//	(Program Obviously used to Generate tango Object)
+//
+//         (c) - Software Engineering Group - ESRF
+//=============================================================================
+
+/**
+ * @author	$Author: chinkumo $
+ * @version	$Revision: 1.3 $
+ */
+package HdbExtractor;
+
+import org.omg.CORBA.Any;
+
+import fr.esrf.Tango.DevFailed;
+import fr.esrf.Tango.DispLevel;
+import fr.esrf.TangoDs.Command;
+import fr.esrf.TangoDs.DeviceImpl;
+import fr.esrf.TangoDs.Except;
+import fr.esrf.TangoDs.TangoConst;
+import fr.esrf.TangoDs.Util;
+
+/**
+ * Class Description: Returns the average value generated by the given
+ * attribute.
+ */
+
+public class GetAttDataAvgClass extends Command implements TangoConst {
+	// ===============================================================
+	/**
+	 * Constructor for Command class GetAttDataAvgClass
+	 * 
+	 * @param name
+	 *            command name
+	 * @param in
+	 *            argin type
+	 * @param out
+	 *            argout type
+	 */
+	// ===============================================================
+	public GetAttDataAvgClass(final String name, final int in, final int out) {
+		super(name, in, out);
+	}
+
+	// ===============================================================
+	/**
+	 * Constructor for Command class GetAttDataAvgClass
+	 * 
+	 * @param name
+	 *            command name
+	 * @param in
+	 *            argin type
+	 * @param in_comments
+	 *            argin description
+	 * @param out
+	 *            argout type
+	 * @param out_comments
+	 *            argout description
+	 */
+	// ===============================================================
+	public GetAttDataAvgClass(final String name, final int in, final int out, final String in_comments, final String out_comments) {
+		super(name, in, out, in_comments, out_comments);
+	}
+
+	// ===============================================================
+	/**
+	 * Constructor for Command class GetAttDataAvgClass
+	 * 
+	 * @param name
+	 *            command name
+	 * @param in
+	 *            argin type
+	 * @param in_comments
+	 *            argin description
+	 * @param out
+	 *            argout type
+	 * @param out_comments
+	 *            argout description
+	 * @param level
+	 *            The command display type OPERATOR or EXPERT
+	 */
+	// ===============================================================
+	public GetAttDataAvgClass(final String name, final int in, final int out, final String in_comments, final String out_comments, final DispLevel level) {
+		super(name, in, out, in_comments, out_comments, level);
+	}
+
+	// ===============================================================
+	/**
+	 * return the result of the device's command.
+	 */
+	// ===============================================================
+	@Override
+	public Any execute(final DeviceImpl device, final Any in_any) throws DevFailed {
+		Util.out2.println("GetAttDataAvgClass.execute(): arrived");
+		final String argin = extract_DevString(in_any);
+		if (!(device instanceof HdbExtractor)) {
+			Except.throw_exception("DEVICE_ERROR", "Device parameter is not instance of HdbExtractor", "HdbExtractor");
+		}
+
+		return insert(((HdbExtractor) device).get_att_data_avg(argin));
+	}
+
+	// ===============================================================
+	/**
+	 * Check if it is allowed to execute the command.
+	 */
+	// ===============================================================
+	@Override
+	public boolean is_allowed(final DeviceImpl device, final Any data_in) {
+		// End of Generated Code
+
+		// Re-Start of Generated Code
+		return true;
+	}
+}
+
+// -----------------------------------------------------------------------------
+/*
+ * end of $Source:
+ * /cvsroot/tango-cs/tango/jserver/archiving/HdbExtractor/GetAttDataAvgClass
+ * .java,v $
+ */
diff --git a/src/main/java/HdbExtractor/GetAttDataBetweenDatesClass.java b/hdbextractor/src/main/java/HdbExtractor/GetAttDataBetweenDatesClass.java
similarity index 96%
rename from src/main/java/HdbExtractor/GetAttDataBetweenDatesClass.java
rename to hdbextractor/src/main/java/HdbExtractor/GetAttDataBetweenDatesClass.java
index 90240fea8497aa5d371c69d73ff0f442df70b36c..803b5df24cc1b9ff211ab03aa635533544d9b8a0 100644
--- a/src/main/java/HdbExtractor/GetAttDataBetweenDatesClass.java
+++ b/hdbextractor/src/main/java/HdbExtractor/GetAttDataBetweenDatesClass.java
@@ -1,153 +1,153 @@
-//+======================================================================
-// $Source: /cvsroot/tango-cs/tango/jserver/archiving/HdbExtractor/GetAttDataBetweenDatesClass.java,v $
-//
-// Project:      Tango Device Server
-//
-// Description:  Java source code for the command TemplateClass of the
-//               HdbExtractor class.
-//
-// $Author: chinkumo $
-//
-// $Revision: 1.3 $
-//
-// $Log: GetAttDataBetweenDatesClass.java,v $
-// Revision 1.3  2005/11/29 16:17:37  chinkumo
-// Code reformated (pogo compatible)
-//
-// Revision 1.2  2005/11/15 13:45:51  chinkumo
-// ...
-//
-// Revision 1.1  2005/09/09 10:03:21  chinkumo
-// First commit !
-// (Dynamic attribut release)
-//
-//
-// copyleft :    European Synchrotron Radiation Facility
-//               BP 220, Grenoble 38043
-//               FRANCE
-//
-//-======================================================================
-//
-//  		This file is generated by POGO
-//	(Program Obviously used to Generate tango Object)
-//
-//         (c) - Software Engineering Group - ESRF
-//=============================================================================
-
-/**
- * @author	$Author: chinkumo $
- * @version	$Revision: 1.3 $
- */
-package HdbExtractor;
-
-import org.omg.CORBA.Any;
-
-import fr.esrf.Tango.DevFailed;
-import fr.esrf.Tango.DispLevel;
-import fr.esrf.TangoDs.Command;
-import fr.esrf.TangoDs.DeviceImpl;
-import fr.esrf.TangoDs.Except;
-import fr.esrf.TangoDs.TangoConst;
-import fr.esrf.TangoDs.Util;
-
-/**
- * Class Description: Retrieves data beetwen two dates, for a given scalar
- * attribute. Create a dynamic attribute, retrieve data from database and
- * prepare result for attribute_history call.
- */
-
-public class GetAttDataBetweenDatesClass extends Command implements TangoConst {
-	// ===============================================================
-	/**
-	 * Constructor for Command class GetAttDataBetweenDatesClass
-	 * 
-	 * @param name
-	 *            command name
-	 * @param in
-	 *            argin type
-	 * @param out
-	 *            argout type
-	 */
-	// ===============================================================
-	public GetAttDataBetweenDatesClass(final String name, final int in, final int out) {
-		super(name, in, out);
-	}
-
-	// ===============================================================
-	/**
-	 * Constructor for Command class GetAttDataBetweenDatesClass
-	 * 
-	 * @param name
-	 *            command name
-	 * @param in
-	 *            argin type
-	 * @param in_comments
-	 *            argin description
-	 * @param out
-	 *            argout type
-	 * @param out_comments
-	 *            argout description
-	 */
-	// ===============================================================
-	public GetAttDataBetweenDatesClass(final String name, final int in, final int out, final String in_comments, final String out_comments) {
-		super(name, in, out, in_comments, out_comments);
-	}
-
-	// ===============================================================
-	/**
-	 * Constructor for Command class GetAttDataBetweenDatesClass
-	 * 
-	 * @param name
-	 *            command name
-	 * @param in
-	 *            argin type
-	 * @param in_comments
-	 *            argin description
-	 * @param out
-	 *            argout type
-	 * @param out_comments
-	 *            argout description
-	 * @param level
-	 *            The command display type OPERATOR or EXPERT
-	 */
-	// ===============================================================
-	public GetAttDataBetweenDatesClass(final String name, final int in, final int out, final String in_comments, final String out_comments, final DispLevel level) {
-		super(name, in, out, in_comments, out_comments, level);
-	}
-
-	// ===============================================================
-	/**
-	 * return the result of the device's command.
-	 */
-	// ===============================================================
-	@Override
-	public Any execute(final DeviceImpl device, final Any in_any) throws DevFailed {
-		Util.out2.println("GetAttDataBetweenDatesClass.execute(): arrived");
-		final String[] argin = extract_DevVarStringArray(in_any);
-
-		if (!(device instanceof HdbExtractor)) {
-			Except.throw_exception("DEVICE_ERROR", "Device parameter is not instance of HdbExtractor", "HdbExtractor");
-		}
-
-		return insert(((HdbExtractor) device).get_att_data_between_dates(argin));
-	}
-
-	// ===============================================================
-	/**
-	 * Check if it is allowed to execute the command.
-	 */
-	// ===============================================================
-	@Override
-	public boolean is_allowed(final DeviceImpl device, final Any data_in) {
-		// End of Generated Code
-
-		// Re-Start of Generated Code
-		return true;
-	}
-}
-
-// -----------------------------------------------------------------------------
-/*
- * end of $Source:/cvsroot/tango-cs/tango/jserver/archiving/HdbExtractor/
- * GetAttDataBetweenDatesClass.java,v $
- */
+//+======================================================================
+// $Source: /cvsroot/tango-cs/tango/jserver/archiving/HdbExtractor/GetAttDataBetweenDatesClass.java,v $
+//
+// Project:      Tango Device Server
+//
+// Description:  Java source code for the command TemplateClass of the
+//               HdbExtractor class.
+//
+// $Author: chinkumo $
+//
+// $Revision: 1.3 $
+//
+// $Log: GetAttDataBetweenDatesClass.java,v $
+// Revision 1.3  2005/11/29 16:17:37  chinkumo
+// Code reformated (pogo compatible)
+//
+// Revision 1.2  2005/11/15 13:45:51  chinkumo
+// ...
+//
+// Revision 1.1  2005/09/09 10:03:21  chinkumo
+// First commit !
+// (Dynamic attribut release)
+//
+//
+// copyleft :    European Synchrotron Radiation Facility
+//               BP 220, Grenoble 38043
+//               FRANCE
+//
+//-======================================================================
+//
+//  		This file is generated by POGO
+//	(Program Obviously used to Generate tango Object)
+//
+//         (c) - Software Engineering Group - ESRF
+//=============================================================================
+
+/**
+ * @author	$Author: chinkumo $
+ * @version	$Revision: 1.3 $
+ */
+package HdbExtractor;
+
+import org.omg.CORBA.Any;
+
+import fr.esrf.Tango.DevFailed;
+import fr.esrf.Tango.DispLevel;
+import fr.esrf.TangoDs.Command;
+import fr.esrf.TangoDs.DeviceImpl;
+import fr.esrf.TangoDs.Except;
+import fr.esrf.TangoDs.TangoConst;
+import fr.esrf.TangoDs.Util;
+
+/**
+ * Class Description: Retrieves data beetwen two dates, for a given scalar
+ * attribute. Create a dynamic attribute, retrieve data from database and
+ * prepare result for attribute_history call.
+ */
+
+public class GetAttDataBetweenDatesClass extends Command implements TangoConst {
+	// ===============================================================
+	/**
+	 * Constructor for Command class GetAttDataBetweenDatesClass
+	 * 
+	 * @param name
+	 *            command name
+	 * @param in
+	 *            argin type
+	 * @param out
+	 *            argout type
+	 */
+	// ===============================================================
+	public GetAttDataBetweenDatesClass(final String name, final int in, final int out) {
+		super(name, in, out);
+	}
+
+	// ===============================================================
+	/**
+	 * Constructor for Command class GetAttDataBetweenDatesClass
+	 * 
+	 * @param name
+	 *            command name
+	 * @param in
+	 *            argin type
+	 * @param in_comments
+	 *            argin description
+	 * @param out
+	 *            argout type
+	 * @param out_comments
+	 *            argout description
+	 */
+	// ===============================================================
+	public GetAttDataBetweenDatesClass(final String name, final int in, final int out, final String in_comments, final String out_comments) {
+		super(name, in, out, in_comments, out_comments);
+	}
+
+	// ===============================================================
+	/**
+	 * Constructor for Command class GetAttDataBetweenDatesClass
+	 * 
+	 * @param name
+	 *            command name
+	 * @param in
+	 *            argin type
+	 * @param in_comments
+	 *            argin description
+	 * @param out
+	 *            argout type
+	 * @param out_comments
+	 *            argout description
+	 * @param level
+	 *            The command display type OPERATOR or EXPERT
+	 */
+	// ===============================================================
+	public GetAttDataBetweenDatesClass(final String name, final int in, final int out, final String in_comments, final String out_comments, final DispLevel level) {
+		super(name, in, out, in_comments, out_comments, level);
+	}
+
+	// ===============================================================
+	/**
+	 * return the result of the device's command.
+	 */
+	// ===============================================================
+	@Override
+	public Any execute(final DeviceImpl device, final Any in_any) throws DevFailed {
+		Util.out2.println("GetAttDataBetweenDatesClass.execute(): arrived");
+		final String[] argin = extract_DevVarStringArray(in_any);
+
+		if (!(device instanceof HdbExtractor)) {
+			Except.throw_exception("DEVICE_ERROR", "Device parameter is not instance of HdbExtractor", "HdbExtractor");
+		}
+
+		return insert(((HdbExtractor) device).get_att_data_between_dates(argin));
+	}
+
+	// ===============================================================
+	/**
+	 * Check if it is allowed to execute the command.
+	 */
+	// ===============================================================
+	@Override
+	public boolean is_allowed(final DeviceImpl device, final Any data_in) {
+		// End of Generated Code
+
+		// Re-Start of Generated Code
+		return true;
+	}
+}
+
+// -----------------------------------------------------------------------------
+/*
+ * end of $Source:/cvsroot/tango-cs/tango/jserver/archiving/HdbExtractor/
+ * GetAttDataBetweenDatesClass.java,v $
+ */
diff --git a/src/main/java/HdbExtractor/GetAttDataBetweenDatesCountClass.java b/hdbextractor/src/main/java/HdbExtractor/GetAttDataBetweenDatesCountClass.java
similarity index 96%
rename from src/main/java/HdbExtractor/GetAttDataBetweenDatesCountClass.java
rename to hdbextractor/src/main/java/HdbExtractor/GetAttDataBetweenDatesCountClass.java
index 3e0b810aa463659ce8b91d7f1998d9ecfed2d406..f411d2a19890e43c68ded6963ad9da89dcfb7c1f 100644
--- a/src/main/java/HdbExtractor/GetAttDataBetweenDatesCountClass.java
+++ b/hdbextractor/src/main/java/HdbExtractor/GetAttDataBetweenDatesCountClass.java
@@ -1,152 +1,152 @@
-//+======================================================================
-// $Source: /cvsroot/tango-cs/tango/jserver/archiving/HdbExtractor/GetAttDataBetweenDatesCountClass.java,v $
-//
-// Project:      Tango Device Server
-//
-// Description:  Java source code for the command TemplateClass of the
-//               HdbExtractor class.
-//
-// $Author: chinkumo $
-//
-// $Revision: 1.3 $
-//
-// $Log: GetAttDataBetweenDatesCountClass.java,v $
-// Revision 1.3  2005/11/29 16:17:37  chinkumo
-// Code reformated (pogo compatible)
-//
-// Revision 1.2  2005/11/15 13:45:51  chinkumo
-// ...
-//
-// Revision 1.1  2005/09/09 10:03:21  chinkumo
-// First commit !
-// (Dynamic attribut release)
-//
-//
-// copyleft :    European Synchrotron Radiation Facility
-//               BP 220, Grenoble 38043
-//               FRANCE
-//
-//-======================================================================
-//
-//  		This file is generated by POGO
-//	(Program Obviously used to Generate tango Object)
-//
-//         (c) - Software Engineering Group - ESRF
-//=============================================================================
-
-/**
- * @author	$Author: chinkumo $
- * @version	$Revision: 1.3 $
- */
-package HdbExtractor;
-
-import org.omg.CORBA.Any;
-
-import fr.esrf.Tango.DevFailed;
-import fr.esrf.Tango.DispLevel;
-import fr.esrf.TangoDs.Command;
-import fr.esrf.TangoDs.DeviceImpl;
-import fr.esrf.TangoDs.Except;
-import fr.esrf.TangoDs.TangoConst;
-import fr.esrf.TangoDs.Util;
-
-/**
- * Class Description: Returns the number of data beetwen two dates and, for a
- * given scalar attribute.
- */
-
-public class GetAttDataBetweenDatesCountClass extends Command implements TangoConst {
-	// ===============================================================
-	/**
-	 * Constructor for Command class GetAttDataBetweenDatesCountClass
-	 * 
-	 * @param name
-	 *            command name
-	 * @param in
-	 *            argin type
-	 * @param out
-	 *            argout type
-	 */
-	// ===============================================================
-	public GetAttDataBetweenDatesCountClass(final String name, final int in, final int out) {
-		super(name, in, out);
-	}
-
-	// ===============================================================
-	/**
-	 * Constructor for Command class GetAttDataBetweenDatesCountClass
-	 * 
-	 * @param name
-	 *            command name
-	 * @param in
-	 *            argin type
-	 * @param in_comments
-	 *            argin description
-	 * @param out
-	 *            argout type
-	 * @param out_comments
-	 *            argout description
-	 */
-	// ===============================================================
-	public GetAttDataBetweenDatesCountClass(final String name, final int in, final int out, final String in_comments, final String out_comments) {
-		super(name, in, out, in_comments, out_comments);
-	}
-
-	// ===============================================================
-	/**
-	 * Constructor for Command class GetAttDataBetweenDatesCountClass
-	 * 
-	 * @param name
-	 *            command name
-	 * @param in
-	 *            argin type
-	 * @param in_comments
-	 *            argin description
-	 * @param out
-	 *            argout type
-	 * @param out_comments
-	 *            argout description
-	 * @param level
-	 *            The command display type OPERATOR or EXPERT
-	 */
-	// ===============================================================
-	public GetAttDataBetweenDatesCountClass(final String name, final int in, final int out, final String in_comments, final String out_comments, final DispLevel level) {
-		super(name, in, out, in_comments, out_comments, level);
-	}
-
-	// ===============================================================
-	/**
-	 * return the result of the device's command.
-	 */
-	// ===============================================================
-	@Override
-	public Any execute(final DeviceImpl device, final Any in_any) throws DevFailed {
-		Util.out2.println("GetAttDataBetweenDatesCountClass.execute(): arrived");
-		final String[] argin = extract_DevVarStringArray(in_any);
-
-		if (!(device instanceof HdbExtractor)) {
-			Except.throw_exception("DEVICE_ERROR", "Device parameter is not instance of HdbExtractor", "HdbExtractor");
-		}
-
-		return insert(((HdbExtractor) device).get_att_data_between_dates_count(argin));
-	}
-
-	// ===============================================================
-	/**
-	 * Check if it is allowed to execute the command.
-	 */
-	// ===============================================================
-	@Override
-	public boolean is_allowed(final DeviceImpl device, final Any data_in) {
-		// End of Generated Code
-
-		// Re-Start of Generated Code
-		return true;
-	}
-}
-
-// -----------------------------------------------------------------------------
-/*
- * end of $Source:/cvsroot/tango-cs/tango/jserver/archiving/HdbExtractor/
- * GetAttDataBetweenDatesCountClass.java,v $
- */
+//+======================================================================
+// $Source: /cvsroot/tango-cs/tango/jserver/archiving/HdbExtractor/GetAttDataBetweenDatesCountClass.java,v $
+//
+// Project:      Tango Device Server
+//
+// Description:  Java source code for the command TemplateClass of the
+//               HdbExtractor class.
+//
+// $Author: chinkumo $
+//
+// $Revision: 1.3 $
+//
+// $Log: GetAttDataBetweenDatesCountClass.java,v $
+// Revision 1.3  2005/11/29 16:17:37  chinkumo
+// Code reformated (pogo compatible)
+//
+// Revision 1.2  2005/11/15 13:45:51  chinkumo
+// ...
+//
+// Revision 1.1  2005/09/09 10:03:21  chinkumo
+// First commit !
+// (Dynamic attribut release)
+//
+//
+// copyleft :    European Synchrotron Radiation Facility
+//               BP 220, Grenoble 38043
+//               FRANCE
+//
+//-======================================================================
+//
+//  		This file is generated by POGO
+//	(Program Obviously used to Generate tango Object)
+//
+//         (c) - Software Engineering Group - ESRF
+//=============================================================================
+
+/**
+ * @author	$Author: chinkumo $
+ * @version	$Revision: 1.3 $
+ */
+package HdbExtractor;
+
+import org.omg.CORBA.Any;
+
+import fr.esrf.Tango.DevFailed;
+import fr.esrf.Tango.DispLevel;
+import fr.esrf.TangoDs.Command;
+import fr.esrf.TangoDs.DeviceImpl;
+import fr.esrf.TangoDs.Except;
+import fr.esrf.TangoDs.TangoConst;
+import fr.esrf.TangoDs.Util;
+
+/**
+ * Class Description: Returns the number of data beetwen two dates and, for a
+ * given scalar attribute.
+ */
+
+public class GetAttDataBetweenDatesCountClass extends Command implements TangoConst {
+	// ===============================================================
+	/**
+	 * Constructor for Command class GetAttDataBetweenDatesCountClass
+	 * 
+	 * @param name
+	 *            command name
+	 * @param in
+	 *            argin type
+	 * @param out
+	 *            argout type
+	 */
+	// ===============================================================
+	public GetAttDataBetweenDatesCountClass(final String name, final int in, final int out) {
+		super(name, in, out);
+	}
+
+	// ===============================================================
+	/**
+	 * Constructor for Command class GetAttDataBetweenDatesCountClass
+	 * 
+	 * @param name
+	 *            command name
+	 * @param in
+	 *            argin type
+	 * @param in_comments
+	 *            argin description
+	 * @param out
+	 *            argout type
+	 * @param out_comments
+	 *            argout description
+	 */
+	// ===============================================================
+	public GetAttDataBetweenDatesCountClass(final String name, final int in, final int out, final String in_comments, final String out_comments) {
+		super(name, in, out, in_comments, out_comments);
+	}
+
+	// ===============================================================
+	/**
+	 * Constructor for Command class GetAttDataBetweenDatesCountClass
+	 * 
+	 * @param name
+	 *            command name
+	 * @param in
+	 *            argin type
+	 * @param in_comments
+	 *            argin description
+	 * @param out
+	 *            argout type
+	 * @param out_comments
+	 *            argout description
+	 * @param level
+	 *            The command display type OPERATOR or EXPERT
+	 */
+	// ===============================================================
+	public GetAttDataBetweenDatesCountClass(final String name, final int in, final int out, final String in_comments, final String out_comments, final DispLevel level) {
+		super(name, in, out, in_comments, out_comments, level);
+	}
+
+	// ===============================================================
+	/**
+	 * return the result of the device's command.
+	 */
+	// ===============================================================
+	@Override
+	public Any execute(final DeviceImpl device, final Any in_any) throws DevFailed {
+		Util.out2.println("GetAttDataBetweenDatesCountClass.execute(): arrived");
+		final String[] argin = extract_DevVarStringArray(in_any);
+
+		if (!(device instanceof HdbExtractor)) {
+			Except.throw_exception("DEVICE_ERROR", "Device parameter is not instance of HdbExtractor", "HdbExtractor");
+		}
+
+		return insert(((HdbExtractor) device).get_att_data_between_dates_count(argin));
+	}
+
+	// ===============================================================
+	/**
+	 * Check if it is allowed to execute the command.
+	 */
+	// ===============================================================
+	@Override
+	public boolean is_allowed(final DeviceImpl device, final Any data_in) {
+		// End of Generated Code
+
+		// Re-Start of Generated Code
+		return true;
+	}
+}
+
+// -----------------------------------------------------------------------------
+/*
+ * end of $Source:/cvsroot/tango-cs/tango/jserver/archiving/HdbExtractor/
+ * GetAttDataBetweenDatesCountClass.java,v $
+ */
diff --git a/src/main/java/HdbExtractor/GetAttDataBetweenDatesSamplingClass.java b/hdbextractor/src/main/java/HdbExtractor/GetAttDataBetweenDatesSamplingClass.java
similarity index 96%
rename from src/main/java/HdbExtractor/GetAttDataBetweenDatesSamplingClass.java
rename to hdbextractor/src/main/java/HdbExtractor/GetAttDataBetweenDatesSamplingClass.java
index 940a582b8fa0dbd64c2c894ba3d0134ed57c2345..9d847d161c70002b1815a521beb2745e1f68988f 100644
--- a/src/main/java/HdbExtractor/GetAttDataBetweenDatesSamplingClass.java
+++ b/hdbextractor/src/main/java/HdbExtractor/GetAttDataBetweenDatesSamplingClass.java
@@ -1,117 +1,117 @@
-/**
- * @author  $Author: ounsy $
- * @version $Revision: 1.1 $
- */
-package HdbExtractor;
-
-import org.omg.CORBA.Any;
-
-import fr.esrf.Tango.DevFailed;
-import fr.esrf.Tango.DispLevel;
-import fr.esrf.TangoDs.Command;
-import fr.esrf.TangoDs.DeviceImpl;
-import fr.esrf.TangoDs.Except;
-import fr.esrf.TangoDs.TangoConst;
-import fr.esrf.TangoDs.Util;
-
-/**
- * Class Description: Retrieves data beetwen two dates, for a given scalar
- * attribute. Create a dynamic attribute, retrieve data from database and
- * prepare result for attribute_history call.
- */
-
-public class GetAttDataBetweenDatesSamplingClass extends Command implements TangoConst {
-	// ===============================================================
-	/**
-	 * Constructor for Command class GetAttDataBetweenDatesClass
-	 * 
-	 * @param name
-	 *            command name
-	 * @param in
-	 *            argin type
-	 * @param out
-	 *            argout type
-	 */
-	// ===============================================================
-	public GetAttDataBetweenDatesSamplingClass(final String name, final int in, final int out) {
-		super(name, in, out);
-	}
-
-	// ===============================================================
-	/**
-	 * Constructor for Command class GetAttDataBetweenDatesClass
-	 * 
-	 * @param name
-	 *            command name
-	 * @param in
-	 *            argin type
-	 * @param in_comments
-	 *            argin description
-	 * @param out
-	 *            argout type
-	 * @param out_comments
-	 *            argout description
-	 */
-	// ===============================================================
-	public GetAttDataBetweenDatesSamplingClass(final String name, final int in, final int out, final String in_comments, final String out_comments) {
-		super(name, in, out, in_comments, out_comments);
-	}
-
-	// ===============================================================
-	/**
-	 * Constructor for Command class GetAttDataBetweenDatesClass
-	 * 
-	 * @param name
-	 *            command name
-	 * @param in
-	 *            argin type
-	 * @param in_comments
-	 *            argin description
-	 * @param out
-	 *            argout type
-	 * @param out_comments
-	 *            argout description
-	 * @param level
-	 *            The command display type OPERATOR or EXPERT
-	 */
-	// ===============================================================
-	public GetAttDataBetweenDatesSamplingClass(final String name, final int in, final int out, final String in_comments, final String out_comments, final DispLevel level) {
-		super(name, in, out, in_comments, out_comments, level);
-	}
-
-	// ===============================================================
-	/**
-	 * return the result of the device's command.
-	 */
-	// ===============================================================
-	@Override
-	public Any execute(final DeviceImpl device, final Any in_any) throws DevFailed {
-		Util.out2.println("GetAttDataBetweenDatesSamplingClass.execute(): arrived");
-		final String[] argin = extract_DevVarStringArray(in_any);
-
-		if (!(device instanceof HdbExtractor)) {
-			Except.throw_exception("DEVICE_ERROR", "Device parameter is not instance of HdbExtractor", "HdbExtractor");
-		}
-
-		return insert(((HdbExtractor) device).get_att_data_between_dates_sampling(argin));
-	}
-
-	// ===============================================================
-	/**
-	 * Check if it is allowed to execute the command.
-	 */
-	// ===============================================================
-	@Override
-	public boolean is_allowed(final DeviceImpl device, final Any data_in) {
-		// End of Generated Code
-
-		// Re-Start of Generated Code
-		return true;
-	}
-}
-
-// -----------------------------------------------------------------------------
-/*
- * end of $Source:/cvsroot/tango-cs/tango/jserver/archiving/HdbExtractor/
- * GetAttDataBetweenDatesSamplingClass.java,v $
- */
+/**
+ * @author  $Author: ounsy $
+ * @version $Revision: 1.1 $
+ */
+package HdbExtractor;
+
+import org.omg.CORBA.Any;
+
+import fr.esrf.Tango.DevFailed;
+import fr.esrf.Tango.DispLevel;
+import fr.esrf.TangoDs.Command;
+import fr.esrf.TangoDs.DeviceImpl;
+import fr.esrf.TangoDs.Except;
+import fr.esrf.TangoDs.TangoConst;
+import fr.esrf.TangoDs.Util;
+
+/**
+ * Class Description: Retrieves data beetwen two dates, for a given scalar
+ * attribute. Create a dynamic attribute, retrieve data from database and
+ * prepare result for attribute_history call.
+ */
+
+public class GetAttDataBetweenDatesSamplingClass extends Command implements TangoConst {
+	// ===============================================================
+	/**
+	 * Constructor for Command class GetAttDataBetweenDatesClass
+	 * 
+	 * @param name
+	 *            command name
+	 * @param in
+	 *            argin type
+	 * @param out
+	 *            argout type
+	 */
+	// ===============================================================
+	public GetAttDataBetweenDatesSamplingClass(final String name, final int in, final int out) {
+		super(name, in, out);
+	}
+
+	// ===============================================================
+	/**
+	 * Constructor for Command class GetAttDataBetweenDatesClass
+	 * 
+	 * @param name
+	 *            command name
+	 * @param in
+	 *            argin type
+	 * @param in_comments
+	 *            argin description
+	 * @param out
+	 *            argout type
+	 * @param out_comments
+	 *            argout description
+	 */
+	// ===============================================================
+	public GetAttDataBetweenDatesSamplingClass(final String name, final int in, final int out, final String in_comments, final String out_comments) {
+		super(name, in, out, in_comments, out_comments);
+	}
+
+	// ===============================================================
+	/**
+	 * Constructor for Command class GetAttDataBetweenDatesClass
+	 * 
+	 * @param name
+	 *            command name
+	 * @param in
+	 *            argin type
+	 * @param in_comments
+	 *            argin description
+	 * @param out
+	 *            argout type
+	 * @param out_comments
+	 *            argout description
+	 * @param level
+	 *            The command display type OPERATOR or EXPERT
+	 */
+	// ===============================================================
+	public GetAttDataBetweenDatesSamplingClass(final String name, final int in, final int out, final String in_comments, final String out_comments, final DispLevel level) {
+		super(name, in, out, in_comments, out_comments, level);
+	}
+
+	// ===============================================================
+	/**
+	 * return the result of the device's command.
+	 */
+	// ===============================================================
+	@Override
+	public Any execute(final DeviceImpl device, final Any in_any) throws DevFailed {
+		Util.out2.println("GetAttDataBetweenDatesSamplingClass.execute(): arrived");
+		final String[] argin = extract_DevVarStringArray(in_any);
+
+		if (!(device instanceof HdbExtractor)) {
+			Except.throw_exception("DEVICE_ERROR", "Device parameter is not instance of HdbExtractor", "HdbExtractor");
+		}
+
+		return insert(((HdbExtractor) device).get_att_data_between_dates_sampling(argin));
+	}
+
+	// ===============================================================
+	/**
+	 * Check if it is allowed to execute the command.
+	 */
+	// ===============================================================
+	@Override
+	public boolean is_allowed(final DeviceImpl device, final Any data_in) {
+		// End of Generated Code
+
+		// Re-Start of Generated Code
+		return true;
+	}
+}
+
+// -----------------------------------------------------------------------------
+/*
+ * end of $Source:/cvsroot/tango-cs/tango/jserver/archiving/HdbExtractor/
+ * GetAttDataBetweenDatesSamplingClass.java,v $
+ */
diff --git a/src/main/java/HdbExtractor/GetAttDataClass.java b/hdbextractor/src/main/java/HdbExtractor/GetAttDataClass.java
similarity index 96%
rename from src/main/java/HdbExtractor/GetAttDataClass.java
rename to hdbextractor/src/main/java/HdbExtractor/GetAttDataClass.java
index 4a928d150bf96336453ccee3d8d2988ac0059f93..9177ed68a406d3ff4eadf0207eae8bbfd9ab163d 100644
--- a/src/main/java/HdbExtractor/GetAttDataClass.java
+++ b/hdbextractor/src/main/java/HdbExtractor/GetAttDataClass.java
@@ -1,154 +1,154 @@
-//+======================================================================
-// $Source: /cvsroot/tango-cs/tango/jserver/archiving/HdbExtractor/GetAttDataClass.java,v $
-//
-// Project:      Tango Device Server
-//
-// Description:  Java source code for the command TemplateClass of the
-//               HdbExtractor class.
-//
-// $Author: chinkumo $
-//
-// $Revision: 1.3 $
-//
-// $Log: GetAttDataClass.java,v $
-// Revision 1.3  2005/11/29 16:17:37  chinkumo
-// Code reformated (pogo compatible)
-//
-// Revision 1.2  2005/11/15 13:45:51  chinkumo
-// ...
-//
-// Revision 1.1  2005/09/09 10:03:21  chinkumo
-// First commit !
-// (Dynamic attribut release)
-//
-//
-// copyleft :    European Synchrotron Radiation Facility
-//               BP 220, Grenoble 38043
-//               FRANCE
-//
-//-======================================================================
-//
-//  		This file is generated by POGO
-//	(Program Obviously used to Generate tango Object)
-//
-//         (c) - Software Engineering Group - ESRF
-//=============================================================================
-
-/**
- * @author	$Author: chinkumo $
- * @version	$Revision: 1.3 $
- */
-package HdbExtractor;
-
-import org.omg.CORBA.Any;
-
-import fr.esrf.Tango.DevFailed;
-import fr.esrf.Tango.DispLevel;
-import fr.esrf.TangoDs.Command;
-import fr.esrf.TangoDs.DeviceImpl;
-import fr.esrf.TangoDs.Except;
-import fr.esrf.TangoDs.TangoConst;
-import fr.esrf.TangoDs.Util;
-
-/**
- * Class Description: Gets all the data archieved for an attribute. Create a
- * dynamic attribute, retrieve data from database and prepare result for
- * attribute_history call.
- */
-
-public class GetAttDataClass extends Command implements TangoConst {
-	// ===============================================================
-	/**
-	 * Constructor for Command class GetAttDataClass
-	 * 
-	 * @param name
-	 *            command name
-	 * @param in
-	 *            argin type
-	 * @param out
-	 *            argout type
-	 */
-	// ===============================================================
-	public GetAttDataClass(final String name, final int in, final int out) {
-		super(name, in, out);
-	}
-
-	// ===============================================================
-	/**
-	 * Constructor for Command class GetAttDataClass
-	 * 
-	 * @param name
-	 *            command name
-	 * @param in
-	 *            argin type
-	 * @param in_comments
-	 *            argin description
-	 * @param out
-	 *            argout type
-	 * @param out_comments
-	 *            argout description
-	 */
-	// ===============================================================
-	public GetAttDataClass(final String name, final int in, final int out, final String in_comments, final String out_comments) {
-		super(name, in, out, in_comments, out_comments);
-	}
-
-	// ===============================================================
-	/**
-	 * Constructor for Command class GetAttDataClass
-	 * 
-	 * @param name
-	 *            command name
-	 * @param in
-	 *            argin type
-	 * @param in_comments
-	 *            argin description
-	 * @param out
-	 *            argout type
-	 * @param out_comments
-	 *            argout description
-	 * @param level
-	 *            The command display type OPERATOR or EXPERT
-	 */
-	// ===============================================================
-	public GetAttDataClass(final String name, final int in, final int out, final String in_comments, final String out_comments, final DispLevel level) {
-		super(name, in, out, in_comments, out_comments, level);
-	}
-
-	// ===============================================================
-	/**
-	 * return the result of the device's command.
-	 */
-	// ===============================================================
-	@Override
-	public Any execute(final DeviceImpl device, final Any in_any) throws DevFailed {
-		Util.out2.println("GetAttDataClass.execute(): arrived");
-		final String argin = extract_DevString(in_any);
-
-		if (!(device instanceof HdbExtractor)) {
-			Except.throw_exception("DEVICE_ERROR", "Device parameter is not instance of HdbExtractor", "HdbExtractor");
-		}
-
-		return insert(((HdbExtractor) device).get_att_data(argin));
-	}
-
-	// ===============================================================
-	/**
-	 * Check if it is allowed to execute the command.
-	 */
-	// ===============================================================
-	@Override
-	public boolean is_allowed(final DeviceImpl device, final Any data_in) {
-		// End of Generated Code
-
-		// Re-Start of Generated Code
-		return true;
-	}
-}
-
-// -----------------------------------------------------------------------------
-/*
- * end of $Source:
- * /cvsroot/tango-cs/tango/jserver/archiving/HdbExtractor/GetAttDataClass.java,v
- * $
- */
+//+======================================================================
+// $Source: /cvsroot/tango-cs/tango/jserver/archiving/HdbExtractor/GetAttDataClass.java,v $
+//
+// Project:      Tango Device Server
+//
+// Description:  Java source code for the command TemplateClass of the
+//               HdbExtractor class.
+//
+// $Author: chinkumo $
+//
+// $Revision: 1.3 $
+//
+// $Log: GetAttDataClass.java,v $
+// Revision 1.3  2005/11/29 16:17:37  chinkumo
+// Code reformated (pogo compatible)
+//
+// Revision 1.2  2005/11/15 13:45:51  chinkumo
+// ...
+//
+// Revision 1.1  2005/09/09 10:03:21  chinkumo
+// First commit !
+// (Dynamic attribut release)
+//
+//
+// copyleft :    European Synchrotron Radiation Facility
+//               BP 220, Grenoble 38043
+//               FRANCE
+//
+//-======================================================================
+//
+//  		This file is generated by POGO
+//	(Program Obviously used to Generate tango Object)
+//
+//         (c) - Software Engineering Group - ESRF
+//=============================================================================
+
+/**
+ * @author	$Author: chinkumo $
+ * @version	$Revision: 1.3 $
+ */
+package HdbExtractor;
+
+import org.omg.CORBA.Any;
+
+import fr.esrf.Tango.DevFailed;
+import fr.esrf.Tango.DispLevel;
+import fr.esrf.TangoDs.Command;
+import fr.esrf.TangoDs.DeviceImpl;
+import fr.esrf.TangoDs.Except;
+import fr.esrf.TangoDs.TangoConst;
+import fr.esrf.TangoDs.Util;
+
+/**
+ * Class Description: Gets all the data archieved for an attribute. Create a
+ * dynamic attribute, retrieve data from database and prepare result for
+ * attribute_history call.
+ */
+
+public class GetAttDataClass extends Command implements TangoConst {
+	// ===============================================================
+	/**
+	 * Constructor for Command class GetAttDataClass
+	 * 
+	 * @param name
+	 *            command name
+	 * @param in
+	 *            argin type
+	 * @param out
+	 *            argout type
+	 */
+	// ===============================================================
+	public GetAttDataClass(final String name, final int in, final int out) {
+		super(name, in, out);
+	}
+
+	// ===============================================================
+	/**
+	 * Constructor for Command class GetAttDataClass
+	 * 
+	 * @param name
+	 *            command name
+	 * @param in
+	 *            argin type
+	 * @param in_comments
+	 *            argin description
+	 * @param out
+	 *            argout type
+	 * @param out_comments
+	 *            argout description
+	 */
+	// ===============================================================
+	public GetAttDataClass(final String name, final int in, final int out, final String in_comments, final String out_comments) {
+		super(name, in, out, in_comments, out_comments);
+	}
+
+	// ===============================================================
+	/**
+	 * Constructor for Command class GetAttDataClass
+	 * 
+	 * @param name
+	 *            command name
+	 * @param in
+	 *            argin type
+	 * @param in_comments
+	 *            argin description
+	 * @param out
+	 *            argout type
+	 * @param out_comments
+	 *            argout description
+	 * @param level
+	 *            The command display type OPERATOR or EXPERT
+	 */
+	// ===============================================================
+	public GetAttDataClass(final String name, final int in, final int out, final String in_comments, final String out_comments, final DispLevel level) {
+		super(name, in, out, in_comments, out_comments, level);
+	}
+
+	// ===============================================================
+	/**
+	 * return the result of the device's command.
+	 */
+	// ===============================================================
+	@Override
+	public Any execute(final DeviceImpl device, final Any in_any) throws DevFailed {
+		Util.out2.println("GetAttDataClass.execute(): arrived");
+		final String argin = extract_DevString(in_any);
+
+		if (!(device instanceof HdbExtractor)) {
+			Except.throw_exception("DEVICE_ERROR", "Device parameter is not instance of HdbExtractor", "HdbExtractor");
+		}
+
+		return insert(((HdbExtractor) device).get_att_data(argin));
+	}
+
+	// ===============================================================
+	/**
+	 * Check if it is allowed to execute the command.
+	 */
+	// ===============================================================
+	@Override
+	public boolean is_allowed(final DeviceImpl device, final Any data_in) {
+		// End of Generated Code
+
+		// Re-Start of Generated Code
+		return true;
+	}
+}
+
+// -----------------------------------------------------------------------------
+/*
+ * end of $Source:
+ * /cvsroot/tango-cs/tango/jserver/archiving/HdbExtractor/GetAttDataClass.java,v
+ * $
+ */
diff --git a/src/main/java/HdbExtractor/GetAttDataCountClass.java b/hdbextractor/src/main/java/HdbExtractor/GetAttDataCountClass.java
similarity index 96%
rename from src/main/java/HdbExtractor/GetAttDataCountClass.java
rename to hdbextractor/src/main/java/HdbExtractor/GetAttDataCountClass.java
index ac9bb150c2b575a0a12e6fac83834ef632b1a5d5..0de318d665a6ca30e1d25a6d8e0ae9cd0167913b 100644
--- a/src/main/java/HdbExtractor/GetAttDataCountClass.java
+++ b/hdbextractor/src/main/java/HdbExtractor/GetAttDataCountClass.java
@@ -1,151 +1,151 @@
-//+======================================================================
-// $Source: /cvsroot/tango-cs/tango/jserver/archiving/HdbExtractor/GetAttDataCountClass.java,v $
-//
-// Project:      Tango Device Server
-//
-// Description:  Java source code for the command TemplateClass of the
-//               HdbExtractor class.
-//
-// $Author: chinkumo $
-//
-// $Revision: 1.3 $
-//
-// $Log: GetAttDataCountClass.java,v $
-// Revision 1.3  2005/11/29 16:17:37  chinkumo
-// Code reformated (pogo compatible)
-//
-// Revision 1.2  2005/11/15 13:45:51  chinkumo
-// ...
-//
-// Revision 1.1  2005/09/09 10:03:21  chinkumo
-// First commit !
-// (Dynamic attribut release)
-//
-//
-// copyleft :    European Synchrotron Radiation Facility
-//               BP 220, Grenoble 38043
-//               FRANCE
-//
-//-======================================================================
-//
-//  		This file is generated by POGO
-//	(Program Obviously used to Generate tango Object)
-//
-//         (c) - Software Engineering Group - ESRF
-//=============================================================================
-
-/**
- * @author	$Author: chinkumo $
- * @version	$Revision: 1.3 $
- */
-package HdbExtractor;
-
-import org.omg.CORBA.Any;
-
-import fr.esrf.Tango.DevFailed;
-import fr.esrf.Tango.DispLevel;
-import fr.esrf.TangoDs.Command;
-import fr.esrf.TangoDs.DeviceImpl;
-import fr.esrf.TangoDs.Except;
-import fr.esrf.TangoDs.TangoConst;
-import fr.esrf.TangoDs.Util;
-
-/**
- * Class Description: Returns the number of the data archieved for an attribute.
- */
-
-public class GetAttDataCountClass extends Command implements TangoConst {
-	// ===============================================================
-	/**
-	 * Constructor for Command class GetAttDataCountClass
-	 * 
-	 * @param name
-	 *            command name
-	 * @param in
-	 *            argin type
-	 * @param out
-	 *            argout type
-	 */
-	// ===============================================================
-	public GetAttDataCountClass(final String name, final int in, final int out) {
-		super(name, in, out);
-	}
-
-	// ===============================================================
-	/**
-	 * Constructor for Command class GetAttDataCountClass
-	 * 
-	 * @param name
-	 *            command name
-	 * @param in
-	 *            argin type
-	 * @param in_comments
-	 *            argin description
-	 * @param out
-	 *            argout type
-	 * @param out_comments
-	 *            argout description
-	 */
-	// ===============================================================
-	public GetAttDataCountClass(final String name, final int in, final int out, final String in_comments, final String out_comments) {
-		super(name, in, out, in_comments, out_comments);
-	}
-
-	// ===============================================================
-	/**
-	 * Constructor for Command class GetAttDataCountClass
-	 * 
-	 * @param name
-	 *            command name
-	 * @param in
-	 *            argin type
-	 * @param in_comments
-	 *            argin description
-	 * @param out
-	 *            argout type
-	 * @param out_comments
-	 *            argout description
-	 * @param level
-	 *            The command display type OPERATOR or EXPERT
-	 */
-	// ===============================================================
-	public GetAttDataCountClass(final String name, final int in, final int out, final String in_comments, final String out_comments, final DispLevel level) {
-		super(name, in, out, in_comments, out_comments, level);
-	}
-
-	// ===============================================================
-	/**
-	 * return the result of the device's command.
-	 */
-	// ===============================================================
-	@Override
-	public Any execute(final DeviceImpl device, final Any in_any) throws DevFailed {
-		Util.out2.println("GetAttDataCountClass.execute(): arrived");
-		final String argin = extract_DevString(in_any);
-		if (!(device instanceof HdbExtractor)) {
-			Except.throw_exception("DEVICE_ERROR", "Device parameter is not instance of HdbExtractor", "HdbExtractor");
-		}
-
-		return insert(((HdbExtractor) device).get_att_data_count(argin));
-	}
-
-	// ===============================================================
-	/**
-	 * Check if it is allowed to execute the command.
-	 */
-	// ===============================================================
-	@Override
-	public boolean is_allowed(final DeviceImpl device, final Any data_in) {
-		// End of Generated Code
-
-		// Re-Start of Generated Code
-		return true;
-	}
-}
-
-// -----------------------------------------------------------------------------
-/*
- * end of $Source:
- * /cvsroot/tango-cs/tango/jserver/archiving/HdbExtractor/GetAttDataCountClass
- * .java,v $
- */
+//+======================================================================
+// $Source: /cvsroot/tango-cs/tango/jserver/archiving/HdbExtractor/GetAttDataCountClass.java,v $
+//
+// Project:      Tango Device Server
+//
+// Description:  Java source code for the command TemplateClass of the
+//               HdbExtractor class.
+//
+// $Author: chinkumo $
+//
+// $Revision: 1.3 $
+//
+// $Log: GetAttDataCountClass.java,v $
+// Revision 1.3  2005/11/29 16:17:37  chinkumo
+// Code reformated (pogo compatible)
+//
+// Revision 1.2  2005/11/15 13:45:51  chinkumo
+// ...
+//
+// Revision 1.1  2005/09/09 10:03:21  chinkumo
+// First commit !
+// (Dynamic attribut release)
+//
+//
+// copyleft :    European Synchrotron Radiation Facility
+//               BP 220, Grenoble 38043
+//               FRANCE
+//
+//-======================================================================
+//
+//  		This file is generated by POGO
+//	(Program Obviously used to Generate tango Object)
+//
+//         (c) - Software Engineering Group - ESRF
+//=============================================================================
+
+/**
+ * @author	$Author: chinkumo $
+ * @version	$Revision: 1.3 $
+ */
+package HdbExtractor;
+
+import org.omg.CORBA.Any;
+
+import fr.esrf.Tango.DevFailed;
+import fr.esrf.Tango.DispLevel;
+import fr.esrf.TangoDs.Command;
+import fr.esrf.TangoDs.DeviceImpl;
+import fr.esrf.TangoDs.Except;
+import fr.esrf.TangoDs.TangoConst;
+import fr.esrf.TangoDs.Util;
+
+/**
+ * Class Description: Returns the number of the data archieved for an attribute.
+ */
+
+public class GetAttDataCountClass extends Command implements TangoConst {
+	// ===============================================================
+	/**
+	 * Constructor for Command class GetAttDataCountClass
+	 * 
+	 * @param name
+	 *            command name
+	 * @param in
+	 *            argin type
+	 * @param out
+	 *            argout type
+	 */
+	// ===============================================================
+	public GetAttDataCountClass(final String name, final int in, final int out) {
+		super(name, in, out);
+	}
+
+	// ===============================================================
+	/**
+	 * Constructor for Command class GetAttDataCountClass
+	 * 
+	 * @param name
+	 *            command name
+	 * @param in
+	 *            argin type
+	 * @param in_comments
+	 *            argin description
+	 * @param out
+	 *            argout type
+	 * @param out_comments
+	 *            argout description
+	 */
+	// ===============================================================
+	public GetAttDataCountClass(final String name, final int in, final int out, final String in_comments, final String out_comments) {
+		super(name, in, out, in_comments, out_comments);
+	}
+
+	// ===============================================================
+	/**
+	 * Constructor for Command class GetAttDataCountClass
+	 * 
+	 * @param name
+	 *            command name
+	 * @param in
+	 *            argin type
+	 * @param in_comments
+	 *            argin description
+	 * @param out
+	 *            argout type
+	 * @param out_comments
+	 *            argout description
+	 * @param level
+	 *            The command display type OPERATOR or EXPERT
+	 */
+	// ===============================================================
+	public GetAttDataCountClass(final String name, final int in, final int out, final String in_comments, final String out_comments, final DispLevel level) {
+		super(name, in, out, in_comments, out_comments, level);
+	}
+
+	// ===============================================================
+	/**
+	 * return the result of the device's command.
+	 */
+	// ===============================================================
+	@Override
+	public Any execute(final DeviceImpl device, final Any in_any) throws DevFailed {
+		Util.out2.println("GetAttDataCountClass.execute(): arrived");
+		final String argin = extract_DevString(in_any);
+		if (!(device instanceof HdbExtractor)) {
+			Except.throw_exception("DEVICE_ERROR", "Device parameter is not instance of HdbExtractor", "HdbExtractor");
+		}
+
+		return insert(((HdbExtractor) device).get_att_data_count(argin));
+	}
+
+	// ===============================================================
+	/**
+	 * Check if it is allowed to execute the command.
+	 */
+	// ===============================================================
+	@Override
+	public boolean is_allowed(final DeviceImpl device, final Any data_in) {
+		// End of Generated Code
+
+		// Re-Start of Generated Code
+		return true;
+	}
+}
+
+// -----------------------------------------------------------------------------
+/*
+ * end of $Source:
+ * /cvsroot/tango-cs/tango/jserver/archiving/HdbExtractor/GetAttDataCountClass
+ * .java,v $
+ */
diff --git a/src/main/java/HdbExtractor/GetAttDataInfOrSupThanBetweenDatesClass.java b/hdbextractor/src/main/java/HdbExtractor/GetAttDataInfOrSupThanBetweenDatesClass.java
similarity index 97%
rename from src/main/java/HdbExtractor/GetAttDataInfOrSupThanBetweenDatesClass.java
rename to hdbextractor/src/main/java/HdbExtractor/GetAttDataInfOrSupThanBetweenDatesClass.java
index 47042130e882123232c26f918a2a307f6b4de9db..5f082032967dbad8bc2616aed5cdd653e167bf6a 100644
--- a/src/main/java/HdbExtractor/GetAttDataInfOrSupThanBetweenDatesClass.java
+++ b/hdbextractor/src/main/java/HdbExtractor/GetAttDataInfOrSupThanBetweenDatesClass.java
@@ -1,153 +1,153 @@
-//+======================================================================
-// $Source: /cvsroot/tango-cs/tango/jserver/archiving/HdbExtractor/GetAttDataInfOrSupThanBetweenDatesClass.java,v $
-//
-// Project:      Tango Device Server
-//
-// Description:  Java source code for the command TemplateClass of the
-//               HdbExtractor class.
-//
-// $Author: chinkumo $
-//
-// $Revision: 1.3 $
-//
-// $Log: GetAttDataInfOrSupThanBetweenDatesClass.java,v $
-// Revision 1.3  2005/11/29 16:17:37  chinkumo
-// Code reformated (pogo compatible)
-//
-// Revision 1.2  2005/11/15 13:45:51  chinkumo
-// ...
-//
-// Revision 1.1  2005/09/09 10:03:21  chinkumo
-// First commit !
-// (Dynamic attribut release)
-//
-//
-// copyleft :    European Synchrotron Radiation Facility
-//               BP 220, Grenoble 38043
-//               FRANCE
-//
-//-======================================================================
-//
-//  		This file is generated by POGO
-//	(Program Obviously used to Generate tango Object)
-//
-//         (c) - Software Engineering Group - ESRF
-//=============================================================================
-
-/**
- * @author	$Author: chinkumo $
- * @version	$Revision: 1.3 $
- */
-package HdbExtractor;
-
-import org.omg.CORBA.Any;
-
-import fr.esrf.Tango.DevFailed;
-import fr.esrf.Tango.DispLevel;
-import fr.esrf.TangoDs.Command;
-import fr.esrf.TangoDs.DeviceImpl;
-import fr.esrf.TangoDs.Except;
-import fr.esrf.TangoDs.TangoConst;
-import fr.esrf.TangoDs.Util;
-
-/**
- * Class Description: Retrieves data beetwen two dates (date_1 & date_2) - Data
- * are lower than the given value x OR higher than the given value y. Create a
- * dynamic attribute, retrieve the corresponding data from database and prepare
- * result for attribute_history call.
- */
-
-public class GetAttDataInfOrSupThanBetweenDatesClass extends Command implements TangoConst {
-	// ===============================================================
-	/**
-	 * Constructor for Command class GetAttDataInfOrSupThanBetweenDatesClass
-	 * 
-	 * @param name
-	 *            command name
-	 * @param in
-	 *            argin type
-	 * @param out
-	 *            argout type
-	 */
-	// ===============================================================
-	public GetAttDataInfOrSupThanBetweenDatesClass(final String name, final int in, final int out) {
-		super(name, in, out);
-	}
-
-	// ===============================================================
-	/**
-	 * Constructor for Command class GetAttDataInfOrSupThanBetweenDatesClass
-	 * 
-	 * @param name
-	 *            command name
-	 * @param in
-	 *            argin type
-	 * @param in_comments
-	 *            argin description
-	 * @param out
-	 *            argout type
-	 * @param out_comments
-	 *            argout description
-	 */
-	// ===============================================================
-	public GetAttDataInfOrSupThanBetweenDatesClass(final String name, final int in, final int out, final String in_comments, final String out_comments) {
-		super(name, in, out, in_comments, out_comments);
-	}
-
-	// ===============================================================
-	/**
-	 * Constructor for Command class GetAttDataInfOrSupThanBetweenDatesClass
-	 * 
-	 * @param name
-	 *            command name
-	 * @param in
-	 *            argin type
-	 * @param in_comments
-	 *            argin description
-	 * @param out
-	 *            argout type
-	 * @param out_comments
-	 *            argout description
-	 * @param level
-	 *            The command display type OPERATOR or EXPERT
-	 */
-	// ===============================================================
-	public GetAttDataInfOrSupThanBetweenDatesClass(final String name, final int in, final int out, final String in_comments, final String out_comments, final DispLevel level) {
-		super(name, in, out, in_comments, out_comments, level);
-	}
-
-	// ===============================================================
-	/**
-	 * return the result of the device's command.
-	 */
-	// ===============================================================
-	@Override
-	public Any execute(final DeviceImpl device, final Any in_any) throws DevFailed {
-		Util.out2.println("GetAttDataInfOrSupThanBetweenDatesClass.execute(): arrived");
-		final String[] argin = extract_DevVarStringArray(in_any);
-		if (!(device instanceof HdbExtractor)) {
-			Except.throw_exception("DEVICE_ERROR", "Device parameter is not instance of HdbExtractor", "HdbExtractor");
-		}
-
-		return insert(((HdbExtractor) device).get_att_data_inf_or_sup_than_between_dates(argin));
-	}
-
-	// ===============================================================
-	/**
-	 * Check if it is allowed to execute the command.
-	 */
-	// ===============================================================
-	@Override
-	public boolean is_allowed(final DeviceImpl device, final Any data_in) {
-		// End of Generated Code
-
-		// Re-Start of Generated Code
-		return true;
-	}
-}
-
-// -----------------------------------------------------------------------------
-/*
- * end of $Source:/cvsroot/tango-cs/tango/jserver/archiving/HdbExtractor/
- * GetAttDataInfOrSupThanBetweenDatesClass.java,v $
- */
+//+======================================================================
+// $Source: /cvsroot/tango-cs/tango/jserver/archiving/HdbExtractor/GetAttDataInfOrSupThanBetweenDatesClass.java,v $
+//
+// Project:      Tango Device Server
+//
+// Description:  Java source code for the command TemplateClass of the
+//               HdbExtractor class.
+//
+// $Author: chinkumo $
+//
+// $Revision: 1.3 $
+//
+// $Log: GetAttDataInfOrSupThanBetweenDatesClass.java,v $
+// Revision 1.3  2005/11/29 16:17:37  chinkumo
+// Code reformated (pogo compatible)
+//
+// Revision 1.2  2005/11/15 13:45:51  chinkumo
+// ...
+//
+// Revision 1.1  2005/09/09 10:03:21  chinkumo
+// First commit !
+// (Dynamic attribut release)
+//
+//
+// copyleft :    European Synchrotron Radiation Facility
+//               BP 220, Grenoble 38043
+//               FRANCE
+//
+//-======================================================================
+//
+//  		This file is generated by POGO
+//	(Program Obviously used to Generate tango Object)
+//
+//         (c) - Software Engineering Group - ESRF
+//=============================================================================
+
+/**
+ * @author	$Author: chinkumo $
+ * @version	$Revision: 1.3 $
+ */
+package HdbExtractor;
+
+import org.omg.CORBA.Any;
+
+import fr.esrf.Tango.DevFailed;
+import fr.esrf.Tango.DispLevel;
+import fr.esrf.TangoDs.Command;
+import fr.esrf.TangoDs.DeviceImpl;
+import fr.esrf.TangoDs.Except;
+import fr.esrf.TangoDs.TangoConst;
+import fr.esrf.TangoDs.Util;
+
+/**
+ * Class Description: Retrieves data beetwen two dates (date_1 & date_2) - Data
+ * are lower than the given value x OR higher than the given value y. Create a
+ * dynamic attribute, retrieve the corresponding data from database and prepare
+ * result for attribute_history call.
+ */
+
+public class GetAttDataInfOrSupThanBetweenDatesClass extends Command implements TangoConst {
+	// ===============================================================
+	/**
+	 * Constructor for Command class GetAttDataInfOrSupThanBetweenDatesClass
+	 * 
+	 * @param name
+	 *            command name
+	 * @param in
+	 *            argin type
+	 * @param out
+	 *            argout type
+	 */
+	// ===============================================================
+	public GetAttDataInfOrSupThanBetweenDatesClass(final String name, final int in, final int out) {
+		super(name, in, out);
+	}
+
+	// ===============================================================
+	/**
+	 * Constructor for Command class GetAttDataInfOrSupThanBetweenDatesClass
+	 * 
+	 * @param name
+	 *            command name
+	 * @param in
+	 *            argin type
+	 * @param in_comments
+	 *            argin description
+	 * @param out
+	 *            argout type
+	 * @param out_comments
+	 *            argout description
+	 */
+	// ===============================================================
+	public GetAttDataInfOrSupThanBetweenDatesClass(final String name, final int in, final int out, final String in_comments, final String out_comments) {
+		super(name, in, out, in_comments, out_comments);
+	}
+
+	// ===============================================================
+	/**
+	 * Constructor for Command class GetAttDataInfOrSupThanBetweenDatesClass
+	 * 
+	 * @param name
+	 *            command name
+	 * @param in
+	 *            argin type
+	 * @param in_comments
+	 *            argin description
+	 * @param out
+	 *            argout type
+	 * @param out_comments
+	 *            argout description
+	 * @param level
+	 *            The command display type OPERATOR or EXPERT
+	 */
+	// ===============================================================
+	public GetAttDataInfOrSupThanBetweenDatesClass(final String name, final int in, final int out, final String in_comments, final String out_comments, final DispLevel level) {
+		super(name, in, out, in_comments, out_comments, level);
+	}
+
+	// ===============================================================
+	/**
+	 * return the result of the device's command.
+	 */
+	// ===============================================================
+	@Override
+	public Any execute(final DeviceImpl device, final Any in_any) throws DevFailed {
+		Util.out2.println("GetAttDataInfOrSupThanBetweenDatesClass.execute(): arrived");
+		final String[] argin = extract_DevVarStringArray(in_any);
+		if (!(device instanceof HdbExtractor)) {
+			Except.throw_exception("DEVICE_ERROR", "Device parameter is not instance of HdbExtractor", "HdbExtractor");
+		}
+
+		return insert(((HdbExtractor) device).get_att_data_inf_or_sup_than_between_dates(argin));
+	}
+
+	// ===============================================================
+	/**
+	 * Check if it is allowed to execute the command.
+	 */
+	// ===============================================================
+	@Override
+	public boolean is_allowed(final DeviceImpl device, final Any data_in) {
+		// End of Generated Code
+
+		// Re-Start of Generated Code
+		return true;
+	}
+}
+
+// -----------------------------------------------------------------------------
+/*
+ * end of $Source:/cvsroot/tango-cs/tango/jserver/archiving/HdbExtractor/
+ * GetAttDataInfOrSupThanBetweenDatesClass.java,v $
+ */
diff --git a/src/main/java/HdbExtractor/GetAttDataInfOrSupThanBetweenDatesCountClass.java b/hdbextractor/src/main/java/HdbExtractor/GetAttDataInfOrSupThanBetweenDatesCountClass.java
similarity index 96%
rename from src/main/java/HdbExtractor/GetAttDataInfOrSupThanBetweenDatesCountClass.java
rename to hdbextractor/src/main/java/HdbExtractor/GetAttDataInfOrSupThanBetweenDatesCountClass.java
index 1b050a022403966a19bc6df63ce259d226c33bcb..67c801445152e43a30a7aacbcfc46964a07dbd4c 100644
--- a/src/main/java/HdbExtractor/GetAttDataInfOrSupThanBetweenDatesCountClass.java
+++ b/hdbextractor/src/main/java/HdbExtractor/GetAttDataInfOrSupThanBetweenDatesCountClass.java
@@ -1,155 +1,155 @@
-//+======================================================================
-// $Source: /cvsroot/tango-cs/tango/jserver/archiving/HdbExtractor/GetAttDataInfOrSupThanBetweenDatesCountClass.java,v $
-//
-// Project:      Tango Device Server
-//
-// Description:  Java source code for the command TemplateClass of the
-//               HdbExtractor class.
-//
-// $Author: chinkumo $
-//
-// $Revision: 1.3 $
-//
-// $Log: GetAttDataInfOrSupThanBetweenDatesCountClass.java,v $
-// Revision 1.3  2005/11/29 16:17:37  chinkumo
-// Code reformated (pogo compatible)
-//
-// Revision 1.2  2005/11/15 13:45:51  chinkumo
-// ...
-//
-// Revision 1.1  2005/09/09 10:03:21  chinkumo
-// First commit !
-// (Dynamic attribut release)
-//
-//
-// copyleft :    European Synchrotron Radiation Facility
-//               BP 220, Grenoble 38043
-//               FRANCE
-//
-//-======================================================================
-//
-//  		This file is generated by POGO
-//	(Program Obviously used to Generate tango Object)
-//
-//         (c) - Software Engineering Group - ESRF
-//=============================================================================
-
-/**
- * @author	$Author: chinkumo $
- * @version	$Revision: 1.3 $
- */
-package HdbExtractor;
-
-import org.omg.CORBA.Any;
-
-import fr.esrf.Tango.DevFailed;
-import fr.esrf.Tango.DispLevel;
-import fr.esrf.TangoDs.Command;
-import fr.esrf.TangoDs.DeviceImpl;
-import fr.esrf.TangoDs.Except;
-import fr.esrf.TangoDs.TangoConst;
-import fr.esrf.TangoDs.Util;
-
-/**
- * Class Description: Returns the number of data beetwen two dates (date_1 &
- * date_2). Data are lower than the given value x OR higher than the given value
- * y.
- */
-
-public class GetAttDataInfOrSupThanBetweenDatesCountClass extends Command implements TangoConst {
-	// ===============================================================
-	/**
-	 * Constructor for Command class
-	 * GetAttDataInfOrSupThanBetweenDatesCountClass
-	 * 
-	 * @param name
-	 *            command name
-	 * @param in
-	 *            argin type
-	 * @param out
-	 *            argout type
-	 */
-	// ===============================================================
-	public GetAttDataInfOrSupThanBetweenDatesCountClass(final String name, final int in, final int out) {
-		super(name, in, out);
-	}
-
-	// ===============================================================
-	/**
-	 * Constructor for Command class
-	 * GetAttDataInfOrSupThanBetweenDatesCountClass
-	 * 
-	 * @param name
-	 *            command name
-	 * @param in
-	 *            argin type
-	 * @param in_comments
-	 *            argin description
-	 * @param out
-	 *            argout type
-	 * @param out_comments
-	 *            argout description
-	 */
-	// ===============================================================
-	public GetAttDataInfOrSupThanBetweenDatesCountClass(final String name, final int in, final int out, final String in_comments, final String out_comments) {
-		super(name, in, out, in_comments, out_comments);
-	}
-
-	// ===============================================================
-	/**
-	 * Constructor for Command class
-	 * GetAttDataInfOrSupThanBetweenDatesCountClass
-	 * 
-	 * @param name
-	 *            command name
-	 * @param in
-	 *            argin type
-	 * @param in_comments
-	 *            argin description
-	 * @param out
-	 *            argout type
-	 * @param out_comments
-	 *            argout description
-	 * @param level
-	 *            The command display type OPERATOR or EXPERT
-	 */
-	// ===============================================================
-	public GetAttDataInfOrSupThanBetweenDatesCountClass(final String name, final int in, final int out, final String in_comments, final String out_comments, final DispLevel level) {
-		super(name, in, out, in_comments, out_comments, level);
-	}
-
-	// ===============================================================
-	/**
-	 * return the result of the device's command.
-	 */
-	// ===============================================================
-	@Override
-	public Any execute(final DeviceImpl device, final Any in_any) throws DevFailed {
-		Util.out2.println("GetAttDataInfOrSupThanBetweenDatesCountClass.execute(): arrived");
-		final String[] argin = extract_DevVarStringArray(in_any);
-		if (!(device instanceof HdbExtractor)) {
-			Except.throw_exception("DEVICE_ERROR", "Device parameter is not instance of HdbExtractor", "HdbExtractor");
-		}
-
-		return insert(((HdbExtractor) device).get_att_data_inf_or_sup_than_between_dates_count(argin));
-	}
-
-	// ===============================================================
-	/**
-	 * Check if it is allowed to execute the command.
-	 */
-	// ===============================================================
-	@Override
-	public boolean is_allowed(final DeviceImpl device, final Any data_in) {
-		// End of Generated Code
-
-		// Re-Start of Generated Code
-		return true;
-	}
-}
-
-// -----------------------------------------------------------------------------
-/*
- * end of $Source:/cvsroot/tango-cs/tango/jserver/archiving/HdbExtractor/
- * GetAttDataInfOrSupThanBetweenDatesCountClass.java,v $
- */
+//+======================================================================
+// $Source: /cvsroot/tango-cs/tango/jserver/archiving/HdbExtractor/GetAttDataInfOrSupThanBetweenDatesCountClass.java,v $
+//
+// Project:      Tango Device Server
+//
+// Description:  Java source code for the command TemplateClass of the
+//               HdbExtractor class.
+//
+// $Author: chinkumo $
+//
+// $Revision: 1.3 $
+//
+// $Log: GetAttDataInfOrSupThanBetweenDatesCountClass.java,v $
+// Revision 1.3  2005/11/29 16:17:37  chinkumo
+// Code reformated (pogo compatible)
+//
+// Revision 1.2  2005/11/15 13:45:51  chinkumo
+// ...
+//
+// Revision 1.1  2005/09/09 10:03:21  chinkumo
+// First commit !
+// (Dynamic attribut release)
+//
+//
+// copyleft :    European Synchrotron Radiation Facility
+//               BP 220, Grenoble 38043
+//               FRANCE
+//
+//-======================================================================
+//
+//  		This file is generated by POGO
+//	(Program Obviously used to Generate tango Object)
+//
+//         (c) - Software Engineering Group - ESRF
+//=============================================================================
+
+/**
+ * @author	$Author: chinkumo $
+ * @version	$Revision: 1.3 $
+ */
+package HdbExtractor;
+
+import org.omg.CORBA.Any;
+
+import fr.esrf.Tango.DevFailed;
+import fr.esrf.Tango.DispLevel;
+import fr.esrf.TangoDs.Command;
+import fr.esrf.TangoDs.DeviceImpl;
+import fr.esrf.TangoDs.Except;
+import fr.esrf.TangoDs.TangoConst;
+import fr.esrf.TangoDs.Util;
+
+/**
+ * Class Description: Returns the number of data beetwen two dates (date_1 &
+ * date_2). Data are lower than the given value x OR higher than the given value
+ * y.
+ */
+
+public class GetAttDataInfOrSupThanBetweenDatesCountClass extends Command implements TangoConst {
+	// ===============================================================
+	/**
+	 * Constructor for Command class
+	 * GetAttDataInfOrSupThanBetweenDatesCountClass
+	 * 
+	 * @param name
+	 *            command name
+	 * @param in
+	 *            argin type
+	 * @param out
+	 *            argout type
+	 */
+	// ===============================================================
+	public GetAttDataInfOrSupThanBetweenDatesCountClass(final String name, final int in, final int out) {
+		super(name, in, out);
+	}
+
+	// ===============================================================
+	/**
+	 * Constructor for Command class
+	 * GetAttDataInfOrSupThanBetweenDatesCountClass
+	 * 
+	 * @param name
+	 *            command name
+	 * @param in
+	 *            argin type
+	 * @param in_comments
+	 *            argin description
+	 * @param out
+	 *            argout type
+	 * @param out_comments
+	 *            argout description
+	 */
+	// ===============================================================
+	public GetAttDataInfOrSupThanBetweenDatesCountClass(final String name, final int in, final int out, final String in_comments, final String out_comments) {
+		super(name, in, out, in_comments, out_comments);
+	}
+
+	// ===============================================================
+	/**
+	 * Constructor for Command class
+	 * GetAttDataInfOrSupThanBetweenDatesCountClass
+	 * 
+	 * @param name
+	 *            command name
+	 * @param in
+	 *            argin type
+	 * @param in_comments
+	 *            argin description
+	 * @param out
+	 *            argout type
+	 * @param out_comments
+	 *            argout description
+	 * @param level
+	 *            The command display type OPERATOR or EXPERT
+	 */
+	// ===============================================================
+	public GetAttDataInfOrSupThanBetweenDatesCountClass(final String name, final int in, final int out, final String in_comments, final String out_comments, final DispLevel level) {
+		super(name, in, out, in_comments, out_comments, level);
+	}
+
+	// ===============================================================
+	/**
+	 * return the result of the device's command.
+	 */
+	// ===============================================================
+	@Override
+	public Any execute(final DeviceImpl device, final Any in_any) throws DevFailed {
+		Util.out2.println("GetAttDataInfOrSupThanBetweenDatesCountClass.execute(): arrived");
+		final String[] argin = extract_DevVarStringArray(in_any);
+		if (!(device instanceof HdbExtractor)) {
+			Except.throw_exception("DEVICE_ERROR", "Device parameter is not instance of HdbExtractor", "HdbExtractor");
+		}
+
+		return insert(((HdbExtractor) device).get_att_data_inf_or_sup_than_between_dates_count(argin));
+	}
+
+	// ===============================================================
+	/**
+	 * Check if it is allowed to execute the command.
+	 */
+	// ===============================================================
+	@Override
+	public boolean is_allowed(final DeviceImpl device, final Any data_in) {
+		// End of Generated Code
+
+		// Re-Start of Generated Code
+		return true;
+	}
+}
+
+// -----------------------------------------------------------------------------
+/*
+ * end of $Source:/cvsroot/tango-cs/tango/jserver/archiving/HdbExtractor/
+ * GetAttDataInfOrSupThanBetweenDatesCountClass.java,v $
+ */
diff --git a/src/main/java/HdbExtractor/GetAttDataInfOrSupThanClass.java b/hdbextractor/src/main/java/HdbExtractor/GetAttDataInfOrSupThanClass.java
similarity index 96%
rename from src/main/java/HdbExtractor/GetAttDataInfOrSupThanClass.java
rename to hdbextractor/src/main/java/HdbExtractor/GetAttDataInfOrSupThanClass.java
index 3d740814ea2350ace75b6453af501f1453c355b5..7aa2bedfb65c9e07e73b85b007982bdac02e55c7 100644
--- a/src/main/java/HdbExtractor/GetAttDataInfOrSupThanClass.java
+++ b/hdbextractor/src/main/java/HdbExtractor/GetAttDataInfOrSupThanClass.java
@@ -1,153 +1,153 @@
-//+======================================================================
-// $Source: /cvsroot/tango-cs/tango/jserver/archiving/HdbExtractor/GetAttDataInfOrSupThanClass.java,v $
-//
-// Project:      Tango Device Server
-//
-// Description:  Java source code for the command TemplateClass of the
-//               HdbExtractor class.
-//
-// $Author: chinkumo $
-//
-// $Revision: 1.3 $
-//
-// $Log: GetAttDataInfOrSupThanClass.java,v $
-// Revision 1.3  2005/11/29 16:17:37  chinkumo
-// Code reformated (pogo compatible)
-//
-// Revision 1.2  2005/11/15 13:45:51  chinkumo
-// ...
-//
-// Revision 1.1  2005/09/09 10:03:21  chinkumo
-// First commit !
-// (Dynamic attribut release)
-//
-//
-// copyleft :    European Synchrotron Radiation Facility
-//               BP 220, Grenoble 38043
-//               FRANCE
-//
-//-======================================================================
-//
-//  		This file is generated by POGO
-//	(Program Obviously used to Generate tango Object)
-//
-//         (c) - Software Engineering Group - ESRF
-//=============================================================================
-
-/**
- * @author	$Author: chinkumo $
- * @version	$Revision: 1.3 $
- */
-package HdbExtractor;
-
-import org.omg.CORBA.Any;
-
-import fr.esrf.Tango.DevFailed;
-import fr.esrf.Tango.DispLevel;
-import fr.esrf.TangoDs.Command;
-import fr.esrf.TangoDs.DeviceImpl;
-import fr.esrf.TangoDs.Except;
-import fr.esrf.TangoDs.TangoConst;
-import fr.esrf.TangoDs.Util;
-
-/**
- * Class Description: Retrieves all data that are lower than the given value x
- * OR higher than the given value y. Create a dynamic attribute, retrieve the
- * corresponding data from database and prepare result for attribute_history
- * call.
- */
-
-public class GetAttDataInfOrSupThanClass extends Command implements TangoConst {
-	// ===============================================================
-	/**
-	 * Constructor for Command class GetAttDataInfOrSupThanClass
-	 * 
-	 * @param name
-	 *            command name
-	 * @param in
-	 *            argin type
-	 * @param out
-	 *            argout type
-	 */
-	// ===============================================================
-	public GetAttDataInfOrSupThanClass(final String name, final int in, final int out) {
-		super(name, in, out);
-	}
-
-	// ===============================================================
-	/**
-	 * Constructor for Command class GetAttDataInfOrSupThanClass
-	 * 
-	 * @param name
-	 *            command name
-	 * @param in
-	 *            argin type
-	 * @param in_comments
-	 *            argin description
-	 * @param out
-	 *            argout type
-	 * @param out_comments
-	 *            argout description
-	 */
-	// ===============================================================
-	public GetAttDataInfOrSupThanClass(final String name, final int in, final int out, final String in_comments, final String out_comments) {
-		super(name, in, out, in_comments, out_comments);
-	}
-
-	// ===============================================================
-	/**
-	 * Constructor for Command class GetAttDataInfOrSupThanClass
-	 * 
-	 * @param name
-	 *            command name
-	 * @param in
-	 *            argin type
-	 * @param in_comments
-	 *            argin description
-	 * @param out
-	 *            argout type
-	 * @param out_comments
-	 *            argout description
-	 * @param level
-	 *            The command display type OPERATOR or EXPERT
-	 */
-	// ===============================================================
-	public GetAttDataInfOrSupThanClass(final String name, final int in, final int out, final String in_comments, final String out_comments, final DispLevel level) {
-		super(name, in, out, in_comments, out_comments, level);
-	}
-
-	// ===============================================================
-	/**
-	 * return the result of the device's command.
-	 */
-	// ===============================================================
-	@Override
-	public Any execute(final DeviceImpl device, final Any in_any) throws DevFailed {
-		Util.out2.println("GetAttDataInfOrSupThanClass.execute(): arrived");
-		final String[] argin = extract_DevVarStringArray(in_any);
-		if (!(device instanceof HdbExtractor)) {
-			Except.throw_exception("DEVICE_ERROR", "Device parameter is not instance of HdbExtractor", "HdbExtractor");
-		}
-
-		return insert(((HdbExtractor) device).get_att_data_inf_or_sup_than(argin));
-	}
-
-	// ===============================================================
-	/**
-	 * Check if it is allowed to execute the command.
-	 */
-	// ===============================================================
-	@Override
-	public boolean is_allowed(final DeviceImpl device, final Any data_in) {
-		// End of Generated Code
-
-		// Re-Start of Generated Code
-		return true;
-	}
-}
-
-// -----------------------------------------------------------------------------
-/*
- * end of $Source:/cvsroot/tango-cs/tango/jserver/archiving/HdbExtractor/
- * GetAttDataInfOrSupThanClass.java,v $
- */
+//+======================================================================
+// $Source: /cvsroot/tango-cs/tango/jserver/archiving/HdbExtractor/GetAttDataInfOrSupThanClass.java,v $
+//
+// Project:      Tango Device Server
+//
+// Description:  Java source code for the command TemplateClass of the
+//               HdbExtractor class.
+//
+// $Author: chinkumo $
+//
+// $Revision: 1.3 $
+//
+// $Log: GetAttDataInfOrSupThanClass.java,v $
+// Revision 1.3  2005/11/29 16:17:37  chinkumo
+// Code reformated (pogo compatible)
+//
+// Revision 1.2  2005/11/15 13:45:51  chinkumo
+// ...
+//
+// Revision 1.1  2005/09/09 10:03:21  chinkumo
+// First commit !
+// (Dynamic attribut release)
+//
+//
+// copyleft :    European Synchrotron Radiation Facility
+//               BP 220, Grenoble 38043
+//               FRANCE
+//
+//-======================================================================
+//
+//  		This file is generated by POGO
+//	(Program Obviously used to Generate tango Object)
+//
+//         (c) - Software Engineering Group - ESRF
+//=============================================================================
+
+/**
+ * @author	$Author: chinkumo $
+ * @version	$Revision: 1.3 $
+ */
+package HdbExtractor;
+
+import org.omg.CORBA.Any;
+
+import fr.esrf.Tango.DevFailed;
+import fr.esrf.Tango.DispLevel;
+import fr.esrf.TangoDs.Command;
+import fr.esrf.TangoDs.DeviceImpl;
+import fr.esrf.TangoDs.Except;
+import fr.esrf.TangoDs.TangoConst;
+import fr.esrf.TangoDs.Util;
+
+/**
+ * Class Description: Retrieves all data that are lower than the given value x
+ * OR higher than the given value y. Create a dynamic attribute, retrieve the
+ * corresponding data from database and prepare result for attribute_history
+ * call.
+ */
+
+public class GetAttDataInfOrSupThanClass extends Command implements TangoConst {
+	// ===============================================================
+	/**
+	 * Constructor for Command class GetAttDataInfOrSupThanClass
+	 * 
+	 * @param name
+	 *            command name
+	 * @param in
+	 *            argin type
+	 * @param out
+	 *            argout type
+	 */
+	// ===============================================================
+	public GetAttDataInfOrSupThanClass(final String name, final int in, final int out) {
+		super(name, in, out);
+	}
+
+	// ===============================================================
+	/**
+	 * Constructor for Command class GetAttDataInfOrSupThanClass
+	 * 
+	 * @param name
+	 *            command name
+	 * @param in
+	 *            argin type
+	 * @param in_comments
+	 *            argin description
+	 * @param out
+	 *            argout type
+	 * @param out_comments
+	 *            argout description
+	 */
+	// ===============================================================
+	public GetAttDataInfOrSupThanClass(final String name, final int in, final int out, final String in_comments, final String out_comments) {
+		super(name, in, out, in_comments, out_comments);
+	}
+
+	// ===============================================================
+	/**
+	 * Constructor for Command class GetAttDataInfOrSupThanClass
+	 * 
+	 * @param name
+	 *            command name
+	 * @param in
+	 *            argin type
+	 * @param in_comments
+	 *            argin description
+	 * @param out
+	 *            argout type
+	 * @param out_comments
+	 *            argout description
+	 * @param level
+	 *            The command display type OPERATOR or EXPERT
+	 */
+	// ===============================================================
+	public GetAttDataInfOrSupThanClass(final String name, final int in, final int out, final String in_comments, final String out_comments, final DispLevel level) {
+		super(name, in, out, in_comments, out_comments, level);
+	}
+
+	// ===============================================================
+	/**
+	 * return the result of the device's command.
+	 */
+	// ===============================================================
+	@Override
+	public Any execute(final DeviceImpl device, final Any in_any) throws DevFailed {
+		Util.out2.println("GetAttDataInfOrSupThanClass.execute(): arrived");
+		final String[] argin = extract_DevVarStringArray(in_any);
+		if (!(device instanceof HdbExtractor)) {
+			Except.throw_exception("DEVICE_ERROR", "Device parameter is not instance of HdbExtractor", "HdbExtractor");
+		}
+
+		return insert(((HdbExtractor) device).get_att_data_inf_or_sup_than(argin));
+	}
+
+	// ===============================================================
+	/**
+	 * Check if it is allowed to execute the command.
+	 */
+	// ===============================================================
+	@Override
+	public boolean is_allowed(final DeviceImpl device, final Any data_in) {
+		// End of Generated Code
+
+		// Re-Start of Generated Code
+		return true;
+	}
+}
+
+// -----------------------------------------------------------------------------
+/*
+ * end of $Source:/cvsroot/tango-cs/tango/jserver/archiving/HdbExtractor/
+ * GetAttDataInfOrSupThanClass.java,v $
+ */
diff --git a/src/main/java/HdbExtractor/GetAttDataInfOrSupThanCountClass.java b/hdbextractor/src/main/java/HdbExtractor/GetAttDataInfOrSupThanCountClass.java
similarity index 96%
rename from src/main/java/HdbExtractor/GetAttDataInfOrSupThanCountClass.java
rename to hdbextractor/src/main/java/HdbExtractor/GetAttDataInfOrSupThanCountClass.java
index 66e19b7fabbdc858a146e3fa693207d5b2f757cd..192167071e2861fc78aa30c0a3c9e600b08f37c6 100644
--- a/src/main/java/HdbExtractor/GetAttDataInfOrSupThanCountClass.java
+++ b/hdbextractor/src/main/java/HdbExtractor/GetAttDataInfOrSupThanCountClass.java
@@ -1,151 +1,151 @@
-//+======================================================================
-// $Source: /cvsroot/tango-cs/tango/jserver/archiving/HdbExtractor/GetAttDataInfOrSupThanCountClass.java,v $
-//
-// Project:      Tango Device Server
-//
-// Description:  Java source code for the command TemplateClass of the
-//               HdbExtractor class.
-//
-// $Author: chinkumo $
-//
-// $Revision: 1.3 $
-//
-// $Log: GetAttDataInfOrSupThanCountClass.java,v $
-// Revision 1.3  2005/11/29 16:17:37  chinkumo
-// Code reformated (pogo compatible)
-//
-// Revision 1.2  2005/11/15 13:45:51  chinkumo
-// ...
-//
-// Revision 1.1  2005/09/09 10:03:21  chinkumo
-// First commit !
-// (Dynamic attribut release)
-//
-//
-// copyleft :    European Synchrotron Radiation Facility
-//               BP 220, Grenoble 38043
-//               FRANCE
-//
-//-======================================================================
-//
-//  		This file is generated by POGO
-//	(Program Obviously used to Generate tango Object)
-//
-//         (c) - Software Engineering Group - ESRF
-//=============================================================================
-
-/**
- * @author	$Author: chinkumo $
- * @version	$Revision: 1.3 $
- */
-package HdbExtractor;
-
-import org.omg.CORBA.Any;
-
-import fr.esrf.Tango.DevFailed;
-import fr.esrf.Tango.DispLevel;
-import fr.esrf.TangoDs.Command;
-import fr.esrf.TangoDs.DeviceImpl;
-import fr.esrf.TangoDs.Except;
-import fr.esrf.TangoDs.TangoConst;
-import fr.esrf.TangoDs.Util;
-
-/**
- * Class Description: Returns the number of data lower than the given value x OR
- * higher than the given value y.
- */
-
-public class GetAttDataInfOrSupThanCountClass extends Command implements TangoConst {
-	// ===============================================================
-	/**
-	 * Constructor for Command class GetAttDataInfOrSupThanCountClass
-	 * 
-	 * @param name
-	 *            command name
-	 * @param in
-	 *            argin type
-	 * @param out
-	 *            argout type
-	 */
-	// ===============================================================
-	public GetAttDataInfOrSupThanCountClass(final String name, final int in, final int out) {
-		super(name, in, out);
-	}
-
-	// ===============================================================
-	/**
-	 * Constructor for Command class GetAttDataInfOrSupThanCountClass
-	 * 
-	 * @param name
-	 *            command name
-	 * @param in
-	 *            argin type
-	 * @param in_comments
-	 *            argin description
-	 * @param out
-	 *            argout type
-	 * @param out_comments
-	 *            argout description
-	 */
-	// ===============================================================
-	public GetAttDataInfOrSupThanCountClass(final String name, final int in, final int out, final String in_comments, final String out_comments) {
-		super(name, in, out, in_comments, out_comments);
-	}
-
-	// ===============================================================
-	/**
-	 * Constructor for Command class GetAttDataInfOrSupThanCountClass
-	 * 
-	 * @param name
-	 *            command name
-	 * @param in
-	 *            argin type
-	 * @param in_comments
-	 *            argin description
-	 * @param out
-	 *            argout type
-	 * @param out_comments
-	 *            argout description
-	 * @param level
-	 *            The command display type OPERATOR or EXPERT
-	 */
-	// ===============================================================
-	public GetAttDataInfOrSupThanCountClass(final String name, final int in, final int out, final String in_comments, final String out_comments, final DispLevel level) {
-		super(name, in, out, in_comments, out_comments, level);
-	}
-
-	// ===============================================================
-	/**
-	 * return the result of the device's command.
-	 */
-	// ===============================================================
-	@Override
-	public Any execute(final DeviceImpl device, final Any in_any) throws DevFailed {
-		Util.out2.println("GetAttDataInfOrSupThanCountClass.execute(): arrived");
-		final String[] argin = extract_DevVarStringArray(in_any);
-		if (!(device instanceof HdbExtractor)) {
-			Except.throw_exception("DEVICE_ERROR", "Device parameter is not instance of HdbExtractor", "HdbExtractor");
-		}
-
-		return insert(((HdbExtractor) device).get_att_data_inf_or_sup_than_count(argin));
-	}
-
-	// ===============================================================
-	/**
-	 * Check if it is allowed to execute the command.
-	 */
-	// ===============================================================
-	@Override
-	public boolean is_allowed(final DeviceImpl device, final Any data_in) {
-		// End of Generated Code
-
-		// Re-Start of Generated Code
-		return true;
-	}
-}
-
-// -----------------------------------------------------------------------------
-/*
- * end of $Source:/cvsroot/tango-cs/tango/jserver/archiving/HdbExtractor/
- * GetAttDataInfOrSupThanCountClass.java,v $
- */
+//+======================================================================
+// $Source: /cvsroot/tango-cs/tango/jserver/archiving/HdbExtractor/GetAttDataInfOrSupThanCountClass.java,v $
+//
+// Project:      Tango Device Server
+//
+// Description:  Java source code for the command TemplateClass of the
+//               HdbExtractor class.
+//
+// $Author: chinkumo $
+//
+// $Revision: 1.3 $
+//
+// $Log: GetAttDataInfOrSupThanCountClass.java,v $
+// Revision 1.3  2005/11/29 16:17:37  chinkumo
+// Code reformated (pogo compatible)
+//
+// Revision 1.2  2005/11/15 13:45:51  chinkumo
+// ...
+//
+// Revision 1.1  2005/09/09 10:03:21  chinkumo
+// First commit !
+// (Dynamic attribut release)
+//
+//
+// copyleft :    European Synchrotron Radiation Facility
+//               BP 220, Grenoble 38043
+//               FRANCE
+//
+//-======================================================================
+//
+//  		This file is generated by POGO
+//	(Program Obviously used to Generate tango Object)
+//
+//         (c) - Software Engineering Group - ESRF
+//=============================================================================
+
+/**
+ * @author	$Author: chinkumo $
+ * @version	$Revision: 1.3 $
+ */
+package HdbExtractor;
+
+import org.omg.CORBA.Any;
+
+import fr.esrf.Tango.DevFailed;
+import fr.esrf.Tango.DispLevel;
+import fr.esrf.TangoDs.Command;
+import fr.esrf.TangoDs.DeviceImpl;
+import fr.esrf.TangoDs.Except;
+import fr.esrf.TangoDs.TangoConst;
+import fr.esrf.TangoDs.Util;
+
+/**
+ * Class Description: Returns the number of data lower than the given value x OR
+ * higher than the given value y.
+ */
+
+public class GetAttDataInfOrSupThanCountClass extends Command implements TangoConst {
+	// ===============================================================
+	/**
+	 * Constructor for Command class GetAttDataInfOrSupThanCountClass
+	 * 
+	 * @param name
+	 *            command name
+	 * @param in
+	 *            argin type
+	 * @param out
+	 *            argout type
+	 */
+	// ===============================================================
+	public GetAttDataInfOrSupThanCountClass(final String name, final int in, final int out) {
+		super(name, in, out);
+	}
+
+	// ===============================================================
+	/**
+	 * Constructor for Command class GetAttDataInfOrSupThanCountClass
+	 * 
+	 * @param name
+	 *            command name
+	 * @param in
+	 *            argin type
+	 * @param in_comments
+	 *            argin description
+	 * @param out
+	 *            argout type
+	 * @param out_comments
+	 *            argout description
+	 */
+	// ===============================================================
+	public GetAttDataInfOrSupThanCountClass(final String name, final int in, final int out, final String in_comments, final String out_comments) {
+		super(name, in, out, in_comments, out_comments);
+	}
+
+	// ===============================================================
+	/**
+	 * Constructor for Command class GetAttDataInfOrSupThanCountClass
+	 * 
+	 * @param name
+	 *            command name
+	 * @param in
+	 *            argin type
+	 * @param in_comments
+	 *            argin description
+	 * @param out
+	 *            argout type
+	 * @param out_comments
+	 *            argout description
+	 * @param level
+	 *            The command display type OPERATOR or EXPERT
+	 */
+	// ===============================================================
+	public GetAttDataInfOrSupThanCountClass(final String name, final int in, final int out, final String in_comments, final String out_comments, final DispLevel level) {
+		super(name, in, out, in_comments, out_comments, level);
+	}
+
+	// ===============================================================
+	/**
+	 * return the result of the device's command.
+	 */
+	// ===============================================================
+	@Override
+	public Any execute(final DeviceImpl device, final Any in_any) throws DevFailed {
+		Util.out2.println("GetAttDataInfOrSupThanCountClass.execute(): arrived");
+		final String[] argin = extract_DevVarStringArray(in_any);
+		if (!(device instanceof HdbExtractor)) {
+			Except.throw_exception("DEVICE_ERROR", "Device parameter is not instance of HdbExtractor", "HdbExtractor");
+		}
+
+		return insert(((HdbExtractor) device).get_att_data_inf_or_sup_than_count(argin));
+	}
+
+	// ===============================================================
+	/**
+	 * Check if it is allowed to execute the command.
+	 */
+	// ===============================================================
+	@Override
+	public boolean is_allowed(final DeviceImpl device, final Any data_in) {
+		// End of Generated Code
+
+		// Re-Start of Generated Code
+		return true;
+	}
+}
+
+// -----------------------------------------------------------------------------
+/*
+ * end of $Source:/cvsroot/tango-cs/tango/jserver/archiving/HdbExtractor/
+ * GetAttDataInfOrSupThanCountClass.java,v $
+ */
diff --git a/src/main/java/HdbExtractor/GetAttDataInfThanBetweenDatesClass.java b/hdbextractor/src/main/java/HdbExtractor/GetAttDataInfThanBetweenDatesClass.java
similarity index 97%
rename from src/main/java/HdbExtractor/GetAttDataInfThanBetweenDatesClass.java
rename to hdbextractor/src/main/java/HdbExtractor/GetAttDataInfThanBetweenDatesClass.java
index 490b4d97c0d6c3dc89fa94d69debd17235169cff..5e31a689e9e37fc8593248f65e2a7d50eff58e4b 100644
--- a/src/main/java/HdbExtractor/GetAttDataInfThanBetweenDatesClass.java
+++ b/hdbextractor/src/main/java/HdbExtractor/GetAttDataInfThanBetweenDatesClass.java
@@ -1,156 +1,156 @@
-//+======================================================================
-// $Source: /cvsroot/tango-cs/tango/jserver/archiving/HdbExtractor/GetAttDataInfThanBetweenDatesClass.java,v $
-//
-// Project:      Tango Device Server
-//
-// Description:  Java source code for the command TemplateClass of the
-//               HdbExtractor class.
-//
-// $Author: chinkumo $
-//
-// $Revision: 1.3 $
-//
-// $Log: GetAttDataInfThanBetweenDatesClass.java,v $
-// Revision 1.3  2005/11/29 16:17:37  chinkumo
-// Code reformated (pogo compatible)
-//
-// Revision 1.2  2005/11/15 13:45:51  chinkumo
-// ...
-//
-// Revision 1.1  2005/09/09 10:03:21  chinkumo
-// First commit !
-// (Dynamic attribut release)
-//
-//
-// copyleft :    European Synchrotron Radiation Facility
-//               BP 220, Grenoble 38043
-//               FRANCE
-//
-//-======================================================================
-//
-//  		This file is generated by POGO
-//	(Program Obviously used to Generate tango Object)
-//
-//         (c) - Software Engineering Group - ESRF
-//=============================================================================
-
-/**
- * @author	$Author: chinkumo $
- * @version	$Revision: 1.3 $
- */
-package HdbExtractor;
-
-import org.omg.CORBA.Any;
-
-import fr.esrf.Tango.DevFailed;
-import fr.esrf.Tango.DispLevel;
-import fr.esrf.TangoDs.Command;
-import fr.esrf.TangoDs.DeviceImpl;
-import fr.esrf.TangoDs.Except;
-import fr.esrf.TangoDs.TangoConst;
-import fr.esrf.TangoDs.Util;
-
-/**
- * Class Description: Retrieves data beetwen two dates (date_1 & date_2) - Data
- * are lower than the given value x. Create a dynamic attribute, retrieve the
- * corresponding data from database and prepare result for attribute_history
- * call.
- */
-
-public class GetAttDataInfThanBetweenDatesClass extends Command implements TangoConst {
-    // ===============================================================
-    /**
-     * Constructor for Command class GetAttDataInfThanBetweenDatesClass
-     * 
-     * @param name
-     *            command name
-     * @param in
-     *            argin type
-     * @param out
-     *            argout type
-     */
-    // ===============================================================
-    public GetAttDataInfThanBetweenDatesClass(final String name, final int in, final int out) {
-        super(name, in, out);
-    }
-
-    // ===============================================================
-    /**
-     * Constructor for Command class GetAttDataInfThanBetweenDatesClass
-     * 
-     * @param name
-     *            command name
-     * @param in
-     *            argin type
-     * @param in_comments
-     *            argin description
-     * @param out
-     *            argout type
-     * @param out_comments
-     *            argout description
-     */
-    // ===============================================================
-    public GetAttDataInfThanBetweenDatesClass(final String name, final int in, final int out, final String in_comments,
-            final String out_comments) {
-        super(name, in, out, in_comments, out_comments);
-    }
-
-    // ===============================================================
-    /**
-     * Constructor for Command class GetAttDataInfThanBetweenDatesClass
-     * 
-     * @param name
-     *            command name
-     * @param in
-     *            argin type
-     * @param in_comments
-     *            argin description
-     * @param out
-     *            argout type
-     * @param out_comments
-     *            argout description
-     * @param level
-     *            The command display type OPERATOR or EXPERT
-     */
-    // ===============================================================
-    public GetAttDataInfThanBetweenDatesClass(final String name, final int in, final int out, final String in_comments,
-            final String out_comments, final DispLevel level) {
-        super(name, in, out, in_comments, out_comments, level);
-    }
-
-    // ===============================================================
-    /**
-     * return the result of the device's command.
-     */
-    // ===============================================================
-    @Override
-    public Any execute(final DeviceImpl device, final Any in_any) throws DevFailed {
-        Util.out2.println("GetAttDataInfThanBetweenDatesClass.execute(): arrived");
-        final String[] argin = extract_DevVarStringArray(in_any);
-        // final Any result = null;
-        if (!(device instanceof HdbExtractor)) {
-            Except.throw_exception("DEVICE_ERROR", "Device parameter is not instance of HdbExtractor", "HdbExtractor");
-        }
-
-        return insert(((HdbExtractor) device).get_att_data_inf_than_between_dates(argin));
-    }
-
-    // ===============================================================
-    /**
-     * Check if it is allowed to execute the command.
-     */
-    // ===============================================================
-    @Override
-    public boolean is_allowed(final DeviceImpl device, final Any data_in) {
-        // End of Generated Code
-
-        // Re-Start of Generated Code
-        return true;
-    }
-}
-
-// -----------------------------------------------------------------------------
-/*
- * end of $Source:/cvsroot/tango-cs/tango/jserver/archiving/HdbExtractor/
- * GetAttDataInfThanBetweenDatesClass.java,v $
- */
+//+======================================================================
+// $Source: /cvsroot/tango-cs/tango/jserver/archiving/HdbExtractor/GetAttDataInfThanBetweenDatesClass.java,v $
+//
+// Project:      Tango Device Server
+//
+// Description:  Java source code for the command TemplateClass of the
+//               HdbExtractor class.
+//
+// $Author: chinkumo $
+//
+// $Revision: 1.3 $
+//
+// $Log: GetAttDataInfThanBetweenDatesClass.java,v $
+// Revision 1.3  2005/11/29 16:17:37  chinkumo
+// Code reformated (pogo compatible)
+//
+// Revision 1.2  2005/11/15 13:45:51  chinkumo
+// ...
+//
+// Revision 1.1  2005/09/09 10:03:21  chinkumo
+// First commit !
+// (Dynamic attribut release)
+//
+//
+// copyleft :    European Synchrotron Radiation Facility
+//               BP 220, Grenoble 38043
+//               FRANCE
+//
+//-======================================================================
+//
+//  		This file is generated by POGO
+//	(Program Obviously used to Generate tango Object)
+//
+//         (c) - Software Engineering Group - ESRF
+//=============================================================================
+
+/**
+ * @author	$Author: chinkumo $
+ * @version	$Revision: 1.3 $
+ */
+package HdbExtractor;
+
+import org.omg.CORBA.Any;
+
+import fr.esrf.Tango.DevFailed;
+import fr.esrf.Tango.DispLevel;
+import fr.esrf.TangoDs.Command;
+import fr.esrf.TangoDs.DeviceImpl;
+import fr.esrf.TangoDs.Except;
+import fr.esrf.TangoDs.TangoConst;
+import fr.esrf.TangoDs.Util;
+
+/**
+ * Class Description: Retrieves data beetwen two dates (date_1 & date_2) - Data
+ * are lower than the given value x. Create a dynamic attribute, retrieve the
+ * corresponding data from database and prepare result for attribute_history
+ * call.
+ */
+
+public class GetAttDataInfThanBetweenDatesClass extends Command implements TangoConst {
+    // ===============================================================
+    /**
+     * Constructor for Command class GetAttDataInfThanBetweenDatesClass
+     * 
+     * @param name
+     *            command name
+     * @param in
+     *            argin type
+     * @param out
+     *            argout type
+     */
+    // ===============================================================
+    public GetAttDataInfThanBetweenDatesClass(final String name, final int in, final int out) {
+        super(name, in, out);
+    }
+
+    // ===============================================================
+    /**
+     * Constructor for Command class GetAttDataInfThanBetweenDatesClass
+     * 
+     * @param name
+     *            command name
+     * @param in
+     *            argin type
+     * @param in_comments
+     *            argin description
+     * @param out
+     *            argout type
+     * @param out_comments
+     *            argout description
+     */
+    // ===============================================================
+    public GetAttDataInfThanBetweenDatesClass(final String name, final int in, final int out, final String in_comments,
+            final String out_comments) {
+        super(name, in, out, in_comments, out_comments);
+    }
+
+    // ===============================================================
+    /**
+     * Constructor for Command class GetAttDataInfThanBetweenDatesClass
+     * 
+     * @param name
+     *            command name
+     * @param in
+     *            argin type
+     * @param in_comments
+     *            argin description
+     * @param out
+     *            argout type
+     * @param out_comments
+     *            argout description
+     * @param level
+     *            The command display type OPERATOR or EXPERT
+     */
+    // ===============================================================
+    public GetAttDataInfThanBetweenDatesClass(final String name, final int in, final int out, final String in_comments,
+            final String out_comments, final DispLevel level) {
+        super(name, in, out, in_comments, out_comments, level);
+    }
+
+    // ===============================================================
+    /**
+     * return the result of the device's command.
+     */
+    // ===============================================================
+    @Override
+    public Any execute(final DeviceImpl device, final Any in_any) throws DevFailed {
+        Util.out2.println("GetAttDataInfThanBetweenDatesClass.execute(): arrived");
+        final String[] argin = extract_DevVarStringArray(in_any);
+        // final Any result = null;
+        if (!(device instanceof HdbExtractor)) {
+            Except.throw_exception("DEVICE_ERROR", "Device parameter is not instance of HdbExtractor", "HdbExtractor");
+        }
+
+        return insert(((HdbExtractor) device).get_att_data_inf_than_between_dates(argin));
+    }
+
+    // ===============================================================
+    /**
+     * Check if it is allowed to execute the command.
+     */
+    // ===============================================================
+    @Override
+    public boolean is_allowed(final DeviceImpl device, final Any data_in) {
+        // End of Generated Code
+
+        // Re-Start of Generated Code
+        return true;
+    }
+}
+
+// -----------------------------------------------------------------------------
+/*
+ * end of $Source:/cvsroot/tango-cs/tango/jserver/archiving/HdbExtractor/
+ * GetAttDataInfThanBetweenDatesClass.java,v $
+ */
diff --git a/src/main/java/HdbExtractor/GetAttDataInfThanBetweenDatesCountClass.java b/hdbextractor/src/main/java/HdbExtractor/GetAttDataInfThanBetweenDatesCountClass.java
similarity index 96%
rename from src/main/java/HdbExtractor/GetAttDataInfThanBetweenDatesCountClass.java
rename to hdbextractor/src/main/java/HdbExtractor/GetAttDataInfThanBetweenDatesCountClass.java
index 3686ebfbf55ea45d84f43b8e1375d3fd6f9ea87d..0f8eee4af772df3d86ac052753a939bdfaeba512 100644
--- a/src/main/java/HdbExtractor/GetAttDataInfThanBetweenDatesCountClass.java
+++ b/hdbextractor/src/main/java/HdbExtractor/GetAttDataInfThanBetweenDatesCountClass.java
@@ -1,152 +1,152 @@
-//+======================================================================
-// $Source: /cvsroot/tango-cs/tango/jserver/archiving/HdbExtractor/GetAttDataInfThanBetweenDatesCountClass.java,v $
-//
-// Project:      Tango Device Server
-//
-// Description:  Java source code for the command TemplateClass of the
-//               HdbExtractor class.
-//
-// $Author: chinkumo $
-//
-// $Revision: 1.3 $
-//
-// $Log: GetAttDataInfThanBetweenDatesCountClass.java,v $
-// Revision 1.3  2005/11/29 16:17:37  chinkumo
-// Code reformated (pogo compatible)
-//
-// Revision 1.2  2005/11/15 13:45:51  chinkumo
-// ...
-//
-// Revision 1.1  2005/09/09 10:03:21  chinkumo
-// First commit !
-// (Dynamic attribut release)
-//
-//
-// copyleft :    European Synchrotron Radiation Facility
-//               BP 220, Grenoble 38043
-//               FRANCE
-//
-//-======================================================================
-//
-//  		This file is generated by POGO
-//	(Program Obviously used to Generate tango Object)
-//
-//         (c) - Software Engineering Group - ESRF
-//=============================================================================
-
-/**
- * @author	$Author: chinkumo $
- * @version	$Revision: 1.3 $
- */
-package HdbExtractor;
-
-import org.omg.CORBA.Any;
-
-import fr.esrf.Tango.DevFailed;
-import fr.esrf.Tango.DispLevel;
-import fr.esrf.TangoDs.Command;
-import fr.esrf.TangoDs.DeviceImpl;
-import fr.esrf.TangoDs.Except;
-import fr.esrf.TangoDs.TangoConst;
-import fr.esrf.TangoDs.Util;
-
-/**
- * Class Description: Returns the number data lower than the given value x, and
- * beetwen two dates (date_1 & date_2).
- */
-
-public class GetAttDataInfThanBetweenDatesCountClass extends Command implements TangoConst {
-	// ===============================================================
-	/**
-	 * Constructor for Command class GetAttDataInfThanBetweenDatesCountClass
-	 * 
-	 * @param name
-	 *            command name
-	 * @param in
-	 *            argin type
-	 * @param out
-	 *            argout type
-	 */
-	// ===============================================================
-	public GetAttDataInfThanBetweenDatesCountClass(final String name, final int in, final int out) {
-		super(name, in, out);
-	}
-
-	// ===============================================================
-	/**
-	 * Constructor for Command class GetAttDataInfThanBetweenDatesCountClass
-	 * 
-	 * @param name
-	 *            command name
-	 * @param in
-	 *            argin type
-	 * @param in_comments
-	 *            argin description
-	 * @param out
-	 *            argout type
-	 * @param out_comments
-	 *            argout description
-	 */
-	// ===============================================================
-	public GetAttDataInfThanBetweenDatesCountClass(final String name, final int in, final int out, final String in_comments, final String out_comments) {
-		super(name, in, out, in_comments, out_comments);
-	}
-
-	// ===============================================================
-	/**
-	 * Constructor for Command class GetAttDataInfThanBetweenDatesCountClass
-	 * 
-	 * @param name
-	 *            command name
-	 * @param in
-	 *            argin type
-	 * @param in_comments
-	 *            argin description
-	 * @param out
-	 *            argout type
-	 * @param out_comments
-	 *            argout description
-	 * @param level
-	 *            The command display type OPERATOR or EXPERT
-	 */
-	// ===============================================================
-	public GetAttDataInfThanBetweenDatesCountClass(final String name, final int in, final int out, final String in_comments, final String out_comments, final DispLevel level) {
-		super(name, in, out, in_comments, out_comments, level);
-	}
-
-	// ===============================================================
-	/**
-	 * return the result of the device's command.
-	 */
-	// ===============================================================
-	@Override
-	public Any execute(final DeviceImpl device, final Any in_any) throws DevFailed {
-		Util.out2.println("GetAttDataInfThanBetweenDatesCountClass.execute(): arrived");
-		final String[] argin = extract_DevVarStringArray(in_any);
-
-		if (!(device instanceof HdbExtractor)) {
-			Except.throw_exception("DEVICE_ERROR", "Device parameter is not instance of HdbExtractor", "HdbExtractor");
-		}
-
-		return insert(((HdbExtractor) device).get_att_data_inf_than_between_dates_count(argin));
-	}
-
-	// ===============================================================
-	/**
-	 * Check if it is allowed to execute the command.
-	 */
-	// ===============================================================
-	@Override
-	public boolean is_allowed(final DeviceImpl device, final Any data_in) {
-		// End of Generated Code
-
-		// Re-Start of Generated Code
-		return true;
-	}
-}
-
-// -----------------------------------------------------------------------------
-/*
- * end of $Source:/cvsroot/tango-cs/tango/jserver/archiving/HdbExtractor/
- * GetAttDataInfThanBetweenDatesCountClass.java,v $
- */
+//+======================================================================
+// $Source: /cvsroot/tango-cs/tango/jserver/archiving/HdbExtractor/GetAttDataInfThanBetweenDatesCountClass.java,v $
+//
+// Project:      Tango Device Server
+//
+// Description:  Java source code for the command TemplateClass of the
+//               HdbExtractor class.
+//
+// $Author: chinkumo $
+//
+// $Revision: 1.3 $
+//
+// $Log: GetAttDataInfThanBetweenDatesCountClass.java,v $
+// Revision 1.3  2005/11/29 16:17:37  chinkumo
+// Code reformated (pogo compatible)
+//
+// Revision 1.2  2005/11/15 13:45:51  chinkumo
+// ...
+//
+// Revision 1.1  2005/09/09 10:03:21  chinkumo
+// First commit !
+// (Dynamic attribut release)
+//
+//
+// copyleft :    European Synchrotron Radiation Facility
+//               BP 220, Grenoble 38043
+//               FRANCE
+//
+//-======================================================================
+//
+//  		This file is generated by POGO
+//	(Program Obviously used to Generate tango Object)
+//
+//         (c) - Software Engineering Group - ESRF
+//=============================================================================
+
+/**
+ * @author	$Author: chinkumo $
+ * @version	$Revision: 1.3 $
+ */
+package HdbExtractor;
+
+import org.omg.CORBA.Any;
+
+import fr.esrf.Tango.DevFailed;
+import fr.esrf.Tango.DispLevel;
+import fr.esrf.TangoDs.Command;
+import fr.esrf.TangoDs.DeviceImpl;
+import fr.esrf.TangoDs.Except;
+import fr.esrf.TangoDs.TangoConst;
+import fr.esrf.TangoDs.Util;
+
+/**
+ * Class Description: Returns the number data lower than the given value x, and
+ * beetwen two dates (date_1 & date_2).
+ */
+
+public class GetAttDataInfThanBetweenDatesCountClass extends Command implements TangoConst {
+	// ===============================================================
+	/**
+	 * Constructor for Command class GetAttDataInfThanBetweenDatesCountClass
+	 * 
+	 * @param name
+	 *            command name
+	 * @param in
+	 *            argin type
+	 * @param out
+	 *            argout type
+	 */
+	// ===============================================================
+	public GetAttDataInfThanBetweenDatesCountClass(final String name, final int in, final int out) {
+		super(name, in, out);
+	}
+
+	// ===============================================================
+	/**
+	 * Constructor for Command class GetAttDataInfThanBetweenDatesCountClass
+	 * 
+	 * @param name
+	 *            command name
+	 * @param in
+	 *            argin type
+	 * @param in_comments
+	 *            argin description
+	 * @param out
+	 *            argout type
+	 * @param out_comments
+	 *            argout description
+	 */
+	// ===============================================================
+	public GetAttDataInfThanBetweenDatesCountClass(final String name, final int in, final int out, final String in_comments, final String out_comments) {
+		super(name, in, out, in_comments, out_comments);
+	}
+
+	// ===============================================================
+	/**
+	 * Constructor for Command class GetAttDataInfThanBetweenDatesCountClass
+	 * 
+	 * @param name
+	 *            command name
+	 * @param in
+	 *            argin type
+	 * @param in_comments
+	 *            argin description
+	 * @param out
+	 *            argout type
+	 * @param out_comments
+	 *            argout description
+	 * @param level
+	 *            The command display type OPERATOR or EXPERT
+	 */
+	// ===============================================================
+	public GetAttDataInfThanBetweenDatesCountClass(final String name, final int in, final int out, final String in_comments, final String out_comments, final DispLevel level) {
+		super(name, in, out, in_comments, out_comments, level);
+	}
+
+	// ===============================================================
+	/**
+	 * return the result of the device's command.
+	 */
+	// ===============================================================
+	@Override
+	public Any execute(final DeviceImpl device, final Any in_any) throws DevFailed {
+		Util.out2.println("GetAttDataInfThanBetweenDatesCountClass.execute(): arrived");
+		final String[] argin = extract_DevVarStringArray(in_any);
+
+		if (!(device instanceof HdbExtractor)) {
+			Except.throw_exception("DEVICE_ERROR", "Device parameter is not instance of HdbExtractor", "HdbExtractor");
+		}
+
+		return insert(((HdbExtractor) device).get_att_data_inf_than_between_dates_count(argin));
+	}
+
+	// ===============================================================
+	/**
+	 * Check if it is allowed to execute the command.
+	 */
+	// ===============================================================
+	@Override
+	public boolean is_allowed(final DeviceImpl device, final Any data_in) {
+		// End of Generated Code
+
+		// Re-Start of Generated Code
+		return true;
+	}
+}
+
+// -----------------------------------------------------------------------------
+/*
+ * end of $Source:/cvsroot/tango-cs/tango/jserver/archiving/HdbExtractor/
+ * GetAttDataInfThanBetweenDatesCountClass.java,v $
+ */
diff --git a/src/main/java/HdbExtractor/GetAttDataInfThanClass.java b/hdbextractor/src/main/java/HdbExtractor/GetAttDataInfThanClass.java
similarity index 96%
rename from src/main/java/HdbExtractor/GetAttDataInfThanClass.java
rename to hdbextractor/src/main/java/HdbExtractor/GetAttDataInfThanClass.java
index f3ad16eca967bc1059bf3e5cb2e37cbd460da2c6..27ea57fa850a512bef89641063a56e8ee54bc8b8 100644
--- a/src/main/java/HdbExtractor/GetAttDataInfThanClass.java
+++ b/hdbextractor/src/main/java/HdbExtractor/GetAttDataInfThanClass.java
@@ -1,153 +1,153 @@
-//+======================================================================
-// $Source: /cvsroot/tango-cs/tango/jserver/archiving/HdbExtractor/GetAttDataInfThanClass.java,v $
-//
-// Project:      Tango Device Server
-//
-// Description:  Java source code for the command TemplateClass of the
-//               HdbExtractor class.
-//
-// $Author: chinkumo $
-//
-// $Revision: 1.3 $
-//
-// $Log: GetAttDataInfThanClass.java,v $
-// Revision 1.3  2005/11/29 16:17:37  chinkumo
-// Code reformated (pogo compatible)
-//
-// Revision 1.2  2005/11/15 13:45:51  chinkumo
-// ...
-//
-// Revision 1.1  2005/09/09 10:03:21  chinkumo
-// First commit !
-// (Dynamic attribut release)
-//
-//
-// copyleft :    European Synchrotron Radiation Facility
-//               BP 220, Grenoble 38043
-//               FRANCE
-//
-//-======================================================================
-//
-//  		This file is generated by POGO
-//	(Program Obviously used to Generate tango Object)
-//
-//         (c) - Software Engineering Group - ESRF
-//=============================================================================
-
-/**
- * @author	$Author: chinkumo $
- * @version	$Revision: 1.3 $
- */
-package HdbExtractor;
-
-import org.omg.CORBA.Any;
-
-import fr.esrf.Tango.DevFailed;
-import fr.esrf.Tango.DispLevel;
-import fr.esrf.TangoDs.Command;
-import fr.esrf.TangoDs.DeviceImpl;
-import fr.esrf.TangoDs.Except;
-import fr.esrf.TangoDs.TangoConst;
-import fr.esrf.TangoDs.Util;
-
-/**
- * Class Description: Retrieves all the data that are lower than the given value
- * x. Create a dynamic attribute, retrieve the corresponding data from database
- * and prepare result for attribute_history call.
- */
-
-public class GetAttDataInfThanClass extends Command implements TangoConst {
-	// ===============================================================
-	/**
-	 * Constructor for Command class GetAttDataInfThanClass
-	 * 
-	 * @param name
-	 *            command name
-	 * @param in
-	 *            argin type
-	 * @param out
-	 *            argout type
-	 */
-	// ===============================================================
-	public GetAttDataInfThanClass(final String name, final int in, final int out) {
-		super(name, in, out);
-	}
-
-	// ===============================================================
-	/**
-	 * Constructor for Command class GetAttDataInfThanClass
-	 * 
-	 * @param name
-	 *            command name
-	 * @param in
-	 *            argin type
-	 * @param in_comments
-	 *            argin description
-	 * @param out
-	 *            argout type
-	 * @param out_comments
-	 *            argout description
-	 */
-	// ===============================================================
-	public GetAttDataInfThanClass(final String name, final int in, final int out, final String in_comments, final String out_comments) {
-		super(name, in, out, in_comments, out_comments);
-	}
-
-	// ===============================================================
-	/**
-	 * Constructor for Command class GetAttDataInfThanClass
-	 * 
-	 * @param name
-	 *            command name
-	 * @param in
-	 *            argin type
-	 * @param in_comments
-	 *            argin description
-	 * @param out
-	 *            argout type
-	 * @param out_comments
-	 *            argout description
-	 * @param level
-	 *            The command display type OPERATOR or EXPERT
-	 */
-	// ===============================================================
-	public GetAttDataInfThanClass(final String name, final int in, final int out, final String in_comments, final String out_comments, final DispLevel level) {
-		super(name, in, out, in_comments, out_comments, level);
-	}
-
-	// ===============================================================
-	/**
-	 * return the result of the device's command.
-	 */
-	// ===============================================================
-	@Override
-	public Any execute(final DeviceImpl device, final Any in_any) throws DevFailed {
-		Util.out2.println("GetAttDataInfThanClass.execute(): arrived");
-		final String[] argin = extract_DevVarStringArray(in_any);
-
-		if (!(device instanceof HdbExtractor)) {
-			Except.throw_exception("DEVICE_ERROR", "Device parameter is not instance of HdbExtractor", "HdbExtractor");
-		}
-		return insert(((HdbExtractor) device).get_att_data_inf_than(argin));
-	}
-
-	// ===============================================================
-	/**
-	 * Check if it is allowed to execute the command.
-	 */
-	// ===============================================================
-	@Override
-	public boolean is_allowed(final DeviceImpl device, final Any data_in) {
-		// End of Generated Code
-
-		// Re-Start of Generated Code
-		return true;
-	}
-}
-
-// -----------------------------------------------------------------------------
-/*
- * end of $Source:
- * /cvsroot/tango-cs/tango/jserver/archiving/HdbExtractor/GetAttDataInfThanClass
- * .java,v $
- */
+//+======================================================================
+// $Source: /cvsroot/tango-cs/tango/jserver/archiving/HdbExtractor/GetAttDataInfThanClass.java,v $
+//
+// Project:      Tango Device Server
+//
+// Description:  Java source code for the command TemplateClass of the
+//               HdbExtractor class.
+//
+// $Author: chinkumo $
+//
+// $Revision: 1.3 $
+//
+// $Log: GetAttDataInfThanClass.java,v $
+// Revision 1.3  2005/11/29 16:17:37  chinkumo
+// Code reformated (pogo compatible)
+//
+// Revision 1.2  2005/11/15 13:45:51  chinkumo
+// ...
+//
+// Revision 1.1  2005/09/09 10:03:21  chinkumo
+// First commit !
+// (Dynamic attribut release)
+//
+//
+// copyleft :    European Synchrotron Radiation Facility
+//               BP 220, Grenoble 38043
+//               FRANCE
+//
+//-======================================================================
+//
+//  		This file is generated by POGO
+//	(Program Obviously used to Generate tango Object)
+//
+//         (c) - Software Engineering Group - ESRF
+//=============================================================================
+
+/**
+ * @author	$Author: chinkumo $
+ * @version	$Revision: 1.3 $
+ */
+package HdbExtractor;
+
+import org.omg.CORBA.Any;
+
+import fr.esrf.Tango.DevFailed;
+import fr.esrf.Tango.DispLevel;
+import fr.esrf.TangoDs.Command;
+import fr.esrf.TangoDs.DeviceImpl;
+import fr.esrf.TangoDs.Except;
+import fr.esrf.TangoDs.TangoConst;
+import fr.esrf.TangoDs.Util;
+
+/**
+ * Class Description: Retrieves all the data that are lower than the given value
+ * x. Create a dynamic attribute, retrieve the corresponding data from database
+ * and prepare result for attribute_history call.
+ */
+
+public class GetAttDataInfThanClass extends Command implements TangoConst {
+	// ===============================================================
+	/**
+	 * Constructor for Command class GetAttDataInfThanClass
+	 * 
+	 * @param name
+	 *            command name
+	 * @param in
+	 *            argin type
+	 * @param out
+	 *            argout type
+	 */
+	// ===============================================================
+	public GetAttDataInfThanClass(final String name, final int in, final int out) {
+		super(name, in, out);
+	}
+
+	// ===============================================================
+	/**
+	 * Constructor for Command class GetAttDataInfThanClass
+	 * 
+	 * @param name
+	 *            command name
+	 * @param in
+	 *            argin type
+	 * @param in_comments
+	 *            argin description
+	 * @param out
+	 *            argout type
+	 * @param out_comments
+	 *            argout description
+	 */
+	// ===============================================================
+	public GetAttDataInfThanClass(final String name, final int in, final int out, final String in_comments, final String out_comments) {
+		super(name, in, out, in_comments, out_comments);
+	}
+
+	// ===============================================================
+	/**
+	 * Constructor for Command class GetAttDataInfThanClass
+	 * 
+	 * @param name
+	 *            command name
+	 * @param in
+	 *            argin type
+	 * @param in_comments
+	 *            argin description
+	 * @param out
+	 *            argout type
+	 * @param out_comments
+	 *            argout description
+	 * @param level
+	 *            The command display type OPERATOR or EXPERT
+	 */
+	// ===============================================================
+	public GetAttDataInfThanClass(final String name, final int in, final int out, final String in_comments, final String out_comments, final DispLevel level) {
+		super(name, in, out, in_comments, out_comments, level);
+	}
+
+	// ===============================================================
+	/**
+	 * return the result of the device's command.
+	 */
+	// ===============================================================
+	@Override
+	public Any execute(final DeviceImpl device, final Any in_any) throws DevFailed {
+		Util.out2.println("GetAttDataInfThanClass.execute(): arrived");
+		final String[] argin = extract_DevVarStringArray(in_any);
+
+		if (!(device instanceof HdbExtractor)) {
+			Except.throw_exception("DEVICE_ERROR", "Device parameter is not instance of HdbExtractor", "HdbExtractor");
+		}
+		return insert(((HdbExtractor) device).get_att_data_inf_than(argin));
+	}
+
+	// ===============================================================
+	/**
+	 * Check if it is allowed to execute the command.
+	 */
+	// ===============================================================
+	@Override
+	public boolean is_allowed(final DeviceImpl device, final Any data_in) {
+		// End of Generated Code
+
+		// Re-Start of Generated Code
+		return true;
+	}
+}
+
+// -----------------------------------------------------------------------------
+/*
+ * end of $Source:
+ * /cvsroot/tango-cs/tango/jserver/archiving/HdbExtractor/GetAttDataInfThanClass
+ * .java,v $
+ */
diff --git a/src/main/java/HdbExtractor/GetAttDataInfThanCountClass.java b/hdbextractor/src/main/java/HdbExtractor/GetAttDataInfThanCountClass.java
similarity index 96%
rename from src/main/java/HdbExtractor/GetAttDataInfThanCountClass.java
rename to hdbextractor/src/main/java/HdbExtractor/GetAttDataInfThanCountClass.java
index 79ecc38a4260e15333bdfaf86de84d9a3665fc81..850686b24b93ad66682339d278df1a4d2c8494e3 100644
--- a/src/main/java/HdbExtractor/GetAttDataInfThanCountClass.java
+++ b/hdbextractor/src/main/java/HdbExtractor/GetAttDataInfThanCountClass.java
@@ -1,151 +1,151 @@
-//+======================================================================
-// $Source: /cvsroot/tango-cs/tango/jserver/archiving/HdbExtractor/GetAttDataInfThanCountClass.java,v $
-//
-// Project:      Tango Device Server
-//
-// Description:  Java source code for the command TemplateClass of the
-//               HdbExtractor class.
-//
-// $Author: chinkumo $
-//
-// $Revision: 1.3 $
-//
-// $Log: GetAttDataInfThanCountClass.java,v $
-// Revision 1.3  2005/11/29 16:17:37  chinkumo
-// Code reformated (pogo compatible)
-//
-// Revision 1.2  2005/11/15 13:45:51  chinkumo
-// ...
-//
-// Revision 1.1  2005/09/09 10:03:21  chinkumo
-// First commit !
-// (Dynamic attribut release)
-//
-//
-// copyleft :    European Synchrotron Radiation Facility
-//               BP 220, Grenoble 38043
-//               FRANCE
-//
-//-======================================================================
-//
-//  		This file is generated by POGO
-//	(Program Obviously used to Generate tango Object)
-//
-//         (c) - Software Engineering Group - ESRF
-//=============================================================================
-
-/**
- * @author	$Author: chinkumo $
- * @version	$Revision: 1.3 $
- */
-package HdbExtractor;
-
-import org.omg.CORBA.Any;
-
-import fr.esrf.Tango.DevFailed;
-import fr.esrf.Tango.DispLevel;
-import fr.esrf.TangoDs.Command;
-import fr.esrf.TangoDs.DeviceImpl;
-import fr.esrf.TangoDs.Except;
-import fr.esrf.TangoDs.TangoConst;
-import fr.esrf.TangoDs.Util;
-
-/**
- * Class Description: Returns the number of data lower than the given value.
- */
-
-public class GetAttDataInfThanCountClass extends Command implements TangoConst {
-	// ===============================================================
-	/**
-	 * Constructor for Command class GetAttDataInfThanCountClass
-	 * 
-	 * @param name
-	 *            command name
-	 * @param in
-	 *            argin type
-	 * @param out
-	 *            argout type
-	 */
-	// ===============================================================
-	public GetAttDataInfThanCountClass(final String name, final int in, final int out) {
-		super(name, in, out);
-	}
-
-	// ===============================================================
-	/**
-	 * Constructor for Command class GetAttDataInfThanCountClass
-	 * 
-	 * @param name
-	 *            command name
-	 * @param in
-	 *            argin type
-	 * @param in_comments
-	 *            argin description
-	 * @param out
-	 *            argout type
-	 * @param out_comments
-	 *            argout description
-	 */
-	// ===============================================================
-	public GetAttDataInfThanCountClass(final String name, final int in, final int out, final String in_comments, final String out_comments) {
-		super(name, in, out, in_comments, out_comments);
-	}
-
-	// ===============================================================
-	/**
-	 * Constructor for Command class GetAttDataInfThanCountClass
-	 * 
-	 * @param name
-	 *            command name
-	 * @param in
-	 *            argin type
-	 * @param in_comments
-	 *            argin description
-	 * @param out
-	 *            argout type
-	 * @param out_comments
-	 *            argout description
-	 * @param level
-	 *            The command display type OPERATOR or EXPERT
-	 */
-	// ===============================================================
-	public GetAttDataInfThanCountClass(final String name, final int in, final int out, final String in_comments, final String out_comments, final DispLevel level) {
-		super(name, in, out, in_comments, out_comments, level);
-	}
-
-	// ===============================================================
-	/**
-	 * return the result of the device's command.
-	 */
-	// ===============================================================
-	@Override
-	public Any execute(final DeviceImpl device, final Any in_any) throws DevFailed {
-		Util.out2.println("GetAttDataInfThanCountClass.execute(): arrived");
-		final String[] argin = extract_DevVarStringArray(in_any);
-
-		if (!(device instanceof HdbExtractor)) {
-			Except.throw_exception("DEVICE_ERROR", "Device parameter is not instance of HdbExtractor", "HdbExtractor");
-		}
-
-		return insert(((HdbExtractor) device).get_att_data_inf_than_count(argin));
-	}
-
-	// ===============================================================
-	/**
-	 * Check if it is allowed to execute the command.
-	 */
-	// ===============================================================
-	@Override
-	public boolean is_allowed(final DeviceImpl device, final Any data_in) {
-		// End of Generated Code
-
-		// Re-Start of Generated Code
-		return true;
-	}
-}
-
-// -----------------------------------------------------------------------------
-/*
- * end of $Source:/cvsroot/tango-cs/tango/jserver/archiving/HdbExtractor/
- * GetAttDataInfThanCountClass.java,v $
- */
+//+======================================================================
+// $Source: /cvsroot/tango-cs/tango/jserver/archiving/HdbExtractor/GetAttDataInfThanCountClass.java,v $
+//
+// Project:      Tango Device Server
+//
+// Description:  Java source code for the command TemplateClass of the
+//               HdbExtractor class.
+//
+// $Author: chinkumo $
+//
+// $Revision: 1.3 $
+//
+// $Log: GetAttDataInfThanCountClass.java,v $
+// Revision 1.3  2005/11/29 16:17:37  chinkumo
+// Code reformated (pogo compatible)
+//
+// Revision 1.2  2005/11/15 13:45:51  chinkumo
+// ...
+//
+// Revision 1.1  2005/09/09 10:03:21  chinkumo
+// First commit !
+// (Dynamic attribut release)
+//
+//
+// copyleft :    European Synchrotron Radiation Facility
+//               BP 220, Grenoble 38043
+//               FRANCE
+//
+//-======================================================================
+//
+//  		This file is generated by POGO
+//	(Program Obviously used to Generate tango Object)
+//
+//         (c) - Software Engineering Group - ESRF
+//=============================================================================
+
+/**
+ * @author	$Author: chinkumo $
+ * @version	$Revision: 1.3 $
+ */
+package HdbExtractor;
+
+import org.omg.CORBA.Any;
+
+import fr.esrf.Tango.DevFailed;
+import fr.esrf.Tango.DispLevel;
+import fr.esrf.TangoDs.Command;
+import fr.esrf.TangoDs.DeviceImpl;
+import fr.esrf.TangoDs.Except;
+import fr.esrf.TangoDs.TangoConst;
+import fr.esrf.TangoDs.Util;
+
+/**
+ * Class Description: Returns the number of data lower than the given value.
+ */
+
+public class GetAttDataInfThanCountClass extends Command implements TangoConst {
+	// ===============================================================
+	/**
+	 * Constructor for Command class GetAttDataInfThanCountClass
+	 * 
+	 * @param name
+	 *            command name
+	 * @param in
+	 *            argin type
+	 * @param out
+	 *            argout type
+	 */
+	// ===============================================================
+	public GetAttDataInfThanCountClass(final String name, final int in, final int out) {
+		super(name, in, out);
+	}
+
+	// ===============================================================
+	/**
+	 * Constructor for Command class GetAttDataInfThanCountClass
+	 * 
+	 * @param name
+	 *            command name
+	 * @param in
+	 *            argin type
+	 * @param in_comments
+	 *            argin description
+	 * @param out
+	 *            argout type
+	 * @param out_comments
+	 *            argout description
+	 */
+	// ===============================================================
+	public GetAttDataInfThanCountClass(final String name, final int in, final int out, final String in_comments, final String out_comments) {
+		super(name, in, out, in_comments, out_comments);
+	}
+
+	// ===============================================================
+	/**
+	 * Constructor for Command class GetAttDataInfThanCountClass
+	 * 
+	 * @param name
+	 *            command name
+	 * @param in
+	 *            argin type
+	 * @param in_comments
+	 *            argin description
+	 * @param out
+	 *            argout type
+	 * @param out_comments
+	 *            argout description
+	 * @param level
+	 *            The command display type OPERATOR or EXPERT
+	 */
+	// ===============================================================
+	public GetAttDataInfThanCountClass(final String name, final int in, final int out, final String in_comments, final String out_comments, final DispLevel level) {
+		super(name, in, out, in_comments, out_comments, level);
+	}
+
+	// ===============================================================
+	/**
+	 * return the result of the device's command.
+	 */
+	// ===============================================================
+	@Override
+	public Any execute(final DeviceImpl device, final Any in_any) throws DevFailed {
+		Util.out2.println("GetAttDataInfThanCountClass.execute(): arrived");
+		final String[] argin = extract_DevVarStringArray(in_any);
+
+		if (!(device instanceof HdbExtractor)) {
+			Except.throw_exception("DEVICE_ERROR", "Device parameter is not instance of HdbExtractor", "HdbExtractor");
+		}
+
+		return insert(((HdbExtractor) device).get_att_data_inf_than_count(argin));
+	}
+
+	// ===============================================================
+	/**
+	 * Check if it is allowed to execute the command.
+	 */
+	// ===============================================================
+	@Override
+	public boolean is_allowed(final DeviceImpl device, final Any data_in) {
+		// End of Generated Code
+
+		// Re-Start of Generated Code
+		return true;
+	}
+}
+
+// -----------------------------------------------------------------------------
+/*
+ * end of $Source:/cvsroot/tango-cs/tango/jserver/archiving/HdbExtractor/
+ * GetAttDataInfThanCountClass.java,v $
+ */
diff --git a/src/main/java/HdbExtractor/GetAttDataLastNClass.java b/hdbextractor/src/main/java/HdbExtractor/GetAttDataLastNClass.java
similarity index 96%
rename from src/main/java/HdbExtractor/GetAttDataLastNClass.java
rename to hdbextractor/src/main/java/HdbExtractor/GetAttDataLastNClass.java
index 7dc58c16117987d785cbd9d1bdf7ca252558cce0..762ce8fbc68035b86955de855cf2213fcf239bac 100644
--- a/src/main/java/HdbExtractor/GetAttDataLastNClass.java
+++ b/hdbextractor/src/main/java/HdbExtractor/GetAttDataLastNClass.java
@@ -1,154 +1,154 @@
-//+======================================================================
-// $Source: /cvsroot/tango-cs/tango/jserver/archiving/HdbExtractor/GetAttDataLastNClass.java,v $
-//
-// Project:      Tango Device Server
-//
-// Description:  Java source code for the command TemplateClass of the
-//               HdbExtractor class.
-//
-// $Author: chinkumo $
-//
-// $Revision: 1.3 $
-//
-// $Log: GetAttDataLastNClass.java,v $
-// Revision 1.3  2005/11/29 16:17:37  chinkumo
-// Code reformated (pogo compatible)
-//
-// Revision 1.2  2005/11/15 13:45:51  chinkumo
-// ...
-//
-// Revision 1.1  2005/09/09 10:03:21  chinkumo
-// First commit !
-// (Dynamic attribut release)
-//
-//
-// copyleft :    European Synchrotron Radiation Facility
-//               BP 220, Grenoble 38043
-//               FRANCE
-//
-//-======================================================================
-//
-//  		This file is generated by POGO
-//	(Program Obviously used to Generate tango Object)
-//
-//         (c) - Software Engineering Group - ESRF
-//=============================================================================
-
-/**
- * @author	$Author: chinkumo $
- * @version	$Revision: 1.3 $
- */
-package HdbExtractor;
-
-import org.omg.CORBA.Any;
-
-import fr.esrf.Tango.DevFailed;
-import fr.esrf.Tango.DispLevel;
-import fr.esrf.TangoDs.Command;
-import fr.esrf.TangoDs.DeviceImpl;
-import fr.esrf.TangoDs.Except;
-import fr.esrf.TangoDs.TangoConst;
-import fr.esrf.TangoDs.Util;
-
-/**
- * Class Description: Retrieves the last n archived data, for a given scalar
- * attribute. Create a dynamic attribute, retrieve the corresponding data from
- * database and prepare result for attribute_history call.
- */
-
-public class GetAttDataLastNClass extends Command implements TangoConst {
-	// ===============================================================
-	/**
-	 * Constructor for Command class GetAttDataLastNClass
-	 * 
-	 * @param name
-	 *            command name
-	 * @param in
-	 *            argin type
-	 * @param out
-	 *            argout type
-	 */
-	// ===============================================================
-	public GetAttDataLastNClass(final String name, final int in, final int out) {
-		super(name, in, out);
-	}
-
-	// ===============================================================
-	/**
-	 * Constructor for Command class GetAttDataLastNClass
-	 * 
-	 * @param name
-	 *            command name
-	 * @param in
-	 *            argin type
-	 * @param in_comments
-	 *            argin description
-	 * @param out
-	 *            argout type
-	 * @param out_comments
-	 *            argout description
-	 */
-	// ===============================================================
-	public GetAttDataLastNClass(final String name, final int in, final int out, final String in_comments, final String out_comments) {
-		super(name, in, out, in_comments, out_comments);
-	}
-
-	// ===============================================================
-	/**
-	 * Constructor for Command class GetAttDataLastNClass
-	 * 
-	 * @param name
-	 *            command name
-	 * @param in
-	 *            argin type
-	 * @param in_comments
-	 *            argin description
-	 * @param out
-	 *            argout type
-	 * @param out_comments
-	 *            argout description
-	 * @param level
-	 *            The command display type OPERATOR or EXPERT
-	 */
-	// ===============================================================
-	public GetAttDataLastNClass(final String name, final int in, final int out, final String in_comments, final String out_comments, final DispLevel level) {
-		super(name, in, out, in_comments, out_comments, level);
-	}
-
-	// ===============================================================
-	/**
-	 * return the result of the device's command.
-	 */
-	// ===============================================================
-	@Override
-	public Any execute(final DeviceImpl device, final Any in_any) throws DevFailed {
-		Util.out2.println("GetAttDataLastNClass.execute(): arrived");
-		final String[] argin = extract_DevVarStringArray(in_any);
-
-		if (!(device instanceof HdbExtractor)) {
-			Except.throw_exception("DEVICE_ERROR", "Device parameter is not instance of HdbExtractor", "HdbExtractor");
-		}
-
-		return insert(((HdbExtractor) device).get_att_data_last_n(argin));
-	}
-
-	// ===============================================================
-	/**
-	 * Check if it is allowed to execute the command.
-	 */
-	// ===============================================================
-	@Override
-	public boolean is_allowed(final DeviceImpl device, final Any data_in) {
-		// End of Generated Code
-
-		// Re-Start of Generated Code
-		return true;
-	}
-}
-
-// -----------------------------------------------------------------------------
-/*
- * end of $Source:
- * /cvsroot/tango-cs/tango/jserver/archiving/HdbExtractor/GetAttDataLastNClass
- * .java,v $
- */
+//+======================================================================
+// $Source: /cvsroot/tango-cs/tango/jserver/archiving/HdbExtractor/GetAttDataLastNClass.java,v $
+//
+// Project:      Tango Device Server
+//
+// Description:  Java source code for the command TemplateClass of the
+//               HdbExtractor class.
+//
+// $Author: chinkumo $
+//
+// $Revision: 1.3 $
+//
+// $Log: GetAttDataLastNClass.java,v $
+// Revision 1.3  2005/11/29 16:17:37  chinkumo
+// Code reformated (pogo compatible)
+//
+// Revision 1.2  2005/11/15 13:45:51  chinkumo
+// ...
+//
+// Revision 1.1  2005/09/09 10:03:21  chinkumo
+// First commit !
+// (Dynamic attribut release)
+//
+//
+// copyleft :    European Synchrotron Radiation Facility
+//               BP 220, Grenoble 38043
+//               FRANCE
+//
+//-======================================================================
+//
+//  		This file is generated by POGO
+//	(Program Obviously used to Generate tango Object)
+//
+//         (c) - Software Engineering Group - ESRF
+//=============================================================================
+
+/**
+ * @author	$Author: chinkumo $
+ * @version	$Revision: 1.3 $
+ */
+package HdbExtractor;
+
+import org.omg.CORBA.Any;
+
+import fr.esrf.Tango.DevFailed;
+import fr.esrf.Tango.DispLevel;
+import fr.esrf.TangoDs.Command;
+import fr.esrf.TangoDs.DeviceImpl;
+import fr.esrf.TangoDs.Except;
+import fr.esrf.TangoDs.TangoConst;
+import fr.esrf.TangoDs.Util;
+
+/**
+ * Class Description: Retrieves the last n archived data, for a given scalar
+ * attribute. Create a dynamic attribute, retrieve the corresponding data from
+ * database and prepare result for attribute_history call.
+ */
+
+public class GetAttDataLastNClass extends Command implements TangoConst {
+	// ===============================================================
+	/**
+	 * Constructor for Command class GetAttDataLastNClass
+	 * 
+	 * @param name
+	 *            command name
+	 * @param in
+	 *            argin type
+	 * @param out
+	 *            argout type
+	 */
+	// ===============================================================
+	public GetAttDataLastNClass(final String name, final int in, final int out) {
+		super(name, in, out);
+	}
+
+	// ===============================================================
+	/**
+	 * Constructor for Command class GetAttDataLastNClass
+	 * 
+	 * @param name
+	 *            command name
+	 * @param in
+	 *            argin type
+	 * @param in_comments
+	 *            argin description
+	 * @param out
+	 *            argout type
+	 * @param out_comments
+	 *            argout description
+	 */
+	// ===============================================================
+	public GetAttDataLastNClass(final String name, final int in, final int out, final String in_comments, final String out_comments) {
+		super(name, in, out, in_comments, out_comments);
+	}
+
+	// ===============================================================
+	/**
+	 * Constructor for Command class GetAttDataLastNClass
+	 * 
+	 * @param name
+	 *            command name
+	 * @param in
+	 *            argin type
+	 * @param in_comments
+	 *            argin description
+	 * @param out
+	 *            argout type
+	 * @param out_comments
+	 *            argout description
+	 * @param level
+	 *            The command display type OPERATOR or EXPERT
+	 */
+	// ===============================================================
+	public GetAttDataLastNClass(final String name, final int in, final int out, final String in_comments, final String out_comments, final DispLevel level) {
+		super(name, in, out, in_comments, out_comments, level);
+	}
+
+	// ===============================================================
+	/**
+	 * return the result of the device's command.
+	 */
+	// ===============================================================
+	@Override
+	public Any execute(final DeviceImpl device, final Any in_any) throws DevFailed {
+		Util.out2.println("GetAttDataLastNClass.execute(): arrived");
+		final String[] argin = extract_DevVarStringArray(in_any);
+
+		if (!(device instanceof HdbExtractor)) {
+			Except.throw_exception("DEVICE_ERROR", "Device parameter is not instance of HdbExtractor", "HdbExtractor");
+		}
+
+		return insert(((HdbExtractor) device).get_att_data_last_n(argin));
+	}
+
+	// ===============================================================
+	/**
+	 * Check if it is allowed to execute the command.
+	 */
+	// ===============================================================
+	@Override
+	public boolean is_allowed(final DeviceImpl device, final Any data_in) {
+		// End of Generated Code
+
+		// Re-Start of Generated Code
+		return true;
+	}
+}
+
+// -----------------------------------------------------------------------------
+/*
+ * end of $Source:
+ * /cvsroot/tango-cs/tango/jserver/archiving/HdbExtractor/GetAttDataLastNClass
+ * .java,v $
+ */
diff --git a/src/main/java/HdbExtractor/GetAttDataMaxBetweenDatesClass.java b/hdbextractor/src/main/java/HdbExtractor/GetAttDataMaxBetweenDatesClass.java
similarity index 96%
rename from src/main/java/HdbExtractor/GetAttDataMaxBetweenDatesClass.java
rename to hdbextractor/src/main/java/HdbExtractor/GetAttDataMaxBetweenDatesClass.java
index ba6b4ce305af4ac23b3ac7fc98c9cc43e1ab779e..907fa307e5576469dbf001ce476d192877af0770 100644
--- a/src/main/java/HdbExtractor/GetAttDataMaxBetweenDatesClass.java
+++ b/hdbextractor/src/main/java/HdbExtractor/GetAttDataMaxBetweenDatesClass.java
@@ -1,152 +1,152 @@
-//+======================================================================
-// $Source: /cvsroot/tango-cs/tango/jserver/archiving/HdbExtractor/GetAttDataMaxBetweenDatesClass.java,v $
-//
-// Project:      Tango Device Server
-//
-// Description:  Java source code for the command TemplateClass of the
-//               HdbExtractor class.
-//
-// $Author: chinkumo $
-//
-// $Revision: 1.3 $
-//
-// $Log: GetAttDataMaxBetweenDatesClass.java,v $
-// Revision 1.3  2005/11/29 16:17:37  chinkumo
-// Code reformated (pogo compatible)
-//
-// Revision 1.2  2005/11/15 13:45:51  chinkumo
-// ...
-//
-// Revision 1.1  2005/09/09 10:03:21  chinkumo
-// First commit !
-// (Dynamic attribut release)
-//
-//
-// copyleft :    European Synchrotron Radiation Facility
-//               BP 220, Grenoble 38043
-//               FRANCE
-//
-//-======================================================================
-//
-//  		This file is generated by POGO
-//	(Program Obviously used to Generate tango Object)
-//
-//         (c) - Software Engineering Group - ESRF
-//=============================================================================
-
-/**
- * @author	$Author: chinkumo $
- * @version	$Revision: 1.3 $
- */
-package HdbExtractor;
-
-import org.omg.CORBA.Any;
-
-import fr.esrf.Tango.DevFailed;
-import fr.esrf.Tango.DispLevel;
-import fr.esrf.TangoDs.Command;
-import fr.esrf.TangoDs.DeviceImpl;
-import fr.esrf.TangoDs.Except;
-import fr.esrf.TangoDs.TangoConst;
-import fr.esrf.TangoDs.Util;
-
-/**
- * Class Description: Returns the biggest value generated between the two given
- * dates.
- */
-
-public class GetAttDataMaxBetweenDatesClass extends Command implements TangoConst {
-	// ===============================================================
-	/**
-	 * Constructor for Command class GetAttDataMaxBetweenDatesClass
-	 * 
-	 * @param name
-	 *            command name
-	 * @param in
-	 *            argin type
-	 * @param out
-	 *            argout type
-	 */
-	// ===============================================================
-	public GetAttDataMaxBetweenDatesClass(final String name, final int in, final int out) {
-		super(name, in, out);
-	}
-
-	// ===============================================================
-	/**
-	 * Constructor for Command class GetAttDataMaxBetweenDatesClass
-	 * 
-	 * @param name
-	 *            command name
-	 * @param in
-	 *            argin type
-	 * @param in_comments
-	 *            argin description
-	 * @param out
-	 *            argout type
-	 * @param out_comments
-	 *            argout description
-	 */
-	// ===============================================================
-	public GetAttDataMaxBetweenDatesClass(final String name, final int in, final int out, final String in_comments, final String out_comments) {
-		super(name, in, out, in_comments, out_comments);
-	}
-
-	// ===============================================================
-	/**
-	 * Constructor for Command class GetAttDataMaxBetweenDatesClass
-	 * 
-	 * @param name
-	 *            command name
-	 * @param in
-	 *            argin type
-	 * @param in_comments
-	 *            argin description
-	 * @param out
-	 *            argout type
-	 * @param out_comments
-	 *            argout description
-	 * @param level
-	 *            The command display type OPERATOR or EXPERT
-	 */
-	// ===============================================================
-	public GetAttDataMaxBetweenDatesClass(final String name, final int in, final int out, final String in_comments, final String out_comments, final DispLevel level) {
-		super(name, in, out, in_comments, out_comments, level);
-	}
-
-	// ===============================================================
-	/**
-	 * return the result of the device's command.
-	 */
-	// ===============================================================
-	@Override
-	public Any execute(final DeviceImpl device, final Any in_any) throws DevFailed {
-		Util.out2.println("GetAttDataMaxBetweenDatesClass.execute(): arrived");
-		final String[] argin = extract_DevVarStringArray(in_any);
-
-		if (!(device instanceof HdbExtractor)) {
-			Except.throw_exception("DEVICE_ERROR", "Device parameter is not instance of HdbExtractor", "HdbExtractor");
-		}
-
-		return insert(((HdbExtractor) device).get_att_data_max_between_dates(argin));
-	}
-
-	// ===============================================================
-	/**
-	 * Check if it is allowed to execute the command.
-	 */
-	// ===============================================================
-	@Override
-	public boolean is_allowed(final DeviceImpl device, final Any data_in) {
-		// End of Generated Code
-
-		// Re-Start of Generated Code
-		return true;
-	}
-}
-
-// -----------------------------------------------------------------------------
-/*
- * end of $Source:/cvsroot/tango-cs/tango/jserver/archiving/HdbExtractor/
- * GetAttDataMaxBetweenDatesClass.java,v $
- */
+//+======================================================================
+// $Source: /cvsroot/tango-cs/tango/jserver/archiving/HdbExtractor/GetAttDataMaxBetweenDatesClass.java,v $
+//
+// Project:      Tango Device Server
+//
+// Description:  Java source code for the command TemplateClass of the
+//               HdbExtractor class.
+//
+// $Author: chinkumo $
+//
+// $Revision: 1.3 $
+//
+// $Log: GetAttDataMaxBetweenDatesClass.java,v $
+// Revision 1.3  2005/11/29 16:17:37  chinkumo
+// Code reformated (pogo compatible)
+//
+// Revision 1.2  2005/11/15 13:45:51  chinkumo
+// ...
+//
+// Revision 1.1  2005/09/09 10:03:21  chinkumo
+// First commit !
+// (Dynamic attribut release)
+//
+//
+// copyleft :    European Synchrotron Radiation Facility
+//               BP 220, Grenoble 38043
+//               FRANCE
+//
+//-======================================================================
+//
+//  		This file is generated by POGO
+//	(Program Obviously used to Generate tango Object)
+//
+//         (c) - Software Engineering Group - ESRF
+//=============================================================================
+
+/**
+ * @author	$Author: chinkumo $
+ * @version	$Revision: 1.3 $
+ */
+package HdbExtractor;
+
+import org.omg.CORBA.Any;
+
+import fr.esrf.Tango.DevFailed;
+import fr.esrf.Tango.DispLevel;
+import fr.esrf.TangoDs.Command;
+import fr.esrf.TangoDs.DeviceImpl;
+import fr.esrf.TangoDs.Except;
+import fr.esrf.TangoDs.TangoConst;
+import fr.esrf.TangoDs.Util;
+
+/**
+ * Class Description: Returns the biggest value generated between the two given
+ * dates.
+ */
+
+public class GetAttDataMaxBetweenDatesClass extends Command implements TangoConst {
+	// ===============================================================
+	/**
+	 * Constructor for Command class GetAttDataMaxBetweenDatesClass
+	 * 
+	 * @param name
+	 *            command name
+	 * @param in
+	 *            argin type
+	 * @param out
+	 *            argout type
+	 */
+	// ===============================================================
+	public GetAttDataMaxBetweenDatesClass(final String name, final int in, final int out) {
+		super(name, in, out);
+	}
+
+	// ===============================================================
+	/**
+	 * Constructor for Command class GetAttDataMaxBetweenDatesClass
+	 * 
+	 * @param name
+	 *            command name
+	 * @param in
+	 *            argin type
+	 * @param in_comments
+	 *            argin description
+	 * @param out
+	 *            argout type
+	 * @param out_comments
+	 *            argout description
+	 */
+	// ===============================================================
+	public GetAttDataMaxBetweenDatesClass(final String name, final int in, final int out, final String in_comments, final String out_comments) {
+		super(name, in, out, in_comments, out_comments);
+	}
+
+	// ===============================================================
+	/**
+	 * Constructor for Command class GetAttDataMaxBetweenDatesClass
+	 * 
+	 * @param name
+	 *            command name
+	 * @param in
+	 *            argin type
+	 * @param in_comments
+	 *            argin description
+	 * @param out
+	 *            argout type
+	 * @param out_comments
+	 *            argout description
+	 * @param level
+	 *            The command display type OPERATOR or EXPERT
+	 */
+	// ===============================================================
+	public GetAttDataMaxBetweenDatesClass(final String name, final int in, final int out, final String in_comments, final String out_comments, final DispLevel level) {
+		super(name, in, out, in_comments, out_comments, level);
+	}
+
+	// ===============================================================
+	/**
+	 * return the result of the device's command.
+	 */
+	// ===============================================================
+	@Override
+	public Any execute(final DeviceImpl device, final Any in_any) throws DevFailed {
+		Util.out2.println("GetAttDataMaxBetweenDatesClass.execute(): arrived");
+		final String[] argin = extract_DevVarStringArray(in_any);
+
+		if (!(device instanceof HdbExtractor)) {
+			Except.throw_exception("DEVICE_ERROR", "Device parameter is not instance of HdbExtractor", "HdbExtractor");
+		}
+
+		return insert(((HdbExtractor) device).get_att_data_max_between_dates(argin));
+	}
+
+	// ===============================================================
+	/**
+	 * Check if it is allowed to execute the command.
+	 */
+	// ===============================================================
+	@Override
+	public boolean is_allowed(final DeviceImpl device, final Any data_in) {
+		// End of Generated Code
+
+		// Re-Start of Generated Code
+		return true;
+	}
+}
+
+// -----------------------------------------------------------------------------
+/*
+ * end of $Source:/cvsroot/tango-cs/tango/jserver/archiving/HdbExtractor/
+ * GetAttDataMaxBetweenDatesClass.java,v $
+ */
diff --git a/src/main/java/HdbExtractor/GetAttDataMaxClass.java b/hdbextractor/src/main/java/HdbExtractor/GetAttDataMaxClass.java
similarity index 96%
rename from src/main/java/HdbExtractor/GetAttDataMaxClass.java
rename to hdbextractor/src/main/java/HdbExtractor/GetAttDataMaxClass.java
index 19007629098b4914c4d86cf9648544406c1bedad..86a47c5a7d394568e45cbfa1801ffa33838e5993 100644
--- a/src/main/java/HdbExtractor/GetAttDataMaxClass.java
+++ b/hdbextractor/src/main/java/HdbExtractor/GetAttDataMaxClass.java
@@ -1,152 +1,152 @@
-//+======================================================================
-// $Source: /cvsroot/tango-cs/tango/jserver/archiving/HdbExtractor/GetAttDataMaxClass.java,v $
-//
-// Project:      Tango Device Server
-//
-// Description:  Java source code for the command TemplateClass of the
-//               HdbExtractor class.
-//
-// $Author: chinkumo $
-//
-// $Revision: 1.3 $
-//
-// $Log: GetAttDataMaxClass.java,v $
-// Revision 1.3  2005/11/29 16:17:37  chinkumo
-// Code reformated (pogo compatible)
-//
-// Revision 1.2  2005/11/15 13:45:51  chinkumo
-// ...
-//
-// Revision 1.1  2005/09/09 10:03:21  chinkumo
-// First commit !
-// (Dynamic attribut release)
-//
-//
-// copyleft :    European Synchrotron Radiation Facility
-//               BP 220, Grenoble 38043
-//               FRANCE
-//
-//-======================================================================
-//
-//  		This file is generated by POGO
-//	(Program Obviously used to Generate tango Object)
-//
-//         (c) - Software Engineering Group - ESRF
-//=============================================================================
-
-/**
- * @author	$Author: chinkumo $
- * @version	$Revision: 1.3 $
- */
-package HdbExtractor;
-
-import org.omg.CORBA.Any;
-
-import fr.esrf.Tango.DevFailed;
-import fr.esrf.Tango.DispLevel;
-import fr.esrf.TangoDs.Command;
-import fr.esrf.TangoDs.DeviceImpl;
-import fr.esrf.TangoDs.Except;
-import fr.esrf.TangoDs.TangoConst;
-import fr.esrf.TangoDs.Util;
-
-/**
- * Class Description: Returns the biggest value generated by the attribute.
- */
-
-public class GetAttDataMaxClass extends Command implements TangoConst {
-	// ===============================================================
-	/**
-	 * Constructor for Command class GetAttDataMaxClass
-	 * 
-	 * @param name
-	 *            command name
-	 * @param in
-	 *            argin type
-	 * @param out
-	 *            argout type
-	 */
-	// ===============================================================
-	public GetAttDataMaxClass(final String name, final int in, final int out) {
-		super(name, in, out);
-	}
-
-	// ===============================================================
-	/**
-	 * Constructor for Command class GetAttDataMaxClass
-	 * 
-	 * @param name
-	 *            command name
-	 * @param in
-	 *            argin type
-	 * @param in_comments
-	 *            argin description
-	 * @param out
-	 *            argout type
-	 * @param out_comments
-	 *            argout description
-	 */
-	// ===============================================================
-	public GetAttDataMaxClass(final String name, final int in, final int out, final String in_comments, final String out_comments) {
-		super(name, in, out, in_comments, out_comments);
-	}
-
-	// ===============================================================
-	/**
-	 * Constructor for Command class GetAttDataMaxClass
-	 * 
-	 * @param name
-	 *            command name
-	 * @param in
-	 *            argin type
-	 * @param in_comments
-	 *            argin description
-	 * @param out
-	 *            argout type
-	 * @param out_comments
-	 *            argout description
-	 * @param level
-	 *            The command display type OPERATOR or EXPERT
-	 */
-	// ===============================================================
-	public GetAttDataMaxClass(final String name, final int in, final int out, final String in_comments, final String out_comments, final DispLevel level) {
-		super(name, in, out, in_comments, out_comments, level);
-	}
-
-	// ===============================================================
-	/**
-	 * return the result of the device's command.
-	 */
-	// ===============================================================
-	@Override
-	public Any execute(final DeviceImpl device, final Any in_any) throws DevFailed {
-		Util.out2.println("GetAttDataMaxClass.execute(): arrived");
-		final String argin = extract_DevString(in_any);
-
-		if (!(device instanceof HdbExtractor)) {
-			Except.throw_exception("DEVICE_ERROR", "Device parameter is not instance of HdbExtractor", "HdbExtractor");
-		}
-
-		return insert(((HdbExtractor) device).get_att_data_max(argin));
-	}
-
-	// ===============================================================
-	/**
-	 * Check if it is allowed to execute the command.
-	 */
-	// ===============================================================
-	@Override
-	public boolean is_allowed(final DeviceImpl device, final Any data_in) {
-		// End of Generated Code
-
-		// Re-Start of Generated Code
-		return true;
-	}
-}
-
-// -----------------------------------------------------------------------------
-/*
- * end of $Source:
- * /cvsroot/tango-cs/tango/jserver/archiving/HdbExtractor/GetAttDataMaxClass
- * .java,v $
- */
+//+======================================================================
+// $Source: /cvsroot/tango-cs/tango/jserver/archiving/HdbExtractor/GetAttDataMaxClass.java,v $
+//
+// Project:      Tango Device Server
+//
+// Description:  Java source code for the command TemplateClass of the
+//               HdbExtractor class.
+//
+// $Author: chinkumo $
+//
+// $Revision: 1.3 $
+//
+// $Log: GetAttDataMaxClass.java,v $
+// Revision 1.3  2005/11/29 16:17:37  chinkumo
+// Code reformated (pogo compatible)
+//
+// Revision 1.2  2005/11/15 13:45:51  chinkumo
+// ...
+//
+// Revision 1.1  2005/09/09 10:03:21  chinkumo
+// First commit !
+// (Dynamic attribut release)
+//
+//
+// copyleft :    European Synchrotron Radiation Facility
+//               BP 220, Grenoble 38043
+//               FRANCE
+//
+//-======================================================================
+//
+//  		This file is generated by POGO
+//	(Program Obviously used to Generate tango Object)
+//
+//         (c) - Software Engineering Group - ESRF
+//=============================================================================
+
+/**
+ * @author	$Author: chinkumo $
+ * @version	$Revision: 1.3 $
+ */
+package HdbExtractor;
+
+import org.omg.CORBA.Any;
+
+import fr.esrf.Tango.DevFailed;
+import fr.esrf.Tango.DispLevel;
+import fr.esrf.TangoDs.Command;
+import fr.esrf.TangoDs.DeviceImpl;
+import fr.esrf.TangoDs.Except;
+import fr.esrf.TangoDs.TangoConst;
+import fr.esrf.TangoDs.Util;
+
+/**
+ * Class Description: Returns the biggest value generated by the attribute.
+ */
+
+public class GetAttDataMaxClass extends Command implements TangoConst {
+	// ===============================================================
+	/**
+	 * Constructor for Command class GetAttDataMaxClass
+	 * 
+	 * @param name
+	 *            command name
+	 * @param in
+	 *            argin type
+	 * @param out
+	 *            argout type
+	 */
+	// ===============================================================
+	public GetAttDataMaxClass(final String name, final int in, final int out) {
+		super(name, in, out);
+	}
+
+	// ===============================================================
+	/**
+	 * Constructor for Command class GetAttDataMaxClass
+	 * 
+	 * @param name
+	 *            command name
+	 * @param in
+	 *            argin type
+	 * @param in_comments
+	 *            argin description
+	 * @param out
+	 *            argout type
+	 * @param out_comments
+	 *            argout description
+	 */
+	// ===============================================================
+	public GetAttDataMaxClass(final String name, final int in, final int out, final String in_comments, final String out_comments) {
+		super(name, in, out, in_comments, out_comments);
+	}
+
+	// ===============================================================
+	/**
+	 * Constructor for Command class GetAttDataMaxClass
+	 * 
+	 * @param name
+	 *            command name
+	 * @param in
+	 *            argin type
+	 * @param in_comments
+	 *            argin description
+	 * @param out
+	 *            argout type
+	 * @param out_comments
+	 *            argout description
+	 * @param level
+	 *            The command display type OPERATOR or EXPERT
+	 */
+	// ===============================================================
+	public GetAttDataMaxClass(final String name, final int in, final int out, final String in_comments, final String out_comments, final DispLevel level) {
+		super(name, in, out, in_comments, out_comments, level);
+	}
+
+	// ===============================================================
+	/**
+	 * return the result of the device's command.
+	 */
+	// ===============================================================
+	@Override
+	public Any execute(final DeviceImpl device, final Any in_any) throws DevFailed {
+		Util.out2.println("GetAttDataMaxClass.execute(): arrived");
+		final String argin = extract_DevString(in_any);
+
+		if (!(device instanceof HdbExtractor)) {
+			Except.throw_exception("DEVICE_ERROR", "Device parameter is not instance of HdbExtractor", "HdbExtractor");
+		}
+
+		return insert(((HdbExtractor) device).get_att_data_max(argin));
+	}
+
+	// ===============================================================
+	/**
+	 * Check if it is allowed to execute the command.
+	 */
+	// ===============================================================
+	@Override
+	public boolean is_allowed(final DeviceImpl device, final Any data_in) {
+		// End of Generated Code
+
+		// Re-Start of Generated Code
+		return true;
+	}
+}
+
+// -----------------------------------------------------------------------------
+/*
+ * end of $Source:
+ * /cvsroot/tango-cs/tango/jserver/archiving/HdbExtractor/GetAttDataMaxClass
+ * .java,v $
+ */
diff --git a/src/main/java/HdbExtractor/GetAttDataMinBetweenDatesClass.java b/hdbextractor/src/main/java/HdbExtractor/GetAttDataMinBetweenDatesClass.java
similarity index 96%
rename from src/main/java/HdbExtractor/GetAttDataMinBetweenDatesClass.java
rename to hdbextractor/src/main/java/HdbExtractor/GetAttDataMinBetweenDatesClass.java
index 9a91429d9e90e3aaeee6ff77105f35dd6bc960f2..2735846808551e2dcfde6648958293cfecbba704 100644
--- a/src/main/java/HdbExtractor/GetAttDataMinBetweenDatesClass.java
+++ b/hdbextractor/src/main/java/HdbExtractor/GetAttDataMinBetweenDatesClass.java
@@ -1,152 +1,152 @@
-//+======================================================================
-// $Source: /cvsroot/tango-cs/tango/jserver/archiving/HdbExtractor/GetAttDataMinBetweenDatesClass.java,v $
-//
-// Project:      Tango Device Server
-//
-// Description:  Java source code for the command TemplateClass of the
-//               HdbExtractor class.
-//
-// $Author: chinkumo $
-//
-// $Revision: 1.3 $
-//
-// $Log: GetAttDataMinBetweenDatesClass.java,v $
-// Revision 1.3  2005/11/29 16:17:37  chinkumo
-// Code reformated (pogo compatible)
-//
-// Revision 1.2  2005/11/15 13:45:51  chinkumo
-// ...
-//
-// Revision 1.1  2005/09/09 10:03:21  chinkumo
-// First commit !
-// (Dynamic attribut release)
-//
-//
-// copyleft :    European Synchrotron Radiation Facility
-//               BP 220, Grenoble 38043
-//               FRANCE
-//
-//-======================================================================
-//
-//  		This file is generated by POGO
-//	(Program Obviously used to Generate tango Object)
-//
-//         (c) - Software Engineering Group - ESRF
-//=============================================================================
-
-/**
- * @author	$Author: chinkumo $
- * @version	$Revision: 1.3 $
- */
-package HdbExtractor;
-
-import org.omg.CORBA.Any;
-
-import fr.esrf.Tango.DevFailed;
-import fr.esrf.Tango.DispLevel;
-import fr.esrf.TangoDs.Command;
-import fr.esrf.TangoDs.DeviceImpl;
-import fr.esrf.TangoDs.Except;
-import fr.esrf.TangoDs.TangoConst;
-import fr.esrf.TangoDs.Util;
-
-/**
- * Class Description: Returns the smallest scalar value generated by the given
- * attribute and between two given dates
- */
-
-public class GetAttDataMinBetweenDatesClass extends Command implements TangoConst {
-	// ===============================================================
-	/**
-	 * Constructor for Command class GetAttDataMinBetweenDatesClass
-	 * 
-	 * @param name
-	 *            command name
-	 * @param in
-	 *            argin type
-	 * @param out
-	 *            argout type
-	 */
-	// ===============================================================
-	public GetAttDataMinBetweenDatesClass(final String name, final int in, final int out) {
-		super(name, in, out);
-	}
-
-	// ===============================================================
-	/**
-	 * Constructor for Command class GetAttDataMinBetweenDatesClass
-	 * 
-	 * @param name
-	 *            command name
-	 * @param in
-	 *            argin type
-	 * @param in_comments
-	 *            argin description
-	 * @param out
-	 *            argout type
-	 * @param out_comments
-	 *            argout description
-	 */
-	// ===============================================================
-	public GetAttDataMinBetweenDatesClass(final String name, final int in, final int out, final String in_comments, final String out_comments) {
-		super(name, in, out, in_comments, out_comments);
-	}
-
-	// ===============================================================
-	/**
-	 * Constructor for Command class GetAttDataMinBetweenDatesClass
-	 * 
-	 * @param name
-	 *            command name
-	 * @param in
-	 *            argin type
-	 * @param in_comments
-	 *            argin description
-	 * @param out
-	 *            argout type
-	 * @param out_comments
-	 *            argout description
-	 * @param level
-	 *            The command display type OPERATOR or EXPERT
-	 */
-	// ===============================================================
-	public GetAttDataMinBetweenDatesClass(final String name, final int in, final int out, final String in_comments, final String out_comments, final DispLevel level) {
-		super(name, in, out, in_comments, out_comments, level);
-	}
-
-	// ===============================================================
-	/**
-	 * return the result of the device's command.
-	 */
-	// ===============================================================
-	@Override
-	public Any execute(final DeviceImpl device, final Any in_any) throws DevFailed {
-		Util.out2.println("GetAttDataMinBetweenDatesClass.execute(): arrived");
-		final String[] argin = extract_DevVarStringArray(in_any);
-
-		if (!(device instanceof HdbExtractor)) {
-			Except.throw_exception("DEVICE_ERROR", "Device parameter is not instance of HdbExtractor", "HdbExtractor");
-		}
-
-		return insert(((HdbExtractor) device).get_att_data_min_between_dates(argin));
-	}
-
-	// ===============================================================
-	/**
-	 * Check if it is allowed to execute the command.
-	 */
-	// ===============================================================
-	@Override
-	public boolean is_allowed(final DeviceImpl device, final Any data_in) {
-		// End of Generated Code
-
-		// Re-Start of Generated Code
-		return true;
-	}
-}
-
-// -----------------------------------------------------------------------------
-/*
- * end of $Source:/cvsroot/tango-cs/tango/jserver/archiving/HdbExtractor/
- * GetAttDataMinBetweenDatesClass.java,v $
- */
+//+======================================================================
+// $Source: /cvsroot/tango-cs/tango/jserver/archiving/HdbExtractor/GetAttDataMinBetweenDatesClass.java,v $
+//
+// Project:      Tango Device Server
+//
+// Description:  Java source code for the command TemplateClass of the
+//               HdbExtractor class.
+//
+// $Author: chinkumo $
+//
+// $Revision: 1.3 $
+//
+// $Log: GetAttDataMinBetweenDatesClass.java,v $
+// Revision 1.3  2005/11/29 16:17:37  chinkumo
+// Code reformated (pogo compatible)
+//
+// Revision 1.2  2005/11/15 13:45:51  chinkumo
+// ...
+//
+// Revision 1.1  2005/09/09 10:03:21  chinkumo
+// First commit !
+// (Dynamic attribut release)
+//
+//
+// copyleft :    European Synchrotron Radiation Facility
+//               BP 220, Grenoble 38043
+//               FRANCE
+//
+//-======================================================================
+//
+//  		This file is generated by POGO
+//	(Program Obviously used to Generate tango Object)
+//
+//         (c) - Software Engineering Group - ESRF
+//=============================================================================
+
+/**
+ * @author	$Author: chinkumo $
+ * @version	$Revision: 1.3 $
+ */
+package HdbExtractor;
+
+import org.omg.CORBA.Any;
+
+import fr.esrf.Tango.DevFailed;
+import fr.esrf.Tango.DispLevel;
+import fr.esrf.TangoDs.Command;
+import fr.esrf.TangoDs.DeviceImpl;
+import fr.esrf.TangoDs.Except;
+import fr.esrf.TangoDs.TangoConst;
+import fr.esrf.TangoDs.Util;
+
+/**
+ * Class Description: Returns the smallest scalar value generated by the given
+ * attribute and between two given dates
+ */
+
+public class GetAttDataMinBetweenDatesClass extends Command implements TangoConst {
+	// ===============================================================
+	/**
+	 * Constructor for Command class GetAttDataMinBetweenDatesClass
+	 * 
+	 * @param name
+	 *            command name
+	 * @param in
+	 *            argin type
+	 * @param out
+	 *            argout type
+	 */
+	// ===============================================================
+	public GetAttDataMinBetweenDatesClass(final String name, final int in, final int out) {
+		super(name, in, out);
+	}
+
+	// ===============================================================
+	/**
+	 * Constructor for Command class GetAttDataMinBetweenDatesClass
+	 * 
+	 * @param name
+	 *            command name
+	 * @param in
+	 *            argin type
+	 * @param in_comments
+	 *            argin description
+	 * @param out
+	 *            argout type
+	 * @param out_comments
+	 *            argout description
+	 */
+	// ===============================================================
+	public GetAttDataMinBetweenDatesClass(final String name, final int in, final int out, final String in_comments, final String out_comments) {
+		super(name, in, out, in_comments, out_comments);
+	}
+
+	// ===============================================================
+	/**
+	 * Constructor for Command class GetAttDataMinBetweenDatesClass
+	 * 
+	 * @param name
+	 *            command name
+	 * @param in
+	 *            argin type
+	 * @param in_comments
+	 *            argin description
+	 * @param out
+	 *            argout type
+	 * @param out_comments
+	 *            argout description
+	 * @param level
+	 *            The command display type OPERATOR or EXPERT
+	 */
+	// ===============================================================
+	public GetAttDataMinBetweenDatesClass(final String name, final int in, final int out, final String in_comments, final String out_comments, final DispLevel level) {
+		super(name, in, out, in_comments, out_comments, level);
+	}
+
+	// ===============================================================
+	/**
+	 * return the result of the device's command.
+	 */
+	// ===============================================================
+	@Override
+	public Any execute(final DeviceImpl device, final Any in_any) throws DevFailed {
+		Util.out2.println("GetAttDataMinBetweenDatesClass.execute(): arrived");
+		final String[] argin = extract_DevVarStringArray(in_any);
+
+		if (!(device instanceof HdbExtractor)) {
+			Except.throw_exception("DEVICE_ERROR", "Device parameter is not instance of HdbExtractor", "HdbExtractor");
+		}
+
+		return insert(((HdbExtractor) device).get_att_data_min_between_dates(argin));
+	}
+
+	// ===============================================================
+	/**
+	 * Check if it is allowed to execute the command.
+	 */
+	// ===============================================================
+	@Override
+	public boolean is_allowed(final DeviceImpl device, final Any data_in) {
+		// End of Generated Code
+
+		// Re-Start of Generated Code
+		return true;
+	}
+}
+
+// -----------------------------------------------------------------------------
+/*
+ * end of $Source:/cvsroot/tango-cs/tango/jserver/archiving/HdbExtractor/
+ * GetAttDataMinBetweenDatesClass.java,v $
+ */
diff --git a/src/main/java/HdbExtractor/GetAttDataMinClass.java b/hdbextractor/src/main/java/HdbExtractor/GetAttDataMinClass.java
similarity index 96%
rename from src/main/java/HdbExtractor/GetAttDataMinClass.java
rename to hdbextractor/src/main/java/HdbExtractor/GetAttDataMinClass.java
index 372780e76d0bfc7d042829fb8525747101d70964..5f74575ba9148ded420f557c27da023774dd6594 100644
--- a/src/main/java/HdbExtractor/GetAttDataMinClass.java
+++ b/hdbextractor/src/main/java/HdbExtractor/GetAttDataMinClass.java
@@ -1,152 +1,152 @@
-//+======================================================================
-// $Source: /cvsroot/tango-cs/tango/jserver/archiving/HdbExtractor/GetAttDataMinClass.java,v $
-//
-// Project:      Tango Device Server
-//
-// Description:  Java source code for the command TemplateClass of the
-//               HdbExtractor class.
-//
-// $Author: chinkumo $
-//
-// $Revision: 1.3 $
-//
-// $Log: GetAttDataMinClass.java,v $
-// Revision 1.3  2005/11/29 16:17:37  chinkumo
-// Code reformated (pogo compatible)
-//
-// Revision 1.2  2005/11/15 13:45:51  chinkumo
-// ...
-//
-// Revision 1.1  2005/09/09 10:03:21  chinkumo
-// First commit !
-// (Dynamic attribut release)
-//
-//
-// copyleft :    European Synchrotron Radiation Facility
-//               BP 220, Grenoble 38043
-//               FRANCE
-//
-//-======================================================================
-//
-//  		This file is generated by POGO
-//	(Program Obviously used to Generate tango Object)
-//
-//         (c) - Software Engineering Group - ESRF
-//=============================================================================
-
-/**
- * @author	$Author: chinkumo $
- * @version	$Revision: 1.3 $
- */
-package HdbExtractor;
-
-import org.omg.CORBA.Any;
-
-import fr.esrf.Tango.DevFailed;
-import fr.esrf.Tango.DispLevel;
-import fr.esrf.TangoDs.Command;
-import fr.esrf.TangoDs.DeviceImpl;
-import fr.esrf.TangoDs.Except;
-import fr.esrf.TangoDs.TangoConst;
-import fr.esrf.TangoDs.Util;
-
-/**
- * Class Description: Returns the smallest scalar value generated by the
- * attribute.
- */
-
-public class GetAttDataMinClass extends Command implements TangoConst {
-	// ===============================================================
-	/**
-	 * Constructor for Command class GetAttDataMinClass
-	 * 
-	 * @param name
-	 *            command name
-	 * @param in
-	 *            argin type
-	 * @param out
-	 *            argout type
-	 */
-	// ===============================================================
-	public GetAttDataMinClass(final String name, final int in, final int out) {
-		super(name, in, out);
-	}
-
-	// ===============================================================
-	/**
-	 * Constructor for Command class GetAttDataMinClass
-	 * 
-	 * @param name
-	 *            command name
-	 * @param in
-	 *            argin type
-	 * @param in_comments
-	 *            argin description
-	 * @param out
-	 *            argout type
-	 * @param out_comments
-	 *            argout description
-	 */
-	// ===============================================================
-	public GetAttDataMinClass(final String name, final int in, final int out, final String in_comments, final String out_comments) {
-		super(name, in, out, in_comments, out_comments);
-	}
-
-	// ===============================================================
-	/**
-	 * Constructor for Command class GetAttDataMinClass
-	 * 
-	 * @param name
-	 *            command name
-	 * @param in
-	 *            argin type
-	 * @param in_comments
-	 *            argin description
-	 * @param out
-	 *            argout type
-	 * @param out_comments
-	 *            argout description
-	 * @param level
-	 *            The command display type OPERATOR or EXPERT
-	 */
-	// ===============================================================
-	public GetAttDataMinClass(final String name, final int in, final int out, final String in_comments, final String out_comments, final DispLevel level) {
-		super(name, in, out, in_comments, out_comments, level);
-	}
-
-	// ===============================================================
-	/**
-	 * return the result of the device's command.
-	 */
-	// ===============================================================
-	@Override
-	public Any execute(final DeviceImpl device, final Any in_any) throws DevFailed {
-		Util.out2.println("GetAttDataMinClass.execute(): arrived");
-		final String argin = extract_DevString(in_any);
-		if (!(device instanceof HdbExtractor)) {
-			Except.throw_exception("DEVICE_ERROR", "Device parameter is not instance of HdbExtractor", "HdbExtractor");
-		}
-
-		return insert(((HdbExtractor) device).get_att_data_min(argin));
-	}
-
-	// ===============================================================
-	/**
-	 * Check if it is allowed to execute the command.
-	 */
-	// ===============================================================
-	@Override
-	public boolean is_allowed(final DeviceImpl device, final Any data_in) {
-		// End of Generated Code
-
-		// Re-Start of Generated Code
-		return true;
-	}
-}
-
-// -----------------------------------------------------------------------------
-/*
- * end of $Source:
- * /cvsroot/tango-cs/tango/jserver/archiving/HdbExtractor/GetAttDataMinClass
- * .java,v $
- */
+//+======================================================================
+// $Source: /cvsroot/tango-cs/tango/jserver/archiving/HdbExtractor/GetAttDataMinClass.java,v $
+//
+// Project:      Tango Device Server
+//
+// Description:  Java source code for the command TemplateClass of the
+//               HdbExtractor class.
+//
+// $Author: chinkumo $
+//
+// $Revision: 1.3 $
+//
+// $Log: GetAttDataMinClass.java,v $
+// Revision 1.3  2005/11/29 16:17:37  chinkumo
+// Code reformated (pogo compatible)
+//
+// Revision 1.2  2005/11/15 13:45:51  chinkumo
+// ...
+//
+// Revision 1.1  2005/09/09 10:03:21  chinkumo
+// First commit !
+// (Dynamic attribut release)
+//
+//
+// copyleft :    European Synchrotron Radiation Facility
+//               BP 220, Grenoble 38043
+//               FRANCE
+//
+//-======================================================================
+//
+//  		This file is generated by POGO
+//	(Program Obviously used to Generate tango Object)
+//
+//         (c) - Software Engineering Group - ESRF
+//=============================================================================
+
+/**
+ * @author	$Author: chinkumo $
+ * @version	$Revision: 1.3 $
+ */
+package HdbExtractor;
+
+import org.omg.CORBA.Any;
+
+import fr.esrf.Tango.DevFailed;
+import fr.esrf.Tango.DispLevel;
+import fr.esrf.TangoDs.Command;
+import fr.esrf.TangoDs.DeviceImpl;
+import fr.esrf.TangoDs.Except;
+import fr.esrf.TangoDs.TangoConst;
+import fr.esrf.TangoDs.Util;
+
+/**
+ * Class Description: Returns the smallest scalar value generated by the
+ * attribute.
+ */
+
+public class GetAttDataMinClass extends Command implements TangoConst {
+	// ===============================================================
+	/**
+	 * Constructor for Command class GetAttDataMinClass
+	 * 
+	 * @param name
+	 *            command name
+	 * @param in
+	 *            argin type
+	 * @param out
+	 *            argout type
+	 */
+	// ===============================================================
+	public GetAttDataMinClass(final String name, final int in, final int out) {
+		super(name, in, out);
+	}
+
+	// ===============================================================
+	/**
+	 * Constructor for Command class GetAttDataMinClass
+	 * 
+	 * @param name
+	 *            command name
+	 * @param in
+	 *            argin type
+	 * @param in_comments
+	 *            argin description
+	 * @param out
+	 *            argout type
+	 * @param out_comments
+	 *            argout description
+	 */
+	// ===============================================================
+	public GetAttDataMinClass(final String name, final int in, final int out, final String in_comments, final String out_comments) {
+		super(name, in, out, in_comments, out_comments);
+	}
+
+	// ===============================================================
+	/**
+	 * Constructor for Command class GetAttDataMinClass
+	 * 
+	 * @param name
+	 *            command name
+	 * @param in
+	 *            argin type
+	 * @param in_comments
+	 *            argin description
+	 * @param out
+	 *            argout type
+	 * @param out_comments
+	 *            argout description
+	 * @param level
+	 *            The command display type OPERATOR or EXPERT
+	 */
+	// ===============================================================
+	public GetAttDataMinClass(final String name, final int in, final int out, final String in_comments, final String out_comments, final DispLevel level) {
+		super(name, in, out, in_comments, out_comments, level);
+	}
+
+	// ===============================================================
+	/**
+	 * return the result of the device's command.
+	 */
+	// ===============================================================
+	@Override
+	public Any execute(final DeviceImpl device, final Any in_any) throws DevFailed {
+		Util.out2.println("GetAttDataMinClass.execute(): arrived");
+		final String argin = extract_DevString(in_any);
+		if (!(device instanceof HdbExtractor)) {
+			Except.throw_exception("DEVICE_ERROR", "Device parameter is not instance of HdbExtractor", "HdbExtractor");
+		}
+
+		return insert(((HdbExtractor) device).get_att_data_min(argin));
+	}
+
+	// ===============================================================
+	/**
+	 * Check if it is allowed to execute the command.
+	 */
+	// ===============================================================
+	@Override
+	public boolean is_allowed(final DeviceImpl device, final Any data_in) {
+		// End of Generated Code
+
+		// Re-Start of Generated Code
+		return true;
+	}
+}
+
+// -----------------------------------------------------------------------------
+/*
+ * end of $Source:
+ * /cvsroot/tango-cs/tango/jserver/archiving/HdbExtractor/GetAttDataMinClass
+ * .java,v $
+ */
diff --git a/src/main/java/HdbExtractor/GetAttDataSupAndInfThanBetweenDatesClass.java b/hdbextractor/src/main/java/HdbExtractor/GetAttDataSupAndInfThanBetweenDatesClass.java
similarity index 97%
rename from src/main/java/HdbExtractor/GetAttDataSupAndInfThanBetweenDatesClass.java
rename to hdbextractor/src/main/java/HdbExtractor/GetAttDataSupAndInfThanBetweenDatesClass.java
index e731317d5e7b2d8b55bdb7c749faa4943622d150..28729cb3fbe7755f1dfb13d4aa97886011fb69e0 100644
--- a/src/main/java/HdbExtractor/GetAttDataSupAndInfThanBetweenDatesClass.java
+++ b/hdbextractor/src/main/java/HdbExtractor/GetAttDataSupAndInfThanBetweenDatesClass.java
@@ -1,153 +1,153 @@
-//+======================================================================
-// $Source: /cvsroot/tango-cs/tango/jserver/archiving/HdbExtractor/GetAttDataSupAndInfThanBetweenDatesClass.java,v $
-//
-// Project:      Tango Device Server
-//
-// Description:  Java source code for the command TemplateClass of the
-//               HdbExtractor class.
-//
-// $Author: chinkumo $
-//
-// $Revision: 1.3 $
-//
-// $Log: GetAttDataSupAndInfThanBetweenDatesClass.java,v $
-// Revision 1.3  2005/11/29 16:17:38  chinkumo
-// Code reformated (pogo compatible)
-//
-// Revision 1.2  2005/11/15 13:45:51  chinkumo
-// ...
-//
-// Revision 1.1  2005/09/09 10:03:21  chinkumo
-// First commit !
-// (Dynamic attribut release)
-//
-//
-// copyleft :    European Synchrotron Radiation Facility
-//               BP 220, Grenoble 38043
-//               FRANCE
-//
-//-======================================================================
-//
-//  		This file is generated by POGO
-//	(Program Obviously used to Generate tango Object)
-//
-//         (c) - Software Engineering Group - ESRF
-//=============================================================================
-
-/**
- * @author	$Author: chinkumo $
- * @version	$Revision: 1.3 $
- */
-package HdbExtractor;
-
-import org.omg.CORBA.Any;
-
-import fr.esrf.Tango.DevFailed;
-import fr.esrf.Tango.DispLevel;
-import fr.esrf.TangoDs.Command;
-import fr.esrf.TangoDs.DeviceImpl;
-import fr.esrf.TangoDs.Except;
-import fr.esrf.TangoDs.TangoConst;
-import fr.esrf.TangoDs.Util;
-
-/**
- * Class Description: Retrieves data beetwen two dates (date_1 & date_2) - Data
- * are higher than the given value x AND lower than the given value y. Create a
- * dynamic attribute, retrieve the corresponding data from database and prepare
- * result for attribute_history call.
- */
-
-public class GetAttDataSupAndInfThanBetweenDatesClass extends Command implements TangoConst {
-	// ===============================================================
-	/**
-	 * Constructor for Command class GetAttDataSupAndInfThanBetweenDatesClass
-	 * 
-	 * @param name
-	 *            command name
-	 * @param in
-	 *            argin type
-	 * @param out
-	 *            argout type
-	 */
-	// ===============================================================
-	public GetAttDataSupAndInfThanBetweenDatesClass(final String name, final int in, final int out) {
-		super(name, in, out);
-	}
-
-	// ===============================================================
-	/**
-	 * Constructor for Command class GetAttDataSupAndInfThanBetweenDatesClass
-	 * 
-	 * @param name
-	 *            command name
-	 * @param in
-	 *            argin type
-	 * @param in_comments
-	 *            argin description
-	 * @param out
-	 *            argout type
-	 * @param out_comments
-	 *            argout description
-	 */
-	// ===============================================================
-	public GetAttDataSupAndInfThanBetweenDatesClass(final String name, final int in, final int out, final String in_comments, final String out_comments) {
-		super(name, in, out, in_comments, out_comments);
-	}
-
-	// ===============================================================
-	/**
-	 * Constructor for Command class GetAttDataSupAndInfThanBetweenDatesClass
-	 * 
-	 * @param name
-	 *            command name
-	 * @param in
-	 *            argin type
-	 * @param in_comments
-	 *            argin description
-	 * @param out
-	 *            argout type
-	 * @param out_comments
-	 *            argout description
-	 * @param level
-	 *            The command display type OPERATOR or EXPERT
-	 */
-	// ===============================================================
-	public GetAttDataSupAndInfThanBetweenDatesClass(final String name, final int in, final int out, final String in_comments, final String out_comments, final DispLevel level) {
-		super(name, in, out, in_comments, out_comments, level);
-	}
-
-	// ===============================================================
-	/**
-	 * return the result of the device's command.
-	 */
-	// ===============================================================
-	@Override
-	public Any execute(final DeviceImpl device, final Any in_any) throws DevFailed {
-		Util.out2.println("GetAttDataSupAndInfThanBetweenDatesClass.execute(): arrived");
-		final String[] argin = extract_DevVarStringArray(in_any);
-		if (!(device instanceof HdbExtractor)) {
-			Except.throw_exception("DEVICE_ERROR", "Device parameter is not instance of HdbExtractor", "HdbExtractor");
-		}
-
-		return insert(((HdbExtractor) device).get_att_data_sup_and_inf_than_between_dates(argin));
-	}
-
-	// ===============================================================
-	/**
-	 * Check if it is allowed to execute the command.
-	 */
-	// ===============================================================
-	@Override
-	public boolean is_allowed(final DeviceImpl device, final Any data_in) {
-		// End of Generated Code
-
-		// Re-Start of Generated Code
-		return true;
-	}
-}
-
-// -----------------------------------------------------------------------------
-/*
- * end of $Source:/cvsroot/tango-cs/tango/jserver/archiving/HdbExtractor/
- * GetAttDataSupAndInfThanBetweenDatesClass.java,v $
- */
+//+======================================================================
+// $Source: /cvsroot/tango-cs/tango/jserver/archiving/HdbExtractor/GetAttDataSupAndInfThanBetweenDatesClass.java,v $
+//
+// Project:      Tango Device Server
+//
+// Description:  Java source code for the command TemplateClass of the
+//               HdbExtractor class.
+//
+// $Author: chinkumo $
+//
+// $Revision: 1.3 $
+//
+// $Log: GetAttDataSupAndInfThanBetweenDatesClass.java,v $
+// Revision 1.3  2005/11/29 16:17:38  chinkumo
+// Code reformated (pogo compatible)
+//
+// Revision 1.2  2005/11/15 13:45:51  chinkumo
+// ...
+//
+// Revision 1.1  2005/09/09 10:03:21  chinkumo
+// First commit !
+// (Dynamic attribut release)
+//
+//
+// copyleft :    European Synchrotron Radiation Facility
+//               BP 220, Grenoble 38043
+//               FRANCE
+//
+//-======================================================================
+//
+//  		This file is generated by POGO
+//	(Program Obviously used to Generate tango Object)
+//
+//         (c) - Software Engineering Group - ESRF
+//=============================================================================
+
+/**
+ * @author	$Author: chinkumo $
+ * @version	$Revision: 1.3 $
+ */
+package HdbExtractor;
+
+import org.omg.CORBA.Any;
+
+import fr.esrf.Tango.DevFailed;
+import fr.esrf.Tango.DispLevel;
+import fr.esrf.TangoDs.Command;
+import fr.esrf.TangoDs.DeviceImpl;
+import fr.esrf.TangoDs.Except;
+import fr.esrf.TangoDs.TangoConst;
+import fr.esrf.TangoDs.Util;
+
+/**
+ * Class Description: Retrieves data beetwen two dates (date_1 & date_2) - Data
+ * are higher than the given value x AND lower than the given value y. Create a
+ * dynamic attribute, retrieve the corresponding data from database and prepare
+ * result for attribute_history call.
+ */
+
+public class GetAttDataSupAndInfThanBetweenDatesClass extends Command implements TangoConst {
+	// ===============================================================
+	/**
+	 * Constructor for Command class GetAttDataSupAndInfThanBetweenDatesClass
+	 * 
+	 * @param name
+	 *            command name
+	 * @param in
+	 *            argin type
+	 * @param out
+	 *            argout type
+	 */
+	// ===============================================================
+	public GetAttDataSupAndInfThanBetweenDatesClass(final String name, final int in, final int out) {
+		super(name, in, out);
+	}
+
+	// ===============================================================
+	/**
+	 * Constructor for Command class GetAttDataSupAndInfThanBetweenDatesClass
+	 * 
+	 * @param name
+	 *            command name
+	 * @param in
+	 *            argin type
+	 * @param in_comments
+	 *            argin description
+	 * @param out
+	 *            argout type
+	 * @param out_comments
+	 *            argout description
+	 */
+	// ===============================================================
+	public GetAttDataSupAndInfThanBetweenDatesClass(final String name, final int in, final int out, final String in_comments, final String out_comments) {
+		super(name, in, out, in_comments, out_comments);
+	}
+
+	// ===============================================================
+	/**
+	 * Constructor for Command class GetAttDataSupAndInfThanBetweenDatesClass
+	 * 
+	 * @param name
+	 *            command name
+	 * @param in
+	 *            argin type
+	 * @param in_comments
+	 *            argin description
+	 * @param out
+	 *            argout type
+	 * @param out_comments
+	 *            argout description
+	 * @param level
+	 *            The command display type OPERATOR or EXPERT
+	 */
+	// ===============================================================
+	public GetAttDataSupAndInfThanBetweenDatesClass(final String name, final int in, final int out, final String in_comments, final String out_comments, final DispLevel level) {
+		super(name, in, out, in_comments, out_comments, level);
+	}
+
+	// ===============================================================
+	/**
+	 * return the result of the device's command.
+	 */
+	// ===============================================================
+	@Override
+	public Any execute(final DeviceImpl device, final Any in_any) throws DevFailed {
+		Util.out2.println("GetAttDataSupAndInfThanBetweenDatesClass.execute(): arrived");
+		final String[] argin = extract_DevVarStringArray(in_any);
+		if (!(device instanceof HdbExtractor)) {
+			Except.throw_exception("DEVICE_ERROR", "Device parameter is not instance of HdbExtractor", "HdbExtractor");
+		}
+
+		return insert(((HdbExtractor) device).get_att_data_sup_and_inf_than_between_dates(argin));
+	}
+
+	// ===============================================================
+	/**
+	 * Check if it is allowed to execute the command.
+	 */
+	// ===============================================================
+	@Override
+	public boolean is_allowed(final DeviceImpl device, final Any data_in) {
+		// End of Generated Code
+
+		// Re-Start of Generated Code
+		return true;
+	}
+}
+
+// -----------------------------------------------------------------------------
+/*
+ * end of $Source:/cvsroot/tango-cs/tango/jserver/archiving/HdbExtractor/
+ * GetAttDataSupAndInfThanBetweenDatesClass.java,v $
+ */
diff --git a/src/main/java/HdbExtractor/GetAttDataSupAndInfThanBetweenDatesCountClass.java b/hdbextractor/src/main/java/HdbExtractor/GetAttDataSupAndInfThanBetweenDatesCountClass.java
similarity index 97%
rename from src/main/java/HdbExtractor/GetAttDataSupAndInfThanBetweenDatesCountClass.java
rename to hdbextractor/src/main/java/HdbExtractor/GetAttDataSupAndInfThanBetweenDatesCountClass.java
index f2851caa87e69999e6d48cbc0d97bb6f9846335b..8cfe6957fad4dc21d30cc32d9620dc108bbf5916 100644
--- a/src/main/java/HdbExtractor/GetAttDataSupAndInfThanBetweenDatesCountClass.java
+++ b/hdbextractor/src/main/java/HdbExtractor/GetAttDataSupAndInfThanBetweenDatesCountClass.java
@@ -1,154 +1,154 @@
-//+======================================================================
-// $Source: /cvsroot/tango-cs/tango/jserver/archiving/HdbExtractor/GetAttDataSupAndInfThanBetweenDatesCountClass.java,v $
-//
-// Project:      Tango Device Server
-//
-// Description:  Java source code for the command TemplateClass of the
-//               HdbExtractor class.
-//
-// $Author: chinkumo $
-//
-// $Revision: 1.3 $
-//
-// $Log: GetAttDataSupAndInfThanBetweenDatesCountClass.java,v $
-// Revision 1.3  2005/11/29 16:17:38  chinkumo
-// Code reformated (pogo compatible)
-//
-// Revision 1.2  2005/11/15 13:45:51  chinkumo
-// ...
-//
-// Revision 1.1  2005/09/09 10:03:21  chinkumo
-// First commit !
-// (Dynamic attribut release)
-//
-//
-// copyleft :    European Synchrotron Radiation Facility
-//               BP 220, Grenoble 38043
-//               FRANCE
-//
-//-======================================================================
-//
-//  		This file is generated by POGO
-//	(Program Obviously used to Generate tango Object)
-//
-//         (c) - Software Engineering Group - ESRF
-//=============================================================================
-
-/**
- * @author	$Author: chinkumo $
- * @version	$Revision: 1.3 $
- */
-package HdbExtractor;
-
-import org.omg.CORBA.Any;
-
-import fr.esrf.Tango.DevFailed;
-import fr.esrf.Tango.DispLevel;
-import fr.esrf.TangoDs.Command;
-import fr.esrf.TangoDs.DeviceImpl;
-import fr.esrf.TangoDs.Except;
-import fr.esrf.TangoDs.TangoConst;
-import fr.esrf.TangoDs.Util;
-
-/**
- * Class Description: Returns the number of data higher than the given value x,
- * (AND) lower than the given value y, and beetwen two dates (date_1 & date_2).
- */
-
-public class GetAttDataSupAndInfThanBetweenDatesCountClass extends Command implements TangoConst {
-	// ===============================================================
-	/**
-	 * Constructor for Command class
-	 * GetAttDataSupAndInfThanBetweenDatesCountClass
-	 * 
-	 * @param name
-	 *            command name
-	 * @param in
-	 *            argin type
-	 * @param out
-	 *            argout type
-	 */
-	// ===============================================================
-	public GetAttDataSupAndInfThanBetweenDatesCountClass(final String name, final int in, final int out) {
-		super(name, in, out);
-	}
-
-	// ===============================================================
-	/**
-	 * Constructor for Command class
-	 * GetAttDataSupAndInfThanBetweenDatesCountClass
-	 * 
-	 * @param name
-	 *            command name
-	 * @param in
-	 *            argin type
-	 * @param in_comments
-	 *            argin description
-	 * @param out
-	 *            argout type
-	 * @param out_comments
-	 *            argout description
-	 */
-	// ===============================================================
-	public GetAttDataSupAndInfThanBetweenDatesCountClass(final String name, final int in, final int out, final String in_comments, final String out_comments) {
-		super(name, in, out, in_comments, out_comments);
-	}
-
-	// ===============================================================
-	/**
-	 * Constructor for Command class
-	 * GetAttDataSupAndInfThanBetweenDatesCountClass
-	 * 
-	 * @param name
-	 *            command name
-	 * @param in
-	 *            argin type
-	 * @param in_comments
-	 *            argin description
-	 * @param out
-	 *            argout type
-	 * @param out_comments
-	 *            argout description
-	 * @param level
-	 *            The command display type OPERATOR or EXPERT
-	 */
-	// ===============================================================
-	public GetAttDataSupAndInfThanBetweenDatesCountClass(final String name, final int in, final int out, final String in_comments, final String out_comments, final DispLevel level) {
-		super(name, in, out, in_comments, out_comments, level);
-	}
-
-	// ===============================================================
-	/**
-	 * return the result of the device's command.
-	 */
-	// ===============================================================
-	@Override
-	public Any execute(final DeviceImpl device, final Any in_any) throws DevFailed {
-		Util.out2.println("GetAttDataSupAndInfThanBetweenDatesCountClass.execute(): arrived");
-		final String[] argin = extract_DevVarStringArray(in_any);
-		if (!(device instanceof HdbExtractor)) {
-			Except.throw_exception("DEVICE_ERROR", "Device parameter is not instance of HdbExtractor", "HdbExtractor");
-		}
-
-		return insert(((HdbExtractor) device).get_att_data_sup_and_inf_than_between_dates_count(argin));
-	}
-
-	// ===============================================================
-	/**
-	 * Check if it is allowed to execute the command.
-	 */
-	// ===============================================================
-	@Override
-	public boolean is_allowed(final DeviceImpl device, final Any data_in) {
-		// End of Generated Code
-
-		// Re-Start of Generated Code
-		return true;
-	}
-}
-
-// -----------------------------------------------------------------------------
-/*
- * end of $Source:/cvsroot/tango-cs/tango/jserver/archiving/HdbExtractor/
- * GetAttDataSupAndInfThanBetweenDatesCountClass.java,v $
- */
+//+======================================================================
+// $Source: /cvsroot/tango-cs/tango/jserver/archiving/HdbExtractor/GetAttDataSupAndInfThanBetweenDatesCountClass.java,v $
+//
+// Project:      Tango Device Server
+//
+// Description:  Java source code for the command TemplateClass of the
+//               HdbExtractor class.
+//
+// $Author: chinkumo $
+//
+// $Revision: 1.3 $
+//
+// $Log: GetAttDataSupAndInfThanBetweenDatesCountClass.java,v $
+// Revision 1.3  2005/11/29 16:17:38  chinkumo
+// Code reformated (pogo compatible)
+//
+// Revision 1.2  2005/11/15 13:45:51  chinkumo
+// ...
+//
+// Revision 1.1  2005/09/09 10:03:21  chinkumo
+// First commit !
+// (Dynamic attribut release)
+//
+//
+// copyleft :    European Synchrotron Radiation Facility
+//               BP 220, Grenoble 38043
+//               FRANCE
+//
+//-======================================================================
+//
+//  		This file is generated by POGO
+//	(Program Obviously used to Generate tango Object)
+//
+//         (c) - Software Engineering Group - ESRF
+//=============================================================================
+
+/**
+ * @author	$Author: chinkumo $
+ * @version	$Revision: 1.3 $
+ */
+package HdbExtractor;
+
+import org.omg.CORBA.Any;
+
+import fr.esrf.Tango.DevFailed;
+import fr.esrf.Tango.DispLevel;
+import fr.esrf.TangoDs.Command;
+import fr.esrf.TangoDs.DeviceImpl;
+import fr.esrf.TangoDs.Except;
+import fr.esrf.TangoDs.TangoConst;
+import fr.esrf.TangoDs.Util;
+
+/**
+ * Class Description: Returns the number of data higher than the given value x,
+ * (AND) lower than the given value y, and beetwen two dates (date_1 & date_2).
+ */
+
+public class GetAttDataSupAndInfThanBetweenDatesCountClass extends Command implements TangoConst {
+	// ===============================================================
+	/**
+	 * Constructor for Command class
+	 * GetAttDataSupAndInfThanBetweenDatesCountClass
+	 * 
+	 * @param name
+	 *            command name
+	 * @param in
+	 *            argin type
+	 * @param out
+	 *            argout type
+	 */
+	// ===============================================================
+	public GetAttDataSupAndInfThanBetweenDatesCountClass(final String name, final int in, final int out) {
+		super(name, in, out);
+	}
+
+	// ===============================================================
+	/**
+	 * Constructor for Command class
+	 * GetAttDataSupAndInfThanBetweenDatesCountClass
+	 * 
+	 * @param name
+	 *            command name
+	 * @param in
+	 *            argin type
+	 * @param in_comments
+	 *            argin description
+	 * @param out
+	 *            argout type
+	 * @param out_comments
+	 *            argout description
+	 */
+	// ===============================================================
+	public GetAttDataSupAndInfThanBetweenDatesCountClass(final String name, final int in, final int out, final String in_comments, final String out_comments) {
+		super(name, in, out, in_comments, out_comments);
+	}
+
+	// ===============================================================
+	/**
+	 * Constructor for Command class
+	 * GetAttDataSupAndInfThanBetweenDatesCountClass
+	 * 
+	 * @param name
+	 *            command name
+	 * @param in
+	 *            argin type
+	 * @param in_comments
+	 *            argin description
+	 * @param out
+	 *            argout type
+	 * @param out_comments
+	 *            argout description
+	 * @param level
+	 *            The command display type OPERATOR or EXPERT
+	 */
+	// ===============================================================
+	public GetAttDataSupAndInfThanBetweenDatesCountClass(final String name, final int in, final int out, final String in_comments, final String out_comments, final DispLevel level) {
+		super(name, in, out, in_comments, out_comments, level);
+	}
+
+	// ===============================================================
+	/**
+	 * return the result of the device's command.
+	 */
+	// ===============================================================
+	@Override
+	public Any execute(final DeviceImpl device, final Any in_any) throws DevFailed {
+		Util.out2.println("GetAttDataSupAndInfThanBetweenDatesCountClass.execute(): arrived");
+		final String[] argin = extract_DevVarStringArray(in_any);
+		if (!(device instanceof HdbExtractor)) {
+			Except.throw_exception("DEVICE_ERROR", "Device parameter is not instance of HdbExtractor", "HdbExtractor");
+		}
+
+		return insert(((HdbExtractor) device).get_att_data_sup_and_inf_than_between_dates_count(argin));
+	}
+
+	// ===============================================================
+	/**
+	 * Check if it is allowed to execute the command.
+	 */
+	// ===============================================================
+	@Override
+	public boolean is_allowed(final DeviceImpl device, final Any data_in) {
+		// End of Generated Code
+
+		// Re-Start of Generated Code
+		return true;
+	}
+}
+
+// -----------------------------------------------------------------------------
+/*
+ * end of $Source:/cvsroot/tango-cs/tango/jserver/archiving/HdbExtractor/
+ * GetAttDataSupAndInfThanBetweenDatesCountClass.java,v $
+ */
diff --git a/src/main/java/HdbExtractor/GetAttDataSupAndInfThanClass.java b/hdbextractor/src/main/java/HdbExtractor/GetAttDataSupAndInfThanClass.java
similarity index 96%
rename from src/main/java/HdbExtractor/GetAttDataSupAndInfThanClass.java
rename to hdbextractor/src/main/java/HdbExtractor/GetAttDataSupAndInfThanClass.java
index da83fa2185a27bdbbcbfdd48fff4289dbbab4fcc..d430bcae4b606752efd442b53f9d2507c18f032a 100644
--- a/src/main/java/HdbExtractor/GetAttDataSupAndInfThanClass.java
+++ b/hdbextractor/src/main/java/HdbExtractor/GetAttDataSupAndInfThanClass.java
@@ -1,154 +1,154 @@
-//+======================================================================
-// $Source: /cvsroot/tango-cs/tango/jserver/archiving/HdbExtractor/GetAttDataSupAndInfThanClass.java,v $
-//
-// Project:      Tango Device Server
-//
-// Description:  Java source code for the command TemplateClass of the
-//               HdbExtractor class.
-//
-// $Author: chinkumo $
-//
-// $Revision: 1.3 $
-//
-// $Log: GetAttDataSupAndInfThanClass.java,v $
-// Revision 1.3  2005/11/29 16:17:38  chinkumo
-// Code reformated (pogo compatible)
-//
-// Revision 1.2  2005/11/15 13:45:51  chinkumo
-// ...
-//
-// Revision 1.1  2005/09/09 10:03:21  chinkumo
-// First commit !
-// (Dynamic attribut release)
-//
-//
-// copyleft :    European Synchrotron Radiation Facility
-//               BP 220, Grenoble 38043
-//               FRANCE
-//
-//-======================================================================
-//
-//  		This file is generated by POGO
-//	(Program Obviously used to Generate tango Object)
-//
-//         (c) - Software Engineering Group - ESRF
-//=============================================================================
-
-/**
- * @author	$Author: chinkumo $
- * @version	$Revision: 1.3 $
- */
-package HdbExtractor;
-
-import org.omg.CORBA.Any;
-
-import fr.esrf.Tango.DevFailed;
-import fr.esrf.Tango.DispLevel;
-import fr.esrf.TangoDs.Command;
-import fr.esrf.TangoDs.DeviceImpl;
-import fr.esrf.TangoDs.Except;
-import fr.esrf.TangoDs.TangoConst;
-import fr.esrf.TangoDs.Util;
-
-/**
- * Class Description: Retrieves all data that are higher than the given value x
- * AND lower than the given value y. Create a dynamic attribute, retrieve the
- * corresponding data from database and prepare result for attribute_history
- * call.
- */
-
-public class GetAttDataSupAndInfThanClass extends Command implements TangoConst {
-	// ===============================================================
-	/**
-	 * Constructor for Command class GetAttDataSupAndInfThanClass
-	 * 
-	 * @param name
-	 *            command name
-	 * @param in
-	 *            argin type
-	 * @param out
-	 *            argout type
-	 */
-	// ===============================================================
-	public GetAttDataSupAndInfThanClass(final String name, final int in, final int out) {
-		super(name, in, out);
-	}
-
-	// ===============================================================
-	/**
-	 * Constructor for Command class GetAttDataSupAndInfThanClass
-	 * 
-	 * @param name
-	 *            command name
-	 * @param in
-	 *            argin type
-	 * @param in_comments
-	 *            argin description
-	 * @param out
-	 *            argout type
-	 * @param out_comments
-	 *            argout description
-	 */
-	// ===============================================================
-	public GetAttDataSupAndInfThanClass(final String name, final int in, final int out, final String in_comments, final String out_comments) {
-		super(name, in, out, in_comments, out_comments);
-	}
-
-	// ===============================================================
-	/**
-	 * Constructor for Command class GetAttDataSupAndInfThanClass
-	 * 
-	 * @param name
-	 *            command name
-	 * @param in
-	 *            argin type
-	 * @param in_comments
-	 *            argin description
-	 * @param out
-	 *            argout type
-	 * @param out_comments
-	 *            argout description
-	 * @param level
-	 *            The command display type OPERATOR or EXPERT
-	 */
-	// ===============================================================
-	public GetAttDataSupAndInfThanClass(final String name, final int in, final int out, final String in_comments, final String out_comments, final DispLevel level) {
-		super(name, in, out, in_comments, out_comments, level);
-	}
-
-	// ===============================================================
-	/**
-	 * return the result of the device's command.
-	 */
-	// ===============================================================
-	@Override
-	public Any execute(final DeviceImpl device, final Any in_any) throws DevFailed {
-		Util.out2.println("GetAttDataSupAndInfThanClass.execute(): arrived");
-		final String[] argin = extract_DevVarStringArray(in_any);
-
-		if (!(device instanceof HdbExtractor)) {
-			Except.throw_exception("DEVICE_ERROR", "Device parameter is not instance of HdbExtractor", "HdbExtractor");
-		}
-
-		return insert(((HdbExtractor) device).get_att_data_sup_and_inf_than(argin));
-	}
-
-	// ===============================================================
-	/**
-	 * Check if it is allowed to execute the command.
-	 */
-	// ===============================================================
-	@Override
-	public boolean is_allowed(final DeviceImpl device, final Any data_in) {
-		// End of Generated Code
-
-		// Re-Start of Generated Code
-		return true;
-	}
-}
-
-// -----------------------------------------------------------------------------
-/*
- * end of $Source:/cvsroot/tango-cs/tango/jserver/archiving/HdbExtractor/
- * GetAttDataSupAndInfThanClass.java,v $
- */
+//+======================================================================
+// $Source: /cvsroot/tango-cs/tango/jserver/archiving/HdbExtractor/GetAttDataSupAndInfThanClass.java,v $
+//
+// Project:      Tango Device Server
+//
+// Description:  Java source code for the command TemplateClass of the
+//               HdbExtractor class.
+//
+// $Author: chinkumo $
+//
+// $Revision: 1.3 $
+//
+// $Log: GetAttDataSupAndInfThanClass.java,v $
+// Revision 1.3  2005/11/29 16:17:38  chinkumo
+// Code reformated (pogo compatible)
+//
+// Revision 1.2  2005/11/15 13:45:51  chinkumo
+// ...
+//
+// Revision 1.1  2005/09/09 10:03:21  chinkumo
+// First commit !
+// (Dynamic attribut release)
+//
+//
+// copyleft :    European Synchrotron Radiation Facility
+//               BP 220, Grenoble 38043
+//               FRANCE
+//
+//-======================================================================
+//
+//  		This file is generated by POGO
+//	(Program Obviously used to Generate tango Object)
+//
+//         (c) - Software Engineering Group - ESRF
+//=============================================================================
+
+/**
+ * @author	$Author: chinkumo $
+ * @version	$Revision: 1.3 $
+ */
+package HdbExtractor;
+
+import org.omg.CORBA.Any;
+
+import fr.esrf.Tango.DevFailed;
+import fr.esrf.Tango.DispLevel;
+import fr.esrf.TangoDs.Command;
+import fr.esrf.TangoDs.DeviceImpl;
+import fr.esrf.TangoDs.Except;
+import fr.esrf.TangoDs.TangoConst;
+import fr.esrf.TangoDs.Util;
+
+/**
+ * Class Description: Retrieves all data that are higher than the given value x
+ * AND lower than the given value y. Create a dynamic attribute, retrieve the
+ * corresponding data from database and prepare result for attribute_history
+ * call.
+ */
+
+public class GetAttDataSupAndInfThanClass extends Command implements TangoConst {
+	// ===============================================================
+	/**
+	 * Constructor for Command class GetAttDataSupAndInfThanClass
+	 * 
+	 * @param name
+	 *            command name
+	 * @param in
+	 *            argin type
+	 * @param out
+	 *            argout type
+	 */
+	// ===============================================================
+	public GetAttDataSupAndInfThanClass(final String name, final int in, final int out) {
+		super(name, in, out);
+	}
+
+	// ===============================================================
+	/**
+	 * Constructor for Command class GetAttDataSupAndInfThanClass
+	 * 
+	 * @param name
+	 *            command name
+	 * @param in
+	 *            argin type
+	 * @param in_comments
+	 *            argin description
+	 * @param out
+	 *            argout type
+	 * @param out_comments
+	 *            argout description
+	 */
+	// ===============================================================
+	public GetAttDataSupAndInfThanClass(final String name, final int in, final int out, final String in_comments, final String out_comments) {
+		super(name, in, out, in_comments, out_comments);
+	}
+
+	// ===============================================================
+	/**
+	 * Constructor for Command class GetAttDataSupAndInfThanClass
+	 * 
+	 * @param name
+	 *            command name
+	 * @param in
+	 *            argin type
+	 * @param in_comments
+	 *            argin description
+	 * @param out
+	 *            argout type
+	 * @param out_comments
+	 *            argout description
+	 * @param level
+	 *            The command display type OPERATOR or EXPERT
+	 */
+	// ===============================================================
+	public GetAttDataSupAndInfThanClass(final String name, final int in, final int out, final String in_comments, final String out_comments, final DispLevel level) {
+		super(name, in, out, in_comments, out_comments, level);
+	}
+
+	// ===============================================================
+	/**
+	 * return the result of the device's command.
+	 */
+	// ===============================================================
+	@Override
+	public Any execute(final DeviceImpl device, final Any in_any) throws DevFailed {
+		Util.out2.println("GetAttDataSupAndInfThanClass.execute(): arrived");
+		final String[] argin = extract_DevVarStringArray(in_any);
+
+		if (!(device instanceof HdbExtractor)) {
+			Except.throw_exception("DEVICE_ERROR", "Device parameter is not instance of HdbExtractor", "HdbExtractor");
+		}
+
+		return insert(((HdbExtractor) device).get_att_data_sup_and_inf_than(argin));
+	}
+
+	// ===============================================================
+	/**
+	 * Check if it is allowed to execute the command.
+	 */
+	// ===============================================================
+	@Override
+	public boolean is_allowed(final DeviceImpl device, final Any data_in) {
+		// End of Generated Code
+
+		// Re-Start of Generated Code
+		return true;
+	}
+}
+
+// -----------------------------------------------------------------------------
+/*
+ * end of $Source:/cvsroot/tango-cs/tango/jserver/archiving/HdbExtractor/
+ * GetAttDataSupAndInfThanClass.java,v $
+ */
diff --git a/src/main/java/HdbExtractor/GetAttDataSupAndInfThanCountClass.java b/hdbextractor/src/main/java/HdbExtractor/GetAttDataSupAndInfThanCountClass.java
similarity index 96%
rename from src/main/java/HdbExtractor/GetAttDataSupAndInfThanCountClass.java
rename to hdbextractor/src/main/java/HdbExtractor/GetAttDataSupAndInfThanCountClass.java
index 6030f2f8d86a11a225421fc3060d3fb1d0affba1..ebe8bd530631575590a13c5daea71adc63c13c6b 100644
--- a/src/main/java/HdbExtractor/GetAttDataSupAndInfThanCountClass.java
+++ b/hdbextractor/src/main/java/HdbExtractor/GetAttDataSupAndInfThanCountClass.java
@@ -1,152 +1,152 @@
-//+======================================================================
-// $Source: /cvsroot/tango-cs/tango/jserver/archiving/HdbExtractor/GetAttDataSupAndInfThanCountClass.java,v $
-//
-// Project:      Tango Device Server
-//
-// Description:  Java source code for the command TemplateClass of the
-//               HdbExtractor class.
-//
-// $Author: chinkumo $
-//
-// $Revision: 1.3 $
-//
-// $Log: GetAttDataSupAndInfThanCountClass.java,v $
-// Revision 1.3  2005/11/29 16:17:38  chinkumo
-// Code reformated (pogo compatible)
-//
-// Revision 1.2  2005/11/15 13:45:51  chinkumo
-// ...
-//
-// Revision 1.1  2005/09/09 10:03:21  chinkumo
-// First commit !
-// (Dynamic attribut release)
-//
-//
-// copyleft :    European Synchrotron Radiation Facility
-//               BP 220, Grenoble 38043
-//               FRANCE
-//
-//-======================================================================
-//
-//  		This file is generated by POGO
-//	(Program Obviously used to Generate tango Object)
-//
-//         (c) - Software Engineering Group - ESRF
-//=============================================================================
-
-/**
- * @author	$Author: chinkumo $
- * @version	$Revision: 1.3 $
- */
-package HdbExtractor;
-
-import org.omg.CORBA.Any;
-
-import fr.esrf.Tango.DevFailed;
-import fr.esrf.Tango.DispLevel;
-import fr.esrf.TangoDs.Command;
-import fr.esrf.TangoDs.DeviceImpl;
-import fr.esrf.TangoDs.Except;
-import fr.esrf.TangoDs.TangoConst;
-import fr.esrf.TangoDs.Util;
-
-/**
- * Class Description: Returns data that are highter than the given value x AND
- * lower than the given value y.
- */
-
-public class GetAttDataSupAndInfThanCountClass extends Command implements TangoConst {
-	// ===============================================================
-	/**
-	 * Constructor for Command class GetAttDataSupAndInfThanCountClass
-	 * 
-	 * @param name
-	 *            command name
-	 * @param in
-	 *            argin type
-	 * @param out
-	 *            argout type
-	 */
-	// ===============================================================
-	public GetAttDataSupAndInfThanCountClass(final String name, final int in, final int out) {
-		super(name, in, out);
-	}
-
-	// ===============================================================
-	/**
-	 * Constructor for Command class GetAttDataSupAndInfThanCountClass
-	 * 
-	 * @param name
-	 *            command name
-	 * @param in
-	 *            argin type
-	 * @param in_comments
-	 *            argin description
-	 * @param out
-	 *            argout type
-	 * @param out_comments
-	 *            argout description
-	 */
-	// ===============================================================
-	public GetAttDataSupAndInfThanCountClass(final String name, final int in, final int out, final String in_comments, final String out_comments) {
-		super(name, in, out, in_comments, out_comments);
-	}
-
-	// ===============================================================
-	/**
-	 * Constructor for Command class GetAttDataSupAndInfThanCountClass
-	 * 
-	 * @param name
-	 *            command name
-	 * @param in
-	 *            argin type
-	 * @param in_comments
-	 *            argin description
-	 * @param out
-	 *            argout type
-	 * @param out_comments
-	 *            argout description
-	 * @param level
-	 *            The command display type OPERATOR or EXPERT
-	 */
-	// ===============================================================
-	public GetAttDataSupAndInfThanCountClass(final String name, final int in, final int out, final String in_comments, final String out_comments, final DispLevel level) {
-		super(name, in, out, in_comments, out_comments, level);
-	}
-
-	// ===============================================================
-	/**
-	 * return the result of the device's command.
-	 */
-	// ===============================================================
-	@Override
-	public Any execute(final DeviceImpl device, final Any in_any) throws DevFailed {
-		Util.out2.println("GetAttDataSupAndInfThanCountClass.execute(): arrived");
-		final String[] argin = extract_DevVarStringArray(in_any);
-
-		if (!(device instanceof HdbExtractor)) {
-			Except.throw_exception("DEVICE_ERROR", "Device parameter is not instance of HdbExtractor", "HdbExtractor");
-		}
-
-		return insert(((HdbExtractor) device).get_att_data_sup_and_inf_than_count(argin));
-	}
-
-	// ===============================================================
-	/**
-	 * Check if it is allowed to execute the command.
-	 */
-	// ===============================================================
-	@Override
-	public boolean is_allowed(final DeviceImpl device, final Any data_in) {
-		// End of Generated Code
-
-		// Re-Start of Generated Code
-		return true;
-	}
-}
-
-// -----------------------------------------------------------------------------
-/*
- * end of $Source:/cvsroot/tango-cs/tango/jserver/archiving/HdbExtractor/
- * GetAttDataSupAndInfThanCountClass.java,v $
- */
+//+======================================================================
+// $Source: /cvsroot/tango-cs/tango/jserver/archiving/HdbExtractor/GetAttDataSupAndInfThanCountClass.java,v $
+//
+// Project:      Tango Device Server
+//
+// Description:  Java source code for the command TemplateClass of the
+//               HdbExtractor class.
+//
+// $Author: chinkumo $
+//
+// $Revision: 1.3 $
+//
+// $Log: GetAttDataSupAndInfThanCountClass.java,v $
+// Revision 1.3  2005/11/29 16:17:38  chinkumo
+// Code reformated (pogo compatible)
+//
+// Revision 1.2  2005/11/15 13:45:51  chinkumo
+// ...
+//
+// Revision 1.1  2005/09/09 10:03:21  chinkumo
+// First commit !
+// (Dynamic attribut release)
+//
+//
+// copyleft :    European Synchrotron Radiation Facility
+//               BP 220, Grenoble 38043
+//               FRANCE
+//
+//-======================================================================
+//
+//  		This file is generated by POGO
+//	(Program Obviously used to Generate tango Object)
+//
+//         (c) - Software Engineering Group - ESRF
+//=============================================================================
+
+/**
+ * @author	$Author: chinkumo $
+ * @version	$Revision: 1.3 $
+ */
+package HdbExtractor;
+
+import org.omg.CORBA.Any;
+
+import fr.esrf.Tango.DevFailed;
+import fr.esrf.Tango.DispLevel;
+import fr.esrf.TangoDs.Command;
+import fr.esrf.TangoDs.DeviceImpl;
+import fr.esrf.TangoDs.Except;
+import fr.esrf.TangoDs.TangoConst;
+import fr.esrf.TangoDs.Util;
+
+/**
+ * Class Description: Returns data that are highter than the given value x AND
+ * lower than the given value y.
+ */
+
+public class GetAttDataSupAndInfThanCountClass extends Command implements TangoConst {
+	// ===============================================================
+	/**
+	 * Constructor for Command class GetAttDataSupAndInfThanCountClass
+	 * 
+	 * @param name
+	 *            command name
+	 * @param in
+	 *            argin type
+	 * @param out
+	 *            argout type
+	 */
+	// ===============================================================
+	public GetAttDataSupAndInfThanCountClass(final String name, final int in, final int out) {
+		super(name, in, out);
+	}
+
+	// ===============================================================
+	/**
+	 * Constructor for Command class GetAttDataSupAndInfThanCountClass
+	 * 
+	 * @param name
+	 *            command name
+	 * @param in
+	 *            argin type
+	 * @param in_comments
+	 *            argin description
+	 * @param out
+	 *            argout type
+	 * @param out_comments
+	 *            argout description
+	 */
+	// ===============================================================
+	public GetAttDataSupAndInfThanCountClass(final String name, final int in, final int out, final String in_comments, final String out_comments) {
+		super(name, in, out, in_comments, out_comments);
+	}
+
+	// ===============================================================
+	/**
+	 * Constructor for Command class GetAttDataSupAndInfThanCountClass
+	 * 
+	 * @param name
+	 *            command name
+	 * @param in
+	 *            argin type
+	 * @param in_comments
+	 *            argin description
+	 * @param out
+	 *            argout type
+	 * @param out_comments
+	 *            argout description
+	 * @param level
+	 *            The command display type OPERATOR or EXPERT
+	 */
+	// ===============================================================
+	public GetAttDataSupAndInfThanCountClass(final String name, final int in, final int out, final String in_comments, final String out_comments, final DispLevel level) {
+		super(name, in, out, in_comments, out_comments, level);
+	}
+
+	// ===============================================================
+	/**
+	 * return the result of the device's command.
+	 */
+	// ===============================================================
+	@Override
+	public Any execute(final DeviceImpl device, final Any in_any) throws DevFailed {
+		Util.out2.println("GetAttDataSupAndInfThanCountClass.execute(): arrived");
+		final String[] argin = extract_DevVarStringArray(in_any);
+
+		if (!(device instanceof HdbExtractor)) {
+			Except.throw_exception("DEVICE_ERROR", "Device parameter is not instance of HdbExtractor", "HdbExtractor");
+		}
+
+		return insert(((HdbExtractor) device).get_att_data_sup_and_inf_than_count(argin));
+	}
+
+	// ===============================================================
+	/**
+	 * Check if it is allowed to execute the command.
+	 */
+	// ===============================================================
+	@Override
+	public boolean is_allowed(final DeviceImpl device, final Any data_in) {
+		// End of Generated Code
+
+		// Re-Start of Generated Code
+		return true;
+	}
+}
+
+// -----------------------------------------------------------------------------
+/*
+ * end of $Source:/cvsroot/tango-cs/tango/jserver/archiving/HdbExtractor/
+ * GetAttDataSupAndInfThanCountClass.java,v $
+ */
diff --git a/src/main/java/HdbExtractor/GetAttDataSupThanBetweenDatesClass.java b/hdbextractor/src/main/java/HdbExtractor/GetAttDataSupThanBetweenDatesClass.java
similarity index 96%
rename from src/main/java/HdbExtractor/GetAttDataSupThanBetweenDatesClass.java
rename to hdbextractor/src/main/java/HdbExtractor/GetAttDataSupThanBetweenDatesClass.java
index 127ed809b97d9f25f50da0fb84914aabfd18dfed..33313343d9713af9f6b8e22a18c36f91a4150323 100644
--- a/src/main/java/HdbExtractor/GetAttDataSupThanBetweenDatesClass.java
+++ b/hdbextractor/src/main/java/HdbExtractor/GetAttDataSupThanBetweenDatesClass.java
@@ -1,154 +1,154 @@
-//+======================================================================
-// $Source: /cvsroot/tango-cs/tango/jserver/archiving/HdbExtractor/GetAttDataSupThanBetweenDatesClass.java,v $
-//
-// Project:      Tango Device Server
-//
-// Description:  Java source code for the command TemplateClass of the
-//               HdbExtractor class.
-//
-// $Author: chinkumo $
-//
-// $Revision: 1.3 $
-//
-// $Log: GetAttDataSupThanBetweenDatesClass.java,v $
-// Revision 1.3  2005/11/29 16:17:38  chinkumo
-// Code reformated (pogo compatible)
-//
-// Revision 1.2  2005/11/15 13:45:52  chinkumo
-// ...
-//
-// Revision 1.1  2005/09/09 10:03:21  chinkumo
-// First commit !
-// (Dynamic attribut release)
-//
-//
-// copyleft :    European Synchrotron Radiation Facility
-//               BP 220, Grenoble 38043
-//               FRANCE
-//
-//-======================================================================
-//
-//  		This file is generated by POGO
-//	(Program Obviously used to Generate tango Object)
-//
-//         (c) - Software Engineering Group - ESRF
-//=============================================================================
-
-/**
- * @author	$Author: chinkumo $
- * @version	$Revision: 1.3 $
- */
-package HdbExtractor;
-
-import org.omg.CORBA.Any;
-
-import fr.esrf.Tango.DevFailed;
-import fr.esrf.Tango.DispLevel;
-import fr.esrf.TangoDs.Command;
-import fr.esrf.TangoDs.DeviceImpl;
-import fr.esrf.TangoDs.Except;
-import fr.esrf.TangoDs.TangoConst;
-import fr.esrf.TangoDs.Util;
-
-/**
- * Class Description: Retrieves data beetwen two dates (date_1 & date_2) - Data
- * are higher than the given value x. Create a dynamic attribute, retrieve the
- * corresponding data from database and prepare result for attribute_history
- * call.
- */
-
-public class GetAttDataSupThanBetweenDatesClass extends Command implements TangoConst {
-	// ===============================================================
-	/**
-	 * Constructor for Command class GetAttDataSupThanBetweenDatesClass
-	 * 
-	 * @param name
-	 *            command name
-	 * @param in
-	 *            argin type
-	 * @param out
-	 *            argout type
-	 */
-	// ===============================================================
-	public GetAttDataSupThanBetweenDatesClass(final String name, final int in, final int out) {
-		super(name, in, out);
-	}
-
-	// ===============================================================
-	/**
-	 * Constructor for Command class GetAttDataSupThanBetweenDatesClass
-	 * 
-	 * @param name
-	 *            command name
-	 * @param in
-	 *            argin type
-	 * @param in_comments
-	 *            argin description
-	 * @param out
-	 *            argout type
-	 * @param out_comments
-	 *            argout description
-	 */
-	// ===============================================================
-	public GetAttDataSupThanBetweenDatesClass(final String name, final int in, final int out, final String in_comments, final String out_comments) {
-		super(name, in, out, in_comments, out_comments);
-	}
-
-	// ===============================================================
-	/**
-	 * Constructor for Command class GetAttDataSupThanBetweenDatesClass
-	 * 
-	 * @param name
-	 *            command name
-	 * @param in
-	 *            argin type
-	 * @param in_comments
-	 *            argin description
-	 * @param out
-	 *            argout type
-	 * @param out_comments
-	 *            argout description
-	 * @param level
-	 *            The command display type OPERATOR or EXPERT
-	 */
-	// ===============================================================
-	public GetAttDataSupThanBetweenDatesClass(final String name, final int in, final int out, final String in_comments, final String out_comments, final DispLevel level) {
-		super(name, in, out, in_comments, out_comments, level);
-	}
-
-	// ===============================================================
-	/**
-	 * return the result of the device's command.
-	 */
-	// ===============================================================
-	@Override
-	public Any execute(final DeviceImpl device, final Any in_any) throws DevFailed {
-		Util.out2.println("GetAttDataSupThanBetweenDatesClass.execute(): arrived");
-		final String[] argin = extract_DevVarStringArray(in_any);
-
-		if (!(device instanceof HdbExtractor)) {
-			Except.throw_exception("DEVICE_ERROR", "Device parameter is not instance of HdbExtractor", "HdbExtractor");
-		}
-
-		return insert(((HdbExtractor) device).get_att_data_sup_than_between_dates(argin));
-	}
-
-	// ===============================================================
-	/**
-	 * Check if it is allowed to execute the command.
-	 */
-	// ===============================================================
-	@Override
-	public boolean is_allowed(final DeviceImpl device, final Any data_in) {
-		// End of Generated Code
-
-		// Re-Start of Generated Code
-		return true;
-	}
-}
-
-// -----------------------------------------------------------------------------
-/*
- * end of $Source:/cvsroot/tango-cs/tango/jserver/archiving/HdbExtractor/
- * GetAttDataSupThanBetweenDatesClass.java,v $
- */
+//+======================================================================
+// $Source: /cvsroot/tango-cs/tango/jserver/archiving/HdbExtractor/GetAttDataSupThanBetweenDatesClass.java,v $
+//
+// Project:      Tango Device Server
+//
+// Description:  Java source code for the command TemplateClass of the
+//               HdbExtractor class.
+//
+// $Author: chinkumo $
+//
+// $Revision: 1.3 $
+//
+// $Log: GetAttDataSupThanBetweenDatesClass.java,v $
+// Revision 1.3  2005/11/29 16:17:38  chinkumo
+// Code reformated (pogo compatible)
+//
+// Revision 1.2  2005/11/15 13:45:52  chinkumo
+// ...
+//
+// Revision 1.1  2005/09/09 10:03:21  chinkumo
+// First commit !
+// (Dynamic attribut release)
+//
+//
+// copyleft :    European Synchrotron Radiation Facility
+//               BP 220, Grenoble 38043
+//               FRANCE
+//
+//-======================================================================
+//
+//  		This file is generated by POGO
+//	(Program Obviously used to Generate tango Object)
+//
+//         (c) - Software Engineering Group - ESRF
+//=============================================================================
+
+/**
+ * @author	$Author: chinkumo $
+ * @version	$Revision: 1.3 $
+ */
+package HdbExtractor;
+
+import org.omg.CORBA.Any;
+
+import fr.esrf.Tango.DevFailed;
+import fr.esrf.Tango.DispLevel;
+import fr.esrf.TangoDs.Command;
+import fr.esrf.TangoDs.DeviceImpl;
+import fr.esrf.TangoDs.Except;
+import fr.esrf.TangoDs.TangoConst;
+import fr.esrf.TangoDs.Util;
+
+/**
+ * Class Description: Retrieves data beetwen two dates (date_1 & date_2) - Data
+ * are higher than the given value x. Create a dynamic attribute, retrieve the
+ * corresponding data from database and prepare result for attribute_history
+ * call.
+ */
+
+public class GetAttDataSupThanBetweenDatesClass extends Command implements TangoConst {
+	// ===============================================================
+	/**
+	 * Constructor for Command class GetAttDataSupThanBetweenDatesClass
+	 * 
+	 * @param name
+	 *            command name
+	 * @param in
+	 *            argin type
+	 * @param out
+	 *            argout type
+	 */
+	// ===============================================================
+	public GetAttDataSupThanBetweenDatesClass(final String name, final int in, final int out) {
+		super(name, in, out);
+	}
+
+	// ===============================================================
+	/**
+	 * Constructor for Command class GetAttDataSupThanBetweenDatesClass
+	 * 
+	 * @param name
+	 *            command name
+	 * @param in
+	 *            argin type
+	 * @param in_comments
+	 *            argin description
+	 * @param out
+	 *            argout type
+	 * @param out_comments
+	 *            argout description
+	 */
+	// ===============================================================
+	public GetAttDataSupThanBetweenDatesClass(final String name, final int in, final int out, final String in_comments, final String out_comments) {
+		super(name, in, out, in_comments, out_comments);
+	}
+
+	// ===============================================================
+	/**
+	 * Constructor for Command class GetAttDataSupThanBetweenDatesClass
+	 * 
+	 * @param name
+	 *            command name
+	 * @param in
+	 *            argin type
+	 * @param in_comments
+	 *            argin description
+	 * @param out
+	 *            argout type
+	 * @param out_comments
+	 *            argout description
+	 * @param level
+	 *            The command display type OPERATOR or EXPERT
+	 */
+	// ===============================================================
+	public GetAttDataSupThanBetweenDatesClass(final String name, final int in, final int out, final String in_comments, final String out_comments, final DispLevel level) {
+		super(name, in, out, in_comments, out_comments, level);
+	}
+
+	// ===============================================================
+	/**
+	 * return the result of the device's command.
+	 */
+	// ===============================================================
+	@Override
+	public Any execute(final DeviceImpl device, final Any in_any) throws DevFailed {
+		Util.out2.println("GetAttDataSupThanBetweenDatesClass.execute(): arrived");
+		final String[] argin = extract_DevVarStringArray(in_any);
+
+		if (!(device instanceof HdbExtractor)) {
+			Except.throw_exception("DEVICE_ERROR", "Device parameter is not instance of HdbExtractor", "HdbExtractor");
+		}
+
+		return insert(((HdbExtractor) device).get_att_data_sup_than_between_dates(argin));
+	}
+
+	// ===============================================================
+	/**
+	 * Check if it is allowed to execute the command.
+	 */
+	// ===============================================================
+	@Override
+	public boolean is_allowed(final DeviceImpl device, final Any data_in) {
+		// End of Generated Code
+
+		// Re-Start of Generated Code
+		return true;
+	}
+}
+
+// -----------------------------------------------------------------------------
+/*
+ * end of $Source:/cvsroot/tango-cs/tango/jserver/archiving/HdbExtractor/
+ * GetAttDataSupThanBetweenDatesClass.java,v $
+ */
diff --git a/src/main/java/HdbExtractor/GetAttDataSupThanBetweenDatesCountClass.java b/hdbextractor/src/main/java/HdbExtractor/GetAttDataSupThanBetweenDatesCountClass.java
similarity index 96%
rename from src/main/java/HdbExtractor/GetAttDataSupThanBetweenDatesCountClass.java
rename to hdbextractor/src/main/java/HdbExtractor/GetAttDataSupThanBetweenDatesCountClass.java
index d96f0952acfb5f2e3712e04f31202bf3bcce1320..a0e7784b04e43b45161a0996ca373ab2f3949969 100644
--- a/src/main/java/HdbExtractor/GetAttDataSupThanBetweenDatesCountClass.java
+++ b/hdbextractor/src/main/java/HdbExtractor/GetAttDataSupThanBetweenDatesCountClass.java
@@ -1,152 +1,152 @@
-//+======================================================================
-// $Source: /cvsroot/tango-cs/tango/jserver/archiving/HdbExtractor/GetAttDataSupThanBetweenDatesCountClass.java,v $
-//
-// Project:      Tango Device Server
-//
-// Description:  Java source code for the command TemplateClass of the
-//               HdbExtractor class.
-//
-// $Author: chinkumo $
-//
-// $Revision: 1.3 $
-//
-// $Log: GetAttDataSupThanBetweenDatesCountClass.java,v $
-// Revision 1.3  2005/11/29 16:17:38  chinkumo
-// Code reformated (pogo compatible)
-//
-// Revision 1.2  2005/11/15 13:45:52  chinkumo
-// ...
-//
-// Revision 1.1  2005/09/09 10:03:21  chinkumo
-// First commit !
-// (Dynamic attribut release)
-//
-//
-// copyleft :    European Synchrotron Radiation Facility
-//               BP 220, Grenoble 38043
-//               FRANCE
-//
-//-======================================================================
-//
-//  		This file is generated by POGO
-//	(Program Obviously used to Generate tango Object)
-//
-//         (c) - Software Engineering Group - ESRF
-//=============================================================================
-
-/**
- * @author	$Author: chinkumo $
- * @version	$Revision: 1.3 $
- */
-package HdbExtractor;
-
-import org.omg.CORBA.Any;
-
-import fr.esrf.Tango.DevFailed;
-import fr.esrf.Tango.DispLevel;
-import fr.esrf.TangoDs.Command;
-import fr.esrf.TangoDs.DeviceImpl;
-import fr.esrf.TangoDs.Except;
-import fr.esrf.TangoDs.TangoConst;
-import fr.esrf.TangoDs.Util;
-
-/**
- * Class Description: Returns the number of data higher than the given value y,
- * and beetwen two dates (date_1 & date_2).
- */
-
-public class GetAttDataSupThanBetweenDatesCountClass extends Command implements TangoConst {
-	// ===============================================================
-	/**
-	 * Constructor for Command class GetAttDataSupThanBetweenDatesCountClass
-	 * 
-	 * @param name
-	 *            command name
-	 * @param in
-	 *            argin type
-	 * @param out
-	 *            argout type
-	 */
-	// ===============================================================
-	public GetAttDataSupThanBetweenDatesCountClass(final String name, final int in, final int out) {
-		super(name, in, out);
-	}
-
-	// ===============================================================
-	/**
-	 * Constructor for Command class GetAttDataSupThanBetweenDatesCountClass
-	 * 
-	 * @param name
-	 *            command name
-	 * @param in
-	 *            argin type
-	 * @param in_comments
-	 *            argin description
-	 * @param out
-	 *            argout type
-	 * @param out_comments
-	 *            argout description
-	 */
-	// ===============================================================
-	public GetAttDataSupThanBetweenDatesCountClass(final String name, final int in, final int out, final String in_comments, final String out_comments) {
-		super(name, in, out, in_comments, out_comments);
-	}
-
-	// ===============================================================
-	/**
-	 * Constructor for Command class GetAttDataSupThanBetweenDatesCountClass
-	 * 
-	 * @param name
-	 *            command name
-	 * @param in
-	 *            argin type
-	 * @param in_comments
-	 *            argin description
-	 * @param out
-	 *            argout type
-	 * @param out_comments
-	 *            argout description
-	 * @param level
-	 *            The command display type OPERATOR or EXPERT
-	 */
-	// ===============================================================
-	public GetAttDataSupThanBetweenDatesCountClass(final String name, final int in, final int out, final String in_comments, final String out_comments, final DispLevel level) {
-		super(name, in, out, in_comments, out_comments, level);
-	}
-
-	// ===============================================================
-	/**
-	 * return the result of the device's command.
-	 */
-	// ===============================================================
-	@Override
-	public Any execute(final DeviceImpl device, final Any in_any) throws DevFailed {
-		Util.out2.println("GetAttDataSupThanBetweenDatesCountClass.execute(): arrived");
-		final String[] argin = extract_DevVarStringArray(in_any);
-
-		if (!(device instanceof HdbExtractor)) {
-			Except.throw_exception("DEVICE_ERROR", "Device parameter is not instance of HdbExtractor", "HdbExtractor");
-		}
-
-		return insert(((HdbExtractor) device).get_att_data_sup_than_between_dates_count(argin));
-	}
-
-	// ===============================================================
-	/**
-	 * Check if it is allowed to execute the command.
-	 */
-	// ===============================================================
-	@Override
-	public boolean is_allowed(final DeviceImpl device, final Any data_in) {
-		// End of Generated Code
-
-		// Re-Start of Generated Code
-		return true;
-	}
-}
-
-// -----------------------------------------------------------------------------
-/*
- * end of $Source:/cvsroot/tango-cs/tango/jserver/archiving/HdbExtractor/
- * GetAttDataSupThanBetweenDatesCountClass.java,v $
- */
+//+======================================================================
+// $Source: /cvsroot/tango-cs/tango/jserver/archiving/HdbExtractor/GetAttDataSupThanBetweenDatesCountClass.java,v $
+//
+// Project:      Tango Device Server
+//
+// Description:  Java source code for the command TemplateClass of the
+//               HdbExtractor class.
+//
+// $Author: chinkumo $
+//
+// $Revision: 1.3 $
+//
+// $Log: GetAttDataSupThanBetweenDatesCountClass.java,v $
+// Revision 1.3  2005/11/29 16:17:38  chinkumo
+// Code reformated (pogo compatible)
+//
+// Revision 1.2  2005/11/15 13:45:52  chinkumo
+// ...
+//
+// Revision 1.1  2005/09/09 10:03:21  chinkumo
+// First commit !
+// (Dynamic attribut release)
+//
+//
+// copyleft :    European Synchrotron Radiation Facility
+//               BP 220, Grenoble 38043
+//               FRANCE
+//
+//-======================================================================
+//
+//  		This file is generated by POGO
+//	(Program Obviously used to Generate tango Object)
+//
+//         (c) - Software Engineering Group - ESRF
+//=============================================================================
+
+/**
+ * @author	$Author: chinkumo $
+ * @version	$Revision: 1.3 $
+ */
+package HdbExtractor;
+
+import org.omg.CORBA.Any;
+
+import fr.esrf.Tango.DevFailed;
+import fr.esrf.Tango.DispLevel;
+import fr.esrf.TangoDs.Command;
+import fr.esrf.TangoDs.DeviceImpl;
+import fr.esrf.TangoDs.Except;
+import fr.esrf.TangoDs.TangoConst;
+import fr.esrf.TangoDs.Util;
+
+/**
+ * Class Description: Returns the number of data higher than the given value y,
+ * and beetwen two dates (date_1 & date_2).
+ */
+
+public class GetAttDataSupThanBetweenDatesCountClass extends Command implements TangoConst {
+	// ===============================================================
+	/**
+	 * Constructor for Command class GetAttDataSupThanBetweenDatesCountClass
+	 * 
+	 * @param name
+	 *            command name
+	 * @param in
+	 *            argin type
+	 * @param out
+	 *            argout type
+	 */
+	// ===============================================================
+	public GetAttDataSupThanBetweenDatesCountClass(final String name, final int in, final int out) {
+		super(name, in, out);
+	}
+
+	// ===============================================================
+	/**
+	 * Constructor for Command class GetAttDataSupThanBetweenDatesCountClass
+	 * 
+	 * @param name
+	 *            command name
+	 * @param in
+	 *            argin type
+	 * @param in_comments
+	 *            argin description
+	 * @param out
+	 *            argout type
+	 * @param out_comments
+	 *            argout description
+	 */
+	// ===============================================================
+	public GetAttDataSupThanBetweenDatesCountClass(final String name, final int in, final int out, final String in_comments, final String out_comments) {
+		super(name, in, out, in_comments, out_comments);
+	}
+
+	// ===============================================================
+	/**
+	 * Constructor for Command class GetAttDataSupThanBetweenDatesCountClass
+	 * 
+	 * @param name
+	 *            command name
+	 * @param in
+	 *            argin type
+	 * @param in_comments
+	 *            argin description
+	 * @param out
+	 *            argout type
+	 * @param out_comments
+	 *            argout description
+	 * @param level
+	 *            The command display type OPERATOR or EXPERT
+	 */
+	// ===============================================================
+	public GetAttDataSupThanBetweenDatesCountClass(final String name, final int in, final int out, final String in_comments, final String out_comments, final DispLevel level) {
+		super(name, in, out, in_comments, out_comments, level);
+	}
+
+	// ===============================================================
+	/**
+	 * return the result of the device's command.
+	 */
+	// ===============================================================
+	@Override
+	public Any execute(final DeviceImpl device, final Any in_any) throws DevFailed {
+		Util.out2.println("GetAttDataSupThanBetweenDatesCountClass.execute(): arrived");
+		final String[] argin = extract_DevVarStringArray(in_any);
+
+		if (!(device instanceof HdbExtractor)) {
+			Except.throw_exception("DEVICE_ERROR", "Device parameter is not instance of HdbExtractor", "HdbExtractor");
+		}
+
+		return insert(((HdbExtractor) device).get_att_data_sup_than_between_dates_count(argin));
+	}
+
+	// ===============================================================
+	/**
+	 * Check if it is allowed to execute the command.
+	 */
+	// ===============================================================
+	@Override
+	public boolean is_allowed(final DeviceImpl device, final Any data_in) {
+		// End of Generated Code
+
+		// Re-Start of Generated Code
+		return true;
+	}
+}
+
+// -----------------------------------------------------------------------------
+/*
+ * end of $Source:/cvsroot/tango-cs/tango/jserver/archiving/HdbExtractor/
+ * GetAttDataSupThanBetweenDatesCountClass.java,v $
+ */
diff --git a/src/main/java/HdbExtractor/GetAttDataSupThanClass.java b/hdbextractor/src/main/java/HdbExtractor/GetAttDataSupThanClass.java
similarity index 96%
rename from src/main/java/HdbExtractor/GetAttDataSupThanClass.java
rename to hdbextractor/src/main/java/HdbExtractor/GetAttDataSupThanClass.java
index 84f72bf9db0769e73f59dc36cb54f3d436c13413..51e51a1fd8dd558b54463d2b10fb361b2227aa61 100644
--- a/src/main/java/HdbExtractor/GetAttDataSupThanClass.java
+++ b/hdbextractor/src/main/java/HdbExtractor/GetAttDataSupThanClass.java
@@ -1,154 +1,154 @@
-//+======================================================================
-// $Source: /cvsroot/tango-cs/tango/jserver/archiving/HdbExtractor/GetAttDataSupThanClass.java,v $
-//
-// Project:      Tango Device Server
-//
-// Description:  Java source code for the command TemplateClass of the
-//               HdbExtractor class.
-//
-// $Author: chinkumo $
-//
-// $Revision: 1.3 $
-//
-// $Log: GetAttDataSupThanClass.java,v $
-// Revision 1.3  2005/11/29 16:17:38  chinkumo
-// Code reformated (pogo compatible)
-//
-// Revision 1.2  2005/11/15 13:45:52  chinkumo
-// ...
-//
-// Revision 1.1  2005/09/09 10:03:21  chinkumo
-// First commit !
-// (Dynamic attribut release)
-//
-//
-// copyleft :    European Synchrotron Radiation Facility
-//               BP 220, Grenoble 38043
-//               FRANCE
-//
-//-======================================================================
-//
-//  		This file is generated by POGO
-//	(Program Obviously used to Generate tango Object)
-//
-//         (c) - Software Engineering Group - ESRF
-//=============================================================================
-
-/**
- * @author	$Author: chinkumo $
- * @version	$Revision: 1.3 $
- */
-package HdbExtractor;
-
-import org.omg.CORBA.Any;
-
-import fr.esrf.Tango.DevFailed;
-import fr.esrf.Tango.DispLevel;
-import fr.esrf.TangoDs.Command;
-import fr.esrf.TangoDs.DeviceImpl;
-import fr.esrf.TangoDs.Except;
-import fr.esrf.TangoDs.TangoConst;
-import fr.esrf.TangoDs.Util;
-
-/**
- * Class Description: Retrieves all the data that are higher than the given
- * value x. Create a dynamic attribute, retrieve the corresponding data from
- * database and prepare result for attribute_history call.
- */
-
-public class GetAttDataSupThanClass extends Command implements TangoConst {
-	// ===============================================================
-	/**
-	 * Constructor for Command class GetAttDataSupThanClass
-	 * 
-	 * @param name
-	 *            command name
-	 * @param in
-	 *            argin type
-	 * @param out
-	 *            argout type
-	 */
-	// ===============================================================
-	public GetAttDataSupThanClass(final String name, final int in, final int out) {
-		super(name, in, out);
-	}
-
-	// ===============================================================
-	/**
-	 * Constructor for Command class GetAttDataSupThanClass
-	 * 
-	 * @param name
-	 *            command name
-	 * @param in
-	 *            argin type
-	 * @param in_comments
-	 *            argin description
-	 * @param out
-	 *            argout type
-	 * @param out_comments
-	 *            argout description
-	 */
-	// ===============================================================
-	public GetAttDataSupThanClass(final String name, final int in, final int out, final String in_comments, final String out_comments) {
-		super(name, in, out, in_comments, out_comments);
-	}
-
-	// ===============================================================
-	/**
-	 * Constructor for Command class GetAttDataSupThanClass
-	 * 
-	 * @param name
-	 *            command name
-	 * @param in
-	 *            argin type
-	 * @param in_comments
-	 *            argin description
-	 * @param out
-	 *            argout type
-	 * @param out_comments
-	 *            argout description
-	 * @param level
-	 *            The command display type OPERATOR or EXPERT
-	 */
-	// ===============================================================
-	public GetAttDataSupThanClass(final String name, final int in, final int out, final String in_comments, final String out_comments, final DispLevel level) {
-		super(name, in, out, in_comments, out_comments, level);
-	}
-
-	// ===============================================================
-	/**
-	 * return the result of the device's command.
-	 */
-	// ===============================================================
-	@Override
-	public Any execute(final DeviceImpl device, final Any in_any) throws DevFailed {
-		Util.out2.println("GetAttDataSupThanClass.execute(): arrived");
-		final String[] argin = extract_DevVarStringArray(in_any);
-
-		if (!(device instanceof HdbExtractor)) {
-			Except.throw_exception("DEVICE_ERROR", "Device parameter is not instance of HdbExtractor", "HdbExtractor");
-		}
-
-		return insert(((HdbExtractor) device).get_att_data_sup_than(argin));
-	}
-
-	// ===============================================================
-	/**
-	 * Check if it is allowed to execute the command.
-	 */
-	// ===============================================================
-	@Override
-	public boolean is_allowed(final DeviceImpl device, final Any data_in) {
-		// End of Generated Code
-
-		// Re-Start of Generated Code
-		return true;
-	}
-}
-
-// -----------------------------------------------------------------------------
-/*
- * end of $Source:
- * /cvsroot/tango-cs/tango/jserver/archiving/HdbExtractor/GetAttDataSupThanClass
- * .java,v $
- */
+//+======================================================================
+// $Source: /cvsroot/tango-cs/tango/jserver/archiving/HdbExtractor/GetAttDataSupThanClass.java,v $
+//
+// Project:      Tango Device Server
+//
+// Description:  Java source code for the command TemplateClass of the
+//               HdbExtractor class.
+//
+// $Author: chinkumo $
+//
+// $Revision: 1.3 $
+//
+// $Log: GetAttDataSupThanClass.java,v $
+// Revision 1.3  2005/11/29 16:17:38  chinkumo
+// Code reformated (pogo compatible)
+//
+// Revision 1.2  2005/11/15 13:45:52  chinkumo
+// ...
+//
+// Revision 1.1  2005/09/09 10:03:21  chinkumo
+// First commit !
+// (Dynamic attribut release)
+//
+//
+// copyleft :    European Synchrotron Radiation Facility
+//               BP 220, Grenoble 38043
+//               FRANCE
+//
+//-======================================================================
+//
+//  		This file is generated by POGO
+//	(Program Obviously used to Generate tango Object)
+//
+//         (c) - Software Engineering Group - ESRF
+//=============================================================================
+
+/**
+ * @author	$Author: chinkumo $
+ * @version	$Revision: 1.3 $
+ */
+package HdbExtractor;
+
+import org.omg.CORBA.Any;
+
+import fr.esrf.Tango.DevFailed;
+import fr.esrf.Tango.DispLevel;
+import fr.esrf.TangoDs.Command;
+import fr.esrf.TangoDs.DeviceImpl;
+import fr.esrf.TangoDs.Except;
+import fr.esrf.TangoDs.TangoConst;
+import fr.esrf.TangoDs.Util;
+
+/**
+ * Class Description: Retrieves all the data that are higher than the given
+ * value x. Create a dynamic attribute, retrieve the corresponding data from
+ * database and prepare result for attribute_history call.
+ */
+
+public class GetAttDataSupThanClass extends Command implements TangoConst {
+	// ===============================================================
+	/**
+	 * Constructor for Command class GetAttDataSupThanClass
+	 * 
+	 * @param name
+	 *            command name
+	 * @param in
+	 *            argin type
+	 * @param out
+	 *            argout type
+	 */
+	// ===============================================================
+	public GetAttDataSupThanClass(final String name, final int in, final int out) {
+		super(name, in, out);
+	}
+
+	// ===============================================================
+	/**
+	 * Constructor for Command class GetAttDataSupThanClass
+	 * 
+	 * @param name
+	 *            command name
+	 * @param in
+	 *            argin type
+	 * @param in_comments
+	 *            argin description
+	 * @param out
+	 *            argout type
+	 * @param out_comments
+	 *            argout description
+	 */
+	// ===============================================================
+	public GetAttDataSupThanClass(final String name, final int in, final int out, final String in_comments, final String out_comments) {
+		super(name, in, out, in_comments, out_comments);
+	}
+
+	// ===============================================================
+	/**
+	 * Constructor for Command class GetAttDataSupThanClass
+	 * 
+	 * @param name
+	 *            command name
+	 * @param in
+	 *            argin type
+	 * @param in_comments
+	 *            argin description
+	 * @param out
+	 *            argout type
+	 * @param out_comments
+	 *            argout description
+	 * @param level
+	 *            The command display type OPERATOR or EXPERT
+	 */
+	// ===============================================================
+	public GetAttDataSupThanClass(final String name, final int in, final int out, final String in_comments, final String out_comments, final DispLevel level) {
+		super(name, in, out, in_comments, out_comments, level);
+	}
+
+	// ===============================================================
+	/**
+	 * return the result of the device's command.
+	 */
+	// ===============================================================
+	@Override
+	public Any execute(final DeviceImpl device, final Any in_any) throws DevFailed {
+		Util.out2.println("GetAttDataSupThanClass.execute(): arrived");
+		final String[] argin = extract_DevVarStringArray(in_any);
+
+		if (!(device instanceof HdbExtractor)) {
+			Except.throw_exception("DEVICE_ERROR", "Device parameter is not instance of HdbExtractor", "HdbExtractor");
+		}
+
+		return insert(((HdbExtractor) device).get_att_data_sup_than(argin));
+	}
+
+	// ===============================================================
+	/**
+	 * Check if it is allowed to execute the command.
+	 */
+	// ===============================================================
+	@Override
+	public boolean is_allowed(final DeviceImpl device, final Any data_in) {
+		// End of Generated Code
+
+		// Re-Start of Generated Code
+		return true;
+	}
+}
+
+// -----------------------------------------------------------------------------
+/*
+ * end of $Source:
+ * /cvsroot/tango-cs/tango/jserver/archiving/HdbExtractor/GetAttDataSupThanClass
+ * .java,v $
+ */
diff --git a/src/main/java/HdbExtractor/GetAttDataSupThanCountClass.java b/hdbextractor/src/main/java/HdbExtractor/GetAttDataSupThanCountClass.java
similarity index 96%
rename from src/main/java/HdbExtractor/GetAttDataSupThanCountClass.java
rename to hdbextractor/src/main/java/HdbExtractor/GetAttDataSupThanCountClass.java
index cfb915632def9961d0fbfa97ec55540a8d8a9048..31a9332e1b597117ef9a0432473d5986a42c574b 100644
--- a/src/main/java/HdbExtractor/GetAttDataSupThanCountClass.java
+++ b/hdbextractor/src/main/java/HdbExtractor/GetAttDataSupThanCountClass.java
@@ -1,151 +1,151 @@
-//+======================================================================
-// $Source: /cvsroot/tango-cs/tango/jserver/archiving/HdbExtractor/GetAttDataSupThanCountClass.java,v $
-//
-// Project:      Tango Device Server
-//
-// Description:  Java source code for the command TemplateClass of the
-//               HdbExtractor class.
-//
-// $Author: chinkumo $
-//
-// $Revision: 1.3 $
-//
-// $Log: GetAttDataSupThanCountClass.java,v $
-// Revision 1.3  2005/11/29 16:17:38  chinkumo
-// Code reformated (pogo compatible)
-//
-// Revision 1.2  2005/11/15 13:45:52  chinkumo
-// ...
-//
-// Revision 1.1  2005/09/09 10:03:21  chinkumo
-// First commit !
-// (Dynamic attribut release)
-//
-//
-// copyleft :    European Synchrotron Radiation Facility
-//               BP 220, Grenoble 38043
-//               FRANCE
-//
-//-======================================================================
-//
-//  		This file is generated by POGO
-//	(Program Obviously used to Generate tango Object)
-//
-//         (c) - Software Engineering Group - ESRF
-//=============================================================================
-
-/**
- * @author	$Author: chinkumo $
- * @version	$Revision: 1.3 $
- */
-package HdbExtractor;
-
-import org.omg.CORBA.Any;
-
-import fr.esrf.Tango.DevFailed;
-import fr.esrf.Tango.DispLevel;
-import fr.esrf.TangoDs.Command;
-import fr.esrf.TangoDs.DeviceImpl;
-import fr.esrf.TangoDs.Except;
-import fr.esrf.TangoDs.TangoConst;
-import fr.esrf.TangoDs.Util;
-
-/**
- * Class Description: Returns the number of data higher than the given value.
- */
-
-public class GetAttDataSupThanCountClass extends Command implements TangoConst {
-	// ===============================================================
-	/**
-	 * Constructor for Command class GetAttDataSupThanCountClass
-	 * 
-	 * @param name
-	 *            command name
-	 * @param in
-	 *            argin type
-	 * @param out
-	 *            argout type
-	 */
-	// ===============================================================
-	public GetAttDataSupThanCountClass(final String name, final int in, final int out) {
-		super(name, in, out);
-	}
-
-	// ===============================================================
-	/**
-	 * Constructor for Command class GetAttDataSupThanCountClass
-	 * 
-	 * @param name
-	 *            command name
-	 * @param in
-	 *            argin type
-	 * @param in_comments
-	 *            argin description
-	 * @param out
-	 *            argout type
-	 * @param out_comments
-	 *            argout description
-	 */
-	// ===============================================================
-	public GetAttDataSupThanCountClass(final String name, final int in, final int out, final String in_comments, final String out_comments) {
-		super(name, in, out, in_comments, out_comments);
-	}
-
-	// ===============================================================
-	/**
-	 * Constructor for Command class GetAttDataSupThanCountClass
-	 * 
-	 * @param name
-	 *            command name
-	 * @param in
-	 *            argin type
-	 * @param in_comments
-	 *            argin description
-	 * @param out
-	 *            argout type
-	 * @param out_comments
-	 *            argout description
-	 * @param level
-	 *            The command display type OPERATOR or EXPERT
-	 */
-	// ===============================================================
-	public GetAttDataSupThanCountClass(final String name, final int in, final int out, final String in_comments, final String out_comments, final DispLevel level) {
-		super(name, in, out, in_comments, out_comments, level);
-	}
-
-	// ===============================================================
-	/**
-	 * return the result of the device's command.
-	 */
-	// ===============================================================
-	@Override
-	public Any execute(final DeviceImpl device, final Any in_any) throws DevFailed {
-		Util.out2.println("GetAttDataSupThanCountClass.execute(): arrived");
-		final String[] argin = extract_DevVarStringArray(in_any);
-
-		if (!(device instanceof HdbExtractor)) {
-			Except.throw_exception("DEVICE_ERROR", "Device parameter is not instance of HdbExtractor", "HdbExtractor");
-		}
-
-		return insert(((HdbExtractor) device).get_att_data_sup_than_count(argin));
-	}
-
-	// ===============================================================
-	/**
-	 * Check if it is allowed to execute the command.
-	 */
-	// ===============================================================
-	@Override
-	public boolean is_allowed(final DeviceImpl device, final Any data_in) {
-		// End of Generated Code
-
-		// Re-Start of Generated Code
-		return true;
-	}
-}
-
-// -----------------------------------------------------------------------------
-/*
- * end of $Source:/cvsroot/tango-cs/tango/jserver/archiving/HdbExtractor/
- * GetAttDataSupThanCountClass.java,v $
- */
+//+======================================================================
+// $Source: /cvsroot/tango-cs/tango/jserver/archiving/HdbExtractor/GetAttDataSupThanCountClass.java,v $
+//
+// Project:      Tango Device Server
+//
+// Description:  Java source code for the command TemplateClass of the
+//               HdbExtractor class.
+//
+// $Author: chinkumo $
+//
+// $Revision: 1.3 $
+//
+// $Log: GetAttDataSupThanCountClass.java,v $
+// Revision 1.3  2005/11/29 16:17:38  chinkumo
+// Code reformated (pogo compatible)
+//
+// Revision 1.2  2005/11/15 13:45:52  chinkumo
+// ...
+//
+// Revision 1.1  2005/09/09 10:03:21  chinkumo
+// First commit !
+// (Dynamic attribut release)
+//
+//
+// copyleft :    European Synchrotron Radiation Facility
+//               BP 220, Grenoble 38043
+//               FRANCE
+//
+//-======================================================================
+//
+//  		This file is generated by POGO
+//	(Program Obviously used to Generate tango Object)
+//
+//         (c) - Software Engineering Group - ESRF
+//=============================================================================
+
+/**
+ * @author	$Author: chinkumo $
+ * @version	$Revision: 1.3 $
+ */
+package HdbExtractor;
+
+import org.omg.CORBA.Any;
+
+import fr.esrf.Tango.DevFailed;
+import fr.esrf.Tango.DispLevel;
+import fr.esrf.TangoDs.Command;
+import fr.esrf.TangoDs.DeviceImpl;
+import fr.esrf.TangoDs.Except;
+import fr.esrf.TangoDs.TangoConst;
+import fr.esrf.TangoDs.Util;
+
+/**
+ * Class Description: Returns the number of data higher than the given value.
+ */
+
+public class GetAttDataSupThanCountClass extends Command implements TangoConst {
+	// ===============================================================
+	/**
+	 * Constructor for Command class GetAttDataSupThanCountClass
+	 * 
+	 * @param name
+	 *            command name
+	 * @param in
+	 *            argin type
+	 * @param out
+	 *            argout type
+	 */
+	// ===============================================================
+	public GetAttDataSupThanCountClass(final String name, final int in, final int out) {
+		super(name, in, out);
+	}
+
+	// ===============================================================
+	/**
+	 * Constructor for Command class GetAttDataSupThanCountClass
+	 * 
+	 * @param name
+	 *            command name
+	 * @param in
+	 *            argin type
+	 * @param in_comments
+	 *            argin description
+	 * @param out
+	 *            argout type
+	 * @param out_comments
+	 *            argout description
+	 */
+	// ===============================================================
+	public GetAttDataSupThanCountClass(final String name, final int in, final int out, final String in_comments, final String out_comments) {
+		super(name, in, out, in_comments, out_comments);
+	}
+
+	// ===============================================================
+	/**
+	 * Constructor for Command class GetAttDataSupThanCountClass
+	 * 
+	 * @param name
+	 *            command name
+	 * @param in
+	 *            argin type
+	 * @param in_comments
+	 *            argin description
+	 * @param out
+	 *            argout type
+	 * @param out_comments
+	 *            argout description
+	 * @param level
+	 *            The command display type OPERATOR or EXPERT
+	 */
+	// ===============================================================
+	public GetAttDataSupThanCountClass(final String name, final int in, final int out, final String in_comments, final String out_comments, final DispLevel level) {
+		super(name, in, out, in_comments, out_comments, level);
+	}
+
+	// ===============================================================
+	/**
+	 * return the result of the device's command.
+	 */
+	// ===============================================================
+	@Override
+	public Any execute(final DeviceImpl device, final Any in_any) throws DevFailed {
+		Util.out2.println("GetAttDataSupThanCountClass.execute(): arrived");
+		final String[] argin = extract_DevVarStringArray(in_any);
+
+		if (!(device instanceof HdbExtractor)) {
+			Except.throw_exception("DEVICE_ERROR", "Device parameter is not instance of HdbExtractor", "HdbExtractor");
+		}
+
+		return insert(((HdbExtractor) device).get_att_data_sup_than_count(argin));
+	}
+
+	// ===============================================================
+	/**
+	 * Check if it is allowed to execute the command.
+	 */
+	// ===============================================================
+	@Override
+	public boolean is_allowed(final DeviceImpl device, final Any data_in) {
+		// End of Generated Code
+
+		// Re-Start of Generated Code
+		return true;
+	}
+}
+
+// -----------------------------------------------------------------------------
+/*
+ * end of $Source:/cvsroot/tango-cs/tango/jserver/archiving/HdbExtractor/
+ * GetAttDataSupThanCountClass.java,v $
+ */
diff --git a/src/main/java/HdbExtractor/GetAttDefinitionDataClass.java b/hdbextractor/src/main/java/HdbExtractor/GetAttDefinitionDataClass.java
similarity index 96%
rename from src/main/java/HdbExtractor/GetAttDefinitionDataClass.java
rename to hdbextractor/src/main/java/HdbExtractor/GetAttDefinitionDataClass.java
index d93589a9ed59ced01914ee016cf88f4b1a4638d4..e0661d7a8f7a2e236c126ef17da9f7ce9af2a785 100644
--- a/src/main/java/HdbExtractor/GetAttDefinitionDataClass.java
+++ b/hdbextractor/src/main/java/HdbExtractor/GetAttDefinitionDataClass.java
@@ -1,153 +1,153 @@
-//+======================================================================
-// $Source: /cvsroot/tango-cs/tango/jserver/archiving/HdbExtractor/GetAttDefinitionDataClass.java,v $
-//
-// Project:      Tango Device Server
-//
-// Description:  Java source code for the command TemplateClass of the
-//               HdbExtractor class.
-//
-// $Author: chinkumo $
-//
-// $Revision: 1.3 $
-//
-// $Log: GetAttDefinitionDataClass.java,v $
-// Revision 1.3  2005/11/29 16:17:38  chinkumo
-// Code reformated (pogo compatible)
-//
-// Revision 1.2  2005/11/15 13:45:52  chinkumo
-// ...
-//
-// Revision 1.1  2005/09/09 10:03:21  chinkumo
-// First commit !
-// (Dynamic attribut release)
-//
-//
-// copyleft :    European Synchrotron Radiation Facility
-//               BP 220, Grenoble 38043
-//               FRANCE
-//
-//-======================================================================
-//
-//  		This file is generated by POGO
-//	(Program Obviously used to Generate tango Object)
-//
-//         (c) - Software Engineering Group - ESRF
-//=============================================================================
-
-/**
- * @author	$Author: chinkumo $
- * @version	$Revision: 1.3 $
- */
-package HdbExtractor;
-
-import org.omg.CORBA.Any;
-
-import fr.esrf.Tango.DevFailed;
-import fr.esrf.Tango.DispLevel;
-import fr.esrf.TangoDs.Command;
-import fr.esrf.TangoDs.DeviceImpl;
-import fr.esrf.TangoDs.Except;
-import fr.esrf.TangoDs.TangoConst;
-import fr.esrf.TangoDs.Util;
-
-/**
- * Class Description: Returns an array containing the differents definition
- * informations for the given attribute.
- */
-
-public class GetAttDefinitionDataClass extends Command implements TangoConst {
-	// ===============================================================
-	/**
-	 * Constructor for Command class GetAttDefinitionDataClass
-	 * 
-	 * @param name
-	 *            command name
-	 * @param in
-	 *            argin type
-	 * @param out
-	 *            argout type
-	 */
-	// ===============================================================
-	public GetAttDefinitionDataClass(final String name, final int in, final int out) {
-		super(name, in, out);
-	}
-
-	// ===============================================================
-	/**
-	 * Constructor for Command class GetAttDefinitionDataClass
-	 * 
-	 * @param name
-	 *            command name
-	 * @param in
-	 *            argin type
-	 * @param in_comments
-	 *            argin description
-	 * @param out
-	 *            argout type
-	 * @param out_comments
-	 *            argout description
-	 */
-	// ===============================================================
-	public GetAttDefinitionDataClass(final String name, final int in, final int out, final String in_comments, final String out_comments) {
-		super(name, in, out, in_comments, out_comments);
-	}
-
-	// ===============================================================
-	/**
-	 * Constructor for Command class GetAttDefinitionDataClass
-	 * 
-	 * @param name
-	 *            command name
-	 * @param in
-	 *            argin type
-	 * @param in_comments
-	 *            argin description
-	 * @param out
-	 *            argout type
-	 * @param out_comments
-	 *            argout description
-	 * @param level
-	 *            The command display type OPERATOR or EXPERT
-	 */
-	// ===============================================================
-	public GetAttDefinitionDataClass(final String name, final int in, final int out, final String in_comments, final String out_comments, final DispLevel level) {
-		super(name, in, out, in_comments, out_comments, level);
-	}
-
-	// ===============================================================
-	/**
-	 * return the result of the device's command.
-	 */
-	// ===============================================================
-	@Override
-	public Any execute(final DeviceImpl device, final Any in_any) throws DevFailed {
-		Util.out2.println("GetAttDefinitionDataClass.execute(): arrived");
-		final String argin = extract_DevString(in_any);
-
-		if (!(device instanceof HdbExtractor)) {
-			Except.throw_exception("DEVICE_ERROR", "Device parameter is not instance of HdbExtractor", "HdbExtractor");
-		}
-
-		return insert(((HdbExtractor) device).get_att_definition_data(argin));
-	}
-
-	// ===============================================================
-	/**
-	 * Check if it is allowed to execute the command.
-	 */
-	// ===============================================================
-	@Override
-	public boolean is_allowed(final DeviceImpl device, final Any data_in) {
-		// End of Generated Code
-
-		// Re-Start of Generated Code
-		return true;
-	}
-}
-
-// -----------------------------------------------------------------------------
-/*
- * end of $Source:
- * /cvsroot/tango-cs/tango/jserver/archiving/HdbExtractor/GetAttDefinitionDataClass
- * .java,v $
- */
+//+======================================================================
+// $Source: /cvsroot/tango-cs/tango/jserver/archiving/HdbExtractor/GetAttDefinitionDataClass.java,v $
+//
+// Project:      Tango Device Server
+//
+// Description:  Java source code for the command TemplateClass of the
+//               HdbExtractor class.
+//
+// $Author: chinkumo $
+//
+// $Revision: 1.3 $
+//
+// $Log: GetAttDefinitionDataClass.java,v $
+// Revision 1.3  2005/11/29 16:17:38  chinkumo
+// Code reformated (pogo compatible)
+//
+// Revision 1.2  2005/11/15 13:45:52  chinkumo
+// ...
+//
+// Revision 1.1  2005/09/09 10:03:21  chinkumo
+// First commit !
+// (Dynamic attribut release)
+//
+//
+// copyleft :    European Synchrotron Radiation Facility
+//               BP 220, Grenoble 38043
+//               FRANCE
+//
+//-======================================================================
+//
+//  		This file is generated by POGO
+//	(Program Obviously used to Generate tango Object)
+//
+//         (c) - Software Engineering Group - ESRF
+//=============================================================================
+
+/**
+ * @author	$Author: chinkumo $
+ * @version	$Revision: 1.3 $
+ */
+package HdbExtractor;
+
+import org.omg.CORBA.Any;
+
+import fr.esrf.Tango.DevFailed;
+import fr.esrf.Tango.DispLevel;
+import fr.esrf.TangoDs.Command;
+import fr.esrf.TangoDs.DeviceImpl;
+import fr.esrf.TangoDs.Except;
+import fr.esrf.TangoDs.TangoConst;
+import fr.esrf.TangoDs.Util;
+
+/**
+ * Class Description: Returns an array containing the differents definition
+ * informations for the given attribute.
+ */
+
+public class GetAttDefinitionDataClass extends Command implements TangoConst {
+	// ===============================================================
+	/**
+	 * Constructor for Command class GetAttDefinitionDataClass
+	 * 
+	 * @param name
+	 *            command name
+	 * @param in
+	 *            argin type
+	 * @param out
+	 *            argout type
+	 */
+	// ===============================================================
+	public GetAttDefinitionDataClass(final String name, final int in, final int out) {
+		super(name, in, out);
+	}
+
+	// ===============================================================
+	/**
+	 * Constructor for Command class GetAttDefinitionDataClass
+	 * 
+	 * @param name
+	 *            command name
+	 * @param in
+	 *            argin type
+	 * @param in_comments
+	 *            argin description
+	 * @param out
+	 *            argout type
+	 * @param out_comments
+	 *            argout description
+	 */
+	// ===============================================================
+	public GetAttDefinitionDataClass(final String name, final int in, final int out, final String in_comments, final String out_comments) {
+		super(name, in, out, in_comments, out_comments);
+	}
+
+	// ===============================================================
+	/**
+	 * Constructor for Command class GetAttDefinitionDataClass
+	 * 
+	 * @param name
+	 *            command name
+	 * @param in
+	 *            argin type
+	 * @param in_comments
+	 *            argin description
+	 * @param out
+	 *            argout type
+	 * @param out_comments
+	 *            argout description
+	 * @param level
+	 *            The command display type OPERATOR or EXPERT
+	 */
+	// ===============================================================
+	public GetAttDefinitionDataClass(final String name, final int in, final int out, final String in_comments, final String out_comments, final DispLevel level) {
+		super(name, in, out, in_comments, out_comments, level);
+	}
+
+	// ===============================================================
+	/**
+	 * return the result of the device's command.
+	 */
+	// ===============================================================
+	@Override
+	public Any execute(final DeviceImpl device, final Any in_any) throws DevFailed {
+		Util.out2.println("GetAttDefinitionDataClass.execute(): arrived");
+		final String argin = extract_DevString(in_any);
+
+		if (!(device instanceof HdbExtractor)) {
+			Except.throw_exception("DEVICE_ERROR", "Device parameter is not instance of HdbExtractor", "HdbExtractor");
+		}
+
+		return insert(((HdbExtractor) device).get_att_definition_data(argin));
+	}
+
+	// ===============================================================
+	/**
+	 * Check if it is allowed to execute the command.
+	 */
+	// ===============================================================
+	@Override
+	public boolean is_allowed(final DeviceImpl device, final Any data_in) {
+		// End of Generated Code
+
+		// Re-Start of Generated Code
+		return true;
+	}
+}
+
+// -----------------------------------------------------------------------------
+/*
+ * end of $Source:
+ * /cvsroot/tango-cs/tango/jserver/archiving/HdbExtractor/GetAttDefinitionDataClass
+ * .java,v $
+ */
diff --git a/src/main/java/HdbExtractor/GetAttFullNameClass.java b/hdbextractor/src/main/java/HdbExtractor/GetAttFullNameClass.java
similarity index 96%
rename from src/main/java/HdbExtractor/GetAttFullNameClass.java
rename to hdbextractor/src/main/java/HdbExtractor/GetAttFullNameClass.java
index 04fa0cb48d0082297981b8d823bd82deb1a821e7..0aa39a54dcbe615f67354faab8b86e280e12923c 100644
--- a/src/main/java/HdbExtractor/GetAttFullNameClass.java
+++ b/hdbextractor/src/main/java/HdbExtractor/GetAttFullNameClass.java
@@ -1,101 +1,101 @@
-/**
- * @author $Author: awo
- */
-package HdbExtractor;
-
-import org.omg.CORBA.Any;
-
-import fr.esrf.Tango.DevFailed;
-import fr.esrf.Tango.DevState;
-import fr.esrf.Tango.DispLevel;
-import fr.esrf.TangoDs.Command;
-import fr.esrf.TangoDs.DeviceImpl;
-import fr.esrf.TangoDs.Except;
-import fr.esrf.TangoDs.TangoConst;
-import fr.esrf.TangoDs.Util;
-
-public class GetAttFullNameClass extends Command implements TangoConst {
-
-    /**
-     * Constructor for Command class GetAttFullName
-     * 
-     * @param name
-     *            command name
-     * @param in
-     *            argin type
-     * @param out
-     *            argout type
-     */
-    public GetAttFullNameClass(final String name, final int in, final int out) {
-        super(name, in, out);
-    }
-
-    /**
-     * Constructor for Command class GetAttFullName
-     * 
-     * @param name
-     *            command name
-     * @param in
-     *            argin type
-     * @param in_comments
-     *            argin description
-     * @param out
-     *            argout type
-     * @param out_comments
-     *            argout description
-     */
-    public GetAttFullNameClass(final String name, final int in, final int out, final String in_comments,
-            final String out_comments) {
-        super(name, in, out, in_comments, out_comments);
-    }
-
-    /**
-     * Constructor for Command class GetAttFullName
-     * 
-     * @param name
-     *            command name
-     * @param in
-     *            argin type
-     * @param in_comments
-     *            argin description
-     * @param out
-     *            argout type
-     * @param out_comments
-     *            argout description
-     * @param level
-     *            The command display type OPERATOR or EXPERT
-     */
-    public GetAttFullNameClass(final String name, final int in, final int out, final String in_comments,
-            final String out_comments, final DispLevel level) {
-        super(name, in, out, in_comments, out_comments, level);
-    }
-
-    /**
-     * return the result of the device's command.
-     */
-    @Override
-    public Any execute(final DeviceImpl device, final Any in_any) throws DevFailed {
-        Util.out2.println("GetAttFullName.execute(): arrived");
-        final int argin = extract_DevLong(in_any);
-
-        if (!(device instanceof HdbExtractor)) {
-            Except.throw_exception("DEVICE_ERROR", "Device parameter is not instance of HdbExtractor", "HdbExtractor");
-        }
-
-        return insert(((HdbExtractor) device).get_att_full_name(argin));
-    }
-
-    /**
-     * Check if it is allowed to execute the command.
-     */
-    @Override
-    public boolean is_allowed(final DeviceImpl device, final Any data_in) {
-        if (device.get_state() == DevState.OFF || device.get_state() == DevState.INIT) {
-            // End of Generated Code
-
-            // Re-Start of Generated Code
-            return false;
-        }
-        return true;
-    }
-}
+/**
+ * @author $Author: awo
+ */
+package HdbExtractor;
+
+import org.omg.CORBA.Any;
+
+import fr.esrf.Tango.DevFailed;
+import fr.esrf.Tango.DevState;
+import fr.esrf.Tango.DispLevel;
+import fr.esrf.TangoDs.Command;
+import fr.esrf.TangoDs.DeviceImpl;
+import fr.esrf.TangoDs.Except;
+import fr.esrf.TangoDs.TangoConst;
+import fr.esrf.TangoDs.Util;
+
+public class GetAttFullNameClass extends Command implements TangoConst {
+
+    /**
+     * Constructor for Command class GetAttFullName
+     * 
+     * @param name
+     *            command name
+     * @param in
+     *            argin type
+     * @param out
+     *            argout type
+     */
+    public GetAttFullNameClass(final String name, final int in, final int out) {
+        super(name, in, out);
+    }
+
+    /**
+     * Constructor for Command class GetAttFullName
+     * 
+     * @param name
+     *            command name
+     * @param in
+     *            argin type
+     * @param in_comments
+     *            argin description
+     * @param out
+     *            argout type
+     * @param out_comments
+     *            argout description
+     */
+    public GetAttFullNameClass(final String name, final int in, final int out, final String in_comments,
+            final String out_comments) {
+        super(name, in, out, in_comments, out_comments);
+    }
+
+    /**
+     * Constructor for Command class GetAttFullName
+     * 
+     * @param name
+     *            command name
+     * @param in
+     *            argin type
+     * @param in_comments
+     *            argin description
+     * @param out
+     *            argout type
+     * @param out_comments
+     *            argout description
+     * @param level
+     *            The command display type OPERATOR or EXPERT
+     */
+    public GetAttFullNameClass(final String name, final int in, final int out, final String in_comments,
+            final String out_comments, final DispLevel level) {
+        super(name, in, out, in_comments, out_comments, level);
+    }
+
+    /**
+     * return the result of the device's command.
+     */
+    @Override
+    public Any execute(final DeviceImpl device, final Any in_any) throws DevFailed {
+        Util.out2.println("GetAttFullName.execute(): arrived");
+        final int argin = extract_DevLong(in_any);
+
+        if (!(device instanceof HdbExtractor)) {
+            Except.throw_exception("DEVICE_ERROR", "Device parameter is not instance of HdbExtractor", "HdbExtractor");
+        }
+
+        return insert(((HdbExtractor) device).get_att_full_name(argin));
+    }
+
+    /**
+     * Check if it is allowed to execute the command.
+     */
+    @Override
+    public boolean is_allowed(final DeviceImpl device, final Any data_in) {
+        if (device.get_state() == DevState.OFF || device.get_state() == DevState.INIT) {
+            // End of Generated Code
+
+            // Re-Start of Generated Code
+            return false;
+        }
+        return true;
+    }
+}
diff --git a/src/main/java/HdbExtractor/GetAttIdClass.java b/hdbextractor/src/main/java/HdbExtractor/GetAttIdClass.java
similarity index 96%
rename from src/main/java/HdbExtractor/GetAttIdClass.java
rename to hdbextractor/src/main/java/HdbExtractor/GetAttIdClass.java
index c5ac2e0e17c3ae11f3edfc11ebaba55bfa07a94c..e4c76ce2b78188facad41376ea1e983494e8b287 100644
--- a/src/main/java/HdbExtractor/GetAttIdClass.java
+++ b/hdbextractor/src/main/java/HdbExtractor/GetAttIdClass.java
@@ -1,151 +1,151 @@
-//+======================================================================
-// $Source: /cvsroot/tango-cs/tango/jserver/archiving/HdbExtractor/GetAttIdClass.java,v $
-//
-// Project:      Tango Device Server
-//
-// Description:  Java source code for the command TemplateClass of the
-//               HdbExtractor class.
-//
-// $Author: chinkumo $
-//
-// $Revision: 1.3 $
-//
-// $Log: GetAttIdClass.java,v $
-// Revision 1.3  2005/11/29 16:17:38  chinkumo
-// Code reformated (pogo compatible)
-//
-// Revision 1.2  2005/11/15 13:45:52  chinkumo
-// ...
-//
-// Revision 1.1  2005/09/09 10:03:21  chinkumo
-// First commit !
-// (Dynamic attribut release)
-//
-//
-// copyleft :    European Synchrotron Radiation Facility
-//               BP 220, Grenoble 38043
-//               FRANCE
-//
-//-======================================================================
-//
-//  		This file is generated by POGO
-//	(Program Obviously used to Generate tango Object)
-//
-//         (c) - Software Engineering Group - ESRF
-//=============================================================================
-
-/**
- * @author	$Author: chinkumo $
- * @version	$Revision: 1.3 $
- */
-package HdbExtractor;
-
-import org.omg.CORBA.Any;
-
-import fr.esrf.Tango.DevFailed;
-import fr.esrf.Tango.DispLevel;
-import fr.esrf.TangoDs.Command;
-import fr.esrf.TangoDs.DeviceImpl;
-import fr.esrf.TangoDs.Except;
-import fr.esrf.TangoDs.TangoConst;
-import fr.esrf.TangoDs.Util;
-
-/**
- * Class Description: Gets for a specified attribute its ID as defined in HDB
- */
-
-public class GetAttIdClass extends Command implements TangoConst {
-	// ===============================================================
-	/**
-	 * Constructor for Command class GetAttIdClass
-	 * 
-	 * @param name
-	 *            command name
-	 * @param in
-	 *            argin type
-	 * @param out
-	 *            argout type
-	 */
-	// ===============================================================
-	public GetAttIdClass(final String name, final int in, final int out) {
-		super(name, in, out);
-	}
-
-	// ===============================================================
-	/**
-	 * Constructor for Command class GetAttIdClass
-	 * 
-	 * @param name
-	 *            command name
-	 * @param in
-	 *            argin type
-	 * @param in_comments
-	 *            argin description
-	 * @param out
-	 *            argout type
-	 * @param out_comments
-	 *            argout description
-	 */
-	// ===============================================================
-	public GetAttIdClass(final String name, final int in, final int out, final String in_comments, final String out_comments) {
-		super(name, in, out, in_comments, out_comments);
-	}
-
-	// ===============================================================
-	/**
-	 * Constructor for Command class GetAttIdClass
-	 * 
-	 * @param name
-	 *            command name
-	 * @param in
-	 *            argin type
-	 * @param in_comments
-	 *            argin description
-	 * @param out
-	 *            argout type
-	 * @param out_comments
-	 *            argout description
-	 * @param level
-	 *            The command display type OPERATOR or EXPERT
-	 */
-	// ===============================================================
-	public GetAttIdClass(final String name, final int in, final int out, final String in_comments, final String out_comments, final DispLevel level) {
-		super(name, in, out, in_comments, out_comments, level);
-	}
-
-	// ===============================================================
-	/**
-	 * return the result of the device's command.
-	 */
-	// ===============================================================
-	@Override
-	public Any execute(final DeviceImpl device, final Any in_any) throws DevFailed {
-		Util.out2.println("GetAttIdClass.execute(): arrived");
-		final String argin = extract_DevString(in_any);
-
-		if (!(device instanceof HdbExtractor)) {
-			Except.throw_exception("DEVICE_ERROR", "Device parameter is not instance of HdbExtractor", "HdbExtractor");
-		}
-
-		return insert(((HdbExtractor) device).get_att_id(argin));
-	}
-
-	// ===============================================================
-	/**
-	 * Check if it is allowed to execute the command.
-	 */
-	// ===============================================================
-	@Override
-	public boolean is_allowed(final DeviceImpl device, final Any data_in) {
-		// End of Generated Code
-
-		// Re-Start of Generated Code
-		return true;
-	}
-}
-
-// -----------------------------------------------------------------------------
-/*
- * end of $Source:
- * /cvsroot/tango-cs/tango/jserver/archiving/HdbExtractor/GetAttIdClass.java,v $
- */
+//+======================================================================
+// $Source: /cvsroot/tango-cs/tango/jserver/archiving/HdbExtractor/GetAttIdClass.java,v $
+//
+// Project:      Tango Device Server
+//
+// Description:  Java source code for the command TemplateClass of the
+//               HdbExtractor class.
+//
+// $Author: chinkumo $
+//
+// $Revision: 1.3 $
+//
+// $Log: GetAttIdClass.java,v $
+// Revision 1.3  2005/11/29 16:17:38  chinkumo
+// Code reformated (pogo compatible)
+//
+// Revision 1.2  2005/11/15 13:45:52  chinkumo
+// ...
+//
+// Revision 1.1  2005/09/09 10:03:21  chinkumo
+// First commit !
+// (Dynamic attribut release)
+//
+//
+// copyleft :    European Synchrotron Radiation Facility
+//               BP 220, Grenoble 38043
+//               FRANCE
+//
+//-======================================================================
+//
+//  		This file is generated by POGO
+//	(Program Obviously used to Generate tango Object)
+//
+//         (c) - Software Engineering Group - ESRF
+//=============================================================================
+
+/**
+ * @author	$Author: chinkumo $
+ * @version	$Revision: 1.3 $
+ */
+package HdbExtractor;
+
+import org.omg.CORBA.Any;
+
+import fr.esrf.Tango.DevFailed;
+import fr.esrf.Tango.DispLevel;
+import fr.esrf.TangoDs.Command;
+import fr.esrf.TangoDs.DeviceImpl;
+import fr.esrf.TangoDs.Except;
+import fr.esrf.TangoDs.TangoConst;
+import fr.esrf.TangoDs.Util;
+
+/**
+ * Class Description: Gets for a specified attribute its ID as defined in HDB
+ */
+
+public class GetAttIdClass extends Command implements TangoConst {
+	// ===============================================================
+	/**
+	 * Constructor for Command class GetAttIdClass
+	 * 
+	 * @param name
+	 *            command name
+	 * @param in
+	 *            argin type
+	 * @param out
+	 *            argout type
+	 */
+	// ===============================================================
+	public GetAttIdClass(final String name, final int in, final int out) {
+		super(name, in, out);
+	}
+
+	// ===============================================================
+	/**
+	 * Constructor for Command class GetAttIdClass
+	 * 
+	 * @param name
+	 *            command name
+	 * @param in
+	 *            argin type
+	 * @param in_comments
+	 *            argin description
+	 * @param out
+	 *            argout type
+	 * @param out_comments
+	 *            argout description
+	 */
+	// ===============================================================
+	public GetAttIdClass(final String name, final int in, final int out, final String in_comments, final String out_comments) {
+		super(name, in, out, in_comments, out_comments);
+	}
+
+	// ===============================================================
+	/**
+	 * Constructor for Command class GetAttIdClass
+	 * 
+	 * @param name
+	 *            command name
+	 * @param in
+	 *            argin type
+	 * @param in_comments
+	 *            argin description
+	 * @param out
+	 *            argout type
+	 * @param out_comments
+	 *            argout description
+	 * @param level
+	 *            The command display type OPERATOR or EXPERT
+	 */
+	// ===============================================================
+	public GetAttIdClass(final String name, final int in, final int out, final String in_comments, final String out_comments, final DispLevel level) {
+		super(name, in, out, in_comments, out_comments, level);
+	}
+
+	// ===============================================================
+	/**
+	 * return the result of the device's command.
+	 */
+	// ===============================================================
+	@Override
+	public Any execute(final DeviceImpl device, final Any in_any) throws DevFailed {
+		Util.out2.println("GetAttIdClass.execute(): arrived");
+		final String argin = extract_DevString(in_any);
+
+		if (!(device instanceof HdbExtractor)) {
+			Except.throw_exception("DEVICE_ERROR", "Device parameter is not instance of HdbExtractor", "HdbExtractor");
+		}
+
+		return insert(((HdbExtractor) device).get_att_id(argin));
+	}
+
+	// ===============================================================
+	/**
+	 * Check if it is allowed to execute the command.
+	 */
+	// ===============================================================
+	@Override
+	public boolean is_allowed(final DeviceImpl device, final Any data_in) {
+		// End of Generated Code
+
+		// Re-Start of Generated Code
+		return true;
+	}
+}
+
+// -----------------------------------------------------------------------------
+/*
+ * end of $Source:
+ * /cvsroot/tango-cs/tango/jserver/archiving/HdbExtractor/GetAttIdClass.java,v $
+ */
diff --git a/src/main/java/HdbExtractor/GetAttNameAllClass.java b/hdbextractor/src/main/java/HdbExtractor/GetAttNameAllClass.java
similarity index 96%
rename from src/main/java/HdbExtractor/GetAttNameAllClass.java
rename to hdbextractor/src/main/java/HdbExtractor/GetAttNameAllClass.java
index 607c83fe0a783a69faf5cc8fb03901bd7808b1ff..df2c8be0031769507db0f6a8be9dd8b053bff21f 100644
--- a/src/main/java/HdbExtractor/GetAttNameAllClass.java
+++ b/hdbextractor/src/main/java/HdbExtractor/GetAttNameAllClass.java
@@ -1,150 +1,150 @@
-//+======================================================================
-// $Source: /cvsroot/tango-cs/tango/jserver/archiving/HdbExtractor/GetAttNameAllClass.java,v $
-//
-// Project:      Tango Device Server
-//
-// Description:  Java source code for the command TemplateClass of the
-//               HdbExtractor class.
-//
-// $Author: chinkumo $
-//
-// $Revision: 1.3 $
-//
-// $Log: GetAttNameAllClass.java,v $
-// Revision 1.3  2005/11/29 16:17:38  chinkumo
-// Code reformated (pogo compatible)
-//
-// Revision 1.2  2005/11/15 13:45:52  chinkumo
-// ...
-//
-// Revision 1.1  2005/09/09 10:03:21  chinkumo
-// First commit !
-// (Dynamic attribut release)
-//
-//
-// copyleft :    European Synchrotron Radiation Facility
-//               BP 220, Grenoble 38043
-//               FRANCE
-//
-//-======================================================================
-//
-//  		This file is generated by POGO
-//	(Program Obviously used to Generate tango Object)
-//
-//         (c) - Software Engineering Group - ESRF
-//=============================================================================
-
-/**
- * @author	$Author: chinkumo $
- * @version	$Revision: 1.3 $
- */
-package HdbExtractor;
-
-import org.omg.CORBA.Any;
-
-import fr.esrf.Tango.DevFailed;
-import fr.esrf.Tango.DispLevel;
-import fr.esrf.TangoDs.Command;
-import fr.esrf.TangoDs.DeviceImpl;
-import fr.esrf.TangoDs.Except;
-import fr.esrf.TangoDs.TangoConst;
-import fr.esrf.TangoDs.Util;
-
-/**
- * Class Description: Gets whole list of the attributes registered in HDB
- */
-
-public class GetAttNameAllClass extends Command implements TangoConst {
-	// ===============================================================
-	/**
-	 * Constructor for Command class GetAttNameAllClass
-	 * 
-	 * @param name
-	 *            command name
-	 * @param in
-	 *            argin type
-	 * @param out
-	 *            argout type
-	 */
-	// ===============================================================
-	public GetAttNameAllClass(final String name, final int in, final int out) {
-		super(name, in, out);
-	}
-
-	// ===============================================================
-	/**
-	 * Constructor for Command class GetAttNameAllClass
-	 * 
-	 * @param name
-	 *            command name
-	 * @param in
-	 *            argin type
-	 * @param in_comments
-	 *            argin description
-	 * @param out
-	 *            argout type
-	 * @param out_comments
-	 *            argout description
-	 */
-	// ===============================================================
-	public GetAttNameAllClass(final String name, final int in, final int out, final String in_comments, final String out_comments) {
-		super(name, in, out, in_comments, out_comments);
-	}
-
-	// ===============================================================
-	/**
-	 * Constructor for Command class GetAttNameAllClass
-	 * 
-	 * @param name
-	 *            command name
-	 * @param in
-	 *            argin type
-	 * @param in_comments
-	 *            argin description
-	 * @param out
-	 *            argout type
-	 * @param out_comments
-	 *            argout description
-	 * @param level
-	 *            The command display type OPERATOR or EXPERT
-	 */
-	// ===============================================================
-	public GetAttNameAllClass(final String name, final int in, final int out, final String in_comments, final String out_comments, final DispLevel level) {
-		super(name, in, out, in_comments, out_comments, level);
-	}
-
-	// ===============================================================
-	/**
-	 * return the result of the device's command.
-	 */
-	// ===============================================================
-	@Override
-	public Any execute(final DeviceImpl device, final Any in_any) throws DevFailed {
-		Util.out2.println("GetAttNameAllClass.execute(): arrived");
-		if (!(device instanceof HdbExtractor)) {
-			Except.throw_exception("DEVICE_ERROR", "Device parameter is not instance of HdbExtractor", "HdbExtractor");
-		}
-
-		return insert(((HdbExtractor) device).get_att_name_all());
-	}
-
-	// ===============================================================
-	/**
-	 * Check if it is allowed to execute the command.
-	 */
-	// ===============================================================
-	@Override
-	public boolean is_allowed(final DeviceImpl device, final Any data_in) {
-		// End of Generated Code
-
-		// Re-Start of Generated Code
-		return true;
-	}
-}
-
-// -----------------------------------------------------------------------------
-/*
- * end of $Source:
- * /cvsroot/tango-cs/tango/jserver/archiving/HdbExtractor/GetAttNameAllClass
- * .java,v $
- */
+//+======================================================================
+// $Source: /cvsroot/tango-cs/tango/jserver/archiving/HdbExtractor/GetAttNameAllClass.java,v $
+//
+// Project:      Tango Device Server
+//
+// Description:  Java source code for the command TemplateClass of the
+//               HdbExtractor class.
+//
+// $Author: chinkumo $
+//
+// $Revision: 1.3 $
+//
+// $Log: GetAttNameAllClass.java,v $
+// Revision 1.3  2005/11/29 16:17:38  chinkumo
+// Code reformated (pogo compatible)
+//
+// Revision 1.2  2005/11/15 13:45:52  chinkumo
+// ...
+//
+// Revision 1.1  2005/09/09 10:03:21  chinkumo
+// First commit !
+// (Dynamic attribut release)
+//
+//
+// copyleft :    European Synchrotron Radiation Facility
+//               BP 220, Grenoble 38043
+//               FRANCE
+//
+//-======================================================================
+//
+//  		This file is generated by POGO
+//	(Program Obviously used to Generate tango Object)
+//
+//         (c) - Software Engineering Group - ESRF
+//=============================================================================
+
+/**
+ * @author	$Author: chinkumo $
+ * @version	$Revision: 1.3 $
+ */
+package HdbExtractor;
+
+import org.omg.CORBA.Any;
+
+import fr.esrf.Tango.DevFailed;
+import fr.esrf.Tango.DispLevel;
+import fr.esrf.TangoDs.Command;
+import fr.esrf.TangoDs.DeviceImpl;
+import fr.esrf.TangoDs.Except;
+import fr.esrf.TangoDs.TangoConst;
+import fr.esrf.TangoDs.Util;
+
+/**
+ * Class Description: Gets whole list of the attributes registered in HDB
+ */
+
+public class GetAttNameAllClass extends Command implements TangoConst {
+	// ===============================================================
+	/**
+	 * Constructor for Command class GetAttNameAllClass
+	 * 
+	 * @param name
+	 *            command name
+	 * @param in
+	 *            argin type
+	 * @param out
+	 *            argout type
+	 */
+	// ===============================================================
+	public GetAttNameAllClass(final String name, final int in, final int out) {
+		super(name, in, out);
+	}
+
+	// ===============================================================
+	/**
+	 * Constructor for Command class GetAttNameAllClass
+	 * 
+	 * @param name
+	 *            command name
+	 * @param in
+	 *            argin type
+	 * @param in_comments
+	 *            argin description
+	 * @param out
+	 *            argout type
+	 * @param out_comments
+	 *            argout description
+	 */
+	// ===============================================================
+	public GetAttNameAllClass(final String name, final int in, final int out, final String in_comments, final String out_comments) {
+		super(name, in, out, in_comments, out_comments);
+	}
+
+	// ===============================================================
+	/**
+	 * Constructor for Command class GetAttNameAllClass
+	 * 
+	 * @param name
+	 *            command name
+	 * @param in
+	 *            argin type
+	 * @param in_comments
+	 *            argin description
+	 * @param out
+	 *            argout type
+	 * @param out_comments
+	 *            argout description
+	 * @param level
+	 *            The command display type OPERATOR or EXPERT
+	 */
+	// ===============================================================
+	public GetAttNameAllClass(final String name, final int in, final int out, final String in_comments, final String out_comments, final DispLevel level) {
+		super(name, in, out, in_comments, out_comments, level);
+	}
+
+	// ===============================================================
+	/**
+	 * return the result of the device's command.
+	 */
+	// ===============================================================
+	@Override
+	public Any execute(final DeviceImpl device, final Any in_any) throws DevFailed {
+		Util.out2.println("GetAttNameAllClass.execute(): arrived");
+		if (!(device instanceof HdbExtractor)) {
+			Except.throw_exception("DEVICE_ERROR", "Device parameter is not instance of HdbExtractor", "HdbExtractor");
+		}
+
+		return insert(((HdbExtractor) device).get_att_name_all());
+	}
+
+	// ===============================================================
+	/**
+	 * Check if it is allowed to execute the command.
+	 */
+	// ===============================================================
+	@Override
+	public boolean is_allowed(final DeviceImpl device, final Any data_in) {
+		// End of Generated Code
+
+		// Re-Start of Generated Code
+		return true;
+	}
+}
+
+// -----------------------------------------------------------------------------
+/*
+ * end of $Source:
+ * /cvsroot/tango-cs/tango/jserver/archiving/HdbExtractor/GetAttNameAllClass
+ * .java,v $
+ */
diff --git a/src/main/java/HdbExtractor/GetAttNameFacilityClass.java b/hdbextractor/src/main/java/HdbExtractor/GetAttNameFacilityClass.java
similarity index 96%
rename from src/main/java/HdbExtractor/GetAttNameFacilityClass.java
rename to hdbextractor/src/main/java/HdbExtractor/GetAttNameFacilityClass.java
index 53afe234c546493d9c12e323834177b0561a86fc..eb842aba47164cbb5a4e0d97df7d3ecb728ae6b4 100644
--- a/src/main/java/HdbExtractor/GetAttNameFacilityClass.java
+++ b/hdbextractor/src/main/java/HdbExtractor/GetAttNameFacilityClass.java
@@ -1,151 +1,151 @@
-//+======================================================================
-// $Source: /cvsroot/tango-cs/tango/jserver/archiving/HdbExtractor/GetAttNameFacilityClass.java,v $
-//
-// Project:      Tango Device Server
-//
-// Description:  Java source code for the command TemplateClass of the
-//               HdbExtractor class.
-//
-// $Author: chinkumo $
-//
-// $Revision: 1.3 $
-//
-// $Log: GetAttNameFacilityClass.java,v $
-// Revision 1.3  2005/11/29 16:17:38  chinkumo
-// Code reformated (pogo compatible)
-//
-// Revision 1.2  2005/11/15 13:45:52  chinkumo
-// ...
-//
-// Revision 1.1  2005/09/09 10:03:21  chinkumo
-// First commit !
-// (Dynamic attribut release)
-//
-//
-// copyleft :    European Synchrotron Radiation Facility
-//               BP 220, Grenoble 38043
-//               FRANCE
-//
-//-======================================================================
-//
-//  		This file is generated by POGO
-//	(Program Obviously used to Generate tango Object)
-//
-//         (c) - Software Engineering Group - ESRF
-//=============================================================================
-
-/**
- * @author	$Author: chinkumo $
- * @version	$Revision: 1.3 $
- */
-package HdbExtractor;
-
-import org.omg.CORBA.Any;
-
-import fr.esrf.Tango.DevFailed;
-import fr.esrf.Tango.DispLevel;
-import fr.esrf.TangoDs.Command;
-import fr.esrf.TangoDs.DeviceImpl;
-import fr.esrf.TangoDs.Except;
-import fr.esrf.TangoDs.TangoConst;
-import fr.esrf.TangoDs.Util;
-
-/**
- * Class Description: Gets whole list of the attributes registered in HDB and
- * that belong to the current facility.
- */
-
-public class GetAttNameFacilityClass extends Command implements TangoConst {
-	// ===============================================================
-	/**
-	 * Constructor for Command class GetAttNameFacilityClass
-	 * 
-	 * @param name
-	 *            command name
-	 * @param in
-	 *            argin type
-	 * @param out
-	 *            argout type
-	 */
-	// ===============================================================
-	public GetAttNameFacilityClass(final String name, final int in, final int out) {
-		super(name, in, out);
-	}
-
-	// ===============================================================
-	/**
-	 * Constructor for Command class GetAttNameFacilityClass
-	 * 
-	 * @param name
-	 *            command name
-	 * @param in
-	 *            argin type
-	 * @param in_comments
-	 *            argin description
-	 * @param out
-	 *            argout type
-	 * @param out_comments
-	 *            argout description
-	 */
-	// ===============================================================
-	public GetAttNameFacilityClass(final String name, final int in, final int out, final String in_comments, final String out_comments) {
-		super(name, in, out, in_comments, out_comments);
-	}
-
-	// ===============================================================
-	/**
-	 * Constructor for Command class GetAttNameFacilityClass
-	 * 
-	 * @param name
-	 *            command name
-	 * @param in
-	 *            argin type
-	 * @param in_comments
-	 *            argin description
-	 * @param out
-	 *            argout type
-	 * @param out_comments
-	 *            argout description
-	 * @param level
-	 *            The command display type OPERATOR or EXPERT
-	 */
-	// ===============================================================
-	public GetAttNameFacilityClass(final String name, final int in, final int out, final String in_comments, final String out_comments, final DispLevel level) {
-		super(name, in, out, in_comments, out_comments, level);
-	}
-
-	// ===============================================================
-	/**
-	 * return the result of the device's command.
-	 */
-	// ===============================================================
-	@Override
-	public Any execute(final DeviceImpl device, final Any in_any) throws DevFailed {
-		Util.out2.println("GetAttNameFacilityClass.execute(): arrived");
-
-		if (!(device instanceof HdbExtractor)) {
-			Except.throw_exception("DEVICE_ERROR", "Device parameter is not instance of HdbExtractor", "HdbExtractor");
-		}
-		return insert(((HdbExtractor) device).get_att_name_facility());
-	}
-
-	// ===============================================================
-	/**
-	 * Check if it is allowed to execute the command.
-	 */
-	// ===============================================================
-	@Override
-	public boolean is_allowed(final DeviceImpl device, final Any data_in) {
-		// End of Generated Code
-
-		// Re-Start of Generated Code
-		return true;
-	}
-}
-
-// -----------------------------------------------------------------------------
-/*
- * end of $Source:
- * /cvsroot/tango-cs/tango/jserver/archiving/HdbExtractor/GetAttNameFacilityClass
- * .java,v $
- */
+//+======================================================================
+// $Source: /cvsroot/tango-cs/tango/jserver/archiving/HdbExtractor/GetAttNameFacilityClass.java,v $
+//
+// Project:      Tango Device Server
+//
+// Description:  Java source code for the command TemplateClass of the
+//               HdbExtractor class.
+//
+// $Author: chinkumo $
+//
+// $Revision: 1.3 $
+//
+// $Log: GetAttNameFacilityClass.java,v $
+// Revision 1.3  2005/11/29 16:17:38  chinkumo
+// Code reformated (pogo compatible)
+//
+// Revision 1.2  2005/11/15 13:45:52  chinkumo
+// ...
+//
+// Revision 1.1  2005/09/09 10:03:21  chinkumo
+// First commit !
+// (Dynamic attribut release)
+//
+//
+// copyleft :    European Synchrotron Radiation Facility
+//               BP 220, Grenoble 38043
+//               FRANCE
+//
+//-======================================================================
+//
+//  		This file is generated by POGO
+//	(Program Obviously used to Generate tango Object)
+//
+//         (c) - Software Engineering Group - ESRF
+//=============================================================================
+
+/**
+ * @author	$Author: chinkumo $
+ * @version	$Revision: 1.3 $
+ */
+package HdbExtractor;
+
+import org.omg.CORBA.Any;
+
+import fr.esrf.Tango.DevFailed;
+import fr.esrf.Tango.DispLevel;
+import fr.esrf.TangoDs.Command;
+import fr.esrf.TangoDs.DeviceImpl;
+import fr.esrf.TangoDs.Except;
+import fr.esrf.TangoDs.TangoConst;
+import fr.esrf.TangoDs.Util;
+
+/**
+ * Class Description: Gets whole list of the attributes registered in HDB and
+ * that belong to the current facility.
+ */
+
+public class GetAttNameFacilityClass extends Command implements TangoConst {
+	// ===============================================================
+	/**
+	 * Constructor for Command class GetAttNameFacilityClass
+	 * 
+	 * @param name
+	 *            command name
+	 * @param in
+	 *            argin type
+	 * @param out
+	 *            argout type
+	 */
+	// ===============================================================
+	public GetAttNameFacilityClass(final String name, final int in, final int out) {
+		super(name, in, out);
+	}
+
+	// ===============================================================
+	/**
+	 * Constructor for Command class GetAttNameFacilityClass
+	 * 
+	 * @param name
+	 *            command name
+	 * @param in
+	 *            argin type
+	 * @param in_comments
+	 *            argin description
+	 * @param out
+	 *            argout type
+	 * @param out_comments
+	 *            argout description
+	 */
+	// ===============================================================
+	public GetAttNameFacilityClass(final String name, final int in, final int out, final String in_comments, final String out_comments) {
+		super(name, in, out, in_comments, out_comments);
+	}
+
+	// ===============================================================
+	/**
+	 * Constructor for Command class GetAttNameFacilityClass
+	 * 
+	 * @param name
+	 *            command name
+	 * @param in
+	 *            argin type
+	 * @param in_comments
+	 *            argin description
+	 * @param out
+	 *            argout type
+	 * @param out_comments
+	 *            argout description
+	 * @param level
+	 *            The command display type OPERATOR or EXPERT
+	 */
+	// ===============================================================
+	public GetAttNameFacilityClass(final String name, final int in, final int out, final String in_comments, final String out_comments, final DispLevel level) {
+		super(name, in, out, in_comments, out_comments, level);
+	}
+
+	// ===============================================================
+	/**
+	 * return the result of the device's command.
+	 */
+	// ===============================================================
+	@Override
+	public Any execute(final DeviceImpl device, final Any in_any) throws DevFailed {
+		Util.out2.println("GetAttNameFacilityClass.execute(): arrived");
+
+		if (!(device instanceof HdbExtractor)) {
+			Except.throw_exception("DEVICE_ERROR", "Device parameter is not instance of HdbExtractor", "HdbExtractor");
+		}
+		return insert(((HdbExtractor) device).get_att_name_facility());
+	}
+
+	// ===============================================================
+	/**
+	 * Check if it is allowed to execute the command.
+	 */
+	// ===============================================================
+	@Override
+	public boolean is_allowed(final DeviceImpl device, final Any data_in) {
+		// End of Generated Code
+
+		// Re-Start of Generated Code
+		return true;
+	}
+}
+
+// -----------------------------------------------------------------------------
+/*
+ * end of $Source:
+ * /cvsroot/tango-cs/tango/jserver/archiving/HdbExtractor/GetAttNameFacilityClass
+ * .java,v $
+ */
diff --git a/src/main/java/HdbExtractor/GetAttNameFilterFormatClass.java b/hdbextractor/src/main/java/HdbExtractor/GetAttNameFilterFormatClass.java
similarity index 96%
rename from src/main/java/HdbExtractor/GetAttNameFilterFormatClass.java
rename to hdbextractor/src/main/java/HdbExtractor/GetAttNameFilterFormatClass.java
index fa8b56c775bbd4753f5717079ad75c6571e6467c..1f2818b865d58cd83195bcf61809908960bebab8 100644
--- a/src/main/java/HdbExtractor/GetAttNameFilterFormatClass.java
+++ b/hdbextractor/src/main/java/HdbExtractor/GetAttNameFilterFormatClass.java
@@ -1,151 +1,151 @@
-//+======================================================================
-// $Source: /cvsroot/tango-cs/tango/jserver/archiving/HdbExtractor/GetAttNameFilterFormatClass.java,v $
-//
-// Project:      Tango Device Server
-//
-// Description:  Java source code for the command TemplateClass of the
-//               HdbExtractor class.
-//
-// $Author: chinkumo $
-//
-// $Revision: 1.3 $
-//
-// $Log: GetAttNameFilterFormatClass.java,v $
-// Revision 1.3  2005/11/29 16:17:38  chinkumo
-// Code reformated (pogo compatible)
-//
-// Revision 1.2  2005/11/15 13:45:52  chinkumo
-// ...
-//
-// Revision 1.1  2005/09/09 10:03:21  chinkumo
-// First commit !
-// (Dynamic attribut release)
-//
-//
-// copyleft :    European Synchrotron Radiation Facility
-//               BP 220, Grenoble 38043
-//               FRANCE
-//
-//-======================================================================
-//
-//  		This file is generated by POGO
-//	(Program Obviously used to Generate tango Object)
-//
-//         (c) - Software Engineering Group - ESRF
-//=============================================================================
-
-/**
- * @author	$Author: chinkumo $
- * @version	$Revision: 1.3 $
- */
-package HdbExtractor;
-
-import org.omg.CORBA.Any;
-
-import fr.esrf.Tango.DevFailed;
-import fr.esrf.Tango.DispLevel;
-import fr.esrf.TangoDs.Command;
-import fr.esrf.TangoDs.DeviceImpl;
-import fr.esrf.TangoDs.Except;
-import fr.esrf.TangoDs.TangoConst;
-import fr.esrf.TangoDs.Util;
-
-/**
- * Class Description: Gets the list of <I>HDB</I> registered attributes for the
- * given format
- */
-
-public class GetAttNameFilterFormatClass extends Command implements TangoConst {
-	// ===============================================================
-	/**
-	 * Constructor for Command class GetAttNameFilterFormatClass
-	 * 
-	 * @param name
-	 *            command name
-	 * @param in
-	 *            argin type
-	 * @param out
-	 *            argout type
-	 */
-	// ===============================================================
-	public GetAttNameFilterFormatClass(final String name, final int in, final int out) {
-		super(name, in, out);
-	}
-
-	// ===============================================================
-	/**
-	 * Constructor for Command class GetAttNameFilterFormatClass
-	 * 
-	 * @param name
-	 *            command name
-	 * @param in
-	 *            argin type
-	 * @param in_comments
-	 *            argin description
-	 * @param out
-	 *            argout type
-	 * @param out_comments
-	 *            argout description
-	 */
-	// ===============================================================
-	public GetAttNameFilterFormatClass(final String name, final int in, final int out, final String in_comments, final String out_comments) {
-		super(name, in, out, in_comments, out_comments);
-	}
-
-	// ===============================================================
-	/**
-	 * Constructor for Command class GetAttNameFilterFormatClass
-	 * 
-	 * @param name
-	 *            command name
-	 * @param in
-	 *            argin type
-	 * @param in_comments
-	 *            argin description
-	 * @param out
-	 *            argout type
-	 * @param out_comments
-	 *            argout description
-	 * @param level
-	 *            The command display type OPERATOR or EXPERT
-	 */
-	// ===============================================================
-	public GetAttNameFilterFormatClass(final String name, final int in, final int out, final String in_comments, final String out_comments, final DispLevel level) {
-		super(name, in, out, in_comments, out_comments, level);
-	}
-
-	// ===============================================================
-	/**
-	 * return the result of the device's command.
-	 */
-	// ===============================================================
-	@Override
-	public Any execute(final DeviceImpl device, final Any in_any) throws DevFailed {
-		Util.out2.println("GetAttNameFilterFormatClass.execute(): arrived");
-		final short argin = extract_DevShort(in_any);
-		if (!(device instanceof HdbExtractor)) {
-			Except.throw_exception("DEVICE_ERROR", "Device parameter is not instance of HdbExtractor", "HdbExtractor");
-		}
-
-		return insert(((HdbExtractor) device).get_att_name_filter_format(argin));
-	}
-
-	// ===============================================================
-	/**
-	 * Check if it is allowed to execute the command.
-	 */
-	// ===============================================================
-	@Override
-	public boolean is_allowed(final DeviceImpl device, final Any data_in) {
-		// End of Generated Code
-
-		// Re-Start of Generated Code
-		return true;
-	}
-}
-
-// -----------------------------------------------------------------------------
-/*
- * end of $Source:/cvsroot/tango-cs/tango/jserver/archiving/HdbExtractor/
- * GetAttNameFilterFormatClass.java,v $
- */
+//+======================================================================
+// $Source: /cvsroot/tango-cs/tango/jserver/archiving/HdbExtractor/GetAttNameFilterFormatClass.java,v $
+//
+// Project:      Tango Device Server
+//
+// Description:  Java source code for the command TemplateClass of the
+//               HdbExtractor class.
+//
+// $Author: chinkumo $
+//
+// $Revision: 1.3 $
+//
+// $Log: GetAttNameFilterFormatClass.java,v $
+// Revision 1.3  2005/11/29 16:17:38  chinkumo
+// Code reformated (pogo compatible)
+//
+// Revision 1.2  2005/11/15 13:45:52  chinkumo
+// ...
+//
+// Revision 1.1  2005/09/09 10:03:21  chinkumo
+// First commit !
+// (Dynamic attribut release)
+//
+//
+// copyleft :    European Synchrotron Radiation Facility
+//               BP 220, Grenoble 38043
+//               FRANCE
+//
+//-======================================================================
+//
+//  		This file is generated by POGO
+//	(Program Obviously used to Generate tango Object)
+//
+//         (c) - Software Engineering Group - ESRF
+//=============================================================================
+
+/**
+ * @author	$Author: chinkumo $
+ * @version	$Revision: 1.3 $
+ */
+package HdbExtractor;
+
+import org.omg.CORBA.Any;
+
+import fr.esrf.Tango.DevFailed;
+import fr.esrf.Tango.DispLevel;
+import fr.esrf.TangoDs.Command;
+import fr.esrf.TangoDs.DeviceImpl;
+import fr.esrf.TangoDs.Except;
+import fr.esrf.TangoDs.TangoConst;
+import fr.esrf.TangoDs.Util;
+
+/**
+ * Class Description: Gets the list of <I>HDB</I> registered attributes for the
+ * given format
+ */
+
+public class GetAttNameFilterFormatClass extends Command implements TangoConst {
+	// ===============================================================
+	/**
+	 * Constructor for Command class GetAttNameFilterFormatClass
+	 * 
+	 * @param name
+	 *            command name
+	 * @param in
+	 *            argin type
+	 * @param out
+	 *            argout type
+	 */
+	// ===============================================================
+	public GetAttNameFilterFormatClass(final String name, final int in, final int out) {
+		super(name, in, out);
+	}
+
+	// ===============================================================
+	/**
+	 * Constructor for Command class GetAttNameFilterFormatClass
+	 * 
+	 * @param name
+	 *            command name
+	 * @param in
+	 *            argin type
+	 * @param in_comments
+	 *            argin description
+	 * @param out
+	 *            argout type
+	 * @param out_comments
+	 *            argout description
+	 */
+	// ===============================================================
+	public GetAttNameFilterFormatClass(final String name, final int in, final int out, final String in_comments, final String out_comments) {
+		super(name, in, out, in_comments, out_comments);
+	}
+
+	// ===============================================================
+	/**
+	 * Constructor for Command class GetAttNameFilterFormatClass
+	 * 
+	 * @param name
+	 *            command name
+	 * @param in
+	 *            argin type
+	 * @param in_comments
+	 *            argin description
+	 * @param out
+	 *            argout type
+	 * @param out_comments
+	 *            argout description
+	 * @param level
+	 *            The command display type OPERATOR or EXPERT
+	 */
+	// ===============================================================
+	public GetAttNameFilterFormatClass(final String name, final int in, final int out, final String in_comments, final String out_comments, final DispLevel level) {
+		super(name, in, out, in_comments, out_comments, level);
+	}
+
+	// ===============================================================
+	/**
+	 * return the result of the device's command.
+	 */
+	// ===============================================================
+	@Override
+	public Any execute(final DeviceImpl device, final Any in_any) throws DevFailed {
+		Util.out2.println("GetAttNameFilterFormatClass.execute(): arrived");
+		final short argin = extract_DevShort(in_any);
+		if (!(device instanceof HdbExtractor)) {
+			Except.throw_exception("DEVICE_ERROR", "Device parameter is not instance of HdbExtractor", "HdbExtractor");
+		}
+
+		return insert(((HdbExtractor) device).get_att_name_filter_format(argin));
+	}
+
+	// ===============================================================
+	/**
+	 * Check if it is allowed to execute the command.
+	 */
+	// ===============================================================
+	@Override
+	public boolean is_allowed(final DeviceImpl device, final Any data_in) {
+		// End of Generated Code
+
+		// Re-Start of Generated Code
+		return true;
+	}
+}
+
+// -----------------------------------------------------------------------------
+/*
+ * end of $Source:/cvsroot/tango-cs/tango/jserver/archiving/HdbExtractor/
+ * GetAttNameFilterFormatClass.java,v $
+ */
diff --git a/src/main/java/HdbExtractor/GetAttNameFilterTypeClass.java b/hdbextractor/src/main/java/HdbExtractor/GetAttNameFilterTypeClass.java
similarity index 96%
rename from src/main/java/HdbExtractor/GetAttNameFilterTypeClass.java
rename to hdbextractor/src/main/java/HdbExtractor/GetAttNameFilterTypeClass.java
index 14de678b511337fe827856551efb0cfc72831b85..1550fca82e3e6fb442df5183843fd5f6158121a9 100644
--- a/src/main/java/HdbExtractor/GetAttNameFilterTypeClass.java
+++ b/hdbextractor/src/main/java/HdbExtractor/GetAttNameFilterTypeClass.java
@@ -1,153 +1,153 @@
-//+======================================================================
-// $Source: /cvsroot/tango-cs/tango/jserver/archiving/HdbExtractor/GetAttNameFilterTypeClass.java,v $
-//
-// Project:      Tango Device Server
-//
-// Description:  Java source code for the command TemplateClass of the
-//               HdbExtractor class.
-//
-// $Author: chinkumo $
-//
-// $Revision: 1.3 $
-//
-// $Log: GetAttNameFilterTypeClass.java,v $
-// Revision 1.3  2005/11/29 16:17:38  chinkumo
-// Code reformated (pogo compatible)
-//
-// Revision 1.2  2005/11/15 13:45:52  chinkumo
-// ...
-//
-// Revision 1.1  2005/09/09 10:03:21  chinkumo
-// First commit !
-// (Dynamic attribut release)
-//
-//
-// copyleft :    European Synchrotron Radiation Facility
-//               BP 220, Grenoble 38043
-//               FRANCE
-//
-//-======================================================================
-//
-//  		This file is generated by POGO
-//	(Program Obviously used to Generate tango Object)
-//
-//         (c) - Software Engineering Group - ESRF
-//=============================================================================
-
-/**
- * @author	$Author: chinkumo $
- * @version	$Revision: 1.3 $
- */
-package HdbExtractor;
-
-import org.omg.CORBA.Any;
-
-import fr.esrf.Tango.DevFailed;
-import fr.esrf.Tango.DispLevel;
-import fr.esrf.TangoDs.Command;
-import fr.esrf.TangoDs.DeviceImpl;
-import fr.esrf.TangoDs.Except;
-import fr.esrf.TangoDs.TangoConst;
-import fr.esrf.TangoDs.Util;
-
-/**
- * Class Description: Gets the list of <I>HDB</I> registered attributes for the
- * given type.
- */
-
-public class GetAttNameFilterTypeClass extends Command implements TangoConst {
-	// ===============================================================
-	/**
-	 * Constructor for Command class GetAttNameFilterTypeClass
-	 * 
-	 * @param name
-	 *            command name
-	 * @param in
-	 *            argin type
-	 * @param out
-	 *            argout type
-	 */
-	// ===============================================================
-	public GetAttNameFilterTypeClass(final String name, final int in, final int out) {
-		super(name, in, out);
-	}
-
-	// ===============================================================
-	/**
-	 * Constructor for Command class GetAttNameFilterTypeClass
-	 * 
-	 * @param name
-	 *            command name
-	 * @param in
-	 *            argin type
-	 * @param in_comments
-	 *            argin description
-	 * @param out
-	 *            argout type
-	 * @param out_comments
-	 *            argout description
-	 */
-	// ===============================================================
-	public GetAttNameFilterTypeClass(final String name, final int in, final int out, final String in_comments, final String out_comments) {
-		super(name, in, out, in_comments, out_comments);
-	}
-
-	// ===============================================================
-	/**
-	 * Constructor for Command class GetAttNameFilterTypeClass
-	 * 
-	 * @param name
-	 *            command name
-	 * @param in
-	 *            argin type
-	 * @param in_comments
-	 *            argin description
-	 * @param out
-	 *            argout type
-	 * @param out_comments
-	 *            argout description
-	 * @param level
-	 *            The command display type OPERATOR or EXPERT
-	 */
-	// ===============================================================
-	public GetAttNameFilterTypeClass(final String name, final int in, final int out, final String in_comments, final String out_comments, final DispLevel level) {
-		super(name, in, out, in_comments, out_comments, level);
-	}
-
-	// ===============================================================
-	/**
-	 * return the result of the device's command.
-	 */
-	// ===============================================================
-	@Override
-	public Any execute(final DeviceImpl device, final Any in_any) throws DevFailed {
-		Util.out2.println("GetAttNameFilterTypeClass.execute(): arrived");
-		final short argin = extract_DevShort(in_any);
-
-		if (!(device instanceof HdbExtractor)) {
-			Except.throw_exception("DEVICE_ERROR", "Device parameter is not instance of HdbExtractor", "HdbExtractor");
-		}
-
-		return insert(((HdbExtractor) device).get_att_name_filter_type(argin));
-	}
-
-	// ===============================================================
-	/**
-	 * Check if it is allowed to execute the command.
-	 */
-	// ===============================================================
-	@Override
-	public boolean is_allowed(final DeviceImpl device, final Any data_in) {
-		// End of Generated Code
-
-		// Re-Start of Generated Code
-		return true;
-	}
-}
-
-// -----------------------------------------------------------------------------
-/*
- * end of $Source:
- * /cvsroot/tango-cs/tango/jserver/archiving/HdbExtractor/GetAttNameFilterTypeClass
- * .java,v $
- */
+//+======================================================================
+// $Source: /cvsroot/tango-cs/tango/jserver/archiving/HdbExtractor/GetAttNameFilterTypeClass.java,v $
+//
+// Project:      Tango Device Server
+//
+// Description:  Java source code for the command TemplateClass of the
+//               HdbExtractor class.
+//
+// $Author: chinkumo $
+//
+// $Revision: 1.3 $
+//
+// $Log: GetAttNameFilterTypeClass.java,v $
+// Revision 1.3  2005/11/29 16:17:38  chinkumo
+// Code reformated (pogo compatible)
+//
+// Revision 1.2  2005/11/15 13:45:52  chinkumo
+// ...
+//
+// Revision 1.1  2005/09/09 10:03:21  chinkumo
+// First commit !
+// (Dynamic attribut release)
+//
+//
+// copyleft :    European Synchrotron Radiation Facility
+//               BP 220, Grenoble 38043
+//               FRANCE
+//
+//-======================================================================
+//
+//  		This file is generated by POGO
+//	(Program Obviously used to Generate tango Object)
+//
+//         (c) - Software Engineering Group - ESRF
+//=============================================================================
+
+/**
+ * @author	$Author: chinkumo $
+ * @version	$Revision: 1.3 $
+ */
+package HdbExtractor;
+
+import org.omg.CORBA.Any;
+
+import fr.esrf.Tango.DevFailed;
+import fr.esrf.Tango.DispLevel;
+import fr.esrf.TangoDs.Command;
+import fr.esrf.TangoDs.DeviceImpl;
+import fr.esrf.TangoDs.Except;
+import fr.esrf.TangoDs.TangoConst;
+import fr.esrf.TangoDs.Util;
+
+/**
+ * Class Description: Gets the list of <I>HDB</I> registered attributes for the
+ * given type.
+ */
+
+public class GetAttNameFilterTypeClass extends Command implements TangoConst {
+	// ===============================================================
+	/**
+	 * Constructor for Command class GetAttNameFilterTypeClass
+	 * 
+	 * @param name
+	 *            command name
+	 * @param in
+	 *            argin type
+	 * @param out
+	 *            argout type
+	 */
+	// ===============================================================
+	public GetAttNameFilterTypeClass(final String name, final int in, final int out) {
+		super(name, in, out);
+	}
+
+	// ===============================================================
+	/**
+	 * Constructor for Command class GetAttNameFilterTypeClass
+	 * 
+	 * @param name
+	 *            command name
+	 * @param in
+	 *            argin type
+	 * @param in_comments
+	 *            argin description
+	 * @param out
+	 *            argout type
+	 * @param out_comments
+	 *            argout description
+	 */
+	// ===============================================================
+	public GetAttNameFilterTypeClass(final String name, final int in, final int out, final String in_comments, final String out_comments) {
+		super(name, in, out, in_comments, out_comments);
+	}
+
+	// ===============================================================
+	/**
+	 * Constructor for Command class GetAttNameFilterTypeClass
+	 * 
+	 * @param name
+	 *            command name
+	 * @param in
+	 *            argin type
+	 * @param in_comments
+	 *            argin description
+	 * @param out
+	 *            argout type
+	 * @param out_comments
+	 *            argout description
+	 * @param level
+	 *            The command display type OPERATOR or EXPERT
+	 */
+	// ===============================================================
+	public GetAttNameFilterTypeClass(final String name, final int in, final int out, final String in_comments, final String out_comments, final DispLevel level) {
+		super(name, in, out, in_comments, out_comments, level);
+	}
+
+	// ===============================================================
+	/**
+	 * return the result of the device's command.
+	 */
+	// ===============================================================
+	@Override
+	public Any execute(final DeviceImpl device, final Any in_any) throws DevFailed {
+		Util.out2.println("GetAttNameFilterTypeClass.execute(): arrived");
+		final short argin = extract_DevShort(in_any);
+
+		if (!(device instanceof HdbExtractor)) {
+			Except.throw_exception("DEVICE_ERROR", "Device parameter is not instance of HdbExtractor", "HdbExtractor");
+		}
+
+		return insert(((HdbExtractor) device).get_att_name_filter_type(argin));
+	}
+
+	// ===============================================================
+	/**
+	 * Check if it is allowed to execute the command.
+	 */
+	// ===============================================================
+	@Override
+	public boolean is_allowed(final DeviceImpl device, final Any data_in) {
+		// End of Generated Code
+
+		// Re-Start of Generated Code
+		return true;
+	}
+}
+
+// -----------------------------------------------------------------------------
+/*
+ * end of $Source:
+ * /cvsroot/tango-cs/tango/jserver/archiving/HdbExtractor/GetAttNameFilterTypeClass
+ * .java,v $
+ */
diff --git a/src/main/java/HdbExtractor/GetAttPropertiesDataClass.java b/hdbextractor/src/main/java/HdbExtractor/GetAttPropertiesDataClass.java
similarity index 96%
rename from src/main/java/HdbExtractor/GetAttPropertiesDataClass.java
rename to hdbextractor/src/main/java/HdbExtractor/GetAttPropertiesDataClass.java
index 76fb8c6e96d4a02d388b8991abaa925d2c1b601a..18ee1371b1bac32499d20230b727ab3145327f49 100644
--- a/src/main/java/HdbExtractor/GetAttPropertiesDataClass.java
+++ b/hdbextractor/src/main/java/HdbExtractor/GetAttPropertiesDataClass.java
@@ -1,153 +1,153 @@
-//+======================================================================
-// $Source: /cvsroot/tango-cs/tango/jserver/archiving/HdbExtractor/GetAttPropertiesDataClass.java,v $
-//
-// Project:      Tango Device Server
-//
-// Description:  Java source code for the command TemplateClass of the
-//               HdbExtractor class.
-//
-// $Author: chinkumo $
-//
-// $Revision: 1.3 $
-//
-// $Log: GetAttPropertiesDataClass.java,v $
-// Revision 1.3  2005/11/29 16:17:38  chinkumo
-// Code reformated (pogo compatible)
-//
-// Revision 1.2  2005/11/15 13:45:52  chinkumo
-// ...
-//
-// Revision 1.1  2005/09/09 10:03:21  chinkumo
-// First commit !
-// (Dynamic attribut release)
-//
-//
-// copyleft :    European Synchrotron Radiation Facility
-//               BP 220, Grenoble 38043
-//               FRANCE
-//
-//-======================================================================
-//
-//  		This file is generated by POGO
-//	(Program Obviously used to Generate tango Object)
-//
-//         (c) - Software Engineering Group - ESRF
-//=============================================================================
-
-/**
- * @author	$Author: chinkumo $
- * @version	$Revision: 1.3 $
- */
-package HdbExtractor;
-
-import org.omg.CORBA.Any;
-
-import fr.esrf.Tango.DevFailed;
-import fr.esrf.Tango.DispLevel;
-import fr.esrf.TangoDs.Command;
-import fr.esrf.TangoDs.DeviceImpl;
-import fr.esrf.TangoDs.Except;
-import fr.esrf.TangoDs.TangoConst;
-import fr.esrf.TangoDs.Util;
-
-/**
- * Class Description: Gets the differents properties informations for the given
- * attribute
- */
-
-public class GetAttPropertiesDataClass extends Command implements TangoConst {
-	// ===============================================================
-	/**
-	 * Constructor for Command class GetAttPropertiesDataClass
-	 * 
-	 * @param name
-	 *            command name
-	 * @param in
-	 *            argin type
-	 * @param out
-	 *            argout type
-	 */
-	// ===============================================================
-	public GetAttPropertiesDataClass(final String name, final int in, final int out) {
-		super(name, in, out);
-	}
-
-	// ===============================================================
-	/**
-	 * Constructor for Command class GetAttPropertiesDataClass
-	 * 
-	 * @param name
-	 *            command name
-	 * @param in
-	 *            argin type
-	 * @param in_comments
-	 *            argin description
-	 * @param out
-	 *            argout type
-	 * @param out_comments
-	 *            argout description
-	 */
-	// ===============================================================
-	public GetAttPropertiesDataClass(final String name, final int in, final int out, final String in_comments, final String out_comments) {
-		super(name, in, out, in_comments, out_comments);
-	}
-
-	// ===============================================================
-	/**
-	 * Constructor for Command class GetAttPropertiesDataClass
-	 * 
-	 * @param name
-	 *            command name
-	 * @param in
-	 *            argin type
-	 * @param in_comments
-	 *            argin description
-	 * @param out
-	 *            argout type
-	 * @param out_comments
-	 *            argout description
-	 * @param level
-	 *            The command display type OPERATOR or EXPERT
-	 */
-	// ===============================================================
-	public GetAttPropertiesDataClass(final String name, final int in, final int out, final String in_comments, final String out_comments, final DispLevel level) {
-		super(name, in, out, in_comments, out_comments, level);
-	}
-
-	// ===============================================================
-	/**
-	 * return the result of the device's command.
-	 */
-	// ===============================================================
-	@Override
-	public Any execute(final DeviceImpl device, final Any in_any) throws DevFailed {
-		Util.out2.println("GetAttPropertiesDataClass.execute(): arrived");
-		final String argin = extract_DevString(in_any);
-
-		if (!(device instanceof HdbExtractor)) {
-			Except.throw_exception("DEVICE_ERROR", "Device parameter is not instance of HdbExtractor", "HdbExtractor");
-		}
-
-		return insert(((HdbExtractor) device).get_att_properties_data(argin));
-	}
-
-	// ===============================================================
-	/**
-	 * Check if it is allowed to execute the command.
-	 */
-	// ===============================================================
-	@Override
-	public boolean is_allowed(final DeviceImpl device, final Any data_in) {
-		// End of Generated Code
-
-		// Re-Start of Generated Code
-		return true;
-	}
-}
-
-// -----------------------------------------------------------------------------
-/*
- * end of $Source:
- * /cvsroot/tango-cs/tango/jserver/archiving/HdbExtractor/GetAttPropertiesDataClass
- * .java,v $
- */
+//+======================================================================
+// $Source: /cvsroot/tango-cs/tango/jserver/archiving/HdbExtractor/GetAttPropertiesDataClass.java,v $
+//
+// Project:      Tango Device Server
+//
+// Description:  Java source code for the command TemplateClass of the
+//               HdbExtractor class.
+//
+// $Author: chinkumo $
+//
+// $Revision: 1.3 $
+//
+// $Log: GetAttPropertiesDataClass.java,v $
+// Revision 1.3  2005/11/29 16:17:38  chinkumo
+// Code reformated (pogo compatible)
+//
+// Revision 1.2  2005/11/15 13:45:52  chinkumo
+// ...
+//
+// Revision 1.1  2005/09/09 10:03:21  chinkumo
+// First commit !
+// (Dynamic attribut release)
+//
+//
+// copyleft :    European Synchrotron Radiation Facility
+//               BP 220, Grenoble 38043
+//               FRANCE
+//
+//-======================================================================
+//
+//  		This file is generated by POGO
+//	(Program Obviously used to Generate tango Object)
+//
+//         (c) - Software Engineering Group - ESRF
+//=============================================================================
+
+/**
+ * @author	$Author: chinkumo $
+ * @version	$Revision: 1.3 $
+ */
+package HdbExtractor;
+
+import org.omg.CORBA.Any;
+
+import fr.esrf.Tango.DevFailed;
+import fr.esrf.Tango.DispLevel;
+import fr.esrf.TangoDs.Command;
+import fr.esrf.TangoDs.DeviceImpl;
+import fr.esrf.TangoDs.Except;
+import fr.esrf.TangoDs.TangoConst;
+import fr.esrf.TangoDs.Util;
+
+/**
+ * Class Description: Gets the differents properties informations for the given
+ * attribute
+ */
+
+public class GetAttPropertiesDataClass extends Command implements TangoConst {
+	// ===============================================================
+	/**
+	 * Constructor for Command class GetAttPropertiesDataClass
+	 * 
+	 * @param name
+	 *            command name
+	 * @param in
+	 *            argin type
+	 * @param out
+	 *            argout type
+	 */
+	// ===============================================================
+	public GetAttPropertiesDataClass(final String name, final int in, final int out) {
+		super(name, in, out);
+	}
+
+	// ===============================================================
+	/**
+	 * Constructor for Command class GetAttPropertiesDataClass
+	 * 
+	 * @param name
+	 *            command name
+	 * @param in
+	 *            argin type
+	 * @param in_comments
+	 *            argin description
+	 * @param out
+	 *            argout type
+	 * @param out_comments
+	 *            argout description
+	 */
+	// ===============================================================
+	public GetAttPropertiesDataClass(final String name, final int in, final int out, final String in_comments, final String out_comments) {
+		super(name, in, out, in_comments, out_comments);
+	}
+
+	// ===============================================================
+	/**
+	 * Constructor for Command class GetAttPropertiesDataClass
+	 * 
+	 * @param name
+	 *            command name
+	 * @param in
+	 *            argin type
+	 * @param in_comments
+	 *            argin description
+	 * @param out
+	 *            argout type
+	 * @param out_comments
+	 *            argout description
+	 * @param level
+	 *            The command display type OPERATOR or EXPERT
+	 */
+	// ===============================================================
+	public GetAttPropertiesDataClass(final String name, final int in, final int out, final String in_comments, final String out_comments, final DispLevel level) {
+		super(name, in, out, in_comments, out_comments, level);
+	}
+
+	// ===============================================================
+	/**
+	 * return the result of the device's command.
+	 */
+	// ===============================================================
+	@Override
+	public Any execute(final DeviceImpl device, final Any in_any) throws DevFailed {
+		Util.out2.println("GetAttPropertiesDataClass.execute(): arrived");
+		final String argin = extract_DevString(in_any);
+
+		if (!(device instanceof HdbExtractor)) {
+			Except.throw_exception("DEVICE_ERROR", "Device parameter is not instance of HdbExtractor", "HdbExtractor");
+		}
+
+		return insert(((HdbExtractor) device).get_att_properties_data(argin));
+	}
+
+	// ===============================================================
+	/**
+	 * Check if it is allowed to execute the command.
+	 */
+	// ===============================================================
+	@Override
+	public boolean is_allowed(final DeviceImpl device, final Any data_in) {
+		// End of Generated Code
+
+		// Re-Start of Generated Code
+		return true;
+	}
+}
+
+// -----------------------------------------------------------------------------
+/*
+ * end of $Source:
+ * /cvsroot/tango-cs/tango/jserver/archiving/HdbExtractor/GetAttPropertiesDataClass
+ * .java,v $
+ */
diff --git a/src/main/java/HdbExtractor/GetAttributesByDomainFamilyMembersCountClass.java b/hdbextractor/src/main/java/HdbExtractor/GetAttributesByDomainFamilyMembersCountClass.java
similarity index 96%
rename from src/main/java/HdbExtractor/GetAttributesByDomainFamilyMembersCountClass.java
rename to hdbextractor/src/main/java/HdbExtractor/GetAttributesByDomainFamilyMembersCountClass.java
index 89763a77f24ab8462408318a54edb2b96c585540..405b71b6bb63fd0cf28e66da4a7609c743e18588 100644
--- a/src/main/java/HdbExtractor/GetAttributesByDomainFamilyMembersCountClass.java
+++ b/hdbextractor/src/main/java/HdbExtractor/GetAttributesByDomainFamilyMembersCountClass.java
@@ -1,155 +1,155 @@
-//+======================================================================
-// $Source: /cvsroot/tango-cs/tango/jserver/archiving/HdbExtractor/GetAttributesByDomainFamilyMembersCountClass.java,v $
-//
-// Project:      Tango Device Server
-//
-// Description:  Java source code for the command TemplateClass of the
-//               HdbExtractor class.
-//
-// $Author: chinkumo $
-//
-// $Revision: 1.3 $
-//
-// $Log: GetAttributesByDomainFamilyMembersCountClass.java,v $
-// Revision 1.3  2005/11/29 16:17:38  chinkumo
-// Code reformated (pogo compatible)
-//
-// Revision 1.2  2005/11/15 13:45:52  chinkumo
-// ...
-//
-// Revision 1.1  2005/09/09 10:03:21  chinkumo
-// First commit !
-// (Dynamic attribut release)
-//
-//
-// copyleft :    European Synchrotron Radiation Facility
-//               BP 220, Grenoble 38043
-//               FRANCE
-//
-//-======================================================================
-//
-//  		This file is generated by POGO
-//	(Program Obviously used to Generate tango Object)
-//
-//         (c) - Software Engineering Group - ESRF
-//=============================================================================
-
-/**
- * @author	$Author: chinkumo $
- * @version	$Revision: 1.3 $
- */
-package HdbExtractor;
-
-import org.omg.CORBA.Any;
-
-import fr.esrf.Tango.DevFailed;
-import fr.esrf.Tango.DispLevel;
-import fr.esrf.TangoDs.Command;
-import fr.esrf.TangoDs.DeviceImpl;
-import fr.esrf.TangoDs.Except;
-import fr.esrf.TangoDs.TangoConst;
-import fr.esrf.TangoDs.Util;
-
-/**
- * Class Description: Returns the number of registered the attributes for a
- * given domain, family, member.
- */
-
-public class GetAttributesByDomainFamilyMembersCountClass extends Command implements TangoConst {
-	// ===============================================================
-	/**
-	 * Constructor for Command class
-	 * GetAttributesByDomainFamilyMembersCountClass
-	 * 
-	 * @param name
-	 *            command name
-	 * @param in
-	 *            argin type
-	 * @param out
-	 *            argout type
-	 */
-	// ===============================================================
-	public GetAttributesByDomainFamilyMembersCountClass(final String name, final int in, final int out) {
-		super(name, in, out);
-	}
-
-	// ===============================================================
-	/**
-	 * Constructor for Command class
-	 * GetAttributesByDomainFamilyMembersCountClass
-	 * 
-	 * @param name
-	 *            command name
-	 * @param in
-	 *            argin type
-	 * @param in_comments
-	 *            argin description
-	 * @param out
-	 *            argout type
-	 * @param out_comments
-	 *            argout description
-	 */
-	// ===============================================================
-	public GetAttributesByDomainFamilyMembersCountClass(final String name, final int in, final int out, final String in_comments, final String out_comments) {
-		super(name, in, out, in_comments, out_comments);
-	}
-
-	// ===============================================================
-	/**
-	 * Constructor for Command class
-	 * GetAttributesByDomainFamilyMembersCountClass
-	 * 
-	 * @param name
-	 *            command name
-	 * @param in
-	 *            argin type
-	 * @param in_comments
-	 *            argin description
-	 * @param out
-	 *            argout type
-	 * @param out_comments
-	 *            argout description
-	 * @param level
-	 *            The command display type OPERATOR or EXPERT
-	 */
-	// ===============================================================
-	public GetAttributesByDomainFamilyMembersCountClass(final String name, final int in, final int out, final String in_comments, final String out_comments, final DispLevel level) {
-		super(name, in, out, in_comments, out_comments, level);
-	}
-
-	// ===============================================================
-	/**
-	 * return the result of the device's command.
-	 */
-	// ===============================================================
-	@Override
-	public Any execute(final DeviceImpl device, final Any in_any) throws DevFailed {
-		Util.out2.println("GetAttributesByDomainFamilyMembersCountClass.execute(): arrived");
-		final String[] argin = extract_DevVarStringArray(in_any);
-
-		if (!(device instanceof HdbExtractor)) {
-			Except.throw_exception("DEVICE_ERROR", "Device parameter is not instance of HdbExtractor", "HdbExtractor");
-		}
-
-		return insert(((HdbExtractor) device).get_attributes_by_domain_family_members_count(argin));
-	}
-
-	// ===============================================================
-	/**
-	 * Check if it is allowed to execute the command.
-	 */
-	// ===============================================================
-	@Override
-	public boolean is_allowed(final DeviceImpl device, final Any data_in) {
-		// End of Generated Code
-
-		// Re-Start of Generated Code
-		return true;
-	}
-}
-
-// -----------------------------------------------------------------------------
-/*
- * end of $Source:/cvsroot/tango-cs/tango/jserver/archiving/HdbExtractor/
- * GetAttributesByDomainFamilyMembersCountClass.java,v $
- */
+//+======================================================================
+// $Source: /cvsroot/tango-cs/tango/jserver/archiving/HdbExtractor/GetAttributesByDomainFamilyMembersCountClass.java,v $
+//
+// Project:      Tango Device Server
+//
+// Description:  Java source code for the command TemplateClass of the
+//               HdbExtractor class.
+//
+// $Author: chinkumo $
+//
+// $Revision: 1.3 $
+//
+// $Log: GetAttributesByDomainFamilyMembersCountClass.java,v $
+// Revision 1.3  2005/11/29 16:17:38  chinkumo
+// Code reformated (pogo compatible)
+//
+// Revision 1.2  2005/11/15 13:45:52  chinkumo
+// ...
+//
+// Revision 1.1  2005/09/09 10:03:21  chinkumo
+// First commit !
+// (Dynamic attribut release)
+//
+//
+// copyleft :    European Synchrotron Radiation Facility
+//               BP 220, Grenoble 38043
+//               FRANCE
+//
+//-======================================================================
+//
+//  		This file is generated by POGO
+//	(Program Obviously used to Generate tango Object)
+//
+//         (c) - Software Engineering Group - ESRF
+//=============================================================================
+
+/**
+ * @author	$Author: chinkumo $
+ * @version	$Revision: 1.3 $
+ */
+package HdbExtractor;
+
+import org.omg.CORBA.Any;
+
+import fr.esrf.Tango.DevFailed;
+import fr.esrf.Tango.DispLevel;
+import fr.esrf.TangoDs.Command;
+import fr.esrf.TangoDs.DeviceImpl;
+import fr.esrf.TangoDs.Except;
+import fr.esrf.TangoDs.TangoConst;
+import fr.esrf.TangoDs.Util;
+
+/**
+ * Class Description: Returns the number of registered the attributes for a
+ * given domain, family, member.
+ */
+
+public class GetAttributesByDomainFamilyMembersCountClass extends Command implements TangoConst {
+	// ===============================================================
+	/**
+	 * Constructor for Command class
+	 * GetAttributesByDomainFamilyMembersCountClass
+	 * 
+	 * @param name
+	 *            command name
+	 * @param in
+	 *            argin type
+	 * @param out
+	 *            argout type
+	 */
+	// ===============================================================
+	public GetAttributesByDomainFamilyMembersCountClass(final String name, final int in, final int out) {
+		super(name, in, out);
+	}
+
+	// ===============================================================
+	/**
+	 * Constructor for Command class
+	 * GetAttributesByDomainFamilyMembersCountClass
+	 * 
+	 * @param name
+	 *            command name
+	 * @param in
+	 *            argin type
+	 * @param in_comments
+	 *            argin description
+	 * @param out
+	 *            argout type
+	 * @param out_comments
+	 *            argout description
+	 */
+	// ===============================================================
+	public GetAttributesByDomainFamilyMembersCountClass(final String name, final int in, final int out, final String in_comments, final String out_comments) {
+		super(name, in, out, in_comments, out_comments);
+	}
+
+	// ===============================================================
+	/**
+	 * Constructor for Command class
+	 * GetAttributesByDomainFamilyMembersCountClass
+	 * 
+	 * @param name
+	 *            command name
+	 * @param in
+	 *            argin type
+	 * @param in_comments
+	 *            argin description
+	 * @param out
+	 *            argout type
+	 * @param out_comments
+	 *            argout description
+	 * @param level
+	 *            The command display type OPERATOR or EXPERT
+	 */
+	// ===============================================================
+	public GetAttributesByDomainFamilyMembersCountClass(final String name, final int in, final int out, final String in_comments, final String out_comments, final DispLevel level) {
+		super(name, in, out, in_comments, out_comments, level);
+	}
+
+	// ===============================================================
+	/**
+	 * return the result of the device's command.
+	 */
+	// ===============================================================
+	@Override
+	public Any execute(final DeviceImpl device, final Any in_any) throws DevFailed {
+		Util.out2.println("GetAttributesByDomainFamilyMembersCountClass.execute(): arrived");
+		final String[] argin = extract_DevVarStringArray(in_any);
+
+		if (!(device instanceof HdbExtractor)) {
+			Except.throw_exception("DEVICE_ERROR", "Device parameter is not instance of HdbExtractor", "HdbExtractor");
+		}
+
+		return insert(((HdbExtractor) device).get_attributes_by_domain_family_members_count(argin));
+	}
+
+	// ===============================================================
+	/**
+	 * Check if it is allowed to execute the command.
+	 */
+	// ===============================================================
+	@Override
+	public boolean is_allowed(final DeviceImpl device, final Any data_in) {
+		// End of Generated Code
+
+		// Re-Start of Generated Code
+		return true;
+	}
+}
+
+// -----------------------------------------------------------------------------
+/*
+ * end of $Source:/cvsroot/tango-cs/tango/jserver/archiving/HdbExtractor/
+ * GetAttributesByDomainFamilyMembersCountClass.java,v $
+ */
diff --git a/src/main/java/HdbExtractor/GetConnectionStateClass.java b/hdbextractor/src/main/java/HdbExtractor/GetConnectionStateClass.java
similarity index 96%
rename from src/main/java/HdbExtractor/GetConnectionStateClass.java
rename to hdbextractor/src/main/java/HdbExtractor/GetConnectionStateClass.java
index de3aea39eafb53c9968f33d49a0d8bf6e91cec55..244c3ec1d55af5f16b1f5fe91eaa9437c37523ce 100644
--- a/src/main/java/HdbExtractor/GetConnectionStateClass.java
+++ b/hdbextractor/src/main/java/HdbExtractor/GetConnectionStateClass.java
@@ -1,152 +1,152 @@
-//+======================================================================
-// $Source: /cvsroot/tango-cs/tango/jserver/archiving/HdbExtractor/GetConnectionStateClass.java,v $
-//
-// Project:      Tango Device Server
-//
-// Description:  Java source code for the command TemplateClass of the
-//               HdbExtractor class.
-//
-// $Author: chinkumo $
-//
-// $Revision: 1.3 $
-//
-// $Log: GetConnectionStateClass.java,v $
-// Revision 1.3  2005/11/29 16:17:38  chinkumo
-// Code reformated (pogo compatible)
-//
-// Revision 1.2  2005/11/15 13:45:52  chinkumo
-// ...
-//
-// Revision 1.1  2005/09/09 10:03:21  chinkumo
-// First commit !
-// (Dynamic attribut release)
-//
-//
-// copyleft :    European Synchrotron Radiation Facility
-//               BP 220, Grenoble 38043
-//               FRANCE
-//
-//-======================================================================
-//
-//  		This file is generated by POGO
-//	(Program Obviously used to Generate tango Object)
-//
-//         (c) - Software Engineering Group - ESRF
-//=============================================================================
-
-/**
- * @author	$Author: chinkumo $
- * @version	$Revision: 1.3 $
- */
-package HdbExtractor;
-
-import org.omg.CORBA.Any;
-
-import fr.esrf.Tango.DevFailed;
-import fr.esrf.Tango.DispLevel;
-import fr.esrf.TangoDs.Command;
-import fr.esrf.TangoDs.DeviceImpl;
-import fr.esrf.TangoDs.Except;
-import fr.esrf.TangoDs.TangoConst;
-import fr.esrf.TangoDs.Util;
-
-/**
- * Class Description: Cheks if the connection to the historical database is
- * alive.
- */
-
-public class GetConnectionStateClass extends Command implements TangoConst {
-	// ===============================================================
-	/**
-	 * Constructor for Command class GetConnectionStateClass
-	 * 
-	 * @param name
-	 *            command name
-	 * @param in
-	 *            argin type
-	 * @param out
-	 *            argout type
-	 */
-	// ===============================================================
-	public GetConnectionStateClass(final String name, final int in, final int out) {
-		super(name, in, out);
-	}
-
-	// ===============================================================
-	/**
-	 * Constructor for Command class GetConnectionStateClass
-	 * 
-	 * @param name
-	 *            command name
-	 * @param in
-	 *            argin type
-	 * @param in_comments
-	 *            argin description
-	 * @param out
-	 *            argout type
-	 * @param out_comments
-	 *            argout description
-	 */
-	// ===============================================================
-	public GetConnectionStateClass(final String name, final int in, final int out, final String in_comments, final String out_comments) {
-		super(name, in, out, in_comments, out_comments);
-	}
-
-	// ===============================================================
-	/**
-	 * Constructor for Command class GetConnectionStateClass
-	 * 
-	 * @param name
-	 *            command name
-	 * @param in
-	 *            argin type
-	 * @param in_comments
-	 *            argin description
-	 * @param out
-	 *            argout type
-	 * @param out_comments
-	 *            argout description
-	 * @param level
-	 *            The command display type OPERATOR or EXPERT
-	 */
-	// ===============================================================
-	public GetConnectionStateClass(final String name, final int in, final int out, final String in_comments, final String out_comments, final DispLevel level) {
-		super(name, in, out, in_comments, out_comments, level);
-	}
-
-	// ===============================================================
-	/**
-	 * return the result of the device's command.
-	 */
-	// ===============================================================
-	@Override
-	public Any execute(final DeviceImpl device, final Any in_any) throws DevFailed {
-		Util.out2.println("GetConnectionStateClass.execute(): arrived");
-
-		if (!(device instanceof HdbExtractor)) {
-			Except.throw_exception("DEVICE_ERROR", "Device parameter is not instance of HdbExtractor", "HdbExtractor");
-		}
-
-		return insert(((HdbExtractor) device).get_connection_state());
-	}
-
-	// ===============================================================
-	/**
-	 * Check if it is allowed to execute the command.
-	 */
-	// ===============================================================
-	@Override
-	public boolean is_allowed(final DeviceImpl device, final Any data_in) {
-		// End of Generated Code
-
-		// Re-Start of Generated Code
-		return true;
-	}
-}
-
-// -----------------------------------------------------------------------------
-/*
- * end of $Source:
- * /cvsroot/tango-cs/tango/jserver/archiving/HdbExtractor/GetConnectionStateClass
- * .java,v $
- */
+//+======================================================================
+// $Source: /cvsroot/tango-cs/tango/jserver/archiving/HdbExtractor/GetConnectionStateClass.java,v $
+//
+// Project:      Tango Device Server
+//
+// Description:  Java source code for the command TemplateClass of the
+//               HdbExtractor class.
+//
+// $Author: chinkumo $
+//
+// $Revision: 1.3 $
+//
+// $Log: GetConnectionStateClass.java,v $
+// Revision 1.3  2005/11/29 16:17:38  chinkumo
+// Code reformated (pogo compatible)
+//
+// Revision 1.2  2005/11/15 13:45:52  chinkumo
+// ...
+//
+// Revision 1.1  2005/09/09 10:03:21  chinkumo
+// First commit !
+// (Dynamic attribut release)
+//
+//
+// copyleft :    European Synchrotron Radiation Facility
+//               BP 220, Grenoble 38043
+//               FRANCE
+//
+//-======================================================================
+//
+//  		This file is generated by POGO
+//	(Program Obviously used to Generate tango Object)
+//
+//         (c) - Software Engineering Group - ESRF
+//=============================================================================
+
+/**
+ * @author	$Author: chinkumo $
+ * @version	$Revision: 1.3 $
+ */
+package HdbExtractor;
+
+import org.omg.CORBA.Any;
+
+import fr.esrf.Tango.DevFailed;
+import fr.esrf.Tango.DispLevel;
+import fr.esrf.TangoDs.Command;
+import fr.esrf.TangoDs.DeviceImpl;
+import fr.esrf.TangoDs.Except;
+import fr.esrf.TangoDs.TangoConst;
+import fr.esrf.TangoDs.Util;
+
+/**
+ * Class Description: Cheks if the connection to the historical database is
+ * alive.
+ */
+
+public class GetConnectionStateClass extends Command implements TangoConst {
+	// ===============================================================
+	/**
+	 * Constructor for Command class GetConnectionStateClass
+	 * 
+	 * @param name
+	 *            command name
+	 * @param in
+	 *            argin type
+	 * @param out
+	 *            argout type
+	 */
+	// ===============================================================
+	public GetConnectionStateClass(final String name, final int in, final int out) {
+		super(name, in, out);
+	}
+
+	// ===============================================================
+	/**
+	 * Constructor for Command class GetConnectionStateClass
+	 * 
+	 * @param name
+	 *            command name
+	 * @param in
+	 *            argin type
+	 * @param in_comments
+	 *            argin description
+	 * @param out
+	 *            argout type
+	 * @param out_comments
+	 *            argout description
+	 */
+	// ===============================================================
+	public GetConnectionStateClass(final String name, final int in, final int out, final String in_comments, final String out_comments) {
+		super(name, in, out, in_comments, out_comments);
+	}
+
+	// ===============================================================
+	/**
+	 * Constructor for Command class GetConnectionStateClass
+	 * 
+	 * @param name
+	 *            command name
+	 * @param in
+	 *            argin type
+	 * @param in_comments
+	 *            argin description
+	 * @param out
+	 *            argout type
+	 * @param out_comments
+	 *            argout description
+	 * @param level
+	 *            The command display type OPERATOR or EXPERT
+	 */
+	// ===============================================================
+	public GetConnectionStateClass(final String name, final int in, final int out, final String in_comments, final String out_comments, final DispLevel level) {
+		super(name, in, out, in_comments, out_comments, level);
+	}
+
+	// ===============================================================
+	/**
+	 * return the result of the device's command.
+	 */
+	// ===============================================================
+	@Override
+	public Any execute(final DeviceImpl device, final Any in_any) throws DevFailed {
+		Util.out2.println("GetConnectionStateClass.execute(): arrived");
+
+		if (!(device instanceof HdbExtractor)) {
+			Except.throw_exception("DEVICE_ERROR", "Device parameter is not instance of HdbExtractor", "HdbExtractor");
+		}
+
+		return insert(((HdbExtractor) device).get_connection_state());
+	}
+
+	// ===============================================================
+	/**
+	 * Check if it is allowed to execute the command.
+	 */
+	// ===============================================================
+	@Override
+	public boolean is_allowed(final DeviceImpl device, final Any data_in) {
+		// End of Generated Code
+
+		// Re-Start of Generated Code
+		return true;
+	}
+}
+
+// -----------------------------------------------------------------------------
+/*
+ * end of $Source:
+ * /cvsroot/tango-cs/tango/jserver/archiving/HdbExtractor/GetConnectionStateClass
+ * .java,v $
+ */
diff --git a/src/main/java/HdbExtractor/GetCurrentArchivedAttClass.java b/hdbextractor/src/main/java/HdbExtractor/GetCurrentArchivedAttClass.java
similarity index 96%
rename from src/main/java/HdbExtractor/GetCurrentArchivedAttClass.java
rename to hdbextractor/src/main/java/HdbExtractor/GetCurrentArchivedAttClass.java
index 7d9639ae66176330586a579326e47871156bcc64..45bc2ca4755c4cbf90bf6b91a2ef25354f9d6482 100644
--- a/src/main/java/HdbExtractor/GetCurrentArchivedAttClass.java
+++ b/hdbextractor/src/main/java/HdbExtractor/GetCurrentArchivedAttClass.java
@@ -1,152 +1,152 @@
-//+======================================================================
-// $Source: /cvsroot/tango-cs/tango/jserver/archiving/HdbExtractor/GetCurrentArchivedAttClass.java,v $
-//
-// Project:      Tango Device Server
-//
-// Description:  Java source code for the command TemplateClass of the
-//               HdbExtractor class.
-//
-// $Author: chinkumo $
-//
-// $Revision: 1.3 $
-//
-// $Log: GetCurrentArchivedAttClass.java,v $
-// Revision 1.3  2005/11/29 16:17:38  chinkumo
-// Code reformated (pogo compatible)
-//
-// Revision 1.2  2005/11/15 13:45:52  chinkumo
-// ...
-//
-// Revision 1.1  2005/09/09 10:03:21  chinkumo
-// First commit !
-// (Dynamic attribut release)
-//
-//
-// copyleft :    European Synchrotron Radiation Facility
-//               BP 220, Grenoble 38043
-//               FRANCE
-//
-//-======================================================================
-//
-//  		This file is generated by POGO
-//	(Program Obviously used to Generate tango Object)
-//
-//         (c) - Software Engineering Group - ESRF
-//=============================================================================
-
-/**
- * @author	$Author: chinkumo $
- * @version	$Revision: 1.3 $
- */
-package HdbExtractor;
-
-import org.omg.CORBA.Any;
-
-import fr.esrf.Tango.DevFailed;
-import fr.esrf.Tango.DispLevel;
-import fr.esrf.TangoDs.Command;
-import fr.esrf.TangoDs.DeviceImpl;
-import fr.esrf.TangoDs.Except;
-import fr.esrf.TangoDs.TangoConst;
-import fr.esrf.TangoDs.Util;
-
-/**
- * Class Description: Gets the list of attributes that are being archived in
- * <I>HDB</I>
- */
-
-public class GetCurrentArchivedAttClass extends Command implements TangoConst {
-	// ===============================================================
-	/**
-	 * Constructor for Command class GetCurrentArchivedAttClass
-	 * 
-	 * @param name
-	 *            command name
-	 * @param in
-	 *            argin type
-	 * @param out
-	 *            argout type
-	 */
-	// ===============================================================
-	public GetCurrentArchivedAttClass(final String name, final int in, final int out) {
-		super(name, in, out);
-	}
-
-	// ===============================================================
-	/**
-	 * Constructor for Command class GetCurrentArchivedAttClass
-	 * 
-	 * @param name
-	 *            command name
-	 * @param in
-	 *            argin type
-	 * @param in_comments
-	 *            argin description
-	 * @param out
-	 *            argout type
-	 * @param out_comments
-	 *            argout description
-	 */
-	// ===============================================================
-	public GetCurrentArchivedAttClass(final String name, final int in, final int out, final String in_comments, final String out_comments) {
-		super(name, in, out, in_comments, out_comments);
-	}
-
-	// ===============================================================
-	/**
-	 * Constructor for Command class GetCurrentArchivedAttClass
-	 * 
-	 * @param name
-	 *            command name
-	 * @param in
-	 *            argin type
-	 * @param in_comments
-	 *            argin description
-	 * @param out
-	 *            argout type
-	 * @param out_comments
-	 *            argout description
-	 * @param level
-	 *            The command display type OPERATOR or EXPERT
-	 */
-	// ===============================================================
-	public GetCurrentArchivedAttClass(final String name, final int in, final int out, final String in_comments, final String out_comments, final DispLevel level) {
-		super(name, in, out, in_comments, out_comments, level);
-	}
-
-	// ===============================================================
-	/**
-	 * return the result of the device's command.
-	 */
-	// ===============================================================
-	@Override
-	public Any execute(final DeviceImpl device, final Any in_any) throws DevFailed {
-		Util.out2.println("GetCurrentArchivedAttClass.execute(): arrived");
-
-		if (!(device instanceof HdbExtractor)) {
-			Except.throw_exception("DEVICE_ERROR", "Device parameter is not instance of HdbExtractor", "HdbExtractor");
-		}
-
-		return insert(((HdbExtractor) device).get_current_archived_att());
-	}
-
-	// ===============================================================
-	/**
-	 * Check if it is allowed to execute the command.
-	 */
-	// ===============================================================
-	@Override
-	public boolean is_allowed(final DeviceImpl device, final Any data_in) {
-		// End of Generated Code
-
-		// Re-Start of Generated Code
-		return true;
-	}
-}
-
-// -----------------------------------------------------------------------------
-/*
- * end of $Source:
- * /cvsroot/tango-cs/tango/jserver/archiving/HdbExtractor/GetCurrentArchivedAttClass
- * .java,v $
- */
+//+======================================================================
+// $Source: /cvsroot/tango-cs/tango/jserver/archiving/HdbExtractor/GetCurrentArchivedAttClass.java,v $
+//
+// Project:      Tango Device Server
+//
+// Description:  Java source code for the command TemplateClass of the
+//               HdbExtractor class.
+//
+// $Author: chinkumo $
+//
+// $Revision: 1.3 $
+//
+// $Log: GetCurrentArchivedAttClass.java,v $
+// Revision 1.3  2005/11/29 16:17:38  chinkumo
+// Code reformated (pogo compatible)
+//
+// Revision 1.2  2005/11/15 13:45:52  chinkumo
+// ...
+//
+// Revision 1.1  2005/09/09 10:03:21  chinkumo
+// First commit !
+// (Dynamic attribut release)
+//
+//
+// copyleft :    European Synchrotron Radiation Facility
+//               BP 220, Grenoble 38043
+//               FRANCE
+//
+//-======================================================================
+//
+//  		This file is generated by POGO
+//	(Program Obviously used to Generate tango Object)
+//
+//         (c) - Software Engineering Group - ESRF
+//=============================================================================
+
+/**
+ * @author	$Author: chinkumo $
+ * @version	$Revision: 1.3 $
+ */
+package HdbExtractor;
+
+import org.omg.CORBA.Any;
+
+import fr.esrf.Tango.DevFailed;
+import fr.esrf.Tango.DispLevel;
+import fr.esrf.TangoDs.Command;
+import fr.esrf.TangoDs.DeviceImpl;
+import fr.esrf.TangoDs.Except;
+import fr.esrf.TangoDs.TangoConst;
+import fr.esrf.TangoDs.Util;
+
+/**
+ * Class Description: Gets the list of attributes that are being archived in
+ * <I>HDB</I>
+ */
+
+public class GetCurrentArchivedAttClass extends Command implements TangoConst {
+	// ===============================================================
+	/**
+	 * Constructor for Command class GetCurrentArchivedAttClass
+	 * 
+	 * @param name
+	 *            command name
+	 * @param in
+	 *            argin type
+	 * @param out
+	 *            argout type
+	 */
+	// ===============================================================
+	public GetCurrentArchivedAttClass(final String name, final int in, final int out) {
+		super(name, in, out);
+	}
+
+	// ===============================================================
+	/**
+	 * Constructor for Command class GetCurrentArchivedAttClass
+	 * 
+	 * @param name
+	 *            command name
+	 * @param in
+	 *            argin type
+	 * @param in_comments
+	 *            argin description
+	 * @param out
+	 *            argout type
+	 * @param out_comments
+	 *            argout description
+	 */
+	// ===============================================================
+	public GetCurrentArchivedAttClass(final String name, final int in, final int out, final String in_comments, final String out_comments) {
+		super(name, in, out, in_comments, out_comments);
+	}
+
+	// ===============================================================
+	/**
+	 * Constructor for Command class GetCurrentArchivedAttClass
+	 * 
+	 * @param name
+	 *            command name
+	 * @param in
+	 *            argin type
+	 * @param in_comments
+	 *            argin description
+	 * @param out
+	 *            argout type
+	 * @param out_comments
+	 *            argout description
+	 * @param level
+	 *            The command display type OPERATOR or EXPERT
+	 */
+	// ===============================================================
+	public GetCurrentArchivedAttClass(final String name, final int in, final int out, final String in_comments, final String out_comments, final DispLevel level) {
+		super(name, in, out, in_comments, out_comments, level);
+	}
+
+	// ===============================================================
+	/**
+	 * return the result of the device's command.
+	 */
+	// ===============================================================
+	@Override
+	public Any execute(final DeviceImpl device, final Any in_any) throws DevFailed {
+		Util.out2.println("GetCurrentArchivedAttClass.execute(): arrived");
+
+		if (!(device instanceof HdbExtractor)) {
+			Except.throw_exception("DEVICE_ERROR", "Device parameter is not instance of HdbExtractor", "HdbExtractor");
+		}
+
+		return insert(((HdbExtractor) device).get_current_archived_att());
+	}
+
+	// ===============================================================
+	/**
+	 * Check if it is allowed to execute the command.
+	 */
+	// ===============================================================
+	@Override
+	public boolean is_allowed(final DeviceImpl device, final Any data_in) {
+		// End of Generated Code
+
+		// Re-Start of Generated Code
+		return true;
+	}
+}
+
+// -----------------------------------------------------------------------------
+/*
+ * end of $Source:
+ * /cvsroot/tango-cs/tango/jserver/archiving/HdbExtractor/GetCurrentArchivedAttClass
+ * .java,v $
+ */
diff --git a/src/main/java/HdbExtractor/GetDomainsClass.java b/hdbextractor/src/main/java/HdbExtractor/GetDomainsClass.java
similarity index 96%
rename from src/main/java/HdbExtractor/GetDomainsClass.java
rename to hdbextractor/src/main/java/HdbExtractor/GetDomainsClass.java
index 13bd099ae89b9ba40188fea3673c604d058db51a..b813b7b014c69cfa864cb8b6fe55464be44a3f15 100644
--- a/src/main/java/HdbExtractor/GetDomainsClass.java
+++ b/hdbextractor/src/main/java/HdbExtractor/GetDomainsClass.java
@@ -1,150 +1,150 @@
-//+======================================================================
-// $Source: /cvsroot/tango-cs/tango/jserver/archiving/HdbExtractor/GetDomainsClass.java,v $
-//
-// Project:      Tango Device Server
-//
-// Description:  Java source code for the command TemplateClass of the
-//               HdbExtractor class.
-//
-// $Author: chinkumo $
-//
-// $Revision: 1.3 $
-//
-// $Log: GetDomainsClass.java,v $
-// Revision 1.3  2005/11/29 16:17:38  chinkumo
-// Code reformated (pogo compatible)
-//
-// Revision 1.2  2005/11/15 13:45:52  chinkumo
-// ...
-//
-// Revision 1.1  2005/09/09 10:03:21  chinkumo
-// First commit !
-// (Dynamic attribut release)
-//
-//
-// copyleft :    European Synchrotron Radiation Facility
-//               BP 220, Grenoble 38043
-//               FRANCE
-//
-//-======================================================================
-//
-//  		This file is generated by POGO
-//	(Program Obviously used to Generate tango Object)
-//
-//         (c) - Software Engineering Group - ESRF
-//=============================================================================
-
-/**
- * @author	$Author: chinkumo $
- * @version	$Revision: 1.3 $
- */
-package HdbExtractor;
-
-import org.omg.CORBA.Any;
-
-import fr.esrf.Tango.DevFailed;
-import fr.esrf.Tango.DispLevel;
-import fr.esrf.TangoDs.Command;
-import fr.esrf.TangoDs.DeviceImpl;
-import fr.esrf.TangoDs.Except;
-import fr.esrf.TangoDs.TangoConst;
-import fr.esrf.TangoDs.Util;
-
-/**
- * Class Description: Gets all the registered domains.
- */
-
-public class GetDomainsClass extends Command implements TangoConst {
-	// ===============================================================
-	/**
-	 * Constructor for Command class GetDomainsClass
-	 * 
-	 * @param name
-	 *            command name
-	 * @param in
-	 *            argin type
-	 * @param out
-	 *            argout type
-	 */
-	// ===============================================================
-	public GetDomainsClass(final String name, final int in, final int out) {
-		super(name, in, out);
-	}
-
-	// ===============================================================
-	/**
-	 * Constructor for Command class GetDomainsClass
-	 * 
-	 * @param name
-	 *            command name
-	 * @param in
-	 *            argin type
-	 * @param in_comments
-	 *            argin description
-	 * @param out
-	 *            argout type
-	 * @param out_comments
-	 *            argout description
-	 */
-	// ===============================================================
-	public GetDomainsClass(final String name, final int in, final int out, final String in_comments, final String out_comments) {
-		super(name, in, out, in_comments, out_comments);
-	}
-
-	// ===============================================================
-	/**
-	 * Constructor for Command class GetDomainsClass
-	 * 
-	 * @param name
-	 *            command name
-	 * @param in
-	 *            argin type
-	 * @param in_comments
-	 *            argin description
-	 * @param out
-	 *            argout type
-	 * @param out_comments
-	 *            argout description
-	 * @param level
-	 *            The command display type OPERATOR or EXPERT
-	 */
-	// ===============================================================
-	public GetDomainsClass(final String name, final int in, final int out, final String in_comments, final String out_comments, final DispLevel level) {
-		super(name, in, out, in_comments, out_comments, level);
-	}
-
-	// ===============================================================
-	/**
-	 * return the result of the device's command.
-	 */
-	// ===============================================================
-	@Override
-	public Any execute(final DeviceImpl device, final Any in_any) throws DevFailed {
-		Util.out2.println("GetDomainsClass.execute(): arrived");
-		if (!(device instanceof HdbExtractor)) {
-			Except.throw_exception("DEVICE_ERROR", "Device parameter is not instance of HdbExtractor", "HdbExtractor");
-		}
-
-		return insert(((HdbExtractor) device).get_domains());
-	}
-
-	// ===============================================================
-	/**
-	 * Check if it is allowed to execute the command.
-	 */
-	// ===============================================================
-	@Override
-	public boolean is_allowed(final DeviceImpl device, final Any data_in) {
-		// End of Generated Code
-
-		// Re-Start of Generated Code
-		return true;
-	}
-}
-
-// -----------------------------------------------------------------------------
-/*
- * end of $Source:
- * /cvsroot/tango-cs/tango/jserver/archiving/HdbExtractor/GetDomainsClass.java,v
- * $
- */
+//+======================================================================
+// $Source: /cvsroot/tango-cs/tango/jserver/archiving/HdbExtractor/GetDomainsClass.java,v $
+//
+// Project:      Tango Device Server
+//
+// Description:  Java source code for the command TemplateClass of the
+//               HdbExtractor class.
+//
+// $Author: chinkumo $
+//
+// $Revision: 1.3 $
+//
+// $Log: GetDomainsClass.java,v $
+// Revision 1.3  2005/11/29 16:17:38  chinkumo
+// Code reformated (pogo compatible)
+//
+// Revision 1.2  2005/11/15 13:45:52  chinkumo
+// ...
+//
+// Revision 1.1  2005/09/09 10:03:21  chinkumo
+// First commit !
+// (Dynamic attribut release)
+//
+//
+// copyleft :    European Synchrotron Radiation Facility
+//               BP 220, Grenoble 38043
+//               FRANCE
+//
+//-======================================================================
+//
+//  		This file is generated by POGO
+//	(Program Obviously used to Generate tango Object)
+//
+//         (c) - Software Engineering Group - ESRF
+//=============================================================================
+
+/**
+ * @author	$Author: chinkumo $
+ * @version	$Revision: 1.3 $
+ */
+package HdbExtractor;
+
+import org.omg.CORBA.Any;
+
+import fr.esrf.Tango.DevFailed;
+import fr.esrf.Tango.DispLevel;
+import fr.esrf.TangoDs.Command;
+import fr.esrf.TangoDs.DeviceImpl;
+import fr.esrf.TangoDs.Except;
+import fr.esrf.TangoDs.TangoConst;
+import fr.esrf.TangoDs.Util;
+
+/**
+ * Class Description: Gets all the registered domains.
+ */
+
+public class GetDomainsClass extends Command implements TangoConst {
+	// ===============================================================
+	/**
+	 * Constructor for Command class GetDomainsClass
+	 * 
+	 * @param name
+	 *            command name
+	 * @param in
+	 *            argin type
+	 * @param out
+	 *            argout type
+	 */
+	// ===============================================================
+	public GetDomainsClass(final String name, final int in, final int out) {
+		super(name, in, out);
+	}
+
+	// ===============================================================
+	/**
+	 * Constructor for Command class GetDomainsClass
+	 * 
+	 * @param name
+	 *            command name
+	 * @param in
+	 *            argin type
+	 * @param in_comments
+	 *            argin description
+	 * @param out
+	 *            argout type
+	 * @param out_comments
+	 *            argout description
+	 */
+	// ===============================================================
+	public GetDomainsClass(final String name, final int in, final int out, final String in_comments, final String out_comments) {
+		super(name, in, out, in_comments, out_comments);
+	}
+
+	// ===============================================================
+	/**
+	 * Constructor for Command class GetDomainsClass
+	 * 
+	 * @param name
+	 *            command name
+	 * @param in
+	 *            argin type
+	 * @param in_comments
+	 *            argin description
+	 * @param out
+	 *            argout type
+	 * @param out_comments
+	 *            argout description
+	 * @param level
+	 *            The command display type OPERATOR or EXPERT
+	 */
+	// ===============================================================
+	public GetDomainsClass(final String name, final int in, final int out, final String in_comments, final String out_comments, final DispLevel level) {
+		super(name, in, out, in_comments, out_comments, level);
+	}
+
+	// ===============================================================
+	/**
+	 * return the result of the device's command.
+	 */
+	// ===============================================================
+	@Override
+	public Any execute(final DeviceImpl device, final Any in_any) throws DevFailed {
+		Util.out2.println("GetDomainsClass.execute(): arrived");
+		if (!(device instanceof HdbExtractor)) {
+			Except.throw_exception("DEVICE_ERROR", "Device parameter is not instance of HdbExtractor", "HdbExtractor");
+		}
+
+		return insert(((HdbExtractor) device).get_domains());
+	}
+
+	// ===============================================================
+	/**
+	 * Check if it is allowed to execute the command.
+	 */
+	// ===============================================================
+	@Override
+	public boolean is_allowed(final DeviceImpl device, final Any data_in) {
+		// End of Generated Code
+
+		// Re-Start of Generated Code
+		return true;
+	}
+}
+
+// -----------------------------------------------------------------------------
+/*
+ * end of $Source:
+ * /cvsroot/tango-cs/tango/jserver/archiving/HdbExtractor/GetDomainsClass.java,v
+ * $
+ */
diff --git a/src/main/java/HdbExtractor/GetDomainsCountClass.java b/hdbextractor/src/main/java/HdbExtractor/GetDomainsCountClass.java
similarity index 96%
rename from src/main/java/HdbExtractor/GetDomainsCountClass.java
rename to hdbextractor/src/main/java/HdbExtractor/GetDomainsCountClass.java
index 5faaa5a4c1637fd3241d863153aa49a539ace456..60831d4be8344dfdfbf314bce3f8b7bb69e6046a 100644
--- a/src/main/java/HdbExtractor/GetDomainsCountClass.java
+++ b/hdbextractor/src/main/java/HdbExtractor/GetDomainsCountClass.java
@@ -1,150 +1,150 @@
-//+======================================================================
-// $Source: /cvsroot/tango-cs/tango/jserver/archiving/HdbExtractor/GetDomainsCountClass.java,v $
-//
-// Project:      Tango Device Server
-//
-// Description:  Java source code for the command TemplateClass of the
-//               HdbExtractor class.
-//
-// $Author: chinkumo $
-//
-// $Revision: 1.3 $
-//
-// $Log: GetDomainsCountClass.java,v $
-// Revision 1.3  2005/11/29 16:17:38  chinkumo
-// Code reformated (pogo compatible)
-//
-// Revision 1.2  2005/11/15 13:45:52  chinkumo
-// ...
-//
-// Revision 1.1  2005/09/09 10:03:21  chinkumo
-// First commit !
-// (Dynamic attribut release)
-//
-//
-// copyleft :    European Synchrotron Radiation Facility
-//               BP 220, Grenoble 38043
-//               FRANCE
-//
-//-======================================================================
-//
-//  		This file is generated by POGO
-//	(Program Obviously used to Generate tango Object)
-//
-//         (c) - Software Engineering Group - ESRF
-//=============================================================================
-
-/**
- * @author	$Author: chinkumo $
- * @version	$Revision: 1.3 $
- */
-package HdbExtractor;
-
-import org.omg.CORBA.Any;
-
-import fr.esrf.Tango.DevFailed;
-import fr.esrf.Tango.DispLevel;
-import fr.esrf.TangoDs.Command;
-import fr.esrf.TangoDs.DeviceImpl;
-import fr.esrf.TangoDs.Except;
-import fr.esrf.TangoDs.TangoConst;
-import fr.esrf.TangoDs.Util;
-
-/**
- * Class Description: Returns the number of distinct registered domains.
- */
-
-public class GetDomainsCountClass extends Command implements TangoConst {
-	// ===============================================================
-	/**
-	 * Constructor for Command class GetDomainsCountClass
-	 * 
-	 * @param name
-	 *            command name
-	 * @param in
-	 *            argin type
-	 * @param out
-	 *            argout type
-	 */
-	// ===============================================================
-	public GetDomainsCountClass(final String name, final int in, final int out) {
-		super(name, in, out);
-	}
-
-	// ===============================================================
-	/**
-	 * Constructor for Command class GetDomainsCountClass
-	 * 
-	 * @param name
-	 *            command name
-	 * @param in
-	 *            argin type
-	 * @param in_comments
-	 *            argin description
-	 * @param out
-	 *            argout type
-	 * @param out_comments
-	 *            argout description
-	 */
-	// ===============================================================
-	public GetDomainsCountClass(final String name, final int in, final int out, final String in_comments, final String out_comments) {
-		super(name, in, out, in_comments, out_comments);
-	}
-
-	// ===============================================================
-	/**
-	 * Constructor for Command class GetDomainsCountClass
-	 * 
-	 * @param name
-	 *            command name
-	 * @param in
-	 *            argin type
-	 * @param in_comments
-	 *            argin description
-	 * @param out
-	 *            argout type
-	 * @param out_comments
-	 *            argout description
-	 * @param level
-	 *            The command display type OPERATOR or EXPERT
-	 */
-	// ===============================================================
-	public GetDomainsCountClass(final String name, final int in, final int out, final String in_comments, final String out_comments, final DispLevel level) {
-		super(name, in, out, in_comments, out_comments, level);
-	}
-
-	// ===============================================================
-	/**
-	 * return the result of the device's command.
-	 */
-	// ===============================================================
-	@Override
-	public Any execute(final DeviceImpl device, final Any in_any) throws DevFailed {
-		Util.out2.println("GetDomainsCountClass.execute(): arrived");
-		if (!(device instanceof HdbExtractor)) {
-			Except.throw_exception("DEVICE_ERROR", "Device parameter is not instance of HdbExtractor", "HdbExtractor");
-		}
-
-		return insert(((HdbExtractor) device).get_domains_count());
-	}
-
-	// ===============================================================
-	/**
-	 * Check if it is allowed to execute the command.
-	 */
-	// ===============================================================
-	@Override
-	public boolean is_allowed(final DeviceImpl device, final Any data_in) {
-		// End of Generated Code
-
-		// Re-Start of Generated Code
-		return true;
-	}
-}
-
-// -----------------------------------------------------------------------------
-/*
- * end of $Source:
- * /cvsroot/tango-cs/tango/jserver/archiving/HdbExtractor/GetDomainsCountClass
- * .java,v $
- */
+//+======================================================================
+// $Source: /cvsroot/tango-cs/tango/jserver/archiving/HdbExtractor/GetDomainsCountClass.java,v $
+//
+// Project:      Tango Device Server
+//
+// Description:  Java source code for the command TemplateClass of the
+//               HdbExtractor class.
+//
+// $Author: chinkumo $
+//
+// $Revision: 1.3 $
+//
+// $Log: GetDomainsCountClass.java,v $
+// Revision 1.3  2005/11/29 16:17:38  chinkumo
+// Code reformated (pogo compatible)
+//
+// Revision 1.2  2005/11/15 13:45:52  chinkumo
+// ...
+//
+// Revision 1.1  2005/09/09 10:03:21  chinkumo
+// First commit !
+// (Dynamic attribut release)
+//
+//
+// copyleft :    European Synchrotron Radiation Facility
+//               BP 220, Grenoble 38043
+//               FRANCE
+//
+//-======================================================================
+//
+//  		This file is generated by POGO
+//	(Program Obviously used to Generate tango Object)
+//
+//         (c) - Software Engineering Group - ESRF
+//=============================================================================
+
+/**
+ * @author	$Author: chinkumo $
+ * @version	$Revision: 1.3 $
+ */
+package HdbExtractor;
+
+import org.omg.CORBA.Any;
+
+import fr.esrf.Tango.DevFailed;
+import fr.esrf.Tango.DispLevel;
+import fr.esrf.TangoDs.Command;
+import fr.esrf.TangoDs.DeviceImpl;
+import fr.esrf.TangoDs.Except;
+import fr.esrf.TangoDs.TangoConst;
+import fr.esrf.TangoDs.Util;
+
+/**
+ * Class Description: Returns the number of distinct registered domains.
+ */
+
+public class GetDomainsCountClass extends Command implements TangoConst {
+	// ===============================================================
+	/**
+	 * Constructor for Command class GetDomainsCountClass
+	 * 
+	 * @param name
+	 *            command name
+	 * @param in
+	 *            argin type
+	 * @param out
+	 *            argout type
+	 */
+	// ===============================================================
+	public GetDomainsCountClass(final String name, final int in, final int out) {
+		super(name, in, out);
+	}
+
+	// ===============================================================
+	/**
+	 * Constructor for Command class GetDomainsCountClass
+	 * 
+	 * @param name
+	 *            command name
+	 * @param in
+	 *            argin type
+	 * @param in_comments
+	 *            argin description
+	 * @param out
+	 *            argout type
+	 * @param out_comments
+	 *            argout description
+	 */
+	// ===============================================================
+	public GetDomainsCountClass(final String name, final int in, final int out, final String in_comments, final String out_comments) {
+		super(name, in, out, in_comments, out_comments);
+	}
+
+	// ===============================================================
+	/**
+	 * Constructor for Command class GetDomainsCountClass
+	 * 
+	 * @param name
+	 *            command name
+	 * @param in
+	 *            argin type
+	 * @param in_comments
+	 *            argin description
+	 * @param out
+	 *            argout type
+	 * @param out_comments
+	 *            argout description
+	 * @param level
+	 *            The command display type OPERATOR or EXPERT
+	 */
+	// ===============================================================
+	public GetDomainsCountClass(final String name, final int in, final int out, final String in_comments, final String out_comments, final DispLevel level) {
+		super(name, in, out, in_comments, out_comments, level);
+	}
+
+	// ===============================================================
+	/**
+	 * return the result of the device's command.
+	 */
+	// ===============================================================
+	@Override
+	public Any execute(final DeviceImpl device, final Any in_any) throws DevFailed {
+		Util.out2.println("GetDomainsCountClass.execute(): arrived");
+		if (!(device instanceof HdbExtractor)) {
+			Except.throw_exception("DEVICE_ERROR", "Device parameter is not instance of HdbExtractor", "HdbExtractor");
+		}
+
+		return insert(((HdbExtractor) device).get_domains_count());
+	}
+
+	// ===============================================================
+	/**
+	 * Check if it is allowed to execute the command.
+	 */
+	// ===============================================================
+	@Override
+	public boolean is_allowed(final DeviceImpl device, final Any data_in) {
+		// End of Generated Code
+
+		// Re-Start of Generated Code
+		return true;
+	}
+}
+
+// -----------------------------------------------------------------------------
+/*
+ * end of $Source:
+ * /cvsroot/tango-cs/tango/jserver/archiving/HdbExtractor/GetDomainsCountClass
+ * .java,v $
+ */
diff --git a/src/main/java/HdbExtractor/GetFamiliesByDomainClass.java b/hdbextractor/src/main/java/HdbExtractor/GetFamiliesByDomainClass.java
similarity index 96%
rename from src/main/java/HdbExtractor/GetFamiliesByDomainClass.java
rename to hdbextractor/src/main/java/HdbExtractor/GetFamiliesByDomainClass.java
index a8ca132e629ebcb374be7a21bafb881a992cb7f5..60854cd263f095f51feea8e164b6c3e2a771d55d 100644
--- a/src/main/java/HdbExtractor/GetFamiliesByDomainClass.java
+++ b/hdbextractor/src/main/java/HdbExtractor/GetFamiliesByDomainClass.java
@@ -1,152 +1,152 @@
-//+======================================================================
-// $Source: /cvsroot/tango-cs/tango/jserver/archiving/HdbExtractor/GetFamiliesByDomainClass.java,v $
-//
-// Project:      Tango Device Server
-//
-// Description:  Java source code for the command TemplateClass of the
-//               HdbExtractor class.
-//
-// $Author: chinkumo $
-//
-// $Revision: 1.3 $
-//
-// $Log: GetFamiliesByDomainClass.java,v $
-// Revision 1.3  2005/11/29 16:17:38  chinkumo
-// Code reformated (pogo compatible)
-//
-// Revision 1.2  2005/11/15 13:45:52  chinkumo
-// ...
-//
-// Revision 1.1  2005/09/09 10:03:21  chinkumo
-// First commit !
-// (Dynamic attribut release)
-//
-//
-// copyleft :    European Synchrotron Radiation Facility
-//               BP 220, Grenoble 38043
-//               FRANCE
-//
-//-======================================================================
-//
-//  		This file is generated by POGO
-//	(Program Obviously used to Generate tango Object)
-//
-//         (c) - Software Engineering Group - ESRF
-//=============================================================================
-
-/**
- * @author	$Author: chinkumo $
- * @version	$Revision: 1.3 $
- */
-package HdbExtractor;
-
-import org.omg.CORBA.Any;
-
-import fr.esrf.Tango.DevFailed;
-import fr.esrf.Tango.DispLevel;
-import fr.esrf.TangoDs.Command;
-import fr.esrf.TangoDs.DeviceImpl;
-import fr.esrf.TangoDs.Except;
-import fr.esrf.TangoDs.TangoConst;
-import fr.esrf.TangoDs.Util;
-
-/**
- * Class Description: Gets all the registered families for the given domain.
- */
-
-public class GetFamiliesByDomainClass extends Command implements TangoConst {
-	// ===============================================================
-	/**
-	 * Constructor for Command class GetFamiliesByDomainClass
-	 * 
-	 * @param name
-	 *            command name
-	 * @param in
-	 *            argin type
-	 * @param out
-	 *            argout type
-	 */
-	// ===============================================================
-	public GetFamiliesByDomainClass(final String name, final int in, final int out) {
-		super(name, in, out);
-	}
-
-	// ===============================================================
-	/**
-	 * Constructor for Command class GetFamiliesByDomainClass
-	 * 
-	 * @param name
-	 *            command name
-	 * @param in
-	 *            argin type
-	 * @param in_comments
-	 *            argin description
-	 * @param out
-	 *            argout type
-	 * @param out_comments
-	 *            argout description
-	 */
-	// ===============================================================
-	public GetFamiliesByDomainClass(final String name, final int in, final int out, final String in_comments, final String out_comments) {
-		super(name, in, out, in_comments, out_comments);
-	}
-
-	// ===============================================================
-	/**
-	 * Constructor for Command class GetFamiliesByDomainClass
-	 * 
-	 * @param name
-	 *            command name
-	 * @param in
-	 *            argin type
-	 * @param in_comments
-	 *            argin description
-	 * @param out
-	 *            argout type
-	 * @param out_comments
-	 *            argout description
-	 * @param level
-	 *            The command display type OPERATOR or EXPERT
-	 */
-	// ===============================================================
-	public GetFamiliesByDomainClass(final String name, final int in, final int out, final String in_comments, final String out_comments, final DispLevel level) {
-		super(name, in, out, in_comments, out_comments, level);
-	}
-
-	// ===============================================================
-	/**
-	 * return the result of the device's command.
-	 */
-	// ===============================================================
-	@Override
-	public Any execute(final DeviceImpl device, final Any in_any) throws DevFailed {
-		Util.out2.println("GetFamiliesByDomainClass.execute(): arrived");
-		final String argin = extract_DevString(in_any);
-
-		if (!(device instanceof HdbExtractor)) {
-			Except.throw_exception("DEVICE_ERROR", "Device parameter is not instance of HdbExtractor", "HdbExtractor");
-		}
-
-		return insert(((HdbExtractor) device).get_families_by_domain(argin));
-	}
-
-	// ===============================================================
-	/**
-	 * Check if it is allowed to execute the command.
-	 */
-	// ===============================================================
-	@Override
-	public boolean is_allowed(final DeviceImpl device, final Any data_in) {
-		// End of Generated Code
-
-		// Re-Start of Generated Code
-		return true;
-	}
-}
-
-// -----------------------------------------------------------------------------
-/*
- * end of $Source:
- * /cvsroot/tango-cs/tango/jserver/archiving/HdbExtractor/GetFamiliesByDomainClass
- * .java,v $
- */
+//+======================================================================
+// $Source: /cvsroot/tango-cs/tango/jserver/archiving/HdbExtractor/GetFamiliesByDomainClass.java,v $
+//
+// Project:      Tango Device Server
+//
+// Description:  Java source code for the command TemplateClass of the
+//               HdbExtractor class.
+//
+// $Author: chinkumo $
+//
+// $Revision: 1.3 $
+//
+// $Log: GetFamiliesByDomainClass.java,v $
+// Revision 1.3  2005/11/29 16:17:38  chinkumo
+// Code reformated (pogo compatible)
+//
+// Revision 1.2  2005/11/15 13:45:52  chinkumo
+// ...
+//
+// Revision 1.1  2005/09/09 10:03:21  chinkumo
+// First commit !
+// (Dynamic attribut release)
+//
+//
+// copyleft :    European Synchrotron Radiation Facility
+//               BP 220, Grenoble 38043
+//               FRANCE
+//
+//-======================================================================
+//
+//  		This file is generated by POGO
+//	(Program Obviously used to Generate tango Object)
+//
+//         (c) - Software Engineering Group - ESRF
+//=============================================================================
+
+/**
+ * @author	$Author: chinkumo $
+ * @version	$Revision: 1.3 $
+ */
+package HdbExtractor;
+
+import org.omg.CORBA.Any;
+
+import fr.esrf.Tango.DevFailed;
+import fr.esrf.Tango.DispLevel;
+import fr.esrf.TangoDs.Command;
+import fr.esrf.TangoDs.DeviceImpl;
+import fr.esrf.TangoDs.Except;
+import fr.esrf.TangoDs.TangoConst;
+import fr.esrf.TangoDs.Util;
+
+/**
+ * Class Description: Gets all the registered families for the given domain.
+ */
+
+public class GetFamiliesByDomainClass extends Command implements TangoConst {
+	// ===============================================================
+	/**
+	 * Constructor for Command class GetFamiliesByDomainClass
+	 * 
+	 * @param name
+	 *            command name
+	 * @param in
+	 *            argin type
+	 * @param out
+	 *            argout type
+	 */
+	// ===============================================================
+	public GetFamiliesByDomainClass(final String name, final int in, final int out) {
+		super(name, in, out);
+	}
+
+	// ===============================================================
+	/**
+	 * Constructor for Command class GetFamiliesByDomainClass
+	 * 
+	 * @param name
+	 *            command name
+	 * @param in
+	 *            argin type
+	 * @param in_comments
+	 *            argin description
+	 * @param out
+	 *            argout type
+	 * @param out_comments
+	 *            argout description
+	 */
+	// ===============================================================
+	public GetFamiliesByDomainClass(final String name, final int in, final int out, final String in_comments, final String out_comments) {
+		super(name, in, out, in_comments, out_comments);
+	}
+
+	// ===============================================================
+	/**
+	 * Constructor for Command class GetFamiliesByDomainClass
+	 * 
+	 * @param name
+	 *            command name
+	 * @param in
+	 *            argin type
+	 * @param in_comments
+	 *            argin description
+	 * @param out
+	 *            argout type
+	 * @param out_comments
+	 *            argout description
+	 * @param level
+	 *            The command display type OPERATOR or EXPERT
+	 */
+	// ===============================================================
+	public GetFamiliesByDomainClass(final String name, final int in, final int out, final String in_comments, final String out_comments, final DispLevel level) {
+		super(name, in, out, in_comments, out_comments, level);
+	}
+
+	// ===============================================================
+	/**
+	 * return the result of the device's command.
+	 */
+	// ===============================================================
+	@Override
+	public Any execute(final DeviceImpl device, final Any in_any) throws DevFailed {
+		Util.out2.println("GetFamiliesByDomainClass.execute(): arrived");
+		final String argin = extract_DevString(in_any);
+
+		if (!(device instanceof HdbExtractor)) {
+			Except.throw_exception("DEVICE_ERROR", "Device parameter is not instance of HdbExtractor", "HdbExtractor");
+		}
+
+		return insert(((HdbExtractor) device).get_families_by_domain(argin));
+	}
+
+	// ===============================================================
+	/**
+	 * Check if it is allowed to execute the command.
+	 */
+	// ===============================================================
+	@Override
+	public boolean is_allowed(final DeviceImpl device, final Any data_in) {
+		// End of Generated Code
+
+		// Re-Start of Generated Code
+		return true;
+	}
+}
+
+// -----------------------------------------------------------------------------
+/*
+ * end of $Source:
+ * /cvsroot/tango-cs/tango/jserver/archiving/HdbExtractor/GetFamiliesByDomainClass
+ * .java,v $
+ */
diff --git a/src/main/java/HdbExtractor/GetFamiliesByDomainCountClass.java b/hdbextractor/src/main/java/HdbExtractor/GetFamiliesByDomainCountClass.java
similarity index 96%
rename from src/main/java/HdbExtractor/GetFamiliesByDomainCountClass.java
rename to hdbextractor/src/main/java/HdbExtractor/GetFamiliesByDomainCountClass.java
index f70a53a631272eb49106555f3f5689c766939f7d..68c3859981feeaae9670dbff897636978bab518f 100644
--- a/src/main/java/HdbExtractor/GetFamiliesByDomainCountClass.java
+++ b/hdbextractor/src/main/java/HdbExtractor/GetFamiliesByDomainCountClass.java
@@ -1,152 +1,152 @@
-//+======================================================================
-// $Source: /cvsroot/tango-cs/tango/jserver/archiving/HdbExtractor/GetFamiliesByDomainCountClass.java,v $
-//
-// Project:      Tango Device Server
-//
-// Description:  Java source code for the command TemplateClass of the
-//               HdbExtractor class.
-//
-// $Author: chinkumo $
-//
-// $Revision: 1.3 $
-//
-// $Log: GetFamiliesByDomainCountClass.java,v $
-// Revision 1.3  2005/11/29 16:17:38  chinkumo
-// Code reformated (pogo compatible)
-//
-// Revision 1.2  2005/11/15 13:45:52  chinkumo
-// ...
-//
-// Revision 1.1  2005/09/09 10:03:21  chinkumo
-// First commit !
-// (Dynamic attribut release)
-//
-//
-// copyleft :    European Synchrotron Radiation Facility
-//               BP 220, Grenoble 38043
-//               FRANCE
-//
-//-======================================================================
-//
-//  		This file is generated by POGO
-//	(Program Obviously used to Generate tango Object)
-//
-//         (c) - Software Engineering Group - ESRF
-//=============================================================================
-
-/**
- * @author	$Author: chinkumo $
- * @version	$Revision: 1.3 $
- */
-package HdbExtractor;
-
-import org.omg.CORBA.Any;
-
-import fr.esrf.Tango.DevFailed;
-import fr.esrf.Tango.DispLevel;
-import fr.esrf.TangoDs.Command;
-import fr.esrf.TangoDs.DeviceImpl;
-import fr.esrf.TangoDs.Except;
-import fr.esrf.TangoDs.TangoConst;
-import fr.esrf.TangoDs.Util;
-
-/**
- * Class Description: Returns the number of distinct registered families for a
- * given domain.
- */
-
-public class GetFamiliesByDomainCountClass extends Command implements TangoConst {
-	// ===============================================================
-	/**
-	 * Constructor for Command class GetFamiliesByDomainCountClass
-	 * 
-	 * @param name
-	 *            command name
-	 * @param in
-	 *            argin type
-	 * @param out
-	 *            argout type
-	 */
-	// ===============================================================
-	public GetFamiliesByDomainCountClass(final String name, final int in, final int out) {
-		super(name, in, out);
-	}
-
-	// ===============================================================
-	/**
-	 * Constructor for Command class GetFamiliesByDomainCountClass
-	 * 
-	 * @param name
-	 *            command name
-	 * @param in
-	 *            argin type
-	 * @param in_comments
-	 *            argin description
-	 * @param out
-	 *            argout type
-	 * @param out_comments
-	 *            argout description
-	 */
-	// ===============================================================
-	public GetFamiliesByDomainCountClass(final String name, final int in, final int out, final String in_comments, final String out_comments) {
-		super(name, in, out, in_comments, out_comments);
-	}
-
-	// ===============================================================
-	/**
-	 * Constructor for Command class GetFamiliesByDomainCountClass
-	 * 
-	 * @param name
-	 *            command name
-	 * @param in
-	 *            argin type
-	 * @param in_comments
-	 *            argin description
-	 * @param out
-	 *            argout type
-	 * @param out_comments
-	 *            argout description
-	 * @param level
-	 *            The command display type OPERATOR or EXPERT
-	 */
-	// ===============================================================
-	public GetFamiliesByDomainCountClass(final String name, final int in, final int out, final String in_comments, final String out_comments, final DispLevel level) {
-		super(name, in, out, in_comments, out_comments, level);
-	}
-
-	// ===============================================================
-	/**
-	 * return the result of the device's command.
-	 */
-	// ===============================================================
-	@Override
-	public Any execute(final DeviceImpl device, final Any in_any) throws DevFailed {
-		Util.out2.println("GetFamiliesByDomainCountClass.execute(): arrived");
-		final String argin = extract_DevString(in_any);
-
-		if (!(device instanceof HdbExtractor)) {
-			Except.throw_exception("DEVICE_ERROR", "Device parameter is not instance of HdbExtractor", "HdbExtractor");
-		}
-
-		return insert(((HdbExtractor) device).get_families_by_domain_count(argin));
-	}
-
-	// ===============================================================
-	/**
-	 * Check if it is allowed to execute the command.
-	 */
-	// ===============================================================
-	@Override
-	public boolean is_allowed(final DeviceImpl device, final Any data_in) {
-		// End of Generated Code
-
-		// Re-Start of Generated Code
-		return true;
-	}
-}
-
-// -----------------------------------------------------------------------------
-/*
- * end of $Source:/cvsroot/tango-cs/tango/jserver/archiving/HdbExtractor/
- * GetFamiliesByDomainCountClass.java,v $
- */
+//+======================================================================
+// $Source: /cvsroot/tango-cs/tango/jserver/archiving/HdbExtractor/GetFamiliesByDomainCountClass.java,v $
+//
+// Project:      Tango Device Server
+//
+// Description:  Java source code for the command TemplateClass of the
+//               HdbExtractor class.
+//
+// $Author: chinkumo $
+//
+// $Revision: 1.3 $
+//
+// $Log: GetFamiliesByDomainCountClass.java,v $
+// Revision 1.3  2005/11/29 16:17:38  chinkumo
+// Code reformated (pogo compatible)
+//
+// Revision 1.2  2005/11/15 13:45:52  chinkumo
+// ...
+//
+// Revision 1.1  2005/09/09 10:03:21  chinkumo
+// First commit !
+// (Dynamic attribut release)
+//
+//
+// copyleft :    European Synchrotron Radiation Facility
+//               BP 220, Grenoble 38043
+//               FRANCE
+//
+//-======================================================================
+//
+//  		This file is generated by POGO
+//	(Program Obviously used to Generate tango Object)
+//
+//         (c) - Software Engineering Group - ESRF
+//=============================================================================
+
+/**
+ * @author	$Author: chinkumo $
+ * @version	$Revision: 1.3 $
+ */
+package HdbExtractor;
+
+import org.omg.CORBA.Any;
+
+import fr.esrf.Tango.DevFailed;
+import fr.esrf.Tango.DispLevel;
+import fr.esrf.TangoDs.Command;
+import fr.esrf.TangoDs.DeviceImpl;
+import fr.esrf.TangoDs.Except;
+import fr.esrf.TangoDs.TangoConst;
+import fr.esrf.TangoDs.Util;
+
+/**
+ * Class Description: Returns the number of distinct registered families for a
+ * given domain.
+ */
+
+public class GetFamiliesByDomainCountClass extends Command implements TangoConst {
+	// ===============================================================
+	/**
+	 * Constructor for Command class GetFamiliesByDomainCountClass
+	 * 
+	 * @param name
+	 *            command name
+	 * @param in
+	 *            argin type
+	 * @param out
+	 *            argout type
+	 */
+	// ===============================================================
+	public GetFamiliesByDomainCountClass(final String name, final int in, final int out) {
+		super(name, in, out);
+	}
+
+	// ===============================================================
+	/**
+	 * Constructor for Command class GetFamiliesByDomainCountClass
+	 * 
+	 * @param name
+	 *            command name
+	 * @param in
+	 *            argin type
+	 * @param in_comments
+	 *            argin description
+	 * @param out
+	 *            argout type
+	 * @param out_comments
+	 *            argout description
+	 */
+	// ===============================================================
+	public GetFamiliesByDomainCountClass(final String name, final int in, final int out, final String in_comments, final String out_comments) {
+		super(name, in, out, in_comments, out_comments);
+	}
+
+	// ===============================================================
+	/**
+	 * Constructor for Command class GetFamiliesByDomainCountClass
+	 * 
+	 * @param name
+	 *            command name
+	 * @param in
+	 *            argin type
+	 * @param in_comments
+	 *            argin description
+	 * @param out
+	 *            argout type
+	 * @param out_comments
+	 *            argout description
+	 * @param level
+	 *            The command display type OPERATOR or EXPERT
+	 */
+	// ===============================================================
+	public GetFamiliesByDomainCountClass(final String name, final int in, final int out, final String in_comments, final String out_comments, final DispLevel level) {
+		super(name, in, out, in_comments, out_comments, level);
+	}
+
+	// ===============================================================
+	/**
+	 * return the result of the device's command.
+	 */
+	// ===============================================================
+	@Override
+	public Any execute(final DeviceImpl device, final Any in_any) throws DevFailed {
+		Util.out2.println("GetFamiliesByDomainCountClass.execute(): arrived");
+		final String argin = extract_DevString(in_any);
+
+		if (!(device instanceof HdbExtractor)) {
+			Except.throw_exception("DEVICE_ERROR", "Device parameter is not instance of HdbExtractor", "HdbExtractor");
+		}
+
+		return insert(((HdbExtractor) device).get_families_by_domain_count(argin));
+	}
+
+	// ===============================================================
+	/**
+	 * Check if it is allowed to execute the command.
+	 */
+	// ===============================================================
+	@Override
+	public boolean is_allowed(final DeviceImpl device, final Any data_in) {
+		// End of Generated Code
+
+		// Re-Start of Generated Code
+		return true;
+	}
+}
+
+// -----------------------------------------------------------------------------
+/*
+ * end of $Source:/cvsroot/tango-cs/tango/jserver/archiving/HdbExtractor/
+ * GetFamiliesByDomainCountClass.java,v $
+ */
diff --git a/src/main/java/HdbExtractor/GetFamiliesClass.java b/hdbextractor/src/main/java/HdbExtractor/GetFamiliesClass.java
similarity index 96%
rename from src/main/java/HdbExtractor/GetFamiliesClass.java
rename to hdbextractor/src/main/java/HdbExtractor/GetFamiliesClass.java
index 33faad0492e65be7fcefdf2ad83d662ed6f2dee2..807ee79f493e86c913c06cb1fa32e3a2e08202d9 100644
--- a/src/main/java/HdbExtractor/GetFamiliesClass.java
+++ b/hdbextractor/src/main/java/HdbExtractor/GetFamiliesClass.java
@@ -1,150 +1,150 @@
-//+======================================================================
-// $Source: /cvsroot/tango-cs/tango/jserver/archiving/HdbExtractor/GetFamiliesClass.java,v $
-//
-// Project:      Tango Device Server
-//
-// Description:  Java source code for the command TemplateClass of the
-//               HdbExtractor class.
-//
-// $Author: chinkumo $
-//
-// $Revision: 1.3 $
-//
-// $Log: GetFamiliesClass.java,v $
-// Revision 1.3  2005/11/29 16:17:38  chinkumo
-// Code reformated (pogo compatible)
-//
-// Revision 1.2  2005/11/15 13:45:52  chinkumo
-// ...
-//
-// Revision 1.1  2005/09/09 10:03:21  chinkumo
-// First commit !
-// (Dynamic attribut release)
-//
-//
-// copyleft :    European Synchrotron Radiation Facility
-//               BP 220, Grenoble 38043
-//               FRANCE
-//
-//-======================================================================
-//
-//  		This file is generated by POGO
-//	(Program Obviously used to Generate tango Object)
-//
-//         (c) - Software Engineering Group - ESRF
-//=============================================================================
-
-/**
- * @author	$Author: chinkumo $
- * @version	$Revision: 1.3 $
- */
-package HdbExtractor;
-
-import org.omg.CORBA.Any;
-
-import fr.esrf.Tango.DevFailed;
-import fr.esrf.Tango.DispLevel;
-import fr.esrf.TangoDs.Command;
-import fr.esrf.TangoDs.DeviceImpl;
-import fr.esrf.TangoDs.Except;
-import fr.esrf.TangoDs.TangoConst;
-import fr.esrf.TangoDs.Util;
-
-/**
- * Class Description: Gets all the registered families
- */
-
-public class GetFamiliesClass extends Command implements TangoConst {
-	// ===============================================================
-	/**
-	 * Constructor for Command class GetFamiliesClass
-	 * 
-	 * @param name
-	 *            command name
-	 * @param in
-	 *            argin type
-	 * @param out
-	 *            argout type
-	 */
-	// ===============================================================
-	public GetFamiliesClass(final String name, final int in, final int out) {
-		super(name, in, out);
-	}
-
-	// ===============================================================
-	/**
-	 * Constructor for Command class GetFamiliesClass
-	 * 
-	 * @param name
-	 *            command name
-	 * @param in
-	 *            argin type
-	 * @param in_comments
-	 *            argin description
-	 * @param out
-	 *            argout type
-	 * @param out_comments
-	 *            argout description
-	 */
-	// ===============================================================
-	public GetFamiliesClass(final String name, final int in, final int out, final String in_comments, final String out_comments) {
-		super(name, in, out, in_comments, out_comments);
-	}
-
-	// ===============================================================
-	/**
-	 * Constructor for Command class GetFamiliesClass
-	 * 
-	 * @param name
-	 *            command name
-	 * @param in
-	 *            argin type
-	 * @param in_comments
-	 *            argin description
-	 * @param out
-	 *            argout type
-	 * @param out_comments
-	 *            argout description
-	 * @param level
-	 *            The command display type OPERATOR or EXPERT
-	 */
-	// ===============================================================
-	public GetFamiliesClass(final String name, final int in, final int out, final String in_comments, final String out_comments, final DispLevel level) {
-		super(name, in, out, in_comments, out_comments, level);
-	}
-
-	// ===============================================================
-	/**
-	 * return the result of the device's command.
-	 */
-	// ===============================================================
-	@Override
-	public Any execute(final DeviceImpl device, final Any in_any) throws DevFailed {
-		Util.out2.println("GetFamiliesClass.execute(): arrived");
-		if (!(device instanceof HdbExtractor)) {
-			Except.throw_exception("DEVICE_ERROR", "Device parameter is not instance of HdbExtractor", "HdbExtractor");
-		}
-
-		return insert(((HdbExtractor) device).get_families());
-	}
-
-	// ===============================================================
-	/**
-	 * Check if it is allowed to execute the command.
-	 */
-	// ===============================================================
-	@Override
-	public boolean is_allowed(final DeviceImpl device, final Any data_in) {
-		// End of Generated Code
-
-		// Re-Start of Generated Code
-		return true;
-	}
-}
-
-// -----------------------------------------------------------------------------
-/*
- * end of $Source:
- * /cvsroot/tango-cs/tango/jserver/archiving/HdbExtractor/GetFamiliesClass
- * .java,v $
- */
+//+======================================================================
+// $Source: /cvsroot/tango-cs/tango/jserver/archiving/HdbExtractor/GetFamiliesClass.java,v $
+//
+// Project:      Tango Device Server
+//
+// Description:  Java source code for the command TemplateClass of the
+//               HdbExtractor class.
+//
+// $Author: chinkumo $
+//
+// $Revision: 1.3 $
+//
+// $Log: GetFamiliesClass.java,v $
+// Revision 1.3  2005/11/29 16:17:38  chinkumo
+// Code reformated (pogo compatible)
+//
+// Revision 1.2  2005/11/15 13:45:52  chinkumo
+// ...
+//
+// Revision 1.1  2005/09/09 10:03:21  chinkumo
+// First commit !
+// (Dynamic attribut release)
+//
+//
+// copyleft :    European Synchrotron Radiation Facility
+//               BP 220, Grenoble 38043
+//               FRANCE
+//
+//-======================================================================
+//
+//  		This file is generated by POGO
+//	(Program Obviously used to Generate tango Object)
+//
+//         (c) - Software Engineering Group - ESRF
+//=============================================================================
+
+/**
+ * @author	$Author: chinkumo $
+ * @version	$Revision: 1.3 $
+ */
+package HdbExtractor;
+
+import org.omg.CORBA.Any;
+
+import fr.esrf.Tango.DevFailed;
+import fr.esrf.Tango.DispLevel;
+import fr.esrf.TangoDs.Command;
+import fr.esrf.TangoDs.DeviceImpl;
+import fr.esrf.TangoDs.Except;
+import fr.esrf.TangoDs.TangoConst;
+import fr.esrf.TangoDs.Util;
+
+/**
+ * Class Description: Gets all the registered families
+ */
+
+public class GetFamiliesClass extends Command implements TangoConst {
+	// ===============================================================
+	/**
+	 * Constructor for Command class GetFamiliesClass
+	 * 
+	 * @param name
+	 *            command name
+	 * @param in
+	 *            argin type
+	 * @param out
+	 *            argout type
+	 */
+	// ===============================================================
+	public GetFamiliesClass(final String name, final int in, final int out) {
+		super(name, in, out);
+	}
+
+	// ===============================================================
+	/**
+	 * Constructor for Command class GetFamiliesClass
+	 * 
+	 * @param name
+	 *            command name
+	 * @param in
+	 *            argin type
+	 * @param in_comments
+	 *            argin description
+	 * @param out
+	 *            argout type
+	 * @param out_comments
+	 *            argout description
+	 */
+	// ===============================================================
+	public GetFamiliesClass(final String name, final int in, final int out, final String in_comments, final String out_comments) {
+		super(name, in, out, in_comments, out_comments);
+	}
+
+	// ===============================================================
+	/**
+	 * Constructor for Command class GetFamiliesClass
+	 * 
+	 * @param name
+	 *            command name
+	 * @param in
+	 *            argin type
+	 * @param in_comments
+	 *            argin description
+	 * @param out
+	 *            argout type
+	 * @param out_comments
+	 *            argout description
+	 * @param level
+	 *            The command display type OPERATOR or EXPERT
+	 */
+	// ===============================================================
+	public GetFamiliesClass(final String name, final int in, final int out, final String in_comments, final String out_comments, final DispLevel level) {
+		super(name, in, out, in_comments, out_comments, level);
+	}
+
+	// ===============================================================
+	/**
+	 * return the result of the device's command.
+	 */
+	// ===============================================================
+	@Override
+	public Any execute(final DeviceImpl device, final Any in_any) throws DevFailed {
+		Util.out2.println("GetFamiliesClass.execute(): arrived");
+		if (!(device instanceof HdbExtractor)) {
+			Except.throw_exception("DEVICE_ERROR", "Device parameter is not instance of HdbExtractor", "HdbExtractor");
+		}
+
+		return insert(((HdbExtractor) device).get_families());
+	}
+
+	// ===============================================================
+	/**
+	 * Check if it is allowed to execute the command.
+	 */
+	// ===============================================================
+	@Override
+	public boolean is_allowed(final DeviceImpl device, final Any data_in) {
+		// End of Generated Code
+
+		// Re-Start of Generated Code
+		return true;
+	}
+}
+
+// -----------------------------------------------------------------------------
+/*
+ * end of $Source:
+ * /cvsroot/tango-cs/tango/jserver/archiving/HdbExtractor/GetFamiliesClass
+ * .java,v $
+ */
diff --git a/src/main/java/HdbExtractor/GetFamiliesCountClass.java b/hdbextractor/src/main/java/HdbExtractor/GetFamiliesCountClass.java
similarity index 96%
rename from src/main/java/HdbExtractor/GetFamiliesCountClass.java
rename to hdbextractor/src/main/java/HdbExtractor/GetFamiliesCountClass.java
index 0df3c7dcb36a389ed3046c145b6aa891a9045b61..f353e8786f3043e97fd7106ebed9cad87f2acfe1 100644
--- a/src/main/java/HdbExtractor/GetFamiliesCountClass.java
+++ b/hdbextractor/src/main/java/HdbExtractor/GetFamiliesCountClass.java
@@ -1,150 +1,150 @@
-//+======================================================================
-// $Source: /cvsroot/tango-cs/tango/jserver/archiving/HdbExtractor/GetFamiliesCountClass.java,v $
-//
-// Project:      Tango Device Server
-//
-// Description:  Java source code for the command TemplateClass of the
-//               HdbExtractor class.
-//
-// $Author: chinkumo $
-//
-// $Revision: 1.3 $
-//
-// $Log: GetFamiliesCountClass.java,v $
-// Revision 1.3  2005/11/29 16:17:38  chinkumo
-// Code reformated (pogo compatible)
-//
-// Revision 1.2  2005/11/15 13:45:52  chinkumo
-// ...
-//
-// Revision 1.1  2005/09/09 10:03:21  chinkumo
-// First commit !
-// (Dynamic attribut release)
-//
-//
-// copyleft :    European Synchrotron Radiation Facility
-//               BP 220, Grenoble 38043
-//               FRANCE
-//
-//-======================================================================
-//
-//  		This file is generated by POGO
-//	(Program Obviously used to Generate tango Object)
-//
-//         (c) - Software Engineering Group - ESRF
-//=============================================================================
-
-/**
- * @author	$Author: chinkumo $
- * @version	$Revision: 1.3 $
- */
-package HdbExtractor;
-
-import org.omg.CORBA.Any;
-
-import fr.esrf.Tango.DevFailed;
-import fr.esrf.Tango.DispLevel;
-import fr.esrf.TangoDs.Command;
-import fr.esrf.TangoDs.DeviceImpl;
-import fr.esrf.TangoDs.Except;
-import fr.esrf.TangoDs.TangoConst;
-import fr.esrf.TangoDs.Util;
-
-/**
- * Class Description: Returns the number of distinct registered families.
- */
-
-public class GetFamiliesCountClass extends Command implements TangoConst {
-	// ===============================================================
-	/**
-	 * Constructor for Command class GetFamiliesCountClass
-	 * 
-	 * @param name
-	 *            command name
-	 * @param in
-	 *            argin type
-	 * @param out
-	 *            argout type
-	 */
-	// ===============================================================
-	public GetFamiliesCountClass(final String name, final int in, final int out) {
-		super(name, in, out);
-	}
-
-	// ===============================================================
-	/**
-	 * Constructor for Command class GetFamiliesCountClass
-	 * 
-	 * @param name
-	 *            command name
-	 * @param in
-	 *            argin type
-	 * @param in_comments
-	 *            argin description
-	 * @param out
-	 *            argout type
-	 * @param out_comments
-	 *            argout description
-	 */
-	// ===============================================================
-	public GetFamiliesCountClass(final String name, final int in, final int out, final String in_comments, final String out_comments) {
-		super(name, in, out, in_comments, out_comments);
-	}
-
-	// ===============================================================
-	/**
-	 * Constructor for Command class GetFamiliesCountClass
-	 * 
-	 * @param name
-	 *            command name
-	 * @param in
-	 *            argin type
-	 * @param in_comments
-	 *            argin description
-	 * @param out
-	 *            argout type
-	 * @param out_comments
-	 *            argout description
-	 * @param level
-	 *            The command display type OPERATOR or EXPERT
-	 */
-	// ===============================================================
-	public GetFamiliesCountClass(final String name, final int in, final int out, final String in_comments, final String out_comments, final DispLevel level) {
-		super(name, in, out, in_comments, out_comments, level);
-	}
-
-	// ===============================================================
-	/**
-	 * return the result of the device's command.
-	 */
-	// ===============================================================
-	@Override
-	public Any execute(final DeviceImpl device, final Any in_any) throws DevFailed {
-		Util.out2.println("GetFamiliesCountClass.execute(): arrived");
-
-		if (!(device instanceof HdbExtractor)) {
-			Except.throw_exception("DEVICE_ERROR", "Device parameter is not instance of HdbExtractor", "HdbExtractor");
-		}
-		return insert(((HdbExtractor) device).get_families_count());
-	}
-
-	// ===============================================================
-	/**
-	 * Check if it is allowed to execute the command.
-	 */
-	// ===============================================================
-	@Override
-	public boolean is_allowed(final DeviceImpl device, final Any data_in) {
-		// End of Generated Code
-
-		// Re-Start of Generated Code
-		return true;
-	}
-}
-
-// -----------------------------------------------------------------------------
-/*
- * end of $Source:
- * /cvsroot/tango-cs/tango/jserver/archiving/HdbExtractor/GetFamiliesCountClass
- * .java,v $
- */
+//+======================================================================
+// $Source: /cvsroot/tango-cs/tango/jserver/archiving/HdbExtractor/GetFamiliesCountClass.java,v $
+//
+// Project:      Tango Device Server
+//
+// Description:  Java source code for the command TemplateClass of the
+//               HdbExtractor class.
+//
+// $Author: chinkumo $
+//
+// $Revision: 1.3 $
+//
+// $Log: GetFamiliesCountClass.java,v $
+// Revision 1.3  2005/11/29 16:17:38  chinkumo
+// Code reformated (pogo compatible)
+//
+// Revision 1.2  2005/11/15 13:45:52  chinkumo
+// ...
+//
+// Revision 1.1  2005/09/09 10:03:21  chinkumo
+// First commit !
+// (Dynamic attribut release)
+//
+//
+// copyleft :    European Synchrotron Radiation Facility
+//               BP 220, Grenoble 38043
+//               FRANCE
+//
+//-======================================================================
+//
+//  		This file is generated by POGO
+//	(Program Obviously used to Generate tango Object)
+//
+//         (c) - Software Engineering Group - ESRF
+//=============================================================================
+
+/**
+ * @author	$Author: chinkumo $
+ * @version	$Revision: 1.3 $
+ */
+package HdbExtractor;
+
+import org.omg.CORBA.Any;
+
+import fr.esrf.Tango.DevFailed;
+import fr.esrf.Tango.DispLevel;
+import fr.esrf.TangoDs.Command;
+import fr.esrf.TangoDs.DeviceImpl;
+import fr.esrf.TangoDs.Except;
+import fr.esrf.TangoDs.TangoConst;
+import fr.esrf.TangoDs.Util;
+
+/**
+ * Class Description: Returns the number of distinct registered families.
+ */
+
+public class GetFamiliesCountClass extends Command implements TangoConst {
+	// ===============================================================
+	/**
+	 * Constructor for Command class GetFamiliesCountClass
+	 * 
+	 * @param name
+	 *            command name
+	 * @param in
+	 *            argin type
+	 * @param out
+	 *            argout type
+	 */
+	// ===============================================================
+	public GetFamiliesCountClass(final String name, final int in, final int out) {
+		super(name, in, out);
+	}
+
+	// ===============================================================
+	/**
+	 * Constructor for Command class GetFamiliesCountClass
+	 * 
+	 * @param name
+	 *            command name
+	 * @param in
+	 *            argin type
+	 * @param in_comments
+	 *            argin description
+	 * @param out
+	 *            argout type
+	 * @param out_comments
+	 *            argout description
+	 */
+	// ===============================================================
+	public GetFamiliesCountClass(final String name, final int in, final int out, final String in_comments, final String out_comments) {
+		super(name, in, out, in_comments, out_comments);
+	}
+
+	// ===============================================================
+	/**
+	 * Constructor for Command class GetFamiliesCountClass
+	 * 
+	 * @param name
+	 *            command name
+	 * @param in
+	 *            argin type
+	 * @param in_comments
+	 *            argin description
+	 * @param out
+	 *            argout type
+	 * @param out_comments
+	 *            argout description
+	 * @param level
+	 *            The command display type OPERATOR or EXPERT
+	 */
+	// ===============================================================
+	public GetFamiliesCountClass(final String name, final int in, final int out, final String in_comments, final String out_comments, final DispLevel level) {
+		super(name, in, out, in_comments, out_comments, level);
+	}
+
+	// ===============================================================
+	/**
+	 * return the result of the device's command.
+	 */
+	// ===============================================================
+	@Override
+	public Any execute(final DeviceImpl device, final Any in_any) throws DevFailed {
+		Util.out2.println("GetFamiliesCountClass.execute(): arrived");
+
+		if (!(device instanceof HdbExtractor)) {
+			Except.throw_exception("DEVICE_ERROR", "Device parameter is not instance of HdbExtractor", "HdbExtractor");
+		}
+		return insert(((HdbExtractor) device).get_families_count());
+	}
+
+	// ===============================================================
+	/**
+	 * Check if it is allowed to execute the command.
+	 */
+	// ===============================================================
+	@Override
+	public boolean is_allowed(final DeviceImpl device, final Any data_in) {
+		// End of Generated Code
+
+		// Re-Start of Generated Code
+		return true;
+	}
+}
+
+// -----------------------------------------------------------------------------
+/*
+ * end of $Source:
+ * /cvsroot/tango-cs/tango/jserver/archiving/HdbExtractor/GetFamiliesCountClass
+ * .java,v $
+ */
diff --git a/src/main/java/HdbExtractor/GetHostClass.java b/hdbextractor/src/main/java/HdbExtractor/GetHostClass.java
similarity index 96%
rename from src/main/java/HdbExtractor/GetHostClass.java
rename to hdbextractor/src/main/java/HdbExtractor/GetHostClass.java
index eceec0236576d67279a05a3f2e362ab8b94d74c6..f1058952e0745975446ca3e7c6c6d398a9e53991 100644
--- a/src/main/java/HdbExtractor/GetHostClass.java
+++ b/hdbextractor/src/main/java/HdbExtractor/GetHostClass.java
@@ -1,151 +1,151 @@
-//+======================================================================
-// $Source: /cvsroot/tango-cs/tango/jserver/archiving/HdbExtractor/GetHostClass.java,v $
-//
-// Project:      Tango Device Server
-//
-// Description:  Java source code for the command TemplateClass of the
-//               HdbExtractor class.
-//
-// $Author: chinkumo $
-//
-// $Revision: 1.3 $
-//
-// $Log: GetHostClass.java,v $
-// Revision 1.3  2005/11/29 16:17:38  chinkumo
-// Code reformated (pogo compatible)
-//
-// Revision 1.2  2005/11/15 13:45:52  chinkumo
-// ...
-//
-// Revision 1.1  2005/09/09 10:03:21  chinkumo
-// First commit !
-// (Dynamic attribut release)
-//
-//
-// copyleft :    European Synchrotron Radiation Facility
-//               BP 220, Grenoble 38043
-//               FRANCE
-//
-//-======================================================================
-//
-//  		This file is generated by POGO
-//	(Program Obviously used to Generate tango Object)
-//
-//         (c) - Software Engineering Group - ESRF
-//=============================================================================
-
-/**
- * @author	$Author: chinkumo $
- * @version	$Revision: 1.3 $
- */
-package HdbExtractor;
-
-import org.omg.CORBA.Any;
-
-import fr.esrf.Tango.DevFailed;
-import fr.esrf.Tango.DispLevel;
-import fr.esrf.TangoDs.Command;
-import fr.esrf.TangoDs.DeviceImpl;
-import fr.esrf.TangoDs.Except;
-import fr.esrf.TangoDs.TangoConst;
-import fr.esrf.TangoDs.Util;
-
-/**
- * Class Description: Returns the connected database host identifier.
- */
-
-public class GetHostClass extends Command implements TangoConst {
-	// ===============================================================
-	/**
-	 * Constructor for Command class GetHostClass
-	 * 
-	 * @param name
-	 *            command name
-	 * @param in
-	 *            argin type
-	 * @param out
-	 *            argout type
-	 */
-	// ===============================================================
-	public GetHostClass(final String name, final int in, final int out) {
-		super(name, in, out);
-	}
-
-	// ===============================================================
-	/**
-	 * Constructor for Command class GetHostClass
-	 * 
-	 * @param name
-	 *            command name
-	 * @param in
-	 *            argin type
-	 * @param in_comments
-	 *            argin description
-	 * @param out
-	 *            argout type
-	 * @param out_comments
-	 *            argout description
-	 */
-	// ===============================================================
-	public GetHostClass(final String name, final int in, final int out, final String in_comments, final String out_comments) {
-		super(name, in, out, in_comments, out_comments);
-	}
-
-	// ===============================================================
-	/**
-	 * Constructor for Command class GetHostClass
-	 * 
-	 * @param name
-	 *            command name
-	 * @param in
-	 *            argin type
-	 * @param in_comments
-	 *            argin description
-	 * @param out
-	 *            argout type
-	 * @param out_comments
-	 *            argout description
-	 * @param level
-	 *            The command display type OPERATOR or EXPERT
-	 */
-	// ===============================================================
-	public GetHostClass(final String name, final int in, final int out, final String in_comments, final String out_comments, final DispLevel level) {
-		super(name, in, out, in_comments, out_comments, level);
-	}
-
-	// ===============================================================
-	/**
-	 * return the result of the device's command.
-	 */
-	// ===============================================================
-	@Override
-	public Any execute(final DeviceImpl device, final Any in_any) throws DevFailed {
-
-		Util.out2.println("GetHostClass.execute(): arrived");
-
-		if (!(device instanceof HdbExtractor)) {
-			Except.throw_exception("DEVICE_ERROR", "Device parameter is not instance of HdbExtractor", "HdbExtractor");
-		}
-
-		return insert(((HdbExtractor) device).get_host());
-	}
-
-	// ===============================================================
-	/**
-	 * Check if it is allowed to execute the command.
-	 */
-	// ===============================================================
-	@Override
-	public boolean is_allowed(final DeviceImpl device, final Any data_in) {
-		// End of Generated Code
-
-		// Re-Start of Generated Code
-		return true;
-	}
-}
-
-// -----------------------------------------------------------------------------
-/*
- * end of $Source:
- * /cvsroot/tango-cs/tango/jserver/archiving/HdbExtractor/GetHostClass.java,v $
- */
+//+======================================================================
+// $Source: /cvsroot/tango-cs/tango/jserver/archiving/HdbExtractor/GetHostClass.java,v $
+//
+// Project:      Tango Device Server
+//
+// Description:  Java source code for the command TemplateClass of the
+//               HdbExtractor class.
+//
+// $Author: chinkumo $
+//
+// $Revision: 1.3 $
+//
+// $Log: GetHostClass.java,v $
+// Revision 1.3  2005/11/29 16:17:38  chinkumo
+// Code reformated (pogo compatible)
+//
+// Revision 1.2  2005/11/15 13:45:52  chinkumo
+// ...
+//
+// Revision 1.1  2005/09/09 10:03:21  chinkumo
+// First commit !
+// (Dynamic attribut release)
+//
+//
+// copyleft :    European Synchrotron Radiation Facility
+//               BP 220, Grenoble 38043
+//               FRANCE
+//
+//-======================================================================
+//
+//  		This file is generated by POGO
+//	(Program Obviously used to Generate tango Object)
+//
+//         (c) - Software Engineering Group - ESRF
+//=============================================================================
+
+/**
+ * @author	$Author: chinkumo $
+ * @version	$Revision: 1.3 $
+ */
+package HdbExtractor;
+
+import org.omg.CORBA.Any;
+
+import fr.esrf.Tango.DevFailed;
+import fr.esrf.Tango.DispLevel;
+import fr.esrf.TangoDs.Command;
+import fr.esrf.TangoDs.DeviceImpl;
+import fr.esrf.TangoDs.Except;
+import fr.esrf.TangoDs.TangoConst;
+import fr.esrf.TangoDs.Util;
+
+/**
+ * Class Description: Returns the connected database host identifier.
+ */
+
+public class GetHostClass extends Command implements TangoConst {
+	// ===============================================================
+	/**
+	 * Constructor for Command class GetHostClass
+	 * 
+	 * @param name
+	 *            command name
+	 * @param in
+	 *            argin type
+	 * @param out
+	 *            argout type
+	 */
+	// ===============================================================
+	public GetHostClass(final String name, final int in, final int out) {
+		super(name, in, out);
+	}
+
+	// ===============================================================
+	/**
+	 * Constructor for Command class GetHostClass
+	 * 
+	 * @param name
+	 *            command name
+	 * @param in
+	 *            argin type
+	 * @param in_comments
+	 *            argin description
+	 * @param out
+	 *            argout type
+	 * @param out_comments
+	 *            argout description
+	 */
+	// ===============================================================
+	public GetHostClass(final String name, final int in, final int out, final String in_comments, final String out_comments) {
+		super(name, in, out, in_comments, out_comments);
+	}
+
+	// ===============================================================
+	/**
+	 * Constructor for Command class GetHostClass
+	 * 
+	 * @param name
+	 *            command name
+	 * @param in
+	 *            argin type
+	 * @param in_comments
+	 *            argin description
+	 * @param out
+	 *            argout type
+	 * @param out_comments
+	 *            argout description
+	 * @param level
+	 *            The command display type OPERATOR or EXPERT
+	 */
+	// ===============================================================
+	public GetHostClass(final String name, final int in, final int out, final String in_comments, final String out_comments, final DispLevel level) {
+		super(name, in, out, in_comments, out_comments, level);
+	}
+
+	// ===============================================================
+	/**
+	 * return the result of the device's command.
+	 */
+	// ===============================================================
+	@Override
+	public Any execute(final DeviceImpl device, final Any in_any) throws DevFailed {
+
+		Util.out2.println("GetHostClass.execute(): arrived");
+
+		if (!(device instanceof HdbExtractor)) {
+			Except.throw_exception("DEVICE_ERROR", "Device parameter is not instance of HdbExtractor", "HdbExtractor");
+		}
+
+		return insert(((HdbExtractor) device).get_host());
+	}
+
+	// ===============================================================
+	/**
+	 * Check if it is allowed to execute the command.
+	 */
+	// ===============================================================
+	@Override
+	public boolean is_allowed(final DeviceImpl device, final Any data_in) {
+		// End of Generated Code
+
+		// Re-Start of Generated Code
+		return true;
+	}
+}
+
+// -----------------------------------------------------------------------------
+/*
+ * end of $Source:
+ * /cvsroot/tango-cs/tango/jserver/archiving/HdbExtractor/GetHostClass.java,v $
+ */
diff --git a/src/main/java/HdbExtractor/GetInfoClass.java b/hdbextractor/src/main/java/HdbExtractor/GetInfoClass.java
similarity index 96%
rename from src/main/java/HdbExtractor/GetInfoClass.java
rename to hdbextractor/src/main/java/HdbExtractor/GetInfoClass.java
index 6630394f3c1ae1b8580f9472ef6abdacf9bd33a4..911eb804ad599ce7b6484bd1c9f6551c03b5a6c8 100644
--- a/src/main/java/HdbExtractor/GetInfoClass.java
+++ b/hdbextractor/src/main/java/HdbExtractor/GetInfoClass.java
@@ -1,151 +1,151 @@
-//+======================================================================
-// $Source: /cvsroot/tango-cs/tango/jserver/archiving/HdbExtractor/GetInfoClass.java,v $
-//
-// Project:      Tango Device Server
-//
-// Description:  Java source code for the command TemplateClass of the
-//               HdbExtractor class.
-//
-// $Author: chinkumo $
-//
-// $Revision: 1.3 $
-//
-// $Log: GetInfoClass.java,v $
-// Revision 1.3  2005/11/29 16:17:38  chinkumo
-// Code reformated (pogo compatible)
-//
-// Revision 1.2  2005/11/15 13:45:52  chinkumo
-// ...
-//
-// Revision 1.1  2005/09/09 10:03:21  chinkumo
-// First commit !
-// (Dynamic attribut release)
-//
-//
-// copyleft :    European Synchrotron Radiation Facility
-//               BP 220, Grenoble 38043
-//               FRANCE
-//
-//-======================================================================
-//
-//  		This file is generated by POGO
-//	(Program Obviously used to Generate tango Object)
-//
-//         (c) - Software Engineering Group - ESRF
-//=============================================================================
-
-/**
- * @author	$Author: chinkumo $
- * @version	$Revision: 1.3 $
- */
-package HdbExtractor;
-
-import org.omg.CORBA.Any;
-
-import fr.esrf.Tango.DevFailed;
-import fr.esrf.Tango.DispLevel;
-import fr.esrf.TangoDs.Command;
-import fr.esrf.TangoDs.DeviceImpl;
-import fr.esrf.TangoDs.Except;
-import fr.esrf.TangoDs.TangoConst;
-import fr.esrf.TangoDs.Util;
-
-/**
- * Class Description: Returns misc informations about the database and a set of
- * parameters characterizing the connection.
- */
-
-public class GetInfoClass extends Command implements TangoConst {
-	// ===============================================================
-	/**
-	 * Constructor for Command class GetInfoClass
-	 * 
-	 * @param name
-	 *            command name
-	 * @param in
-	 *            argin type
-	 * @param out
-	 *            argout type
-	 */
-	// ===============================================================
-	public GetInfoClass(final String name, final int in, final int out) {
-		super(name, in, out);
-	}
-
-	// ===============================================================
-	/**
-	 * Constructor for Command class GetInfoClass
-	 * 
-	 * @param name
-	 *            command name
-	 * @param in
-	 *            argin type
-	 * @param in_comments
-	 *            argin description
-	 * @param out
-	 *            argout type
-	 * @param out_comments
-	 *            argout description
-	 */
-	// ===============================================================
-	public GetInfoClass(final String name, final int in, final int out, final String in_comments, final String out_comments) {
-		super(name, in, out, in_comments, out_comments);
-	}
-
-	// ===============================================================
-	/**
-	 * Constructor for Command class GetInfoClass
-	 * 
-	 * @param name
-	 *            command name
-	 * @param in
-	 *            argin type
-	 * @param in_comments
-	 *            argin description
-	 * @param out
-	 *            argout type
-	 * @param out_comments
-	 *            argout description
-	 * @param level
-	 *            The command display type OPERATOR or EXPERT
-	 */
-	// ===============================================================
-	public GetInfoClass(final String name, final int in, final int out, final String in_comments, final String out_comments, final DispLevel level) {
-		super(name, in, out, in_comments, out_comments, level);
-	}
-
-	// ===============================================================
-	/**
-	 * return the result of the device's command.
-	 */
-	// ===============================================================
-	@Override
-	public Any execute(final DeviceImpl device, final Any in_any) throws DevFailed {
-		Util.out2.println("GetInfoClass.execute(): arrived");
-
-		if (!(device instanceof HdbExtractor)) {
-			Except.throw_exception("DEVICE_ERROR", "Device parameter is not instance of HdbExtractor", "HdbExtractor");
-		}
-
-		return insert(((HdbExtractor) device).get_info());
-	}
-
-	// ===============================================================
-	/**
-	 * Check if it is allowed to execute the command.
-	 */
-	// ===============================================================
-	@Override
-	public boolean is_allowed(final DeviceImpl device, final Any data_in) {
-		// End of Generated Code
-
-		// Re-Start of Generated Code
-		return true;
-	}
-}
-
-// -----------------------------------------------------------------------------
-/*
- * end of $Source:
- * /cvsroot/tango-cs/tango/jserver/archiving/HdbExtractor/GetInfoClass.java,v $
- */
+//+======================================================================
+// $Source: /cvsroot/tango-cs/tango/jserver/archiving/HdbExtractor/GetInfoClass.java,v $
+//
+// Project:      Tango Device Server
+//
+// Description:  Java source code for the command TemplateClass of the
+//               HdbExtractor class.
+//
+// $Author: chinkumo $
+//
+// $Revision: 1.3 $
+//
+// $Log: GetInfoClass.java,v $
+// Revision 1.3  2005/11/29 16:17:38  chinkumo
+// Code reformated (pogo compatible)
+//
+// Revision 1.2  2005/11/15 13:45:52  chinkumo
+// ...
+//
+// Revision 1.1  2005/09/09 10:03:21  chinkumo
+// First commit !
+// (Dynamic attribut release)
+//
+//
+// copyleft :    European Synchrotron Radiation Facility
+//               BP 220, Grenoble 38043
+//               FRANCE
+//
+//-======================================================================
+//
+//  		This file is generated by POGO
+//	(Program Obviously used to Generate tango Object)
+//
+//         (c) - Software Engineering Group - ESRF
+//=============================================================================
+
+/**
+ * @author	$Author: chinkumo $
+ * @version	$Revision: 1.3 $
+ */
+package HdbExtractor;
+
+import org.omg.CORBA.Any;
+
+import fr.esrf.Tango.DevFailed;
+import fr.esrf.Tango.DispLevel;
+import fr.esrf.TangoDs.Command;
+import fr.esrf.TangoDs.DeviceImpl;
+import fr.esrf.TangoDs.Except;
+import fr.esrf.TangoDs.TangoConst;
+import fr.esrf.TangoDs.Util;
+
+/**
+ * Class Description: Returns misc informations about the database and a set of
+ * parameters characterizing the connection.
+ */
+
+public class GetInfoClass extends Command implements TangoConst {
+	// ===============================================================
+	/**
+	 * Constructor for Command class GetInfoClass
+	 * 
+	 * @param name
+	 *            command name
+	 * @param in
+	 *            argin type
+	 * @param out
+	 *            argout type
+	 */
+	// ===============================================================
+	public GetInfoClass(final String name, final int in, final int out) {
+		super(name, in, out);
+	}
+
+	// ===============================================================
+	/**
+	 * Constructor for Command class GetInfoClass
+	 * 
+	 * @param name
+	 *            command name
+	 * @param in
+	 *            argin type
+	 * @param in_comments
+	 *            argin description
+	 * @param out
+	 *            argout type
+	 * @param out_comments
+	 *            argout description
+	 */
+	// ===============================================================
+	public GetInfoClass(final String name, final int in, final int out, final String in_comments, final String out_comments) {
+		super(name, in, out, in_comments, out_comments);
+	}
+
+	// ===============================================================
+	/**
+	 * Constructor for Command class GetInfoClass
+	 * 
+	 * @param name
+	 *            command name
+	 * @param in
+	 *            argin type
+	 * @param in_comments
+	 *            argin description
+	 * @param out
+	 *            argout type
+	 * @param out_comments
+	 *            argout description
+	 * @param level
+	 *            The command display type OPERATOR or EXPERT
+	 */
+	// ===============================================================
+	public GetInfoClass(final String name, final int in, final int out, final String in_comments, final String out_comments, final DispLevel level) {
+		super(name, in, out, in_comments, out_comments, level);
+	}
+
+	// ===============================================================
+	/**
+	 * return the result of the device's command.
+	 */
+	// ===============================================================
+	@Override
+	public Any execute(final DeviceImpl device, final Any in_any) throws DevFailed {
+		Util.out2.println("GetInfoClass.execute(): arrived");
+
+		if (!(device instanceof HdbExtractor)) {
+			Except.throw_exception("DEVICE_ERROR", "Device parameter is not instance of HdbExtractor", "HdbExtractor");
+		}
+
+		return insert(((HdbExtractor) device).get_info());
+	}
+
+	// ===============================================================
+	/**
+	 * Check if it is allowed to execute the command.
+	 */
+	// ===============================================================
+	@Override
+	public boolean is_allowed(final DeviceImpl device, final Any data_in) {
+		// End of Generated Code
+
+		// Re-Start of Generated Code
+		return true;
+	}
+}
+
+// -----------------------------------------------------------------------------
+/*
+ * end of $Source:
+ * /cvsroot/tango-cs/tango/jserver/archiving/HdbExtractor/GetInfoClass.java,v $
+ */
diff --git a/src/main/java/HdbExtractor/GetMaxTimeClass.java b/hdbextractor/src/main/java/HdbExtractor/GetMaxTimeClass.java
similarity index 96%
rename from src/main/java/HdbExtractor/GetMaxTimeClass.java
rename to hdbextractor/src/main/java/HdbExtractor/GetMaxTimeClass.java
index 57d32ef4cb8fb034c508e2f84ba72d8da5c2aaf8..741be4c0e441e61d54f8061867d1e6d0e12048e5 100644
--- a/src/main/java/HdbExtractor/GetMaxTimeClass.java
+++ b/hdbextractor/src/main/java/HdbExtractor/GetMaxTimeClass.java
@@ -1,109 +1,109 @@
-/**
- * @author  $Author: ounsy $
- * @version $Revision: 1.1 $
- */
-package HdbExtractor;
-
-import org.omg.CORBA.Any;
-
-import fr.esrf.Tango.DevFailed;
-import fr.esrf.Tango.DispLevel;
-import fr.esrf.TangoDs.Command;
-import fr.esrf.TangoDs.DeviceImpl;
-import fr.esrf.TangoDs.Except;
-import fr.esrf.TangoDs.TangoConst;
-import fr.esrf.TangoDs.Util;
-
-/**
- * Class Description: Returns "true" if the attribute of given name is currently
- * archived, "false" otherwise.
- */
-
-public class GetMaxTimeClass extends Command implements TangoConst {
-	// ===============================================================
-	/**
-	 * Constructor for Command class IsArchivedClass
-	 * 
-	 * @param name
-	 *            command name
-	 * @param in
-	 *            argin type
-	 * @param out
-	 *            argout type
-	 */
-	// ===============================================================
-	public GetMaxTimeClass(final String name, final int in, final int out) {
-		super(name, in, out);
-	}
-
-	// ===============================================================
-	/**
-	 * Constructor for Command class IsArchivedClass
-	 * 
-	 * @param name
-	 *            command name
-	 * @param in
-	 *            argin type
-	 * @param in_comments
-	 *            argin description
-	 * @param out
-	 *            argout type
-	 * @param out_comments
-	 *            argout description
-	 */
-	// ===============================================================
-	public GetMaxTimeClass(final String name, final int in, final int out, final String in_comments, final String out_comments) {
-		super(name, in, out, in_comments, out_comments);
-	}
-
-	// ===============================================================
-	/**
-	 * Constructor for Command class IsArchivedClass
-	 * 
-	 * @param name
-	 *            command name
-	 * @param in
-	 *            argin type
-	 * @param in_comments
-	 *            argin description
-	 * @param out
-	 *            argout type
-	 * @param out_comments
-	 *            argout description
-	 * @param level
-	 *            The command display type OPERATOR or EXPERT
-	 */
-	// ===============================================================
-	public GetMaxTimeClass(final String name, final int in, final int out, final String in_comments, final String out_comments, final DispLevel level) {
-		super(name, in, out, in_comments, out_comments, level);
-	}
-
-	// ===============================================================
-	/**
-	 * return the result of the device's command.
-	 */
-	// ===============================================================
-	@Override
-	public Any execute(final DeviceImpl device, final Any in_any) throws DevFailed {
-		Util.out2.println("GetMaxTimeClass.execute(): arrived");
-		final String argin = extract_DevString(in_any);
-
-		if (!(device instanceof HdbExtractor)) {
-			Except.throw_exception("DEVICE_ERROR", "Device parameter is not instance of HdbExtractor", "HdbExtractor");
-		}
-		return insert(((HdbExtractor) device).get_max_time(argin));
-	}
-
-	// ===============================================================
-	/**
-	 * Check if it is allowed to execute the command.
-	 */
-	// ===============================================================
-	@Override
-	public boolean is_allowed(final DeviceImpl device, final Any data_in) {
-		// End of Generated Code
-
-		// Re-Start of Generated Code
-		return true;
-	}
-}
+/**
+ * @author  $Author: ounsy $
+ * @version $Revision: 1.1 $
+ */
+package HdbExtractor;
+
+import org.omg.CORBA.Any;
+
+import fr.esrf.Tango.DevFailed;
+import fr.esrf.Tango.DispLevel;
+import fr.esrf.TangoDs.Command;
+import fr.esrf.TangoDs.DeviceImpl;
+import fr.esrf.TangoDs.Except;
+import fr.esrf.TangoDs.TangoConst;
+import fr.esrf.TangoDs.Util;
+
+/**
+ * Class Description: Returns "true" if the attribute of given name is currently
+ * archived, "false" otherwise.
+ */
+
+public class GetMaxTimeClass extends Command implements TangoConst {
+	// ===============================================================
+	/**
+	 * Constructor for Command class IsArchivedClass
+	 * 
+	 * @param name
+	 *            command name
+	 * @param in
+	 *            argin type
+	 * @param out
+	 *            argout type
+	 */
+	// ===============================================================
+	public GetMaxTimeClass(final String name, final int in, final int out) {
+		super(name, in, out);
+	}
+
+	// ===============================================================
+	/**
+	 * Constructor for Command class IsArchivedClass
+	 * 
+	 * @param name
+	 *            command name
+	 * @param in
+	 *            argin type
+	 * @param in_comments
+	 *            argin description
+	 * @param out
+	 *            argout type
+	 * @param out_comments
+	 *            argout description
+	 */
+	// ===============================================================
+	public GetMaxTimeClass(final String name, final int in, final int out, final String in_comments, final String out_comments) {
+		super(name, in, out, in_comments, out_comments);
+	}
+
+	// ===============================================================
+	/**
+	 * Constructor for Command class IsArchivedClass
+	 * 
+	 * @param name
+	 *            command name
+	 * @param in
+	 *            argin type
+	 * @param in_comments
+	 *            argin description
+	 * @param out
+	 *            argout type
+	 * @param out_comments
+	 *            argout description
+	 * @param level
+	 *            The command display type OPERATOR or EXPERT
+	 */
+	// ===============================================================
+	public GetMaxTimeClass(final String name, final int in, final int out, final String in_comments, final String out_comments, final DispLevel level) {
+		super(name, in, out, in_comments, out_comments, level);
+	}
+
+	// ===============================================================
+	/**
+	 * return the result of the device's command.
+	 */
+	// ===============================================================
+	@Override
+	public Any execute(final DeviceImpl device, final Any in_any) throws DevFailed {
+		Util.out2.println("GetMaxTimeClass.execute(): arrived");
+		final String argin = extract_DevString(in_any);
+
+		if (!(device instanceof HdbExtractor)) {
+			Except.throw_exception("DEVICE_ERROR", "Device parameter is not instance of HdbExtractor", "HdbExtractor");
+		}
+		return insert(((HdbExtractor) device).get_max_time(argin));
+	}
+
+	// ===============================================================
+	/**
+	 * Check if it is allowed to execute the command.
+	 */
+	// ===============================================================
+	@Override
+	public boolean is_allowed(final DeviceImpl device, final Any data_in) {
+		// End of Generated Code
+
+		// Re-Start of Generated Code
+		return true;
+	}
+}
diff --git a/src/main/java/HdbExtractor/GetMembersByDomainFamilyClass.java b/hdbextractor/src/main/java/HdbExtractor/GetMembersByDomainFamilyClass.java
similarity index 96%
rename from src/main/java/HdbExtractor/GetMembersByDomainFamilyClass.java
rename to hdbextractor/src/main/java/HdbExtractor/GetMembersByDomainFamilyClass.java
index 3167126c722d3f81ffe02319c86822446844e21a..67bb356e77811c154252ada1ee3cda79a0052c6d 100644
--- a/src/main/java/HdbExtractor/GetMembersByDomainFamilyClass.java
+++ b/hdbextractor/src/main/java/HdbExtractor/GetMembersByDomainFamilyClass.java
@@ -1,152 +1,152 @@
-//+======================================================================
-// $Source: /cvsroot/tango-cs/tango/jserver/archiving/HdbExtractor/GetMembersByDomainFamilyClass.java,v $
-//
-// Project:      Tango Device Server
-//
-// Description:  Java source code for the command TemplateClass of the
-//               HdbExtractor class.
-//
-// $Author: chinkumo $
-//
-// $Revision: 1.3 $
-//
-// $Log: GetMembersByDomainFamilyClass.java,v $
-// Revision 1.3  2005/11/29 16:17:38  chinkumo
-// Code reformated (pogo compatible)
-//
-// Revision 1.2  2005/11/15 13:45:52  chinkumo
-// ...
-//
-// Revision 1.1  2005/09/09 10:03:21  chinkumo
-// First commit !
-// (Dynamic attribut release)
-//
-//
-// copyleft :    European Synchrotron Radiation Facility
-//               BP 220, Grenoble 38043
-//               FRANCE
-//
-//-======================================================================
-//
-//  		This file is generated by POGO
-//	(Program Obviously used to Generate tango Object)
-//
-//         (c) - Software Engineering Group - ESRF
-//=============================================================================
-
-/**
- * @author	$Author: chinkumo $
- * @version	$Revision: 1.3 $
- */
-package HdbExtractor;
-
-import org.omg.CORBA.Any;
-
-import fr.esrf.Tango.DevFailed;
-import fr.esrf.Tango.DispLevel;
-import fr.esrf.TangoDs.Command;
-import fr.esrf.TangoDs.DeviceImpl;
-import fr.esrf.TangoDs.Except;
-import fr.esrf.TangoDs.TangoConst;
-import fr.esrf.TangoDs.Util;
-
-/**
- * Class Description: Gets all the registered members for the given domain and
- * family
- */
-
-public class GetMembersByDomainFamilyClass extends Command implements TangoConst {
-	// ===============================================================
-	/**
-	 * Constructor for Command class GetMembersByDomainFamilyClass
-	 * 
-	 * @param name
-	 *            command name
-	 * @param in
-	 *            argin type
-	 * @param out
-	 *            argout type
-	 */
-	// ===============================================================
-	public GetMembersByDomainFamilyClass(final String name, final int in, final int out) {
-		super(name, in, out);
-	}
-
-	// ===============================================================
-	/**
-	 * Constructor for Command class GetMembersByDomainFamilyClass
-	 * 
-	 * @param name
-	 *            command name
-	 * @param in
-	 *            argin type
-	 * @param in_comments
-	 *            argin description
-	 * @param out
-	 *            argout type
-	 * @param out_comments
-	 *            argout description
-	 */
-	// ===============================================================
-	public GetMembersByDomainFamilyClass(final String name, final int in, final int out, final String in_comments, final String out_comments) {
-		super(name, in, out, in_comments, out_comments);
-	}
-
-	// ===============================================================
-	/**
-	 * Constructor for Command class GetMembersByDomainFamilyClass
-	 * 
-	 * @param name
-	 *            command name
-	 * @param in
-	 *            argin type
-	 * @param in_comments
-	 *            argin description
-	 * @param out
-	 *            argout type
-	 * @param out_comments
-	 *            argout description
-	 * @param level
-	 *            The command display type OPERATOR or EXPERT
-	 */
-	// ===============================================================
-	public GetMembersByDomainFamilyClass(final String name, final int in, final int out, final String in_comments, final String out_comments, final DispLevel level) {
-		super(name, in, out, in_comments, out_comments, level);
-	}
-
-	// ===============================================================
-	/**
-	 * return the result of the device's command.
-	 */
-	// ===============================================================
-	@Override
-	public Any execute(final DeviceImpl device, final Any in_any) throws DevFailed {
-		Util.out2.println("GetMembersByDomainFamilyClass.execute(): arrived");
-		final String[] argin = extract_DevVarStringArray(in_any);
-
-		if (!(device instanceof HdbExtractor)) {
-			Except.throw_exception("DEVICE_ERROR", "Device parameter is not instance of HdbExtractor", "HdbExtractor");
-		}
-
-		return insert(((HdbExtractor) device).get_members_by_domain_family(argin));
-	}
-
-	// ===============================================================
-	/**
-	 * Check if it is allowed to execute the command.
-	 */
-	// ===============================================================
-	@Override
-	public boolean is_allowed(final DeviceImpl device, final Any data_in) {
-		// End of Generated Code
-
-		// Re-Start of Generated Code
-		return true;
-	}
-}
-
-// -----------------------------------------------------------------------------
-/*
- * end of $Source:/cvsroot/tango-cs/tango/jserver/archiving/HdbExtractor/
- * GetMembersByDomainFamilyClass.java,v $
- */
+//+======================================================================
+// $Source: /cvsroot/tango-cs/tango/jserver/archiving/HdbExtractor/GetMembersByDomainFamilyClass.java,v $
+//
+// Project:      Tango Device Server
+//
+// Description:  Java source code for the command TemplateClass of the
+//               HdbExtractor class.
+//
+// $Author: chinkumo $
+//
+// $Revision: 1.3 $
+//
+// $Log: GetMembersByDomainFamilyClass.java,v $
+// Revision 1.3  2005/11/29 16:17:38  chinkumo
+// Code reformated (pogo compatible)
+//
+// Revision 1.2  2005/11/15 13:45:52  chinkumo
+// ...
+//
+// Revision 1.1  2005/09/09 10:03:21  chinkumo
+// First commit !
+// (Dynamic attribut release)
+//
+//
+// copyleft :    European Synchrotron Radiation Facility
+//               BP 220, Grenoble 38043
+//               FRANCE
+//
+//-======================================================================
+//
+//  		This file is generated by POGO
+//	(Program Obviously used to Generate tango Object)
+//
+//         (c) - Software Engineering Group - ESRF
+//=============================================================================
+
+/**
+ * @author	$Author: chinkumo $
+ * @version	$Revision: 1.3 $
+ */
+package HdbExtractor;
+
+import org.omg.CORBA.Any;
+
+import fr.esrf.Tango.DevFailed;
+import fr.esrf.Tango.DispLevel;
+import fr.esrf.TangoDs.Command;
+import fr.esrf.TangoDs.DeviceImpl;
+import fr.esrf.TangoDs.Except;
+import fr.esrf.TangoDs.TangoConst;
+import fr.esrf.TangoDs.Util;
+
+/**
+ * Class Description: Gets all the registered members for the given domain and
+ * family
+ */
+
+public class GetMembersByDomainFamilyClass extends Command implements TangoConst {
+	// ===============================================================
+	/**
+	 * Constructor for Command class GetMembersByDomainFamilyClass
+	 * 
+	 * @param name
+	 *            command name
+	 * @param in
+	 *            argin type
+	 * @param out
+	 *            argout type
+	 */
+	// ===============================================================
+	public GetMembersByDomainFamilyClass(final String name, final int in, final int out) {
+		super(name, in, out);
+	}
+
+	// ===============================================================
+	/**
+	 * Constructor for Command class GetMembersByDomainFamilyClass
+	 * 
+	 * @param name
+	 *            command name
+	 * @param in
+	 *            argin type
+	 * @param in_comments
+	 *            argin description
+	 * @param out
+	 *            argout type
+	 * @param out_comments
+	 *            argout description
+	 */
+	// ===============================================================
+	public GetMembersByDomainFamilyClass(final String name, final int in, final int out, final String in_comments, final String out_comments) {
+		super(name, in, out, in_comments, out_comments);
+	}
+
+	// ===============================================================
+	/**
+	 * Constructor for Command class GetMembersByDomainFamilyClass
+	 * 
+	 * @param name
+	 *            command name
+	 * @param in
+	 *            argin type
+	 * @param in_comments
+	 *            argin description
+	 * @param out
+	 *            argout type
+	 * @param out_comments
+	 *            argout description
+	 * @param level
+	 *            The command display type OPERATOR or EXPERT
+	 */
+	// ===============================================================
+	public GetMembersByDomainFamilyClass(final String name, final int in, final int out, final String in_comments, final String out_comments, final DispLevel level) {
+		super(name, in, out, in_comments, out_comments, level);
+	}
+
+	// ===============================================================
+	/**
+	 * return the result of the device's command.
+	 */
+	// ===============================================================
+	@Override
+	public Any execute(final DeviceImpl device, final Any in_any) throws DevFailed {
+		Util.out2.println("GetMembersByDomainFamilyClass.execute(): arrived");
+		final String[] argin = extract_DevVarStringArray(in_any);
+
+		if (!(device instanceof HdbExtractor)) {
+			Except.throw_exception("DEVICE_ERROR", "Device parameter is not instance of HdbExtractor", "HdbExtractor");
+		}
+
+		return insert(((HdbExtractor) device).get_members_by_domain_family(argin));
+	}
+
+	// ===============================================================
+	/**
+	 * Check if it is allowed to execute the command.
+	 */
+	// ===============================================================
+	@Override
+	public boolean is_allowed(final DeviceImpl device, final Any data_in) {
+		// End of Generated Code
+
+		// Re-Start of Generated Code
+		return true;
+	}
+}
+
+// -----------------------------------------------------------------------------
+/*
+ * end of $Source:/cvsroot/tango-cs/tango/jserver/archiving/HdbExtractor/
+ * GetMembersByDomainFamilyClass.java,v $
+ */
diff --git a/src/main/java/HdbExtractor/GetMembersByDomainFamilyCountClass.java b/hdbextractor/src/main/java/HdbExtractor/GetMembersByDomainFamilyCountClass.java
similarity index 96%
rename from src/main/java/HdbExtractor/GetMembersByDomainFamilyCountClass.java
rename to hdbextractor/src/main/java/HdbExtractor/GetMembersByDomainFamilyCountClass.java
index bb06d29031287361e651e650485486049da61326..b893a6727c96ff2c5f828e577f2e245e1e814659 100644
--- a/src/main/java/HdbExtractor/GetMembersByDomainFamilyCountClass.java
+++ b/hdbextractor/src/main/java/HdbExtractor/GetMembersByDomainFamilyCountClass.java
@@ -1,152 +1,152 @@
-//+======================================================================
-// $Source: /cvsroot/tango-cs/tango/jserver/archiving/HdbExtractor/GetMembersByDomainFamilyCountClass.java,v $
-//
-// Project:      Tango Device Server
-//
-// Description:  Java source code for the command TemplateClass of the
-//               HdbExtractor class.
-//
-// $Author: chinkumo $
-//
-// $Revision: 1.3 $
-//
-// $Log: GetMembersByDomainFamilyCountClass.java,v $
-// Revision 1.3  2005/11/29 16:17:38  chinkumo
-// Code reformated (pogo compatible)
-//
-// Revision 1.2  2005/11/15 13:45:52  chinkumo
-// ...
-//
-// Revision 1.1  2005/09/09 10:03:21  chinkumo
-// First commit !
-// (Dynamic attribut release)
-//
-//
-// copyleft :    European Synchrotron Radiation Facility
-//               BP 220, Grenoble 38043
-//               FRANCE
-//
-//-======================================================================
-//
-//  		This file is generated by POGO
-//	(Program Obviously used to Generate tango Object)
-//
-//         (c) - Software Engineering Group - ESRF
-//=============================================================================
-
-/**
- * @author	$Author: chinkumo $
- * @version	$Revision: 1.3 $
- */
-package HdbExtractor;
-
-import org.omg.CORBA.Any;
-
-import fr.esrf.Tango.DevFailed;
-import fr.esrf.Tango.DispLevel;
-import fr.esrf.TangoDs.Command;
-import fr.esrf.TangoDs.DeviceImpl;
-import fr.esrf.TangoDs.Except;
-import fr.esrf.TangoDs.TangoConst;
-import fr.esrf.TangoDs.Util;
-
-/**
- * Class Description: Returns the number of distinct registered members for the
- * given domain and family.
- */
-
-public class GetMembersByDomainFamilyCountClass extends Command implements TangoConst {
-	// ===============================================================
-	/**
-	 * Constructor for Command class GetMembersByDomainFamilyCountClass
-	 * 
-	 * @param name
-	 *            command name
-	 * @param in
-	 *            argin type
-	 * @param out
-	 *            argout type
-	 */
-	// ===============================================================
-	public GetMembersByDomainFamilyCountClass(final String name, final int in, final int out) {
-		super(name, in, out);
-	}
-
-	// ===============================================================
-	/**
-	 * Constructor for Command class GetMembersByDomainFamilyCountClass
-	 * 
-	 * @param name
-	 *            command name
-	 * @param in
-	 *            argin type
-	 * @param in_comments
-	 *            argin description
-	 * @param out
-	 *            argout type
-	 * @param out_comments
-	 *            argout description
-	 */
-	// ===============================================================
-	public GetMembersByDomainFamilyCountClass(final String name, final int in, final int out, final String in_comments, final String out_comments) {
-		super(name, in, out, in_comments, out_comments);
-	}
-
-	// ===============================================================
-	/**
-	 * Constructor for Command class GetMembersByDomainFamilyCountClass
-	 * 
-	 * @param name
-	 *            command name
-	 * @param in
-	 *            argin type
-	 * @param in_comments
-	 *            argin description
-	 * @param out
-	 *            argout type
-	 * @param out_comments
-	 *            argout description
-	 * @param level
-	 *            The command display type OPERATOR or EXPERT
-	 */
-	// ===============================================================
-	public GetMembersByDomainFamilyCountClass(final String name, final int in, final int out, final String in_comments, final String out_comments, final DispLevel level) {
-		super(name, in, out, in_comments, out_comments, level);
-	}
-
-	// ===============================================================
-	/**
-	 * return the result of the device's command.
-	 */
-	// ===============================================================
-	@Override
-	public Any execute(final DeviceImpl device, final Any in_any) throws DevFailed {
-		Util.out2.println("GetMembersByDomainFamilyCountClass.execute(): arrived");
-		final String[] argin = extract_DevVarStringArray(in_any);
-
-		if (!(device instanceof HdbExtractor)) {
-			Except.throw_exception("DEVICE_ERROR", "Device parameter is not instance of HdbExtractor", "HdbExtractor");
-		}
-
-		return insert(((HdbExtractor) device).get_members_by_domain_family_count(argin));
-	}
-
-	// ===============================================================
-	/**
-	 * Check if it is allowed to execute the command.
-	 */
-	// ===============================================================
-	@Override
-	public boolean is_allowed(final DeviceImpl device, final Any data_in) {
-		// End of Generated Code
-
-		// Re-Start of Generated Code
-		return true;
-	}
-}
-
-// -----------------------------------------------------------------------------
-/*
- * end of $Source:/cvsroot/tango-cs/tango/jserver/archiving/HdbExtractor/
- * GetMembersByDomainFamilyCountClass.java,v $
- */
+//+======================================================================
+// $Source: /cvsroot/tango-cs/tango/jserver/archiving/HdbExtractor/GetMembersByDomainFamilyCountClass.java,v $
+//
+// Project:      Tango Device Server
+//
+// Description:  Java source code for the command TemplateClass of the
+//               HdbExtractor class.
+//
+// $Author: chinkumo $
+//
+// $Revision: 1.3 $
+//
+// $Log: GetMembersByDomainFamilyCountClass.java,v $
+// Revision 1.3  2005/11/29 16:17:38  chinkumo
+// Code reformated (pogo compatible)
+//
+// Revision 1.2  2005/11/15 13:45:52  chinkumo
+// ...
+//
+// Revision 1.1  2005/09/09 10:03:21  chinkumo
+// First commit !
+// (Dynamic attribut release)
+//
+//
+// copyleft :    European Synchrotron Radiation Facility
+//               BP 220, Grenoble 38043
+//               FRANCE
+//
+//-======================================================================
+//
+//  		This file is generated by POGO
+//	(Program Obviously used to Generate tango Object)
+//
+//         (c) - Software Engineering Group - ESRF
+//=============================================================================
+
+/**
+ * @author	$Author: chinkumo $
+ * @version	$Revision: 1.3 $
+ */
+package HdbExtractor;
+
+import org.omg.CORBA.Any;
+
+import fr.esrf.Tango.DevFailed;
+import fr.esrf.Tango.DispLevel;
+import fr.esrf.TangoDs.Command;
+import fr.esrf.TangoDs.DeviceImpl;
+import fr.esrf.TangoDs.Except;
+import fr.esrf.TangoDs.TangoConst;
+import fr.esrf.TangoDs.Util;
+
+/**
+ * Class Description: Returns the number of distinct registered members for the
+ * given domain and family.
+ */
+
+public class GetMembersByDomainFamilyCountClass extends Command implements TangoConst {
+	// ===============================================================
+	/**
+	 * Constructor for Command class GetMembersByDomainFamilyCountClass
+	 * 
+	 * @param name
+	 *            command name
+	 * @param in
+	 *            argin type
+	 * @param out
+	 *            argout type
+	 */
+	// ===============================================================
+	public GetMembersByDomainFamilyCountClass(final String name, final int in, final int out) {
+		super(name, in, out);
+	}
+
+	// ===============================================================
+	/**
+	 * Constructor for Command class GetMembersByDomainFamilyCountClass
+	 * 
+	 * @param name
+	 *            command name
+	 * @param in
+	 *            argin type
+	 * @param in_comments
+	 *            argin description
+	 * @param out
+	 *            argout type
+	 * @param out_comments
+	 *            argout description
+	 */
+	// ===============================================================
+	public GetMembersByDomainFamilyCountClass(final String name, final int in, final int out, final String in_comments, final String out_comments) {
+		super(name, in, out, in_comments, out_comments);
+	}
+
+	// ===============================================================
+	/**
+	 * Constructor for Command class GetMembersByDomainFamilyCountClass
+	 * 
+	 * @param name
+	 *            command name
+	 * @param in
+	 *            argin type
+	 * @param in_comments
+	 *            argin description
+	 * @param out
+	 *            argout type
+	 * @param out_comments
+	 *            argout description
+	 * @param level
+	 *            The command display type OPERATOR or EXPERT
+	 */
+	// ===============================================================
+	public GetMembersByDomainFamilyCountClass(final String name, final int in, final int out, final String in_comments, final String out_comments, final DispLevel level) {
+		super(name, in, out, in_comments, out_comments, level);
+	}
+
+	// ===============================================================
+	/**
+	 * return the result of the device's command.
+	 */
+	// ===============================================================
+	@Override
+	public Any execute(final DeviceImpl device, final Any in_any) throws DevFailed {
+		Util.out2.println("GetMembersByDomainFamilyCountClass.execute(): arrived");
+		final String[] argin = extract_DevVarStringArray(in_any);
+
+		if (!(device instanceof HdbExtractor)) {
+			Except.throw_exception("DEVICE_ERROR", "Device parameter is not instance of HdbExtractor", "HdbExtractor");
+		}
+
+		return insert(((HdbExtractor) device).get_members_by_domain_family_count(argin));
+	}
+
+	// ===============================================================
+	/**
+	 * Check if it is allowed to execute the command.
+	 */
+	// ===============================================================
+	@Override
+	public boolean is_allowed(final DeviceImpl device, final Any data_in) {
+		// End of Generated Code
+
+		// Re-Start of Generated Code
+		return true;
+	}
+}
+
+// -----------------------------------------------------------------------------
+/*
+ * end of $Source:/cvsroot/tango-cs/tango/jserver/archiving/HdbExtractor/
+ * GetMembersByDomainFamilyCountClass.java,v $
+ */
diff --git a/src/main/java/HdbExtractor/GetMembersClass.java b/hdbextractor/src/main/java/HdbExtractor/GetMembersClass.java
similarity index 96%
rename from src/main/java/HdbExtractor/GetMembersClass.java
rename to hdbextractor/src/main/java/HdbExtractor/GetMembersClass.java
index 4f66797ca9da14ffd6a55dbb129bc7e16518eed6..8f35dbd41db7191a91e6cd93d3a66aeed876a3d5 100644
--- a/src/main/java/HdbExtractor/GetMembersClass.java
+++ b/hdbextractor/src/main/java/HdbExtractor/GetMembersClass.java
@@ -1,151 +1,151 @@
-//+======================================================================
-// $Source: /cvsroot/tango-cs/tango/jserver/archiving/HdbExtractor/GetMembersClass.java,v $
-//
-// Project:      Tango Device Server
-//
-// Description:  Java source code for the command TemplateClass of the
-//               HdbExtractor class.
-//
-// $Author: chinkumo $
-//
-// $Revision: 1.3 $
-//
-// $Log: GetMembersClass.java,v $
-// Revision 1.3  2005/11/29 16:17:38  chinkumo
-// Code reformated (pogo compatible)
-//
-// Revision 1.2  2005/11/15 13:45:52  chinkumo
-// ...
-//
-// Revision 1.1  2005/09/09 10:03:21  chinkumo
-// First commit !
-// (Dynamic attribut release)
-//
-//
-// copyleft :    European Synchrotron Radiation Facility
-//               BP 220, Grenoble 38043
-//               FRANCE
-//
-//-======================================================================
-//
-//  		This file is generated by POGO
-//	(Program Obviously used to Generate tango Object)
-//
-//         (c) - Software Engineering Group - ESRF
-//=============================================================================
-
-/**
- * @author	$Author: chinkumo $
- * @version	$Revision: 1.3 $
- */
-package HdbExtractor;
-
-import org.omg.CORBA.Any;
-
-import fr.esrf.Tango.DevFailed;
-import fr.esrf.Tango.DispLevel;
-import fr.esrf.TangoDs.Command;
-import fr.esrf.TangoDs.DeviceImpl;
-import fr.esrf.TangoDs.Except;
-import fr.esrf.TangoDs.TangoConst;
-import fr.esrf.TangoDs.Util;
-
-/**
- * Class Description: Gets all the registered members
- */
-
-public class GetMembersClass extends Command implements TangoConst {
-	// ===============================================================
-	/**
-	 * Constructor for Command class GetMembersClass
-	 * 
-	 * @param name
-	 *            command name
-	 * @param in
-	 *            argin type
-	 * @param out
-	 *            argout type
-	 */
-	// ===============================================================
-	public GetMembersClass(final String name, final int in, final int out) {
-		super(name, in, out);
-	}
-
-	// ===============================================================
-	/**
-	 * Constructor for Command class GetMembersClass
-	 * 
-	 * @param name
-	 *            command name
-	 * @param in
-	 *            argin type
-	 * @param in_comments
-	 *            argin description
-	 * @param out
-	 *            argout type
-	 * @param out_comments
-	 *            argout description
-	 */
-	// ===============================================================
-	public GetMembersClass(final String name, final int in, final int out, final String in_comments, final String out_comments) {
-		super(name, in, out, in_comments, out_comments);
-	}
-
-	// ===============================================================
-	/**
-	 * Constructor for Command class GetMembersClass
-	 * 
-	 * @param name
-	 *            command name
-	 * @param in
-	 *            argin type
-	 * @param in_comments
-	 *            argin description
-	 * @param out
-	 *            argout type
-	 * @param out_comments
-	 *            argout description
-	 * @param level
-	 *            The command display type OPERATOR or EXPERT
-	 */
-	// ===============================================================
-	public GetMembersClass(final String name, final int in, final int out, final String in_comments, final String out_comments, final DispLevel level) {
-		super(name, in, out, in_comments, out_comments, level);
-	}
-
-	// ===============================================================
-	/**
-	 * return the result of the device's command.
-	 */
-	// ===============================================================
-	@Override
-	public Any execute(final DeviceImpl device, final Any in_any) throws DevFailed {
-		Util.out2.println("GetMembersClass.execute(): arrived");
-
-		if (!(device instanceof HdbExtractor)) {
-			Except.throw_exception("DEVICE_ERROR", "Device parameter is not instance of HdbExtractor", "HdbExtractor");
-		}
-
-		return insert(((HdbExtractor) device).get_members());
-	}
-
-	// ===============================================================
-	/**
-	 * Check if it is allowed to execute the command.
-	 */
-	// ===============================================================
-	@Override
-	public boolean is_allowed(final DeviceImpl device, final Any data_in) {
-		// End of Generated Code
-
-		// Re-Start of Generated Code
-		return true;
-	}
-}
-
-// -----------------------------------------------------------------------------
-/*
- * end of $Source:
- * /cvsroot/tango-cs/tango/jserver/archiving/HdbExtractor/GetMembersClass.java,v
- * $
- */
+//+======================================================================
+// $Source: /cvsroot/tango-cs/tango/jserver/archiving/HdbExtractor/GetMembersClass.java,v $
+//
+// Project:      Tango Device Server
+//
+// Description:  Java source code for the command TemplateClass of the
+//               HdbExtractor class.
+//
+// $Author: chinkumo $
+//
+// $Revision: 1.3 $
+//
+// $Log: GetMembersClass.java,v $
+// Revision 1.3  2005/11/29 16:17:38  chinkumo
+// Code reformated (pogo compatible)
+//
+// Revision 1.2  2005/11/15 13:45:52  chinkumo
+// ...
+//
+// Revision 1.1  2005/09/09 10:03:21  chinkumo
+// First commit !
+// (Dynamic attribut release)
+//
+//
+// copyleft :    European Synchrotron Radiation Facility
+//               BP 220, Grenoble 38043
+//               FRANCE
+//
+//-======================================================================
+//
+//  		This file is generated by POGO
+//	(Program Obviously used to Generate tango Object)
+//
+//         (c) - Software Engineering Group - ESRF
+//=============================================================================
+
+/**
+ * @author	$Author: chinkumo $
+ * @version	$Revision: 1.3 $
+ */
+package HdbExtractor;
+
+import org.omg.CORBA.Any;
+
+import fr.esrf.Tango.DevFailed;
+import fr.esrf.Tango.DispLevel;
+import fr.esrf.TangoDs.Command;
+import fr.esrf.TangoDs.DeviceImpl;
+import fr.esrf.TangoDs.Except;
+import fr.esrf.TangoDs.TangoConst;
+import fr.esrf.TangoDs.Util;
+
+/**
+ * Class Description: Gets all the registered members
+ */
+
+public class GetMembersClass extends Command implements TangoConst {
+	// ===============================================================
+	/**
+	 * Constructor for Command class GetMembersClass
+	 * 
+	 * @param name
+	 *            command name
+	 * @param in
+	 *            argin type
+	 * @param out
+	 *            argout type
+	 */
+	// ===============================================================
+	public GetMembersClass(final String name, final int in, final int out) {
+		super(name, in, out);
+	}
+
+	// ===============================================================
+	/**
+	 * Constructor for Command class GetMembersClass
+	 * 
+	 * @param name
+	 *            command name
+	 * @param in
+	 *            argin type
+	 * @param in_comments
+	 *            argin description
+	 * @param out
+	 *            argout type
+	 * @param out_comments
+	 *            argout description
+	 */
+	// ===============================================================
+	public GetMembersClass(final String name, final int in, final int out, final String in_comments, final String out_comments) {
+		super(name, in, out, in_comments, out_comments);
+	}
+
+	// ===============================================================
+	/**
+	 * Constructor for Command class GetMembersClass
+	 * 
+	 * @param name
+	 *            command name
+	 * @param in
+	 *            argin type
+	 * @param in_comments
+	 *            argin description
+	 * @param out
+	 *            argout type
+	 * @param out_comments
+	 *            argout description
+	 * @param level
+	 *            The command display type OPERATOR or EXPERT
+	 */
+	// ===============================================================
+	public GetMembersClass(final String name, final int in, final int out, final String in_comments, final String out_comments, final DispLevel level) {
+		super(name, in, out, in_comments, out_comments, level);
+	}
+
+	// ===============================================================
+	/**
+	 * return the result of the device's command.
+	 */
+	// ===============================================================
+	@Override
+	public Any execute(final DeviceImpl device, final Any in_any) throws DevFailed {
+		Util.out2.println("GetMembersClass.execute(): arrived");
+
+		if (!(device instanceof HdbExtractor)) {
+			Except.throw_exception("DEVICE_ERROR", "Device parameter is not instance of HdbExtractor", "HdbExtractor");
+		}
+
+		return insert(((HdbExtractor) device).get_members());
+	}
+
+	// ===============================================================
+	/**
+	 * Check if it is allowed to execute the command.
+	 */
+	// ===============================================================
+	@Override
+	public boolean is_allowed(final DeviceImpl device, final Any data_in) {
+		// End of Generated Code
+
+		// Re-Start of Generated Code
+		return true;
+	}
+}
+
+// -----------------------------------------------------------------------------
+/*
+ * end of $Source:
+ * /cvsroot/tango-cs/tango/jserver/archiving/HdbExtractor/GetMembersClass.java,v
+ * $
+ */
diff --git a/src/main/java/HdbExtractor/GetMembersCountClass.java b/hdbextractor/src/main/java/HdbExtractor/GetMembersCountClass.java
similarity index 96%
rename from src/main/java/HdbExtractor/GetMembersCountClass.java
rename to hdbextractor/src/main/java/HdbExtractor/GetMembersCountClass.java
index 87a419b5906e95b0ac9484cf3f2746df526ac9d8..4a8e43e21e4bf0e645bfaf3af46b9b83da9c46fd 100644
--- a/src/main/java/HdbExtractor/GetMembersCountClass.java
+++ b/hdbextractor/src/main/java/HdbExtractor/GetMembersCountClass.java
@@ -1,150 +1,150 @@
-//+======================================================================
-// $Source: /cvsroot/tango-cs/tango/jserver/archiving/HdbExtractor/GetMembersCountClass.java,v $
-//
-// Project:      Tango Device Server
-//
-// Description:  Java source code for the command TemplateClass of the
-//               HdbExtractor class.
-//
-// $Author: chinkumo $
-//
-// $Revision: 1.3 $
-//
-// $Log: GetMembersCountClass.java,v $
-// Revision 1.3  2005/11/29 16:17:38  chinkumo
-// Code reformated (pogo compatible)
-//
-// Revision 1.2  2005/11/15 13:45:52  chinkumo
-// ...
-//
-// Revision 1.1  2005/09/09 10:03:21  chinkumo
-// First commit !
-// (Dynamic attribut release)
-//
-//
-// copyleft :    European Synchrotron Radiation Facility
-//               BP 220, Grenoble 38043
-//               FRANCE
-//
-//-======================================================================
-//
-//  		This file is generated by POGO
-//	(Program Obviously used to Generate tango Object)
-//
-//         (c) - Software Engineering Group - ESRF
-//=============================================================================
-
-/**
- * @author	$Author: chinkumo $
- * @version	$Revision: 1.3 $
- */
-package HdbExtractor;
-
-import org.omg.CORBA.Any;
-
-import fr.esrf.Tango.DevFailed;
-import fr.esrf.Tango.DispLevel;
-import fr.esrf.TangoDs.Command;
-import fr.esrf.TangoDs.DeviceImpl;
-import fr.esrf.TangoDs.Except;
-import fr.esrf.TangoDs.TangoConst;
-import fr.esrf.TangoDs.Util;
-
-/**
- * Class Description: Returns the number of distinct members.
- */
-
-public class GetMembersCountClass extends Command implements TangoConst {
-	// ===============================================================
-	/**
-	 * Constructor for Command class GetMembersCountClass
-	 * 
-	 * @param name
-	 *            command name
-	 * @param in
-	 *            argin type
-	 * @param out
-	 *            argout type
-	 */
-	// ===============================================================
-	public GetMembersCountClass(final String name, final int in, final int out) {
-		super(name, in, out);
-	}
-
-	// ===============================================================
-	/**
-	 * Constructor for Command class GetMembersCountClass
-	 * 
-	 * @param name
-	 *            command name
-	 * @param in
-	 *            argin type
-	 * @param in_comments
-	 *            argin description
-	 * @param out
-	 *            argout type
-	 * @param out_comments
-	 *            argout description
-	 */
-	// ===============================================================
-	public GetMembersCountClass(final String name, final int in, final int out, final String in_comments, final String out_comments) {
-		super(name, in, out, in_comments, out_comments);
-	}
-
-	// ===============================================================
-	/**
-	 * Constructor for Command class GetMembersCountClass
-	 * 
-	 * @param name
-	 *            command name
-	 * @param in
-	 *            argin type
-	 * @param in_comments
-	 *            argin description
-	 * @param out
-	 *            argout type
-	 * @param out_comments
-	 *            argout description
-	 * @param level
-	 *            The command display type OPERATOR or EXPERT
-	 */
-	// ===============================================================
-	public GetMembersCountClass(final String name, final int in, final int out, final String in_comments, final String out_comments, final DispLevel level) {
-		super(name, in, out, in_comments, out_comments, level);
-	}
-
-	// ===============================================================
-	/**
-	 * return the result of the device's command.
-	 */
-	// ===============================================================
-	@Override
-	public Any execute(final DeviceImpl device, final Any in_any) throws DevFailed {
-		Util.out2.println("GetMembersCountClass.execute(): arrived");
-		if (!(device instanceof HdbExtractor)) {
-			Except.throw_exception("DEVICE_ERROR", "Device parameter is not instance of HdbExtractor", "HdbExtractor");
-		}
-
-		return insert(((HdbExtractor) device).get_members_count());
-	}
-
-	// ===============================================================
-	/**
-	 * Check if it is allowed to execute the command.
-	 */
-	// ===============================================================
-	@Override
-	public boolean is_allowed(final DeviceImpl device, final Any data_in) {
-		// End of Generated Code
-
-		// Re-Start of Generated Code
-		return true;
-	}
-}
-
-// -----------------------------------------------------------------------------
-/*
- * end of $Source:
- * /cvsroot/tango-cs/tango/jserver/archiving/HdbExtractor/GetMembersCountClass
- * .java,v $
- */
+//+======================================================================
+// $Source: /cvsroot/tango-cs/tango/jserver/archiving/HdbExtractor/GetMembersCountClass.java,v $
+//
+// Project:      Tango Device Server
+//
+// Description:  Java source code for the command TemplateClass of the
+//               HdbExtractor class.
+//
+// $Author: chinkumo $
+//
+// $Revision: 1.3 $
+//
+// $Log: GetMembersCountClass.java,v $
+// Revision 1.3  2005/11/29 16:17:38  chinkumo
+// Code reformated (pogo compatible)
+//
+// Revision 1.2  2005/11/15 13:45:52  chinkumo
+// ...
+//
+// Revision 1.1  2005/09/09 10:03:21  chinkumo
+// First commit !
+// (Dynamic attribut release)
+//
+//
+// copyleft :    European Synchrotron Radiation Facility
+//               BP 220, Grenoble 38043
+//               FRANCE
+//
+//-======================================================================
+//
+//  		This file is generated by POGO
+//	(Program Obviously used to Generate tango Object)
+//
+//         (c) - Software Engineering Group - ESRF
+//=============================================================================
+
+/**
+ * @author	$Author: chinkumo $
+ * @version	$Revision: 1.3 $
+ */
+package HdbExtractor;
+
+import org.omg.CORBA.Any;
+
+import fr.esrf.Tango.DevFailed;
+import fr.esrf.Tango.DispLevel;
+import fr.esrf.TangoDs.Command;
+import fr.esrf.TangoDs.DeviceImpl;
+import fr.esrf.TangoDs.Except;
+import fr.esrf.TangoDs.TangoConst;
+import fr.esrf.TangoDs.Util;
+
+/**
+ * Class Description: Returns the number of distinct members.
+ */
+
+public class GetMembersCountClass extends Command implements TangoConst {
+	// ===============================================================
+	/**
+	 * Constructor for Command class GetMembersCountClass
+	 * 
+	 * @param name
+	 *            command name
+	 * @param in
+	 *            argin type
+	 * @param out
+	 *            argout type
+	 */
+	// ===============================================================
+	public GetMembersCountClass(final String name, final int in, final int out) {
+		super(name, in, out);
+	}
+
+	// ===============================================================
+	/**
+	 * Constructor for Command class GetMembersCountClass
+	 * 
+	 * @param name
+	 *            command name
+	 * @param in
+	 *            argin type
+	 * @param in_comments
+	 *            argin description
+	 * @param out
+	 *            argout type
+	 * @param out_comments
+	 *            argout description
+	 */
+	// ===============================================================
+	public GetMembersCountClass(final String name, final int in, final int out, final String in_comments, final String out_comments) {
+		super(name, in, out, in_comments, out_comments);
+	}
+
+	// ===============================================================
+	/**
+	 * Constructor for Command class GetMembersCountClass
+	 * 
+	 * @param name
+	 *            command name
+	 * @param in
+	 *            argin type
+	 * @param in_comments
+	 *            argin description
+	 * @param out
+	 *            argout type
+	 * @param out_comments
+	 *            argout description
+	 * @param level
+	 *            The command display type OPERATOR or EXPERT
+	 */
+	// ===============================================================
+	public GetMembersCountClass(final String name, final int in, final int out, final String in_comments, final String out_comments, final DispLevel level) {
+		super(name, in, out, in_comments, out_comments, level);
+	}
+
+	// ===============================================================
+	/**
+	 * return the result of the device's command.
+	 */
+	// ===============================================================
+	@Override
+	public Any execute(final DeviceImpl device, final Any in_any) throws DevFailed {
+		Util.out2.println("GetMembersCountClass.execute(): arrived");
+		if (!(device instanceof HdbExtractor)) {
+			Except.throw_exception("DEVICE_ERROR", "Device parameter is not instance of HdbExtractor", "HdbExtractor");
+		}
+
+		return insert(((HdbExtractor) device).get_members_count());
+	}
+
+	// ===============================================================
+	/**
+	 * Check if it is allowed to execute the command.
+	 */
+	// ===============================================================
+	@Override
+	public boolean is_allowed(final DeviceImpl device, final Any data_in) {
+		// End of Generated Code
+
+		// Re-Start of Generated Code
+		return true;
+	}
+}
+
+// -----------------------------------------------------------------------------
+/*
+ * end of $Source:
+ * /cvsroot/tango-cs/tango/jserver/archiving/HdbExtractor/GetMembersCountClass
+ * .java,v $
+ */
diff --git a/src/main/java/HdbExtractor/GetMinTimeClass.java b/hdbextractor/src/main/java/HdbExtractor/GetMinTimeClass.java
similarity index 96%
rename from src/main/java/HdbExtractor/GetMinTimeClass.java
rename to hdbextractor/src/main/java/HdbExtractor/GetMinTimeClass.java
index 8dc3aedb0db9f01e75fe8e1aa820fd6381792010..31dc3368a9894601934c58022aff6c08617cdf79 100644
--- a/src/main/java/HdbExtractor/GetMinTimeClass.java
+++ b/hdbextractor/src/main/java/HdbExtractor/GetMinTimeClass.java
@@ -1,110 +1,110 @@
-/**
- * @author  $Author: ounsy $
- * @version $Revision: 1.1 $
- */
-package HdbExtractor;
-
-import org.omg.CORBA.Any;
-
-import fr.esrf.Tango.DevFailed;
-import fr.esrf.Tango.DispLevel;
-import fr.esrf.TangoDs.Command;
-import fr.esrf.TangoDs.DeviceImpl;
-import fr.esrf.TangoDs.Except;
-import fr.esrf.TangoDs.TangoConst;
-import fr.esrf.TangoDs.Util;
-
-/**
- * Class Description: Returns "true" if the attribute of given name is currently
- * archived, "false" otherwise.
- */
-
-public class GetMinTimeClass extends Command implements TangoConst {
-	// ===============================================================
-	/**
-	 * Constructor for Command class IsArchivedClass
-	 * 
-	 * @param name
-	 *            command name
-	 * @param in
-	 *            argin type
-	 * @param out
-	 *            argout type
-	 */
-	// ===============================================================
-	public GetMinTimeClass(final String name, final int in, final int out) {
-		super(name, in, out);
-	}
-
-	// ===============================================================
-	/**
-	 * Constructor for Command class IsArchivedClass
-	 * 
-	 * @param name
-	 *            command name
-	 * @param in
-	 *            argin type
-	 * @param in_comments
-	 *            argin description
-	 * @param out
-	 *            argout type
-	 * @param out_comments
-	 *            argout description
-	 */
-	// ===============================================================
-	public GetMinTimeClass(final String name, final int in, final int out, final String in_comments, final String out_comments) {
-		super(name, in, out, in_comments, out_comments);
-	}
-
-	// ===============================================================
-	/**
-	 * Constructor for Command class IsArchivedClass
-	 * 
-	 * @param name
-	 *            command name
-	 * @param in
-	 *            argin type
-	 * @param in_comments
-	 *            argin description
-	 * @param out
-	 *            argout type
-	 * @param out_comments
-	 *            argout description
-	 * @param level
-	 *            The command display type OPERATOR or EXPERT
-	 */
-	// ===============================================================
-	public GetMinTimeClass(final String name, final int in, final int out, final String in_comments, final String out_comments, final DispLevel level) {
-		super(name, in, out, in_comments, out_comments, level);
-	}
-
-	// ===============================================================
-	/**
-	 * return the result of the device's command.
-	 */
-	// ===============================================================
-	@Override
-	public Any execute(final DeviceImpl device, final Any in_any) throws DevFailed {
-		Util.out2.println("GetMinTimeClass.execute(): arrived");
-		final String argin = extract_DevString(in_any);
-
-		if (!(device instanceof HdbExtractor)) {
-			Except.throw_exception("DEVICE_ERROR", "Device parameter is not instance of HdbExtractor", "HdbExtractor");
-		}
-
-		return insert(((HdbExtractor) device).get_min_time(argin));
-	}
-
-	// ===============================================================
-	/**
-	 * Check if it is allowed to execute the command.
-	 */
-	// ===============================================================
-	@Override
-	public boolean is_allowed(final DeviceImpl device, final Any data_in) {
-		// End of Generated Code
-
-		// Re-Start of Generated Code
-		return true;
-	}
-}
+/**
+ * @author  $Author: ounsy $
+ * @version $Revision: 1.1 $
+ */
+package HdbExtractor;
+
+import org.omg.CORBA.Any;
+
+import fr.esrf.Tango.DevFailed;
+import fr.esrf.Tango.DispLevel;
+import fr.esrf.TangoDs.Command;
+import fr.esrf.TangoDs.DeviceImpl;
+import fr.esrf.TangoDs.Except;
+import fr.esrf.TangoDs.TangoConst;
+import fr.esrf.TangoDs.Util;
+
+/**
+ * Class Description: Returns "true" if the attribute of given name is currently
+ * archived, "false" otherwise.
+ */
+
+public class GetMinTimeClass extends Command implements TangoConst {
+	// ===============================================================
+	/**
+	 * Constructor for Command class IsArchivedClass
+	 * 
+	 * @param name
+	 *            command name
+	 * @param in
+	 *            argin type
+	 * @param out
+	 *            argout type
+	 */
+	// ===============================================================
+	public GetMinTimeClass(final String name, final int in, final int out) {
+		super(name, in, out);
+	}
+
+	// ===============================================================
+	/**
+	 * Constructor for Command class IsArchivedClass
+	 * 
+	 * @param name
+	 *            command name
+	 * @param in
+	 *            argin type
+	 * @param in_comments
+	 *            argin description
+	 * @param out
+	 *            argout type
+	 * @param out_comments
+	 *            argout description
+	 */
+	// ===============================================================
+	public GetMinTimeClass(final String name, final int in, final int out, final String in_comments, final String out_comments) {
+		super(name, in, out, in_comments, out_comments);
+	}
+
+	// ===============================================================
+	/**
+	 * Constructor for Command class IsArchivedClass
+	 * 
+	 * @param name
+	 *            command name
+	 * @param in
+	 *            argin type
+	 * @param in_comments
+	 *            argin description
+	 * @param out
+	 *            argout type
+	 * @param out_comments
+	 *            argout description
+	 * @param level
+	 *            The command display type OPERATOR or EXPERT
+	 */
+	// ===============================================================
+	public GetMinTimeClass(final String name, final int in, final int out, final String in_comments, final String out_comments, final DispLevel level) {
+		super(name, in, out, in_comments, out_comments, level);
+	}
+
+	// ===============================================================
+	/**
+	 * return the result of the device's command.
+	 */
+	// ===============================================================
+	@Override
+	public Any execute(final DeviceImpl device, final Any in_any) throws DevFailed {
+		Util.out2.println("GetMinTimeClass.execute(): arrived");
+		final String argin = extract_DevString(in_any);
+
+		if (!(device instanceof HdbExtractor)) {
+			Except.throw_exception("DEVICE_ERROR", "Device parameter is not instance of HdbExtractor", "HdbExtractor");
+		}
+
+		return insert(((HdbExtractor) device).get_min_time(argin));
+	}
+
+	// ===============================================================
+	/**
+	 * Check if it is allowed to execute the command.
+	 */
+	// ===============================================================
+	@Override
+	public boolean is_allowed(final DeviceImpl device, final Any data_in) {
+		// End of Generated Code
+
+		// Re-Start of Generated Code
+		return true;
+	}
+}
diff --git a/src/main/java/HdbExtractor/GetUserClass.java b/hdbextractor/src/main/java/HdbExtractor/GetUserClass.java
similarity index 96%
rename from src/main/java/HdbExtractor/GetUserClass.java
rename to hdbextractor/src/main/java/HdbExtractor/GetUserClass.java
index 0927a9f4b05b5f047995e6d4fe215e005dd9cab2..c7f0f000944f29af6829944c327d54a59fc386e7 100644
--- a/src/main/java/HdbExtractor/GetUserClass.java
+++ b/hdbextractor/src/main/java/HdbExtractor/GetUserClass.java
@@ -1,155 +1,155 @@
-//+======================================================================
-// $Source: /cvsroot/tango-cs/tango/jserver/archiving/HdbExtractor/GetUserClass.java,v $
-//
-// Project:      Tango Device Server
-//
-// Description:  Java source code for the command TemplateClass of the
-//               HdbExtractor class.
-//
-// $Author: chinkumo $
-//
-// $Revision: 1.3 $
-//
-// $Log: GetUserClass.java,v $
-// Revision 1.3  2005/11/29 16:17:38  chinkumo
-// Code reformated (pogo compatible)
-//
-// Revision 1.2  2005/11/15 13:45:52  chinkumo
-// ...
-//
-// Revision 1.1  2005/09/09 10:03:21  chinkumo
-// First commit !
-// (Dynamic attribut release)
-//
-//
-// copyleft :    European Synchrotron Radiation Facility
-//               BP 220, Grenoble 38043
-//               FRANCE
-//
-//-======================================================================
-//
-//  		This file is generated by POGO
-//	(Program Obviously used to Generate tango Object)
-//
-//         (c) - Software Engineering Group - ESRF
-//=============================================================================
-
-/**
- * @author	$Author: chinkumo $
- * @version	$Revision: 1.3 $
- */
-package HdbExtractor;
-
-import org.omg.CORBA.Any;
-
-import fr.esrf.Tango.DevFailed;
-import fr.esrf.Tango.DispLevel;
-import fr.esrf.TangoDs.Command;
-import fr.esrf.TangoDs.DeviceImpl;
-import fr.esrf.TangoDs.TangoConst;
-import fr.esrf.TangoDs.Util;
-import fr.soleil.archiving.common.api.exception.ArchivingException;
-
-/**
- * Class Description: Gets the current user's name used for the connection.
- */
-
-public class GetUserClass extends Command implements TangoConst {
-	// ===============================================================
-	/**
-	 * Constructor for Command class GetUserClass
-	 * 
-	 * @param name
-	 *            command name
-	 * @param in
-	 *            argin type
-	 * @param out
-	 *            argout type
-	 */
-	// ===============================================================
-	public GetUserClass(final String name, final int in, final int out) {
-		super(name, in, out);
-	}
-
-	// ===============================================================
-	/**
-	 * Constructor for Command class GetUserClass
-	 * 
-	 * @param name
-	 *            command name
-	 * @param in
-	 *            argin type
-	 * @param in_comments
-	 *            argin description
-	 * @param out
-	 *            argout type
-	 * @param out_comments
-	 *            argout description
-	 */
-	// ===============================================================
-	public GetUserClass(final String name, final int in, final int out, final String in_comments, final String out_comments) {
-		super(name, in, out, in_comments, out_comments);
-	}
-
-	// ===============================================================
-	/**
-	 * Constructor for Command class GetUserClass
-	 * 
-	 * @param name
-	 *            command name
-	 * @param in
-	 *            argin type
-	 * @param in_comments
-	 *            argin description
-	 * @param out
-	 *            argout type
-	 * @param out_comments
-	 *            argout description
-	 * @param level
-	 *            The command display type OPERATOR or EXPERT
-	 */
-	// ===============================================================
-	public GetUserClass(final String name, final int in, final int out, final String in_comments, final String out_comments, final DispLevel level) {
-		super(name, in, out, in_comments, out_comments, level);
-	}
-
-	// ===============================================================
-	/**
-	 * return the result of the device's command.
-	 */
-	// ===============================================================
-	@Override
-	public Any execute(final DeviceImpl device, final Any in_any) throws DevFailed {
-		Any result = null;
-		try {
-			Util.out2.println("GetUserClass.execute(): arrived");
-
-			if (device instanceof HdbExtractor) {
-				result = insert(((HdbExtractor) device).get_user());
-			}
-		} catch (final ArchivingException e) {
-			// TODO Auto-generated catch block
-			e.printStackTrace();
-		}
-		return result;
-	}
-
-	// ===============================================================
-	/**
-	 * Check if it is allowed to execute the command.
-	 */
-	// ===============================================================
-	@Override
-	public boolean is_allowed(final DeviceImpl device, final Any data_in) {
-		// End of Generated Code
-
-		// Re-Start of Generated Code
-		return true;
-	}
-}
-
-// -----------------------------------------------------------------------------
-/*
- * end of $Source:
- * /cvsroot/tango-cs/tango/jserver/archiving/HdbExtractor/GetUserClass.java,v $
- */
+//+======================================================================
+// $Source: /cvsroot/tango-cs/tango/jserver/archiving/HdbExtractor/GetUserClass.java,v $
+//
+// Project:      Tango Device Server
+//
+// Description:  Java source code for the command TemplateClass of the
+//               HdbExtractor class.
+//
+// $Author: chinkumo $
+//
+// $Revision: 1.3 $
+//
+// $Log: GetUserClass.java,v $
+// Revision 1.3  2005/11/29 16:17:38  chinkumo
+// Code reformated (pogo compatible)
+//
+// Revision 1.2  2005/11/15 13:45:52  chinkumo
+// ...
+//
+// Revision 1.1  2005/09/09 10:03:21  chinkumo
+// First commit !
+// (Dynamic attribut release)
+//
+//
+// copyleft :    European Synchrotron Radiation Facility
+//               BP 220, Grenoble 38043
+//               FRANCE
+//
+//-======================================================================
+//
+//  		This file is generated by POGO
+//	(Program Obviously used to Generate tango Object)
+//
+//         (c) - Software Engineering Group - ESRF
+//=============================================================================
+
+/**
+ * @author	$Author: chinkumo $
+ * @version	$Revision: 1.3 $
+ */
+package HdbExtractor;
+
+import org.omg.CORBA.Any;
+
+import fr.esrf.Tango.DevFailed;
+import fr.esrf.Tango.DispLevel;
+import fr.esrf.TangoDs.Command;
+import fr.esrf.TangoDs.DeviceImpl;
+import fr.esrf.TangoDs.TangoConst;
+import fr.esrf.TangoDs.Util;
+import fr.soleil.archiving.common.api.exception.ArchivingException;
+
+/**
+ * Class Description: Gets the current user's name used for the connection.
+ */
+
+public class GetUserClass extends Command implements TangoConst {
+	// ===============================================================
+	/**
+	 * Constructor for Command class GetUserClass
+	 * 
+	 * @param name
+	 *            command name
+	 * @param in
+	 *            argin type
+	 * @param out
+	 *            argout type
+	 */
+	// ===============================================================
+	public GetUserClass(final String name, final int in, final int out) {
+		super(name, in, out);
+	}
+
+	// ===============================================================
+	/**
+	 * Constructor for Command class GetUserClass
+	 * 
+	 * @param name
+	 *            command name
+	 * @param in
+	 *            argin type
+	 * @param in_comments
+	 *            argin description
+	 * @param out
+	 *            argout type
+	 * @param out_comments
+	 *            argout description
+	 */
+	// ===============================================================
+	public GetUserClass(final String name, final int in, final int out, final String in_comments, final String out_comments) {
+		super(name, in, out, in_comments, out_comments);
+	}
+
+	// ===============================================================
+	/**
+	 * Constructor for Command class GetUserClass
+	 * 
+	 * @param name
+	 *            command name
+	 * @param in
+	 *            argin type
+	 * @param in_comments
+	 *            argin description
+	 * @param out
+	 *            argout type
+	 * @param out_comments
+	 *            argout description
+	 * @param level
+	 *            The command display type OPERATOR or EXPERT
+	 */
+	// ===============================================================
+	public GetUserClass(final String name, final int in, final int out, final String in_comments, final String out_comments, final DispLevel level) {
+		super(name, in, out, in_comments, out_comments, level);
+	}
+
+	// ===============================================================
+	/**
+	 * return the result of the device's command.
+	 */
+	// ===============================================================
+	@Override
+	public Any execute(final DeviceImpl device, final Any in_any) throws DevFailed {
+		Any result = null;
+		try {
+			Util.out2.println("GetUserClass.execute(): arrived");
+
+			if (device instanceof HdbExtractor) {
+				result = insert(((HdbExtractor) device).get_user());
+			}
+		} catch (final ArchivingException e) {
+			// TODO Auto-generated catch block
+			e.printStackTrace();
+		}
+		return result;
+	}
+
+	// ===============================================================
+	/**
+	 * Check if it is allowed to execute the command.
+	 */
+	// ===============================================================
+	@Override
+	public boolean is_allowed(final DeviceImpl device, final Any data_in) {
+		// End of Generated Code
+
+		// Re-Start of Generated Code
+		return true;
+	}
+}
+
+// -----------------------------------------------------------------------------
+/*
+ * end of $Source:
+ * /cvsroot/tango-cs/tango/jserver/archiving/HdbExtractor/GetUserClass.java,v $
+ */
diff --git a/src/main/java/HdbExtractor/HdbExtractor.java b/hdbextractor/src/main/java/HdbExtractor/HdbExtractor.java
similarity index 96%
rename from src/main/java/HdbExtractor/HdbExtractor.java
rename to hdbextractor/src/main/java/HdbExtractor/HdbExtractor.java
index febd219ee7f338dbad99a269829506192369263a..0b47d3b123fa3a1aba0557e414e83099e0eeac1f 100644
--- a/src/main/java/HdbExtractor/HdbExtractor.java
+++ b/hdbextractor/src/main/java/HdbExtractor/HdbExtractor.java
@@ -1,2330 +1,2328 @@
-// +============================================================================
-// $Source:
-// /cvsroot/tango-cs/tango/jserver/archiving/HdbExtractor/HdbExtractor.java,v $
-//
-// project : Tango Device Server
-//
-// Description: java source code for the HdbExtractor class and its commands.
-// This class is derived from DeviceImpl class.
-// It represents the CORBA servant obbject which
-// will be accessed from the network. All commands which
-// can be executed on the HdbExtractor are implemented
-// in this file.
-//
-// $Author: pierrejoseph $
-//
-// $Revision: 1.33 $
-//
-// $Log: HdbExtractor.java,v $
-// Revision 1.33 2007/05/11 13:58:34 pierrejoseph
-// Attribute addition : release version
-//
-// Revision 1.32 2007/04/24 14:29:27 ounsy
-// added a log in the case of unexpected ClassCast exception on the event's
-// value
-//
-// Revision 1.31 2007/03/16 14:09:35 ounsy
-// minor changes
-//
-// Revision 1.30 2007/03/16 08:44:13 ounsy
-// added a GetMinTime command
-//
-// Revision 1.29 2007/03/05 16:25:20 ounsy
-// non-static DataBase
-//
-// Revision 1.28 2007/03/02 08:46:02 ounsy
-// added the GetMaxTime command
-//
-// Revision 1.27 2007/03/01 10:08:01 ounsy
-// added the RemoveDynamicAttributes command
-//
-// Revision 1.26 2007/02/26 16:14:24 ounsy
-// archiving devices now inherits just from DeviceImpl instead of
-// DeviceImplWithShutdownRunnable (they're nonlonger unexported onn shutdown)
-//
-// Revision 1.25 2007/02/08 08:44:15 pierrejoseph
-// The method getAttData is no more available (costly).
-//
-// Revision 1.24 2007/02/05 17:04:37 ounsy
-// corrected a bug for spectrum attributes with an empty value
-//
-// Revision 1.23 2006/12/06 13:25:34 ounsy
-// removed useless elements
-//
-// Revision 1.22 2006/12/06 10:17:05 ounsy
-// minor changes
-//
-// Revision 1.21 2006/11/30 15:30:15 ounsy
-// corrected a bug in add_attribute() when the extracted DbData is empty; the
-// dynamic attribute is no longer created, and a DevFailed is recieved instead
-//
-// Revision 1.20 2006/11/20 09:24:49 ounsy
-// minor changes
-//
-// Revision 1.19 2006/11/13 15:57:37 ounsy
-// all java devices now inherit from UnexportOnShutdownDeviceImpl instead of
-// from DeviceImpl
-//
-// Revision 1.18 2006/10/31 16:54:12 ounsy
-// milliseconds and null values management
-//
-// Revision 1.17 2006/10/09 12:56:28 chinkumo
-// A specific exception is raised when an outOfMemory error appeared, for the
-// methods who generate dynamics attributes.
-//
-// Revision 1.16 2006/09/07 13:48:29 ounsy
-// added extraction with sampling methods
-//
-// Revision 1.15 2006/09/05 12:25:16 ounsy
-// updated for sampling compatibility
-//
-// Revision 1.14 2006/07/24 09:55:22 ounsy
-// now uses buffered attribute ids
-//
-// Revision 1.13 2006/03/14 13:09:55 ounsy
-// removed useless logs
-//
-// Revision 1.12 2006/02/15 13:11:31 ounsy
-// organized imports
-//
-// Revision 1.11 2006/02/07 11:56:09 ounsy
-// removed useless logs
-//
-// Revision 1.10 2006/02/06 13:10:14 ounsy
-// added spectrum RO/RW support
-//
-// Revision 1.9 2006/01/27 13:07:05 ounsy
-// organised imports
-//
-// Revision 1.8 2005/11/29 17:33:38 chinkumo
-// no message
-//
-// Revision 1.7.10.4 2005/11/29 16:17:38 chinkumo
-// Code reformated (pogo compatible)
-//
-// Revision 1.7.10.3 2005/11/15 13:45:52 chinkumo
-// ...
-//
-// Revision 1.7.10.2 2005/09/26 07:58:49 chinkumo
-// Every commands of shape 'getAttDataXXXXCount(...)' was changed. The type of
-// their returned object was changed from 'short' to 'long'.
-//
-// Revision 1.7.10.1 2005/09/09 10:37:40 chinkumo
-// Since the extraction politic changed to 'dynamic attributes', the device was
-// pogo-regenerated.
-//
-//
-// copyleft : European Synchrotron Radiation Facility
-// BP 220, Grenoble 38043
-// FRANCE
-//
-// -============================================================================
-//
-// This file is generated by POGO
-// (Program Obviously used to Generate tango Object)
-//
-// (c) - Software Engineering Group - ESRF
-// =============================================================================
-
-package HdbExtractor;
-
-import java.lang.reflect.Array;
-import java.sql.Timestamp;
-import java.util.StringTokenizer;
-
-import org.omg.CORBA.SystemException;
-import org.omg.CORBA.UserException;
-import org.tango.utils.DevFailedUtils;
-
-import HdbExtractor.Proxy.DbProxy;
-import fr.esrf.Tango.AttrDataFormat;
-import fr.esrf.Tango.AttrWriteType;
-import fr.esrf.Tango.DevFailed;
-import fr.esrf.Tango.DevState;
-import fr.esrf.Tango.DevVarDoubleStringArray;
-import fr.esrf.Tango.DevVarLongStringArray;
-import fr.esrf.Tango.ErrSeverity;
-import fr.esrf.TangoApi.DbDevice;
-import fr.esrf.TangoDs.Attr;
-import fr.esrf.TangoDs.Attribute;
-import fr.esrf.TangoDs.DeviceClass;
-import fr.esrf.TangoDs.DeviceImpl;
-import fr.esrf.TangoDs.Except;
-import fr.esrf.TangoDs.ImageAttr;
-import fr.esrf.TangoDs.SpectrumAttr;
-import fr.esrf.TangoDs.TangoConst;
-import fr.esrf.TangoDs.Util;
-import fr.soleil.archiving.common.api.exception.ArchivingException;
-import fr.soleil.archiving.common.api.tools.DbData;
-import fr.soleil.archiving.common.api.tools.NullableTimedData;
-import fr.soleil.archiving.hdbtdb.api.DataBaseManager;
-import fr.soleil.archiving.hdbtdb.api.HdbTdbConnectionParameters;
-import fr.soleil.archiving.hdbtdb.api.management.attributes.adtapt.IAdtAptAttributes;
-import fr.soleil.archiving.hdbtdb.api.tools.SamplingType;
-import fr.soleil.archiving.hdbtdb.api.tools.mode.Mode;
-import fr.soleil.archiving.hdbtdb.api.utils.database.DbUtils;
-import fr.soleil.lib.project.math.MathConst;
-
-/**
- * Class Description: A DServer used for historical database's extractions.
- * 
- * @author $Author: pierrejoseph $
- * @version $Revision: 1.33 $
- */
-public class HdbExtractor extends DeviceImpl implements TangoConst {
-
-    protected int state;
-    private DbProxy dbProxy;
-    private final String m_version;
-    protected int id = 0;
-
-    /**
-     * Constructor for simulated Time Device Server.
-     * 
-     * @param cl
-     *            The DeviceClass object
-     * @param s
-     *            The Device name.
-     * @param version
-     *            The device version
-     */
-    public HdbExtractor(final DeviceClass cl, final String s, final String version) throws DevFailed {
-        super(cl, s);
-        m_version = version;
-        init_device();
-    }
-
-    /**
-     * Constructor for simulated Time Device Server.
-     * 
-     * @param cl
-     *            The DeviceClass object
-     * @param s
-     *            The Device name.
-     * @param d
-     *            Device description.
-     * @param version
-     *            The device version
-     */
-    public HdbExtractor(final DeviceClass cl, final String s, final String d, final String version) throws DevFailed {
-        super(cl, s, d);
-        m_version = version;
-        init_device();
-    }
-
-    /**
-     * Initialize the device.
-     */
-    @Override
-    public void init_device() {
-        System.out.println("HdbExtractor() create " + device_name);
-        connectDatabase();
-        get_logger().info("Exiting init_device()");
-    }
-
-    public void remove_dynamic_attributes() throws DevFailed {
-        get_logger().info("Entering remove_dynamic_attributes()");
-        while (dev_attr.get_attr_nb() > 0) {
-            final Attribute nextAttribute = dev_attr.get_attr_by_ind(0);
-            final String attributeName = nextAttribute.get_name();
-            remove_attribute(attributeName);
-        }
-        get_logger().info("Exiting remove_dynamic_attributes()");
-    }
-
-    private void connectDatabase() {
-        DbDevice device = get_db_device();
-        ArchivingException exception = null;
-        try {
-            HdbTdbConnectionParameters.performHDBInit(device, true, true);
-            String dbHost = HdbTdbConnectionParameters.getHDbHost();
-            String dbName = HdbTdbConnectionParameters.getHDbName();
-            String dbSchema = HdbTdbConnectionParameters.getHDbSchema();
-            String dbUser = HdbTdbConnectionParameters.getHDBUser();
-            String dbPassword = HdbTdbConnectionParameters.getHDBPassword();
-            boolean isRac = HdbTdbConnectionParameters.isHDbRac();
-            HdbTdbConnectionParameters.printHDBConnectionInfoLog();
-            dbProxy = new DbProxy(dbHost, dbName, dbSchema, dbUser, dbPassword, isRac);
-        } catch (ArchivingException e) {
-            dbProxy = null;
-            e.printStackTrace();
-            exception = e;
-        }
-        StringBuilder builder = new StringBuilder(device_name);
-        if ((dbProxy == null) || (!dbProxy.is_db_connected())) {
-            set_state(DevState.FAULT);
-            builder.append(": DevState.FAULT\nHistorical database connection: FAULT (may be broken...)\n");
-            if (exception != null) {
-                builder.append("reason:\n").append(exception);
-            }
-            get_logger().error("ERROR: Database unconnected !!");
-        } else {
-            set_state(DevState.ON);
-            builder.append(": DevState.ON\nHistorical database connection: OK\n");
-        }
-        set_status(builder.toString());
-    }
-
-    private synchronized void reconnectDatabaseIfNecessary() {
-        if (dbProxy == null) {
-            connectDatabase();
-        }
-    }
-
-    /**
-     * Method always executed before command execution.
-     */
-    @Override
-    public void always_executed_hook() {
-        // get_logger().info("In always_executed_hook method()");
-    }
-
-    /**
-     * Execute command "GetInfo" on device. Returns misc informations about the
-     * database and a set of parameters characterizing the connection.
-     * 
-     * @return The informations that characterize the database
-     */
-    public String get_info() throws DevFailed {
-        get_logger().info("Entering get_info()");
-        reconnectDatabaseIfNecessary();
-        String argout;
-        if (dbProxy == null) {
-            argout = "";
-        } else {
-            argout = dbProxy.getDataBase().getConnectionInfo();
-        }
-        get_logger().info("Exiting get_info()");
-        return argout;
-    }
-
-    /**
-     * Execute command "GetHost" on device. Returns the connected database host
-     * identifier.
-     * 
-     * @return The connected database host identifier.
-     * @throws ArchivingException
-     */
-    public String get_host() throws DevFailed {
-        get_logger().info("Entering get_host()");
-        reconnectDatabaseIfNecessary();
-        final String argout = dbProxy == null ? "" : dbProxy.getDataBase().getHost();
-        get_logger().info("Exiting get_host()");
-        return argout;
-    }
-
-    /**
-     * Execute command "GetUser" on device. Gets the current user's name used
-     * for the connection.
-     * 
-     * @return The current user's name used for the connection.
-     * @throws ArchivingException
-     */
-    public String get_user() throws DevFailed, ArchivingException {
-        get_logger().info("Entering get_user()");
-        reconnectDatabaseIfNecessary();
-        final String argout = dbProxy == null ? "" : dbProxy.getDataBase().getUser();
-        get_logger().info("Exiting get_user()");
-        return argout;
-    }
-
-    /**
-     * Execute command "GetConnectionState" on device. Cheks if the connection
-     * to the historical database is alive.
-     * 
-     * @return The connection state
-     */
-    public boolean get_connection_state() throws DevFailed {
-        get_logger().info("Entering get_connection_state()");
-        reconnectDatabaseIfNecessary();
-        boolean argout = false;
-        if (dbProxy != null) {
-            try {
-                argout = dbProxy.getDataBase().isConnected();
-            } catch (final ArchivingException e) {
-                // TODO Auto-generated catch block
-                e.printStackTrace();
-            }
-        }
-        get_logger().info("Exiting get_connection_state()");
-        return argout;
-    }
-
-    /**
-     * Execute command "GetAttDefinitionData" on device. Returns an array
-     * containing the differents definition informations for the given
-     * attribute.
-     * 
-     * @param argin
-     *            The attribute's name
-     * @return Differents definition informations for the given attribute
-     */
-    public String[] get_att_definition_data(final String argin) throws DevFailed {
-        get_logger().info("Entering get_att_definition_data()");
-        reconnectDatabaseIfNecessary();
-        String[] argout;
-        if (dbProxy == null) {
-            argout = new String[0];
-        } else {
-            try {
-                argout = DbUtils.toStringArray(dbProxy.getDataBase().getAttribute().getAttDefinitionData(argin));
-            } catch (final ArchivingException e) {
-                throw e.toTangoException();
-            }
-        }
-        get_logger().info("Exiting get_att_definition_data()");
-        return argout;
-    }
-
-    /**
-     * Execute command "GetAttPropertiesData" on device. Gets the differents
-     * properties informations for the given attribute
-     * 
-     * @param argin
-     *            The attribute's name
-     * @return An array containing the differents properties for the given
-     *         attribute
-     */
-    public String[] get_att_properties_data(final String argin) throws DevFailed {
-        get_logger().info("Entering get_att_properties_data()");
-        reconnectDatabaseIfNecessary();
-        String[] argout;
-        if (dbProxy == null) {
-            argout = new String[0];
-        } else {
-            try {
-                IAdtAptAttributes adtAptAttributes = dbProxy.getDataBase().getAttribute();
-                argout = DbUtils.toStringArray(adtAptAttributes.getProperties().getAttPropertiesData(argin,
-                        adtAptAttributes.isCaseSentitiveDatabase()));
-            } catch (final ArchivingException e) {
-                throw e.toTangoException();
-            }
-        }
-        get_logger().info("Exiting get_att_properties_data()");
-        return argout;
-    }
-
-    /**
-     * Execute command "GetAttFullName" on device. Gets for a specified
-     * attribute id its full name as defined in HDB
-     * 
-     * @param argin
-     *            The attribute's id
-     * @return The HDB's full name that characterize the given attribute
-     */
-    public String get_att_full_name(final int argin) throws DevFailed {
-        get_logger().info("Entering get_att_full_name()");
-        String argout;
-        reconnectDatabaseIfNecessary();
-        try {
-            argout = dbProxy == null ? "" : dbProxy.getDataBase().getAttribute().getNames().getAttFullName(argin);
-        } catch (final ArchivingException e) {
-            throw e.toTangoException();
-        }
-        get_logger().info("Exiting get_att_full_name()");
-        return argout;
-    }
-
-    /**
-     * Execute command "GetAttId" on device. Gets for a specified attribute its
-     * ID as defined in HDB
-     * 
-     * @param argin
-     *            The attribute's name
-     * @return The HDB's ID that characterize the given attribute
-     */
-    public int get_att_id(final String argin) throws DevFailed {
-        get_logger().info("Entering get_att_id()");
-        reconnectDatabaseIfNecessary();
-        int argout = 0;
-        if (dbProxy != null) {
-            try {
-                // argout = this.dbProxy.getDataBase().getAttID(argin);
-                IAdtAptAttributes adtAptAttributes = dbProxy.getDataBase().getAttribute();
-                argout = adtAptAttributes.getIds().getAttID(argin, adtAptAttributes.isCaseSentitiveDatabase());
-            } catch (final ArchivingException e) {
-                throw e.toTangoException();
-            }
-        }
-        get_logger().info("Exiting get_att_id()");
-        return argout;
-    }
-
-    /**
-     * Execute command "GetAttNameAll" on device. Gets whole list of the
-     * attributes registered in HDB
-     * 
-     * @return The whole list of the attributes registered in HDB
-     */
-    public String[] get_att_name_all() throws DevFailed {
-        get_logger().info("Entering get_att_name_all()");
-        reconnectDatabaseIfNecessary();
-        String[] argout;
-        if (dbProxy == null) {
-            argout = new String[0];
-        } else {
-            try {
-                argout = DbUtils.toStringArray(dbProxy.getDataBase().getAttribute().getNames().getAttributes());
-            } catch (final ArchivingException e) {
-                throw e.toTangoException();
-            }
-        }
-        get_logger().info("Exiting get_att_name_all()");
-        return argout;
-    }
-
-    /**
-     * Execute command "GetAttNameFacility" on device. Gets whole list of the
-     * attributes registered in HDB and that belong to the current facility.
-     * 
-     * @return The whole list of the attributes registered in HDB, and that
-     *         belong to the current facility.
-     */
-    public String[] get_att_name_facility() throws DevFailed {
-        get_logger().info("Entering get_att_name_facility()");
-        reconnectDatabaseIfNecessary();
-        String[] argout;
-        if (dbProxy == null) {
-            argout = new String[0];
-        } else {
-            try {
-                argout = DbUtils.toStringArray(dbProxy.getDataBase().getAttribute().getNames()
-                        .getAttributes(System.getProperty("TANGO_HOST")));
-            } catch (final ArchivingException e) {
-                throw e.toTangoException();
-            }
-        }
-        get_logger().info("Exiting get_att_name_facility()");
-        return argout;
-    }
-
-    /**
-     * Execute command "GetAttNameFilterFormat" on device. Gets the list of
-     * <I>HDB</I> registered attributes for the given format
-     * 
-     * @param argin
-     *            A format [0 -> scalar - 1 -> spectrum - 2 -> image]
-     * @return The filtered list of attributes registered in HDB. The filtering
-     *         is made according to the given format [0 -> scalar - 1 ->
-     *         spectrum - 2 -> image]
-     */
-    public String[] get_att_name_filter_format(final short argin) throws DevFailed {
-        get_logger().info("Entering get_att_name_filter_format()");
-        reconnectDatabaseIfNecessary();
-        String[] argout;
-        if (dbProxy == null) {
-            argout = new String[0];
-        } else {
-            try {
-                argout = DbUtils.toStringArray(dbProxy.getDataBase().getAttribute().getNames()
-                        .getAttributesNamesF(argin));
-            } catch (final ArchivingException e) {
-                throw e.toTangoException();
-            }
-        }
-        get_logger().info("Exiting get_att_name_filter_format()");
-        return argout;
-    }
-
-    /**
-     * Execute command "GetAttNameFilterType" on device. Gets the list of
-     * <I>HDB</I> registered attributes for the given type.
-     * 
-     * @param argin
-     *            A type [2 -> Tango::DevShort | 3 -> Tango::DevLong | 5 ->
-     *            Tango::DevDouble and 8 -> Tango::DevString]
-     * @return The filtered list of attributes registered in HDB. The filtering
-     *         is made according to the given type [2 -> Tango::DevShort | 3 ->
-     *         Tango::DevLong | 5 -> Tango::DevDouble and 8 -> Tango::DevString]
-     */
-    public String[] get_att_name_filter_type(final short argin) throws DevFailed {
-        get_logger().info("Entering get_att_name_filter_type()");
-        reconnectDatabaseIfNecessary();
-        String[] argout;
-        if (dbProxy == null) {
-            argout = new String[0];
-        } else {
-            try {
-                argout = DbUtils.toStringArray(dbProxy.getDataBase().getAttribute().getNames()
-                        .getAttributesNamesT(argin));
-            } catch (final ArchivingException e) {
-                throw e.toTangoException();
-            }
-        }
-        get_logger().info("Exiting get_att_name_filter_type()");
-        return argout;
-    }
-
-    /**
-     * Execute command "GetAttCountAll" on device. Gets the total number of
-     * attributes defined in HDB.
-     * 
-     * @return The total number of attributes defined in HDB
-     */
-    public int get_att_count_all() throws DevFailed {
-        get_logger().info("Entering get_att_count_all()");
-        reconnectDatabaseIfNecessary();
-        int argout = 0;
-        if (dbProxy != null) {
-            try {
-                argout = dbProxy.getDataBase().getAttribute().getNames().getAttributesCount();
-            } catch (final ArchivingException e) {
-                throw e.toTangoException();
-            }
-        }
-        get_logger().info("Exiting get_att_count_all()");
-        return argout;
-    }
-
-    /**
-     * Execute command "GetAttCountFilterFormat" on device. Gets the total
-     * number of attributes defined in HDB with the given format.
-     * 
-     * @param argin
-     *            A format [0 -> scalar - 1 -> spectrum - 2 -> image]
-     * @return The total number of attributes defined in HDB with the given
-     *         format [0 -> scalar - 1 -> spectrum - 2 -> image]
-     */
-    public int get_att_count_filter_format(final short argin) throws DevFailed {
-        get_logger().info("Entering get_att_count_filter_format()");
-        reconnectDatabaseIfNecessary();
-        int argout = 0;
-        if (dbProxy != null) {
-            try {
-                argout = dbProxy.getDataBase().getAttribute().getNames().getAttributesCountF(argin);
-            } catch (final ArchivingException e) {
-                throw e.toTangoException();
-            }
-        }
-        get_logger().info("Exiting get_att_count_filter_format()");
-        return argout;
-    }
-
-    /**
-     * Execute command "GetAttCountFilterType" on device. Gets the total number
-     * of attributes defined in HDB with the given type.
-     * 
-     * @param argin
-     *            A type [2 -> Tango::DevShort | 3 -> Tango::DevLong | 5 ->
-     *            Tango::DevDouble and 8 -> Tango::DevString]
-     * @return The total number of attributes defined in HDB with the given type
-     *         [2 -> Tango::DevShort | 3 -> Tango::DevLong | 5 ->
-     *         Tango::DevDouble and 8 -> Tango::DevString]
-     */
-    public int get_att_count_filter_type(final short argin) throws DevFailed {
-        get_logger().info("Entering get_att_count_filter_type()");
-        reconnectDatabaseIfNecessary();
-        int argout = 0;
-        if (dbProxy != null) {
-            try {
-                argout = dbProxy.getDataBase().getAttribute().getNames().getAttributesCountT(argin);
-            } catch (final ArchivingException e) {
-                throw e.toTangoException();
-            }
-        }
-        get_logger().info("Exiting get_att_count_filter_type()");
-        return argout;
-    }
-
-    /**
-     * Execute command "GetDomains" on device. Gets all the registered domains.
-     * 
-     * @return The registered domains
-     */
-    public String[] get_domains() throws DevFailed {
-        get_logger().info("Entering get_domains()");
-        reconnectDatabaseIfNecessary();
-        String[] argout;
-        if (dbProxy == null) {
-            argout = new String[0];
-        } else {
-            try {
-                argout = dbProxy.getDataBase().getAttribute().getDomains().getDomains();
-            } catch (final ArchivingException e) {
-                throw e.toTangoException();
-            }
-        }
-        get_logger().info("Exiting get_domains()");
-        return argout;
-    }
-
-    /**
-     * Execute command "GetDomainsCount" on device. Returns the number of
-     * distinct registered domains.
-     * 
-     * @return The number of distinct registered domains.
-     */
-    public int get_domains_count() throws DevFailed {
-        get_logger().info("Entering get_domains_count()");
-        reconnectDatabaseIfNecessary();
-        int argout = 0;
-        if (dbProxy != null) {
-            try {
-                argout = dbProxy.getDataBase().getAttribute().getDomains().getDomainsCount();
-            } catch (final ArchivingException e) {
-                throw e.toTangoException();
-            }
-        }
-        get_logger().info("Exiting get_domains_count()");
-        return argout;
-    }
-
-    /**
-     * Execute command "GetFamilies" on device. Gets all the registered families
-     * 
-     * @return The registered families
-     */
-    public String[] get_families() throws DevFailed {
-        get_logger().info("Entering get_families()");
-        reconnectDatabaseIfNecessary();
-        String[] argout;
-        if (dbProxy == null) {
-            argout = new String[0];
-        } else {
-            try {
-                argout = dbProxy.getDataBase().getAttribute().getFamilies().getFamilies();
-            } catch (final ArchivingException e) {
-                throw e.toTangoException();
-            }
-        }
-        get_logger().info("Exiting get_families()");
-        return argout;
-    }
-
-    /**
-     * Execute command "GetFamiliesCount" on device. Returns the number of
-     * distinct registered families.
-     * 
-     * @return The number of distinct registered families.
-     */
-    public int get_families_count() throws DevFailed {
-        get_logger().info("Entering get_families_count()");
-        reconnectDatabaseIfNecessary();
-        int argout = 0;
-        if (dbProxy != null) {
-            try {
-                argout = dbProxy.getDataBase().getAttribute().getFamilies().getFamiliesCount();
-            } catch (final ArchivingException e) {
-                throw e.toTangoException();
-            }
-        }
-        get_logger().info("Exiting get_families_count()");
-        return argout;
-    }
-
-    /**
-     * Execute command "GetFamiliesByDomain" on device. Gets all the registered
-     * families for the given domain.
-     * 
-     * @param argin
-     *            The given domain
-     * @return The registered families for the given domain
-     */
-    public String[] get_families_by_domain(final String argin) throws DevFailed {
-        get_logger().info("Entering get_families_by_domain()");
-        reconnectDatabaseIfNecessary();
-        String[] argout;
-        if (dbProxy == null) {
-            argout = new String[0];
-        } else {
-            try {
-                argout = dbProxy.getDataBase().getAttribute().getFamilies().getFamilies(argin);
-            } catch (final ArchivingException e) {
-                throw e.toTangoException();
-            }
-        }
-        get_logger().info("Exiting get_families_by_domain()");
-        return argout;
-    }
-
-    /**
-     * Execute command "GetFamiliesByDomainCount" on device. Returns the number
-     * of distinct registered families for a given domain.
-     * 
-     * @param argin
-     *            A domain name
-     * @return The number of distinct registered families for a given domain.
-     */
-    public int get_families_by_domain_count(final String argin) throws DevFailed {
-        get_logger().info("Entering get_families_by_domain_count()");
-        reconnectDatabaseIfNecessary();
-        int argout = 0;
-        if (dbProxy != null) {
-            try {
-                argout = dbProxy.getDataBase().getAttribute().getFamilies().getFamiliesCount(argin);
-            } catch (final ArchivingException e) {
-                throw e.toTangoException();
-            }
-        }
-        get_logger().info("Exiting get_families_by_domain_count()");
-        return argout;
-    }
-
-    /**
-     * Execute command "GetMembers" on device. Gets all the registered members
-     * 
-     * @return The registered members
-     */
-    public String[] get_members() throws DevFailed {
-        get_logger().info("Entering get_members()");
-        reconnectDatabaseIfNecessary();
-        String[] argout;
-        if (dbProxy == null) {
-            argout = new String[0];
-        } else {
-            try {
-                argout = dbProxy.getDataBase().getAttribute().getMembers().getMembers();
-            } catch (final ArchivingException e) {
-                throw e.toTangoException();
-            }
-        }
-        get_logger().info("Exiting get_members()");
-        return argout;
-    }
-
-    /**
-     * Execute command "GetMembersCount" on device. Returns the number of
-     * distinct members.
-     * 
-     * @return The number of distinct members.
-     */
-    public int get_members_count() throws DevFailed {
-        get_logger().info("Entering get_members_count()");
-        int argout = 0;
-        reconnectDatabaseIfNecessary();
-        if (dbProxy != null) {
-            // ---Add your Own code to control device here ---
-            try {
-                argout = dbProxy.getDataBase().getAttribute().getMembers().getMembersCount();
-            } catch (final ArchivingException e) {
-                throw e.toTangoException();
-            }
-        }
-        get_logger().info("Exiting get_members_count()");
-        return argout;
-    }
-
-    /**
-     * Execute command "GetMembersByDomainFamily" on device. Gets all the
-     * registered members for the given domain and family
-     * 
-     * @param argin
-     *            The given domain and family
-     * @return The registered members for the given domain and family
-     */
-    public String[] get_members_by_domain_family(final String[] argin) throws DevFailed {
-        get_logger().info("Entering get_members_by_domain_family()");
-        reconnectDatabaseIfNecessary();
-        String[] argout;
-        if (dbProxy == null) {
-            argout = new String[0];
-        } else if (argin.length == 2) {
-            try {
-                argout = dbProxy.getDataBase().getAttribute().getMembers().getMembers(argin[0].trim(), argin[1].trim());
-            } catch (final ArchivingException e) {
-                throw e.toTangoException();
-            }
-        } else {
-            Except.throw_exception("CONFIGURATION_ERROR", "Wrong number of parameters",
-                    "HdbExtractor.get_members_by_domain_family");
-            argout = new String[0];
-        }
-        get_logger().info("Exiting get_members_by_domain_family()");
-        return argout;
-    }
-
-    /**
-     * Execute command "GetMembersByDomainFamilyCount" on device. Returns the
-     * number of distinct registered members for the given domain and family.
-     * 
-     * @param argin
-     *            A domain name, a family name
-     * @return The number of distinct registered members for the given domain
-     *         and family.
-     */
-    public int get_members_by_domain_family_count(final String[] argin) throws DevFailed {
-        get_logger().info("Entering get_members_by_domain_family_count()");
-        reconnectDatabaseIfNecessary();
-        int argout = 0;
-        if (dbProxy != null) {
-            if (argin.length != 2) {
-                Except.throw_exception("CONFIGURATION_ERROR", "Wrong number of parameters",
-                        "HdbExtractor.get_members_by_domain_family_count");
-            } else {
-                try {
-                    argout = dbProxy.getDataBase().getAttribute().getMembers().getMembersCount(argin[0], argin[1]);
-                } catch (final ArchivingException e) {
-                    throw e.toTangoException();
-                }
-            }
-        }
-        get_logger().info("Exiting get_members_by_domain_family_count()");
-        return argout;
-    }
-
-    /**
-     * Execute command "GetAttributesByDomainFamilyMembersCount" on device.
-     * Returns the number of registered the attributes for a given domain,
-     * family, member.
-     * 
-     * @param argin
-     *            A domain name, a family name, a member name.
-     * @return The number of registered the attributes for a given domain,
-     *         family, member.
-     */
-    public int get_attributes_by_domain_family_members_count(final String[] argin) throws DevFailed {
-        get_logger().info("Entering get_attributes_by_domain_family_members_count()");
-        reconnectDatabaseIfNecessary();
-        int argout = 0;
-        if (dbProxy != null) {
-            if (argin.length != 3) {
-                Except.throw_exception("CONFIGURATION_ERROR", "Wrong number of parameters",
-                        "HdbExtractor.get_attributes_by_domain_family_members_count");
-            } else {
-                try {
-                    argout = dbProxy.getDataBase().getAttribute().getNames()
-                            .getAttributesCount(argin[0], argin[1], argin[2]);
-                } catch (final ArchivingException e) {
-                    throw e.toTangoException();
-                }
-            }
-        }
-        get_logger().info("Exiting get_attributes_by_domain_family_members_count()");
-        return argout;
-    }
-
-    /**
-     * Execute command "GetCurrentArchivedAtt" on device. Gets the list of
-     * attributes that are being archived in <I>HDB</I>
-     * 
-     * @return The list of attributes that are being archived
-     */
-    public String[] get_current_archived_att() throws DevFailed {
-        get_logger().info("Entering get_current_archived_att()");
-        reconnectDatabaseIfNecessary();
-        String[] argout;
-        if (dbProxy == null) {
-            argout = new String[0];
-        } else {
-            try {
-                argout = dbProxy.getDataBase().getMode().getCurrentArchivedAtt();
-            } catch (final ArchivingException e) {
-                throw e.toTangoException();
-            }
-        }
-        get_logger().info("Exiting get_current_archived_att()");
-        return argout;
-    }
-
-    /**
-     * Execute command "IsArchived" on device. Returns "true" if the attribute
-     * of given name is currently archived, "false" otherwise.
-     * 
-     * @param argin
-     *            The attribute's name
-     * @return true if the given attribute is being archived
-     */
-    public boolean is_archived(final String argin) throws DevFailed {
-        get_logger().info("Entering is_archived()");
-        reconnectDatabaseIfNecessary();
-        boolean argout = false;
-        if (dbProxy != null) {
-            try {
-                argout = dbProxy.getDataBase().getMode().isArchived(argin);
-            } catch (final ArchivingException e) {
-                throw e.toTangoException();
-            }
-        }
-        get_logger().info("Exiting is_archived()");
-        return argout;
-    }
-
-    /**
-     * Execute command "GetArchivingMode" on device. Gets the archiving mode
-     * used for the specified attribute.
-     * 
-     * @param argin
-     *            The attribute's name
-     * @return The archiving mode used for the specified attribute
-     */
-    public String[] get_archiving_mode(final String argin) throws DevFailed {
-        // get_logger().info("Entering get_archiving_mode()");
-        String[] argout;
-        reconnectDatabaseIfNecessary();
-        if (dbProxy == null) {
-            argout = new String[0];
-        } else {
-            try {
-                // argout = (this.dbProxy.getDataBase().getMode()
-                // .getCurrentArchivingMode(argin)).toArray();
-                final Mode mode = dbProxy.getDataBase().getMode().getCurrentArchivingMode(argin);
-                argout = mode == null ? null : mode.toArray();
-                if (argout == null || argout.length == 0) {
-                    throw new ArchivingException("Invalid attribute: " + argin, "Invalid attribute: " + argin,
-                            ErrSeverity.WARN, "No database connection or \"" + argin
-                                    + "\" attribute not found in database", this.getClass().getName());
-                }
-            } catch (final ArchivingException e) {
-                throw e.toTangoException();
-            }
-        }
-        // get_logger().info("Exiting get_archiving_mode()");
-        return argout;
-    }
-
-    /**
-     * Execute command "GetAttData" on device. Gets all the data archieved for
-     * an attribute. Create a dynamic attribute, retrieve data from database and
-     * prepare result for attribute_history call.
-     * 
-     * @param argin
-     *            The attribute's name
-     * @return String : The new created dynamic attribute name, Long : the
-     *         number of data.
-     */
-    public DevVarLongStringArray get_att_data(final String argin) throws DevFailed {
-        Except.throw_exception("DEPRECATED", "This method is no more available.", "HdbExtractor.get_att_data");
-        return null;
-
-        /*
-         * DevVarLongStringArray argout = new DevVarLongStringArray();
-         * get_logger().info("Entering get_att_data()"); // ---Add your Own code
-         * to control device here --- try { // Get data from db. DbData dbData =
-         * this.dbProxy.getDataBase().getAttData(argin); // Buid an attribute
-         * and gets its references argout = add_attribute(dbData ); } catch (
-         * ArchivingException e ) { e.printStackTrace(); throw
-         * e.toTangoException(); } catch (java.lang.OutOfMemoryError oome) {
-         * get_logger().info("OutOfMemoryError in get_att_data");
-         * Except.throw_exception("MEMORY_ERROR",HintOnMemoryError,
-         * "HdbExtractor.get_att_data"); } catch ( Throwable t ) {
-         * t.printStackTrace(); if (t instanceof DevFailed) { DevError [] errors
-         * = ( (DevFailed) t ).errors; if ( errors != null ) { for ( int i = 0 ;
-         * i < errors.length ; i ++ ) { DevError error = errors [ i ];
-         * get_logger().error (
-         * "Error: /desc/"+error.desc+"/origin/"+error.origin
-         * +"/reason/"+error.reason ); } } get_logger().error (
-         * "Error: /CAUSE---------------" ); if ( ( (DevFailed) t ).getCause()
-         * != null ) { ( (DevFailed) t ).getCause().printStackTrace (); } } }
-         * get_logger().info("Exiting get_att_data()"); return argout;
-         */
-    }
-
-    /**
-     * Execute command "GetAttDataCount" on device. Returns the number of the
-     * data archieved for an attribute.
-     * 
-     * @param argin
-     *            An attribute name.
-     * @return The number of the data archieved for an attribute.
-     */
-    public int get_att_data_count(final String argin) throws DevFailed {
-        get_logger().info("Entering get_att_data_count()");
-        reconnectDatabaseIfNecessary();
-        int argout = 0;
-        if (dbProxy != null) {
-            try {
-                argout = dbProxy.getDataBase().getExtractor().getDataGetters().getAttDataCount(argin);
-            } catch (final ArchivingException e) {
-                throw e.toTangoException();
-            }
-        }
-        get_logger().info("Exiting get_att_data_count()");
-        return argout;
-    }
-
-    /**
-     * Execute command "GetAttDataAvg" on device. Returns the average value
-     * generated by the given attribute.
-     * 
-     * @param argin
-     *            The attribute's name
-     * @return The average of the values generated by the attribute
-     */
-    public double get_att_data_avg(final String argin) throws DevFailed {
-        get_logger().info("Entering get_att_data_avg()");
-        reconnectDatabaseIfNecessary();
-        double argout;
-        if (dbProxy == null) {
-            argout = MathConst.NAN_FOR_NULL;
-        } else {
-            try {
-                argout = dbProxy.getDataBase().getExtractor().getMinMaxAvgGetters().getAttDataAvg(argin);
-            } catch (final ArchivingException e) {
-                throw e.toTangoException();
-            }
-        }
-        get_logger().info("Exiting get_att_data_avg()");
-        return argout;
-    }
-
-    /**
-     * Get the newest inserted value for an attribute. Returns READ part only
-     * 
-     * @param attributeName
-     *            the attribute name
-     * @return timestamp; values
-     * @throws DevFailed
-     */
-    public String getNewestValue(final String attributeName) throws DevFailed {
-        get_logger().info("Entering getNewestValue");
-        reconnectDatabaseIfNecessary();
-        String argout;
-        if (dbProxy == null) {
-            argout = "";
-        } else {
-            try {
-                final DbData data = dbProxy.getDataBase().getExtractor().getDataGetters().getNewestValue(attributeName);
-                if (data.getTimedData() != null && data.getTimedData()[0] != null) {
-                    argout = Long.toString(data.getTimedData()[0].getTime()) + "; ";
-                    final Object value = get(data.getTimedData()[0].getValue(), 0);
-                    argout = argout + String.valueOf(value);
-                } else {
-                    DevFailedUtils.throwDevFailed("no data found for " + attributeName);
-                    argout = "";
-                }
-            } catch (final ArchivingException e) {
-                throw e.toTangoException();
-            }
-        }
-        get_logger().info("Exiting getNewestValue");
-        return argout;
-    }
-
-    /**
-     * Get the nearest value and timestamp of an attribute for a given
-     * timestamp. Returns READ part only
-     * 
-     * @param argin
-     *            [attributeName, timestamp]. timestamp format is DD-MM-YYYY
-     *            HH24:MI:SS
-     * @return timestamp; values
-     * @throws DevFailed
-     */
-    public String getNearestValue(final String[] argin) throws DevFailed {
-        get_logger().info("Entering getNewestValue");
-        reconnectDatabaseIfNecessary();
-        String argout;
-        if (dbProxy == null) {
-            argout = "";
-        } else if (argin.length == 2) {
-            final String attributeName = argin[0];
-            final String timestamp = argin[1];
-            try {
-                final DbData data2 = dbProxy.getDataBase().getExtractor().getDataGetters()
-                        .getNearestValue(attributeName, timestamp);
-                if ((data2.getTimedData() != null) && (data2.getTimedData()[0] != null)) {
-                    argout = Long.toString(data2.getTimedData()[0].getTime()) + "; ";
-                    final Object value = get(data2.getTimedData()[0].getValue(), 0);
-                    argout = argout + String.valueOf(value);
-                } else {
-                    DevFailedUtils.throwDevFailed("no data found for " + attributeName);
-                    argout = "";
-                }
-            } catch (final ArchivingException e) {
-                e.printStackTrace();
-                throw e.toTangoException();
-            }
-        } else {
-            DevFailedUtils.throwDevFailed("input must be of size 2 [attributeName, timestamp] ");
-            argout = "";
-        }
-        get_logger().info("Exiting getNewestValue");
-        return argout;
-    }
-
-    /**
-     * Execute command "GetAttDataAvgBetweenDates" on device. Returns the
-     * average value generated by the given attribute and between the two given
-     * dates.
-     * 
-     * @param argin
-     *            The attribute's name, the beginning date (DD-MM-YYYY
-     *            HH24:MI:SS) and the ending date (DD-MM-YYYY HH24:MI:SS)
-     * @return The average value generated by the given attribute and between
-     *         the two given dates.
-     */
-    public double get_att_data_avg_between_dates(final String[] argin) throws DevFailed {
-        get_logger().info("Entering get_att_data_avg_between_dates()");
-        reconnectDatabaseIfNecessary();
-        double argout;
-        if (dbProxy == null) {
-            argout = 0;
-        } else {
-            if (argin.length == 3) {
-                try {
-                    argout = dbProxy.getDataBase().getExtractor().getMinMaxAvgGettersBetweenDates()
-                            .getAttDataAvgBetweenDates(argin);
-                } catch (final ArchivingException e) {
-                    throw e.toTangoException();
-                }
-            } else {
-                Except.throw_exception("CONFIGURATION_ERROR", "Wrong number of parameters",
-                        "HdbExtractor.get_att_scalar_data_avg_between_dates");
-                argout = 0;
-            }
-        }
-        get_logger().info("Exiting get_att_data_avg_between_dates()");
-        return argout;
-    }
-
-    /**
-     * Execute command "GetAttDataBetweenDates" on device. Retrieves data
-     * beetwen two dates, for a given scalar attribute. Create a dynamic
-     * attribute, retrieve data from database and prepare result for
-     * attribute_history call.
-     * 
-     * @param argin
-     *            The attribute's name, the beginning date (DD-MM-YYYY
-     *            HH24:MI:SS) and the ending date (DD-MM-YYYY HH24:MI:SS)
-     * @return String : The new created dynamic attribute name, Long : the
-     *         number of data.
-     */
-    public DevVarLongStringArray get_att_data_between_dates(final String[] argin) throws DevFailed {
-        get_logger().info("Entering get_att_data_between_dates()");
-        reconnectDatabaseIfNecessary();
-        DevVarLongStringArray argout = null;
-        if (dbProxy != null) {
-            if (argin.length != 3) {
-                Except.throw_exception("CONFIGURATION_ERROR", "Wrong number of parameters",
-                        "HdbExtractor.get_att_scalar_data_beetween_dates");
-            } else {
-                try {
-                    // Get data from db.
-                    final DbData dbData = dbProxy.getDataBase().getExtractor().getDataGettersBetweenDates()
-                            .getAttDataBetweenDates(argin, SamplingType.getSamplingType(SamplingType.ALL));
-                    // Buid an attribute and gets its references
-                    argout = add_attribute(dbData);
-                } catch (final ArchivingException e) {
-
-                    e.printStackTrace();
-                    throw e.toTangoException();
-                }
-            }
-        }
-        get_logger().info("Exiting get_att_data_between_dates()");
-        return argout;
-    }
-
-    /**
-     * Extract an attribute's data for HDB
-     * 
-     * @param argin
-     *            The attribute's name, the beginning date (DD-MM-YYYY
-     *            HH24:MI:SS) and the ending date (DD-MM-YYYY HH24:MI:SS)
-     * @return Long: the timestamps , String: values (read values only
-     * @throws DevFailed
-     */
-    public DevVarDoubleStringArray extractBetweenDates(final String[] argin) throws DevFailed {
-        get_logger().info("Entering get_att_data_between_dates()");
-        reconnectDatabaseIfNecessary();
-        DevVarDoubleStringArray argout = null;
-        if (dbProxy != null) {
-            if (argin.length != 3) {
-                Except.throw_exception("CONFIGURATION_ERROR", "Wrong number of parameters",
-                        "HdbExtractor.get_att_scalar_data_beetween_dates");
-            } else {
-                try {
-                    // Get data from db.
-                    final DbData dbData = dbProxy.getDataBase().getExtractor().getDataGettersBetweenDates()
-                            .getAttDataBetweenDates(argin, SamplingType.getSamplingType(SamplingType.ALL));
-                    final NullableTimedData[] tuples = dbData.getTimedData();
-                    final double[] timeStamps = new double[tuples.length];
-                    final String[] values = new String[tuples.length];
-                    for (int i = 0; i < tuples.length; i++) {
-                        timeStamps[i] = tuples[i].getTime();
-                        values[i] = String.valueOf(get(tuples[i].getValue(), 0));
-                    }
-                    argout = new DevVarDoubleStringArray(timeStamps, values);
-                } catch (final ArchivingException e) {
-
-                    e.printStackTrace();
-                    throw e.toTangoException();
-                }
-            }
-        }
-        get_logger().info("Exiting get_att_data_between_dates()");
-        return argout;
-    }
-
-    protected Object get(Object value, int index) {
-        Object result;
-        if ((value != null) && value.getClass().isArray() && (index > -1) && (index < Array.getLength(value))) {
-            result = Array.get(value, index);
-        } else {
-            result = null;
-        }
-        return result;
-    }
-
-    /**
-     * Execute command "GetAttDataBetweenDates" on device. Retrieves data
-     * beetwen two dates, for a given scalar attribute. Create a dynamic
-     * attribute, retrieve data from database and prepare result for
-     * attribute_history call.
-     * 
-     * @param argin
-     *            : The attribute's name, the beginning date (DD-MM-YYYY
-     *            HH24:MI:SS) and the ending date (DD-MM-YYYY HH24:MI:SS), and
-     *            the sampling type (ALL, SECOND, MINUTE, HOUR, DAY)
-     * @return String : The new created dynamic attribute name, Long : the
-     *         number of data.
-     */
-    public DevVarLongStringArray get_att_data_between_dates_sampling(final String[] argin) throws DevFailed {
-        get_logger().info("Entering get_att_data_between_dates_sampling()");
-        reconnectDatabaseIfNecessary();
-        DevVarLongStringArray argout = null;
-        SamplingType samplingType = null;
-        if (argin.length != 4) {
-            Except.throw_exception("CONFIGURATION_ERROR", "Wrong number of parameters",
-                    "HdbExtractor.get_att_data_between_dates_sampling");
-        }
-        try {
-            samplingType = SamplingType.getSamplingTypeByLabel(argin[3]);
-        } catch (final IllegalArgumentException iae) {
-            Except.throw_exception("CONFIGURATION_ERROR",
-                    "Invalid sampling type. Valid types are ALL, SECOND, MINUTE, HOUR, or DAY",
-                    "HdbExtractor.get_att_data_between_dates_sampling");
-        }
-        if (dbProxy != null) {
-            try {
-                // Get data from db.
-                final DbData dbData = dbProxy.getDataBase().getExtractor().getDataGettersBetweenDates()
-                        .getAttDataBetweenDates(argin, samplingType);
-                // Buid an attribute and gets its references
-                argout = add_attribute(dbData);
-            } catch (final ArchivingException e) {
-                e.printStackTrace();
-                throw e.toTangoException();
-            }
-        }
-        get_logger().info("Exiting get_att_data_between_dates_sampling()");
-        return argout;
-    }
-
-    /**
-     * Execute command "GetAttDataBetweenDatesCount" on device. Returns the
-     * number of data beetwen two dates and, for a given scalar attribute.
-     * 
-     * @param argin
-     *            The attribute's name, the beginning (DD-MM-YYYY HH24:MI:SS)
-     *            date and the ending date (DD-MM-YYYY HH24:MI:SS).
-     * @return The number of data beetwen two dates and, for a given scalar
-     *         attribute.
-     */
-    public int get_att_data_between_dates_count(final String[] argin) throws DevFailed {
-        get_logger().info("Entering get_att_data_between_dates_count()");
-        reconnectDatabaseIfNecessary();
-        int argout = 0;
-        if (dbProxy != null) {
-            if (argin.length != 3) {
-                Except.throw_exception("CONFIGURATION_ERROR", "Wrong number of parameters",
-                        "HdbExtractor.get_att_scalar_data_between_dates_count");
-            } else {
-                try {
-                    argout = dbProxy.getDataBase().getExtractor().getDataGettersBetweenDates()
-                            .getAttDataBetweenDatesCount(argin);
-                } catch (final ArchivingException e) {
-                    throw e.toTangoException();
-                }
-            }
-        }
-        get_logger().info("Exiting get_att_data_between_dates_count()");
-        return argout;
-    }
-
-    /**
-     * Execute command "GetAttDataInfOrSupThan" on device. Retrieves all data
-     * that are lower than the given value x OR higher than the given value y.
-     * Create a dynamic attribute, retrieve the corresponding data from database
-     * and prepare result for attribute_history call.
-     * 
-     * @param argin
-     *            The attribute's name, the lower limit and the upper limit
-     * @return String : The new created dynamic attribute name, Long : the
-     *         number of data.
-     */
-    public DevVarLongStringArray get_att_data_inf_or_sup_than(final String[] argin) throws DevFailed {
-        get_logger().info("Entering get_att_data_inf_or_sup_than()");
-        reconnectDatabaseIfNecessary();
-        DevVarLongStringArray argout = null;
-        if (dbProxy != null) {
-            if (argin.length != 3) {
-                Except.throw_exception("CONFIGURATION_ERROR", "Wrong number of parameters",
-                        "TdbExtractor.get_att_scalar_data_inf_or_sup_than");
-            } else {
-                try {
-                    // Get data from db.
-                    final DbData dbData = dbProxy.getDataBase().getExtractor().getInfSupGetters()
-                            .getAttDataInfOrSupThan(argin);
-                    // Buid an attribute and gets its references
-                    argout = add_attribute(dbData);
-                } catch (final ArchivingException e) {
-                    throw e.toTangoException();
-                }
-            }
-        }
-        get_logger().info("Exiting get_att_data_inf_or_sup_than()");
-        return argout;
-    }
-
-    /**
-     * Execute command "GetAttDataInfOrSupThanCount" on device. Returns the
-     * number of data lower than the given value x OR higher than the given
-     * value y.
-     * 
-     * @param argin
-     *            The attribute's name, the lower limit and the upper limit
-     * @return The number of scalar data lower than the given value x OR higher
-     *         than the given value y.
-     */
-    public int get_att_data_inf_or_sup_than_count(final String[] argin) throws DevFailed {
-        get_logger().info("Entering get_att_data_inf_or_sup_than_count()");
-        reconnectDatabaseIfNecessary();
-        int argout = 0;
-        if (dbProxy != null) {
-            if (argin.length != 3) {
-                Except.throw_exception("CONFIGURATION_ERROR", "Wrong number of parameters",
-                        "HdbExtractor.get_att_scalar_data_inf_or_sup_than_count");
-            } else {
-                try {
-                    argout = dbProxy.getDataBase().getExtractor().getInfSupGetters().getAttDataInfOrSupThanCount(argin);
-                } catch (final ArchivingException e) {
-                    throw e.toTangoException();
-                }
-            }
-        }
-        get_logger().info("Exiting get_att_data_inf_or_sup_than_count()");
-        return argout;
-    }
-
-    /**
-     * Execute command "GetAttDataInfOrSupThanBetweenDates" on device. Retrieves
-     * data beetwen two dates (date_1 & date_2) - Data are lower than the given
-     * value x OR higher than the given value y. Create a dynamic attribute,
-     * retrieve the corresponding data from database and prepare result for
-     * attribute_history call.
-     * 
-     * @param argin
-     *            The attribute's name, the lower limit, the upper limit, the
-     *            beginning date (DD-MM-YYYY HH24:MI:SS) and the ending date
-     *            (DD-MM-YYYY HH24:MI:SS)
-     * @return String : The new created dynamic attribute name, Long : the
-     *         number of data.
-     */
-    public DevVarLongStringArray get_att_data_inf_or_sup_than_between_dates(final String[] argin) throws DevFailed {
-        get_logger().info("Entering get_att_data_inf_or_sup_than_between_dates()");
-        reconnectDatabaseIfNecessary();
-        DevVarLongStringArray argout = new DevVarLongStringArray();
-        if (dbProxy != null) {
-            if (argin.length != 5) {
-                Except.throw_exception("CONFIGURATION_ERROR", "Wrong number of parameters",
-                        "HdbExtractor.get_att_scalar_data_inf_or_sup_than_beetween_dates");
-            } else {
-                try {
-                    // Get data from db.
-                    final DbData dbData = dbProxy.getDataBase().getExtractor().getInfSupGettersBetweenDates()
-                            .getAttDataInfOrSupThanBetweenDates(argin);
-                    // Buid an attribute and gets its references
-                    argout = add_attribute(dbData);
-                } catch (final ArchivingException e) {
-                    throw e.toTangoException();
-                }
-            }
-        }
-        get_logger().info("Exiting get_att_data_inf_or_sup_than_between_dates()");
-        return argout;
-    }
-
-    /**
-     * Execute command "GetAttDataInfOrSupThanBetweenDatesCount" on device.
-     * Returns the number of data beetwen two dates (date_1 & date_2). Data are
-     * lower than the given value x OR higher than the given value y.
-     * 
-     * @param argin
-     *            The attribute's name, the lower limit, the upper limit, the
-     *            beginning date (DD-MM-YYYY HH24:MI:SS) and the ending date
-     *            (DD-MM-YYYY HH24:MI:SS).
-     * @return The number of scalar data lower than the given value x OR higher
-     *         than the given value y, beetwen two dates and for the specified
-     *         attribute.
-     */
-    public int get_att_data_inf_or_sup_than_between_dates_count(final String[] argin) throws DevFailed {
-        get_logger().info("Entering get_att_data_inf_or_sup_than_between_dates_count()");
-        reconnectDatabaseIfNecessary();
-        int argout = 0;
-        if (dbProxy != null) {
-            if (argin.length != 5) {
-                Except.throw_exception("CONFIGURATION_ERROR", "Wrong number of parameters",
-                        "HdbExtractor.get_att_scalar_data_inf_or_sup_than_between_dates_count");
-            } else {
-                try {
-                    argout = dbProxy.getDataBase().getExtractor().getInfSupGettersBetweenDates()
-                            .getAttDataInfOrSupThanBetweenDatesCount(argin);
-                } catch (final ArchivingException e) {
-                    throw e.toTangoException();
-                }
-            }
-        }
-        get_logger().info("Exiting get_att_data_inf_or_sup_than_between_dates_count()");
-        return argout;
-    }
-
-    /**
-     * Execute command "GetAttDataInfThan" on device. Retrieves all the data
-     * that are lower than the given value x. Create a dynamic attribute,
-     * retrieve the corresponding data from database and prepare result for
-     * attribute_history call.
-     * 
-     * @param argin
-     *            The attribute's name, the upper limit
-     * @return String : The new created dynamic attribute name, Long : the
-     *         number of data.
-     */
-    public DevVarLongStringArray get_att_data_inf_than(final String[] argin) throws DevFailed {
-        get_logger().info("Entering get_att_data_inf_than()");
-        reconnectDatabaseIfNecessary();
-        DevVarLongStringArray argout = null;
-        if (dbProxy != null) {
-            if (argin.length != 2) {
-                Except.throw_exception("CONFIGURATION_ERROR", "Wrong number of parameters",
-                        "HdbExtractor.get_att_scalar_data_inf_than");
-            } else {
-                try {
-                    // Get data from db.
-                    final DbData dbData = dbProxy.getDataBase().getExtractor().getInfSupGetters()
-                            .getAttDataInfThan(argin);
-                    // Buid an attribute and gets its references
-                    argout = add_attribute(dbData);
-                } catch (final ArchivingException e) {
-                    throw e.toTangoException();
-                }
-            }
-        }
-        get_logger().info("Exiting get_att_data_inf_than()");
-        return argout;
-    }
-
-    /**
-     * Execute command "GetAttDataInfThanCount" on device. Returns the number of
-     * data lower than the given value.
-     * 
-     * @param argin
-     *            The attribute's name and the upper limit.
-     * @return The number of scalar data lower than the given value and for the
-     *         specified attribute.
-     */
-    public int get_att_data_inf_than_count(final String[] argin) throws DevFailed {
-        get_logger().info("Entering get_att_data_inf_than_count()");
-        reconnectDatabaseIfNecessary();
-        int argout = 0;
-        if (dbProxy != null) {
-            if (argin.length != 2) {
-                Except.throw_exception("CONFIGURATION_ERROR", "Wrong number of parameters",
-                        "HdbExtractor.get_att_scalar_data_inf_than_count");
-            } else {
-                try {
-                    argout = dbProxy.getDataBase().getExtractor().getInfSupGetters().getAttDataInfThanCount(argin);
-                } catch (final ArchivingException e) {
-                    throw e.toTangoException();
-                }
-            }
-        }
-        get_logger().info("Exiting get_att_data_inf_than_count()");
-        return argout;
-    }
-
-    /**
-     * Execute command "GetAttDataInfThanBetweenDates" on device. Retrieves data
-     * beetwen two dates (date_1 & date_2) - Data are lower than the given value
-     * x. Create a dynamic attribute, retrieve the corresponding data from
-     * database and prepare result for attribute_history call.
-     * 
-     * @param argin
-     *            The attribute's name, the upper limit, the beginning date
-     *            (DD-MM-YYYY HH24:MI:SS) and the ending date (DD-MM-YYYY
-     *            HH24:MI:SS)
-     * @return String : The new created dynamic attribute name, Long : the
-     *         number of data.
-     */
-    public DevVarLongStringArray get_att_data_inf_than_between_dates(final String[] argin) throws DevFailed {
-        get_logger().info("Entering get_att_data_inf_than_between_dates()");
-        reconnectDatabaseIfNecessary();
-        DevVarLongStringArray argout = null;
-        if (dbProxy != null) {
-            if (argin.length != 4) {
-                Except.throw_exception("CONFIGURATION_ERROR", "Wrong number of parameters",
-                        "HdbExtractor.get_att_scalar_data_inf_than_beetween_dates");
-            } else {
-                try {
-                    // Get data from db.
-                    final DbData dbData = dbProxy.getDataBase().getExtractor().getInfSupGettersBetweenDates()
-                            .getAttDataInfThanBetweenDates(argin);
-                    // Buid an attribute and gets its references
-                    argout = add_attribute(dbData);
-                } catch (final ArchivingException e) {
-                    throw e.toTangoException();
-                }
-            }
-        }
-        get_logger().info("Exiting get_att_data_inf_than_between_dates()");
-        return argout;
-    }
-
-    /**
-     * Execute command "GetAttDataInfThanBetweenDatesCount" on device. Returns
-     * the number data lower than the given value x, and beetwen two dates
-     * (date_1 & date_2).
-     * 
-     * @param argin
-     *            The attribute's name, the upper limit, the beginning date
-     *            (DD-MM-YYYY HH24:MI:SS) and the ending date (DD-MM-YYYY
-     *            HH24:MI:SS).
-     * @return The number data lower than the given value x, and beetwen two
-     *         dates (date_1 & date_2).
-     */
-    public int get_att_data_inf_than_between_dates_count(final String[] argin) throws DevFailed {
-        get_logger().info("Entering get_att_data_inf_than_between_dates_count()");
-        reconnectDatabaseIfNecessary();
-        int argout = 0;
-        if (dbProxy != null) {
-            if (argin.length != 4) {
-                Except.throw_exception("CONFIGURATION_ERROR", "Wrong number of parameters",
-                        "HdbExtractor.get_att_scalar_data_inf_than_between_dates_count");
-            } else {
-                try {
-                    argout = dbProxy.getDataBase().getExtractor().getInfSupGettersBetweenDates()
-                            .getAttDataInfThanBetweenDatesCount(argin);
-                } catch (final ArchivingException e) {
-                    throw e.toTangoException();
-                }
-            }
-        }
-        get_logger().info("Exiting get_att_data_inf_than_between_dates_count()");
-        return argout;
-    }
-
-    /**
-     * Execute command "GetAttDataLastN" on device. Retrieves the last n
-     * archived data, for a given scalar attribute. Create a dynamic attribute,
-     * retrieve the corresponding data from database and prepare result for
-     * attribute_history call.
-     * 
-     * @param argin
-     *            The attribute's name and the number of wished data
-     * @return String : The new created dynamic attribute name, Long : the
-     *         number of data.
-     */
-    public DevVarLongStringArray get_att_data_last_n(final String[] argin) throws DevFailed {
-        get_logger().info("Entering get_att_data_last_n()");
-        reconnectDatabaseIfNecessary();
-        DevVarLongStringArray argout = null;
-        if (dbProxy != null) {
-            if (argin.length != 2) {
-                Except.throw_exception("CONFIGURATION_ERROR", "Wrong number of parameters",
-                        "HdbExtractor.get_att_scalar_data_last_n");
-            } else {
-                try {
-                    // Get data from db.
-                    final DbData dbData = dbProxy.getDataBase().getExtractor().getDataGetters().getAttDataLastN(argin);
-                    // Buid an attribute and gets its references
-                    argout = add_attribute(dbData);
-                } catch (final ArchivingException e) {
-                    e.printStackTrace();
-                    throw e.toTangoException();
-                }
-            }
-        }
-        get_logger().info("Exiting get_att_data_last_n()");
-        return argout;
-    }
-
-    /**
-     * Execute command "GetAttDataMax" on device. Returns the biggest value
-     * generated by the attribute.
-     * 
-     * @param argin
-     *            The attribute's name
-     * @return The biggest value generated by the attribute
-     */
-    public double get_att_data_max(final String argin) throws DevFailed {
-        get_logger().info("Entering get_att_data_max()");
-        reconnectDatabaseIfNecessary();
-        double argout = 0;
-        if (dbProxy != null) {
-            try {
-                argout = dbProxy.getDataBase().getExtractor().getMinMaxAvgGetters().getAttDataMax(argin);
-            } catch (final ArchivingException e) {
-                throw e.toTangoException();
-            }
-        }
-        get_logger().info("Exiting get_att_data_max()");
-        return argout;
-    }
-
-    /**
-     * Execute command "GetAttDataMaxBetweenDates" on device. Returns the
-     * biggest value generated between the two given dates.
-     * 
-     * @param argin
-     *            The attribute's name, the beginning date (DD-MM-YYYY
-     *            HH24:MI:SS) and the ending date (DD-MM-YYYY HH24:MI:SS)
-     * @return The biggest value generated between the two given dates.
-     */
-    public double get_att_data_max_between_dates(final String[] argin) throws DevFailed {
-        get_logger().info("Entering get_att_data_max_between_dates()");
-        reconnectDatabaseIfNecessary();
-        double argout = 0;
-        if (dbProxy != null) {
-            if (argin.length != 3) {
-                Except.throw_exception("CONFIGURATION_ERROR", "Wrong number of parameters",
-                        "HdbExtractor.get_att_scalar_data_max_between_dates");
-            } else {
-                try {
-                    argout = dbProxy.getDataBase().getExtractor().getMinMaxAvgGettersBetweenDates()
-                            .getAttDataMaxBetweenDates(argin);
-                } catch (final ArchivingException e) {
-                    throw e.toTangoException();
-                }
-            }
-        }
-        get_logger().info("Exiting get_att_data_max_between_dates()");
-        return argout;
-    }
-
-    /**
-     * Execute command "GetAttDataMin" on device. Returns the smallest scalar
-     * value generated by the attribute.
-     * 
-     * @param argin
-     *            The attribute's name
-     * @return The smallest value generated by the attribute
-     */
-    public double get_att_data_min(final String argin) throws DevFailed {
-        get_logger().info("Entering get_att_data_min()");
-        reconnectDatabaseIfNecessary();
-        double argout = 0;
-        if (dbProxy != null) {
-            try {
-                argout = dbProxy.getDataBase().getExtractor().getMinMaxAvgGetters().getAttDataMin(argin);
-            } catch (final ArchivingException e) {
-                throw e.toTangoException();
-            }
-        }
-        get_logger().info("Exiting get_att_data_min()");
-        return argout;
-    }
-
-    /**
-     * Execute command "GetAttDataMinBetweenDates" on device. Returns the
-     * smallest scalar value generated by the given attribute and between two
-     * given dates
-     * 
-     * @param argin
-     *            The attribute's name, the beginning date (DD-MM-YYYY
-     *            HH24:MI:SS) and the ending date (DD-MM-YYYY HH24:MI:SS)
-     * @return The smallest scalar value generated by the given attribute and
-     *         between the two given dates.
-     */
-    public double get_att_data_min_between_dates(final String[] argin) throws DevFailed {
-        get_logger().info("Entering get_att_data_min_between_dates()");
-        reconnectDatabaseIfNecessary();
-        double argout = 0;
-        if (dbProxy != null) {
-            if (argin.length != 3) {
-                Except.throw_exception("CONFIGURATION_ERROR", "Wrong number of parameters",
-                        "HdbExtractor.get_att_scalar_data_min_between_dates");
-            } else {
-                try {
-                    argout = dbProxy.getDataBase().getExtractor().getMinMaxAvgGettersBetweenDates()
-                            .getAttDataMinBetweenDates(argin);
-                } catch (final ArchivingException e) {
-                    throw e.toTangoException();
-                }
-            }
-        }
-        get_logger().info("Exiting get_att_data_min_between_dates()");
-        return argout;
-    }
-
-    /**
-     * Execute command "GetAttDataSupThan" on device. Retrieves all the data
-     * that are higher than the given value x. Create a dynamic attribute,
-     * retrieve the corresponding data from database and prepare result for
-     * attribute_history call.
-     * 
-     * @param argin
-     *            The attribute's name and the lower limit
-     * @return String : The new created dynamic attribute name, Long : the
-     *         number of data.
-     */
-    public DevVarLongStringArray get_att_data_sup_than(final String[] argin) throws DevFailed {
-        get_logger().info("Entering get_att_data_sup_than()");
-        reconnectDatabaseIfNecessary();
-        DevVarLongStringArray argout = null;
-        if (dbProxy != null) {
-            if (argin.length != 2) {
-                Except.throw_exception("CONFIGURATION_ERROR", "Wrong number of parameters",
-                        "HdbExtractor.get_att_scalar_data_sup_than");
-            } else {
-                try {
-                    // Get data from db.
-                    final DbData dbData = dbProxy.getDataBase().getExtractor().getInfSupGetters()
-                            .getAttDataSupThan(argin);
-                    // Buid an attribute and gets its references
-                    argout = add_attribute(dbData);
-                } catch (final ArchivingException e) {
-                    throw e.toTangoException();
-                }
-            }
-        }
-        get_logger().info("Exiting get_att_data_sup_than()");
-        return argout;
-    }
-
-    /**
-     * Execute command "GetAttDataSupThanCount" on device. Returns the number of
-     * data higher than the given value.
-     * 
-     * @param argin
-     *            The attribute's name and the lower limit.
-     * @return The number of data higher than the given value.
-     */
-    public int get_att_data_sup_than_count(final String[] argin) throws DevFailed {
-        get_logger().info("Entering get_att_data_sup_than_count()");
-        reconnectDatabaseIfNecessary();
-        int argout = 0;
-        if (dbProxy != null) {
-            if (argin.length != 2) {
-                Except.throw_exception("CONFIGURATION_ERROR", "Wrong number of parameters",
-                        "HdbExtractor.get_att_scalar_data_sup_than_count");
-            } else {
-                try {
-                    argout = dbProxy.getDataBase().getExtractor().getInfSupGetters().getAttDataSupThanCount(argin);
-                } catch (final ArchivingException e) {
-                    throw e.toTangoException();
-                }
-            }
-        }
-        get_logger().info("Exiting get_att_data_sup_than_count()");
-        return argout;
-    }
-
-    /**
-     * Execute command "GetAttDataSupAndInfThan" on device. Retrieves all data
-     * that are higher than the given value x AND lower than the given value y.
-     * Create a dynamic attribute, retrieve the corresponding data from database
-     * and prepare result for attribute_history call.
-     * 
-     * @param argin
-     *            The attribute's name, the lower limit and the upper limit
-     * @return String : The new created dynamic attribute name, Long : the
-     *         number of data.
-     */
-    public DevVarLongStringArray get_att_data_sup_and_inf_than(final String[] argin) throws DevFailed {
-        get_logger().info("Entering get_att_data_sup_and_inf_than()");
-        reconnectDatabaseIfNecessary();
-        DevVarLongStringArray argout = null;
-        if (dbProxy != null) {
-            if (argin.length != 3) {
-                Except.throw_exception("CONFIGURATION_ERROR", "Wrong number of parameters",
-                        "HdbExtractor.get_att_scalar_data_sup_and_inf_than");
-            } else {
-                try {
-                    // Get data from db.
-                    final DbData dbData = dbProxy.getDataBase().getExtractor().getInfSupGetters()
-                            .getAttDataSupAndInfThan(argin);
-                    // Buid an attribute and gets its references
-                    argout = add_attribute(dbData);
-                } catch (final ArchivingException e) {
-                    throw e.toTangoException();
-                }
-            }
-        }
-        get_logger().info("Exiting get_att_data_sup_and_inf_than()");
-        return argout;
-    }
-
-    /**
-     * Execute command "GetAttDataSupAndInfThanCount" on device. Returns data
-     * that are highter than the given value x AND lower than the given value y.
-     * 
-     * @param argin
-     *            The attribute's name, the lower limit and the upper limit
-     * @return The data that are highter than the given value x AND lower than
-     *         the given value y.
-     */
-    public int get_att_data_sup_and_inf_than_count(final String[] argin) throws DevFailed {
-        get_logger().info("Entering get_att_data_sup_and_inf_than_count()");
-        reconnectDatabaseIfNecessary();
-        int argout = 0;
-        if (dbProxy != null) {
-            if (argin.length != 3) {
-                Except.throw_exception("CONFIGURATION_ERROR", "Wrong number of parameters",
-                        "HdbExtractor.get_att_scalar_data_sup_and_inf_than_count");
-            } else {
-                try {
-                    argout = dbProxy.getDataBase().getExtractor().getInfSupGetters()
-                            .getAttDataSupAndInfThanCount(argin);
-                } catch (final ArchivingException e) {
-                    throw e.toTangoException();
-                }
-            }
-        }
-        get_logger().info("Exiting get_att_data_sup_and_inf_than_count()");
-        return argout;
-    }
-
-    /**
-     * Execute command "GetAttDataSupAndInfThanBetweenDates" on device.
-     * Retrieves data beetwen two dates (date_1 & date_2) - Data are higher than
-     * the given value x AND lower than the given value y. Create a dynamic
-     * attribute, retrieve the corresponding data from database and prepare
-     * result for attribute_history call.
-     * 
-     * @param argin
-     *            The attribute's name, the lower limit, the upper limit, the
-     *            beginning date (DD-MM-YYYY HH24:MI:SS) and the ending date
-     *            (DD-MM-YYYY HH24:MI:SS)
-     * @return String : The new created dynamic attribute name, Long : the
-     *         number of data.
-     */
-    public DevVarLongStringArray get_att_data_sup_and_inf_than_between_dates(final String[] argin) throws DevFailed {
-        get_logger().info("Entering get_att_data_sup_and_inf_than_between_dates()");
-        reconnectDatabaseIfNecessary();
-        DevVarLongStringArray argout = null;
-        if (dbProxy != null) {
-            if (argin.length != 5) {
-                Except.throw_exception("CONFIGURATION_ERROR", "Wrong number of parameters",
-                        "HdbExtractor.get_att_scalar_data_sup_and_inf_than_beetween_dates");
-            } else {
-                try {
-                    // Get data from db.
-                    final DbData dbData = dbProxy.getDataBase().getExtractor().getInfSupGettersBetweenDates()
-                            .getAttDataSupAndInfThanBetweenDates(argin);
-                    // Buid an attribute and gets its references
-                    argout = add_attribute(dbData);
-                } catch (final ArchivingException e) {
-                    throw e.toTangoException();
-                }
-            }
-        }
-        get_logger().info("Exiting get_att_data_sup_and_inf_than_between_dates()");
-        return argout;
-    }
-
-    /**
-     * Execute command "GetAttDataSupAndInfThanBetweenDatesCount" on device.
-     * Returns the number of data higher than the given value x, (AND) lower
-     * than the given value y, and beetwen two dates (date_1 & date_2).
-     * 
-     * @param argin
-     *            The attribute's name, the lower limit, the upper limit, the
-     *            beginning date (DD-MM-YYYY HH24:MI:SS) and the ending date
-     *            (DD-MM-YYYY HH24:MI:SS).
-     * @return The number of data higher than the given value x, (AND) lower
-     *         than the given value y, and beetwen two dates (date_1 & date_2).
-     */
-    public int get_att_data_sup_and_inf_than_between_dates_count(final String[] argin) throws DevFailed {
-        get_logger().info("Entering get_att_data_sup_and_inf_than_between_dates_count()");
-        reconnectDatabaseIfNecessary();
-        int argout = 0;
-        if (dbProxy != null) {
-            if (argin.length != 5) {
-                Except.throw_exception("CONFIGURATION_ERROR", "Wrong number of parameters",
-                        "HdbExtractor.get_att_scalar_data_sup_and_inf_than_between_dates_count");
-            } else {
-                try {
-                    argout = dbProxy.getDataBase().getExtractor().getInfSupGettersBetweenDates()
-                            .getAttDataSupAndInfThanBetweenDatesCount(argin);
-                } catch (final ArchivingException e) {
-                    throw e.toTangoException();
-                }
-            }
-        }
-        get_logger().info("Exiting get_att_data_sup_and_inf_than_between_dates_count()");
-        return argout;
-    }
-
-    /**
-     * Execute command "GetAttDataSupThanBetweenDates" on device. Retrieves data
-     * beetwen two dates (date_1 & date_2) - Data are higher than the given
-     * value x. Create a dynamic attribute, retrieve the corresponding data from
-     * database and prepare result for attribute_history call.
-     * 
-     * @param argin
-     *            The attribute's name, the lower limit, the beginning date
-     *            (DD-MM-YYYY HH24:MI:SS) and the ending date (DD-MM-YYYY
-     *            HH24:MI:SS)
-     * @return String : The new created dynamic attribute name, Long : the
-     *         number of data.
-     */
-    public DevVarLongStringArray get_att_data_sup_than_between_dates(final String[] argin) throws DevFailed {
-        get_logger().info("Entering get_att_data_sup_than_between_dates()");
-        reconnectDatabaseIfNecessary();
-        DevVarLongStringArray argout = null;
-        if (dbProxy != null) {
-            if (argin.length != 4) {
-                Except.throw_exception("CONFIGURATION_ERROR", "Wrong number of parameters",
-                        "HdbExtractor.get_att_scalar_data_sup_than_beetween_dates");
-            } else {
-                try {
-                    // Get data from db.
-                    final DbData dbData = dbProxy.getDataBase().getExtractor().getInfSupGettersBetweenDates()
-                            .getAttDataSupThanBetweenDates(argin);
-                    // Buid an attribute and gets its references
-                    argout = add_attribute(dbData);
-                } catch (final ArchivingException e) {
-                    throw e.toTangoException();
-                }
-            }
-        }
-        get_logger().info("Exiting get_att_data_sup_than_between_dates()");
-        return argout;
-    }
-
-    /**
-     * Execute command "GetAttDataSupThanBetweenDatesCount" on device. Returns
-     * the number of data higher than the given value y, and beetwen two dates
-     * (date_1 & date_2).
-     * 
-     * @param argin
-     *            The attribute's name, the lower limit, the beginning date
-     *            (DD-MM-YYYY HH24:MI:SS) and the ending date (DD-MM-YYYY
-     *            HH24:MI:SS).
-     * @return The number of data higher than the given value y, and beetwen two
-     *         dates (date_1 & date_2).
-     */
-    public int get_att_data_sup_than_between_dates_count(final String[] argin) throws DevFailed {
-        get_logger().info("Entering get_att_data_sup_than_between_dates_count()");
-        reconnectDatabaseIfNecessary();
-        int argout = 0;
-        if (dbProxy != null) {
-            if (argin.length != 4) {
-                Except.throw_exception("CONFIGURATION_ERROR", "Wrong number of parameters",
-                        "HdbExtractor.get_att_scalar_data_sup_than_between_dates_count");
-            } else {
-                try {
-                    argout = dbProxy.getDataBase().getExtractor().getInfSupGettersBetweenDates()
-                            .getAttDataSupThanBetweenDatesCount(argin);
-                } catch (final ArchivingException e) {
-                    throw e.toTangoException();
-                }
-            }
-        }
-        get_logger().info("Exiting get_att_data_sup_than_between_dates_count()");
-        return argout;
-    }
-
-    /**
-     * Execute command "RemoveDynamicAttribute" on device. Remove the dynamic
-     * attribute.
-     * 
-     * @param argin
-     *            The HdbExtractor dynamic attribute's name
-     */
-    public void remove_dynamic_attribute(final String argin) throws DevFailed {
-        get_logger().info("Entering remove_dynamic_attribute()");
-
-        // Remove prop for the attribute
-        final String[] obj_to_del = new String[3];
-        obj_to_del[0] = device_name;
-        obj_to_del[1] = "attribute";
-        obj_to_del[2] = argin;
-        final Util tg = Util.instance();
-        tg.get_dserver_device().rem_obj_polling(obj_to_del, false);
-
-        // Remove the attribute
-        remove_attribute(argin);
-        get_logger().info("Exiting remove_dynamic_attribute()");
-    }
-
-    public String getName(final String completeName, final int id, final boolean isReadValue) {
-        final String partialName = getPartialName(completeName);
-        final String marker = isReadValue ? "r" : "w";
-
-        final StringBuilder buff = new StringBuilder();
-        buff.append(partialName);
-        buff.append("_");
-        buff.append(String.valueOf(id));
-        buff.append("_");
-        buff.append(marker);
-
-        return buff.toString().toLowerCase();
-    }
-
-    /**
-     * @param completeName
-     * @return
-     */
-    private String getPartialName(final String completeName) {
-        try {
-            final StringTokenizer st = new StringTokenizer(completeName, "/");
-            st.nextToken();// domain
-            st.nextToken();// family
-            st.nextToken();// member
-            return st.nextToken();// attribute
-        } catch (final Exception e) {
-            e.printStackTrace();
-            return null;
-        }
-    }
-
-    private DevVarLongStringArray add_attribute(final DbData dbData) throws DevFailed, ArchivingException {
-        if (dbData.getTimedData() == null || dbData.getTimedData().length == 0) {
-            // String message = "Can't create the dynamic attribute!";
-            // String reason = "The data is empty.";
-            // String desc = "add_attribute/The DbData argument is empty.";
-
-            // throw new ArchivingException(message , reason , null , desc ,
-            // this.getClass().getName());
-            final int[] lv = { 0 };
-            final String[] sv = { "NO_DATA" };
-            final DevVarLongStringArray res = new DevVarLongStringArray(lv, sv);
-            return res;
-
-        }
-
-        DevVarLongStringArray argout = new DevVarLongStringArray();
-
-        final boolean _2value = dbData.getWritable() == AttrWriteType._READ_WITH_WRITE
-                || dbData.getWritable() == AttrWriteType._READ_WRITE ? true : false;
-        String random_name_1 = "", random_name_2 = "";
-        String[] names;
-        // Build new Attribute's name
-        final boolean firstIsRead = dbData.getWritable() != AttrWriteType._WRITE;
-        // random_name_1 = "att_000" + id++;
-        random_name_1 = getName(dbData.getName(), id, firstIsRead);
-        if (_2value) {
-            // random_name_2 = "att_000" + id++;
-            random_name_2 = getName(dbData.getName(), id, !firstIsRead);
-        }
-        id++;
-
-        if (!_2value) {
-            names = new String[1];
-            names[0] = random_name_1;
-        } else {
-            names = new String[2];
-            names[0] = random_name_1;
-            names[1] = random_name_2;
-        }
-
-        int data_type;
-        data_type = dbData.getDataType();
-
-        if (data_type == TangoConst.Tango_DEV_STATE) {
-            // The STATE type attributes are translated in STRING TYPE because
-            // the State type is not well
-            // managed in Tango layers
-            data_type = TangoConst.Tango_DEV_STRING;
-        } else if (data_type == TangoConst.Tango_DEV_USHORT || data_type == TangoConst.Tango_DEV_UCHAR) {
-            // U_* types are not supported by polling buffer, so use another
-            // supported type
-            data_type = TangoConst.Tango_DEV_SHORT;
-        } else if (data_type == TangoConst.Tango_DEV_ULONG) {
-            data_type = TangoConst.Tango_DEV_LONG;
-        } else if (data_type == TangoConst.Tango_DEV_ULONG64) {
-            data_type = TangoConst.Tango_DEV_LONG64;
-        }
-
-        // Create the attribute depends on DataFormat
-        switch (dbData.getDataFormat()) {
-            case AttrDataFormat._SCALAR:
-                // TODO Correction Tango � reporter !! Tango [Java side]
-                // ne
-                // supporte pas les attributs READ-WRITE.
-                // add_attribute(new Attr(random_name_1,
-                // dbData.getData_type(),
-                // AttrWriteType.from_int(dbData.getWritable())));
-                add_attribute(new Attr(random_name_1, data_type, AttrWriteType.READ));
-
-                if (_2value) {
-                    add_attribute(new Attr(random_name_2, data_type, AttrWriteType.READ));
-                }
-                break;
-            case AttrDataFormat._SPECTRUM:
-                int dimX = dbData.getMaxX();
-                if (dimX == 0) {
-                    dimX = 1;
-                }
-                add_attribute(new SpectrumAttr(random_name_1, data_type, dimX));
-                if (_2value) {
-                    add_attribute(new SpectrumAttr(random_name_2, data_type, dimX));
-                }
-                break;
-            case AttrDataFormat._IMAGE:
-                add_attribute(new ImageAttr(random_name_1, data_type, dbData.getMaxX(), dbData.getMaxY()));
-                break;
-        }
-
-        get_logger().info("attr " + random_name_1 + " created");
-        if (_2value) {
-            get_logger().info("attr " + random_name_2 + " created");
-        }
-        set_polled_attr(names);
-        set_poll_ring_depth(dbData.size());
-
-        // Start polling for this device in external sync. mode (udt = 0)
-        DevVarLongStringArray poll_1, poll_2;
-        poll_1 = new DevVarLongStringArray();
-        poll_2 = new DevVarLongStringArray();
-
-        poll_1.lvalue = new int[1];
-        poll_1.lvalue[0] = 0;
-        poll_1.svalue = new String[3];
-        poll_1.svalue[0] = device_name;
-        poll_1.svalue[1] = "attribute";
-        poll_1.svalue[2] = random_name_1;
-
-        if (_2value) {
-            poll_2.lvalue = new int[1];
-            poll_2.lvalue[0] = 0;
-            poll_2.svalue = new String[3];
-            poll_2.svalue[0] = device_name;
-            poll_2.svalue[1] = "attribute";
-            poll_2.svalue[2] = random_name_2;
-        }
-        final Util tg_1 = Util.instance();
-        tg_1.get_dserver_device().add_obj_polling(poll_1, false);
-
-        final Util tg_2 = Util.instance();
-        if (_2value) {
-            tg_2.get_dserver_device().add_obj_polling(poll_2, false);
-        }
-
-        // And fill buffer with database's data
-        try {
-            if (_2value) {
-                final DbData[] dbDatas = dbData.splitDbData();
-                tg_1.fill_attr_polling_buffer(this, random_name_1, dbDatas[0].getDataAsTimedAttrData());
-                tg_2.fill_attr_polling_buffer(this, random_name_2, dbDatas[1].getDataAsTimedAttrData());
-            } else {
-                tg_1.fill_attr_polling_buffer(this, random_name_1, dbData.getDataAsTimedAttrData());
-            }
-        } catch (final DevFailed e) {
-            throw e;
-        } catch (final Exception e) {
-            // FIXME java.lang.ArrayIndexOutOfBoundsException thrown when some
-            // data are empty.
-            e.printStackTrace();
-            System.out.println("ERROR when filling data polling buffer, may be empty");
-        }
-
-        argout = new DevVarLongStringArray();
-        argout.lvalue = new int[1];
-        if (_2value) {
-            argout.svalue = new String[2];
-        } else {
-            argout.svalue = new String[1];
-        }
-
-        argout.lvalue[0] = dbData.getTimedData().length;
-        argout.svalue[0] = random_name_1;
-        if (_2value) {
-            argout.svalue[1] = random_name_2;
-        }
-
-        return argout;
-
-    }
-
-    /**
-     * Method called by the read_attributes CORBA operation to set internal
-     * attribute value.
-     * 
-     * @param attr
-     *            reference to the Attribute object
-     */
-    @Override
-    public void read_attr(final Attribute attr) throws DevFailed {
-        final String attr_name = attr.get_name();
-        // get_logger().info("In read_attr for attribute " + attr_name);
-
-        // Switch on attribute name
-        // ---------------------------------
-        if (attr_name == "version") {
-            // Add your own code here
-            attr.set_value(m_version);
-        }
-    }
-
-    public String get_max_time(final String argin) throws DevFailed {
-        reconnectDatabaseIfNecessary();
-        String argout;
-        if (dbProxy == null) {
-            argout = "";
-        } else {
-            try {
-                final DataBaseManager db = dbProxy.getDataBase();
-                final Timestamp last = db.getDbUtil().getTimeOfLastInsert(argin, true);
-                if (last == null) {
-                    argout = "NO VALUES RECORDED";
-                } else {
-                    argout = last.toString();
-                }
-            } catch (final ArchivingException e) {
-                e.printStackTrace();
-                throw e.toTangoException();
-            }
-        }
-        return argout;
-    }
-
-    public String get_min_time(final String argin) throws DevFailed {
-        reconnectDatabaseIfNecessary();
-        String argout;
-        if (dbProxy == null) {
-            argout = "";
-        } else {
-            try {
-                final DataBaseManager db = dbProxy.getDataBase();
-                final Timestamp last = db.getDbUtil().getTimeOfLastInsert(argin, false);
-                if (last == null) {
-                    argout = "NO VALUES RECORDED";
-                } else {
-                    argout = last.toString();
-                }
-            } catch (final ArchivingException e) {
-                e.printStackTrace();
-                throw e.toTangoException();
-            }
-        }
-        return argout;
-    }
-
-    @Override
-    public void delete_device() throws DevFailed {
-        // TODO Auto-generated method stub
-
-    }
-
-    /**
-     * main part for the device server class
-     */
-    public static void main(final String[] argv) {
-        try {
-            final Util tg = Util.init(argv, "HdbExtractor");
-            tg.server_init();
-
-            System.out.println("Ready to accept request");
-
-            tg.server_run();
-        } catch (final OutOfMemoryError ex) {
-            System.err.println("Can't allocate memory !!!!");
-            System.err.println("Exiting");
-        } catch (final UserException ex) {
-            Except.print_exception(ex);
-
-            System.err.println("Received a CORBA user exception");
-            System.err.println("Exiting");
-        } catch (final SystemException ex) {
-            Except.print_exception(ex);
-
-            System.err.println("Received a CORBA system exception");
-            System.err.println("Exiting");
-        }
-
-        System.exit(-1);
-    }
-
-}
+// +============================================================================
+// $Source:
+// /cvsroot/tango-cs/tango/jserver/archiving/HdbExtractor/HdbExtractor.java,v $
+//
+// project : Tango Device Server
+//
+// Description: java source code for the HdbExtractor class and its commands.
+// This class is derived from DeviceImpl class.
+// It represents the CORBA servant obbject which
+// will be accessed from the network. All commands which
+// can be executed on the HdbExtractor are implemented
+// in this file.
+//
+// $Author: pierrejoseph $
+//
+// $Revision: 1.33 $
+//
+// $Log: HdbExtractor.java,v $
+// Revision 1.33 2007/05/11 13:58:34 pierrejoseph
+// Attribute addition : release version
+//
+// Revision 1.32 2007/04/24 14:29:27 ounsy
+// added a log in the case of unexpected ClassCast exception on the event's
+// value
+//
+// Revision 1.31 2007/03/16 14:09:35 ounsy
+// minor changes
+//
+// Revision 1.30 2007/03/16 08:44:13 ounsy
+// added a GetMinTime command
+//
+// Revision 1.29 2007/03/05 16:25:20 ounsy
+// non-static DataBase
+//
+// Revision 1.28 2007/03/02 08:46:02 ounsy
+// added the GetMaxTime command
+//
+// Revision 1.27 2007/03/01 10:08:01 ounsy
+// added the RemoveDynamicAttributes command
+//
+// Revision 1.26 2007/02/26 16:14:24 ounsy
+// archiving devices now inherits just from DeviceImpl instead of
+// DeviceImplWithShutdownRunnable (they're nonlonger unexported onn shutdown)
+//
+// Revision 1.25 2007/02/08 08:44:15 pierrejoseph
+// The method getAttData is no more available (costly).
+//
+// Revision 1.24 2007/02/05 17:04:37 ounsy
+// corrected a bug for spectrum attributes with an empty value
+//
+// Revision 1.23 2006/12/06 13:25:34 ounsy
+// removed useless elements
+//
+// Revision 1.22 2006/12/06 10:17:05 ounsy
+// minor changes
+//
+// Revision 1.21 2006/11/30 15:30:15 ounsy
+// corrected a bug in add_attribute() when the extracted DbData is empty; the
+// dynamic attribute is no longer created, and a DevFailed is recieved instead
+//
+// Revision 1.20 2006/11/20 09:24:49 ounsy
+// minor changes
+//
+// Revision 1.19 2006/11/13 15:57:37 ounsy
+// all java devices now inherit from UnexportOnShutdownDeviceImpl instead of
+// from DeviceImpl
+//
+// Revision 1.18 2006/10/31 16:54:12 ounsy
+// milliseconds and null values management
+//
+// Revision 1.17 2006/10/09 12:56:28 chinkumo
+// A specific exception is raised when an outOfMemory error appeared, for the
+// methods who generate dynamics attributes.
+//
+// Revision 1.16 2006/09/07 13:48:29 ounsy
+// added extraction with sampling methods
+//
+// Revision 1.15 2006/09/05 12:25:16 ounsy
+// updated for sampling compatibility
+//
+// Revision 1.14 2006/07/24 09:55:22 ounsy
+// now uses buffered attribute ids
+//
+// Revision 1.13 2006/03/14 13:09:55 ounsy
+// removed useless logs
+//
+// Revision 1.12 2006/02/15 13:11:31 ounsy
+// organized imports
+//
+// Revision 1.11 2006/02/07 11:56:09 ounsy
+// removed useless logs
+//
+// Revision 1.10 2006/02/06 13:10:14 ounsy
+// added spectrum RO/RW support
+//
+// Revision 1.9 2006/01/27 13:07:05 ounsy
+// organised imports
+//
+// Revision 1.8 2005/11/29 17:33:38 chinkumo
+// no message
+//
+// Revision 1.7.10.4 2005/11/29 16:17:38 chinkumo
+// Code reformated (pogo compatible)
+//
+// Revision 1.7.10.3 2005/11/15 13:45:52 chinkumo
+// ...
+//
+// Revision 1.7.10.2 2005/09/26 07:58:49 chinkumo
+// Every commands of shape 'getAttDataXXXXCount(...)' was changed. The type of
+// their returned object was changed from 'short' to 'long'.
+//
+// Revision 1.7.10.1 2005/09/09 10:37:40 chinkumo
+// Since the extraction politic changed to 'dynamic attributes', the device was
+// pogo-regenerated.
+//
+//
+// copyleft : European Synchrotron Radiation Facility
+// BP 220, Grenoble 38043
+// FRANCE
+//
+// -============================================================================
+//
+// This file is generated by POGO
+// (Program Obviously used to Generate tango Object)
+//
+// (c) - Software Engineering Group - ESRF
+// =============================================================================
+
+package HdbExtractor;
+
+import java.lang.reflect.Array;
+import java.sql.Timestamp;
+import java.util.StringTokenizer;
+
+import fr.soleil.archiving.hdbtdb.api.ConfigConst;
+import fr.soleil.database.connection.DataBaseParameters;
+import org.omg.CORBA.SystemException;
+import org.omg.CORBA.UserException;
+import org.tango.utils.DevFailedUtils;
+
+import HdbExtractor.Proxy.DbProxy;
+import fr.esrf.Tango.AttrDataFormat;
+import fr.esrf.Tango.AttrWriteType;
+import fr.esrf.Tango.DevFailed;
+import fr.esrf.Tango.DevState;
+import fr.esrf.Tango.DevVarDoubleStringArray;
+import fr.esrf.Tango.DevVarLongStringArray;
+import fr.esrf.Tango.ErrSeverity;
+import fr.esrf.TangoApi.DbDevice;
+import fr.esrf.TangoDs.Attr;
+import fr.esrf.TangoDs.Attribute;
+import fr.esrf.TangoDs.DeviceClass;
+import fr.esrf.TangoDs.DeviceImpl;
+import fr.esrf.TangoDs.Except;
+import fr.esrf.TangoDs.ImageAttr;
+import fr.esrf.TangoDs.SpectrumAttr;
+import fr.esrf.TangoDs.TangoConst;
+import fr.esrf.TangoDs.Util;
+import fr.soleil.archiving.common.api.exception.ArchivingException;
+import fr.soleil.archiving.common.api.tools.DbData;
+import fr.soleil.archiving.common.api.tools.NullableTimedData;
+import fr.soleil.archiving.hdbtdb.api.DataBaseManager;
+import fr.soleil.archiving.hdbtdb.api.HdbTdbConnectionParameters;
+import fr.soleil.archiving.hdbtdb.api.management.attributes.adtapt.IAdtAptAttributes;
+import fr.soleil.archiving.hdbtdb.api.tools.SamplingType;
+import fr.soleil.archiving.hdbtdb.api.tools.mode.Mode;
+import fr.soleil.archiving.hdbtdb.api.utils.database.DbUtils;
+import fr.soleil.lib.project.math.MathConst;
+
+/**
+ * Class Description: A DServer used for historical database's extractions.
+ * 
+ * @author $Author: pierrejoseph $
+ * @version $Revision: 1.33 $
+ */
+public class HdbExtractor extends DeviceImpl implements TangoConst {
+
+    protected int state;
+    private DbProxy dbProxy;
+    private final String m_version;
+    protected int id = 0;
+
+    /**
+     * Constructor for simulated Time Device Server.
+     * 
+     * @param cl
+     *            The DeviceClass object
+     * @param s
+     *            The Device name.
+     * @param version
+     *            The device version
+     */
+    public HdbExtractor(final DeviceClass cl, final String s, final String version) throws DevFailed {
+        super(cl, s);
+        m_version = version;
+        init_device();
+    }
+
+    /**
+     * Constructor for simulated Time Device Server.
+     * 
+     * @param cl
+     *            The DeviceClass object
+     * @param s
+     *            The Device name.
+     * @param d
+     *            Device description.
+     * @param version
+     *            The device version
+     */
+    public HdbExtractor(final DeviceClass cl, final String s, final String d, final String version) throws DevFailed {
+        super(cl, s, d);
+        m_version = version;
+        init_device();
+    }
+
+    /**
+     * Initialize the device.
+     */
+    @Override
+    public void init_device() {
+        System.out.println("HdbExtractor() create " + device_name);
+        connectDatabase();
+        get_logger().info("Exiting init_device()");
+    }
+
+    public void remove_dynamic_attributes() throws DevFailed {
+        get_logger().info("Entering remove_dynamic_attributes()");
+        while (dev_attr.get_attr_nb() > 0) {
+            final Attribute nextAttribute = dev_attr.get_attr_by_ind(0);
+            final String attributeName = nextAttribute.get_name();
+            remove_attribute(attributeName);
+        }
+        get_logger().info("Exiting remove_dynamic_attributes()");
+    }
+
+    private void connectDatabase() {
+        DbDevice device = get_db_device();
+        ArchivingException exception = null;
+        try {
+            final DataBaseParameters params = new DataBaseParameters();
+            params.setParametersFromTango(ConfigConst.HDB_CLASS_DEVICE);
+            dbProxy = new DbProxy(params);
+        } catch (ArchivingException e) {
+            dbProxy = null;
+            e.printStackTrace();
+            exception = e;
+        } catch (DevFailed devFailed) {
+            devFailed.printStackTrace();
+        }
+        StringBuilder builder = new StringBuilder(device_name);
+        if ((dbProxy == null) || (!dbProxy.is_db_connected())) {
+            set_state(DevState.FAULT);
+            builder.append(": DevState.FAULT\nHistorical database connection: FAULT (may be broken...)\n");
+            if (exception != null) {
+                builder.append("reason:\n").append(exception);
+            }
+            get_logger().error("ERROR: Database unconnected !!");
+        } else {
+            set_state(DevState.ON);
+            builder.append(": DevState.ON\nHistorical database connection: OK\n");
+        }
+        set_status(builder.toString());
+    }
+
+    private synchronized void reconnectDatabaseIfNecessary() {
+        if (dbProxy == null) {
+            connectDatabase();
+        }
+    }
+
+    /**
+     * Method always executed before command execution.
+     */
+    @Override
+    public void always_executed_hook() {
+        // get_logger().info("In always_executed_hook method()");
+    }
+
+    /**
+     * Execute command "GetInfo" on device. Returns misc informations about the
+     * database and a set of parameters characterizing the connection.
+     * 
+     * @return The informations that characterize the database
+     */
+    public String get_info() throws DevFailed {
+        get_logger().info("Entering get_info()");
+        reconnectDatabaseIfNecessary();
+        String argout;
+        if (dbProxy == null) {
+            argout = "";
+        } else {
+            argout = dbProxy.getDataBase().getConnectionInfo();
+        }
+        get_logger().info("Exiting get_info()");
+        return argout;
+    }
+
+    /**
+     * Execute command "GetHost" on device. Returns the connected database host
+     * identifier.
+     * 
+     * @return The connected database host identifier.
+     * @throws ArchivingException
+     */
+    public String get_host() throws DevFailed {
+        get_logger().info("Entering get_host()");
+        reconnectDatabaseIfNecessary();
+        final String argout = dbProxy == null ? "" : dbProxy.getDataBase().getHost();
+        get_logger().info("Exiting get_host()");
+        return argout;
+    }
+
+    /**
+     * Execute command "GetUser" on device. Gets the current user's name used
+     * for the connection.
+     * 
+     * @return The current user's name used for the connection.
+     * @throws ArchivingException
+     */
+    public String get_user() throws DevFailed, ArchivingException {
+        get_logger().info("Entering get_user()");
+        reconnectDatabaseIfNecessary();
+        final String argout = dbProxy == null ? "" : dbProxy.getDataBase().getUser();
+        get_logger().info("Exiting get_user()");
+        return argout;
+    }
+
+    /**
+     * Execute command "GetConnectionState" on device. Cheks if the connection
+     * to the historical database is alive.
+     * 
+     * @return The connection state
+     */
+    public boolean get_connection_state() throws DevFailed {
+        get_logger().info("Entering get_connection_state()");
+        reconnectDatabaseIfNecessary();
+        boolean argout = false;
+       // if (dbProxy != null) {
+        //    try {
+         //       argout = dbProxy.getDataBase().isConnected();
+         //   } catch (final ArchivingException e) {
+         //       // TODO Auto-generated catch block
+          //      e.printStackTrace();
+          //  }
+       // }
+        get_logger().info("Exiting get_connection_state()");
+        return argout;
+    }
+
+    /**
+     * Execute command "GetAttDefinitionData" on device. Returns an array
+     * containing the differents definition informations for the given
+     * attribute.
+     * 
+     * @param argin
+     *            The attribute's name
+     * @return Differents definition informations for the given attribute
+     */
+    public String[] get_att_definition_data(final String argin) throws DevFailed {
+        get_logger().info("Entering get_att_definition_data()");
+        reconnectDatabaseIfNecessary();
+        String[] argout;
+        if (dbProxy == null) {
+            argout = new String[0];
+        } else {
+            try {
+                argout = DbUtils.toStringArray(dbProxy.getDataBase().getAttribute().getAttDefinitionData(argin));
+            } catch (final ArchivingException e) {
+                throw e.toTangoException();
+            }
+        }
+        get_logger().info("Exiting get_att_definition_data()");
+        return argout;
+    }
+
+    /**
+     * Execute command "GetAttPropertiesData" on device. Gets the differents
+     * properties informations for the given attribute
+     * 
+     * @param argin
+     *            The attribute's name
+     * @return An array containing the differents properties for the given
+     *         attribute
+     */
+    public String[] get_att_properties_data(final String argin) throws DevFailed {
+        get_logger().info("Entering get_att_properties_data()");
+        reconnectDatabaseIfNecessary();
+        String[] argout;
+        if (dbProxy == null) {
+            argout = new String[0];
+        } else {
+            try {
+                IAdtAptAttributes adtAptAttributes = dbProxy.getDataBase().getAttribute();
+                argout = DbUtils.toStringArray(adtAptAttributes.getProperties().getAttPropertiesData(argin,
+                        adtAptAttributes.isCaseSentitiveDatabase()));
+            } catch (final ArchivingException e) {
+                throw e.toTangoException();
+            }
+        }
+        get_logger().info("Exiting get_att_properties_data()");
+        return argout;
+    }
+
+    /**
+     * Execute command "GetAttFullName" on device. Gets for a specified
+     * attribute id its full name as defined in HDB
+     * 
+     * @param argin
+     *            The attribute's id
+     * @return The HDB's full name that characterize the given attribute
+     */
+    public String get_att_full_name(final int argin) throws DevFailed {
+        get_logger().info("Entering get_att_full_name()");
+        String argout;
+        reconnectDatabaseIfNecessary();
+        try {
+            argout = dbProxy == null ? "" : dbProxy.getDataBase().getAttribute().getNames().getAttFullName(argin);
+        } catch (final ArchivingException e) {
+            throw e.toTangoException();
+        }
+        get_logger().info("Exiting get_att_full_name()");
+        return argout;
+    }
+
+    /**
+     * Execute command "GetAttId" on device. Gets for a specified attribute its
+     * ID as defined in HDB
+     * 
+     * @param argin
+     *            The attribute's name
+     * @return The HDB's ID that characterize the given attribute
+     */
+    public int get_att_id(final String argin) throws DevFailed {
+        get_logger().info("Entering get_att_id()");
+        reconnectDatabaseIfNecessary();
+        int argout = 0;
+        if (dbProxy != null) {
+            try {
+                // argout = this.dbProxy.getDataBase().getAttID(argin);
+                IAdtAptAttributes adtAptAttributes = dbProxy.getDataBase().getAttribute();
+                argout = adtAptAttributes.getIds().getAttID(argin, adtAptAttributes.isCaseSentitiveDatabase());
+            } catch (final ArchivingException e) {
+                throw e.toTangoException();
+            }
+        }
+        get_logger().info("Exiting get_att_id()");
+        return argout;
+    }
+
+    /**
+     * Execute command "GetAttNameAll" on device. Gets whole list of the
+     * attributes registered in HDB
+     * 
+     * @return The whole list of the attributes registered in HDB
+     */
+    public String[] get_att_name_all() throws DevFailed {
+        get_logger().info("Entering get_att_name_all()");
+        reconnectDatabaseIfNecessary();
+        String[] argout;
+        if (dbProxy == null) {
+            argout = new String[0];
+        } else {
+            try {
+                argout = DbUtils.toStringArray(dbProxy.getDataBase().getAttribute().getNames().getAttributes());
+            } catch (final ArchivingException e) {
+                throw e.toTangoException();
+            }
+        }
+        get_logger().info("Exiting get_att_name_all()");
+        return argout;
+    }
+
+    /**
+     * Execute command "GetAttNameFacility" on device. Gets whole list of the
+     * attributes registered in HDB and that belong to the current facility.
+     * 
+     * @return The whole list of the attributes registered in HDB, and that
+     *         belong to the current facility.
+     */
+    public String[] get_att_name_facility() throws DevFailed {
+        get_logger().info("Entering get_att_name_facility()");
+        reconnectDatabaseIfNecessary();
+        String[] argout;
+        if (dbProxy == null) {
+            argout = new String[0];
+        } else {
+            try {
+                argout = DbUtils.toStringArray(dbProxy.getDataBase().getAttribute().getNames()
+                        .getAttributes(System.getProperty("TANGO_HOST")));
+            } catch (final ArchivingException e) {
+                throw e.toTangoException();
+            }
+        }
+        get_logger().info("Exiting get_att_name_facility()");
+        return argout;
+    }
+
+    /**
+     * Execute command "GetAttNameFilterFormat" on device. Gets the list of
+     * <I>HDB</I> registered attributes for the given format
+     * 
+     * @param argin
+     *            A format [0 -> scalar - 1 -> spectrum - 2 -> image]
+     * @return The filtered list of attributes registered in HDB. The filtering
+     *         is made according to the given format [0 -> scalar - 1 ->
+     *         spectrum - 2 -> image]
+     */
+    public String[] get_att_name_filter_format(final short argin) throws DevFailed {
+        get_logger().info("Entering get_att_name_filter_format()");
+        reconnectDatabaseIfNecessary();
+        String[] argout;
+        if (dbProxy == null) {
+            argout = new String[0];
+        } else {
+            try {
+                argout = DbUtils.toStringArray(dbProxy.getDataBase().getAttribute().getNames()
+                        .getAttributesNamesF(argin));
+            } catch (final ArchivingException e) {
+                throw e.toTangoException();
+            }
+        }
+        get_logger().info("Exiting get_att_name_filter_format()");
+        return argout;
+    }
+
+    /**
+     * Execute command "GetAttNameFilterType" on device. Gets the list of
+     * <I>HDB</I> registered attributes for the given type.
+     * 
+     * @param argin
+     *            A type [2 -> Tango::DevShort | 3 -> Tango::DevLong | 5 ->
+     *            Tango::DevDouble and 8 -> Tango::DevString]
+     * @return The filtered list of attributes registered in HDB. The filtering
+     *         is made according to the given type [2 -> Tango::DevShort | 3 ->
+     *         Tango::DevLong | 5 -> Tango::DevDouble and 8 -> Tango::DevString]
+     */
+    public String[] get_att_name_filter_type(final short argin) throws DevFailed {
+        get_logger().info("Entering get_att_name_filter_type()");
+        reconnectDatabaseIfNecessary();
+        String[] argout;
+        if (dbProxy == null) {
+            argout = new String[0];
+        } else {
+            try {
+                argout = DbUtils.toStringArray(dbProxy.getDataBase().getAttribute().getNames()
+                        .getAttributesNamesT(argin));
+            } catch (final ArchivingException e) {
+                throw e.toTangoException();
+            }
+        }
+        get_logger().info("Exiting get_att_name_filter_type()");
+        return argout;
+    }
+
+    /**
+     * Execute command "GetAttCountAll" on device. Gets the total number of
+     * attributes defined in HDB.
+     * 
+     * @return The total number of attributes defined in HDB
+     */
+    public int get_att_count_all() throws DevFailed {
+        get_logger().info("Entering get_att_count_all()");
+        reconnectDatabaseIfNecessary();
+        int argout = 0;
+        if (dbProxy != null) {
+            try {
+                argout = dbProxy.getDataBase().getAttribute().getNames().getAttributesCount();
+            } catch (final ArchivingException e) {
+                throw e.toTangoException();
+            }
+        }
+        get_logger().info("Exiting get_att_count_all()");
+        return argout;
+    }
+
+    /**
+     * Execute command "GetAttCountFilterFormat" on device. Gets the total
+     * number of attributes defined in HDB with the given format.
+     * 
+     * @param argin
+     *            A format [0 -> scalar - 1 -> spectrum - 2 -> image]
+     * @return The total number of attributes defined in HDB with the given
+     *         format [0 -> scalar - 1 -> spectrum - 2 -> image]
+     */
+    public int get_att_count_filter_format(final short argin) throws DevFailed {
+        get_logger().info("Entering get_att_count_filter_format()");
+        reconnectDatabaseIfNecessary();
+        int argout = 0;
+        if (dbProxy != null) {
+            try {
+                argout = dbProxy.getDataBase().getAttribute().getNames().getAttributesCountF(argin);
+            } catch (final ArchivingException e) {
+                throw e.toTangoException();
+            }
+        }
+        get_logger().info("Exiting get_att_count_filter_format()");
+        return argout;
+    }
+
+    /**
+     * Execute command "GetAttCountFilterType" on device. Gets the total number
+     * of attributes defined in HDB with the given type.
+     * 
+     * @param argin
+     *            A type [2 -> Tango::DevShort | 3 -> Tango::DevLong | 5 ->
+     *            Tango::DevDouble and 8 -> Tango::DevString]
+     * @return The total number of attributes defined in HDB with the given type
+     *         [2 -> Tango::DevShort | 3 -> Tango::DevLong | 5 ->
+     *         Tango::DevDouble and 8 -> Tango::DevString]
+     */
+    public int get_att_count_filter_type(final short argin) throws DevFailed {
+        get_logger().info("Entering get_att_count_filter_type()");
+        reconnectDatabaseIfNecessary();
+        int argout = 0;
+        if (dbProxy != null) {
+            try {
+                argout = dbProxy.getDataBase().getAttribute().getNames().getAttributesCountT(argin);
+            } catch (final ArchivingException e) {
+                throw e.toTangoException();
+            }
+        }
+        get_logger().info("Exiting get_att_count_filter_type()");
+        return argout;
+    }
+
+    /**
+     * Execute command "GetDomains" on device. Gets all the registered domains.
+     * 
+     * @return The registered domains
+     */
+    public String[] get_domains() throws DevFailed {
+        get_logger().info("Entering get_domains()");
+        reconnectDatabaseIfNecessary();
+        String[] argout;
+        if (dbProxy == null) {
+            argout = new String[0];
+        } else {
+            try {
+                argout = dbProxy.getDataBase().getAttribute().getDomains().getDomains();
+            } catch (final ArchivingException e) {
+                throw e.toTangoException();
+            }
+        }
+        get_logger().info("Exiting get_domains()");
+        return argout;
+    }
+
+    /**
+     * Execute command "GetDomainsCount" on device. Returns the number of
+     * distinct registered domains.
+     * 
+     * @return The number of distinct registered domains.
+     */
+    public int get_domains_count() throws DevFailed {
+        get_logger().info("Entering get_domains_count()");
+        reconnectDatabaseIfNecessary();
+        int argout = 0;
+        if (dbProxy != null) {
+            try {
+                argout = dbProxy.getDataBase().getAttribute().getDomains().getDomainsCount();
+            } catch (final ArchivingException e) {
+                throw e.toTangoException();
+            }
+        }
+        get_logger().info("Exiting get_domains_count()");
+        return argout;
+    }
+
+    /**
+     * Execute command "GetFamilies" on device. Gets all the registered families
+     * 
+     * @return The registered families
+     */
+    public String[] get_families() throws DevFailed {
+        get_logger().info("Entering get_families()");
+        reconnectDatabaseIfNecessary();
+        String[] argout;
+        if (dbProxy == null) {
+            argout = new String[0];
+        } else {
+            try {
+                argout = dbProxy.getDataBase().getAttribute().getFamilies().getFamilies();
+            } catch (final ArchivingException e) {
+                throw e.toTangoException();
+            }
+        }
+        get_logger().info("Exiting get_families()");
+        return argout;
+    }
+
+    /**
+     * Execute command "GetFamiliesCount" on device. Returns the number of
+     * distinct registered families.
+     * 
+     * @return The number of distinct registered families.
+     */
+    public int get_families_count() throws DevFailed {
+        get_logger().info("Entering get_families_count()");
+        reconnectDatabaseIfNecessary();
+        int argout = 0;
+        if (dbProxy != null) {
+            try {
+                argout = dbProxy.getDataBase().getAttribute().getFamilies().getFamiliesCount();
+            } catch (final ArchivingException e) {
+                throw e.toTangoException();
+            }
+        }
+        get_logger().info("Exiting get_families_count()");
+        return argout;
+    }
+
+    /**
+     * Execute command "GetFamiliesByDomain" on device. Gets all the registered
+     * families for the given domain.
+     * 
+     * @param argin
+     *            The given domain
+     * @return The registered families for the given domain
+     */
+    public String[] get_families_by_domain(final String argin) throws DevFailed {
+        get_logger().info("Entering get_families_by_domain()");
+        reconnectDatabaseIfNecessary();
+        String[] argout;
+        if (dbProxy == null) {
+            argout = new String[0];
+        } else {
+            try {
+                argout = dbProxy.getDataBase().getAttribute().getFamilies().getFamilies(argin);
+            } catch (final ArchivingException e) {
+                throw e.toTangoException();
+            }
+        }
+        get_logger().info("Exiting get_families_by_domain()");
+        return argout;
+    }
+
+    /**
+     * Execute command "GetFamiliesByDomainCount" on device. Returns the number
+     * of distinct registered families for a given domain.
+     * 
+     * @param argin
+     *            A domain name
+     * @return The number of distinct registered families for a given domain.
+     */
+    public int get_families_by_domain_count(final String argin) throws DevFailed {
+        get_logger().info("Entering get_families_by_domain_count()");
+        reconnectDatabaseIfNecessary();
+        int argout = 0;
+        if (dbProxy != null) {
+            try {
+                argout = dbProxy.getDataBase().getAttribute().getFamilies().getFamiliesCount(argin);
+            } catch (final ArchivingException e) {
+                throw e.toTangoException();
+            }
+        }
+        get_logger().info("Exiting get_families_by_domain_count()");
+        return argout;
+    }
+
+    /**
+     * Execute command "GetMembers" on device. Gets all the registered members
+     * 
+     * @return The registered members
+     */
+    public String[] get_members() throws DevFailed {
+        get_logger().info("Entering get_members()");
+        reconnectDatabaseIfNecessary();
+        String[] argout;
+        if (dbProxy == null) {
+            argout = new String[0];
+        } else {
+            try {
+                argout = dbProxy.getDataBase().getAttribute().getMembers().getMembers();
+            } catch (final ArchivingException e) {
+                throw e.toTangoException();
+            }
+        }
+        get_logger().info("Exiting get_members()");
+        return argout;
+    }
+
+    /**
+     * Execute command "GetMembersCount" on device. Returns the number of
+     * distinct members.
+     * 
+     * @return The number of distinct members.
+     */
+    public int get_members_count() throws DevFailed {
+        get_logger().info("Entering get_members_count()");
+        int argout = 0;
+        reconnectDatabaseIfNecessary();
+        if (dbProxy != null) {
+            // ---Add your Own code to control device here ---
+            try {
+                argout = dbProxy.getDataBase().getAttribute().getMembers().getMembersCount();
+            } catch (final ArchivingException e) {
+                throw e.toTangoException();
+            }
+        }
+        get_logger().info("Exiting get_members_count()");
+        return argout;
+    }
+
+    /**
+     * Execute command "GetMembersByDomainFamily" on device. Gets all the
+     * registered members for the given domain and family
+     * 
+     * @param argin
+     *            The given domain and family
+     * @return The registered members for the given domain and family
+     */
+    public String[] get_members_by_domain_family(final String[] argin) throws DevFailed {
+        get_logger().info("Entering get_members_by_domain_family()");
+        reconnectDatabaseIfNecessary();
+        String[] argout;
+        if (dbProxy == null) {
+            argout = new String[0];
+        } else if (argin.length == 2) {
+            try {
+                argout = dbProxy.getDataBase().getAttribute().getMembers().getMembers(argin[0].trim(), argin[1].trim());
+            } catch (final ArchivingException e) {
+                throw e.toTangoException();
+            }
+        } else {
+            Except.throw_exception("CONFIGURATION_ERROR", "Wrong number of parameters",
+                    "HdbExtractor.get_members_by_domain_family");
+            argout = new String[0];
+        }
+        get_logger().info("Exiting get_members_by_domain_family()");
+        return argout;
+    }
+
+    /**
+     * Execute command "GetMembersByDomainFamilyCount" on device. Returns the
+     * number of distinct registered members for the given domain and family.
+     * 
+     * @param argin
+     *            A domain name, a family name
+     * @return The number of distinct registered members for the given domain
+     *         and family.
+     */
+    public int get_members_by_domain_family_count(final String[] argin) throws DevFailed {
+        get_logger().info("Entering get_members_by_domain_family_count()");
+        reconnectDatabaseIfNecessary();
+        int argout = 0;
+        if (dbProxy != null) {
+            if (argin.length != 2) {
+                Except.throw_exception("CONFIGURATION_ERROR", "Wrong number of parameters",
+                        "HdbExtractor.get_members_by_domain_family_count");
+            } else {
+                try {
+                    argout = dbProxy.getDataBase().getAttribute().getMembers().getMembersCount(argin[0], argin[1]);
+                } catch (final ArchivingException e) {
+                    throw e.toTangoException();
+                }
+            }
+        }
+        get_logger().info("Exiting get_members_by_domain_family_count()");
+        return argout;
+    }
+
+    /**
+     * Execute command "GetAttributesByDomainFamilyMembersCount" on device.
+     * Returns the number of registered the attributes for a given domain,
+     * family, member.
+     * 
+     * @param argin
+     *            A domain name, a family name, a member name.
+     * @return The number of registered the attributes for a given domain,
+     *         family, member.
+     */
+    public int get_attributes_by_domain_family_members_count(final String[] argin) throws DevFailed {
+        get_logger().info("Entering get_attributes_by_domain_family_members_count()");
+        reconnectDatabaseIfNecessary();
+        int argout = 0;
+        if (dbProxy != null) {
+            if (argin.length != 3) {
+                Except.throw_exception("CONFIGURATION_ERROR", "Wrong number of parameters",
+                        "HdbExtractor.get_attributes_by_domain_family_members_count");
+            } else {
+                try {
+                    argout = dbProxy.getDataBase().getAttribute().getNames()
+                            .getAttributesCount(argin[0], argin[1], argin[2]);
+                } catch (final ArchivingException e) {
+                    throw e.toTangoException();
+                }
+            }
+        }
+        get_logger().info("Exiting get_attributes_by_domain_family_members_count()");
+        return argout;
+    }
+
+    /**
+     * Execute command "GetCurrentArchivedAtt" on device. Gets the list of
+     * attributes that are being archived in <I>HDB</I>
+     * 
+     * @return The list of attributes that are being archived
+     */
+    public String[] get_current_archived_att() throws DevFailed {
+        get_logger().info("Entering get_current_archived_att()");
+        reconnectDatabaseIfNecessary();
+        String[] argout;
+        if (dbProxy == null) {
+            argout = new String[0];
+        } else {
+            try {
+                argout = dbProxy.getDataBase().getMode().getCurrentArchivedAtt();
+            } catch (final ArchivingException e) {
+                throw e.toTangoException();
+            }
+        }
+        get_logger().info("Exiting get_current_archived_att()");
+        return argout;
+    }
+
+    /**
+     * Execute command "IsArchived" on device. Returns "true" if the attribute
+     * of given name is currently archived, "false" otherwise.
+     * 
+     * @param argin
+     *            The attribute's name
+     * @return true if the given attribute is being archived
+     */
+    public boolean is_archived(final String argin) throws DevFailed {
+        get_logger().info("Entering is_archived()");
+        reconnectDatabaseIfNecessary();
+        boolean argout = false;
+        if (dbProxy != null) {
+            try {
+                argout = dbProxy.getDataBase().getMode().isArchived(argin);
+            } catch (final ArchivingException e) {
+                throw e.toTangoException();
+            }
+        }
+        get_logger().info("Exiting is_archived()");
+        return argout;
+    }
+
+    /**
+     * Execute command "GetArchivingMode" on device. Gets the archiving mode
+     * used for the specified attribute.
+     * 
+     * @param argin
+     *            The attribute's name
+     * @return The archiving mode used for the specified attribute
+     */
+    public String[] get_archiving_mode(final String argin) throws DevFailed {
+        // get_logger().info("Entering get_archiving_mode()");
+        String[] argout;
+        reconnectDatabaseIfNecessary();
+        if (dbProxy == null) {
+            argout = new String[0];
+        } else {
+            try {
+                // argout = (this.dbProxy.getDataBase().getMode()
+                // .getCurrentArchivingMode(argin)).toArray();
+                final Mode mode = dbProxy.getDataBase().getMode().getCurrentArchivingMode(argin);
+                argout = mode == null ? null : mode.toArray();
+                if (argout == null || argout.length == 0) {
+                    throw new ArchivingException("Invalid attribute: " + argin, "Invalid attribute: " + argin,
+                            ErrSeverity.WARN, "No database connection or \"" + argin
+                                    + "\" attribute not found in database", this.getClass().getName());
+                }
+            } catch (final ArchivingException e) {
+                throw e.toTangoException();
+            }
+        }
+        // get_logger().info("Exiting get_archiving_mode()");
+        return argout;
+    }
+
+    /**
+     * Execute command "GetAttData" on device. Gets all the data archieved for
+     * an attribute. Create a dynamic attribute, retrieve data from database and
+     * prepare result for attribute_history call.
+     * 
+     * @param argin
+     *            The attribute's name
+     * @return String : The new created dynamic attribute name, Long : the
+     *         number of data.
+     */
+    public DevVarLongStringArray get_att_data(final String argin) throws DevFailed {
+        Except.throw_exception("DEPRECATED", "This method is no more available.", "HdbExtractor.get_att_data");
+        return null;
+
+        /*
+         * DevVarLongStringArray argout = new DevVarLongStringArray();
+         * get_logger().info("Entering get_att_data()"); // ---Add your Own code
+         * to control device here --- try { // Get data from db. DbData dbData =
+         * this.dbProxy.getDataBase().getAttData(argin); // Buid an attribute
+         * and gets its references argout = add_attribute(dbData ); } catch (
+         * ArchivingException e ) { e.printStackTrace(); throw
+         * e.toTangoException(); } catch (java.lang.OutOfMemoryError oome) {
+         * get_logger().info("OutOfMemoryError in get_att_data");
+         * Except.throw_exception("MEMORY_ERROR",HintOnMemoryError,
+         * "HdbExtractor.get_att_data"); } catch ( Throwable t ) {
+         * t.printStackTrace(); if (t instanceof DevFailed) { DevError [] errors
+         * = ( (DevFailed) t ).errors; if ( errors != null ) { for ( int i = 0 ;
+         * i < errors.length ; i ++ ) { DevError error = errors [ i ];
+         * get_logger().error (
+         * "Error: /desc/"+error.desc+"/origin/"+error.origin
+         * +"/reason/"+error.reason ); } } get_logger().error (
+         * "Error: /CAUSE---------------" ); if ( ( (DevFailed) t ).getCause()
+         * != null ) { ( (DevFailed) t ).getCause().printStackTrace (); } } }
+         * get_logger().info("Exiting get_att_data()"); return argout;
+         */
+    }
+
+    /**
+     * Execute command "GetAttDataCount" on device. Returns the number of the
+     * data archieved for an attribute.
+     * 
+     * @param argin
+     *            An attribute name.
+     * @return The number of the data archieved for an attribute.
+     */
+    public int get_att_data_count(final String argin) throws DevFailed {
+        get_logger().info("Entering get_att_data_count()");
+        reconnectDatabaseIfNecessary();
+        int argout = 0;
+        if (dbProxy != null) {
+            try {
+                argout = dbProxy.getDataBase().getExtractor().getDataGetters().getAttDataCount(argin);
+            } catch (final ArchivingException e) {
+                throw e.toTangoException();
+            }
+        }
+        get_logger().info("Exiting get_att_data_count()");
+        return argout;
+    }
+
+    /**
+     * Execute command "GetAttDataAvg" on device. Returns the average value
+     * generated by the given attribute.
+     * 
+     * @param argin
+     *            The attribute's name
+     * @return The average of the values generated by the attribute
+     */
+    public double get_att_data_avg(final String argin) throws DevFailed {
+        get_logger().info("Entering get_att_data_avg()");
+        reconnectDatabaseIfNecessary();
+        double argout;
+        if (dbProxy == null) {
+            argout = MathConst.NAN_FOR_NULL;
+        } else {
+            try {
+                argout = dbProxy.getDataBase().getExtractor().getMinMaxAvgGetters().getAttDataAvg(argin);
+            } catch (final ArchivingException e) {
+                throw e.toTangoException();
+            }
+        }
+        get_logger().info("Exiting get_att_data_avg()");
+        return argout;
+    }
+
+    /**
+     * Get the newest inserted value for an attribute. Returns READ part only
+     * 
+     * @param attributeName
+     *            the attribute name
+     * @return timestamp; values
+     * @throws DevFailed
+     */
+    public String getNewestValue(final String attributeName) throws DevFailed {
+        get_logger().info("Entering getNewestValue");
+        reconnectDatabaseIfNecessary();
+        String argout;
+        if (dbProxy == null) {
+            argout = "";
+        } else {
+            try {
+                final DbData data = dbProxy.getDataBase().getExtractor().getDataGetters().getNewestValue(attributeName);
+                if (data.getTimedData() != null && data.getTimedData()[0] != null) {
+                    argout = Long.toString(data.getTimedData()[0].getTime()) + "; ";
+                    final Object value = get(data.getTimedData()[0].getValue(), 0);
+                    argout = argout + String.valueOf(value);
+                } else {
+                    DevFailedUtils.throwDevFailed("no data found for " + attributeName);
+                    argout = "";
+                }
+            } catch (final ArchivingException e) {
+                throw e.toTangoException();
+            }
+        }
+        get_logger().info("Exiting getNewestValue");
+        return argout;
+    }
+
+    /**
+     * Get the nearest value and timestamp of an attribute for a given
+     * timestamp. Returns READ part only
+     * 
+     * @param argin
+     *            [attributeName, timestamp]. timestamp format is DD-MM-YYYY
+     *            HH24:MI:SS
+     * @return timestamp; values
+     * @throws DevFailed
+     */
+    public String getNearestValue(final String[] argin) throws DevFailed {
+        get_logger().info("Entering getNewestValue");
+        reconnectDatabaseIfNecessary();
+        String argout;
+        if (dbProxy == null) {
+            argout = "";
+        } else if (argin.length == 2) {
+            final String attributeName = argin[0];
+            final String timestamp = argin[1];
+            try {
+                final DbData data2 = dbProxy.getDataBase().getExtractor().getDataGetters()
+                        .getNearestValue(attributeName, timestamp);
+                if ((data2.getTimedData() != null) && (data2.getTimedData()[0] != null)) {
+                    argout = Long.toString(data2.getTimedData()[0].getTime()) + "; ";
+                    final Object value = get(data2.getTimedData()[0].getValue(), 0);
+                    argout = argout + String.valueOf(value);
+                } else {
+                    DevFailedUtils.throwDevFailed("no data found for " + attributeName);
+                    argout = "";
+                }
+            } catch (final ArchivingException e) {
+                e.printStackTrace();
+                throw e.toTangoException();
+            }
+        } else {
+            DevFailedUtils.throwDevFailed("input must be of size 2 [attributeName, timestamp] ");
+            argout = "";
+        }
+        get_logger().info("Exiting getNewestValue");
+        return argout;
+    }
+
+    /**
+     * Execute command "GetAttDataAvgBetweenDates" on device. Returns the
+     * average value generated by the given attribute and between the two given
+     * dates.
+     * 
+     * @param argin
+     *            The attribute's name, the beginning date (DD-MM-YYYY
+     *            HH24:MI:SS) and the ending date (DD-MM-YYYY HH24:MI:SS)
+     * @return The average value generated by the given attribute and between
+     *         the two given dates.
+     */
+    public double get_att_data_avg_between_dates(final String[] argin) throws DevFailed {
+        get_logger().info("Entering get_att_data_avg_between_dates()");
+        reconnectDatabaseIfNecessary();
+        double argout;
+        if (dbProxy == null) {
+            argout = 0;
+        } else {
+            if (argin.length == 3) {
+                try {
+                    argout = dbProxy.getDataBase().getExtractor().getMinMaxAvgGettersBetweenDates()
+                            .getAttDataAvgBetweenDates(argin);
+                } catch (final ArchivingException e) {
+                    throw e.toTangoException();
+                }
+            } else {
+                Except.throw_exception("CONFIGURATION_ERROR", "Wrong number of parameters",
+                        "HdbExtractor.get_att_scalar_data_avg_between_dates");
+                argout = 0;
+            }
+        }
+        get_logger().info("Exiting get_att_data_avg_between_dates()");
+        return argout;
+    }
+
+    /**
+     * Execute command "GetAttDataBetweenDates" on device. Retrieves data
+     * beetwen two dates, for a given scalar attribute. Create a dynamic
+     * attribute, retrieve data from database and prepare result for
+     * attribute_history call.
+     * 
+     * @param argin
+     *            The attribute's name, the beginning date (DD-MM-YYYY
+     *            HH24:MI:SS) and the ending date (DD-MM-YYYY HH24:MI:SS)
+     * @return String : The new created dynamic attribute name, Long : the
+     *         number of data.
+     */
+    public DevVarLongStringArray get_att_data_between_dates(final String[] argin) throws DevFailed {
+        get_logger().info("Entering get_att_data_between_dates()");
+        reconnectDatabaseIfNecessary();
+        DevVarLongStringArray argout = null;
+        if (dbProxy != null) {
+            if (argin.length != 3) {
+                Except.throw_exception("CONFIGURATION_ERROR", "Wrong number of parameters",
+                        "HdbExtractor.get_att_scalar_data_beetween_dates");
+            } else {
+                try {
+                    // Get data from db.
+                    final DbData dbData = dbProxy.getDataBase().getExtractor().getDataGettersBetweenDates()
+                            .getAttDataBetweenDates(argin, SamplingType.getSamplingType(SamplingType.ALL));
+                    // Buid an attribute and gets its references
+                    argout = add_attribute(dbData);
+                } catch (final ArchivingException e) {
+
+                    e.printStackTrace();
+                    throw e.toTangoException();
+                }
+            }
+        }
+        get_logger().info("Exiting get_att_data_between_dates()");
+        return argout;
+    }
+
+    /**
+     * Extract an attribute's data for HDB
+     * 
+     * @param argin
+     *            The attribute's name, the beginning date (DD-MM-YYYY
+     *            HH24:MI:SS) and the ending date (DD-MM-YYYY HH24:MI:SS)
+     * @return Long: the timestamps , String: values (read values only
+     * @throws DevFailed
+     */
+    public DevVarDoubleStringArray extractBetweenDates(final String[] argin) throws DevFailed {
+        get_logger().info("Entering get_att_data_between_dates()");
+        reconnectDatabaseIfNecessary();
+        DevVarDoubleStringArray argout = null;
+        if (dbProxy != null) {
+            if (argin.length != 3) {
+                Except.throw_exception("CONFIGURATION_ERROR", "Wrong number of parameters",
+                        "HdbExtractor.get_att_scalar_data_beetween_dates");
+            } else {
+                try {
+                    // Get data from db.
+                    final DbData dbData = dbProxy.getDataBase().getExtractor().getDataGettersBetweenDates()
+                            .getAttDataBetweenDates(argin, SamplingType.getSamplingType(SamplingType.ALL));
+                    final NullableTimedData[] tuples = dbData.getTimedData();
+                    final double[] timeStamps = new double[tuples.length];
+                    final String[] values = new String[tuples.length];
+                    for (int i = 0; i < tuples.length; i++) {
+                        timeStamps[i] = tuples[i].getTime();
+                        values[i] = String.valueOf(get(tuples[i].getValue(), 0));
+                    }
+                    argout = new DevVarDoubleStringArray(timeStamps, values);
+                } catch (final ArchivingException e) {
+
+                    e.printStackTrace();
+                    throw e.toTangoException();
+                }
+            }
+        }
+        get_logger().info("Exiting get_att_data_between_dates()");
+        return argout;
+    }
+
+    protected Object get(Object value, int index) {
+        Object result;
+        if ((value != null) && value.getClass().isArray() && (index > -1) && (index < Array.getLength(value))) {
+            result = Array.get(value, index);
+        } else {
+            result = null;
+        }
+        return result;
+    }
+
+    /**
+     * Execute command "GetAttDataBetweenDates" on device. Retrieves data
+     * beetwen two dates, for a given scalar attribute. Create a dynamic
+     * attribute, retrieve data from database and prepare result for
+     * attribute_history call.
+     * 
+     * @param argin
+     *            : The attribute's name, the beginning date (DD-MM-YYYY
+     *            HH24:MI:SS) and the ending date (DD-MM-YYYY HH24:MI:SS), and
+     *            the sampling type (ALL, SECOND, MINUTE, HOUR, DAY)
+     * @return String : The new created dynamic attribute name, Long : the
+     *         number of data.
+     */
+    public DevVarLongStringArray get_att_data_between_dates_sampling(final String[] argin) throws DevFailed {
+        get_logger().info("Entering get_att_data_between_dates_sampling()");
+        reconnectDatabaseIfNecessary();
+        DevVarLongStringArray argout = null;
+        SamplingType samplingType = null;
+        if (argin.length != 4) {
+            Except.throw_exception("CONFIGURATION_ERROR", "Wrong number of parameters",
+                    "HdbExtractor.get_att_data_between_dates_sampling");
+        }
+        try {
+            samplingType = SamplingType.getSamplingTypeByLabel(argin[3]);
+        } catch (final IllegalArgumentException iae) {
+            Except.throw_exception("CONFIGURATION_ERROR",
+                    "Invalid sampling type. Valid types are ALL, SECOND, MINUTE, HOUR, or DAY",
+                    "HdbExtractor.get_att_data_between_dates_sampling");
+        }
+        if (dbProxy != null) {
+            try {
+                // Get data from db.
+                final DbData dbData = dbProxy.getDataBase().getExtractor().getDataGettersBetweenDates()
+                        .getAttDataBetweenDates(argin, samplingType);
+                // Buid an attribute and gets its references
+                argout = add_attribute(dbData);
+            } catch (final ArchivingException e) {
+                e.printStackTrace();
+                throw e.toTangoException();
+            }
+        }
+        get_logger().info("Exiting get_att_data_between_dates_sampling()");
+        return argout;
+    }
+
+    /**
+     * Execute command "GetAttDataBetweenDatesCount" on device. Returns the
+     * number of data beetwen two dates and, for a given scalar attribute.
+     * 
+     * @param argin
+     *            The attribute's name, the beginning (DD-MM-YYYY HH24:MI:SS)
+     *            date and the ending date (DD-MM-YYYY HH24:MI:SS).
+     * @return The number of data beetwen two dates and, for a given scalar
+     *         attribute.
+     */
+    public int get_att_data_between_dates_count(final String[] argin) throws DevFailed {
+        get_logger().info("Entering get_att_data_between_dates_count()");
+        reconnectDatabaseIfNecessary();
+        int argout = 0;
+        if (dbProxy != null) {
+            if (argin.length != 3) {
+                Except.throw_exception("CONFIGURATION_ERROR", "Wrong number of parameters",
+                        "HdbExtractor.get_att_scalar_data_between_dates_count");
+            } else {
+                try {
+                    argout = dbProxy.getDataBase().getExtractor().getDataGettersBetweenDates()
+                            .getAttDataBetweenDatesCount(argin);
+                } catch (final ArchivingException e) {
+                    throw e.toTangoException();
+                }
+            }
+        }
+        get_logger().info("Exiting get_att_data_between_dates_count()");
+        return argout;
+    }
+
+    /**
+     * Execute command "GetAttDataInfOrSupThan" on device. Retrieves all data
+     * that are lower than the given value x OR higher than the given value y.
+     * Create a dynamic attribute, retrieve the corresponding data from database
+     * and prepare result for attribute_history call.
+     * 
+     * @param argin
+     *            The attribute's name, the lower limit and the upper limit
+     * @return String : The new created dynamic attribute name, Long : the
+     *         number of data.
+     */
+    public DevVarLongStringArray get_att_data_inf_or_sup_than(final String[] argin) throws DevFailed {
+        get_logger().info("Entering get_att_data_inf_or_sup_than()");
+        reconnectDatabaseIfNecessary();
+        DevVarLongStringArray argout = null;
+        if (dbProxy != null) {
+            if (argin.length != 3) {
+                Except.throw_exception("CONFIGURATION_ERROR", "Wrong number of parameters",
+                        "TdbExtractor.get_att_scalar_data_inf_or_sup_than");
+            } else {
+                try {
+                    // Get data from db.
+                    final DbData dbData = dbProxy.getDataBase().getExtractor().getInfSupGetters()
+                            .getAttDataInfOrSupThan(argin);
+                    // Buid an attribute and gets its references
+                    argout = add_attribute(dbData);
+                } catch (final ArchivingException e) {
+                    throw e.toTangoException();
+                }
+            }
+        }
+        get_logger().info("Exiting get_att_data_inf_or_sup_than()");
+        return argout;
+    }
+
+    /**
+     * Execute command "GetAttDataInfOrSupThanCount" on device. Returns the
+     * number of data lower than the given value x OR higher than the given
+     * value y.
+     * 
+     * @param argin
+     *            The attribute's name, the lower limit and the upper limit
+     * @return The number of scalar data lower than the given value x OR higher
+     *         than the given value y.
+     */
+    public int get_att_data_inf_or_sup_than_count(final String[] argin) throws DevFailed {
+        get_logger().info("Entering get_att_data_inf_or_sup_than_count()");
+        reconnectDatabaseIfNecessary();
+        int argout = 0;
+        if (dbProxy != null) {
+            if (argin.length != 3) {
+                Except.throw_exception("CONFIGURATION_ERROR", "Wrong number of parameters",
+                        "HdbExtractor.get_att_scalar_data_inf_or_sup_than_count");
+            } else {
+                try {
+                    argout = dbProxy.getDataBase().getExtractor().getInfSupGetters().getAttDataInfOrSupThanCount(argin);
+                } catch (final ArchivingException e) {
+                    throw e.toTangoException();
+                }
+            }
+        }
+        get_logger().info("Exiting get_att_data_inf_or_sup_than_count()");
+        return argout;
+    }
+
+    /**
+     * Execute command "GetAttDataInfOrSupThanBetweenDates" on device. Retrieves
+     * data beetwen two dates (date_1 & date_2) - Data are lower than the given
+     * value x OR higher than the given value y. Create a dynamic attribute,
+     * retrieve the corresponding data from database and prepare result for
+     * attribute_history call.
+     * 
+     * @param argin
+     *            The attribute's name, the lower limit, the upper limit, the
+     *            beginning date (DD-MM-YYYY HH24:MI:SS) and the ending date
+     *            (DD-MM-YYYY HH24:MI:SS)
+     * @return String : The new created dynamic attribute name, Long : the
+     *         number of data.
+     */
+    public DevVarLongStringArray get_att_data_inf_or_sup_than_between_dates(final String[] argin) throws DevFailed {
+        get_logger().info("Entering get_att_data_inf_or_sup_than_between_dates()");
+        reconnectDatabaseIfNecessary();
+        DevVarLongStringArray argout = new DevVarLongStringArray();
+        if (dbProxy != null) {
+            if (argin.length != 5) {
+                Except.throw_exception("CONFIGURATION_ERROR", "Wrong number of parameters",
+                        "HdbExtractor.get_att_scalar_data_inf_or_sup_than_beetween_dates");
+            } else {
+                try {
+                    // Get data from db.
+                    final DbData dbData = dbProxy.getDataBase().getExtractor().getInfSupGettersBetweenDates()
+                            .getAttDataInfOrSupThanBetweenDates(argin);
+                    // Buid an attribute and gets its references
+                    argout = add_attribute(dbData);
+                } catch (final ArchivingException e) {
+                    throw e.toTangoException();
+                }
+            }
+        }
+        get_logger().info("Exiting get_att_data_inf_or_sup_than_between_dates()");
+        return argout;
+    }
+
+    /**
+     * Execute command "GetAttDataInfOrSupThanBetweenDatesCount" on device.
+     * Returns the number of data beetwen two dates (date_1 & date_2). Data are
+     * lower than the given value x OR higher than the given value y.
+     * 
+     * @param argin
+     *            The attribute's name, the lower limit, the upper limit, the
+     *            beginning date (DD-MM-YYYY HH24:MI:SS) and the ending date
+     *            (DD-MM-YYYY HH24:MI:SS).
+     * @return The number of scalar data lower than the given value x OR higher
+     *         than the given value y, beetwen two dates and for the specified
+     *         attribute.
+     */
+    public int get_att_data_inf_or_sup_than_between_dates_count(final String[] argin) throws DevFailed {
+        get_logger().info("Entering get_att_data_inf_or_sup_than_between_dates_count()");
+        reconnectDatabaseIfNecessary();
+        int argout = 0;
+        if (dbProxy != null) {
+            if (argin.length != 5) {
+                Except.throw_exception("CONFIGURATION_ERROR", "Wrong number of parameters",
+                        "HdbExtractor.get_att_scalar_data_inf_or_sup_than_between_dates_count");
+            } else {
+                try {
+                    argout = dbProxy.getDataBase().getExtractor().getInfSupGettersBetweenDates()
+                            .getAttDataInfOrSupThanBetweenDatesCount(argin);
+                } catch (final ArchivingException e) {
+                    throw e.toTangoException();
+                }
+            }
+        }
+        get_logger().info("Exiting get_att_data_inf_or_sup_than_between_dates_count()");
+        return argout;
+    }
+
+    /**
+     * Execute command "GetAttDataInfThan" on device. Retrieves all the data
+     * that are lower than the given value x. Create a dynamic attribute,
+     * retrieve the corresponding data from database and prepare result for
+     * attribute_history call.
+     * 
+     * @param argin
+     *            The attribute's name, the upper limit
+     * @return String : The new created dynamic attribute name, Long : the
+     *         number of data.
+     */
+    public DevVarLongStringArray get_att_data_inf_than(final String[] argin) throws DevFailed {
+        get_logger().info("Entering get_att_data_inf_than()");
+        reconnectDatabaseIfNecessary();
+        DevVarLongStringArray argout = null;
+        if (dbProxy != null) {
+            if (argin.length != 2) {
+                Except.throw_exception("CONFIGURATION_ERROR", "Wrong number of parameters",
+                        "HdbExtractor.get_att_scalar_data_inf_than");
+            } else {
+                try {
+                    // Get data from db.
+                    final DbData dbData = dbProxy.getDataBase().getExtractor().getInfSupGetters()
+                            .getAttDataInfThan(argin);
+                    // Buid an attribute and gets its references
+                    argout = add_attribute(dbData);
+                } catch (final ArchivingException e) {
+                    throw e.toTangoException();
+                }
+            }
+        }
+        get_logger().info("Exiting get_att_data_inf_than()");
+        return argout;
+    }
+
+    /**
+     * Execute command "GetAttDataInfThanCount" on device. Returns the number of
+     * data lower than the given value.
+     * 
+     * @param argin
+     *            The attribute's name and the upper limit.
+     * @return The number of scalar data lower than the given value and for the
+     *         specified attribute.
+     */
+    public int get_att_data_inf_than_count(final String[] argin) throws DevFailed {
+        get_logger().info("Entering get_att_data_inf_than_count()");
+        reconnectDatabaseIfNecessary();
+        int argout = 0;
+        if (dbProxy != null) {
+            if (argin.length != 2) {
+                Except.throw_exception("CONFIGURATION_ERROR", "Wrong number of parameters",
+                        "HdbExtractor.get_att_scalar_data_inf_than_count");
+            } else {
+                try {
+                    argout = dbProxy.getDataBase().getExtractor().getInfSupGetters().getAttDataInfThanCount(argin);
+                } catch (final ArchivingException e) {
+                    throw e.toTangoException();
+                }
+            }
+        }
+        get_logger().info("Exiting get_att_data_inf_than_count()");
+        return argout;
+    }
+
+    /**
+     * Execute command "GetAttDataInfThanBetweenDates" on device. Retrieves data
+     * beetwen two dates (date_1 & date_2) - Data are lower than the given value
+     * x. Create a dynamic attribute, retrieve the corresponding data from
+     * database and prepare result for attribute_history call.
+     * 
+     * @param argin
+     *            The attribute's name, the upper limit, the beginning date
+     *            (DD-MM-YYYY HH24:MI:SS) and the ending date (DD-MM-YYYY
+     *            HH24:MI:SS)
+     * @return String : The new created dynamic attribute name, Long : the
+     *         number of data.
+     */
+    public DevVarLongStringArray get_att_data_inf_than_between_dates(final String[] argin) throws DevFailed {
+        get_logger().info("Entering get_att_data_inf_than_between_dates()");
+        reconnectDatabaseIfNecessary();
+        DevVarLongStringArray argout = null;
+        if (dbProxy != null) {
+            if (argin.length != 4) {
+                Except.throw_exception("CONFIGURATION_ERROR", "Wrong number of parameters",
+                        "HdbExtractor.get_att_scalar_data_inf_than_beetween_dates");
+            } else {
+                try {
+                    // Get data from db.
+                    final DbData dbData = dbProxy.getDataBase().getExtractor().getInfSupGettersBetweenDates()
+                            .getAttDataInfThanBetweenDates(argin);
+                    // Buid an attribute and gets its references
+                    argout = add_attribute(dbData);
+                } catch (final ArchivingException e) {
+                    throw e.toTangoException();
+                }
+            }
+        }
+        get_logger().info("Exiting get_att_data_inf_than_between_dates()");
+        return argout;
+    }
+
+    /**
+     * Execute command "GetAttDataInfThanBetweenDatesCount" on device. Returns
+     * the number data lower than the given value x, and beetwen two dates
+     * (date_1 & date_2).
+     * 
+     * @param argin
+     *            The attribute's name, the upper limit, the beginning date
+     *            (DD-MM-YYYY HH24:MI:SS) and the ending date (DD-MM-YYYY
+     *            HH24:MI:SS).
+     * @return The number data lower than the given value x, and beetwen two
+     *         dates (date_1 & date_2).
+     */
+    public int get_att_data_inf_than_between_dates_count(final String[] argin) throws DevFailed {
+        get_logger().info("Entering get_att_data_inf_than_between_dates_count()");
+        reconnectDatabaseIfNecessary();
+        int argout = 0;
+        if (dbProxy != null) {
+            if (argin.length != 4) {
+                Except.throw_exception("CONFIGURATION_ERROR", "Wrong number of parameters",
+                        "HdbExtractor.get_att_scalar_data_inf_than_between_dates_count");
+            } else {
+                try {
+                    argout = dbProxy.getDataBase().getExtractor().getInfSupGettersBetweenDates()
+                            .getAttDataInfThanBetweenDatesCount(argin);
+                } catch (final ArchivingException e) {
+                    throw e.toTangoException();
+                }
+            }
+        }
+        get_logger().info("Exiting get_att_data_inf_than_between_dates_count()");
+        return argout;
+    }
+
+    /**
+     * Execute command "GetAttDataLastN" on device. Retrieves the last n
+     * archived data, for a given scalar attribute. Create a dynamic attribute,
+     * retrieve the corresponding data from database and prepare result for
+     * attribute_history call.
+     * 
+     * @param argin
+     *            The attribute's name and the number of wished data
+     * @return String : The new created dynamic attribute name, Long : the
+     *         number of data.
+     */
+    public DevVarLongStringArray get_att_data_last_n(final String[] argin) throws DevFailed {
+        get_logger().info("Entering get_att_data_last_n()");
+        reconnectDatabaseIfNecessary();
+        DevVarLongStringArray argout = null;
+        if (dbProxy != null) {
+            if (argin.length != 2) {
+                Except.throw_exception("CONFIGURATION_ERROR", "Wrong number of parameters",
+                        "HdbExtractor.get_att_scalar_data_last_n");
+            } else {
+                try {
+                    // Get data from db.
+                    final DbData dbData = dbProxy.getDataBase().getExtractor().getDataGetters().getAttDataLastN(argin);
+                    // Buid an attribute and gets its references
+                    argout = add_attribute(dbData);
+                } catch (final ArchivingException e) {
+                    e.printStackTrace();
+                    throw e.toTangoException();
+                }
+            }
+        }
+        get_logger().info("Exiting get_att_data_last_n()");
+        return argout;
+    }
+
+    /**
+     * Execute command "GetAttDataMax" on device. Returns the biggest value
+     * generated by the attribute.
+     * 
+     * @param argin
+     *            The attribute's name
+     * @return The biggest value generated by the attribute
+     */
+    public double get_att_data_max(final String argin) throws DevFailed {
+        get_logger().info("Entering get_att_data_max()");
+        reconnectDatabaseIfNecessary();
+        double argout = 0;
+        if (dbProxy != null) {
+            try {
+                argout = dbProxy.getDataBase().getExtractor().getMinMaxAvgGetters().getAttDataMax(argin);
+            } catch (final ArchivingException e) {
+                throw e.toTangoException();
+            }
+        }
+        get_logger().info("Exiting get_att_data_max()");
+        return argout;
+    }
+
+    /**
+     * Execute command "GetAttDataMaxBetweenDates" on device. Returns the
+     * biggest value generated between the two given dates.
+     * 
+     * @param argin
+     *            The attribute's name, the beginning date (DD-MM-YYYY
+     *            HH24:MI:SS) and the ending date (DD-MM-YYYY HH24:MI:SS)
+     * @return The biggest value generated between the two given dates.
+     */
+    public double get_att_data_max_between_dates(final String[] argin) throws DevFailed {
+        get_logger().info("Entering get_att_data_max_between_dates()");
+        reconnectDatabaseIfNecessary();
+        double argout = 0;
+        if (dbProxy != null) {
+            if (argin.length != 3) {
+                Except.throw_exception("CONFIGURATION_ERROR", "Wrong number of parameters",
+                        "HdbExtractor.get_att_scalar_data_max_between_dates");
+            } else {
+                try {
+                    argout = dbProxy.getDataBase().getExtractor().getMinMaxAvgGettersBetweenDates()
+                            .getAttDataMaxBetweenDates(argin);
+                } catch (final ArchivingException e) {
+                    throw e.toTangoException();
+                }
+            }
+        }
+        get_logger().info("Exiting get_att_data_max_between_dates()");
+        return argout;
+    }
+
+    /**
+     * Execute command "GetAttDataMin" on device. Returns the smallest scalar
+     * value generated by the attribute.
+     * 
+     * @param argin
+     *            The attribute's name
+     * @return The smallest value generated by the attribute
+     */
+    public double get_att_data_min(final String argin) throws DevFailed {
+        get_logger().info("Entering get_att_data_min()");
+        reconnectDatabaseIfNecessary();
+        double argout = 0;
+        if (dbProxy != null) {
+            try {
+                argout = dbProxy.getDataBase().getExtractor().getMinMaxAvgGetters().getAttDataMin(argin);
+            } catch (final ArchivingException e) {
+                throw e.toTangoException();
+            }
+        }
+        get_logger().info("Exiting get_att_data_min()");
+        return argout;
+    }
+
+    /**
+     * Execute command "GetAttDataMinBetweenDates" on device. Returns the
+     * smallest scalar value generated by the given attribute and between two
+     * given dates
+     * 
+     * @param argin
+     *            The attribute's name, the beginning date (DD-MM-YYYY
+     *            HH24:MI:SS) and the ending date (DD-MM-YYYY HH24:MI:SS)
+     * @return The smallest scalar value generated by the given attribute and
+     *         between the two given dates.
+     */
+    public double get_att_data_min_between_dates(final String[] argin) throws DevFailed {
+        get_logger().info("Entering get_att_data_min_between_dates()");
+        reconnectDatabaseIfNecessary();
+        double argout = 0;
+        if (dbProxy != null) {
+            if (argin.length != 3) {
+                Except.throw_exception("CONFIGURATION_ERROR", "Wrong number of parameters",
+                        "HdbExtractor.get_att_scalar_data_min_between_dates");
+            } else {
+                try {
+                    argout = dbProxy.getDataBase().getExtractor().getMinMaxAvgGettersBetweenDates()
+                            .getAttDataMinBetweenDates(argin);
+                } catch (final ArchivingException e) {
+                    throw e.toTangoException();
+                }
+            }
+        }
+        get_logger().info("Exiting get_att_data_min_between_dates()");
+        return argout;
+    }
+
+    /**
+     * Execute command "GetAttDataSupThan" on device. Retrieves all the data
+     * that are higher than the given value x. Create a dynamic attribute,
+     * retrieve the corresponding data from database and prepare result for
+     * attribute_history call.
+     * 
+     * @param argin
+     *            The attribute's name and the lower limit
+     * @return String : The new created dynamic attribute name, Long : the
+     *         number of data.
+     */
+    public DevVarLongStringArray get_att_data_sup_than(final String[] argin) throws DevFailed {
+        get_logger().info("Entering get_att_data_sup_than()");
+        reconnectDatabaseIfNecessary();
+        DevVarLongStringArray argout = null;
+        if (dbProxy != null) {
+            if (argin.length != 2) {
+                Except.throw_exception("CONFIGURATION_ERROR", "Wrong number of parameters",
+                        "HdbExtractor.get_att_scalar_data_sup_than");
+            } else {
+                try {
+                    // Get data from db.
+                    final DbData dbData = dbProxy.getDataBase().getExtractor().getInfSupGetters()
+                            .getAttDataSupThan(argin);
+                    // Buid an attribute and gets its references
+                    argout = add_attribute(dbData);
+                } catch (final ArchivingException e) {
+                    throw e.toTangoException();
+                }
+            }
+        }
+        get_logger().info("Exiting get_att_data_sup_than()");
+        return argout;
+    }
+
+    /**
+     * Execute command "GetAttDataSupThanCount" on device. Returns the number of
+     * data higher than the given value.
+     * 
+     * @param argin
+     *            The attribute's name and the lower limit.
+     * @return The number of data higher than the given value.
+     */
+    public int get_att_data_sup_than_count(final String[] argin) throws DevFailed {
+        get_logger().info("Entering get_att_data_sup_than_count()");
+        reconnectDatabaseIfNecessary();
+        int argout = 0;
+        if (dbProxy != null) {
+            if (argin.length != 2) {
+                Except.throw_exception("CONFIGURATION_ERROR", "Wrong number of parameters",
+                        "HdbExtractor.get_att_scalar_data_sup_than_count");
+            } else {
+                try {
+                    argout = dbProxy.getDataBase().getExtractor().getInfSupGetters().getAttDataSupThanCount(argin);
+                } catch (final ArchivingException e) {
+                    throw e.toTangoException();
+                }
+            }
+        }
+        get_logger().info("Exiting get_att_data_sup_than_count()");
+        return argout;
+    }
+
+    /**
+     * Execute command "GetAttDataSupAndInfThan" on device. Retrieves all data
+     * that are higher than the given value x AND lower than the given value y.
+     * Create a dynamic attribute, retrieve the corresponding data from database
+     * and prepare result for attribute_history call.
+     * 
+     * @param argin
+     *            The attribute's name, the lower limit and the upper limit
+     * @return String : The new created dynamic attribute name, Long : the
+     *         number of data.
+     */
+    public DevVarLongStringArray get_att_data_sup_and_inf_than(final String[] argin) throws DevFailed {
+        get_logger().info("Entering get_att_data_sup_and_inf_than()");
+        reconnectDatabaseIfNecessary();
+        DevVarLongStringArray argout = null;
+        if (dbProxy != null) {
+            if (argin.length != 3) {
+                Except.throw_exception("CONFIGURATION_ERROR", "Wrong number of parameters",
+                        "HdbExtractor.get_att_scalar_data_sup_and_inf_than");
+            } else {
+                try {
+                    // Get data from db.
+                    final DbData dbData = dbProxy.getDataBase().getExtractor().getInfSupGetters()
+                            .getAttDataSupAndInfThan(argin);
+                    // Buid an attribute and gets its references
+                    argout = add_attribute(dbData);
+                } catch (final ArchivingException e) {
+                    throw e.toTangoException();
+                }
+            }
+        }
+        get_logger().info("Exiting get_att_data_sup_and_inf_than()");
+        return argout;
+    }
+
+    /**
+     * Execute command "GetAttDataSupAndInfThanCount" on device. Returns data
+     * that are highter than the given value x AND lower than the given value y.
+     * 
+     * @param argin
+     *            The attribute's name, the lower limit and the upper limit
+     * @return The data that are highter than the given value x AND lower than
+     *         the given value y.
+     */
+    public int get_att_data_sup_and_inf_than_count(final String[] argin) throws DevFailed {
+        get_logger().info("Entering get_att_data_sup_and_inf_than_count()");
+        reconnectDatabaseIfNecessary();
+        int argout = 0;
+        if (dbProxy != null) {
+            if (argin.length != 3) {
+                Except.throw_exception("CONFIGURATION_ERROR", "Wrong number of parameters",
+                        "HdbExtractor.get_att_scalar_data_sup_and_inf_than_count");
+            } else {
+                try {
+                    argout = dbProxy.getDataBase().getExtractor().getInfSupGetters()
+                            .getAttDataSupAndInfThanCount(argin);
+                } catch (final ArchivingException e) {
+                    throw e.toTangoException();
+                }
+            }
+        }
+        get_logger().info("Exiting get_att_data_sup_and_inf_than_count()");
+        return argout;
+    }
+
+    /**
+     * Execute command "GetAttDataSupAndInfThanBetweenDates" on device.
+     * Retrieves data beetwen two dates (date_1 & date_2) - Data are higher than
+     * the given value x AND lower than the given value y. Create a dynamic
+     * attribute, retrieve the corresponding data from database and prepare
+     * result for attribute_history call.
+     * 
+     * @param argin
+     *            The attribute's name, the lower limit, the upper limit, the
+     *            beginning date (DD-MM-YYYY HH24:MI:SS) and the ending date
+     *            (DD-MM-YYYY HH24:MI:SS)
+     * @return String : The new created dynamic attribute name, Long : the
+     *         number of data.
+     */
+    public DevVarLongStringArray get_att_data_sup_and_inf_than_between_dates(final String[] argin) throws DevFailed {
+        get_logger().info("Entering get_att_data_sup_and_inf_than_between_dates()");
+        reconnectDatabaseIfNecessary();
+        DevVarLongStringArray argout = null;
+        if (dbProxy != null) {
+            if (argin.length != 5) {
+                Except.throw_exception("CONFIGURATION_ERROR", "Wrong number of parameters",
+                        "HdbExtractor.get_att_scalar_data_sup_and_inf_than_beetween_dates");
+            } else {
+                try {
+                    // Get data from db.
+                    final DbData dbData = dbProxy.getDataBase().getExtractor().getInfSupGettersBetweenDates()
+                            .getAttDataSupAndInfThanBetweenDates(argin);
+                    // Buid an attribute and gets its references
+                    argout = add_attribute(dbData);
+                } catch (final ArchivingException e) {
+                    throw e.toTangoException();
+                }
+            }
+        }
+        get_logger().info("Exiting get_att_data_sup_and_inf_than_between_dates()");
+        return argout;
+    }
+
+    /**
+     * Execute command "GetAttDataSupAndInfThanBetweenDatesCount" on device.
+     * Returns the number of data higher than the given value x, (AND) lower
+     * than the given value y, and beetwen two dates (date_1 & date_2).
+     * 
+     * @param argin
+     *            The attribute's name, the lower limit, the upper limit, the
+     *            beginning date (DD-MM-YYYY HH24:MI:SS) and the ending date
+     *            (DD-MM-YYYY HH24:MI:SS).
+     * @return The number of data higher than the given value x, (AND) lower
+     *         than the given value y, and beetwen two dates (date_1 & date_2).
+     */
+    public int get_att_data_sup_and_inf_than_between_dates_count(final String[] argin) throws DevFailed {
+        get_logger().info("Entering get_att_data_sup_and_inf_than_between_dates_count()");
+        reconnectDatabaseIfNecessary();
+        int argout = 0;
+        if (dbProxy != null) {
+            if (argin.length != 5) {
+                Except.throw_exception("CONFIGURATION_ERROR", "Wrong number of parameters",
+                        "HdbExtractor.get_att_scalar_data_sup_and_inf_than_between_dates_count");
+            } else {
+                try {
+                    argout = dbProxy.getDataBase().getExtractor().getInfSupGettersBetweenDates()
+                            .getAttDataSupAndInfThanBetweenDatesCount(argin);
+                } catch (final ArchivingException e) {
+                    throw e.toTangoException();
+                }
+            }
+        }
+        get_logger().info("Exiting get_att_data_sup_and_inf_than_between_dates_count()");
+        return argout;
+    }
+
+    /**
+     * Execute command "GetAttDataSupThanBetweenDates" on device. Retrieves data
+     * beetwen two dates (date_1 & date_2) - Data are higher than the given
+     * value x. Create a dynamic attribute, retrieve the corresponding data from
+     * database and prepare result for attribute_history call.
+     * 
+     * @param argin
+     *            The attribute's name, the lower limit, the beginning date
+     *            (DD-MM-YYYY HH24:MI:SS) and the ending date (DD-MM-YYYY
+     *            HH24:MI:SS)
+     * @return String : The new created dynamic attribute name, Long : the
+     *         number of data.
+     */
+    public DevVarLongStringArray get_att_data_sup_than_between_dates(final String[] argin) throws DevFailed {
+        get_logger().info("Entering get_att_data_sup_than_between_dates()");
+        reconnectDatabaseIfNecessary();
+        DevVarLongStringArray argout = null;
+        if (dbProxy != null) {
+            if (argin.length != 4) {
+                Except.throw_exception("CONFIGURATION_ERROR", "Wrong number of parameters",
+                        "HdbExtractor.get_att_scalar_data_sup_than_beetween_dates");
+            } else {
+                try {
+                    // Get data from db.
+                    final DbData dbData = dbProxy.getDataBase().getExtractor().getInfSupGettersBetweenDates()
+                            .getAttDataSupThanBetweenDates(argin);
+                    // Buid an attribute and gets its references
+                    argout = add_attribute(dbData);
+                } catch (final ArchivingException e) {
+                    throw e.toTangoException();
+                }
+            }
+        }
+        get_logger().info("Exiting get_att_data_sup_than_between_dates()");
+        return argout;
+    }
+
+    /**
+     * Execute command "GetAttDataSupThanBetweenDatesCount" on device. Returns
+     * the number of data higher than the given value y, and beetwen two dates
+     * (date_1 & date_2).
+     * 
+     * @param argin
+     *            The attribute's name, the lower limit, the beginning date
+     *            (DD-MM-YYYY HH24:MI:SS) and the ending date (DD-MM-YYYY
+     *            HH24:MI:SS).
+     * @return The number of data higher than the given value y, and beetwen two
+     *         dates (date_1 & date_2).
+     */
+    public int get_att_data_sup_than_between_dates_count(final String[] argin) throws DevFailed {
+        get_logger().info("Entering get_att_data_sup_than_between_dates_count()");
+        reconnectDatabaseIfNecessary();
+        int argout = 0;
+        if (dbProxy != null) {
+            if (argin.length != 4) {
+                Except.throw_exception("CONFIGURATION_ERROR", "Wrong number of parameters",
+                        "HdbExtractor.get_att_scalar_data_sup_than_between_dates_count");
+            } else {
+                try {
+                    argout = dbProxy.getDataBase().getExtractor().getInfSupGettersBetweenDates()
+                            .getAttDataSupThanBetweenDatesCount(argin);
+                } catch (final ArchivingException e) {
+                    throw e.toTangoException();
+                }
+            }
+        }
+        get_logger().info("Exiting get_att_data_sup_than_between_dates_count()");
+        return argout;
+    }
+
+    /**
+     * Execute command "RemoveDynamicAttribute" on device. Remove the dynamic
+     * attribute.
+     * 
+     * @param argin
+     *            The HdbExtractor dynamic attribute's name
+     */
+    public void remove_dynamic_attribute(final String argin) throws DevFailed {
+        get_logger().info("Entering remove_dynamic_attribute()");
+
+        // Remove prop for the attribute
+        final String[] obj_to_del = new String[3];
+        obj_to_del[0] = device_name;
+        obj_to_del[1] = "attribute";
+        obj_to_del[2] = argin;
+        final Util tg = Util.instance();
+        tg.get_dserver_device().rem_obj_polling(obj_to_del, false);
+
+        // Remove the attribute
+        remove_attribute(argin);
+        get_logger().info("Exiting remove_dynamic_attribute()");
+    }
+
+    public String getName(final String completeName, final int id, final boolean isReadValue) {
+        final String partialName = getPartialName(completeName);
+        final String marker = isReadValue ? "r" : "w";
+
+        final StringBuilder buff = new StringBuilder();
+        buff.append(partialName);
+        buff.append("_");
+        buff.append(String.valueOf(id));
+        buff.append("_");
+        buff.append(marker);
+
+        return buff.toString().toLowerCase();
+    }
+
+    /**
+     * @param completeName
+     * @return
+     */
+    private String getPartialName(final String completeName) {
+        try {
+            final StringTokenizer st = new StringTokenizer(completeName, "/");
+            st.nextToken();// domain
+            st.nextToken();// family
+            st.nextToken();// member
+            return st.nextToken();// attribute
+        } catch (final Exception e) {
+            e.printStackTrace();
+            return null;
+        }
+    }
+
+    private DevVarLongStringArray add_attribute(final DbData dbData) throws DevFailed, ArchivingException {
+        if (dbData.getTimedData() == null || dbData.getTimedData().length == 0) {
+            // String message = "Can't create the dynamic attribute!";
+            // String reason = "The data is empty.";
+            // String desc = "add_attribute/The DbData argument is empty.";
+
+            // throw new ArchivingException(message , reason , null , desc ,
+            // this.getClass().getName());
+            final int[] lv = { 0 };
+            final String[] sv = { "NO_DATA" };
+            final DevVarLongStringArray res = new DevVarLongStringArray(lv, sv);
+            return res;
+
+        }
+
+        DevVarLongStringArray argout = new DevVarLongStringArray();
+
+        final boolean _2value = dbData.getWritable() == AttrWriteType._READ_WITH_WRITE
+                || dbData.getWritable() == AttrWriteType._READ_WRITE ? true : false;
+        String random_name_1 = "", random_name_2 = "";
+        String[] names;
+        // Build new Attribute's name
+        final boolean firstIsRead = dbData.getWritable() != AttrWriteType._WRITE;
+        // random_name_1 = "att_000" + id++;
+        random_name_1 = getName(dbData.getName(), id, firstIsRead);
+        if (_2value) {
+            // random_name_2 = "att_000" + id++;
+            random_name_2 = getName(dbData.getName(), id, !firstIsRead);
+        }
+        id++;
+
+        if (!_2value) {
+            names = new String[1];
+            names[0] = random_name_1;
+        } else {
+            names = new String[2];
+            names[0] = random_name_1;
+            names[1] = random_name_2;
+        }
+
+        int data_type;
+        data_type = dbData.getDataType();
+
+        if (data_type == TangoConst.Tango_DEV_STATE) {
+            // The STATE type attributes are translated in STRING TYPE because
+            // the State type is not well
+            // managed in Tango layers
+            data_type = TangoConst.Tango_DEV_STRING;
+        } else if (data_type == TangoConst.Tango_DEV_USHORT || data_type == TangoConst.Tango_DEV_UCHAR) {
+            // U_* types are not supported by polling buffer, so use another
+            // supported type
+            data_type = TangoConst.Tango_DEV_SHORT;
+        } else if (data_type == TangoConst.Tango_DEV_ULONG) {
+            data_type = TangoConst.Tango_DEV_LONG;
+        } else if (data_type == TangoConst.Tango_DEV_ULONG64) {
+            data_type = TangoConst.Tango_DEV_LONG64;
+        }
+
+        // Create the attribute depends on DataFormat
+        switch (dbData.getDataFormat()) {
+            case AttrDataFormat._SCALAR:
+                // TODO Correction Tango � reporter !! Tango [Java side]
+                // ne
+                // supporte pas les attributs READ-WRITE.
+                // add_attribute(new Attr(random_name_1,
+                // dbData.getData_type(),
+                // AttrWriteType.from_int(dbData.getWritable())));
+                add_attribute(new Attr(random_name_1, data_type, AttrWriteType.READ));
+
+                if (_2value) {
+                    add_attribute(new Attr(random_name_2, data_type, AttrWriteType.READ));
+                }
+                break;
+            case AttrDataFormat._SPECTRUM:
+                int dimX = dbData.getMaxX();
+                if (dimX == 0) {
+                    dimX = 1;
+                }
+                add_attribute(new SpectrumAttr(random_name_1, data_type, dimX));
+                if (_2value) {
+                    add_attribute(new SpectrumAttr(random_name_2, data_type, dimX));
+                }
+                break;
+            case AttrDataFormat._IMAGE:
+                add_attribute(new ImageAttr(random_name_1, data_type, dbData.getMaxX(), dbData.getMaxY()));
+                break;
+        }
+
+        get_logger().info("attr " + random_name_1 + " created");
+        if (_2value) {
+            get_logger().info("attr " + random_name_2 + " created");
+        }
+        set_polled_attr(names);
+        set_poll_ring_depth(dbData.size());
+
+        // Start polling for this device in external sync. mode (udt = 0)
+        DevVarLongStringArray poll_1, poll_2;
+        poll_1 = new DevVarLongStringArray();
+        poll_2 = new DevVarLongStringArray();
+
+        poll_1.lvalue = new int[1];
+        poll_1.lvalue[0] = 0;
+        poll_1.svalue = new String[3];
+        poll_1.svalue[0] = device_name;
+        poll_1.svalue[1] = "attribute";
+        poll_1.svalue[2] = random_name_1;
+
+        if (_2value) {
+            poll_2.lvalue = new int[1];
+            poll_2.lvalue[0] = 0;
+            poll_2.svalue = new String[3];
+            poll_2.svalue[0] = device_name;
+            poll_2.svalue[1] = "attribute";
+            poll_2.svalue[2] = random_name_2;
+        }
+        final Util tg_1 = Util.instance();
+        tg_1.get_dserver_device().add_obj_polling(poll_1, false);
+
+        final Util tg_2 = Util.instance();
+        if (_2value) {
+            tg_2.get_dserver_device().add_obj_polling(poll_2, false);
+        }
+
+        // And fill buffer with database's data
+        try {
+            if (_2value) {
+                final DbData[] dbDatas = dbData.splitDbData();
+                tg_1.fill_attr_polling_buffer(this, random_name_1, dbDatas[0].getDataAsTimedAttrData());
+                tg_2.fill_attr_polling_buffer(this, random_name_2, dbDatas[1].getDataAsTimedAttrData());
+            } else {
+                tg_1.fill_attr_polling_buffer(this, random_name_1, dbData.getDataAsTimedAttrData());
+            }
+        } catch (final DevFailed e) {
+            throw e;
+        } catch (final Exception e) {
+            // FIXME java.lang.ArrayIndexOutOfBoundsException thrown when some
+            // data are empty.
+            e.printStackTrace();
+            System.out.println("ERROR when filling data polling buffer, may be empty");
+        }
+
+        argout = new DevVarLongStringArray();
+        argout.lvalue = new int[1];
+        if (_2value) {
+            argout.svalue = new String[2];
+        } else {
+            argout.svalue = new String[1];
+        }
+
+        argout.lvalue[0] = dbData.getTimedData().length;
+        argout.svalue[0] = random_name_1;
+        if (_2value) {
+            argout.svalue[1] = random_name_2;
+        }
+
+        return argout;
+
+    }
+
+    /**
+     * Method called by the read_attributes CORBA operation to set internal
+     * attribute value.
+     * 
+     * @param attr
+     *            reference to the Attribute object
+     */
+    @Override
+    public void read_attr(final Attribute attr) throws DevFailed {
+        final String attr_name = attr.get_name();
+        // get_logger().info("In read_attr for attribute " + attr_name);
+
+        // Switch on attribute name
+        // ---------------------------------
+        if (attr_name == "version") {
+            // Add your own code here
+            attr.set_value(m_version);
+        }
+    }
+
+    public String get_max_time(final String argin) throws DevFailed {
+        reconnectDatabaseIfNecessary();
+        String argout;
+        if (dbProxy == null) {
+            argout = "";
+        } else {
+            try {
+                final DataBaseManager db = dbProxy.getDataBase();
+                final Timestamp last = db.getDbUtil().getTimeOfLastInsert(argin, true);
+                if (last == null) {
+                    argout = "NO VALUES RECORDED";
+                } else {
+                    argout = last.toString();
+                }
+            } catch (final ArchivingException e) {
+                e.printStackTrace();
+                throw e.toTangoException();
+            }
+        }
+        return argout;
+    }
+
+    public String get_min_time(final String argin) throws DevFailed {
+        reconnectDatabaseIfNecessary();
+        String argout;
+        if (dbProxy == null) {
+            argout = "";
+        } else {
+            try {
+                final DataBaseManager db = dbProxy.getDataBase();
+                final Timestamp last = db.getDbUtil().getTimeOfLastInsert(argin, false);
+                if (last == null) {
+                    argout = "NO VALUES RECORDED";
+                } else {
+                    argout = last.toString();
+                }
+            } catch (final ArchivingException e) {
+                e.printStackTrace();
+                throw e.toTangoException();
+            }
+        }
+        return argout;
+    }
+
+    @Override
+    public void delete_device() throws DevFailed {
+        // TODO Auto-generated method stub
+
+    }
+
+    /**
+     * main part for the device server class
+     */
+    public static void main(final String[] argv) {
+        try {
+            final Util tg = Util.init(argv, "HdbExtractor");
+            tg.server_init();
+
+            System.out.println("Ready to accept request");
+
+            tg.server_run();
+        } catch (final OutOfMemoryError ex) {
+            System.err.println("Can't allocate memory !!!!");
+            System.err.println("Exiting");
+        } catch (final UserException ex) {
+            Except.print_exception(ex);
+
+            System.err.println("Received a CORBA user exception");
+            System.err.println("Exiting");
+        } catch (final SystemException ex) {
+            Except.print_exception(ex);
+
+            System.err.println("Received a CORBA system exception");
+            System.err.println("Exiting");
+        }
+
+        System.exit(-1);
+    }
+
+}
diff --git a/src/main/java/HdbExtractor/HdbExtractorClass.java b/hdbextractor/src/main/java/HdbExtractor/HdbExtractorClass.java
similarity index 98%
rename from src/main/java/HdbExtractor/HdbExtractorClass.java
rename to hdbextractor/src/main/java/HdbExtractor/HdbExtractorClass.java
index 441eadf88812624f67ea199d5367adb8bf12f35e..d574a529dbf2f13cbca36dd56efc565a5309f9de 100644
--- a/src/main/java/HdbExtractor/HdbExtractorClass.java
+++ b/hdbextractor/src/main/java/HdbExtractor/HdbExtractorClass.java
@@ -1,541 +1,541 @@
-// +======================================================================
-// $Source: /cvsroot/tango-cs/tango/jserver/archiving/HdbExtractor/HdbExtractorClass.java,v $
-//
-// Project:   	Tango Device Server
-//
-// Description:	java source code for the HdbExtractor class .
-//              This class is a singleton class and implements everything
-//              which exists only once for all the  HdbExtractor object
-//              It inherits from the DeviceClass class.
-//
-// $Author: pierrejoseph $
-//
-// $Revision: 1.15 $
-//
-// $Log: HdbExtractorClass.java,v $
-// Revision 1.15  2007/05/11 13:58:34  pierrejoseph
-// Attribute addition : release version
-//
-// Revision 1.14  2007/03/16 08:44:14  ounsy
-// added a GetMinTime command
-//
-// Revision 1.13  2007/03/02 08:46:02  ounsy
-// added the GetMaxTime command
-//
-// Revision 1.12  2007/03/01 17:59:00  pierrejoseph
-// The new  input args date format is YYYY-MM-DD
-//
-// Revision 1.11  2007/03/01 10:08:01  ounsy
-// added the RemoveDynamicAttributes command
-//
-// Revision 1.10  2006/09/07 13:48:29  ounsy
-// added extraction with sampling methods
-//
-// Revision 1.9  2006/08/23 09:41:57  ounsy
-// minor changes
-//
-// Revision 1.8  2006/01/27 13:07:04  ounsy
-// organised imports
-//
-// Revision 1.7  2005/11/29 17:33:38  chinkumo
-// no message
-//
-// Revision 1.6.10.4  2005/11/29 16:17:38  chinkumo
-// Code reformated (pogo compatible)
-//
-// Revision 1.6.10.3  2005/11/15 13:45:53  chinkumo
-// ...
-//
-// Revision 1.6.10.2  2005/09/26 07:58:48  chinkumo
-// Every commands of shape 'getAttDataXXXXCount(...)' was changed. The type of their returned object was changed from 'short' to 'long'.
-//
-// Revision 1.6.10.1  2005/09/09 10:34:36  chinkumo
-// Since the extraction politic changed to 'dynamic attributes', the device was pogo-regenerated.
-//
-//
-// copyleft :    European Synchrotron Radiation Facility
-//               BP 220, Grenoble 38043
-//               FRANCE
-//
-//-======================================================================
-//
-//  		This file is generated by POGO
-//	(Program Obviously used to Generate tango Object)
-//
-//         (c) - Software Engineering Group - ESRF
-//=============================================================================
-
-package HdbExtractor;
-
-import java.util.ResourceBundle;
-import java.util.Vector;
-
-import fr.esrf.Tango.AttrWriteType;
-import fr.esrf.Tango.DevFailed;
-import fr.esrf.Tango.DispLevel;
-import fr.esrf.TangoApi.DbDatum;
-import fr.esrf.TangoDs.Attr;
-import fr.esrf.TangoDs.DeviceClass;
-import fr.esrf.TangoDs.DeviceImpl;
-import fr.esrf.TangoDs.TangoConst;
-import fr.esrf.TangoDs.TemplCommandInOut;
-import fr.esrf.TangoDs.Util;
-
-public class HdbExtractorClass extends DeviceClass implements TangoConst {
-    /**
-     * HdbExtractorClass class instance (it is a singleton).
-     */
-    private static HdbExtractorClass _instance = null;
-
-    /**
-     * Class properties array.
-     */
-    private DbDatum[] cl_prop = null;
-
-    // --------- Start of properties data members ----------
-
-    // --------- End of properties data members ----------
-
-    // ===================================================================
-    //
-    // method : instance()
-    //
-    // description : static method to retrieve the HdbExtractorClass object
-    // once it has been initialised
-    //
-    // ===================================================================
-    public static synchronized HdbExtractorClass instance() {
-        if (_instance == null) {
-            System.err.println("HdbExtractorClass is not initialised !!!");
-            System.err.println("Exiting");
-            System.exit(-1);
-        }
-        return _instance;
-    }
-
-    // ===================================================================
-    //
-    // method : Init()
-    //
-    // description : static method to create/retrieve the HdbExtractorClass
-    // object. This method is the only one which enables a
-    // user to create the object
-    //
-    // in : - class_name : The class name
-    //
-    // ===================================================================
-    public static HdbExtractorClass init(String class_name) throws DevFailed {
-        if (_instance == null) {
-            _instance = new HdbExtractorClass(class_name);
-        }
-        return _instance;
-    }
-
-    // ===================================================================
-    //
-    // method : HdbExtractorClass()
-    //
-    // description : constructor for the HdbExtractorClass class
-    //
-    // argument : in : - name : The class name
-    //
-    // ===================================================================
-    protected HdbExtractorClass(String name) throws DevFailed {
-        super(name);
-
-        Util.out2.println("Entering HdbExtractorClass constructor");
-        // write_class_property();
-        get_class_property();
-
-        Util.out2.println("Leaving HdbExtractorClass constructor");
-    }
-
-    // ===================================================================
-    //
-    // method : command_factory()
-    //
-    // description : Create the command object(s) and store them in the
-    // command list
-    // ===================================================================
-    @Override
-    public void command_factory() {
-        command_list.addElement(new GetMinTimeClass("GetMinTime", Tango_DEV_STRING, Tango_DEV_STRING,
-                "The attribute to search", "The earliest value's timestamp", DispLevel.OPERATOR));
-        command_list.addElement(new GetMaxTimeClass("GetMaxTime", Tango_DEV_STRING, Tango_DEV_STRING,
-                "The attribute to search", "The latest value's timestamp", DispLevel.OPERATOR));
-        command_list.addElement(new GetInfoClass("GetInfo", Tango_DEV_VOID, Tango_DEV_STRING, "",
-                "The informations that characterize the database", DispLevel.OPERATOR));
-        command_list.addElement(new GetHostClass("GetHost", Tango_DEV_VOID, Tango_DEV_STRING, "",
-                "The connected database host identifier.", DispLevel.OPERATOR));
-        command_list.addElement(new GetUserClass("GetUser", Tango_DEV_VOID, Tango_DEV_STRING, "",
-                "The current user's name used for the connection.", DispLevel.OPERATOR));
-        command_list.addElement(new GetConnectionStateClass("GetConnectionState", Tango_DEV_VOID, Tango_DEV_BOOLEAN,
-                "", "The connection state", DispLevel.OPERATOR));
-        command_list.addElement(new GetAttDefinitionDataClass("GetAttDefinitionData", Tango_DEV_STRING,
-                Tango_DEVVAR_STRINGARRAY, "The attribute's name",
-                "Differents definition informations for the given attribute", DispLevel.OPERATOR));
-        command_list.addElement(new GetAttPropertiesDataClass("GetAttPropertiesData", Tango_DEV_STRING,
-                Tango_DEVVAR_STRINGARRAY, "The attribute's name",
-                "An array containing the differents properties for the given attribute", DispLevel.OPERATOR));
-        command_list.addElement(new GetAttIdClass("GetAttId", Tango_DEV_STRING, Tango_DEV_LONG, "The attribute's name",
-                "The HDB's ID that characterize the given attribute", DispLevel.OPERATOR));
-        command_list.addElement(new GetAttNameAllClass("GetAttNameAll", Tango_DEV_VOID, Tango_DEVVAR_STRINGARRAY, "",
-                "The whole list of the attributes registered in HDB", DispLevel.OPERATOR));
-        command_list.addElement(new GetAttNameFacilityClass("GetAttNameFacility", Tango_DEV_VOID,
-                Tango_DEVVAR_STRINGARRAY, "",
-                "The whole list of the attributes registered in HDB, and that belong to the current facility.",
-                DispLevel.OPERATOR));
-        command_list
-                .addElement(new GetAttNameFilterFormatClass(
-                        "GetAttNameFilterFormat",
-                        Tango_DEV_SHORT,
-                        Tango_DEVVAR_STRINGARRAY,
-                        "A format [0 -> scalar - 1 -> spectrum - 2 -> image]",
-                        "The filtered list of attributes registered in HDB.  The filtering is made according to the given format [0 -> scalar - 1 -> spectrum - 2 -> image]",
-                        DispLevel.OPERATOR));
-        command_list
-                .addElement(new GetAttNameFilterTypeClass(
-                        "GetAttNameFilterType",
-                        Tango_DEV_SHORT,
-                        Tango_DEVVAR_STRINGARRAY,
-                        "A type [2 -> Tango::DevShort | 3 -> Tango::DevLong | 5 -> Tango::DevDouble and 8 -> Tango::DevString]",
-                        "The filtered list of attributes registered in HDB.  The filtering is made according to the given type [2 -> Tango::DevShort | 3 -> Tango::DevLong | 5 -> Tango::DevDouble and 8 -> Tango::DevString]",
-                        DispLevel.OPERATOR));
-        command_list.addElement(new GetAttCountAllClass("GetAttCountAll", Tango_DEV_VOID, Tango_DEV_LONG, "",
-                "The total number of attributes defined in HDB", DispLevel.OPERATOR));
-        command_list
-                .addElement(new GetAttCountFilterFormatClass(
-                        "GetAttCountFilterFormat",
-                        Tango_DEV_SHORT,
-                        Tango_DEV_LONG,
-                        "A format [0 -> scalar - 1 -> spectrum - 2 -> image]",
-                        "The total number of attributes defined in HDB with the given format [0 -> scalar - 1 -> spectrum - 2 -> image]",
-                        DispLevel.OPERATOR));
-        command_list
-                .addElement(new GetAttCountFilterTypeClass(
-                        "GetAttCountFilterType",
-                        Tango_DEV_SHORT,
-                        Tango_DEV_LONG,
-                        "A type [2 -> Tango::DevShort | 3 -> Tango::DevLong | 5 -> Tango::DevDouble and 8 -> Tango::DevString]",
-                        "The total number of attributes defined in HDB with the given type [2 -> Tango::DevShort | 3 -> Tango::DevLong | 5 -> Tango::DevDouble and 8 -> Tango::DevString]",
-                        DispLevel.OPERATOR));
-        command_list.addElement(new GetDomainsClass("GetDomains", Tango_DEV_VOID, Tango_DEVVAR_STRINGARRAY, "",
-                "The registered domains", DispLevel.OPERATOR));
-        command_list.addElement(new GetDomainsCountClass("GetDomainsCount", Tango_DEV_VOID, Tango_DEV_LONG, "",
-                "The number of distinct registered domains.", DispLevel.OPERATOR));
-        command_list.addElement(new GetFamiliesClass("GetFamilies", Tango_DEV_VOID, Tango_DEVVAR_STRINGARRAY, "",
-                "The registered families", DispLevel.OPERATOR));
-        command_list.addElement(new GetFamiliesCountClass("GetFamiliesCount", Tango_DEV_VOID, Tango_DEV_LONG, "",
-                "The number of distinct registered families.", DispLevel.OPERATOR));
-        command_list.addElement(new GetFamiliesByDomainClass("GetFamiliesByDomain", Tango_DEV_STRING,
-                Tango_DEVVAR_STRINGARRAY, "The given domain", "The registered families for the given domain",
-                DispLevel.OPERATOR));
-        command_list.addElement(new GetFamiliesByDomainCountClass("GetFamiliesByDomainCount", Tango_DEV_STRING,
-                Tango_DEV_LONG, "A domain name", "The number of distinct registered families for a given domain.",
-                DispLevel.OPERATOR));
-        command_list.addElement(new GetMembersClass("GetMembers", Tango_DEV_VOID, Tango_DEVVAR_STRINGARRAY, "",
-                "The registered members", DispLevel.OPERATOR));
-        command_list.addElement(new GetMembersCountClass("GetMembersCount", Tango_DEV_VOID, Tango_DEV_LONG, "",
-                "The number of distinct members.", DispLevel.OPERATOR));
-        command_list.addElement(new GetMembersByDomainFamilyClass("GetMembersByDomainFamily", Tango_DEVVAR_STRINGARRAY,
-                Tango_DEVVAR_STRINGARRAY, "The given domain and family",
-                "The registered members for the given domain and family", DispLevel.OPERATOR));
-        command_list.addElement(new GetMembersByDomainFamilyCountClass("GetMembersByDomainFamilyCount",
-                Tango_DEVVAR_STRINGARRAY, Tango_DEV_LONG, "A domain name, a family name",
-                "The number of distinct registered members for the given domain and family.", DispLevel.OPERATOR));
-        command_list.addElement(new GetAttributesByDomainFamilyMembersCountClass(
-                "GetAttributesByDomainFamilyMembersCount", Tango_DEVVAR_STRINGARRAY, Tango_DEV_LONG,
-                "A domain name, a family name, a member name.",
-                "The number of registered the attributes for a given  domain, family, member.", DispLevel.OPERATOR));
-        command_list.addElement(new GetCurrentArchivedAttClass("GetCurrentArchivedAtt", Tango_DEV_VOID,
-                Tango_DEVVAR_STRINGARRAY, "", "The list of attributes that are being archived", DispLevel.OPERATOR));
-        command_list.addElement(new IsArchivedClass("IsArchived", Tango_DEV_STRING, Tango_DEV_BOOLEAN,
-                "The attribute's name", "true if the given attribute is being archived", DispLevel.OPERATOR));
-        command_list.addElement(new GetArchivingModeClass("GetArchivingMode", Tango_DEV_STRING,
-                Tango_DEVVAR_STRINGARRAY, "The attribute's name",
-                "The archiving mode used for the specified attribute", DispLevel.OPERATOR));
-        command_list.addElement(new GetAttDataClass("GetAttData", Tango_DEV_STRING, Tango_DEVVAR_LONGSTRINGARRAY,
-                "The attribute's name", "String  : The new created dynamic attribute name, Long : the number of data.",
-                DispLevel.OPERATOR));
-        command_list.addElement(new GetAttDataCountClass("GetAttDataCount", Tango_DEV_STRING, Tango_DEV_LONG,
-                "An attribute name.", "The number of the data archieved for an attribute.", DispLevel.OPERATOR));
-        command_list.addElement(new GetAttDataAvgClass("GetAttDataAvg", Tango_DEV_STRING, Tango_DEV_DOUBLE,
-                "The attribute's name", "The average of the values generated by the attribute", DispLevel.OPERATOR));
-        command_list
-                .addElement(new GetAttDataAvgBetweenDatesClass(
-                        "GetAttDataAvgBetweenDates",
-                        Tango_DEVVAR_STRINGARRAY,
-                        Tango_DEV_DOUBLE,
-                        "The attribute's name, the beginning date (YYYY-MM-DD HH24:MI:SS) and the ending date (YYYY-MM-DD HH24:MI:SS)",
-                        "The average value generated by the given attribute and between the two given dates. ",
-                        DispLevel.OPERATOR));
-        command_list
-                .addElement(new GetAttDataBetweenDatesClass(
-                        "GetAttDataBetweenDates",
-                        Tango_DEVVAR_STRINGARRAY,
-                        Tango_DEVVAR_LONGSTRINGARRAY,
-                        "The attribute's name, the beginning date (YYYY-MM-DD HH24:MI:SS) and the ending date (YYYY-MM-DD HH24:MI:SS)",
-                        "String  : The new created dynamic attribute name, Long : the number of data.",
-                        DispLevel.OPERATOR));
-        command_list
-                .addElement(new GetAttDataBetweenDatesSamplingClass(
-                        "GetAttDataBetweenDatesSampling",
-                        Tango_DEVVAR_STRINGARRAY,
-                        Tango_DEVVAR_LONGSTRINGARRAY,
-                        "The attribute's name, the beginning date (YYYY-MM-DD HH24:MI:SS) and the ending date (YYYY-MM-DD HH24:MI:SS), and the sampling type (ALL, SECOND, MINUTE, HOUR, DAY)",
-                        "String  : The new created dynamic attribute name, Long : the number of data.",
-                        DispLevel.OPERATOR));
-        command_list
-                .addElement(new GetAttDataBetweenDatesCountClass(
-                        "GetAttDataBetweenDatesCount",
-                        Tango_DEVVAR_STRINGARRAY,
-                        Tango_DEV_LONG,
-                        "The attribute's name, the beginning (YYYY-MM-DD HH24:MI:SS) date and the ending date (YYYY-MM-DD HH24:MI:SS).",
-                        "The number of data beetwen two dates and, for a given scalar attribute.", DispLevel.OPERATOR));
-        command_list.addElement(new GetAttDataInfOrSupThanClass("GetAttDataInfOrSupThan", Tango_DEVVAR_STRINGARRAY,
-                Tango_DEVVAR_LONGSTRINGARRAY, "The attribute's name, the lower limit and the upper limit",
-                "String  : The new created dynamic attribute name, Long : the number of data.", DispLevel.OPERATOR));
-        command_list.addElement(new GetAttDataInfOrSupThanCountClass("GetAttDataInfOrSupThanCount",
-                Tango_DEVVAR_STRINGARRAY, Tango_DEV_LONG, "The attribute's name, the lower limit and the upper limit",
-                "The number of scalar data lower than the given value x OR higher than the given value y.",
-                DispLevel.OPERATOR));
-        command_list
-                .addElement(new GetAttDataInfOrSupThanBetweenDatesClass(
-                        "GetAttDataInfOrSupThanBetweenDates",
-                        Tango_DEVVAR_STRINGARRAY,
-                        Tango_DEVVAR_LONGSTRINGARRAY,
-                        "The attribute's name, the lower limit, the upper limit, the beginning date (YYYY-MM-DD HH24:MI:SS) and the ending date (YYYY-MM-DD HH24:MI:SS)",
-                        "String  : The new created dynamic attribute name, Long : the number of data.",
-                        DispLevel.OPERATOR));
-        command_list
-                .addElement(new GetAttDataInfOrSupThanBetweenDatesCountClass(
-                        "GetAttDataInfOrSupThanBetweenDatesCount",
-                        Tango_DEVVAR_STRINGARRAY,
-                        Tango_DEV_LONG,
-                        "The attribute's name, the lower limit, the upper limit, the beginning date (YYYY-MM-DD HH24:MI:SS) and the ending date (YYYY-MM-DD HH24:MI:SS).",
-                        "The number of scalar data lower than the given value x OR higher than the given value y, beetwen two dates and for the specified attribute.",
-                        DispLevel.OPERATOR));
-        command_list.addElement(new GetAttDataInfThanClass("GetAttDataInfThan", Tango_DEVVAR_STRINGARRAY,
-                Tango_DEVVAR_LONGSTRINGARRAY, "The attribute's name, the upper limit",
-                "String  : The new created dynamic attribute name, Long : the number of data.", DispLevel.OPERATOR));
-        command_list.addElement(new GetAttDataInfThanCountClass("GetAttDataInfThanCount", Tango_DEVVAR_STRINGARRAY,
-                Tango_DEV_LONG, "The attribute's name and the  upper limit.",
-                "The number of scalar data lower than the given value and for the specified attribute.",
-                DispLevel.OPERATOR));
-        command_list
-                .addElement(new GetAttDataInfThanBetweenDatesClass(
-                        "GetAttDataInfThanBetweenDates",
-                        Tango_DEVVAR_STRINGARRAY,
-                        Tango_DEVVAR_LONGSTRINGARRAY,
-                        "The attribute's name, the upper limit, the beginning date (YYYY-MM-DD HH24:MI:SS) and the ending date (YYYY-MM-DD HH24:MI:SS)",
-                        "String  : The new created dynamic attribute name, Long : the number of data.",
-                        DispLevel.OPERATOR));
-        command_list
-                .addElement(new GetAttDataInfThanBetweenDatesCountClass(
-                        "GetAttDataInfThanBetweenDatesCount",
-                        Tango_DEVVAR_STRINGARRAY,
-                        Tango_DEV_LONG,
-                        "The attribute's name, the upper limit, the beginning date (YYYY-MM-DD HH24:MI:SS) and the ending date (YYYY-MM-DD HH24:MI:SS). ",
-                        "The number data lower than the given value x, and beetwen two dates (date_1 & date_2).",
-                        DispLevel.OPERATOR));
-        command_list.addElement(new GetAttDataLastNClass("GetAttDataLastN", Tango_DEVVAR_STRINGARRAY,
-                Tango_DEVVAR_LONGSTRINGARRAY, "The attribute's name and the number of wished data",
-                "String  : The new created dynamic attribute name, Long : the number of data.", DispLevel.OPERATOR));
-        command_list.addElement(new GetAttDataMaxClass("GetAttDataMax", Tango_DEV_STRING, Tango_DEV_DOUBLE,
-                "The attribute's name", "The biggest value generated by the attribute", DispLevel.OPERATOR));
-        command_list
-                .addElement(new GetAttDataMaxBetweenDatesClass(
-                        "GetAttDataMaxBetweenDates",
-                        Tango_DEVVAR_STRINGARRAY,
-                        Tango_DEV_DOUBLE,
-                        "The attribute's name, the beginning date (YYYY-MM-DD HH24:MI:SS) and the ending date (YYYY-MM-DD HH24:MI:SS)",
-                        "The biggest value generated between the two given dates.", DispLevel.OPERATOR));
-        command_list.addElement(new GetAttDataMinClass("GetAttDataMin", Tango_DEV_STRING, Tango_DEV_DOUBLE,
-                "The attribute's name", "The smallest value generated by the attribute", DispLevel.OPERATOR));
-        command_list
-                .addElement(new GetAttDataMinBetweenDatesClass(
-                        "GetAttDataMinBetweenDates",
-                        Tango_DEVVAR_STRINGARRAY,
-                        Tango_DEV_DOUBLE,
-                        "The attribute's name, the beginning date (YYYY-MM-DD HH24:MI:SS) and the ending date (YYYY-MM-DD HH24:MI:SS)",
-                        "The smallest scalar value generated by the given attribute and between the two given dates.",
-                        DispLevel.OPERATOR));
-        command_list.addElement(new GetAttDataSupThanClass("GetAttDataSupThan", Tango_DEVVAR_STRINGARRAY,
-                Tango_DEVVAR_LONGSTRINGARRAY, "The attribute's name and the  lower limit",
-                "String  : The new created dynamic attribute name, Long : the number of data.", DispLevel.OPERATOR));
-        command_list.addElement(new GetAttDataSupThanCountClass("GetAttDataSupThanCount", Tango_DEVVAR_STRINGARRAY,
-                Tango_DEV_LONG, "The attribute's name and the  lower limit.",
-                "The number of data higher than the given value.", DispLevel.OPERATOR));
-        command_list.addElement(new GetAttDataSupAndInfThanClass("GetAttDataSupAndInfThan", Tango_DEVVAR_STRINGARRAY,
-                Tango_DEVVAR_LONGSTRINGARRAY, "The attribute's name, the lower limit and the upper limit",
-                "String  : The new created dynamic attribute name, Long : the number of data.", DispLevel.OPERATOR));
-        command_list.addElement(new GetAttDataSupAndInfThanCountClass("GetAttDataSupAndInfThanCount",
-                Tango_DEVVAR_STRINGARRAY, Tango_DEV_LONG, "The attribute's name, the lower limit and the upper limit",
-                "The data that are highter than the given value x AND lower than the given value y.",
-                DispLevel.OPERATOR));
-        command_list
-                .addElement(new GetAttDataSupAndInfThanBetweenDatesClass(
-                        "GetAttDataSupAndInfThanBetweenDates",
-                        Tango_DEVVAR_STRINGARRAY,
-                        Tango_DEVVAR_LONGSTRINGARRAY,
-                        "The attribute's name, the lower limit, the upper limit, the beginning date (YYYY-MM-DD HH24:MI:SS) and the ending date (YYYY-MM-DD HH24:MI:SS)",
-                        "String  : The new created dynamic attribute name, Long : the number of data.",
-                        DispLevel.OPERATOR));
-        command_list
-                .addElement(new GetAttDataSupAndInfThanBetweenDatesCountClass(
-                        "GetAttDataSupAndInfThanBetweenDatesCount",
-                        Tango_DEVVAR_STRINGARRAY,
-                        Tango_DEV_LONG,
-                        "The attribute's name, the lower limit, the upper limit, the beginning date (YYYY-MM-DD HH24:MI:SS) and the ending date (YYYY-MM-DD HH24:MI:SS).",
-                        "The number of data higher than the given value x, (AND) lower than the given value y, and beetwen two dates (date_1 & date_2).",
-                        DispLevel.OPERATOR));
-        command_list
-                .addElement(new GetAttDataSupThanBetweenDatesClass(
-                        "GetAttDataSupThanBetweenDates",
-                        Tango_DEVVAR_STRINGARRAY,
-                        Tango_DEVVAR_LONGSTRINGARRAY,
-                        "The attribute's name, the lower limit, the beginning date (YYYY-MM-DD HH24:MI:SS) and the ending date (YYYY-MM-DD HH24:MI:SS)",
-                        "String  : The new created dynamic attribute name, Long : the number of data.",
-                        DispLevel.OPERATOR));
-        command_list
-                .addElement(new GetAttDataSupThanBetweenDatesCountClass(
-                        "GetAttDataSupThanBetweenDatesCount",
-                        Tango_DEVVAR_STRINGARRAY,
-                        Tango_DEV_LONG,
-                        "The attribute's name, the lower limit, the beginning date  (YYYY-MM-DD HH24:MI:SS) and the ending date  (YYYY-MM-DD HH24:MI:SS).",
-                        "The number of data higher than the given value y, and beetwen two dates (date_1 & date_2).",
-                        DispLevel.OPERATOR));
-        command_list.addElement(new RemoveDynamicAttributeClass("RemoveDynamicAttribute", Tango_DEV_STRING,
-                Tango_DEV_VOID, "The HdbExtractor dynamic attribute's name", "", DispLevel.OPERATOR));
-        command_list.addElement(new RemoveDynamicAttributesClass("RemoveDynamicAttributes", Tango_DEV_VOID,
-                Tango_DEV_VOID, "", "", DispLevel.OPERATOR));
-        command_list.addElement(new GetAttFullNameClass("GetAttFullName", Tango_DEV_LONG, Tango_DEV_STRING,
-                "The id of an attribute", "The full name of this attribute", DispLevel.OPERATOR));
-        command_list.addElement(new TemplCommandInOut("GetNewestValue", "getNewestValue", "attribute name",
-                "timestamp; values"));
-        command_list.addElement(new TemplCommandInOut("GetNearestValue", "getNearestValue",
-                "[attributeName, timestamp]. timestamp format is DD-MM-YYYY HH24:MI:SS", "timestamp; values"));
-        command_list.addElement(new ExtractBetweenDatesClass("ExtractBetweenDates", Tango_DEVVAR_STRINGARRAY,
-                Tango_DEVVAR_DOUBLESTRINGARRAY,
-                "[attributeName,start date, end date]. dates format is DD-MM-YYYY HH24:MI:SS",
-                "long: timestamp; string :values"));
-
-        // add polling if any
-        /*
-         * for (int i = 0; i < command_list.size(); i++) { // Command cmd = (
-         * Command ) command_list.elementAt(i); }
-         */
-    }
-
-    // =============================================================================
-    //
-    // Method: attribute_factory(Vector att_list)
-    //
-    // =============================================================================
-    @Override
-    public void attribute_factory(Vector att_list) throws DevFailed {
-        // Attribute : version
-        Attr version = new Attr("version", Tango_DEV_STRING, AttrWriteType.READ);
-        att_list.addElement(version);
-    }
-
-    // ===================================================================
-    //
-    // method : device_factory()
-    //
-    // description : Create the device object(s) and store them in the
-    // device list
-    //
-    // argument : in : String[] devlist : The device name list
-    //
-    // ===================================================================
-    @Override
-    public void device_factory(String[] devlist) throws DevFailed {
-        String device_version = ResourceBundle.getBundle("application").getString("project.version");
-        for (int i = 0; i < devlist.length; i++) {
-            // Util.out4.println("Device name : " + devlist[ i ]);
-
-            // Create device and add it into the device list
-            // ----------------------------------------------
-            device_list.addElement(new HdbExtractor(this, devlist[i], device_version));
-
-            // Export device to the outside world
-            // ----------------------------------------------
-            if (Util._UseDb == true) {
-                export_device(((DeviceImpl) device_list.elementAt(i)));
-            } else {
-                export_device(((DeviceImpl) device_list.elementAt(i)), devlist[i]);
-            }
-        }
-    }
-
-    // ===================================================================
-    /**
-     * Get the class property for specified name.
-     * 
-     * @param name
-     *            The property name.
-     */
-    // ===================================================================
-    public DbDatum get_class_property(String name) {
-        for (int i = 0; i < cl_prop.length; i++) {
-            if (cl_prop[i].name.equals(name)) {
-                return cl_prop[i];
-            }
-        }
-        // if not found, return an empty DbDatum
-        return new DbDatum(name);
-    }
-
-    // ===================================================================
-    /**
-     * Read the class properties from database.
-     */
-    // ===================================================================
-    public void get_class_property() throws DevFailed {
-        // Initialize your default values here.
-        // ------------------------------------------
-
-        // Read class properties from database.(Automatic code generation)
-        // -------------------------------------------------------------
-        if (Util._UseDb == false) {
-            return;
-        }
-        String[] propnames = {};
-
-        // Call database and extract values
-        // --------------------------------------------
-        cl_prop = get_db_class().get_property(propnames);
-
-        // End of Automatic code generation
-        // -------------------------------------------------------------
-
-    }
-
-    // ===================================================================
-    /**
-     * Set class description as property in database
-     */
-    // ===================================================================
-//    private void write_class_property() throws DevFailed {
-//	// First time, check if database used
-//	// --------------------------------------------
-//	if (Util._UseDb == false) {
-//	    return;
-//	}
-//
-//	// Prepeare DbDatum
-//	// --------------------------------------------
-//	DbDatum[] data = new DbDatum[2];
-//	data[0] = new DbDatum("ProjectTitle");
-//	data[0].insert("Tango Device Server");
-//
-//	data[1] = new DbDatum("Description");
-//	data[1].insert("A DServer used for historical database's extractions.");
-//
-//	// Call database and and values
-//	// --------------------------------------------
-//	get_db_class().put_property(data);
-//    }
-
-}
+// +======================================================================
+// $Source: /cvsroot/tango-cs/tango/jserver/archiving/HdbExtractor/HdbExtractorClass.java,v $
+//
+// Project:   	Tango Device Server
+//
+// Description:	java source code for the HdbExtractor class .
+//              This class is a singleton class and implements everything
+//              which exists only once for all the  HdbExtractor object
+//              It inherits from the DeviceClass class.
+//
+// $Author: pierrejoseph $
+//
+// $Revision: 1.15 $
+//
+// $Log: HdbExtractorClass.java,v $
+// Revision 1.15  2007/05/11 13:58:34  pierrejoseph
+// Attribute addition : release version
+//
+// Revision 1.14  2007/03/16 08:44:14  ounsy
+// added a GetMinTime command
+//
+// Revision 1.13  2007/03/02 08:46:02  ounsy
+// added the GetMaxTime command
+//
+// Revision 1.12  2007/03/01 17:59:00  pierrejoseph
+// The new  input args date format is YYYY-MM-DD
+//
+// Revision 1.11  2007/03/01 10:08:01  ounsy
+// added the RemoveDynamicAttributes command
+//
+// Revision 1.10  2006/09/07 13:48:29  ounsy
+// added extraction with sampling methods
+//
+// Revision 1.9  2006/08/23 09:41:57  ounsy
+// minor changes
+//
+// Revision 1.8  2006/01/27 13:07:04  ounsy
+// organised imports
+//
+// Revision 1.7  2005/11/29 17:33:38  chinkumo
+// no message
+//
+// Revision 1.6.10.4  2005/11/29 16:17:38  chinkumo
+// Code reformated (pogo compatible)
+//
+// Revision 1.6.10.3  2005/11/15 13:45:53  chinkumo
+// ...
+//
+// Revision 1.6.10.2  2005/09/26 07:58:48  chinkumo
+// Every commands of shape 'getAttDataXXXXCount(...)' was changed. The type of their returned object was changed from 'short' to 'long'.
+//
+// Revision 1.6.10.1  2005/09/09 10:34:36  chinkumo
+// Since the extraction politic changed to 'dynamic attributes', the device was pogo-regenerated.
+//
+//
+// copyleft :    European Synchrotron Radiation Facility
+//               BP 220, Grenoble 38043
+//               FRANCE
+//
+//-======================================================================
+//
+//  		This file is generated by POGO
+//	(Program Obviously used to Generate tango Object)
+//
+//         (c) - Software Engineering Group - ESRF
+//=============================================================================
+
+package HdbExtractor;
+
+import java.util.ResourceBundle;
+import java.util.Vector;
+
+import fr.esrf.Tango.AttrWriteType;
+import fr.esrf.Tango.DevFailed;
+import fr.esrf.Tango.DispLevel;
+import fr.esrf.TangoApi.DbDatum;
+import fr.esrf.TangoDs.Attr;
+import fr.esrf.TangoDs.DeviceClass;
+import fr.esrf.TangoDs.DeviceImpl;
+import fr.esrf.TangoDs.TangoConst;
+import fr.esrf.TangoDs.TemplCommandInOut;
+import fr.esrf.TangoDs.Util;
+
+public class HdbExtractorClass extends DeviceClass implements TangoConst {
+    /**
+     * HdbExtractorClass class instance (it is a singleton).
+     */
+    private static HdbExtractorClass _instance = null;
+
+    /**
+     * Class properties array.
+     */
+    private DbDatum[] cl_prop = null;
+
+    // --------- Start of properties data members ----------
+
+    // --------- End of properties data members ----------
+
+    // ===================================================================
+    //
+    // method : instance()
+    //
+    // description : static method to retrieve the HdbExtractorClass object
+    // once it has been initialised
+    //
+    // ===================================================================
+    public static synchronized HdbExtractorClass instance() {
+        if (_instance == null) {
+            System.err.println("HdbExtractorClass is not initialised !!!");
+            System.err.println("Exiting");
+            System.exit(-1);
+        }
+        return _instance;
+    }
+
+    // ===================================================================
+    //
+    // method : Init()
+    //
+    // description : static method to create/retrieve the HdbExtractorClass
+    // object. This method is the only one which enables a
+    // user to create the object
+    //
+    // in : - class_name : The class name
+    //
+    // ===================================================================
+    public static HdbExtractorClass init(String class_name) throws DevFailed {
+        if (_instance == null) {
+            _instance = new HdbExtractorClass(class_name);
+        }
+        return _instance;
+    }
+
+    // ===================================================================
+    //
+    // method : HdbExtractorClass()
+    //
+    // description : constructor for the HdbExtractorClass class
+    //
+    // argument : in : - name : The class name
+    //
+    // ===================================================================
+    protected HdbExtractorClass(String name) throws DevFailed {
+        super(name);
+
+        Util.out2.println("Entering HdbExtractorClass constructor");
+        // write_class_property();
+        get_class_property();
+
+        Util.out2.println("Leaving HdbExtractorClass constructor");
+    }
+
+    // ===================================================================
+    //
+    // method : command_factory()
+    //
+    // description : Create the command object(s) and store them in the
+    // command list
+    // ===================================================================
+    @Override
+    public void command_factory() {
+        command_list.addElement(new GetMinTimeClass("GetMinTime", Tango_DEV_STRING, Tango_DEV_STRING,
+                "The attribute to search", "The earliest value's timestamp", DispLevel.OPERATOR));
+        command_list.addElement(new GetMaxTimeClass("GetMaxTime", Tango_DEV_STRING, Tango_DEV_STRING,
+                "The attribute to search", "The latest value's timestamp", DispLevel.OPERATOR));
+        command_list.addElement(new GetInfoClass("GetInfo", Tango_DEV_VOID, Tango_DEV_STRING, "",
+                "The informations that characterize the database", DispLevel.OPERATOR));
+        command_list.addElement(new GetHostClass("GetHost", Tango_DEV_VOID, Tango_DEV_STRING, "",
+                "The connected database host identifier.", DispLevel.OPERATOR));
+        command_list.addElement(new GetUserClass("GetUser", Tango_DEV_VOID, Tango_DEV_STRING, "",
+                "The current user's name used for the connection.", DispLevel.OPERATOR));
+        command_list.addElement(new GetConnectionStateClass("GetConnectionState", Tango_DEV_VOID, Tango_DEV_BOOLEAN,
+                "", "The connection state", DispLevel.OPERATOR));
+        command_list.addElement(new GetAttDefinitionDataClass("GetAttDefinitionData", Tango_DEV_STRING,
+                Tango_DEVVAR_STRINGARRAY, "The attribute's name",
+                "Differents definition informations for the given attribute", DispLevel.OPERATOR));
+        command_list.addElement(new GetAttPropertiesDataClass("GetAttPropertiesData", Tango_DEV_STRING,
+                Tango_DEVVAR_STRINGARRAY, "The attribute's name",
+                "An array containing the differents properties for the given attribute", DispLevel.OPERATOR));
+        command_list.addElement(new GetAttIdClass("GetAttId", Tango_DEV_STRING, Tango_DEV_LONG, "The attribute's name",
+                "The HDB's ID that characterize the given attribute", DispLevel.OPERATOR));
+        command_list.addElement(new GetAttNameAllClass("GetAttNameAll", Tango_DEV_VOID, Tango_DEVVAR_STRINGARRAY, "",
+                "The whole list of the attributes registered in HDB", DispLevel.OPERATOR));
+        command_list.addElement(new GetAttNameFacilityClass("GetAttNameFacility", Tango_DEV_VOID,
+                Tango_DEVVAR_STRINGARRAY, "",
+                "The whole list of the attributes registered in HDB, and that belong to the current facility.",
+                DispLevel.OPERATOR));
+        command_list
+                .addElement(new GetAttNameFilterFormatClass(
+                        "GetAttNameFilterFormat",
+                        Tango_DEV_SHORT,
+                        Tango_DEVVAR_STRINGARRAY,
+                        "A format [0 -> scalar - 1 -> spectrum - 2 -> image]",
+                        "The filtered list of attributes registered in HDB.  The filtering is made according to the given format [0 -> scalar - 1 -> spectrum - 2 -> image]",
+                        DispLevel.OPERATOR));
+        command_list
+                .addElement(new GetAttNameFilterTypeClass(
+                        "GetAttNameFilterType",
+                        Tango_DEV_SHORT,
+                        Tango_DEVVAR_STRINGARRAY,
+                        "A type [2 -> Tango::DevShort | 3 -> Tango::DevLong | 5 -> Tango::DevDouble and 8 -> Tango::DevString]",
+                        "The filtered list of attributes registered in HDB.  The filtering is made according to the given type [2 -> Tango::DevShort | 3 -> Tango::DevLong | 5 -> Tango::DevDouble and 8 -> Tango::DevString]",
+                        DispLevel.OPERATOR));
+        command_list.addElement(new GetAttCountAllClass("GetAttCountAll", Tango_DEV_VOID, Tango_DEV_LONG, "",
+                "The total number of attributes defined in HDB", DispLevel.OPERATOR));
+        command_list
+                .addElement(new GetAttCountFilterFormatClass(
+                        "GetAttCountFilterFormat",
+                        Tango_DEV_SHORT,
+                        Tango_DEV_LONG,
+                        "A format [0 -> scalar - 1 -> spectrum - 2 -> image]",
+                        "The total number of attributes defined in HDB with the given format [0 -> scalar - 1 -> spectrum - 2 -> image]",
+                        DispLevel.OPERATOR));
+        command_list
+                .addElement(new GetAttCountFilterTypeClass(
+                        "GetAttCountFilterType",
+                        Tango_DEV_SHORT,
+                        Tango_DEV_LONG,
+                        "A type [2 -> Tango::DevShort | 3 -> Tango::DevLong | 5 -> Tango::DevDouble and 8 -> Tango::DevString]",
+                        "The total number of attributes defined in HDB with the given type [2 -> Tango::DevShort | 3 -> Tango::DevLong | 5 -> Tango::DevDouble and 8 -> Tango::DevString]",
+                        DispLevel.OPERATOR));
+        command_list.addElement(new GetDomainsClass("GetDomains", Tango_DEV_VOID, Tango_DEVVAR_STRINGARRAY, "",
+                "The registered domains", DispLevel.OPERATOR));
+        command_list.addElement(new GetDomainsCountClass("GetDomainsCount", Tango_DEV_VOID, Tango_DEV_LONG, "",
+                "The number of distinct registered domains.", DispLevel.OPERATOR));
+        command_list.addElement(new GetFamiliesClass("GetFamilies", Tango_DEV_VOID, Tango_DEVVAR_STRINGARRAY, "",
+                "The registered families", DispLevel.OPERATOR));
+        command_list.addElement(new GetFamiliesCountClass("GetFamiliesCount", Tango_DEV_VOID, Tango_DEV_LONG, "",
+                "The number of distinct registered families.", DispLevel.OPERATOR));
+        command_list.addElement(new GetFamiliesByDomainClass("GetFamiliesByDomain", Tango_DEV_STRING,
+                Tango_DEVVAR_STRINGARRAY, "The given domain", "The registered families for the given domain",
+                DispLevel.OPERATOR));
+        command_list.addElement(new GetFamiliesByDomainCountClass("GetFamiliesByDomainCount", Tango_DEV_STRING,
+                Tango_DEV_LONG, "A domain name", "The number of distinct registered families for a given domain.",
+                DispLevel.OPERATOR));
+        command_list.addElement(new GetMembersClass("GetMembers", Tango_DEV_VOID, Tango_DEVVAR_STRINGARRAY, "",
+                "The registered members", DispLevel.OPERATOR));
+        command_list.addElement(new GetMembersCountClass("GetMembersCount", Tango_DEV_VOID, Tango_DEV_LONG, "",
+                "The number of distinct members.", DispLevel.OPERATOR));
+        command_list.addElement(new GetMembersByDomainFamilyClass("GetMembersByDomainFamily", Tango_DEVVAR_STRINGARRAY,
+                Tango_DEVVAR_STRINGARRAY, "The given domain and family",
+                "The registered members for the given domain and family", DispLevel.OPERATOR));
+        command_list.addElement(new GetMembersByDomainFamilyCountClass("GetMembersByDomainFamilyCount",
+                Tango_DEVVAR_STRINGARRAY, Tango_DEV_LONG, "A domain name, a family name",
+                "The number of distinct registered members for the given domain and family.", DispLevel.OPERATOR));
+        command_list.addElement(new GetAttributesByDomainFamilyMembersCountClass(
+                "GetAttributesByDomainFamilyMembersCount", Tango_DEVVAR_STRINGARRAY, Tango_DEV_LONG,
+                "A domain name, a family name, a member name.",
+                "The number of registered the attributes for a given  domain, family, member.", DispLevel.OPERATOR));
+        command_list.addElement(new GetCurrentArchivedAttClass("GetCurrentArchivedAtt", Tango_DEV_VOID,
+                Tango_DEVVAR_STRINGARRAY, "", "The list of attributes that are being archived", DispLevel.OPERATOR));
+        command_list.addElement(new IsArchivedClass("IsArchived", Tango_DEV_STRING, Tango_DEV_BOOLEAN,
+                "The attribute's name", "true if the given attribute is being archived", DispLevel.OPERATOR));
+        command_list.addElement(new GetArchivingModeClass("GetArchivingMode", Tango_DEV_STRING,
+                Tango_DEVVAR_STRINGARRAY, "The attribute's name",
+                "The archiving mode used for the specified attribute", DispLevel.OPERATOR));
+        command_list.addElement(new GetAttDataClass("GetAttData", Tango_DEV_STRING, Tango_DEVVAR_LONGSTRINGARRAY,
+                "The attribute's name", "String  : The new created dynamic attribute name, Long : the number of data.",
+                DispLevel.OPERATOR));
+        command_list.addElement(new GetAttDataCountClass("GetAttDataCount", Tango_DEV_STRING, Tango_DEV_LONG,
+                "An attribute name.", "The number of the data archieved for an attribute.", DispLevel.OPERATOR));
+        command_list.addElement(new GetAttDataAvgClass("GetAttDataAvg", Tango_DEV_STRING, Tango_DEV_DOUBLE,
+                "The attribute's name", "The average of the values generated by the attribute", DispLevel.OPERATOR));
+        command_list
+                .addElement(new GetAttDataAvgBetweenDatesClass(
+                        "GetAttDataAvgBetweenDates",
+                        Tango_DEVVAR_STRINGARRAY,
+                        Tango_DEV_DOUBLE,
+                        "The attribute's name, the beginning date (YYYY-MM-DD HH24:MI:SS) and the ending date (YYYY-MM-DD HH24:MI:SS)",
+                        "The average value generated by the given attribute and between the two given dates. ",
+                        DispLevel.OPERATOR));
+        command_list
+                .addElement(new GetAttDataBetweenDatesClass(
+                        "GetAttDataBetweenDates",
+                        Tango_DEVVAR_STRINGARRAY,
+                        Tango_DEVVAR_LONGSTRINGARRAY,
+                        "The attribute's name, the beginning date (YYYY-MM-DD HH24:MI:SS) and the ending date (YYYY-MM-DD HH24:MI:SS)",
+                        "String  : The new created dynamic attribute name, Long : the number of data.",
+                        DispLevel.OPERATOR));
+        command_list
+                .addElement(new GetAttDataBetweenDatesSamplingClass(
+                        "GetAttDataBetweenDatesSampling",
+                        Tango_DEVVAR_STRINGARRAY,
+                        Tango_DEVVAR_LONGSTRINGARRAY,
+                        "The attribute's name, the beginning date (YYYY-MM-DD HH24:MI:SS) and the ending date (YYYY-MM-DD HH24:MI:SS), and the sampling type (ALL, SECOND, MINUTE, HOUR, DAY)",
+                        "String  : The new created dynamic attribute name, Long : the number of data.",
+                        DispLevel.OPERATOR));
+        command_list
+                .addElement(new GetAttDataBetweenDatesCountClass(
+                        "GetAttDataBetweenDatesCount",
+                        Tango_DEVVAR_STRINGARRAY,
+                        Tango_DEV_LONG,
+                        "The attribute's name, the beginning (YYYY-MM-DD HH24:MI:SS) date and the ending date (YYYY-MM-DD HH24:MI:SS).",
+                        "The number of data beetwen two dates and, for a given scalar attribute.", DispLevel.OPERATOR));
+        command_list.addElement(new GetAttDataInfOrSupThanClass("GetAttDataInfOrSupThan", Tango_DEVVAR_STRINGARRAY,
+                Tango_DEVVAR_LONGSTRINGARRAY, "The attribute's name, the lower limit and the upper limit",
+                "String  : The new created dynamic attribute name, Long : the number of data.", DispLevel.OPERATOR));
+        command_list.addElement(new GetAttDataInfOrSupThanCountClass("GetAttDataInfOrSupThanCount",
+                Tango_DEVVAR_STRINGARRAY, Tango_DEV_LONG, "The attribute's name, the lower limit and the upper limit",
+                "The number of scalar data lower than the given value x OR higher than the given value y.",
+                DispLevel.OPERATOR));
+        command_list
+                .addElement(new GetAttDataInfOrSupThanBetweenDatesClass(
+                        "GetAttDataInfOrSupThanBetweenDates",
+                        Tango_DEVVAR_STRINGARRAY,
+                        Tango_DEVVAR_LONGSTRINGARRAY,
+                        "The attribute's name, the lower limit, the upper limit, the beginning date (YYYY-MM-DD HH24:MI:SS) and the ending date (YYYY-MM-DD HH24:MI:SS)",
+                        "String  : The new created dynamic attribute name, Long : the number of data.",
+                        DispLevel.OPERATOR));
+        command_list
+                .addElement(new GetAttDataInfOrSupThanBetweenDatesCountClass(
+                        "GetAttDataInfOrSupThanBetweenDatesCount",
+                        Tango_DEVVAR_STRINGARRAY,
+                        Tango_DEV_LONG,
+                        "The attribute's name, the lower limit, the upper limit, the beginning date (YYYY-MM-DD HH24:MI:SS) and the ending date (YYYY-MM-DD HH24:MI:SS).",
+                        "The number of scalar data lower than the given value x OR higher than the given value y, beetwen two dates and for the specified attribute.",
+                        DispLevel.OPERATOR));
+        command_list.addElement(new GetAttDataInfThanClass("GetAttDataInfThan", Tango_DEVVAR_STRINGARRAY,
+                Tango_DEVVAR_LONGSTRINGARRAY, "The attribute's name, the upper limit",
+                "String  : The new created dynamic attribute name, Long : the number of data.", DispLevel.OPERATOR));
+        command_list.addElement(new GetAttDataInfThanCountClass("GetAttDataInfThanCount", Tango_DEVVAR_STRINGARRAY,
+                Tango_DEV_LONG, "The attribute's name and the  upper limit.",
+                "The number of scalar data lower than the given value and for the specified attribute.",
+                DispLevel.OPERATOR));
+        command_list
+                .addElement(new GetAttDataInfThanBetweenDatesClass(
+                        "GetAttDataInfThanBetweenDates",
+                        Tango_DEVVAR_STRINGARRAY,
+                        Tango_DEVVAR_LONGSTRINGARRAY,
+                        "The attribute's name, the upper limit, the beginning date (YYYY-MM-DD HH24:MI:SS) and the ending date (YYYY-MM-DD HH24:MI:SS)",
+                        "String  : The new created dynamic attribute name, Long : the number of data.",
+                        DispLevel.OPERATOR));
+        command_list
+                .addElement(new GetAttDataInfThanBetweenDatesCountClass(
+                        "GetAttDataInfThanBetweenDatesCount",
+                        Tango_DEVVAR_STRINGARRAY,
+                        Tango_DEV_LONG,
+                        "The attribute's name, the upper limit, the beginning date (YYYY-MM-DD HH24:MI:SS) and the ending date (YYYY-MM-DD HH24:MI:SS). ",
+                        "The number data lower than the given value x, and beetwen two dates (date_1 & date_2).",
+                        DispLevel.OPERATOR));
+        command_list.addElement(new GetAttDataLastNClass("GetAttDataLastN", Tango_DEVVAR_STRINGARRAY,
+                Tango_DEVVAR_LONGSTRINGARRAY, "The attribute's name and the number of wished data",
+                "String  : The new created dynamic attribute name, Long : the number of data.", DispLevel.OPERATOR));
+        command_list.addElement(new GetAttDataMaxClass("GetAttDataMax", Tango_DEV_STRING, Tango_DEV_DOUBLE,
+                "The attribute's name", "The biggest value generated by the attribute", DispLevel.OPERATOR));
+        command_list
+                .addElement(new GetAttDataMaxBetweenDatesClass(
+                        "GetAttDataMaxBetweenDates",
+                        Tango_DEVVAR_STRINGARRAY,
+                        Tango_DEV_DOUBLE,
+                        "The attribute's name, the beginning date (YYYY-MM-DD HH24:MI:SS) and the ending date (YYYY-MM-DD HH24:MI:SS)",
+                        "The biggest value generated between the two given dates.", DispLevel.OPERATOR));
+        command_list.addElement(new GetAttDataMinClass("GetAttDataMin", Tango_DEV_STRING, Tango_DEV_DOUBLE,
+                "The attribute's name", "The smallest value generated by the attribute", DispLevel.OPERATOR));
+        command_list
+                .addElement(new GetAttDataMinBetweenDatesClass(
+                        "GetAttDataMinBetweenDates",
+                        Tango_DEVVAR_STRINGARRAY,
+                        Tango_DEV_DOUBLE,
+                        "The attribute's name, the beginning date (YYYY-MM-DD HH24:MI:SS) and the ending date (YYYY-MM-DD HH24:MI:SS)",
+                        "The smallest scalar value generated by the given attribute and between the two given dates.",
+                        DispLevel.OPERATOR));
+        command_list.addElement(new GetAttDataSupThanClass("GetAttDataSupThan", Tango_DEVVAR_STRINGARRAY,
+                Tango_DEVVAR_LONGSTRINGARRAY, "The attribute's name and the  lower limit",
+                "String  : The new created dynamic attribute name, Long : the number of data.", DispLevel.OPERATOR));
+        command_list.addElement(new GetAttDataSupThanCountClass("GetAttDataSupThanCount", Tango_DEVVAR_STRINGARRAY,
+                Tango_DEV_LONG, "The attribute's name and the  lower limit.",
+                "The number of data higher than the given value.", DispLevel.OPERATOR));
+        command_list.addElement(new GetAttDataSupAndInfThanClass("GetAttDataSupAndInfThan", Tango_DEVVAR_STRINGARRAY,
+                Tango_DEVVAR_LONGSTRINGARRAY, "The attribute's name, the lower limit and the upper limit",
+                "String  : The new created dynamic attribute name, Long : the number of data.", DispLevel.OPERATOR));
+        command_list.addElement(new GetAttDataSupAndInfThanCountClass("GetAttDataSupAndInfThanCount",
+                Tango_DEVVAR_STRINGARRAY, Tango_DEV_LONG, "The attribute's name, the lower limit and the upper limit",
+                "The data that are highter than the given value x AND lower than the given value y.",
+                DispLevel.OPERATOR));
+        command_list
+                .addElement(new GetAttDataSupAndInfThanBetweenDatesClass(
+                        "GetAttDataSupAndInfThanBetweenDates",
+                        Tango_DEVVAR_STRINGARRAY,
+                        Tango_DEVVAR_LONGSTRINGARRAY,
+                        "The attribute's name, the lower limit, the upper limit, the beginning date (YYYY-MM-DD HH24:MI:SS) and the ending date (YYYY-MM-DD HH24:MI:SS)",
+                        "String  : The new created dynamic attribute name, Long : the number of data.",
+                        DispLevel.OPERATOR));
+        command_list
+                .addElement(new GetAttDataSupAndInfThanBetweenDatesCountClass(
+                        "GetAttDataSupAndInfThanBetweenDatesCount",
+                        Tango_DEVVAR_STRINGARRAY,
+                        Tango_DEV_LONG,
+                        "The attribute's name, the lower limit, the upper limit, the beginning date (YYYY-MM-DD HH24:MI:SS) and the ending date (YYYY-MM-DD HH24:MI:SS).",
+                        "The number of data higher than the given value x, (AND) lower than the given value y, and beetwen two dates (date_1 & date_2).",
+                        DispLevel.OPERATOR));
+        command_list
+                .addElement(new GetAttDataSupThanBetweenDatesClass(
+                        "GetAttDataSupThanBetweenDates",
+                        Tango_DEVVAR_STRINGARRAY,
+                        Tango_DEVVAR_LONGSTRINGARRAY,
+                        "The attribute's name, the lower limit, the beginning date (YYYY-MM-DD HH24:MI:SS) and the ending date (YYYY-MM-DD HH24:MI:SS)",
+                        "String  : The new created dynamic attribute name, Long : the number of data.",
+                        DispLevel.OPERATOR));
+        command_list
+                .addElement(new GetAttDataSupThanBetweenDatesCountClass(
+                        "GetAttDataSupThanBetweenDatesCount",
+                        Tango_DEVVAR_STRINGARRAY,
+                        Tango_DEV_LONG,
+                        "The attribute's name, the lower limit, the beginning date  (YYYY-MM-DD HH24:MI:SS) and the ending date  (YYYY-MM-DD HH24:MI:SS).",
+                        "The number of data higher than the given value y, and beetwen two dates (date_1 & date_2).",
+                        DispLevel.OPERATOR));
+        command_list.addElement(new RemoveDynamicAttributeClass("RemoveDynamicAttribute", Tango_DEV_STRING,
+                Tango_DEV_VOID, "The HdbExtractor dynamic attribute's name", "", DispLevel.OPERATOR));
+        command_list.addElement(new RemoveDynamicAttributesClass("RemoveDynamicAttributes", Tango_DEV_VOID,
+                Tango_DEV_VOID, "", "", DispLevel.OPERATOR));
+        command_list.addElement(new GetAttFullNameClass("GetAttFullName", Tango_DEV_LONG, Tango_DEV_STRING,
+                "The id of an attribute", "The full name of this attribute", DispLevel.OPERATOR));
+        command_list.addElement(new TemplCommandInOut("GetNewestValue", "getNewestValue", "attribute name",
+                "timestamp; values"));
+        command_list.addElement(new TemplCommandInOut("GetNearestValue", "getNearestValue",
+                "[attributeName, timestamp]. timestamp format is DD-MM-YYYY HH24:MI:SS", "timestamp; values"));
+        command_list.addElement(new ExtractBetweenDatesClass("ExtractBetweenDates", Tango_DEVVAR_STRINGARRAY,
+                Tango_DEVVAR_DOUBLESTRINGARRAY,
+                "[attributeName,start date, end date]. dates format is DD-MM-YYYY HH24:MI:SS",
+                "long: timestamp; string :values"));
+
+        // add polling if any
+        /*
+         * for (int i = 0; i < command_list.size(); i++) { // Command cmd = (
+         * Command ) command_list.elementAt(i); }
+         */
+    }
+
+    // =============================================================================
+    //
+    // Method: attribute_factory(Vector att_list)
+    //
+    // =============================================================================
+    @Override
+    public void attribute_factory(Vector att_list) throws DevFailed {
+        // Attribute : version
+        Attr version = new Attr("version", Tango_DEV_STRING, AttrWriteType.READ);
+        att_list.addElement(version);
+    }
+
+    // ===================================================================
+    //
+    // method : device_factory()
+    //
+    // description : Create the device object(s) and store them in the
+    // device list
+    //
+    // argument : in : String[] devlist : The device name list
+    //
+    // ===================================================================
+    @Override
+    public void device_factory(String[] devlist) throws DevFailed {
+        String device_version = ResourceBundle.getBundle("application").getString("project.version");
+        for (int i = 0; i < devlist.length; i++) {
+            // Util.out4.println("Device name : " + devlist[ i ]);
+
+            // Create device and add it into the device list
+            // ----------------------------------------------
+            device_list.addElement(new HdbExtractor(this, devlist[i], device_version));
+
+            // Export device to the outside world
+            // ----------------------------------------------
+            if (Util._UseDb == true) {
+                export_device(((DeviceImpl) device_list.elementAt(i)));
+            } else {
+                export_device(((DeviceImpl) device_list.elementAt(i)), devlist[i]);
+            }
+        }
+    }
+
+    // ===================================================================
+    /**
+     * Get the class property for specified name.
+     * 
+     * @param name
+     *            The property name.
+     */
+    // ===================================================================
+    public DbDatum get_class_property(String name) {
+        for (int i = 0; i < cl_prop.length; i++) {
+            if (cl_prop[i].name.equals(name)) {
+                return cl_prop[i];
+            }
+        }
+        // if not found, return an empty DbDatum
+        return new DbDatum(name);
+    }
+
+    // ===================================================================
+    /**
+     * Read the class properties from database.
+     */
+    // ===================================================================
+    public void get_class_property() throws DevFailed {
+        // Initialize your default values here.
+        // ------------------------------------------
+
+        // Read class properties from database.(Automatic code generation)
+        // -------------------------------------------------------------
+        if (Util._UseDb == false) {
+            return;
+        }
+        String[] propnames = {};
+
+        // Call database and extract values
+        // --------------------------------------------
+        cl_prop = get_db_class().get_property(propnames);
+
+        // End of Automatic code generation
+        // -------------------------------------------------------------
+
+    }
+
+    // ===================================================================
+    /**
+     * Set class description as property in database
+     */
+    // ===================================================================
+//    private void write_class_property() throws DevFailed {
+//	// First time, check if database used
+//	// --------------------------------------------
+//	if (Util._UseDb == false) {
+//	    return;
+//	}
+//
+//	// Prepeare DbDatum
+//	// --------------------------------------------
+//	DbDatum[] data = new DbDatum[2];
+//	data[0] = new DbDatum("ProjectTitle");
+//	data[0].insert("Tango Device Server");
+//
+//	data[1] = new DbDatum("Description");
+//	data[1].insert("A DServer used for historical database's extractions.");
+//
+//	// Call database and and values
+//	// --------------------------------------------
+//	get_db_class().put_property(data);
+//    }
+
+}
diff --git a/src/main/java/HdbExtractor/IsArchivedClass.java b/hdbextractor/src/main/java/HdbExtractor/IsArchivedClass.java
similarity index 96%
rename from src/main/java/HdbExtractor/IsArchivedClass.java
rename to hdbextractor/src/main/java/HdbExtractor/IsArchivedClass.java
index 972d40b2fafeeb7df95678a967af26f0d9dce5d5..9e13a75fea658e3bc68e62750e78949f8ef275dd 100644
--- a/src/main/java/HdbExtractor/IsArchivedClass.java
+++ b/hdbextractor/src/main/java/HdbExtractor/IsArchivedClass.java
@@ -1,152 +1,152 @@
-//+======================================================================
-// $Source: /cvsroot/tango-cs/tango/jserver/archiving/HdbExtractor/IsArchivedClass.java,v $
-//
-// Project:      Tango Device Server
-//
-// Description:  Java source code for the command TemplateClass of the
-//               HdbExtractor class.
-//
-// $Author: chinkumo $
-//
-// $Revision: 1.3 $
-//
-// $Log: IsArchivedClass.java,v $
-// Revision 1.3  2005/11/29 16:17:38  chinkumo
-// Code reformated (pogo compatible)
-//
-// Revision 1.2  2005/11/15 13:45:53  chinkumo
-// ...
-//
-// Revision 1.1  2005/09/09 10:03:21  chinkumo
-// First commit !
-// (Dynamic attribut release)
-//
-//
-// copyleft :    European Synchrotron Radiation Facility
-//               BP 220, Grenoble 38043
-//               FRANCE
-//
-//-======================================================================
-//
-//  		This file is generated by POGO
-//	(Program Obviously used to Generate tango Object)
-//
-//         (c) - Software Engineering Group - ESRF
-//=============================================================================
-
-/**
- * @author	$Author: chinkumo $
- * @version	$Revision: 1.3 $
- */
-package HdbExtractor;
-
-import org.omg.CORBA.Any;
-
-import fr.esrf.Tango.DevFailed;
-import fr.esrf.Tango.DispLevel;
-import fr.esrf.TangoDs.Command;
-import fr.esrf.TangoDs.DeviceImpl;
-import fr.esrf.TangoDs.Except;
-import fr.esrf.TangoDs.TangoConst;
-import fr.esrf.TangoDs.Util;
-
-/**
- * Class Description: Returns "true" if the attribute of given name is currently
- * archived, "false" otherwise.
- */
-
-public class IsArchivedClass extends Command implements TangoConst {
-	// ===============================================================
-	/**
-	 * Constructor for Command class IsArchivedClass
-	 * 
-	 * @param name
-	 *            command name
-	 * @param in
-	 *            argin type
-	 * @param out
-	 *            argout type
-	 */
-	// ===============================================================
-	public IsArchivedClass(final String name, final int in, final int out) {
-		super(name, in, out);
-	}
-
-	// ===============================================================
-	/**
-	 * Constructor for Command class IsArchivedClass
-	 * 
-	 * @param name
-	 *            command name
-	 * @param in
-	 *            argin type
-	 * @param in_comments
-	 *            argin description
-	 * @param out
-	 *            argout type
-	 * @param out_comments
-	 *            argout description
-	 */
-	// ===============================================================
-	public IsArchivedClass(final String name, final int in, final int out, final String in_comments, final String out_comments) {
-		super(name, in, out, in_comments, out_comments);
-	}
-
-	// ===============================================================
-	/**
-	 * Constructor for Command class IsArchivedClass
-	 * 
-	 * @param name
-	 *            command name
-	 * @param in
-	 *            argin type
-	 * @param in_comments
-	 *            argin description
-	 * @param out
-	 *            argout type
-	 * @param out_comments
-	 *            argout description
-	 * @param level
-	 *            The command display type OPERATOR or EXPERT
-	 */
-	// ===============================================================
-	public IsArchivedClass(final String name, final int in, final int out, final String in_comments, final String out_comments, final DispLevel level) {
-		super(name, in, out, in_comments, out_comments, level);
-	}
-
-	// ===============================================================
-	/**
-	 * return the result of the device's command.
-	 */
-	// ===============================================================
-	@Override
-	public Any execute(final DeviceImpl device, final Any in_any) throws DevFailed {
-		Util.out2.println("IsArchivedClass.execute(): arrived");
-		if (!(device instanceof HdbExtractor)) {
-			Except.throw_exception("DEVICE_ERROR", "Device parameter is not instance of HdbExtractor", "HdbExtractor");
-		}
-
-		final String argin = extract_DevString(in_any);
-		return insert(((HdbExtractor) (device)).is_archived(argin));
-	}
-
-	// ===============================================================
-	/**
-	 * Check if it is allowed to execute the command.
-	 */
-	// ===============================================================
-	@Override
-	public boolean is_allowed(final DeviceImpl device, final Any data_in) {
-		// End of Generated Code
-
-		// Re-Start of Generated Code
-		return true;
-	}
-}
-
-// -----------------------------------------------------------------------------
-/*
- * end of $Source:
- * /cvsroot/tango-cs/tango/jserver/archiving/HdbExtractor/IsArchivedClass.java,v
- * $
- */
+//+======================================================================
+// $Source: /cvsroot/tango-cs/tango/jserver/archiving/HdbExtractor/IsArchivedClass.java,v $
+//
+// Project:      Tango Device Server
+//
+// Description:  Java source code for the command TemplateClass of the
+//               HdbExtractor class.
+//
+// $Author: chinkumo $
+//
+// $Revision: 1.3 $
+//
+// $Log: IsArchivedClass.java,v $
+// Revision 1.3  2005/11/29 16:17:38  chinkumo
+// Code reformated (pogo compatible)
+//
+// Revision 1.2  2005/11/15 13:45:53  chinkumo
+// ...
+//
+// Revision 1.1  2005/09/09 10:03:21  chinkumo
+// First commit !
+// (Dynamic attribut release)
+//
+//
+// copyleft :    European Synchrotron Radiation Facility
+//               BP 220, Grenoble 38043
+//               FRANCE
+//
+//-======================================================================
+//
+//  		This file is generated by POGO
+//	(Program Obviously used to Generate tango Object)
+//
+//         (c) - Software Engineering Group - ESRF
+//=============================================================================
+
+/**
+ * @author	$Author: chinkumo $
+ * @version	$Revision: 1.3 $
+ */
+package HdbExtractor;
+
+import org.omg.CORBA.Any;
+
+import fr.esrf.Tango.DevFailed;
+import fr.esrf.Tango.DispLevel;
+import fr.esrf.TangoDs.Command;
+import fr.esrf.TangoDs.DeviceImpl;
+import fr.esrf.TangoDs.Except;
+import fr.esrf.TangoDs.TangoConst;
+import fr.esrf.TangoDs.Util;
+
+/**
+ * Class Description: Returns "true" if the attribute of given name is currently
+ * archived, "false" otherwise.
+ */
+
+public class IsArchivedClass extends Command implements TangoConst {
+	// ===============================================================
+	/**
+	 * Constructor for Command class IsArchivedClass
+	 * 
+	 * @param name
+	 *            command name
+	 * @param in
+	 *            argin type
+	 * @param out
+	 *            argout type
+	 */
+	// ===============================================================
+	public IsArchivedClass(final String name, final int in, final int out) {
+		super(name, in, out);
+	}
+
+	// ===============================================================
+	/**
+	 * Constructor for Command class IsArchivedClass
+	 * 
+	 * @param name
+	 *            command name
+	 * @param in
+	 *            argin type
+	 * @param in_comments
+	 *            argin description
+	 * @param out
+	 *            argout type
+	 * @param out_comments
+	 *            argout description
+	 */
+	// ===============================================================
+	public IsArchivedClass(final String name, final int in, final int out, final String in_comments, final String out_comments) {
+		super(name, in, out, in_comments, out_comments);
+	}
+
+	// ===============================================================
+	/**
+	 * Constructor for Command class IsArchivedClass
+	 * 
+	 * @param name
+	 *            command name
+	 * @param in
+	 *            argin type
+	 * @param in_comments
+	 *            argin description
+	 * @param out
+	 *            argout type
+	 * @param out_comments
+	 *            argout description
+	 * @param level
+	 *            The command display type OPERATOR or EXPERT
+	 */
+	// ===============================================================
+	public IsArchivedClass(final String name, final int in, final int out, final String in_comments, final String out_comments, final DispLevel level) {
+		super(name, in, out, in_comments, out_comments, level);
+	}
+
+	// ===============================================================
+	/**
+	 * return the result of the device's command.
+	 */
+	// ===============================================================
+	@Override
+	public Any execute(final DeviceImpl device, final Any in_any) throws DevFailed {
+		Util.out2.println("IsArchivedClass.execute(): arrived");
+		if (!(device instanceof HdbExtractor)) {
+			Except.throw_exception("DEVICE_ERROR", "Device parameter is not instance of HdbExtractor", "HdbExtractor");
+		}
+
+		final String argin = extract_DevString(in_any);
+		return insert(((HdbExtractor) (device)).is_archived(argin));
+	}
+
+	// ===============================================================
+	/**
+	 * Check if it is allowed to execute the command.
+	 */
+	// ===============================================================
+	@Override
+	public boolean is_allowed(final DeviceImpl device, final Any data_in) {
+		// End of Generated Code
+
+		// Re-Start of Generated Code
+		return true;
+	}
+}
+
+// -----------------------------------------------------------------------------
+/*
+ * end of $Source:
+ * /cvsroot/tango-cs/tango/jserver/archiving/HdbExtractor/IsArchivedClass.java,v
+ * $
+ */
diff --git a/src/main/java/HdbExtractor/Proxy/DbProxy.java b/hdbextractor/src/main/java/HdbExtractor/Proxy/DbProxy.java
similarity index 71%
rename from src/main/java/HdbExtractor/Proxy/DbProxy.java
rename to hdbextractor/src/main/java/HdbExtractor/Proxy/DbProxy.java
index a6647c3e13e1d747f84a9807f28a73e2ae68eae2..a2103410a1aaf3f4efcf1fcc2dbfb98e7b418996 100644
--- a/src/main/java/HdbExtractor/Proxy/DbProxy.java
+++ b/hdbextractor/src/main/java/HdbExtractor/Proxy/DbProxy.java
@@ -1,77 +1,69 @@
-// +======================================================================
-// $Source: /cvsroot/tango-cs/tango/jserver/archiving/HdbExtractor/Proxy/DbProxy.java,v $
-//
-// Project:      Tango Archiving Service
-//
-// Description:  Java source code for the class  DbProxy.
-//						(Chinkumo Jean) - 1 f�vr. 2005
-//
-// $Author: ounsy $
-//
-// $Revision: 1.5 $
-//
-// $Log: DbProxy.java,v $
-// Revision 1.5  2007/03/05 16:25:20  ounsy
-// non-static DataBase
-//
-// Revision 1.4  2007/02/01 13:50:18  pierrejoseph
-// ArchivingConfigureWithoutArchiverListInit instead of ArchivingConfigure
-//
-// Revision 1.3  2005/11/29 17:33:38  chinkumo
-// no message
-//
-// Revision 1.2.10.2  2005/11/29 16:17:38  chinkumo
-// Code reformated (pogo compatible)
-//
-// Revision 1.2.10.1  2005/11/15 13:45:51  chinkumo
-// ...
-//
-// Revision 1.2  2005/06/14 10:36:05  chinkumo
-// Branch (hdbExtractor_1_0_1-branch_0)  and HEAD merged.
-//
-// Revision 1.1.4.1  2005/06/13 14:08:05  chinkumo
-// Changes made to improve the management of exceptions were reported here.
-//
-// Revision 1.1  2005/02/01 12:39:03  chinkumo
-// This class replaces the HdbDbProxy class.
-//
-//
-// copyleft :	Synchrotron SOLEIL
-//					L'Orme des Merisiers
-//					Saint-Aubin - BP 48
-//					91192 GIF-sur-YVETTE CEDEX
-//
-//-======================================================================
-package HdbExtractor.Proxy;
-
-import fr.esrf.Tango.DevFailed;
-import fr.soleil.archiving.common.api.ConnectionFactory;
-import fr.soleil.archiving.common.api.exception.ArchivingException;
-import fr.soleil.archiving.hdbtdb.api.ConfigConst;
-import fr.soleil.archiving.hdbtdb.api.DataBaseManager;
-import fr.soleil.archiving.hdbtdb.api.manager.ArchivingManagerApiRefFactory;
-import fr.soleil.archiving.hdbtdb.api.manager.IArchivingManagerApiRef;
-
-public class DbProxy {
-    private IArchivingManagerApiRef manager;
-
-    public DbProxy(final String myDbHost, final String myDbName, final String mySchemaName, final String myDbUser,
-            final String myDbPassword, final boolean myRacConnection) throws ArchivingException {
-        try {
-            manager = ArchivingManagerApiRefFactory.getInstance(true, ConnectionFactory.connectThroughTango(
-                    "HdbExtractor", ConfigConst.HDB_CLASS_DEVICE, myDbHost, myDbName, mySchemaName, myDbUser,
-                    myDbPassword, null, null, myRacConnection, false, true));
-            manager.archivingConfigureWithoutArchiverListInit();
-        } catch (DevFailed e) {
-            throw new ArchivingException(e);
-        }
-    }
-
-    public boolean is_db_connected() {
-        return manager.isDbConnected();
-    }
-
-    public DataBaseManager getDataBase() {
-        return manager.getDataBase();
-    }
-}
+// +======================================================================
+// $Source: /cvsroot/tango-cs/tango/jserver/archiving/HdbExtractor/Proxy/DbProxy.java,v $
+//
+// Project:      Tango Archiving Service
+//
+// Description:  Java source code for the class  DbProxy.
+//						(Chinkumo Jean) - 1 f�vr. 2005
+//
+// $Author: ounsy $
+//
+// $Revision: 1.5 $
+//
+// $Log: DbProxy.java,v $
+// Revision 1.5  2007/03/05 16:25:20  ounsy
+// non-static DataBase
+//
+// Revision 1.4  2007/02/01 13:50:18  pierrejoseph
+// ArchivingConfigureWithoutArchiverListInit instead of ArchivingConfigure
+//
+// Revision 1.3  2005/11/29 17:33:38  chinkumo
+// no message
+//
+// Revision 1.2.10.2  2005/11/29 16:17:38  chinkumo
+// Code reformated (pogo compatible)
+//
+// Revision 1.2.10.1  2005/11/15 13:45:51  chinkumo
+// ...
+//
+// Revision 1.2  2005/06/14 10:36:05  chinkumo
+// Branch (hdbExtractor_1_0_1-branch_0)  and HEAD merged.
+//
+// Revision 1.1.4.1  2005/06/13 14:08:05  chinkumo
+// Changes made to improve the management of exceptions were reported here.
+//
+// Revision 1.1  2005/02/01 12:39:03  chinkumo
+// This class replaces the HdbDbProxy class.
+//
+//
+// copyleft :	Synchrotron SOLEIL
+//					L'Orme des Merisiers
+//					Saint-Aubin - BP 48
+//					91192 GIF-sur-YVETTE CEDEX
+//
+//-======================================================================
+package HdbExtractor.Proxy;
+
+import fr.soleil.archiving.common.api.ConnectionFactory;
+import fr.soleil.archiving.common.api.exception.ArchivingException;
+import fr.soleil.archiving.hdbtdb.api.DataBaseManager;
+import fr.soleil.archiving.hdbtdb.api.manager.ArchivingManagerApiRefFactory;
+import fr.soleil.archiving.hdbtdb.api.manager.IArchivingManagerApiRef;
+import fr.soleil.database.connection.DataBaseParameters;
+
+public class DbProxy {
+    private IArchivingManagerApiRef manager;
+
+    public DbProxy(DataBaseParameters params) throws ArchivingException {
+        manager = ArchivingManagerApiRefFactory.getInstance(true, ConnectionFactory.connect(params));
+        manager.archivingConfigureWithoutArchiverListInit();
+    }
+
+    public boolean is_db_connected() {
+        return manager.isDbConnected();
+    }
+
+    public DataBaseManager getDataBase() {
+        return manager.getDataBase();
+    }
+}
diff --git a/src/main/java/HdbExtractor/RemoveDynamicAttributeClass.java b/hdbextractor/src/main/java/HdbExtractor/RemoveDynamicAttributeClass.java
similarity index 96%
rename from src/main/java/HdbExtractor/RemoveDynamicAttributeClass.java
rename to hdbextractor/src/main/java/HdbExtractor/RemoveDynamicAttributeClass.java
index b086c1ea9a7525393e7b49f49cba003b367b25af..b0f045f2f5d5b924ad0386a6bf49b9ee86c88671 100644
--- a/src/main/java/HdbExtractor/RemoveDynamicAttributeClass.java
+++ b/hdbextractor/src/main/java/HdbExtractor/RemoveDynamicAttributeClass.java
@@ -1,150 +1,150 @@
-//+======================================================================
-// $Source: /cvsroot/tango-cs/tango/jserver/archiving/HdbExtractor/RemoveDynamicAttributeClass.java,v $
-//
-// Project:      Tango Device Server
-//
-// Description:  Java source code for the command TemplateClass of the
-//               HdbExtractor class.
-//
-// $Author: chinkumo $
-//
-// $Revision: 1.3 $
-//
-// $Log: RemoveDynamicAttributeClass.java,v $
-// Revision 1.3  2005/11/29 16:17:38  chinkumo
-// Code reformated (pogo compatible)
-//
-// Revision 1.2  2005/11/15 13:45:53  chinkumo
-// ...
-//
-// Revision 1.1  2005/09/09 10:03:21  chinkumo
-// First commit !
-// (Dynamic attribut release)
-//
-//
-// copyleft :    European Synchrotron Radiation Facility
-//               BP 220, Grenoble 38043
-//               FRANCE
-//
-//-======================================================================
-//
-//  		This file is generated by POGO
-//	(Program Obviously used to Generate tango Object)
-//
-//         (c) - Software Engineering Group - ESRF
-//=============================================================================
-
-/**
- * @author	$Author: chinkumo $
- * @version	$Revision: 1.3 $
- */
-package HdbExtractor;
-
-import org.omg.CORBA.Any;
-
-import fr.esrf.Tango.DevFailed;
-import fr.esrf.Tango.DispLevel;
-import fr.esrf.TangoDs.Command;
-import fr.esrf.TangoDs.DeviceImpl;
-import fr.esrf.TangoDs.Except;
-import fr.esrf.TangoDs.TangoConst;
-import fr.esrf.TangoDs.Util;
-
-/**
- * Class Description: Remove the dynamic attribute.
- */
-
-public class RemoveDynamicAttributeClass extends Command implements TangoConst {
-	// ===============================================================
-	/**
-	 * Constructor for Command class RemoveDynamicAttributeClass
-	 * 
-	 * @param name
-	 *            command name
-	 * @param in
-	 *            argin type
-	 * @param out
-	 *            argout type
-	 */
-	// ===============================================================
-	public RemoveDynamicAttributeClass(final String name, final int in, final int out) {
-		super(name, in, out);
-	}
-
-	// ===============================================================
-	/**
-	 * Constructor for Command class RemoveDynamicAttributeClass
-	 * 
-	 * @param name
-	 *            command name
-	 * @param in
-	 *            argin type
-	 * @param in_comments
-	 *            argin description
-	 * @param out
-	 *            argout type
-	 * @param out_comments
-	 *            argout description
-	 */
-	// ===============================================================
-	public RemoveDynamicAttributeClass(final String name, final int in, final int out, final String in_comments, final String out_comments) {
-		super(name, in, out, in_comments, out_comments);
-	}
-
-	// ===============================================================
-	/**
-	 * Constructor for Command class RemoveDynamicAttributeClass
-	 * 
-	 * @param name
-	 *            command name
-	 * @param in
-	 *            argin type
-	 * @param in_comments
-	 *            argin description
-	 * @param out
-	 *            argout type
-	 * @param out_comments
-	 *            argout description
-	 * @param level
-	 *            The command display type OPERATOR or EXPERT
-	 */
-	// ===============================================================
-	public RemoveDynamicAttributeClass(final String name, final int in, final int out, final String in_comments, final String out_comments, final DispLevel level) {
-		super(name, in, out, in_comments, out_comments, level);
-	}
-
-	// ===============================================================
-	/**
-	 * return the result of the device's command.
-	 */
-	// ===============================================================
-	@Override
-	public Any execute(final DeviceImpl device, final Any in_any) throws DevFailed {
-		Util.out2.println("RemoveDynamicAttributeClass.execute(): arrived");
-		final String argin = extract_DevString(in_any);
-		if (!(device instanceof HdbExtractor)) {
-			Except.throw_exception("DEVICE_ERROR", "Device parameter is not instance of HdbExtractor", "HdbExtractor");
-		}
-		((HdbExtractor) (device)).remove_dynamic_attribute(argin);
-		return insert();
-	}
-
-	// ===============================================================
-	/**
-	 * Check if it is allowed to execute the command.
-	 */
-	// ===============================================================
-	@Override
-	public boolean is_allowed(final DeviceImpl device, final Any data_in) {
-		// End of Generated Code
-
-		// Re-Start of Generated Code
-		return true;
-	}
-}
-
-// -----------------------------------------------------------------------------
-/*
- * end of $Source:/cvsroot/tango-cs/tango/jserver/archiving/HdbExtractor/
- * RemoveDynamicAttributeClass.java,v $
- */
+//+======================================================================
+// $Source: /cvsroot/tango-cs/tango/jserver/archiving/HdbExtractor/RemoveDynamicAttributeClass.java,v $
+//
+// Project:      Tango Device Server
+//
+// Description:  Java source code for the command TemplateClass of the
+//               HdbExtractor class.
+//
+// $Author: chinkumo $
+//
+// $Revision: 1.3 $
+//
+// $Log: RemoveDynamicAttributeClass.java,v $
+// Revision 1.3  2005/11/29 16:17:38  chinkumo
+// Code reformated (pogo compatible)
+//
+// Revision 1.2  2005/11/15 13:45:53  chinkumo
+// ...
+//
+// Revision 1.1  2005/09/09 10:03:21  chinkumo
+// First commit !
+// (Dynamic attribut release)
+//
+//
+// copyleft :    European Synchrotron Radiation Facility
+//               BP 220, Grenoble 38043
+//               FRANCE
+//
+//-======================================================================
+//
+//  		This file is generated by POGO
+//	(Program Obviously used to Generate tango Object)
+//
+//         (c) - Software Engineering Group - ESRF
+//=============================================================================
+
+/**
+ * @author	$Author: chinkumo $
+ * @version	$Revision: 1.3 $
+ */
+package HdbExtractor;
+
+import org.omg.CORBA.Any;
+
+import fr.esrf.Tango.DevFailed;
+import fr.esrf.Tango.DispLevel;
+import fr.esrf.TangoDs.Command;
+import fr.esrf.TangoDs.DeviceImpl;
+import fr.esrf.TangoDs.Except;
+import fr.esrf.TangoDs.TangoConst;
+import fr.esrf.TangoDs.Util;
+
+/**
+ * Class Description: Remove the dynamic attribute.
+ */
+
+public class RemoveDynamicAttributeClass extends Command implements TangoConst {
+	// ===============================================================
+	/**
+	 * Constructor for Command class RemoveDynamicAttributeClass
+	 * 
+	 * @param name
+	 *            command name
+	 * @param in
+	 *            argin type
+	 * @param out
+	 *            argout type
+	 */
+	// ===============================================================
+	public RemoveDynamicAttributeClass(final String name, final int in, final int out) {
+		super(name, in, out);
+	}
+
+	// ===============================================================
+	/**
+	 * Constructor for Command class RemoveDynamicAttributeClass
+	 * 
+	 * @param name
+	 *            command name
+	 * @param in
+	 *            argin type
+	 * @param in_comments
+	 *            argin description
+	 * @param out
+	 *            argout type
+	 * @param out_comments
+	 *            argout description
+	 */
+	// ===============================================================
+	public RemoveDynamicAttributeClass(final String name, final int in, final int out, final String in_comments, final String out_comments) {
+		super(name, in, out, in_comments, out_comments);
+	}
+
+	// ===============================================================
+	/**
+	 * Constructor for Command class RemoveDynamicAttributeClass
+	 * 
+	 * @param name
+	 *            command name
+	 * @param in
+	 *            argin type
+	 * @param in_comments
+	 *            argin description
+	 * @param out
+	 *            argout type
+	 * @param out_comments
+	 *            argout description
+	 * @param level
+	 *            The command display type OPERATOR or EXPERT
+	 */
+	// ===============================================================
+	public RemoveDynamicAttributeClass(final String name, final int in, final int out, final String in_comments, final String out_comments, final DispLevel level) {
+		super(name, in, out, in_comments, out_comments, level);
+	}
+
+	// ===============================================================
+	/**
+	 * return the result of the device's command.
+	 */
+	// ===============================================================
+	@Override
+	public Any execute(final DeviceImpl device, final Any in_any) throws DevFailed {
+		Util.out2.println("RemoveDynamicAttributeClass.execute(): arrived");
+		final String argin = extract_DevString(in_any);
+		if (!(device instanceof HdbExtractor)) {
+			Except.throw_exception("DEVICE_ERROR", "Device parameter is not instance of HdbExtractor", "HdbExtractor");
+		}
+		((HdbExtractor) (device)).remove_dynamic_attribute(argin);
+		return insert();
+	}
+
+	// ===============================================================
+	/**
+	 * Check if it is allowed to execute the command.
+	 */
+	// ===============================================================
+	@Override
+	public boolean is_allowed(final DeviceImpl device, final Any data_in) {
+		// End of Generated Code
+
+		// Re-Start of Generated Code
+		return true;
+	}
+}
+
+// -----------------------------------------------------------------------------
+/*
+ * end of $Source:/cvsroot/tango-cs/tango/jserver/archiving/HdbExtractor/
+ * RemoveDynamicAttributeClass.java,v $
+ */
diff --git a/src/main/java/HdbExtractor/RemoveDynamicAttributesClass.java b/hdbextractor/src/main/java/HdbExtractor/RemoveDynamicAttributesClass.java
similarity index 96%
rename from src/main/java/HdbExtractor/RemoveDynamicAttributesClass.java
rename to hdbextractor/src/main/java/HdbExtractor/RemoveDynamicAttributesClass.java
index a6d6bb125172715f1eed93d427ec4003306d9fde..a3e3532ef7be97dc6372c41f56e5b79c7be22312 100644
--- a/src/main/java/HdbExtractor/RemoveDynamicAttributesClass.java
+++ b/hdbextractor/src/main/java/HdbExtractor/RemoveDynamicAttributesClass.java
@@ -1,153 +1,153 @@
-//+======================================================================
-// $Source: /cvsroot/tango-cs/tango/jserver/archiving/HdbExtractor/RemoveDynamicAttributesClass.java,v $
-//
-// Project:      Tango Device Server
-//
-// Description:  Java source code for the command TemplateClass of the
-//               HdbExtractor class.
-//
-// $Author: ounsy $
-//
-// $Revision: 1.1 $
-//
-// $Log: RemoveDynamicAttributesClass.java,v $
-// Revision 1.1  2007/03/01 10:07:21  ounsy
-// creation
-//
-// Revision 1.3  2005/11/29 16:17:38  chinkumo
-// Code reformated (pogo compatible)
-//
-// Revision 1.2  2005/11/15 13:45:53  chinkumo
-// ...
-//
-// Revision 1.1  2005/09/09 10:03:21  chinkumo
-// First commit !
-// (Dynamic attribut release)
-//
-//
-// copyleft :    European Synchrotron Radiation Facility
-//               BP 220, Grenoble 38043
-//               FRANCE
-//
-//-======================================================================
-//
-//          This file is generated by POGO
-//  (Program Obviously used to Generate tango Object)
-//
-//         (c) - Software Engineering Group - ESRF
-//=============================================================================
-
-/**
- * @author  $Author: ounsy $
- * @version $Revision: 1.1 $
- */
-package HdbExtractor;
-
-import org.omg.CORBA.Any;
-
-import fr.esrf.Tango.DevFailed;
-import fr.esrf.Tango.DispLevel;
-import fr.esrf.TangoDs.Command;
-import fr.esrf.TangoDs.DeviceImpl;
-import fr.esrf.TangoDs.Except;
-import fr.esrf.TangoDs.TangoConst;
-import fr.esrf.TangoDs.Util;
-
-/**
- * Class Description: Remove the dynamic attribute.
- */
-
-public class RemoveDynamicAttributesClass extends Command implements TangoConst {
-	// ===============================================================
-	/**
-	 * Constructor for Command class RemoveDynamicAttributeClass
-	 * 
-	 * @param name
-	 *            command name
-	 * @param in
-	 *            argin type
-	 * @param out
-	 *            argout type
-	 */
-	// ===============================================================
-	public RemoveDynamicAttributesClass(final String name, final int in, final int out) {
-		super(name, in, out);
-	}
-
-	// ===============================================================
-	/**
-	 * Constructor for Command class RemoveDynamicAttributeClass
-	 * 
-	 * @param name
-	 *            command name
-	 * @param in
-	 *            argin type
-	 * @param in_comments
-	 *            argin description
-	 * @param out
-	 *            argout type
-	 * @param out_comments
-	 *            argout description
-	 */
-	// ===============================================================
-	public RemoveDynamicAttributesClass(final String name, final int in, final int out, final String in_comments, final String out_comments) {
-		super(name, in, out, in_comments, out_comments);
-	}
-
-	// ===============================================================
-	/**
-	 * Constructor for Command class RemoveDynamicAttributeClass
-	 * 
-	 * @param name
-	 *            command name
-	 * @param in
-	 *            argin type
-	 * @param in_comments
-	 *            argin description
-	 * @param out
-	 *            argout type
-	 * @param out_comments
-	 *            argout description
-	 * @param level
-	 *            The command display type OPERATOR or EXPERT
-	 */
-	// ===============================================================
-	public RemoveDynamicAttributesClass(final String name, final int in, final int out, final String in_comments, final String out_comments, final DispLevel level) {
-		super(name, in, out, in_comments, out_comments, level);
-	}
-
-	// ===============================================================
-	/**
-	 * return the result of the device's command.
-	 */
-	// ===============================================================
-	@Override
-	public Any execute(final DeviceImpl device, final Any in_any) throws DevFailed {
-		Util.out2.println("RemoveDynamicAttributesClass.execute(): arrived");
-		if (!(device instanceof HdbExtractor)) {
-			Except.throw_exception("DEVICE_ERROR", "Device parameter is not instance of HdbExtractor", "HdbExtractor");
-		}
-
-		((HdbExtractor) (device)).remove_dynamic_attributes();
-		return insert();
-	}
-
-	// ===============================================================
-	/**
-	 * Check if it is allowed to execute the command.
-	 */
-	// ===============================================================
-	@Override
-	public boolean is_allowed(final DeviceImpl device, final Any data_in) {
-		// End of Generated Code
-
-		// Re-Start of Generated Code
-		return true;
-	}
-}
-
-// -----------------------------------------------------------------------------
-/*
- * end of $Source:/cvsroot/tango-cs/tango/jserver/archiving/HdbExtractor/
- * RemoveDynamicAttributesClass.java,v $
- */
+//+======================================================================
+// $Source: /cvsroot/tango-cs/tango/jserver/archiving/HdbExtractor/RemoveDynamicAttributesClass.java,v $
+//
+// Project:      Tango Device Server
+//
+// Description:  Java source code for the command TemplateClass of the
+//               HdbExtractor class.
+//
+// $Author: ounsy $
+//
+// $Revision: 1.1 $
+//
+// $Log: RemoveDynamicAttributesClass.java,v $
+// Revision 1.1  2007/03/01 10:07:21  ounsy
+// creation
+//
+// Revision 1.3  2005/11/29 16:17:38  chinkumo
+// Code reformated (pogo compatible)
+//
+// Revision 1.2  2005/11/15 13:45:53  chinkumo
+// ...
+//
+// Revision 1.1  2005/09/09 10:03:21  chinkumo
+// First commit !
+// (Dynamic attribut release)
+//
+//
+// copyleft :    European Synchrotron Radiation Facility
+//               BP 220, Grenoble 38043
+//               FRANCE
+//
+//-======================================================================
+//
+//          This file is generated by POGO
+//  (Program Obviously used to Generate tango Object)
+//
+//         (c) - Software Engineering Group - ESRF
+//=============================================================================
+
+/**
+ * @author  $Author: ounsy $
+ * @version $Revision: 1.1 $
+ */
+package HdbExtractor;
+
+import org.omg.CORBA.Any;
+
+import fr.esrf.Tango.DevFailed;
+import fr.esrf.Tango.DispLevel;
+import fr.esrf.TangoDs.Command;
+import fr.esrf.TangoDs.DeviceImpl;
+import fr.esrf.TangoDs.Except;
+import fr.esrf.TangoDs.TangoConst;
+import fr.esrf.TangoDs.Util;
+
+/**
+ * Class Description: Remove the dynamic attribute.
+ */
+
+public class RemoveDynamicAttributesClass extends Command implements TangoConst {
+	// ===============================================================
+	/**
+	 * Constructor for Command class RemoveDynamicAttributeClass
+	 * 
+	 * @param name
+	 *            command name
+	 * @param in
+	 *            argin type
+	 * @param out
+	 *            argout type
+	 */
+	// ===============================================================
+	public RemoveDynamicAttributesClass(final String name, final int in, final int out) {
+		super(name, in, out);
+	}
+
+	// ===============================================================
+	/**
+	 * Constructor for Command class RemoveDynamicAttributeClass
+	 * 
+	 * @param name
+	 *            command name
+	 * @param in
+	 *            argin type
+	 * @param in_comments
+	 *            argin description
+	 * @param out
+	 *            argout type
+	 * @param out_comments
+	 *            argout description
+	 */
+	// ===============================================================
+	public RemoveDynamicAttributesClass(final String name, final int in, final int out, final String in_comments, final String out_comments) {
+		super(name, in, out, in_comments, out_comments);
+	}
+
+	// ===============================================================
+	/**
+	 * Constructor for Command class RemoveDynamicAttributeClass
+	 * 
+	 * @param name
+	 *            command name
+	 * @param in
+	 *            argin type
+	 * @param in_comments
+	 *            argin description
+	 * @param out
+	 *            argout type
+	 * @param out_comments
+	 *            argout description
+	 * @param level
+	 *            The command display type OPERATOR or EXPERT
+	 */
+	// ===============================================================
+	public RemoveDynamicAttributesClass(final String name, final int in, final int out, final String in_comments, final String out_comments, final DispLevel level) {
+		super(name, in, out, in_comments, out_comments, level);
+	}
+
+	// ===============================================================
+	/**
+	 * return the result of the device's command.
+	 */
+	// ===============================================================
+	@Override
+	public Any execute(final DeviceImpl device, final Any in_any) throws DevFailed {
+		Util.out2.println("RemoveDynamicAttributesClass.execute(): arrived");
+		if (!(device instanceof HdbExtractor)) {
+			Except.throw_exception("DEVICE_ERROR", "Device parameter is not instance of HdbExtractor", "HdbExtractor");
+		}
+
+		((HdbExtractor) (device)).remove_dynamic_attributes();
+		return insert();
+	}
+
+	// ===============================================================
+	/**
+	 * Check if it is allowed to execute the command.
+	 */
+	// ===============================================================
+	@Override
+	public boolean is_allowed(final DeviceImpl device, final Any data_in) {
+		// End of Generated Code
+
+		// Re-Start of Generated Code
+		return true;
+	}
+}
+
+// -----------------------------------------------------------------------------
+/*
+ * end of $Source:/cvsroot/tango-cs/tango/jserver/archiving/HdbExtractor/
+ * RemoveDynamicAttributesClass.java,v $
+ */
diff --git a/hdbextractor/src/main/resources/application.properties b/hdbextractor/src/main/resources/application.properties
new file mode 100644
index 0000000000000000000000000000000000000000..256553fd996bcf6edfc00d2799b25e9767957e5d
--- /dev/null
+++ b/hdbextractor/src/main/resources/application.properties
@@ -0,0 +1,5 @@
+#application properties
+project.name=${project.name}
+project.version=${project.version}
+build.date=${buildNumber}
+
diff --git a/pom.xml b/pom.xml
index 3773c49787ebf331f761a4ef4028a7e5f4da1b69..baf3c72ed3df8b33980e44d760d6e0a0ad111e3d 100644
--- a/pom.xml
+++ b/pom.xml
@@ -1,16 +1,28 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
-    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"
+  xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
   <modelVersion>4.0.0</modelVersion>
+
   <parent>
     <artifactId>super-pom-java</artifactId>
     <groupId>fr.soleil</groupId>
     <version>RELEASE</version>
   </parent>
+
   <groupId>fr.soleil.deviceservers</groupId>
-  <artifactId>hdbtdbArchivingServers</artifactId>
-  <version>2.5.7-SNAPSHOT</version>
-  <name>hdbtdbArchivingServers</name>
+  <artifactId>historicalarchivingservers</artifactId>
+  <version>2.6.1</version>
+  <packaging>pom</packaging>
+
+  <modules>
+    <module>archiving-common-collector</module>
+    <module>hdbarchiver</module>
+    <module>tdbarchiver</module>
+    <module>hdbextractor</module>
+    <module>tdbextractor</module>
+    <module>archivingmanager</module>
+  </modules>
+
   <developers>
     <developer>
       <id>girardot</id>
@@ -24,28 +36,22 @@
       <timezone>1</timezone>
     </developer>
   </developers>
+
   <scm>
-    <connection>${scm.connection.svn.tango-cs}:archiving/server/hdbtdbArchivingServers/trunk</connection>
-    <developerConnection>${scm.developerConnection.svn.tango-cs}:archiving/server/hdbtdbArchivingServers/trunk</developerConnection>
-    <url>${scm.url.svn.tango-cs}/archiving/server/hdbtdbArchivingServers/trunk</url>
+    <connection>scm:svn:https://svn.code.sf.net/p/tango-cs/code/archiving/server/hdbtdbArchivingServers/trunk</connection>
+    <url>https://svn.code.sf.net/p/tango-cs/code/archiving/server/hdbtdbArchivingServers/trunk</url>
   </scm>
-  <build>
-    <plugins>
-      <plugin>
-        <groupId>fr.soleil.maven.plugins</groupId>
-        <artifactId>maven-script-plugin</artifactId>
-        <executions>
-          <execution>
-            <id>install</id>
-            <phase>install</phase>
-            <goals>
-              <goal>generate</goal>
-            </goals>
-          </execution>
-        </executions>
-      </plugin>
-    </plugins>
-  </build>
+
+  <dependencyManagement>
+    <dependencies>
+      <dependency>
+        <groupId>fr.soleil.deviceservers</groupId>
+        <artifactId>archiving-common-collector</artifactId>
+        <version>${project.version}</version>
+      </dependency>
+    </dependencies>
+  </dependencyManagement>
+
   <dependencies>
     <dependency>
       <groupId>org.tango</groupId>
@@ -55,14 +61,6 @@
       <groupId>org.tango</groupId>
       <artifactId>JTangoCommons</artifactId>
     </dependency>
-    <dependency>
-      <groupId>fr.esrf.atk</groupId>
-      <artifactId>ATKCore</artifactId>
-    </dependency>
-    <dependency>
-      <groupId>log4j</groupId>
-      <artifactId>log4j</artifactId>
-    </dependency>
     <dependency>
       <groupId>fr.soleil.lib</groupId>
       <artifactId>hdbtdbArchivingApi</artifactId>
@@ -70,10 +68,21 @@
     <dependency>
       <groupId>fr.soleil.lib</groupId>
       <artifactId>commonArchivingApi</artifactId>
-    </dependency>
-    <dependency>
-      <groupId>org.slf4j</groupId>
-      <artifactId>slf4j-log4j12</artifactId>
+      <exclusions>
+        <exclusion>
+          <artifactId>slf4j-log4j12</artifactId>
+          <groupId>org.slf4j</groupId>
+        </exclusion>
+        <exclusion>
+          <artifactId>log4j</artifactId>
+          <groupId>log4j</groupId>
+        </exclusion>
+      </exclusions>
     </dependency>
   </dependencies>
+
+  <properties>
+    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
+  </properties>
+
 </project>
diff --git a/src/main/java/ArchivingManager/doc_html/html/package-list b/src/main/java/ArchivingManager/doc_html/html/package-list
deleted file mode 100644
index 8c93fc2cb325baee891f8dc18283a4d4df546391..0000000000000000000000000000000000000000
--- a/src/main/java/ArchivingManager/doc_html/html/package-list
+++ /dev/null
@@ -1 +0,0 @@
-ArchivingManager
diff --git a/src/main/java/ArchivingManager/doc_html/html/resources/inherit.gif b/src/main/java/ArchivingManager/doc_html/html/resources/inherit.gif
deleted file mode 100644
index c814867a13deb0ca7ea2156c6ca1d5a03372af7e..0000000000000000000000000000000000000000
Binary files a/src/main/java/ArchivingManager/doc_html/html/resources/inherit.gif and /dev/null differ
diff --git a/src/main/java/ArchivingManager/doc_html/html/stylesheet.css b/src/main/java/ArchivingManager/doc_html/html/stylesheet.css
deleted file mode 100644
index b62ecb51b9ec387c2909fae620ff20516c996aeb..0000000000000000000000000000000000000000
--- a/src/main/java/ArchivingManager/doc_html/html/stylesheet.css
+++ /dev/null
@@ -1,29 +0,0 @@
-/* Javadoc style sheet */
-
-/* Define colors, fonts and other style attributes here to override the defaults */
-
-/* Page background color */
-body { background-color: #FFFFFF }
-
-/* Table colors */
-.TableHeadingColor     { background: #CCCCFF } /* Dark mauve */
-.TableSubHeadingColor  { background: #EEEEFF } /* Light mauve */
-.TableRowColor         { background: #FFFFFF } /* White */
-
-/* Font used in left-hand frame lists */
-.FrameTitleFont   { font-size: 10pts; font-family: Helvetica, Arial, san-serif }
-.FrameHeadingFont { font-size: 10pts; font-family: Helvetica, Arial, san-serif }
-.FrameItemFont    { font-size: 10pts; font-family: Helvetica, Arial, san-serif }
-
-/* Example of smaller, sans-serif font in frames */
-/* .FrameItemFont  { font-size: 10pt; font-family: Helvetica, Arial, sans-serif } */
-
-/* Navigation bar fonts and colors */
-.NavBarCell1    { background-color:#EEEEFF;}/* Light mauve */
-.NavBarCell1Rev { background-color:#00008B;}/* Dark Blue */
-.NavBarFont1    { font-family: Arial, Helvetica, sans-serif; color:#000000;}
-.NavBarFont1Rev { font-family: Arial, Helvetica, sans-serif; color:#FFFFFF;}
-
-.NavBarCell2    { font-family: Arial, Helvetica, sans-serif; background-color:#FFFFFF;}
-.NavBarCell3    { font-family: Arial, Helvetica, sans-serif; background-color:#FFFFFF;}
-
diff --git a/src/main/java/Common/Watcher/AbsArchivingWatcher.java b/src/main/java/Common/Watcher/AbsArchivingWatcher.java
deleted file mode 100644
index 490599df6f9431fe81b70b704d35922b70d8f09a..0000000000000000000000000000000000000000
--- a/src/main/java/Common/Watcher/AbsArchivingWatcher.java
+++ /dev/null
@@ -1,610 +0,0 @@
-package Common.Watcher;
-
-import java.io.IOException;
-import java.io.PrintWriter;
-import java.io.StringWriter;
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-
-import org.slf4j.Logger;
-import org.tango.utils.DevFailedUtils;
-
-import fr.esrf.Tango.DevFailed;
-import fr.esrf.Tango.DevState;
-import fr.esrf.TangoApi.DbDatum;
-import fr.esrf.TangoApi.DbDevice;
-import fr.esrf.TangoDs.DeviceClass;
-import fr.esrf.TangoDs.DeviceImpl;
-import fr.esrf.TangoDs.Except;
-import fr.esrf.TangoDs.TangoConst;
-import fr.esrf.TangoDs.Util;
-import fr.soleil.archiving.common.api.ConnectionFactory;
-import fr.soleil.archiving.common.api.exception.ArchivingException;
-import fr.soleil.archiving.common.api.utils.LoggingUtils;
-import fr.soleil.archiving.hdbtdb.api.ConfigConst;
-import fr.soleil.archiving.hdbtdb.api.HdbTdbConnectionParameters;
-import fr.soleil.archiving.hdbtdb.api.watch.datasources.db.HDBReader;
-import fr.soleil.archiving.hdbtdb.api.watch.datasources.db.IDBReader;
-import fr.soleil.archiving.hdbtdb.api.watch.datasources.db.TDBReader;
-import fr.soleil.archiving.hdbtdb.api.watch.dto.Archiver;
-import fr.soleil.archiving.hdbtdb.api.watch.dto.ArchivingAttribute;
-import fr.soleil.archiving.hdbtdb.api.watch.dto.ControlResult;
-import fr.soleil.archiving.hdbtdb.api.watch.dto.Domain;
-import fr.soleil.archiving.hdbtdb.api.watch.dto.comparators.ArchiversComparator;
-import fr.soleil.archiving.hdbtdb.api.watch.dto.comparators.ArchivingAttributeComparator;
-import fr.soleil.archiving.hdbtdb.api.watch.dto.comparators.DomainsComparator;
-import fr.soleil.archiving.hdbtdb.api.watch.lifecycle.DefaultLifeCycleManager;
-import fr.soleil.archiving.hdbtdb.api.watch.strategy.control.modes.LastInsertController;
-import fr.soleil.archiving.hdbtdb.api.watch.strategy.delay.IDelayManager;
-
-@Deprecated
-public abstract class AbsArchivingWatcher extends DeviceImpl implements TangoConst {
-
-    // --------- Start of properties data members ----------
-
-    /**
-     * The minimum number of attributes in a control step. Not used in the
-     * current device implementation. <b>Default value : </b>10
-     */
-    private short minPacketSize = 10;
-    /**
-     * The number of attributes in a control step. <b>Default value : </b>100
-     */
-    private short maxPacketSize = 100;
-    /**
-     * Used to tell the device if it should diagnose KO archivers (archivers
-     * that have at least 1 KO attribute). If set to true, the archivers part of
-     * the generated control report will contain specific archiver information
-     * such as scalar load etc..<br>
-     * If set to false, those details will remain blank.<br>
-     * Setting the property to true will increase the database load. <b>Default
-     * value : </b>false
-     */
-    private boolean doArchiverDiagnosis = false;
-    /**
-     * Used to tell the device if it should ask the archiver to retry archiving
-     * KO attributes. If set to true, the device automatically calls the
-     * HDBArchiver command "retryForAttributes" for KO attributes.<br>
-     * If set to false, it doesn't.<br>
-     * <b>Default value : </b>false
-     */
-    private boolean doRetry = false;
-    /**
-     * Describes the device start-up sequence. If set to true, the device
-     * automatically starts controlling on initialisation; with default
-     * parameters (as if the "start" command was called)<br>
-     * If set to false, the device waits in standby after being initialised.<br>
-     * <b>Default value : </b>false
-     */
-    private boolean doStartOnInitDevice = false;
-    /**
-     * The duration of a full control cycle in seconds. <b>Default value :
-     * </b>14400 (4 hours)
-     */
-    private int macroPeriod = 14400;
-
-    /**
-     * Computer identifier on wich is settled the database DB. The identifier
-     * can be the computer name or its IP address. <br>
-     * <b>Default value : </b> hdb
-     */
-    private String hdbHost;
-    /**
-     * Database name.<br>
-     * <b>Default value : </b> hdb
-     */
-    private String hdbName;
-
-    /**
-     * Computer identifier on wich is settled the database TDB. The identifier
-     * can be the computer name or its IP address. <br>
-     * <b>Default value : </b> tdb
-     */
-    private String tdbHost;
-
-    /**
-     * Database name.<br>
-     * <b>Default value : </b> tdb
-     */
-    private String tdbName;
-
-    /**
-     * User identifier (name) used to connect the database HDB. <br>
-     * <b>Default value : </b> hdb
-     */
-    private String hdbUser;
-    /**
-     * User identifier (name) used to connect the database TDB.<br>
-     * <b>Default value : </b> tdb
-     */
-    private String tdbUser;
-    /**
-     * Password used to connect the database HDB. <br>
-     * <b>Default value : </b> hdb
-     */
-    private String hdbPwd;
-    /**
-     * Password used to connect the database TDB.<br>
-     * <b>Default value : </b> tdb
-     */
-    private String tdbPwd;
-
-    /**
-     * Describes the default safety period calculation method, which will be
-     * used if the default start command is called.<br>
-     * <b>Default value : </b> absolute/minutes/15
-     */
-    private String defaultSafetyPeriod = "absolute/minutes/15";
-
-    /**
-     * Defines whether the archiver will log to a diary. <b>Default value :
-     * </b>false
-     */
-    private boolean hasDiary = false;
-
-    /**
-     * The criticity threshold of the archiver's logging. Only messages with a
-     * criticity higher than this attribute will be logged to the diary.
-     * Possible values are:
-     * <UL>
-     * <LI>DEBUG
-     * <LI>INFO
-     * <LI>WARNING
-     * <LI>ERROR
-     * <LI>CRITIC
-     * </UL>
-     * <b>Default value : </b>DEBUG
-     */
-    private String diaryLogLevel = "DEBUG";
-
-    /**
-     * The path of the diary logs. Don't include a filename, diary files are
-     * named automatically.
-     */
-    private String diaryPath;
-    /**
-     * true if the ORACLE RAC connection is activated. This information is
-     * appended to all device's (or attributes) name. false otherwise.<br>
-     * <b>Default value : </b> false
-     */
-    private boolean hdbRacConnection = false;
-    private boolean tdbRacConnection = false;
-
-    /**
-     * It defines the minimum number of KO attributes which put the device in
-     * ALARM state <b>Default value : </b> 100
-     */
-    // --------- End of properties data members ----------
-
-    // --------- Start of attributes data members ----------
-
-    protected IDBReader dbReader;
-    // private String latestFaultMessage = "";
-    // private int faultsCounter = 0;
-
-    // Add your own data members here
-    protected Logger logger;
-
-    private DefaultLifeCycleManager lifeCycleManager;
-
-    private ControlResult controlResult;
-
-    private IDelayManager delayManager;
-    private String schema = "";
-
-    // --------- End of attributes data members ----------
-
-    protected DefaultLifeCycleManager getLifeCycleManager() {
-        return this.lifeCycleManager;
-    }
-
-    public AbsArchivingWatcher(final DeviceClass arg0, final String arg1) throws DevFailed {
-        super(arg0, arg1);
-    }
-
-    public AbsArchivingWatcher(final DeviceClass arg0, final String arg1, final String arg2) throws DevFailed {
-        super(arg0, arg1, arg2);
-    }
-
-    public enum DBtype {
-        HDB, TDB;
-    }
-
-    protected void initHdbConnectionInfos() {
-        DbDevice device = this.get_db_device();
-        try {
-            HdbTdbConnectionParameters.performHDBInit(device, true, true);
-
-            this.hdbHost = HdbTdbConnectionParameters.getHDbHost();
-            this.hdbName = HdbTdbConnectionParameters.getHDbName();
-            this.schema = HdbTdbConnectionParameters.getHDbSchema();
-            this.hdbUser = HdbTdbConnectionParameters.getHDBUser();
-            this.hdbPwd = HdbTdbConnectionParameters.getHDBPassword();
-            this.hdbRacConnection = HdbTdbConnectionParameters.isHDbRac();
-
-            HdbTdbConnectionParameters.printHDBConnectionInfoLog();
-
-        } catch (ArchivingException e) {
-            e.printStackTrace();
-            if (this.logger != null) {
-                this.logger.error("error during hdb information initialization", e);
-            }
-        }
-    }
-
-    protected void initTdbConnectionInfos() {
-        DbDevice device = this.get_db_device();
-        try {
-            HdbTdbConnectionParameters.performTDBInit(device, true, true);
-
-            this.tdbHost = HdbTdbConnectionParameters.getTDbHost();
-            this.tdbName = HdbTdbConnectionParameters.getTDbName();
-            this.schema = HdbTdbConnectionParameters.getTDbSchema();
-            this.tdbUser = HdbTdbConnectionParameters.getTDBUser();
-            this.tdbPwd = HdbTdbConnectionParameters.getTDBPassword();
-            this.tdbRacConnection = HdbTdbConnectionParameters.isTDBRac();
-
-            HdbTdbConnectionParameters.printTDBConnectionInfoLog();
-
-        } catch (ArchivingException e) {
-            e.printStackTrace();
-            if (this.logger != null) {
-                this.logger.error("error during tdb information initialization", e);
-            }
-        }
-    }
-
-    /**
-     * 
-     * @param type
-     *            LifeCycleManagerFactory.HDB_LIFE_CYCLE or
-     *            LifeCycleManagerFactory.TDB_LIFE_CYCLE
-     * @throws DevFailed
-     */
-    protected void initLifeCycleManager(final DBtype type) throws DevFailed {
-
-        switch (type) {
-            case HDB:
-                this.dbReader = new HDBReader(ConnectionFactory.connectThroughTango("HdbWatcher",
-                        ConfigConst.HDB_CLASS_DEVICE, hdbHost, hdbName, schema, hdbUser, hdbPwd, null, null,
-                        hdbRacConnection, false, true));
-                break;
-            case TDB:
-                this.dbReader = new TDBReader(ConnectionFactory.connectThroughTango("TdbWatcher",
-                        ConfigConst.TDB_CLASS_DEVICE, tdbHost, tdbName, schema, tdbUser, tdbPwd, null, null,
-                        tdbRacConnection, false, false));
-                break;
-            default:
-                break;
-
-        }
-        LastInsertController controller = new LastInsertController(this.dbReader, this.defaultSafetyPeriod);
-        this.lifeCycleManager = new DefaultLifeCycleManager(this.macroPeriod, this.doArchiverDiagnosis, this.doRetry,
-                this.doStartOnInitDevice, this.minPacketSize, this.dbReader, controller);
-        this.lifeCycleManager.getAsThread().start();
-        this.delayManager = this.lifeCycleManager.getDelayManager();
-        try {
-            this.logger = LoggingUtils.configureLogging(this.device_name, this.hasDiary, this.diaryPath,
-                    this.diaryLogLevel);
-        } catch (final IOException e) {
-            DevFailedUtils.throwDevFailed(e);
-        }
-    }
-
-    public IDelayManager getDelayManager() {
-        return this.delayManager;
-    }
-
-    public ControlResult buildControlResult() {
-        return new ControlResult(this.dbReader, this.lifeCycleManager.getChoosingStrategy());
-    }
-
-    @Override
-    public abstract void init_device() throws DevFailed;
-
-    protected abstract DbDatum getClassProperty(String name);
-
-    /**
-     * @param result
-     * @return
-     */
-    protected String[] get_error_archivers(final ControlResult _controlResult) {
-        final String[] empty = new String[0];
-        if (_controlResult == null) {
-            return empty;
-        }
-
-        final Map<String, Archiver> _errorArchivers = _controlResult.getErrorArchivers();
-        final String[] argout = new String[_errorArchivers.size()];
-
-        final List<Archiver> list = new ArrayList<Archiver>();
-        list.addAll(_errorArchivers.values());
-        Collections.sort(list, new ArchiversComparator());
-        final Iterator<Archiver> it = list.iterator();
-
-        int i = 0;
-        while (it.hasNext()) {
-            final Archiver key = it.next();
-            argout[i] = key.getName();
-            i++;
-        }
-
-        return argout;
-    }
-
-    protected String[] get_error_domains(final ControlResult controlResult) throws DevFailed {
-        final String[] empty = new String[0];
-        if (controlResult == null) {
-            return empty;
-        }
-
-        final Map<String, Domain> _errorDomains = controlResult.getErrorDomains();
-        final String[] argout = new String[_errorDomains.size()];
-
-        final List<Domain> list = new ArrayList<Domain>();
-        list.addAll(_errorDomains.values());
-        Collections.sort(list, new DomainsComparator());
-        final Iterator<Domain> it = list.iterator();
-
-        int i = 0;
-        while (it.hasNext()) {
-            final Domain key = it.next();
-            argout[i] = key.getName();
-            i++;
-        }
-
-        return argout;
-    }
-
-    /**
-     * Lists KO attributes for this archiver
-     * 
-     * @param argin
-     *            The name of the archiver
-     * @return The list of KO attributes for this archiver
-     */
-    protected String[] get_errors_for_archiver(final String argin, final ControlResult controlResult) throws DevFailed {
-        final String[] empty = new String[0];
-        if (controlResult == null) {
-            return empty;
-        }
-
-        final Map<String, Archiver> errorArchivers = controlResult.getErrorArchivers();
-        if (errorArchivers == null) {
-            return empty;
-        }
-
-        final Archiver archiver = errorArchivers.get(argin);
-        if (archiver == null) {
-            return empty;
-        }
-
-        final Map<String, ArchivingAttribute> errorAttributes = archiver.getKOAttributes();
-        if (errorAttributes == null) {
-            return empty;
-        }
-
-        final String[] argout = new String[errorAttributes.size()];
-        final List<ArchivingAttribute> list = new ArrayList<ArchivingAttribute>();
-        list.addAll(errorAttributes.values());
-        Collections.sort(list, new ArchivingAttributeComparator());
-        final Iterator<ArchivingAttribute> it = list.iterator();
-        int i = 0;
-
-        while (it.hasNext()) {
-            final ArchivingAttribute key = it.next();
-            argout[i] = key.getCompleteName();
-            i++;
-        }
-        return argout;
-    }
-
-    protected ControlResult updateControlResult() throws DevFailed {
-
-        this.controlResult = this.delayManager.getControlResult(IDelayManager.READ_ROLLOVER);
-        if (this.controlResult == null) {
-            Except.throw_exception("DEVICE_ ERROR", "cannot get archiving status", "read_attr_hardware");
-        }
-        return this.controlResult;
-    }
-
-    @Override
-    public DevState dev_state() throws DevFailed {
-        DevState state = DevState.INIT;
-        if (this.lifeCycleManager == null) {
-            this.set_status("init in progress");
-        } else {
-            state = this.lifeCycleManager.getTangoState();
-            if (state.equals(DevState.FAULT)) {
-                final Throwable lastError = this.lifeCycleManager.getLastError();
-                String message;
-                if (lastError instanceof DevFailed) {
-                    message = DevFailedUtils.toString((DevFailed) lastError);
-                } else {
-                    final StringWriter sw = new StringWriter();
-                    lastError.printStackTrace(new PrintWriter(sw));
-                    message = sw.toString();
-                }
-                this.set_status(message);
-            } else {
-                final String report = this.controlResult == null ? ControlResult.EMPTY_REPORT : "Archived: "
-                        + this.controlResult.getNumberOfArchivingAttributes() + "\nKO: "
-                        + this.controlResult.getNumberOfKoAttributes() + " - NULL: "
-                        + this.controlResult.getNumberOfAttributesControlledWithSuccessWithNullValue();
-                this.set_status(report);
-                // manage alarms, super.dev_state will check alarms only if
-                // current state in ON of ALARM
-                super.set_state(state);
-                final DevState currentState = super.dev_state();
-                if (currentState.equals(DevState.ALARM)) {
-                    state = currentState;
-                }
-
-            }
-        }
-
-        return state;
-    }
-
-    // ===================================================================
-    /**
-     * Read the device properties from database.
-     */
-    // ===================================================================
-    protected void get_device_property() throws DevFailed {
-        // Initialize your default values here.
-        // ------------------------------------------
-        this.schema = "";
-        // Read device properties from database.(Automatic code generation)
-        // -------------------------------------------------------------
-        if (!Util._UseDb) {
-            return;
-        }
-        final String[] propnames = { "MinPacketSize", "MaxPacketSize", "DoArchiverDiagnosis", "DoRetry",
-                "DoStartOnInitDevice", "MacroPeriod", "DefaultSafetyPeriod", "HasDiary", "DiaryPath", "DiaryLogLevel" };
-
-        // Call database and extract values
-        // --------------------------------------------
-        final DbDatum[] devProp = this.get_db_device().get_property(propnames);
-        int i = -1;
-        // Extract MinPacketSize value
-        if (devProp[++i].is_empty() == false) {
-            this.minPacketSize = devProp[i].extractShort();
-        } else {
-            // Try to get value from class property
-            final DbDatum cl_prop = this.getClassProperty(devProp[i].name);
-            if (cl_prop.is_empty() == false) {
-                this.minPacketSize = cl_prop.extractShort();
-            }
-        }
-
-        // Extract MaxPacketSize value
-        if (devProp[++i].is_empty() == false) {
-            this.maxPacketSize = devProp[i].extractShort();
-        } else {
-            // Try to get value from class property
-            final DbDatum cl_prop = this.getClassProperty(devProp[i].name);
-            if (cl_prop.is_empty() == false) {
-                this.maxPacketSize = cl_prop.extractShort();
-            }
-        }
-
-        // Extract DoArchiverDiagnosis value
-        if (devProp[++i].is_empty() == false) {
-            this.doArchiverDiagnosis = devProp[i].extractBoolean();
-        } else {
-            // Try to get value from class property
-            final DbDatum cl_prop = this.getClassProperty(devProp[i].name);
-            if (cl_prop.is_empty() == false) {
-                this.doArchiverDiagnosis = cl_prop.extractBoolean();
-            }
-        }
-
-        // Extract DoRetry value
-        if (devProp[++i].is_empty() == false) {
-            this.doRetry = devProp[i].extractBoolean();
-        } else {
-            // Try to get value from class property
-            final DbDatum cl_prop = this.getClassProperty(devProp[i].name);
-            if (cl_prop.is_empty() == false) {
-                this.doRetry = cl_prop.extractBoolean();
-            }
-        }
-
-        // Extract doStartOnInitDevice value
-        if (devProp[++i].is_empty() == false) {
-            this.doStartOnInitDevice = devProp[i].extractBoolean();
-        } else {
-            // Try to get value from class property
-            final DbDatum cl_prop = this.getClassProperty(devProp[i].name);
-            if (cl_prop.is_empty() == false) {
-                this.doStartOnInitDevice = cl_prop.extractBoolean();
-            }
-        }
-
-        // Extract MacroPeriod value
-        if (devProp[++i].is_empty() == false) {
-            this.macroPeriod = devProp[i].extractLong();
-        } else {
-            // Try to get value from class property
-            final DbDatum cl_prop = this.getClassProperty(devProp[i].name);
-            if (cl_prop.is_empty() == false) {
-                this.macroPeriod = cl_prop.extractLong();
-            }
-        }
-        // Extract DefaultSafetyPeriod value
-        if (devProp[++i].is_empty() == false) {
-            this.defaultSafetyPeriod = devProp[i].extractString();
-        } else {
-            // Try to get value from class property
-            final DbDatum cl_prop = this.getClassProperty(devProp[i].name);
-            if (cl_prop.is_empty() == false) {
-                this.defaultSafetyPeriod = cl_prop.extractString();
-            }
-        }
-
-        // Extract hasDiary value
-        if (devProp[++i].is_empty() == false) {
-            this.hasDiary = devProp[i].extractBoolean();
-        } else {
-            // Try to get value from class property
-            final DbDatum cl_prop = this.getClassProperty(devProp[i].name);
-            if (cl_prop.is_empty() == false) {
-                this.hasDiary = cl_prop.extractBoolean();
-            }
-        }
-
-        // Extract diaryPath value
-        if (devProp[++i].is_empty() == false) {
-            this.diaryPath = devProp[i].extractString();
-        } else {
-            // Try to get value from class property
-            final DbDatum cl_prop = this.getClassProperty(devProp[i].name);
-            if (cl_prop.is_empty() == false) {
-                this.diaryPath = cl_prop.extractString();
-            }
-        }
-
-        // Extract diaryLogLevel value
-        if (devProp[++i].is_empty() == false) {
-            this.diaryLogLevel = devProp[i].extractString();
-        } else {
-            // Try to get value from class property
-            final DbDatum cl_prop = this.getClassProperty(devProp[i].name);
-            if (cl_prop.is_empty() == false) {
-                this.diaryLogLevel = cl_prop.extractString();
-            }
-        }
-
-        // Extract minNumberOfKoForAlarmState value
-        // if (dev_prop[++i].is_empty() == false) {
-        // minNumberOfKoForAlarmState = dev_prop[i].extractShort();
-        // } else {
-        // // Try to get value from class property
-        // DbDatum cl_prop = getClassProperty(dev_prop[i].name);
-        // if (cl_prop.is_empty() == false) {
-        // minNumberOfKoForAlarmState = cl_prop.extractShort();
-        // }
-        // }
-
-        this.get_logger().info("minPacketSize = " + this.minPacketSize);
-        this.get_logger().info("maxPacketSize = " + this.maxPacketSize);
-        this.get_logger().info("doArchiverDiagnosis = " + this.doArchiverDiagnosis);
-        this.get_logger().info("doRetry = " + this.doRetry);
-        this.get_logger().info("doStartOnInitDevice = " + this.doStartOnInitDevice);
-        this.get_logger().info("macroPeriod = " + this.macroPeriod);
-        this.get_logger().info("hasDiary = " + this.hasDiary);
-        this.get_logger().info("diaryPath = " + this.diaryPath);
-        this.get_logger().info("diaryLogLevel = " + this.diaryLogLevel);
-        // get_logger().info("MinNumberOfKoForAlarmState = " +
-        // minNumberOfKoForAlarmState);
-
-        //
-        // End of Automatic code generation
-        // -------------------------------------------------------------
-
-    }
-}
diff --git a/src/main/java/HdbArchivingWatcher/Commands/AdminReport/DataBaseReportClass.java b/src/main/java/HdbArchivingWatcher/Commands/AdminReport/DataBaseReportClass.java
deleted file mode 100644
index da53d1a6dc073aa27a624e8be074591ef9f867b0..0000000000000000000000000000000000000000
--- a/src/main/java/HdbArchivingWatcher/Commands/AdminReport/DataBaseReportClass.java
+++ /dev/null
@@ -1,123 +0,0 @@
-/**
- * @author  $Author$
- * @version $Revision$
- */
-package HdbArchivingWatcher.Commands.AdminReport;
-
-import org.omg.CORBA.Any;
-
-import HdbArchivingWatcher.HdbArchivingWatcher;
-import fr.esrf.Tango.DevFailed;
-import fr.esrf.Tango.DevState;
-import fr.esrf.Tango.DispLevel;
-import fr.esrf.TangoDs.Command;
-import fr.esrf.TangoDs.DeviceImpl;
-import fr.esrf.TangoDs.Except;
-import fr.esrf.TangoDs.TangoConst;
-import fr.esrf.TangoDs.Util;
-
-/**
- * Class Description:
- * 
- */
-@Deprecated
-public class DataBaseReportClass extends Command implements TangoConst {
-    // ===============================================================
-    /**
-     * Constructor for Command class DataBaseReportClass
-     * 
-     * @param name
-     *            command name
-     * @param in
-     *            argin type
-     * @param out
-     *            argout type
-     */
-    // ===============================================================
-    public DataBaseReportClass(String name, int in, int out) {
-	super(name, in, out);
-    }
-
-    // ===============================================================
-    /**
-     * Constructor for Command class DataBaseReportClass
-     * 
-     * @param name
-     *            command name
-     * @param in
-     *            argin type
-     * @param in_comments
-     *            argin description
-     * @param out
-     *            argout type
-     * @param out_comments
-     *            argout description
-     */
-    // ===============================================================
-    public DataBaseReportClass(String name, int in, int out, String in_comments, String out_comments) {
-	super(name, in, out, in_comments, out_comments);
-    }
-
-    // ===============================================================
-    /**
-     * Constructor for Command class DataBaseReportClass
-     * 
-     * @param name
-     *            command name
-     * @param in
-     *            argin type
-     * @param in_comments
-     *            argin description
-     * @param out
-     *            argout type
-     * @param out_comments
-     *            argout description
-     * @param level
-     *            The command display type OPERATOR or EXPERT
-     */
-    // ===============================================================
-    public DataBaseReportClass(String name, int in, int out, String in_comments,
-	    String out_comments, DispLevel level) {
-	super(name, in, out, in_comments, out_comments, level);
-    }
-
-    // ===============================================================
-    /**
-     * return the result of the device's command.
-     */
-    // ===============================================================
-    @Override
-    public Any execute(DeviceImpl device, Any in_any) throws DevFailed {
-	if (!(device instanceof HdbArchivingWatcher)) {
-	    Except.throw_exception("DEVICE_ERROR",
-		    "Device parameter is not instance of HdbArchivingWatcher",
-		    "HdbArchivingWatcher");
-	}
-
-	Util.out2.println("DataBaseReportClass.execute(): arrived");
-	return this.insert(((HdbArchivingWatcher) (device)).get_database_report());
-    }
-
-    // ===============================================================
-    /**
-     * Check if it is allowed to execute the command.
-     */
-    // ===============================================================
-    @Override
-    public boolean is_allowed(DeviceImpl device, Any data_in) {
-	if (device.get_state() == DevState.OFF || device.get_state() == DevState.INIT) {
-	    // End of Generated Code
-
-	    // Re-Start of Generated Code
-	    return false;
-	}
-	return true;
-    }
-}
-// -----------------------------------------------------------------------------
-/*
- * end of $Source:
- * /cvsroot/tango-cs/archiving/server/hdbtdbArchivingServers/src/
- * main/java/HdbArchivingWatcher/Commands/AdminReport/DataBaseReportClass.java,v
- * $
- */
diff --git a/src/main/java/HdbArchivingWatcher/Commands/AdminReport/GetAttributesCountClass.java b/src/main/java/HdbArchivingWatcher/Commands/AdminReport/GetAttributesCountClass.java
deleted file mode 100644
index f7199151b9debc098d637c0c0f021a2ee3bee375..0000000000000000000000000000000000000000
--- a/src/main/java/HdbArchivingWatcher/Commands/AdminReport/GetAttributesCountClass.java
+++ /dev/null
@@ -1,125 +0,0 @@
-/**
- * @author  $Author$
- * @version $Revision$
- */
-package HdbArchivingWatcher.Commands.AdminReport;
-
-import org.omg.CORBA.Any;
-
-import HdbArchivingWatcher.HdbArchivingWatcher;
-import fr.esrf.Tango.DevFailed;
-import fr.esrf.Tango.DevState;
-import fr.esrf.Tango.DispLevel;
-import fr.esrf.TangoDs.Command;
-import fr.esrf.TangoDs.DeviceImpl;
-import fr.esrf.TangoDs.Except;
-import fr.esrf.TangoDs.TangoConst;
-import fr.esrf.TangoDs.Util;
-
-/**
- * Class Description:
- * 
- */
-@Deprecated
-public class GetAttributesCountClass extends Command implements TangoConst {
-    // ===============================================================
-    /**
-     * Constructor for Command class GetAttributesCountClass
-     * 
-     * @param name
-     *            command name
-     * @param in
-     *            argin type
-     * @param out
-     *            argout type
-     */
-    // ===============================================================
-    public GetAttributesCountClass(String name, int in, int out) {
-	super(name, in, out);
-    }
-
-    // ===============================================================
-    /**
-     * Constructor for Command class GetAttributesCountClass
-     * 
-     * @param name
-     *            command name
-     * @param in
-     *            argin type
-     * @param in_comments
-     *            argin description
-     * @param out
-     *            argout type
-     * @param out_comments
-     *            argout description
-     */
-    // ===============================================================
-    public GetAttributesCountClass(String name, int in, int out, String in_comments,
-	    String out_comments) {
-	super(name, in, out, in_comments, out_comments);
-    }
-
-    // ===============================================================
-    /**
-     * Constructor for Command class GetAttributesCountClass
-     * 
-     * @param name
-     *            command name
-     * @param in
-     *            argin type
-     * @param in_comments
-     *            argin description
-     * @param out
-     *            argout type
-     * @param out_comments
-     *            argout description
-     * @param level
-     *            The command display type OPERATOR or EXPERT
-     */
-    // ===============================================================
-    public GetAttributesCountClass(String name, int in, int out, String in_comments,
-	    String out_comments, DispLevel level) {
-	super(name, in, out, in_comments, out_comments, level);
-    }
-
-    // ===============================================================
-    /**
-     * return the result of the device's command.
-     */
-    // ===============================================================
-    @Override
-    public Any execute(DeviceImpl device, Any in_any) throws DevFailed {
-	if (!(device instanceof HdbArchivingWatcher)) {
-	    Except.throw_exception("DEVICE_ERROR",
-		    "Device parameter is not instance of HdbArchivingWatcher",
-		    "HdbArchivingWatcher");
-	}
-
-	Util.out2.println("GetAttributesCountClass.execute(): arrived");
-	return this.insert(((HdbArchivingWatcher) (device))
-		.get_current_archiving_attributes_count());
-    }
-
-    // ===============================================================
-    /**
-     * Check if it is allowed to execute the command.
-     */
-    // ===============================================================
-    @Override
-    public boolean is_allowed(DeviceImpl device, Any data_in) {
-	if (device.get_state() == DevState.OFF || device.get_state() == DevState.INIT) {
-	    // End of Generated Code
-
-	    // Re-Start of Generated Code
-	    return false;
-	}
-	return true;
-    }
-}
-// -----------------------------------------------------------------------------
-/*
- * end of $Source:
- * /cvsroot/tango-cs/archiving/server/hdbtdbArchivingServers/src/
- * main/java/HdbArchivingWatcher
- * /Commands/AdminReport/GetAttributesCountClass.java,v $
- */
diff --git a/src/main/java/HdbArchivingWatcher/Commands/AdminReport/GetFeedAliveProgressionClass.java b/src/main/java/HdbArchivingWatcher/Commands/AdminReport/GetFeedAliveProgressionClass.java
deleted file mode 100644
index ab0adc0571f4b1d89dec77e18e1316ddc951deaf..0000000000000000000000000000000000000000
--- a/src/main/java/HdbArchivingWatcher/Commands/AdminReport/GetFeedAliveProgressionClass.java
+++ /dev/null
@@ -1,123 +0,0 @@
-/**
- * @author  $Author$
- * @version $Revision$
- */
-package HdbArchivingWatcher.Commands.AdminReport;
-
-import org.omg.CORBA.Any;
-
-import HdbArchivingWatcher.HdbArchivingWatcher;
-import fr.esrf.Tango.DevFailed;
-import fr.esrf.Tango.DevState;
-import fr.esrf.Tango.DispLevel;
-import fr.esrf.TangoDs.Command;
-import fr.esrf.TangoDs.DeviceImpl;
-import fr.esrf.TangoDs.Except;
-import fr.esrf.TangoDs.TangoConst;
-
-/**
- * Class Description:
- * 
- */
-@Deprecated
-public class GetFeedAliveProgressionClass extends Command implements TangoConst {
-    // ===============================================================
-    /**
-     * Constructor for Command class GetFeedAliveProgressionClass
-     * 
-     * @param name
-     *            command name
-     * @param in
-     *            argin type
-     * @param out
-     *            argout type
-     */
-    // ===============================================================
-    public GetFeedAliveProgressionClass(String name, int in, int out) {
-	super(name, in, out);
-    }
-
-    // ===============================================================
-    /**
-     * Constructor for Command class GetFeedAliveProgressionClass
-     * 
-     * @param name
-     *            command name
-     * @param in
-     *            argin type
-     * @param in_comments
-     *            argin description
-     * @param out
-     *            argout type
-     * @param out_comments
-     *            argout description
-     */
-    // ===============================================================
-    public GetFeedAliveProgressionClass(String name, int in, int out, String in_comments,
-	    String out_comments) {
-	super(name, in, out, in_comments, out_comments);
-    }
-
-    // ===============================================================
-    /**
-     * Constructor for Command class GetFeedAliveProgressionClass
-     * 
-     * @param name
-     *            command name
-     * @param in
-     *            argin type
-     * @param in_comments
-     *            argin description
-     * @param out
-     *            argout type
-     * @param out_comments
-     *            argout description
-     * @param level
-     *            The command display type OPERATOR or EXPERT
-     */
-    // ===============================================================
-    public GetFeedAliveProgressionClass(String name, int in, int out, String in_comments,
-	    String out_comments, DispLevel level) {
-	super(name, in, out, in_comments, out_comments, level);
-    }
-
-    // ===============================================================
-    /**
-     * return the result of the device's command.
-     */
-    // ===============================================================
-    @Override
-    public Any execute(DeviceImpl device, Any in_any) throws DevFailed {
-	// Util.out2.println("GetFeedAliveProgressionClass.execute(): arrived");
-	if (!(device instanceof HdbArchivingWatcher)) {
-	    Except.throw_exception("DEVICE_ERROR",
-		    "Device parameter is not instance of HdbArchivingWatcher",
-		    "HdbArchivingWatcher");
-	}
-
-	return this.insert(((HdbArchivingWatcher) (device)).get_feedalive_progression_level());
-    }
-
-    // ===============================================================
-    /**
-     * Check if it is allowed to execute the command.
-     */
-    // ===============================================================
-    @Override
-    public boolean is_allowed(DeviceImpl device, Any data_in) {
-	if (device.get_state() == DevState.OFF || device.get_state() == DevState.INIT) {
-	    // End of Generated Code
-
-	    // Re-Start of Generated Code
-	    return false;
-	}
-	return true;
-    }
-}
-// -----------------------------------------------------------------------------
-/*
- * end of $Source:
- * /cvsroot/tango-cs/archiving/server/hdbtdbArchivingServers/src/
- * main/java/HdbArchivingWatcher
- * /Commands/AdminReport/GetFeedAliveProgressionClass.java,v $
- */
diff --git a/src/main/java/HdbArchivingWatcher/Commands/AdminReport/GetKOAttributesCountClass.java b/src/main/java/HdbArchivingWatcher/Commands/AdminReport/GetKOAttributesCountClass.java
deleted file mode 100644
index 6106b0ec23df378be1fedbbdba1269fb45e753fc..0000000000000000000000000000000000000000
--- a/src/main/java/HdbArchivingWatcher/Commands/AdminReport/GetKOAttributesCountClass.java
+++ /dev/null
@@ -1,124 +0,0 @@
-/**
- * @author  $Author$
- * @version $Revision$
- */
-package HdbArchivingWatcher.Commands.AdminReport;
-
-import org.omg.CORBA.Any;
-
-import HdbArchivingWatcher.HdbArchivingWatcher;
-import fr.esrf.Tango.DevFailed;
-import fr.esrf.Tango.DevState;
-import fr.esrf.Tango.DispLevel;
-import fr.esrf.TangoDs.Command;
-import fr.esrf.TangoDs.DeviceImpl;
-import fr.esrf.TangoDs.Except;
-import fr.esrf.TangoDs.TangoConst;
-import fr.esrf.TangoDs.Util;
-
-/**
- * Class Description:
- * 
- */
-@Deprecated
-public class GetKOAttributesCountClass extends Command implements TangoConst {
-    // ===============================================================
-    /**
-     * Constructor for Command class GetKOAttributesCountClass
-     * 
-     * @param name
-     *            command name
-     * @param in
-     *            argin type
-     * @param out
-     *            argout type
-     */
-    // ===============================================================
-    public GetKOAttributesCountClass(String name, int in, int out) {
-	super(name, in, out);
-    }
-
-    // ===============================================================
-    /**
-     * Constructor for Command class GetKOAttributesCountClass
-     * 
-     * @param name
-     *            command name
-     * @param in
-     *            argin type
-     * @param in_comments
-     *            argin description
-     * @param out
-     *            argout type
-     * @param out_comments
-     *            argout description
-     */
-    // ===============================================================
-    public GetKOAttributesCountClass(String name, int in, int out, String in_comments,
-	    String out_comments) {
-	super(name, in, out, in_comments, out_comments);
-    }
-
-    // ===============================================================
-    /**
-     * Constructor for Command class GetKOAttributesCountClass
-     * 
-     * @param name
-     *            command name
-     * @param in
-     *            argin type
-     * @param in_comments
-     *            argin description
-     * @param out
-     *            argout type
-     * @param out_comments
-     *            argout description
-     * @param level
-     *            The command display type OPERATOR or EXPERT
-     */
-    // ===============================================================
-    public GetKOAttributesCountClass(String name, int in, int out, String in_comments,
-	    String out_comments, DispLevel level) {
-	super(name, in, out, in_comments, out_comments, level);
-    }
-
-    // ===============================================================
-    /**
-     * return the result of the device's command.
-     */
-    // ===============================================================
-    @Override
-    public Any execute(DeviceImpl device, Any in_any) throws DevFailed {
-	Util.out2.println("GetKOAttributesCountClass.execute(): arrived");
-	if (!(device instanceof HdbArchivingWatcher)) {
-	    Except.throw_exception("DEVICE_ERROR",
-		    "Device parameter is not instance of HdbArchivingWatcher",
-		    "HdbArchivingWatcher");
-	}
-
-	return this.insert(((HdbArchivingWatcher) (device)).get_ko_attributes_count());
-    }
-
-    // ===============================================================
-    /**
-     * Check if it is allowed to execute the command.
-     */
-    // ===============================================================
-    @Override
-    public boolean is_allowed(DeviceImpl device, Any data_in) {
-	if (device.get_state() == DevState.OFF || device.get_state() == DevState.INIT) {
-	    // End of Generated Code
-
-	    // Re-Start of Generated Code
-	    return false;
-	}
-	return true;
-    }
-}
-// -----------------------------------------------------------------------------
-/*
- * end of $Source:
- * /cvsroot/tango-cs/archiving/server/hdbtdbArchivingServers/src/
- * main/java/HdbArchivingWatcher
- * /Commands/AdminReport/GetKOAttributesCountClass.java,v $
- */
diff --git a/src/main/java/HdbArchivingWatcher/Commands/AdminReport/GetKoCountByDeviceClass.java b/src/main/java/HdbArchivingWatcher/Commands/AdminReport/GetKoCountByDeviceClass.java
deleted file mode 100644
index 207488db4365998e9e323353f061a9a648dbd236..0000000000000000000000000000000000000000
--- a/src/main/java/HdbArchivingWatcher/Commands/AdminReport/GetKoCountByDeviceClass.java
+++ /dev/null
@@ -1,124 +0,0 @@
-/**
- * @author  $Author$
- * @version $Revision$
- */
-package HdbArchivingWatcher.Commands.AdminReport;
-
-import org.omg.CORBA.Any;
-
-import HdbArchivingWatcher.HdbArchivingWatcher;
-import fr.esrf.Tango.DevFailed;
-import fr.esrf.Tango.DevState;
-import fr.esrf.Tango.DispLevel;
-import fr.esrf.TangoDs.Command;
-import fr.esrf.TangoDs.DeviceImpl;
-import fr.esrf.TangoDs.Except;
-import fr.esrf.TangoDs.TangoConst;
-import fr.esrf.TangoDs.Util;
-
-/**
- * Class Description:
- * 
- */
-@Deprecated
-public class GetKoCountByDeviceClass extends Command implements TangoConst {
-    // ===============================================================
-    /**
-     * Constructor for Command class GetKoCountByDeviceClass
-     * 
-     * @param name
-     *            command name
-     * @param in
-     *            argin type
-     * @param out
-     *            argout type
-     */
-    // ===============================================================
-    public GetKoCountByDeviceClass(String name, int in, int out) {
-	super(name, in, out);
-    }
-
-    // ===============================================================
-    /**
-     * Constructor for Command class GetKoCountByDeviceClass
-     * 
-     * @param name
-     *            command name
-     * @param in
-     *            argin type
-     * @param in_comments
-     *            argin description
-     * @param out
-     *            argout type
-     * @param out_comments
-     *            argout description
-     */
-    // ===============================================================
-    public GetKoCountByDeviceClass(String name, int in, int out, String in_comments,
-	    String out_comments) {
-	super(name, in, out, in_comments, out_comments);
-    }
-
-    // ===============================================================
-    /**
-     * Constructor for Command class GetKoCountByDeviceClass
-     * 
-     * @param name
-     *            command name
-     * @param in
-     *            argin type
-     * @param in_comments
-     *            argin description
-     * @param out
-     *            argout type
-     * @param out_comments
-     *            argout description
-     * @param level
-     *            The command display type OPERATOR or EXPERT
-     */
-    // ===============================================================
-    public GetKoCountByDeviceClass(String name, int in, int out, String in_comments,
-	    String out_comments, DispLevel level) {
-	super(name, in, out, in_comments, out_comments, level);
-    }
-
-    // ===============================================================
-    /**
-     * return the result of the device's command.
-     */
-    // ===============================================================
-    @Override
-    public Any execute(DeviceImpl device, Any in_any) throws DevFailed {
-	Util.out2.println("GetKoCountByDeviceClass.execute(): arrived");
-	if (!(device instanceof HdbArchivingWatcher)) {
-	    Except.throw_exception("DEVICE_ERROR",
-		    "Device parameter is not instance of HdbArchivingWatcher",
-		    "HdbArchivingWatcher");
-	}
-
-	return this.insert(((HdbArchivingWatcher) (device)).get_ko_attributes_count_by_device());
-    }
-
-    // ===============================================================
-    /**
-     * Check if it is allowed to execute the command.
-     */
-    // ===============================================================
-    @Override
-    public boolean is_allowed(DeviceImpl device, Any data_in) {
-	if (device.get_state() == DevState.OFF || device.get_state() == DevState.INIT) {
-	    // End of Generated Code
-
-	    // Re-Start of Generated Code
-	    return false;
-	}
-	return true;
-    }
-}
-// -----------------------------------------------------------------------------
-/*
- * end of $Source:
- * /cvsroot/tango-cs/archiving/server/hdbtdbArchivingServers/src/
- * main/java/HdbArchivingWatcher
- * /Commands/AdminReport/GetKoCountByDeviceClass.java,v $
- */
diff --git a/src/main/java/HdbArchivingWatcher/Commands/AdminReport/GetListOfJobErrorsClass.java b/src/main/java/HdbArchivingWatcher/Commands/AdminReport/GetListOfJobErrorsClass.java
deleted file mode 100644
index 21513bc27fed699dd847d514c238056c504ae2d3..0000000000000000000000000000000000000000
--- a/src/main/java/HdbArchivingWatcher/Commands/AdminReport/GetListOfJobErrorsClass.java
+++ /dev/null
@@ -1,124 +0,0 @@
-/**
- * @author  $Author$
- * @version $Revision$
- */
-package HdbArchivingWatcher.Commands.AdminReport;
-
-import org.omg.CORBA.Any;
-
-import HdbArchivingWatcher.HdbArchivingWatcher;
-import fr.esrf.Tango.DevFailed;
-import fr.esrf.Tango.DevState;
-import fr.esrf.Tango.DispLevel;
-import fr.esrf.TangoDs.Command;
-import fr.esrf.TangoDs.DeviceImpl;
-import fr.esrf.TangoDs.Except;
-import fr.esrf.TangoDs.TangoConst;
-import fr.esrf.TangoDs.Util;
-
-/**
- * Class Description:
- * 
- */
-@Deprecated
-public class GetListOfJobErrorsClass extends Command implements TangoConst {
-    // ===============================================================
-    /**
-     * Constructor for Command class GetListOfJobErrorsClass
-     * 
-     * @param name
-     *            command name
-     * @param in
-     *            argin type
-     * @param out
-     *            argout type
-     */
-    // ===============================================================
-    public GetListOfJobErrorsClass(String name, int in, int out) {
-	super(name, in, out);
-    }
-
-    // ===============================================================
-    /**
-     * Constructor for Command class GetListOfJobErrorsClass
-     * 
-     * @param name
-     *            command name
-     * @param in
-     *            argin type
-     * @param in_comments
-     *            argin description
-     * @param out
-     *            argout type
-     * @param out_comments
-     *            argout description
-     */
-    // ===============================================================
-    public GetListOfJobErrorsClass(String name, int in, int out, String in_comments,
-	    String out_comments) {
-	super(name, in, out, in_comments, out_comments);
-    }
-
-    // ===============================================================
-    /**
-     * Constructor for Command class GetListOfJobErrorsClass
-     * 
-     * @param name
-     *            command name
-     * @param in
-     *            argin type
-     * @param in_comments
-     *            argin description
-     * @param out
-     *            argout type
-     * @param out_comments
-     *            argout description
-     * @param level
-     *            The command display type OPERATOR or EXPERT
-     */
-    // ===============================================================
-    public GetListOfJobErrorsClass(String name, int in, int out, String in_comments,
-	    String out_comments, DispLevel level) {
-	super(name, in, out, in_comments, out_comments, level);
-    }
-
-    // ===============================================================
-    /**
-     * return the result of the device's command.
-     */
-    // ===============================================================
-    @Override
-    public Any execute(DeviceImpl device, Any in_any) throws DevFailed {
-	Util.out2.println("GetListOfJobErrorsClass.execute(): arrived");
-	if (!(device instanceof HdbArchivingWatcher)) {
-	    Except.throw_exception("DEVICE_ERROR",
-		    "Device parameter is not instance of HdbArchivingWatcher",
-		    "HdbArchivingWatcher");
-	}
-
-	return this.insert(((HdbArchivingWatcher) (device)).get_job_errors());
-    }
-
-    // ===============================================================
-    /**
-     * Check if it is allowed to execute the command.
-     */
-    // ===============================================================
-    @Override
-    public boolean is_allowed(DeviceImpl device, Any data_in) {
-	if (device.get_state() == DevState.OFF || device.get_state() == DevState.INIT) {
-	    // End of Generated Code
-
-	    // Re-Start of Generated Code
-	    return false;
-	}
-	return true;
-    }
-}
-// -----------------------------------------------------------------------------
-/*
- * end of $Source:
- * /cvsroot/tango-cs/archiving/server/hdbtdbArchivingServers/src/
- * main/java/HdbArchivingWatcher
- * /Commands/AdminReport/GetListOfJobErrorsClass.java,v $
- */
diff --git a/src/main/java/HdbArchivingWatcher/Commands/AdminReport/GetListOfJobStatusClass.java b/src/main/java/HdbArchivingWatcher/Commands/AdminReport/GetListOfJobStatusClass.java
deleted file mode 100644
index 00b989e2e45b35a58c87288e2900bbc2621e91ba..0000000000000000000000000000000000000000
--- a/src/main/java/HdbArchivingWatcher/Commands/AdminReport/GetListOfJobStatusClass.java
+++ /dev/null
@@ -1,124 +0,0 @@
-/**
- * @author  $Author$
- * @version $Revision$
- */
-package HdbArchivingWatcher.Commands.AdminReport;
-
-import org.omg.CORBA.Any;
-
-import HdbArchivingWatcher.HdbArchivingWatcher;
-import fr.esrf.Tango.DevFailed;
-import fr.esrf.Tango.DevState;
-import fr.esrf.Tango.DispLevel;
-import fr.esrf.TangoDs.Command;
-import fr.esrf.TangoDs.DeviceImpl;
-import fr.esrf.TangoDs.Except;
-import fr.esrf.TangoDs.TangoConst;
-import fr.esrf.TangoDs.Util;
-
-/**
- * Class Description:
- * 
- */
-@Deprecated
-public class GetListOfJobStatusClass extends Command implements TangoConst {
-    // ===============================================================
-    /**
-     * Constructor for Command class GetListOfJobStatusClass
-     * 
-     * @param name
-     *            command name
-     * @param in
-     *            argin type
-     * @param out
-     *            argout type
-     */
-    // ===============================================================
-    public GetListOfJobStatusClass(String name, int in, int out) {
-	super(name, in, out);
-    }
-
-    // ===============================================================
-    /**
-     * Constructor for Command class GetListOfJobStatusClass
-     * 
-     * @param name
-     *            command name
-     * @param in
-     *            argin type
-     * @param in_comments
-     *            argin description
-     * @param out
-     *            argout type
-     * @param out_comments
-     *            argout description
-     */
-    // ===============================================================
-    public GetListOfJobStatusClass(String name, int in, int out, String in_comments,
-	    String out_comments) {
-	super(name, in, out, in_comments, out_comments);
-    }
-
-    // ===============================================================
-    /**
-     * Constructor for Command class GetListOfJobStatusClass
-     * 
-     * @param name
-     *            command name
-     * @param in
-     *            argin type
-     * @param in_comments
-     *            argin description
-     * @param out
-     *            argout type
-     * @param out_comments
-     *            argout description
-     * @param level
-     *            The command display type OPERATOR or EXPERT
-     */
-    // ===============================================================
-    public GetListOfJobStatusClass(String name, int in, int out, String in_comments,
-	    String out_comments, DispLevel level) {
-	super(name, in, out, in_comments, out_comments, level);
-    }
-
-    // ===============================================================
-    /**
-     * return the result of the device's command.
-     */
-    // ===============================================================
-    @Override
-    public Any execute(DeviceImpl device, Any in_any) throws DevFailed {
-	Util.out2.println("GetListOfJobStatusClass.execute(): arrived");
-	if (!(device instanceof HdbArchivingWatcher)) {
-	    Except.throw_exception("DEVICE_ERROR",
-		    "Device parameter is not instance of HdbArchivingWatcher",
-		    "HdbArchivingWatcher");
-	}
-
-	return this.insert(((HdbArchivingWatcher) (device)).get_job_status());
-    }
-
-    // ===============================================================
-    /**
-     * Check if it is allowed to execute the command.
-     */
-    // ===============================================================
-    @Override
-    public boolean is_allowed(DeviceImpl device, Any data_in) {
-	if (device.get_state() == DevState.OFF || device.get_state() == DevState.INIT) {
-	    // End of Generated Code
-
-	    // Re-Start of Generated Code
-	    return false;
-	}
-	return true;
-    }
-}
-// -----------------------------------------------------------------------------
-/*
- * end of $Source:
- * /cvsroot/tango-cs/archiving/server/hdbtdbArchivingServers/src/
- * main/java/HdbArchivingWatcher
- * /Commands/AdminReport/GetListOfJobStatusClass.java,v $
- */
diff --git a/src/main/java/HdbArchivingWatcher/Commands/AdminReport/GetListOfKOAttributesClass.java b/src/main/java/HdbArchivingWatcher/Commands/AdminReport/GetListOfKOAttributesClass.java
deleted file mode 100644
index 0cfded1102c426ffbebfd2d002e9ce75aa97b85d..0000000000000000000000000000000000000000
--- a/src/main/java/HdbArchivingWatcher/Commands/AdminReport/GetListOfKOAttributesClass.java
+++ /dev/null
@@ -1,124 +0,0 @@
-/**
- * @author  $Author$
- * @version $Revision$
- */
-package HdbArchivingWatcher.Commands.AdminReport;
-
-import org.omg.CORBA.Any;
-
-import HdbArchivingWatcher.HdbArchivingWatcher;
-import fr.esrf.Tango.DevFailed;
-import fr.esrf.Tango.DevState;
-import fr.esrf.Tango.DispLevel;
-import fr.esrf.TangoDs.Command;
-import fr.esrf.TangoDs.DeviceImpl;
-import fr.esrf.TangoDs.Except;
-import fr.esrf.TangoDs.TangoConst;
-import fr.esrf.TangoDs.Util;
-
-/**
- * Class Description:
- * 
- */
-@Deprecated
-public class GetListOfKOAttributesClass extends Command implements TangoConst {
-    // ===============================================================
-    /**
-     * Constructor for Command class GetListOfKOAttributesClass
-     * 
-     * @param name
-     *            command name
-     * @param in
-     *            argin type
-     * @param out
-     *            argout type
-     */
-    // ===============================================================
-    public GetListOfKOAttributesClass(String name, int in, int out) {
-	super(name, in, out);
-    }
-
-    // ===============================================================
-    /**
-     * Constructor for Command class GetListOfKOAttributesClass
-     * 
-     * @param name
-     *            command name
-     * @param in
-     *            argin type
-     * @param in_comments
-     *            argin description
-     * @param out
-     *            argout type
-     * @param out_comments
-     *            argout description
-     */
-    // ===============================================================
-    public GetListOfKOAttributesClass(String name, int in, int out, String in_comments,
-	    String out_comments) {
-	super(name, in, out, in_comments, out_comments);
-    }
-
-    // ===============================================================
-    /**
-     * Constructor for Command class GetListOfKOAttributesClass
-     * 
-     * @param name
-     *            command name
-     * @param in
-     *            argin type
-     * @param in_comments
-     *            argin description
-     * @param out
-     *            argout type
-     * @param out_comments
-     *            argout description
-     * @param level
-     *            The command display type OPERATOR or EXPERT
-     */
-    // ===============================================================
-    public GetListOfKOAttributesClass(String name, int in, int out, String in_comments,
-	    String out_comments, DispLevel level) {
-	super(name, in, out, in_comments, out_comments, level);
-    }
-
-    // ===============================================================
-    /**
-     * return the result of the device's command.
-     */
-    // ===============================================================
-    @Override
-    public Any execute(DeviceImpl device, Any in_any) throws DevFailed {
-	Util.out2.println("GetListOfKOAttributesClass.execute(): arrived");
-	if (!(device instanceof HdbArchivingWatcher)) {
-	    Except.throw_exception("DEVICE_ERROR",
-		    "Device parameter is not instance of HdbArchivingWatcher",
-		    "HdbArchivingWatcher");
-	}
-
-	return this.insert(((HdbArchivingWatcher) (device)).get_ko_attributes());
-    }
-
-    // ===============================================================
-    /**
-     * Check if it is allowed to execute the command.
-     */
-    // ===============================================================
-    @Override
-    public boolean is_allowed(DeviceImpl device, Any data_in) {
-	if (device.get_state() == DevState.OFF || device.get_state() == DevState.INIT) {
-	    // End of Generated Code
-
-	    // Re-Start of Generated Code
-	    return false;
-	}
-	return true;
-    }
-}
-// -----------------------------------------------------------------------------
-/*
- * end of $Source:
- * /cvsroot/tango-cs/archiving/server/hdbtdbArchivingServers/src/
- * main/java/HdbArchivingWatcher
- * /Commands/AdminReport/GetListOfKOAttributesClass.java,v $
- */
diff --git a/src/main/java/HdbArchivingWatcher/Commands/AdminReport/GetListOfPartitionsClass.java b/src/main/java/HdbArchivingWatcher/Commands/AdminReport/GetListOfPartitionsClass.java
deleted file mode 100644
index 3db5fd21caa37a6973cf1e8393a64e3d19d31ec5..0000000000000000000000000000000000000000
--- a/src/main/java/HdbArchivingWatcher/Commands/AdminReport/GetListOfPartitionsClass.java
+++ /dev/null
@@ -1,123 +0,0 @@
-/**
- * @author  $Author$
- * @version $Revision$
- */
-package HdbArchivingWatcher.Commands.AdminReport;
-
-import org.omg.CORBA.Any;
-
-import HdbArchivingWatcher.HdbArchivingWatcher;
-import fr.esrf.Tango.DevFailed;
-import fr.esrf.Tango.DevState;
-import fr.esrf.Tango.DispLevel;
-import fr.esrf.TangoDs.Command;
-import fr.esrf.TangoDs.DeviceImpl;
-import fr.esrf.TangoDs.Except;
-import fr.esrf.TangoDs.TangoConst;
-import fr.esrf.TangoDs.Util;
-
-/**
- * Class Description:
- * 
- */
-@Deprecated
-public class GetListOfPartitionsClass extends Command implements TangoConst {
-    // ===============================================================
-    /**
-     * Constructor for Command class GetListOfPartitionsClass
-     * 
-     * @param name
-     *            command name
-     * @param in
-     *            argin type
-     * @param out
-     *            argout type
-     */
-    // ===============================================================
-    public GetListOfPartitionsClass(String name, int in, int out) {
-	super(name, in, out);
-    }
-
-    // ===============================================================
-    /**
-     * Constructor for Command class GetListOfPartitionsClass
-     * 
-     * @param name
-     *            command name
-     * @param in
-     *            argin type
-     * @param in_comments
-     *            argin description
-     * @param out
-     *            argout type
-     * @param out_comments
-     *            argout description
-     */
-    // ===============================================================
-    public GetListOfPartitionsClass(String name, int in, int out, String in_comments,
-	    String out_comments) {
-	super(name, in, out, in_comments, out_comments);
-    }
-
-    // ===============================================================
-    /**
-     * Constructor for Command class GetListOfPartitionsClass
-     * 
-     * @param name
-     *            command name
-     * @param in
-     *            argin type
-     * @param in_comments
-     *            argin description
-     * @param out
-     *            argout type
-     * @param out_comments
-     *            argout description
-     * @param level
-     *            The command display type OPERATOR or EXPERT
-     */
-    // ===============================================================
-    public GetListOfPartitionsClass(String name, int in, int out, String in_comments,
-	    String out_comments, DispLevel level) {
-	super(name, in, out, in_comments, out_comments, level);
-    }
-
-    // ===============================================================
-    /**
-     * return the result of the device's command.
-     */
-    // ===============================================================
-    @Override
-    public Any execute(DeviceImpl device, Any in_any) throws DevFailed {
-	Util.out2.println("GetListOfPartitionsClass.execute(): arrived");
-	if (!(device instanceof HdbArchivingWatcher)) {
-	    Except.throw_exception("DEVICE_ERROR",
-		    "Device parameter is not instance of HdbArchivingWatcher",
-		    "HdbArchivingWatcher");
-	}
-	return this.insert(((HdbArchivingWatcher) (device)).get_partitions());
-    }
-
-    // ===============================================================
-    /**
-     * Check if it is allowed to execute the command.
-     */
-    // ===============================================================
-    @Override
-    public boolean is_allowed(DeviceImpl device, Any data_in) {
-	if (device.get_state() == DevState.OFF || device.get_state() == DevState.INIT) {
-	    // End of Generated Code
-
-	    // Re-Start of Generated Code
-	    return false;
-	}
-	return true;
-    }
-}
-// -----------------------------------------------------------------------------
-/*
- * end of $Source:
- * /cvsroot/tango-cs/archiving/server/hdbtdbArchivingServers/src/
- * main/java/HdbArchivingWatcher
- * /Commands/AdminReport/GetListOfPartitionsClass.java,v $
- */
diff --git a/src/main/java/HdbArchivingWatcher/Commands/AdminReport/GetOKAttributesCountClass.java b/src/main/java/HdbArchivingWatcher/Commands/AdminReport/GetOKAttributesCountClass.java
deleted file mode 100644
index c003aadb6e9a816bdf62bc6403131efd682bfdd2..0000000000000000000000000000000000000000
--- a/src/main/java/HdbArchivingWatcher/Commands/AdminReport/GetOKAttributesCountClass.java
+++ /dev/null
@@ -1,124 +0,0 @@
-/**
- * @author  $Author$
- * @version $Revision$
- */
-package HdbArchivingWatcher.Commands.AdminReport;
-
-import org.omg.CORBA.Any;
-
-import HdbArchivingWatcher.HdbArchivingWatcher;
-import fr.esrf.Tango.DevFailed;
-import fr.esrf.Tango.DevState;
-import fr.esrf.Tango.DispLevel;
-import fr.esrf.TangoDs.Command;
-import fr.esrf.TangoDs.DeviceImpl;
-import fr.esrf.TangoDs.Except;
-import fr.esrf.TangoDs.TangoConst;
-import fr.esrf.TangoDs.Util;
-
-/**
- * Class Description:
- * 
- */
-@Deprecated
-public class GetOKAttributesCountClass extends Command implements TangoConst {
-    // ===============================================================
-    /**
-     * Constructor for Command class GetOKAttributesCountClass
-     * 
-     * @param name
-     *            command name
-     * @param in
-     *            argin type
-     * @param out
-     *            argout type
-     */
-    // ===============================================================
-    public GetOKAttributesCountClass(String name, int in, int out) {
-	super(name, in, out);
-    }
-
-    // ===============================================================
-    /**
-     * Constructor for Command class GetOKAttributesCountClass
-     * 
-     * @param name
-     *            command name
-     * @param in
-     *            argin type
-     * @param in_comments
-     *            argin description
-     * @param out
-     *            argout type
-     * @param out_comments
-     *            argout description
-     */
-    // ===============================================================
-    public GetOKAttributesCountClass(String name, int in, int out, String in_comments,
-	    String out_comments) {
-	super(name, in, out, in_comments, out_comments);
-    }
-
-    // ===============================================================
-    /**
-     * Constructor for Command class GetOKAttributesCountClass
-     * 
-     * @param name
-     *            command name
-     * @param in
-     *            argin type
-     * @param in_comments
-     *            argin description
-     * @param out
-     *            argout type
-     * @param out_comments
-     *            argout description
-     * @param level
-     *            The command display type OPERATOR or EXPERT
-     */
-    // ===============================================================
-    public GetOKAttributesCountClass(String name, int in, int out, String in_comments,
-	    String out_comments, DispLevel level) {
-	super(name, in, out, in_comments, out_comments, level);
-    }
-
-    // ===============================================================
-    /**
-     * return the result of the device's command.
-     */
-    // ===============================================================
-    @Override
-    public Any execute(DeviceImpl device, Any in_any) throws DevFailed {
-	Util.out2.println("GetOKAttributesCountClass.execute(): arrived");
-	if (!(device instanceof HdbArchivingWatcher)) {
-	    Except.throw_exception("DEVICE_ERROR",
-		    "Device parameter is not instance of HdbArchivingWatcher",
-		    "HdbArchivingWatcher");
-	}
-
-	return this.insert(((HdbArchivingWatcher) (device)).get_ok_attributes_count());
-    }
-
-    // ===============================================================
-    /**
-     * Check if it is allowed to execute the command.
-     */
-    // ===============================================================
-    @Override
-    public boolean is_allowed(DeviceImpl device, Any data_in) {
-	if (device.get_state() == DevState.OFF || device.get_state() == DevState.INIT) {
-	    // End of Generated Code
-
-	    // Re-Start of Generated Code
-	    return false;
-	}
-	return true;
-    }
-}
-// -----------------------------------------------------------------------------
-/*
- * end of $Source:
- * /cvsroot/tango-cs/archiving/server/hdbtdbArchivingServers/src/
- * main/java/HdbArchivingWatcher
- * /Commands/AdminReport/GetOKAttributesCountClass.java,v $
- */
diff --git a/src/main/java/HdbArchivingWatcher/Commands/AdminReport/StartArchivingReportClass.java b/src/main/java/HdbArchivingWatcher/Commands/AdminReport/StartArchivingReportClass.java
deleted file mode 100644
index 9196e880d41a58ab075d0eb5475507802f2cb512..0000000000000000000000000000000000000000
--- a/src/main/java/HdbArchivingWatcher/Commands/AdminReport/StartArchivingReportClass.java
+++ /dev/null
@@ -1,125 +0,0 @@
-/**
- * @author  $Author$
- * @version $Revision$
- */
-package HdbArchivingWatcher.Commands.AdminReport;
-
-import org.omg.CORBA.Any;
-
-import HdbArchivingWatcher.HdbArchivingWatcher;
-import fr.esrf.Tango.DevFailed;
-import fr.esrf.Tango.DevState;
-import fr.esrf.Tango.DispLevel;
-import fr.esrf.TangoDs.Command;
-import fr.esrf.TangoDs.DeviceImpl;
-import fr.esrf.TangoDs.Except;
-import fr.esrf.TangoDs.TangoConst;
-import fr.esrf.TangoDs.Util;
-
-/**
- * Class Description:
- * 
- */
-@Deprecated
-public class StartArchivingReportClass extends Command implements TangoConst {
-    // ===============================================================
-    /**
-     * Constructor for Command class ArchivingReportClass
-     * 
-     * @param name
-     *            command name
-     * @param in
-     *            argin type
-     * @param out
-     *            argout type
-     */
-    // ===============================================================
-    public StartArchivingReportClass(String name, int in, int out) {
-	super(name, in, out);
-    }
-
-    // ===============================================================
-    /**
-     * Constructor for Command class ArchivingReportClass
-     * 
-     * @param name
-     *            command name
-     * @param in
-     *            argin type
-     * @param in_comments
-     *            argin description
-     * @param out
-     *            argout type
-     * @param out_comments
-     *            argout description
-     */
-    // ===============================================================
-    public StartArchivingReportClass(String name, int in, int out, String in_comments,
-	    String out_comments) {
-	super(name, in, out, in_comments, out_comments);
-    }
-
-    // ===============================================================
-    /**
-     * Constructor for Command class ArchivingReportClass
-     * 
-     * @param name
-     *            command name
-     * @param in
-     *            argin type
-     * @param in_comments
-     *            argin description
-     * @param out
-     *            argout type
-     * @param out_comments
-     *            argout description
-     * @param level
-     *            The command display type OPERATOR or EXPERT
-     */
-    // ===============================================================
-    public StartArchivingReportClass(String name, int in, int out, String in_comments,
-	    String out_comments, DispLevel level) {
-	super(name, in, out, in_comments, out_comments, level);
-    }
-
-    // ===============================================================
-    /**
-     * return the result of the device's command.
-     */
-    // ===============================================================
-    @Override
-    public Any execute(DeviceImpl device, Any in_any) throws DevFailed {
-	Util.out2.println("ArchivingReportClass.execute(): arrived");
-	if (!(device instanceof HdbArchivingWatcher)) {
-	    Except.throw_exception("DEVICE_ERROR",
-		    "Device parameter is not instance of HdbArchivingWatcher",
-		    "HdbArchivingWatcher");
-	}
-
-	((HdbArchivingWatcher) (device)).start_archiving_report();
-	return this.insert();
-    }
-
-    // ===============================================================
-    /**
-     * Check if it is allowed to execute the command.
-     */
-    // ===============================================================
-    @Override
-    public boolean is_allowed(DeviceImpl device, Any data_in) {
-	if (device.get_state() == DevState.OFF || device.get_state() == DevState.INIT) {
-	    // End of Generated Code
-
-	    // Re-Start of Generated Code
-	    return false;
-	}
-	return true;
-    }
-}
-// -----------------------------------------------------------------------------
-/*
- * end of $Source:
- * /cvsroot/tango-cs/archiving/server/hdbtdbArchivingServers/src/
- * main/java/HdbArchivingWatcher
- * /Commands/AdminReport/StartArchivingReportClass.java,v $
- */
diff --git a/src/main/java/HdbArchivingWatcher/Commands/GetAllArchivingAttributesClass.java b/src/main/java/HdbArchivingWatcher/Commands/GetAllArchivingAttributesClass.java
deleted file mode 100644
index b04c51b38dc9d713b552b8aeed7cd24de3b556fd..0000000000000000000000000000000000000000
--- a/src/main/java/HdbArchivingWatcher/Commands/GetAllArchivingAttributesClass.java
+++ /dev/null
@@ -1,125 +0,0 @@
-/**
- * @author  $Author$
- * @version $Revision$
- */
-package HdbArchivingWatcher.Commands;
-
-import org.omg.CORBA.Any;
-
-import HdbArchivingWatcher.HdbArchivingWatcher;
-import fr.esrf.Tango.DevFailed;
-import fr.esrf.Tango.DevState;
-import fr.esrf.Tango.DispLevel;
-import fr.esrf.TangoDs.Command;
-import fr.esrf.TangoDs.DeviceImpl;
-import fr.esrf.TangoDs.Except;
-import fr.esrf.TangoDs.TangoConst;
-import fr.esrf.TangoDs.Util;
-
-/**
- * Class Description:
- * 
- */
-@Deprecated
-public class GetAllArchivingAttributesClass extends Command implements TangoConst {
-    // ===============================================================
-    /**
-     * Constructor for Command class GetErrorDomainsCurrentClass
-     * 
-     * @param name
-     *            command name
-     * @param in
-     *            argin type
-     * @param out
-     *            argout type
-     */
-    // ===============================================================
-    public GetAllArchivingAttributesClass(String name, int in, int out) {
-	super(name, in, out);
-    }
-
-    // ===============================================================
-    /**
-     * Constructor for Command class GetErrorDomainsCurrentClass
-     * 
-     * @param name
-     *            command name
-     * @param in
-     *            argin type
-     * @param in_comments
-     *            argin description
-     * @param out
-     *            argout type
-     * @param out_comments
-     *            argout description
-     */
-    // ===============================================================
-    public GetAllArchivingAttributesClass(String name, int in, int out, String in_comments,
-	    String out_comments) {
-	super(name, in, out, in_comments, out_comments);
-    }
-
-    // ===============================================================
-    /**
-     * Constructor for Command class GetErrorDomainsCurrentClass
-     * 
-     * @param name
-     *            command name
-     * @param in
-     *            argin type
-     * @param in_comments
-     *            argin description
-     * @param out
-     *            argout type
-     * @param out_comments
-     *            argout description
-     * @param level
-     *            The command display type OPERATOR or EXPERT
-     */
-    // ===============================================================
-    public GetAllArchivingAttributesClass(String name, int in, int out, String in_comments,
-	    String out_comments, DispLevel level) {
-	super(name, in, out, in_comments, out_comments, level);
-    }
-
-    // ===============================================================
-    /**
-     * return the result of the device's command.
-     */
-    // ===============================================================
-    @Override
-    public Any execute(DeviceImpl device, Any in_any) throws DevFailed {
-
-	Util.out2.println("GetAllArchivingAttributesClass.execute(): arrived");
-	if (!(device instanceof HdbArchivingWatcher)) {
-	    Except.throw_exception("DEVICE_ERROR",
-		    "Device parameter is not instance of HdbArchivingWatcher",
-		    "HdbArchivingWatcher");
-	}
-
-	return this.insert(((HdbArchivingWatcher) (device)).get_all_archiving_attributes());
-    }
-
-    // ===============================================================
-    /**
-     * Check if it is allowed to execute the command.
-     */
-    // ===============================================================
-    @Override
-    public boolean is_allowed(DeviceImpl device, Any data_in) {
-	if (device.get_state() == DevState.OFF || device.get_state() == DevState.INIT) {
-	    // End of Generated Code
-
-	    // Re-Start of Generated Code
-	    return false;
-	}
-	return true;
-    }
-}
-// -----------------------------------------------------------------------------
-/*
- * end of $Source:
- * /cvsroot/tango-cs/archiving/server/hdbtdbArchivingServers/src/
- * main/java/HdbArchivingWatcher/Commands/GetAllArchivingAttributesClass.java,v
- * $
- */
diff --git a/src/main/java/HdbArchivingWatcher/Commands/GetErrorArchiversCurrentClass.java b/src/main/java/HdbArchivingWatcher/Commands/GetErrorArchiversCurrentClass.java
deleted file mode 100644
index a0e82a397e5e43b815824d9368484edb610ecfef..0000000000000000000000000000000000000000
--- a/src/main/java/HdbArchivingWatcher/Commands/GetErrorArchiversCurrentClass.java
+++ /dev/null
@@ -1,161 +0,0 @@
-//+======================================================================
-// $Source$
-//
-// Project:      Tango Device Server
-//
-// Description:  Java source code for the command TemplateClass of the
-//               ArchivingWatcher class.
-//
-// $Author$
-//
-// $Revision$
-//
-// $Log$
-// Revision 1.2  2009/12/17 12:47:15  pierrejoseph
-// CheckStyle:  Organize imports / Format
-//
-// Revision 1.1  2009/08/28 14:27:59  soleilarc
-// add and organize admin report commands to the watcher devices
-//
-// Revision 1.1  2006/08/24 13:51:57  ounsy
-// creation
-//
-// Revision 1.1  2006/01/19 16:36:59  ounsy
-// New device specialised in watching archiving.
-//
-//
-// copyleft :    European Synchrotron Radiation Facility
-//               BP 220, Grenoble 38043
-//               FRANCE
-//
-//-======================================================================
-//
-//  		This file is generated by POGO
-//	(Program Obviously used to Generate tango Object)
-//
-//         (c) - Software Engineering Group - ESRF
-//=============================================================================
-
-/**
- * @author	$Author$
- * @version	$Revision$
- */
-package HdbArchivingWatcher.Commands;
-
-import org.omg.CORBA.Any;
-
-import HdbArchivingWatcher.HdbArchivingWatcher;
-import fr.esrf.Tango.DevFailed;
-import fr.esrf.Tango.DevState;
-import fr.esrf.Tango.DispLevel;
-import fr.esrf.TangoDs.Command;
-import fr.esrf.TangoDs.DeviceImpl;
-import fr.esrf.TangoDs.Except;
-import fr.esrf.TangoDs.TangoConst;
-import fr.esrf.TangoDs.Util;
-
-/**
- * Class Description:
- * 
- */
-@Deprecated
-public class GetErrorArchiversCurrentClass extends Command implements TangoConst {
-    // ===============================================================
-    /**
-     * Constructor for Command class GetErrorArchiversCurrentClass
-     * 
-     * @param name
-     *            command name
-     * @param in
-     *            argin type
-     * @param out
-     *            argout type
-     */
-    // ===============================================================
-    public GetErrorArchiversCurrentClass(String name, int in, int out) {
-	super(name, in, out);
-    }
-
-    // ===============================================================
-    /**
-     * Constructor for Command class GetErrorArchiversCurrentClass
-     * 
-     * @param name
-     *            command name
-     * @param in
-     *            argin type
-     * @param in_comments
-     *            argin description
-     * @param out
-     *            argout type
-     * @param out_comments
-     *            argout description
-     */
-    // ===============================================================
-    public GetErrorArchiversCurrentClass(String name, int in, int out, String in_comments,
-	    String out_comments) {
-	super(name, in, out, in_comments, out_comments);
-    }
-
-    // ===============================================================
-    /**
-     * Constructor for Command class GetErrorArchiversCurrentClass
-     * 
-     * @param name
-     *            command name
-     * @param in
-     *            argin type
-     * @param in_comments
-     *            argin description
-     * @param out
-     *            argout type
-     * @param out_comments
-     *            argout description
-     * @param level
-     *            The command display type OPERATOR or EXPERT
-     */
-    // ===============================================================
-    public GetErrorArchiversCurrentClass(String name, int in, int out, String in_comments,
-	    String out_comments, DispLevel level) {
-	super(name, in, out, in_comments, out_comments, level);
-    }
-
-    // ===============================================================
-    /**
-     * return the result of the device's command.
-     */
-    // ===============================================================
-    @Override
-    public Any execute(DeviceImpl device, Any in_any) throws DevFailed {
-	if (!(device instanceof HdbArchivingWatcher)) {
-	    Except.throw_exception("DEVICE_ERROR",
-		    "Device parameter is not instance of HdbArchivingWatcher",
-		    "HdbArchivingWatcher");
-	}
-
-	Util.out2.println("GetErrorArchiversCurrentClass.execute(): arrived");
-	return this.insert(((HdbArchivingWatcher) (device)).get_error_archivers_current());
-    }
-
-    // ===============================================================
-    /**
-     * Check if it is allowed to execute the command.
-     */
-    // ===============================================================
-    @Override
-    public boolean is_allowed(DeviceImpl device, Any data_in) {
-	if (device.get_state() == DevState.OFF || device.get_state() == DevState.INIT) {
-	    // End of Generated Code
-
-	    // Re-Start of Generated Code
-	    return false;
-	}
-	return true;
-    }
-}
-// -----------------------------------------------------------------------------
-/*
- * end of $Source:
- * /cvsroot/tango-cs/archiving/server/hdbtdbArchivingServers/src/
- * main/java/HdbArchivingWatcher/Commands/GetErrorArchiversCurrentClass.java,v $
- */
diff --git a/src/main/java/HdbArchivingWatcher/Commands/GetErrorArchiversLatestErrorClass.java b/src/main/java/HdbArchivingWatcher/Commands/GetErrorArchiversLatestErrorClass.java
deleted file mode 100644
index 28e34fc707fe0c0ab99f2f7dd0ed476f7e3ef93b..0000000000000000000000000000000000000000
--- a/src/main/java/HdbArchivingWatcher/Commands/GetErrorArchiversLatestErrorClass.java
+++ /dev/null
@@ -1,162 +0,0 @@
-//+======================================================================
-// $Source$
-//
-// Project:      Tango Device Server
-//
-// Description:  Java source code for the command TemplateClass of the
-//               ArchivingWatcher class.
-//
-// $Author$
-//
-// $Revision$
-//
-// $Log$
-// Revision 1.2  2009/12/17 12:47:15  pierrejoseph
-// CheckStyle:  Organize imports / Format
-//
-// Revision 1.1  2009/08/28 14:27:59  soleilarc
-// add and organize admin report commands to the watcher devices
-//
-// Revision 1.1  2006/08/24 13:51:57  ounsy
-// creation
-//
-// Revision 1.1  2006/01/19 16:36:59  ounsy
-// New device specialised in watching archiving.
-//
-//
-// copyleft :    European Synchrotron Radiation Facility
-//               BP 220, Grenoble 38043
-//               FRANCE
-//
-//-======================================================================
-//
-//  		This file is generated by POGO
-//	(Program Obviously used to Generate tango Object)
-//
-//         (c) - Software Engineering Group - ESRF
-//=============================================================================
-
-/**
- * @author	$Author$
- * @version	$Revision$
- */
-package HdbArchivingWatcher.Commands;
-
-import org.omg.CORBA.Any;
-
-import HdbArchivingWatcher.HdbArchivingWatcher;
-import fr.esrf.Tango.DevFailed;
-import fr.esrf.Tango.DevState;
-import fr.esrf.Tango.DispLevel;
-import fr.esrf.TangoDs.Command;
-import fr.esrf.TangoDs.DeviceImpl;
-import fr.esrf.TangoDs.Except;
-import fr.esrf.TangoDs.TangoConst;
-import fr.esrf.TangoDs.Util;
-
-/**
- * Class Description:
- * 
- */
-@Deprecated
-public class GetErrorArchiversLatestErrorClass extends Command implements TangoConst {
-    // ===============================================================
-    /**
-     * Constructor for Command class GetErrorArchiversLatestErrorClass
-     * 
-     * @param name
-     *            command name
-     * @param in
-     *            argin type
-     * @param out
-     *            argout type
-     */
-    // ===============================================================
-    public GetErrorArchiversLatestErrorClass(String name, int in, int out) {
-	super(name, in, out);
-    }
-
-    // ===============================================================
-    /**
-     * Constructor for Command class GetErrorArchiversLatestErrorClass
-     * 
-     * @param name
-     *            command name
-     * @param in
-     *            argin type
-     * @param in_comments
-     *            argin description
-     * @param out
-     *            argout type
-     * @param out_comments
-     *            argout description
-     */
-    // ===============================================================
-    public GetErrorArchiversLatestErrorClass(String name, int in, int out, String in_comments,
-	    String out_comments) {
-	super(name, in, out, in_comments, out_comments);
-    }
-
-    // ===============================================================
-    /**
-     * Constructor for Command class GetErrorArchiversLatestErrorClass
-     * 
-     * @param name
-     *            command name
-     * @param in
-     *            argin type
-     * @param in_comments
-     *            argin description
-     * @param out
-     *            argout type
-     * @param out_comments
-     *            argout description
-     * @param level
-     *            The command display type OPERATOR or EXPERT
-     */
-    // ===============================================================
-    public GetErrorArchiversLatestErrorClass(String name, int in, int out, String in_comments,
-	    String out_comments, DispLevel level) {
-	super(name, in, out, in_comments, out_comments, level);
-    }
-
-    // ===============================================================
-    /**
-     * return the result of the device's command.
-     */
-    // ===============================================================
-    @Override
-    public Any execute(DeviceImpl device, Any in_any) throws DevFailed {
-	if (!(device instanceof HdbArchivingWatcher)) {
-	    Except.throw_exception("DEVICE_ERROR",
-		    "Device parameter is not instance of HdbArchivingWatcher",
-		    "HdbArchivingWatcher");
-	}
-
-	Util.out2.println("GetErrorArchiversLatestErrorClass.execute(): arrived");
-	return this.insert(((HdbArchivingWatcher) (device)).get_error_archivers_latest_error());
-    }
-
-    // ===============================================================
-    /**
-     * Check if it is allowed to execute the command.
-     */
-    // ===============================================================
-    @Override
-    public boolean is_allowed(DeviceImpl device, Any data_in) {
-	if (device.get_state() == DevState.OFF || device.get_state() == DevState.INIT) {
-	    // End of Generated Code
-
-	    // Re-Start of Generated Code
-	    return false;
-	}
-	return true;
-    }
-}
-// -----------------------------------------------------------------------------
-/*
- * end of $Source:
- * /cvsroot/tango-cs/archiving/server/hdbtdbArchivingServers/src/
- * main/java/HdbArchivingWatcher
- * /Commands/GetErrorArchiversLatestErrorClass.java,v $
- */
diff --git a/src/main/java/HdbArchivingWatcher/Commands/GetErrorDomainsCurrentClass.java b/src/main/java/HdbArchivingWatcher/Commands/GetErrorDomainsCurrentClass.java
deleted file mode 100644
index c001bbed4d669cc3e3e50b2bc454c573a2d3da31..0000000000000000000000000000000000000000
--- a/src/main/java/HdbArchivingWatcher/Commands/GetErrorDomainsCurrentClass.java
+++ /dev/null
@@ -1,161 +0,0 @@
-//+======================================================================
-// $Source$
-//
-// Project:      Tango Device Server
-//
-// Description:  Java source code for the command TemplateClass of the
-//               ArchivingWatcher class.
-//
-// $Author$
-//
-// $Revision$
-//
-// $Log$
-// Revision 1.2  2009/12/17 12:47:16  pierrejoseph
-// CheckStyle:  Organize imports / Format
-//
-// Revision 1.1  2009/08/28 14:27:59  soleilarc
-// add and organize admin report commands to the watcher devices
-//
-// Revision 1.1  2006/08/24 13:51:57  ounsy
-// creation
-//
-// Revision 1.1  2006/01/19 16:36:59  ounsy
-// New device specialised in watching archiving.
-//
-//
-// copyleft :    European Synchrotron Radiation Facility
-//               BP 220, Grenoble 38043
-//               FRANCE
-//
-//-======================================================================
-//
-//  		This file is generated by POGO
-//	(Program Obviously used to Generate tango Object)
-//
-//         (c) - Software Engineering Group - ESRF
-//=============================================================================
-
-/**
- * @author	$Author$
- * @version	$Revision$
- */
-package HdbArchivingWatcher.Commands;
-
-import org.omg.CORBA.Any;
-
-import HdbArchivingWatcher.HdbArchivingWatcher;
-import fr.esrf.Tango.DevFailed;
-import fr.esrf.Tango.DevState;
-import fr.esrf.Tango.DispLevel;
-import fr.esrf.TangoDs.Command;
-import fr.esrf.TangoDs.DeviceImpl;
-import fr.esrf.TangoDs.Except;
-import fr.esrf.TangoDs.TangoConst;
-import fr.esrf.TangoDs.Util;
-
-/**
- * Class Description:
- * 
- */
-@Deprecated
-public class GetErrorDomainsCurrentClass extends Command implements TangoConst {
-    // ===============================================================
-    /**
-     * Constructor for Command class GetErrorDomainsCurrentClass
-     * 
-     * @param name
-     *            command name
-     * @param in
-     *            argin type
-     * @param out
-     *            argout type
-     */
-    // ===============================================================
-    public GetErrorDomainsCurrentClass(String name, int in, int out) {
-	super(name, in, out);
-    }
-
-    // ===============================================================
-    /**
-     * Constructor for Command class GetErrorDomainsCurrentClass
-     * 
-     * @param name
-     *            command name
-     * @param in
-     *            argin type
-     * @param in_comments
-     *            argin description
-     * @param out
-     *            argout type
-     * @param out_comments
-     *            argout description
-     */
-    // ===============================================================
-    public GetErrorDomainsCurrentClass(String name, int in, int out, String in_comments,
-	    String out_comments) {
-	super(name, in, out, in_comments, out_comments);
-    }
-
-    // ===============================================================
-    /**
-     * Constructor for Command class GetErrorDomainsCurrentClass
-     * 
-     * @param name
-     *            command name
-     * @param in
-     *            argin type
-     * @param in_comments
-     *            argin description
-     * @param out
-     *            argout type
-     * @param out_comments
-     *            argout description
-     * @param level
-     *            The command display type OPERATOR or EXPERT
-     */
-    // ===============================================================
-    public GetErrorDomainsCurrentClass(String name, int in, int out, String in_comments,
-	    String out_comments, DispLevel level) {
-	super(name, in, out, in_comments, out_comments, level);
-    }
-
-    // ===============================================================
-    /**
-     * return the result of the device's command.
-     */
-    // ===============================================================
-    @Override
-    public Any execute(DeviceImpl device, Any in_any) throws DevFailed {
-	if (!(device instanceof HdbArchivingWatcher)) {
-	    Except.throw_exception("DEVICE_ERROR",
-		    "Device parameter is not instance of HdbArchivingWatcher",
-		    "HdbArchivingWatcher");
-	}
-
-	Util.out2.println("GetErrorDomainsCurrentClass.execute(): arrived");
-	return this.insert(((HdbArchivingWatcher) (device)).get_error_domains_current());
-    }
-
-    // ===============================================================
-    /**
-     * Check if it is allowed to execute the command.
-     */
-    // ===============================================================
-    @Override
-    public boolean is_allowed(DeviceImpl device, Any data_in) {
-	if (device.get_state() == DevState.OFF || device.get_state() == DevState.INIT) {
-	    // End of Generated Code
-
-	    // Re-Start of Generated Code
-	    return false;
-	}
-	return true;
-    }
-}
-// -----------------------------------------------------------------------------
-/*
- * end of $Source:
- * /cvsroot/tango-cs/archiving/server/hdbtdbArchivingServers/src/
- * main/java/HdbArchivingWatcher/Commands/GetErrorDomainsCurrentClass.java,v $
- */
diff --git a/src/main/java/HdbArchivingWatcher/Commands/GetErrorDomainsLatestErrorClass.java b/src/main/java/HdbArchivingWatcher/Commands/GetErrorDomainsLatestErrorClass.java
deleted file mode 100644
index 222fa1ac65059f4ed15860f31a34457b3caab7ad..0000000000000000000000000000000000000000
--- a/src/main/java/HdbArchivingWatcher/Commands/GetErrorDomainsLatestErrorClass.java
+++ /dev/null
@@ -1,162 +0,0 @@
-//+======================================================================
-// $Source$
-//
-// Project:      Tango Device Server
-//
-// Description:  Java source code for the command TemplateClass of the
-//               ArchivingWatcher class.
-//
-// $Author$
-//
-// $Revision$
-//
-// $Log$
-// Revision 1.2  2009/12/17 12:47:15  pierrejoseph
-// CheckStyle:  Organize imports / Format
-//
-// Revision 1.1  2009/08/28 14:27:59  soleilarc
-// add and organize admin report commands to the watcher devices
-//
-// Revision 1.1  2006/08/24 13:51:57  ounsy
-// creation
-//
-// Revision 1.1  2006/01/19 16:36:59  ounsy
-// New device specialised in watching archiving.
-//
-//
-// copyleft :    European Synchrotron Radiation Facility
-//               BP 220, Grenoble 38043
-//               FRANCE
-//
-//-======================================================================
-//
-//  		This file is generated by POGO
-//	(Program Obviously used to Generate tango Object)
-//
-//         (c) - Software Engineering Group - ESRF
-//=============================================================================
-
-/**
- * @author	$Author$
- * @version	$Revision$
- */
-package HdbArchivingWatcher.Commands;
-
-import org.omg.CORBA.Any;
-
-import HdbArchivingWatcher.HdbArchivingWatcher;
-import fr.esrf.Tango.DevFailed;
-import fr.esrf.Tango.DevState;
-import fr.esrf.Tango.DispLevel;
-import fr.esrf.TangoDs.Command;
-import fr.esrf.TangoDs.DeviceImpl;
-import fr.esrf.TangoDs.Except;
-import fr.esrf.TangoDs.TangoConst;
-import fr.esrf.TangoDs.Util;
-
-/**
- * Class Description:
- * 
- */
-@Deprecated
-public class GetErrorDomainsLatestErrorClass extends Command implements TangoConst {
-    // ===============================================================
-    /**
-     * Constructor for Command class GetErrorDomainsLatestErrorClass
-     * 
-     * @param name
-     *            command name
-     * @param in
-     *            argin type
-     * @param out
-     *            argout type
-     */
-    // ===============================================================
-    public GetErrorDomainsLatestErrorClass(String name, int in, int out) {
-	super(name, in, out);
-    }
-
-    // ===============================================================
-    /**
-     * Constructor for Command class GetErrorDomainsLatestErrorClass
-     * 
-     * @param name
-     *            command name
-     * @param in
-     *            argin type
-     * @param in_comments
-     *            argin description
-     * @param out
-     *            argout type
-     * @param out_comments
-     *            argout description
-     */
-    // ===============================================================
-    public GetErrorDomainsLatestErrorClass(String name, int in, int out, String in_comments,
-	    String out_comments) {
-	super(name, in, out, in_comments, out_comments);
-    }
-
-    // ===============================================================
-    /**
-     * Constructor for Command class GetErrorDomainsLatestErrorClass
-     * 
-     * @param name
-     *            command name
-     * @param in
-     *            argin type
-     * @param in_comments
-     *            argin description
-     * @param out
-     *            argout type
-     * @param out_comments
-     *            argout description
-     * @param level
-     *            The command display type OPERATOR or EXPERT
-     */
-    // ===============================================================
-    public GetErrorDomainsLatestErrorClass(String name, int in, int out, String in_comments,
-	    String out_comments, DispLevel level) {
-	super(name, in, out, in_comments, out_comments, level);
-    }
-
-    // ===============================================================
-    /**
-     * return the result of the device's command.
-     */
-    // ===============================================================
-    @Override
-    public Any execute(DeviceImpl device, Any in_any) throws DevFailed {
-	if (!(device instanceof HdbArchivingWatcher)) {
-	    Except.throw_exception("DEVICE_ERROR",
-		    "Device parameter is not instance of HdbArchivingWatcher",
-		    "HdbArchivingWatcher");
-	}
-
-	Util.out2.println("GetErrorDomainsLatestErrorClass.execute(): arrived");
-	return this.insert(((HdbArchivingWatcher) (device)).get_error_domains_latest_error());
-    }
-
-    // ===============================================================
-    /**
-     * Check if it is allowed to execute the command.
-     */
-    // ===============================================================
-    @Override
-    public boolean is_allowed(DeviceImpl device, Any data_in) {
-	if (device.get_state() == DevState.OFF || device.get_state() == DevState.INIT) {
-	    // End of Generated Code
-
-	    // Re-Start of Generated Code
-	    return false;
-	}
-	return true;
-    }
-}
-// -----------------------------------------------------------------------------
-/*
- * end of $Source:
- * /cvsroot/tango-cs/archiving/server/hdbtdbArchivingServers/src/
- * main/java/HdbArchivingWatcher/Commands/GetErrorDomainsLatestErrorClass.java,v
- * $
- */
diff --git a/src/main/java/HdbArchivingWatcher/Commands/GetErrorsForArchiverCurrentClass.java b/src/main/java/HdbArchivingWatcher/Commands/GetErrorsForArchiverCurrentClass.java
deleted file mode 100644
index fa9978f43a8150ed7281ddb6518ec7c8c8ae0d3c..0000000000000000000000000000000000000000
--- a/src/main/java/HdbArchivingWatcher/Commands/GetErrorsForArchiverCurrentClass.java
+++ /dev/null
@@ -1,164 +0,0 @@
-//+======================================================================
-// $Source$
-//
-// Project:      Tango Device Server
-//
-// Description:  Java source code for the command TemplateClass of the
-//               ArchivingWatcher class.
-//
-// $Author$
-//
-// $Revision$
-//
-// $Log$
-// Revision 1.2  2009/12/17 12:47:15  pierrejoseph
-// CheckStyle:  Organize imports / Format
-//
-// Revision 1.1  2009/08/28 14:27:59  soleilarc
-// add and organize admin report commands to the watcher devices
-//
-// Revision 1.1  2006/08/24 13:51:57  ounsy
-// creation
-//
-// Revision 1.1  2006/01/19 16:36:59  ounsy
-// New device specialised in watching archiving.
-//
-//
-// copyleft :    European Synchrotron Radiation Facility
-//               BP 220, Grenoble 38043
-//               FRANCE
-//
-//-======================================================================
-//
-//  		This file is generated by POGO
-//	(Program Obviously used to Generate tango Object)
-//
-//         (c) - Software Engineering Group - ESRF
-//=============================================================================
-
-/**
- * @author	$Author$
- * @version	$Revision$
- */
-package HdbArchivingWatcher.Commands;
-
-import org.omg.CORBA.Any;
-
-import HdbArchivingWatcher.HdbArchivingWatcher;
-import fr.esrf.Tango.DevFailed;
-import fr.esrf.Tango.DevState;
-import fr.esrf.Tango.DispLevel;
-import fr.esrf.TangoDs.Command;
-import fr.esrf.TangoDs.DeviceImpl;
-import fr.esrf.TangoDs.Except;
-import fr.esrf.TangoDs.TangoConst;
-import fr.esrf.TangoDs.Util;
-
-/**
- * Class Description:
- * 
- */
-@Deprecated
-public class GetErrorsForArchiverCurrentClass extends Command implements TangoConst {
-    // ===============================================================
-    /**
-     * Constructor for Command class GetErrorsForArchiverCurrentClass
-     * 
-     * @param name
-     *            command name
-     * @param in
-     *            argin type
-     * @param out
-     *            argout type
-     */
-    // ===============================================================
-    public GetErrorsForArchiverCurrentClass(String name, int in, int out) {
-	super(name, in, out);
-    }
-
-    // ===============================================================
-    /**
-     * Constructor for Command class GetErrorsForArchiverCurrentClass
-     * 
-     * @param name
-     *            command name
-     * @param in
-     *            argin type
-     * @param in_comments
-     *            argin description
-     * @param out
-     *            argout type
-     * @param out_comments
-     *            argout description
-     */
-    // ===============================================================
-    public GetErrorsForArchiverCurrentClass(String name, int in, int out, String in_comments,
-	    String out_comments) {
-	super(name, in, out, in_comments, out_comments);
-    }
-
-    // ===============================================================
-    /**
-     * Constructor for Command class GetErrorsForArchiverCurrentClass
-     * 
-     * @param name
-     *            command name
-     * @param in
-     *            argin type
-     * @param in_comments
-     *            argin description
-     * @param out
-     *            argout type
-     * @param out_comments
-     *            argout description
-     * @param level
-     *            The command display type OPERATOR or EXPERT
-     */
-    // ===============================================================
-    public GetErrorsForArchiverCurrentClass(String name, int in, int out, String in_comments,
-	    String out_comments, DispLevel level) {
-	super(name, in, out, in_comments, out_comments, level);
-    }
-
-    // ===============================================================
-    /**
-     * return the result of the device's command.
-     */
-    // ===============================================================
-    @Override
-    public Any execute(DeviceImpl device, Any in_any) throws DevFailed {
-	if (!(device instanceof HdbArchivingWatcher)) {
-	    Except.throw_exception("DEVICE_ERROR",
-		    "Device parameter is not instance of HdbArchivingWatcher",
-		    "HdbArchivingWatcher");
-	}
-
-	Util.out2.println("GetErrorsForArchiverCurrentClass.execute(): arrived");
-	String argin = this.extract_DevString(in_any);
-	return this.insert(((HdbArchivingWatcher) (device))
-		.get_errors_for_archiver_latest_error(argin));
-    }
-
-    // ===============================================================
-    /**
-     * Check if it is allowed to execute the command.
-     */
-    // ===============================================================
-    @Override
-    public boolean is_allowed(DeviceImpl device, Any data_in) {
-	if (device.get_state() == DevState.OFF || device.get_state() == DevState.INIT) {
-	    // End of Generated Code
-
-	    // Re-Start of Generated Code
-	    return false;
-	}
-	return true;
-    }
-}
-// -----------------------------------------------------------------------------
-/*
- * end of $Source:
- * /cvsroot/tango-cs/archiving/server/hdbtdbArchivingServers/src/
- * main/java/HdbArchivingWatcher
- * /Commands/GetErrorsForArchiverCurrentClass.java,v $
- */
diff --git a/src/main/java/HdbArchivingWatcher/Commands/GetErrorsForArchiverLatestErrorClass.java b/src/main/java/HdbArchivingWatcher/Commands/GetErrorsForArchiverLatestErrorClass.java
deleted file mode 100644
index 8245f0541c79d2e8529a2a6b60b3fd828c4fee78..0000000000000000000000000000000000000000
--- a/src/main/java/HdbArchivingWatcher/Commands/GetErrorsForArchiverLatestErrorClass.java
+++ /dev/null
@@ -1,126 +0,0 @@
-/**
- * @author	$Author$
- * @version	$Revision$
- */
-package HdbArchivingWatcher.Commands;
-
-import org.omg.CORBA.Any;
-
-import HdbArchivingWatcher.HdbArchivingWatcher;
-import fr.esrf.Tango.DevFailed;
-import fr.esrf.Tango.DevState;
-import fr.esrf.Tango.DispLevel;
-import fr.esrf.TangoDs.Command;
-import fr.esrf.TangoDs.DeviceImpl;
-import fr.esrf.TangoDs.Except;
-import fr.esrf.TangoDs.TangoConst;
-import fr.esrf.TangoDs.Util;
-
-/**
- * Class Description:
- * 
- */
-@Deprecated
-public class GetErrorsForArchiverLatestErrorClass extends Command implements TangoConst {
-    // ===============================================================
-    /**
-     * Constructor for Command class GetErrorsForArchiverCurrentClass
-     * 
-     * @param name
-     *            command name
-     * @param in
-     *            argin type
-     * @param out
-     *            argout type
-     */
-    // ===============================================================
-    public GetErrorsForArchiverLatestErrorClass(String name, int in, int out) {
-	super(name, in, out);
-    }
-
-    // ===============================================================
-    /**
-     * Constructor for Command class GetErrorsForArchiverCurrentClass
-     * 
-     * @param name
-     *            command name
-     * @param in
-     *            argin type
-     * @param in_comments
-     *            argin description
-     * @param out
-     *            argout type
-     * @param out_comments
-     *            argout description
-     */
-    // ===============================================================
-    public GetErrorsForArchiverLatestErrorClass(String name, int in, int out, String in_comments,
-	    String out_comments) {
-	super(name, in, out, in_comments, out_comments);
-    }
-
-    // ===============================================================
-    /**
-     * Constructor for Command class GetErrorsForArchiverCurrentClass
-     * 
-     * @param name
-     *            command name
-     * @param in
-     *            argin type
-     * @param in_comments
-     *            argin description
-     * @param out
-     *            argout type
-     * @param out_comments
-     *            argout description
-     * @param level
-     *            The command display type OPERATOR or EXPERT
-     */
-    // ===============================================================
-    public GetErrorsForArchiverLatestErrorClass(String name, int in, int out, String in_comments,
-	    String out_comments, DispLevel level) {
-	super(name, in, out, in_comments, out_comments, level);
-    }
-
-    // ===============================================================
-    /**
-     * return the result of the device's command.
-     */
-    // ===============================================================
-    @Override
-    public Any execute(DeviceImpl device, Any in_any) throws DevFailed {
-	if (!(device instanceof HdbArchivingWatcher)) {
-	    Except.throw_exception("DEVICE_ERROR",
-		    "Device parameter is not instance of HdbArchivingWatcher",
-		    "HdbArchivingWatcher");
-	}
-
-	Util.out2.println("GetErrorsForArchiverCurrentClass.execute(): arrived");
-	String argin = this.extract_DevString(in_any);
-	return this.insert(((HdbArchivingWatcher) (device))
-		.get_errors_for_archiver_latest_error(argin));
-    }
-
-    // ===============================================================
-    /**
-     * Check if it is allowed to execute the command.
-     */
-    // ===============================================================
-    @Override
-    public boolean is_allowed(DeviceImpl device, Any data_in) {
-	if (device.get_state() == DevState.OFF || device.get_state() == DevState.INIT) {
-	    // End of Generated Code
-
-	    // Re-Start of Generated Code
-	    return false;
-	}
-	return true;
-    }
-}
-// -----------------------------------------------------------------------------
-/*
- * end of $Source:
- * /cvsroot/tango-cs/archiving/server/hdbtdbArchivingServers/src/
- * main/java/HdbArchivingWatcher
- * /Commands/GetErrorsForArchiverLatestErrorClass.java,v $
- */
diff --git a/src/main/java/HdbArchivingWatcher/Commands/GetErrorsForAttributeCurrentClass.java b/src/main/java/HdbArchivingWatcher/Commands/GetErrorsForAttributeCurrentClass.java
deleted file mode 100644
index 7a81041a0bf12aa342fa2090341d8c8ef9c3bb2c..0000000000000000000000000000000000000000
--- a/src/main/java/HdbArchivingWatcher/Commands/GetErrorsForAttributeCurrentClass.java
+++ /dev/null
@@ -1,164 +0,0 @@
-//+======================================================================
-// $Source$
-//
-// Project:      Tango Device Server
-//
-// Description:  Java source code for the command TemplateClass of the
-//               ArchivingWatcher class.
-//
-// $Author$
-//
-// $Revision$
-//
-// $Log$
-// Revision 1.2  2009/12/17 12:47:16  pierrejoseph
-// CheckStyle:  Organize imports / Format
-//
-// Revision 1.1  2009/08/28 14:27:59  soleilarc
-// add and organize admin report commands to the watcher devices
-//
-// Revision 1.1  2006/08/24 13:51:57  ounsy
-// creation
-//
-// Revision 1.1  2006/01/19 16:36:59  ounsy
-// New device specialised in watching archiving.
-//
-//
-// copyleft :    European Synchrotron Radiation Facility
-//               BP 220, Grenoble 38043
-//               FRANCE
-//
-//-======================================================================
-//
-//  		This file is generated by POGO
-//	(Program Obviously used to Generate tango Object)
-//
-//         (c) - Software Engineering Group - ESRF
-//=============================================================================
-
-/**
- * @author	$Author$
- * @version	$Revision$
- */
-package HdbArchivingWatcher.Commands;
-
-import org.omg.CORBA.Any;
-
-import HdbArchivingWatcher.HdbArchivingWatcher;
-import fr.esrf.Tango.DevFailed;
-import fr.esrf.Tango.DevState;
-import fr.esrf.Tango.DispLevel;
-import fr.esrf.TangoDs.Command;
-import fr.esrf.TangoDs.DeviceImpl;
-import fr.esrf.TangoDs.Except;
-import fr.esrf.TangoDs.TangoConst;
-import fr.esrf.TangoDs.Util;
-
-/**
- * Class Description:
- * 
- */
-@Deprecated
-public class GetErrorsForAttributeCurrentClass extends Command implements TangoConst {
-    // ===============================================================
-    /**
-     * Constructor for Command class GetErrorsForAttributeCurrentClass
-     * 
-     * @param name
-     *            command name
-     * @param in
-     *            argin type
-     * @param out
-     *            argout type
-     */
-    // ===============================================================
-    public GetErrorsForAttributeCurrentClass(String name, int in, int out) {
-	super(name, in, out);
-    }
-
-    // ===============================================================
-    /**
-     * Constructor for Command class GetErrorsForAttributeCurrentClass
-     * 
-     * @param name
-     *            command name
-     * @param in
-     *            argin type
-     * @param in_comments
-     *            argin description
-     * @param out
-     *            argout type
-     * @param out_comments
-     *            argout description
-     */
-    // ===============================================================
-    public GetErrorsForAttributeCurrentClass(String name, int in, int out, String in_comments,
-	    String out_comments) {
-	super(name, in, out, in_comments, out_comments);
-    }
-
-    // ===============================================================
-    /**
-     * Constructor for Command class GetErrorsForAttributeCurrentClass
-     * 
-     * @param name
-     *            command name
-     * @param in
-     *            argin type
-     * @param in_comments
-     *            argin description
-     * @param out
-     *            argout type
-     * @param out_comments
-     *            argout description
-     * @param level
-     *            The command display type OPERATOR or EXPERT
-     */
-    // ===============================================================
-    public GetErrorsForAttributeCurrentClass(String name, int in, int out, String in_comments,
-	    String out_comments, DispLevel level) {
-	super(name, in, out, in_comments, out_comments, level);
-    }
-
-    // ===============================================================
-    /**
-     * return the result of the device's command.
-     */
-    // ===============================================================
-    @Override
-    public Any execute(DeviceImpl device, Any in_any) throws DevFailed {
-	if (!(device instanceof HdbArchivingWatcher)) {
-	    Except.throw_exception("DEVICE_ERROR",
-		    "Device parameter is not instance of HdbArchivingWatcher",
-		    "HdbArchivingWatcher");
-	}
-
-	Util.out2.println("GetErrorsForAttributeCurrentClass.execute(): arrived");
-	String argin = this.extract_DevString(in_any);
-	return this
-		.insert(((HdbArchivingWatcher) (device)).get_errors_for_attribute_current(argin));
-    }
-
-    // ===============================================================
-    /**
-     * Check if it is allowed to execute the command.
-     */
-    // ===============================================================
-    @Override
-    public boolean is_allowed(DeviceImpl device, Any data_in) {
-	if (device.get_state() == DevState.OFF || device.get_state() == DevState.INIT) {
-	    // End of Generated Code
-
-	    // Re-Start of Generated Code
-	    return false;
-	}
-	return true;
-    }
-}
-// -----------------------------------------------------------------------------
-/*
- * end of $Source:
- * /cvsroot/tango-cs/archiving/server/hdbtdbArchivingServers/src/
- * main/java/HdbArchivingWatcher
- * /Commands/GetErrorsForAttributeCurrentClass.java,v $
- */
diff --git a/src/main/java/HdbArchivingWatcher/Commands/GetErrorsForAttributeLatestErrorClass.java b/src/main/java/HdbArchivingWatcher/Commands/GetErrorsForAttributeLatestErrorClass.java
deleted file mode 100644
index ff74f79a63e49cb27e538c2a97b666152f96cfb0..0000000000000000000000000000000000000000
--- a/src/main/java/HdbArchivingWatcher/Commands/GetErrorsForAttributeLatestErrorClass.java
+++ /dev/null
@@ -1,164 +0,0 @@
-//+======================================================================
-// $Source$
-//
-// Project:      Tango Device Server
-//
-// Description:  Java source code for the command TemplateClass of the
-//               ArchivingWatcher class.
-//
-// $Author$
-//
-// $Revision$
-//
-// $Log$
-// Revision 1.2  2009/12/17 12:47:15  pierrejoseph
-// CheckStyle:  Organize imports / Format
-//
-// Revision 1.1  2009/08/28 14:27:59  soleilarc
-// add and organize admin report commands to the watcher devices
-//
-// Revision 1.1  2006/08/24 13:51:57  ounsy
-// creation
-//
-// Revision 1.1  2006/01/19 16:36:59  ounsy
-// New device specialised in watching archiving.
-//
-//
-// copyleft :    European Synchrotron Radiation Facility
-//               BP 220, Grenoble 38043
-//               FRANCE
-//
-//-======================================================================
-//
-//  		This file is generated by POGO
-//	(Program Obviously used to Generate tango Object)
-//
-//         (c) - Software Engineering Group - ESRF
-//=============================================================================
-
-/**
- * @author	$Author$
- * @version	$Revision$
- */
-package HdbArchivingWatcher.Commands;
-
-import org.omg.CORBA.Any;
-
-import HdbArchivingWatcher.HdbArchivingWatcher;
-import fr.esrf.Tango.DevFailed;
-import fr.esrf.Tango.DevState;
-import fr.esrf.Tango.DispLevel;
-import fr.esrf.TangoDs.Command;
-import fr.esrf.TangoDs.DeviceImpl;
-import fr.esrf.TangoDs.Except;
-import fr.esrf.TangoDs.TangoConst;
-import fr.esrf.TangoDs.Util;
-
-/**
- * Class Description:
- * 
- */
-@Deprecated
-public class GetErrorsForAttributeLatestErrorClass extends Command implements TangoConst {
-    // ===============================================================
-    /**
-     * Constructor for Command class GetErrorsForAttributeLatestErrorClass
-     * 
-     * @param name
-     *            command name
-     * @param in
-     *            argin type
-     * @param out
-     *            argout type
-     */
-    // ===============================================================
-    public GetErrorsForAttributeLatestErrorClass(String name, int in, int out) {
-	super(name, in, out);
-    }
-
-    // ===============================================================
-    /**
-     * Constructor for Command class GetErrorsForAttributeLatestErrorClass
-     * 
-     * @param name
-     *            command name
-     * @param in
-     *            argin type
-     * @param in_comments
-     *            argin description
-     * @param out
-     *            argout type
-     * @param out_comments
-     *            argout description
-     */
-    // ===============================================================
-    public GetErrorsForAttributeLatestErrorClass(String name, int in, int out, String in_comments,
-	    String out_comments) {
-	super(name, in, out, in_comments, out_comments);
-    }
-
-    // ===============================================================
-    /**
-     * Constructor for Command class GetErrorsForAttributeLatestErrorClass
-     * 
-     * @param name
-     *            command name
-     * @param in
-     *            argin type
-     * @param in_comments
-     *            argin description
-     * @param out
-     *            argout type
-     * @param out_comments
-     *            argout description
-     * @param level
-     *            The command display type OPERATOR or EXPERT
-     */
-    // ===============================================================
-    public GetErrorsForAttributeLatestErrorClass(String name, int in, int out, String in_comments,
-	    String out_comments, DispLevel level) {
-	super(name, in, out, in_comments, out_comments, level);
-    }
-
-    // ===============================================================
-    /**
-     * return the result of the device's command.
-     */
-    // ===============================================================
-    @Override
-    public Any execute(DeviceImpl device, Any in_any) throws DevFailed {
-	if (!(device instanceof HdbArchivingWatcher)) {
-	    Except.throw_exception("DEVICE_ERROR",
-		    "Device parameter is not instance of HdbArchivingWatcher",
-		    "HdbArchivingWatcher");
-	}
-
-	Util.out2.println("GetErrorsForAttributeLatestErrorClass.execute(): arrived");
-	String argin = this.extract_DevString(in_any);
-	return this.insert(((HdbArchivingWatcher) (device))
-		.get_errors_for_attribute_latest_error(argin));
-    }
-
-    // ===============================================================
-    /**
-     * Check if it is allowed to execute the command.
-     */
-    // ===============================================================
-    @Override
-    public boolean is_allowed(DeviceImpl device, Any data_in) {
-	if (device.get_state() == DevState.OFF || device.get_state() == DevState.INIT) {
-	    // End of Generated Code
-
-	    // Re-Start of Generated Code
-	    return false;
-	}
-	return true;
-    }
-}
-// -----------------------------------------------------------------------------
-/*
- * end of $Source:
- * /cvsroot/tango-cs/archiving/server/hdbtdbArchivingServers/src/
- * main/java/HdbArchivingWatcher
- * /Commands/GetErrorsForAttributeLatestErrorClass.java,v $
- */
diff --git a/src/main/java/HdbArchivingWatcher/Commands/GetErrorsForDomainCurrentClass.java b/src/main/java/HdbArchivingWatcher/Commands/GetErrorsForDomainCurrentClass.java
deleted file mode 100644
index 163f6c9224a9fde6af176ef4926bfb569e142b0a..0000000000000000000000000000000000000000
--- a/src/main/java/HdbArchivingWatcher/Commands/GetErrorsForDomainCurrentClass.java
+++ /dev/null
@@ -1,163 +0,0 @@
-//+======================================================================
-// $Source$
-//
-// Project:      Tango Device Server
-//
-// Description:  Java source code for the command TemplateClass of the
-//               ArchivingWatcher class.
-//
-// $Author$
-//
-// $Revision$
-//
-// $Log$
-// Revision 1.2  2009/12/17 12:47:15  pierrejoseph
-// CheckStyle:  Organize imports / Format
-//
-// Revision 1.1  2009/08/28 14:27:59  soleilarc
-// add and organize admin report commands to the watcher devices
-//
-// Revision 1.1  2006/08/24 13:51:57  ounsy
-// creation
-//
-// Revision 1.1  2006/01/19 16:36:59  ounsy
-// New device specialised in watching archiving.
-//
-//
-// copyleft :    European Synchrotron Radiation Facility
-//               BP 220, Grenoble 38043
-//               FRANCE
-//
-//-======================================================================
-//
-//  		This file is generated by POGO
-//	(Program Obviously used to Generate tango Object)
-//
-//         (c) - Software Engineering Group - ESRF
-//=============================================================================
-
-/**
- * @author	$Author$
- * @version	$Revision$
- */
-package HdbArchivingWatcher.Commands;
-
-import org.omg.CORBA.Any;
-
-import HdbArchivingWatcher.HdbArchivingWatcher;
-import fr.esrf.Tango.DevFailed;
-import fr.esrf.Tango.DevState;
-import fr.esrf.Tango.DispLevel;
-import fr.esrf.TangoDs.Command;
-import fr.esrf.TangoDs.DeviceImpl;
-import fr.esrf.TangoDs.Except;
-import fr.esrf.TangoDs.TangoConst;
-import fr.esrf.TangoDs.Util;
-
-/**
- * Class Description:
- * 
- */
-@Deprecated
-public class GetErrorsForDomainCurrentClass extends Command implements TangoConst {
-    // ===============================================================
-    /**
-     * Constructor for Command class GetErrorsForDomainCurrentClass
-     * 
-     * @param name
-     *            command name
-     * @param in
-     *            argin type
-     * @param out
-     *            argout type
-     */
-    // ===============================================================
-    public GetErrorsForDomainCurrentClass(String name, int in, int out) {
-	super(name, in, out);
-    }
-
-    // ===============================================================
-    /**
-     * Constructor for Command class GetErrorsForDomainCurrentClass
-     * 
-     * @param name
-     *            command name
-     * @param in
-     *            argin type
-     * @param in_comments
-     *            argin description
-     * @param out
-     *            argout type
-     * @param out_comments
-     *            argout description
-     */
-    // ===============================================================
-    public GetErrorsForDomainCurrentClass(String name, int in, int out, String in_comments,
-	    String out_comments) {
-	super(name, in, out, in_comments, out_comments);
-    }
-
-    // ===============================================================
-    /**
-     * Constructor for Command class GetErrorsForDomainCurrentClass
-     * 
-     * @param name
-     *            command name
-     * @param in
-     *            argin type
-     * @param in_comments
-     *            argin description
-     * @param out
-     *            argout type
-     * @param out_comments
-     *            argout description
-     * @param level
-     *            The command display type OPERATOR or EXPERT
-     */
-    // ===============================================================
-    public GetErrorsForDomainCurrentClass(String name, int in, int out, String in_comments,
-	    String out_comments, DispLevel level) {
-	super(name, in, out, in_comments, out_comments, level);
-    }
-
-    // ===============================================================
-    /**
-     * return the result of the device's command.
-     */
-    // ===============================================================
-    @Override
-    public Any execute(DeviceImpl device, Any in_any) throws DevFailed {
-	if (!(device instanceof HdbArchivingWatcher)) {
-	    Except.throw_exception("DEVICE_ERROR",
-		    "Device parameter is not instance of HdbArchivingWatcher",
-		    "HdbArchivingWatcher");
-	}
-
-	Util.out2.println("GetErrorsForDomainCurrentClass.execute(): arrived");
-	String argin = this.extract_DevString(in_any);
-	return this.insert(((HdbArchivingWatcher) (device)).get_errors_for_domain_current(argin));
-    }
-
-    // ===============================================================
-    /**
-     * Check if it is allowed to execute the command.
-     */
-    // ===============================================================
-    @Override
-    public boolean is_allowed(DeviceImpl device, Any data_in) {
-	if (device.get_state() == DevState.OFF || device.get_state() == DevState.INIT) {
-	    // End of Generated Code
-
-	    // Re-Start of Generated Code
-	    return false;
-	}
-	return true;
-    }
-}
-// -----------------------------------------------------------------------------
-/*
- * end of $Source:
- * /cvsroot/tango-cs/archiving/server/hdbtdbArchivingServers/src/
- * main/java/HdbArchivingWatcher/Commands/GetErrorsForDomainCurrentClass.java,v
- * $
- */
diff --git a/src/main/java/HdbArchivingWatcher/Commands/GetErrorsForDomainLatestErrorClass.java b/src/main/java/HdbArchivingWatcher/Commands/GetErrorsForDomainLatestErrorClass.java
deleted file mode 100644
index 6b602494bf43380ac47298db78a86b68f1457465..0000000000000000000000000000000000000000
--- a/src/main/java/HdbArchivingWatcher/Commands/GetErrorsForDomainLatestErrorClass.java
+++ /dev/null
@@ -1,164 +0,0 @@
-//+======================================================================
-// $Source$
-//
-// Project:      Tango Device Server
-//
-// Description:  Java source code for the command TemplateClass of the
-//               ArchivingWatcher class.
-//
-// $Author$
-//
-// $Revision$
-//
-// $Log$
-// Revision 1.2  2009/12/17 12:47:15  pierrejoseph
-// CheckStyle:  Organize imports / Format
-//
-// Revision 1.1  2009/08/28 14:27:59  soleilarc
-// add and organize admin report commands to the watcher devices
-//
-// Revision 1.1  2006/08/24 13:51:57  ounsy
-// creation
-//
-// Revision 1.1  2006/01/19 16:36:59  ounsy
-// New device specialised in watching archiving.
-//
-//
-// copyleft :    European Synchrotron Radiation Facility
-//               BP 220, Grenoble 38043
-//               FRANCE
-//
-//-======================================================================
-//
-//  		This file is generated by POGO
-//	(Program Obviously used to Generate tango Object)
-//
-//         (c) - Software Engineering Group - ESRF
-//=============================================================================
-
-/**
- * @author	$Author$
- * @version	$Revision$
- */
-package HdbArchivingWatcher.Commands;
-
-import org.omg.CORBA.Any;
-
-import HdbArchivingWatcher.HdbArchivingWatcher;
-import fr.esrf.Tango.DevFailed;
-import fr.esrf.Tango.DevState;
-import fr.esrf.Tango.DispLevel;
-import fr.esrf.TangoDs.Command;
-import fr.esrf.TangoDs.DeviceImpl;
-import fr.esrf.TangoDs.Except;
-import fr.esrf.TangoDs.TangoConst;
-import fr.esrf.TangoDs.Util;
-
-/**
- * Class Description:
- * 
- */
-@Deprecated
-public class GetErrorsForDomainLatestErrorClass extends Command implements TangoConst {
-    // ===============================================================
-    /**
-     * Constructor for Command class GetErrorsForDomainLatestErrorClass
-     * 
-     * @param name
-     *            command name
-     * @param in
-     *            argin type
-     * @param out
-     *            argout type
-     */
-    // ===============================================================
-    public GetErrorsForDomainLatestErrorClass(String name, int in, int out) {
-	super(name, in, out);
-    }
-
-    // ===============================================================
-    /**
-     * Constructor for Command class GetErrorsForDomainLatestErrorClass
-     * 
-     * @param name
-     *            command name
-     * @param in
-     *            argin type
-     * @param in_comments
-     *            argin description
-     * @param out
-     *            argout type
-     * @param out_comments
-     *            argout description
-     */
-    // ===============================================================
-    public GetErrorsForDomainLatestErrorClass(String name, int in, int out, String in_comments,
-	    String out_comments) {
-	super(name, in, out, in_comments, out_comments);
-    }
-
-    // ===============================================================
-    /**
-     * Constructor for Command class GetErrorsForDomainLatestErrorClass
-     * 
-     * @param name
-     *            command name
-     * @param in
-     *            argin type
-     * @param in_comments
-     *            argin description
-     * @param out
-     *            argout type
-     * @param out_comments
-     *            argout description
-     * @param level
-     *            The command display type OPERATOR or EXPERT
-     */
-    // ===============================================================
-    public GetErrorsForDomainLatestErrorClass(String name, int in, int out, String in_comments,
-	    String out_comments, DispLevel level) {
-	super(name, in, out, in_comments, out_comments, level);
-    }
-
-    // ===============================================================
-    /**
-     * return the result of the device's command.
-     */
-    // ===============================================================
-    @Override
-    public Any execute(DeviceImpl device, Any in_any) throws DevFailed {
-	if (!(device instanceof HdbArchivingWatcher)) {
-	    Except.throw_exception("DEVICE_ERROR",
-		    "Device parameter is not instance of HdbArchivingWatcher",
-		    "HdbArchivingWatcher");
-	}
-
-	Util.out2.println("GetErrorsForDomainLatestErrorClass.execute(): arrived");
-	String argin = this.extract_DevString(in_any);
-	return this.insert(((HdbArchivingWatcher) (device))
-		.get_errors_for_domain_latest_error(argin));
-    }
-
-    // ===============================================================
-    /**
-     * Check if it is allowed to execute the command.
-     */
-    // ===============================================================
-    @Override
-    public boolean is_allowed(DeviceImpl device, Any data_in) {
-	if (device.get_state() == DevState.OFF || device.get_state() == DevState.INIT) {
-	    // End of Generated Code
-
-	    // Re-Start of Generated Code
-	    return false;
-	}
-	return true;
-    }
-}
-// -----------------------------------------------------------------------------
-/*
- * end of $Source:
- * /cvsroot/tango-cs/archiving/server/hdbtdbArchivingServers/src/
- * main/java/HdbArchivingWatcher
- * /Commands/GetErrorsForDomainLatestErrorClass.java,v $
- */
diff --git a/src/main/java/HdbArchivingWatcher/Commands/GetReportCurrentClass.java b/src/main/java/HdbArchivingWatcher/Commands/GetReportCurrentClass.java
deleted file mode 100644
index b0146cd37ee8bf4a1732edc973289b5a70a71405..0000000000000000000000000000000000000000
--- a/src/main/java/HdbArchivingWatcher/Commands/GetReportCurrentClass.java
+++ /dev/null
@@ -1,164 +0,0 @@
-//+======================================================================
-// $Source$
-//
-// Project:      Tango Device Server
-//
-// Description:  Java source code for the command TemplateClass of the
-//               ArchivingWatcher class.
-//
-// $Author$
-//
-// $Revision$
-//
-// $Log$
-// Revision 1.2  2009/12/17 12:47:15  pierrejoseph
-// CheckStyle:  Organize imports / Format
-//
-// Revision 1.1  2009/08/28 14:27:59  soleilarc
-// add and organize admin report commands to the watcher devices
-//
-// Revision 1.1  2006/08/24 13:51:57  ounsy
-// creation
-//
-// Revision 1.2  2006/01/27 13:08:35  ounsy
-// small changes
-//
-// Revision 1.1  2006/01/19 16:36:59  ounsy
-// New device specialised in watching archiving.
-//
-//
-// copyleft :    European Synchrotron Radiation Facility
-//               BP 220, Grenoble 38043
-//               FRANCE
-//
-//-======================================================================
-//
-//  		This file is generated by POGO
-//	(Program Obviously used to Generate tango Object)
-//
-//         (c) - Software Engineering Group - ESRF
-//=============================================================================
-
-/**
- * @author	$Author$
- * @version	$Revision$
- */
-package HdbArchivingWatcher.Commands;
-
-import org.omg.CORBA.Any;
-
-import HdbArchivingWatcher.HdbArchivingWatcher;
-import fr.esrf.Tango.DevFailed;
-import fr.esrf.Tango.DevState;
-import fr.esrf.Tango.DispLevel;
-import fr.esrf.TangoDs.Command;
-import fr.esrf.TangoDs.DeviceImpl;
-import fr.esrf.TangoDs.Except;
-import fr.esrf.TangoDs.TangoConst;
-import fr.esrf.TangoDs.Util;
-
-/**
- * Class Description:
- * 
- */
-@Deprecated
-public class GetReportCurrentClass extends Command implements TangoConst {
-    // ===============================================================
-    /**
-     * Constructor for Command class GetReportCurrentClass
-     * 
-     * @param name
-     *            command name
-     * @param in
-     *            argin type
-     * @param out
-     *            argout type
-     */
-    // ===============================================================
-    public GetReportCurrentClass(String name, int in, int out) {
-	super(name, in, out);
-    }
-
-    // ===============================================================
-    /**
-     * Constructor for Command class GetReportCurrentClass
-     * 
-     * @param name
-     *            command name
-     * @param in
-     *            argin type
-     * @param in_comments
-     *            argin description
-     * @param out
-     *            argout type
-     * @param out_comments
-     *            argout description
-     */
-    // ===============================================================
-    public GetReportCurrentClass(String name, int in, int out, String in_comments,
-	    String out_comments) {
-	super(name, in, out, in_comments, out_comments);
-    }
-
-    // ===============================================================
-    /**
-     * Constructor for Command class GetReportCurrentClass
-     * 
-     * @param name
-     *            command name
-     * @param in
-     *            argin type
-     * @param in_comments
-     *            argin description
-     * @param out
-     *            argout type
-     * @param out_comments
-     *            argout description
-     * @param level
-     *            The command display type OPERATOR or EXPERT
-     */
-    // ===============================================================
-    public GetReportCurrentClass(String name, int in, int out, String in_comments,
-	    String out_comments, DispLevel level) {
-	super(name, in, out, in_comments, out_comments, level);
-    }
-
-    // ===============================================================
-    /**
-     * return the result of the device's command.
-     */
-    // ===============================================================
-    @Override
-    public Any execute(DeviceImpl device, Any in_any) throws DevFailed {
-	if (!(device instanceof HdbArchivingWatcher)) {
-	    Except.throw_exception("DEVICE_ERROR",
-		    "Device parameter is not instance of HdbArchivingWatcher",
-		    "HdbArchivingWatcher");
-	}
-
-	Util.out2.println("GetReportCurrentClass.execute(): arrived");
-	return this.insert(((HdbArchivingWatcher) (device)).get_report_current());
-    }
-
-    // ===============================================================
-    /**
-     * Check if it is allowed to execute the command.
-     */
-    // ===============================================================
-    @Override
-    public boolean is_allowed(DeviceImpl device, Any data_in) {
-	if (device.get_state() == DevState.OFF || device.get_state() == DevState.INIT) {
-	    // End of Generated Code
-
-	    // Re-Start of Generated Code
-	    return false;
-	}
-	return true;
-    }
-}
-// -----------------------------------------------------------------------------
-/*
- * end of $Source:
- * /cvsroot/tango-cs/archiving/server/hdbtdbArchivingServers/src/
- * main/java/HdbArchivingWatcher/Commands/GetReportCurrentClass.java,v $
- */
diff --git a/src/main/java/HdbArchivingWatcher/Commands/GetReportLatestErrorClass.java b/src/main/java/HdbArchivingWatcher/Commands/GetReportLatestErrorClass.java
deleted file mode 100644
index 49c47c9c10b7dac777be25c909d793b0cdd8c219..0000000000000000000000000000000000000000
--- a/src/main/java/HdbArchivingWatcher/Commands/GetReportLatestErrorClass.java
+++ /dev/null
@@ -1,164 +0,0 @@
-//+======================================================================
-// $Source$
-//
-// Project:      Tango Device Server
-//
-// Description:  Java source code for the command TemplateClass of the
-//               ArchivingWatcher class.
-//
-// $Author$
-//
-// $Revision$
-//
-// $Log$
-// Revision 1.2  2009/12/17 12:47:15  pierrejoseph
-// CheckStyle:  Organize imports / Format
-//
-// Revision 1.1  2009/08/28 14:27:59  soleilarc
-// add and organize admin report commands to the watcher devices
-//
-// Revision 1.1  2006/08/24 13:51:57  ounsy
-// creation
-//
-// Revision 1.2  2006/01/27 13:08:35  ounsy
-// small changes
-//
-// Revision 1.1  2006/01/19 16:36:59  ounsy
-// New device specialised in watching archiving.
-//
-//
-// copyleft :    European Synchrotron Radiation Facility
-//               BP 220, Grenoble 38043
-//               FRANCE
-//
-//-======================================================================
-//
-//  		This file is generated by POGO
-//	(Program Obviously used to Generate tango Object)
-//
-//         (c) - Software Engineering Group - ESRF
-//=============================================================================
-
-/**
- * @author	$Author$
- * @version	$Revision$
- */
-package HdbArchivingWatcher.Commands;
-
-import org.omg.CORBA.Any;
-
-import HdbArchivingWatcher.HdbArchivingWatcher;
-import fr.esrf.Tango.DevFailed;
-import fr.esrf.Tango.DevState;
-import fr.esrf.Tango.DispLevel;
-import fr.esrf.TangoDs.Command;
-import fr.esrf.TangoDs.DeviceImpl;
-import fr.esrf.TangoDs.Except;
-import fr.esrf.TangoDs.TangoConst;
-import fr.esrf.TangoDs.Util;
-
-/**
- * Class Description:
- * 
- */
-@Deprecated
-public class GetReportLatestErrorClass extends Command implements TangoConst {
-    // ===============================================================
-    /**
-     * Constructor for Command class GetReportLatestErrorClass
-     * 
-     * @param name
-     *            command name
-     * @param in
-     *            argin type
-     * @param out
-     *            argout type
-     */
-    // ===============================================================
-    public GetReportLatestErrorClass(String name, int in, int out) {
-	super(name, in, out);
-    }
-
-    // ===============================================================
-    /**
-     * Constructor for Command class GetReportLatestErrorClass
-     * 
-     * @param name
-     *            command name
-     * @param in
-     *            argin type
-     * @param in_comments
-     *            argin description
-     * @param out
-     *            argout type
-     * @param out_comments
-     *            argout description
-     */
-    // ===============================================================
-    public GetReportLatestErrorClass(String name, int in, int out, String in_comments,
-	    String out_comments) {
-	super(name, in, out, in_comments, out_comments);
-    }
-
-    // ===============================================================
-    /**
-     * Constructor for Command class GetReportLatestErrorClass
-     * 
-     * @param name
-     *            command name
-     * @param in
-     *            argin type
-     * @param in_comments
-     *            argin description
-     * @param out
-     *            argout type
-     * @param out_comments
-     *            argout description
-     * @param level
-     *            The command display type OPERATOR or EXPERT
-     */
-    // ===============================================================
-    public GetReportLatestErrorClass(String name, int in, int out, String in_comments,
-	    String out_comments, DispLevel level) {
-	super(name, in, out, in_comments, out_comments, level);
-    }
-
-    // ===============================================================
-    /**
-     * return the result of the device's command.
-     */
-    // ===============================================================
-    @Override
-    public Any execute(DeviceImpl device, Any in_any) throws DevFailed {
-	if (!(device instanceof HdbArchivingWatcher)) {
-	    Except.throw_exception("DEVICE_ERROR",
-		    "Device parameter is not instance of HdbArchivingWatcher",
-		    "HdbArchivingWatcher");
-	}
-
-	Util.out2.println("GetReportLatestErrorClass.execute(): arrived");
-	return this.insert(((HdbArchivingWatcher) (device)).get_report_latest_error());
-    }
-
-    // ===============================================================
-    /**
-     * Check if it is allowed to execute the command.
-     */
-    // ===============================================================
-    @Override
-    public boolean is_allowed(DeviceImpl device, Any data_in) {
-	if (device.get_state() == DevState.OFF || device.get_state() == DevState.INIT) {
-	    // End of Generated Code
-
-	    // Re-Start of Generated Code
-	    return false;
-	}
-	return true;
-    }
-}
-// -----------------------------------------------------------------------------
-/*
- * end of $Source:
- * /cvsroot/tango-cs/archiving/server/hdbtdbArchivingServers/src/
- * main/java/HdbArchivingWatcher/Commands/GetReportLatestErrorClass.java,v $
- */
diff --git a/src/main/java/HdbArchivingWatcher/Commands/IsAttributeCorrectlyArchivedCurrentClass.java b/src/main/java/HdbArchivingWatcher/Commands/IsAttributeCorrectlyArchivedCurrentClass.java
deleted file mode 100644
index 670df560ac237014bfed95a8bd910a30a957cb2a..0000000000000000000000000000000000000000
--- a/src/main/java/HdbArchivingWatcher/Commands/IsAttributeCorrectlyArchivedCurrentClass.java
+++ /dev/null
@@ -1,164 +0,0 @@
-//+======================================================================
-// $Source$
-//
-// Project:      Tango Device Server
-//
-// Description:  Java source code for the command TemplateClass of the
-//               ArchivingWatcher class.
-//
-// $Author$
-//
-// $Revision$
-//
-// $Log$
-// Revision 1.2  2009/12/17 12:47:15  pierrejoseph
-// CheckStyle:  Organize imports / Format
-//
-// Revision 1.1  2009/08/28 14:27:59  soleilarc
-// add and organize admin report commands to the watcher devices
-//
-// Revision 1.1  2006/08/24 13:51:57  ounsy
-// creation
-//
-// Revision 1.1  2006/01/19 16:36:59  ounsy
-// New device specialised in watching archiving.
-//
-//
-// copyleft :    European Synchrotron Radiation Facility
-//               BP 220, Grenoble 38043
-//               FRANCE
-//
-//-======================================================================
-//
-//  		This file is generated by POGO
-//	(Program Obviously used to Generate tango Object)
-//
-//         (c) - Software Engineering Group - ESRF
-//=============================================================================
-
-/**
- * @author	$Author$
- * @version	$Revision$
- */
-package HdbArchivingWatcher.Commands;
-
-import org.omg.CORBA.Any;
-
-import HdbArchivingWatcher.HdbArchivingWatcher;
-import fr.esrf.Tango.DevFailed;
-import fr.esrf.Tango.DevState;
-import fr.esrf.Tango.DispLevel;
-import fr.esrf.TangoDs.Command;
-import fr.esrf.TangoDs.DeviceImpl;
-import fr.esrf.TangoDs.Except;
-import fr.esrf.TangoDs.TangoConst;
-import fr.esrf.TangoDs.Util;
-
-/**
- * Class Description:
- * 
- */
-@Deprecated
-public class IsAttributeCorrectlyArchivedCurrentClass extends Command implements TangoConst {
-    // ===============================================================
-    /**
-     * Constructor for Command class IsAttributeCorrectlyArchivedCurrentClass
-     * 
-     * @param name
-     *            command name
-     * @param in
-     *            argin type
-     * @param out
-     *            argout type
-     */
-    // ===============================================================
-    public IsAttributeCorrectlyArchivedCurrentClass(String name, int in, int out) {
-	super(name, in, out);
-    }
-
-    // ===============================================================
-    /**
-     * Constructor for Command class IsAttributeCorrectlyArchivedCurrentClass
-     * 
-     * @param name
-     *            command name
-     * @param in
-     *            argin type
-     * @param in_comments
-     *            argin description
-     * @param out
-     *            argout type
-     * @param out_comments
-     *            argout description
-     */
-    // ===============================================================
-    public IsAttributeCorrectlyArchivedCurrentClass(String name, int in, int out,
-	    String in_comments, String out_comments) {
-	super(name, in, out, in_comments, out_comments);
-    }
-
-    // ===============================================================
-    /**
-     * Constructor for Command class IsAttributeCorrectlyArchivedCurrentClass
-     * 
-     * @param name
-     *            command name
-     * @param in
-     *            argin type
-     * @param in_comments
-     *            argin description
-     * @param out
-     *            argout type
-     * @param out_comments
-     *            argout description
-     * @param level
-     *            The command display type OPERATOR or EXPERT
-     */
-    // ===============================================================
-    public IsAttributeCorrectlyArchivedCurrentClass(String name, int in, int out,
-	    String in_comments, String out_comments, DispLevel level) {
-	super(name, in, out, in_comments, out_comments, level);
-    }
-
-    // ===============================================================
-    /**
-     * return the result of the device's command.
-     */
-    // ===============================================================
-    @Override
-    public Any execute(DeviceImpl device, Any in_any) throws DevFailed {
-	if (!(device instanceof HdbArchivingWatcher)) {
-	    Except.throw_exception("DEVICE_ERROR",
-		    "Device parameter is not instance of HdbArchivingWatcher",
-		    "HdbArchivingWatcher");
-	}
-
-	Util.out2.println("IsAttributeCorrectlyArchivedCurrentClass.execute(): arrived");
-	String argin = this.extract_DevString(in_any);
-	return this.insert(((HdbArchivingWatcher) (device))
-		.is_attribute_correctly_archived_current(argin));
-    }
-
-    // ===============================================================
-    /**
-     * Check if it is allowed to execute the command.
-     */
-    // ===============================================================
-    @Override
-    public boolean is_allowed(DeviceImpl device, Any data_in) {
-	if (device.get_state() == DevState.OFF || device.get_state() == DevState.INIT) {
-	    // End of Generated Code
-
-	    // Re-Start of Generated Code
-	    return false;
-	}
-	return true;
-    }
-}
-// -----------------------------------------------------------------------------
-/*
- * end of $Source:
- * /cvsroot/tango-cs/archiving/server/hdbtdbArchivingServers/src/
- * main/java/HdbArchivingWatcher
- * /Commands/IsAttributeCorrectlyArchivedCurrentClass.java,v $
- */
diff --git a/src/main/java/HdbArchivingWatcher/Commands/IsAttributeCorrectlyArchivedLatestErrorClass.java b/src/main/java/HdbArchivingWatcher/Commands/IsAttributeCorrectlyArchivedLatestErrorClass.java
deleted file mode 100644
index fb18bc1251ac1ff54a060e1f8f2337c170193489..0000000000000000000000000000000000000000
--- a/src/main/java/HdbArchivingWatcher/Commands/IsAttributeCorrectlyArchivedLatestErrorClass.java
+++ /dev/null
@@ -1,167 +0,0 @@
-//+======================================================================
-// $Source$
-//
-// Project:      Tango Device Server
-//
-// Description:  Java source code for the command TemplateClass of the
-//               ArchivingWatcher class.
-//
-// $Author$
-//
-// $Revision$
-//
-// $Log$
-// Revision 1.2  2009/12/17 12:47:15  pierrejoseph
-// CheckStyle:  Organize imports / Format
-//
-// Revision 1.1  2009/08/28 14:27:59  soleilarc
-// add and organize admin report commands to the watcher devices
-//
-// Revision 1.1  2006/08/24 13:51:57  ounsy
-// creation
-//
-// Revision 1.1  2006/01/19 16:36:59  ounsy
-// New device specialised in watching archiving.
-//
-//
-// copyleft :    European Synchrotron Radiation Facility
-//               BP 220, Grenoble 38043
-//               FRANCE
-//
-//-======================================================================
-//
-//  		This file is generated by POGO
-//	(Program Obviously used to Generate tango Object)
-//
-//         (c) - Software Engineering Group - ESRF
-//=============================================================================
-
-/**
- * @author	$Author$
- * @version	$Revision$
- */
-package HdbArchivingWatcher.Commands;
-
-import org.omg.CORBA.Any;
-
-import HdbArchivingWatcher.HdbArchivingWatcher;
-import fr.esrf.Tango.DevFailed;
-import fr.esrf.Tango.DevState;
-import fr.esrf.Tango.DispLevel;
-import fr.esrf.TangoDs.Command;
-import fr.esrf.TangoDs.DeviceImpl;
-import fr.esrf.TangoDs.Except;
-import fr.esrf.TangoDs.TangoConst;
-import fr.esrf.TangoDs.Util;
-
-/**
- * Class Description:
- * 
- */
-@Deprecated
-public class IsAttributeCorrectlyArchivedLatestErrorClass extends Command implements TangoConst {
-    // ===============================================================
-    /**
-     * Constructor for Command class
-     * IsAttributeCorrectlyArchivedLatestErrorClass
-     * 
-     * @param name
-     *            command name
-     * @param in
-     *            argin type
-     * @param out
-     *            argout type
-     */
-    // ===============================================================
-    public IsAttributeCorrectlyArchivedLatestErrorClass(String name, int in, int out) {
-	super(name, in, out);
-    }
-
-    // ===============================================================
-    /**
-     * Constructor for Command class
-     * IsAttributeCorrectlyArchivedLatestErrorClass
-     * 
-     * @param name
-     *            command name
-     * @param in
-     *            argin type
-     * @param in_comments
-     *            argin description
-     * @param out
-     *            argout type
-     * @param out_comments
-     *            argout description
-     */
-    // ===============================================================
-    public IsAttributeCorrectlyArchivedLatestErrorClass(String name, int in, int out,
-	    String in_comments, String out_comments) {
-	super(name, in, out, in_comments, out_comments);
-    }
-
-    // ===============================================================
-    /**
-     * Constructor for Command class
-     * IsAttributeCorrectlyArchivedLatestErrorClass
-     * 
-     * @param name
-     *            command name
-     * @param in
-     *            argin type
-     * @param in_comments
-     *            argin description
-     * @param out
-     *            argout type
-     * @param out_comments
-     *            argout description
-     * @param level
-     *            The command display type OPERATOR or EXPERT
-     */
-    // ===============================================================
-    public IsAttributeCorrectlyArchivedLatestErrorClass(String name, int in, int out,
-	    String in_comments, String out_comments, DispLevel level) {
-	super(name, in, out, in_comments, out_comments, level);
-    }
-
-    // ===============================================================
-    /**
-     * return the result of the device's command.
-     */
-    // ===============================================================
-    @Override
-    public Any execute(DeviceImpl device, Any in_any) throws DevFailed {
-	if (!(device instanceof HdbArchivingWatcher)) {
-	    Except.throw_exception("DEVICE_ERROR",
-		    "Device parameter is not instance of HdbArchivingWatcher",
-		    "HdbArchivingWatcher");
-	}
-
-	Util.out2.println("IsAttributeCorrectlyArchivedLatestErrorClass.execute(): arrived");
-	String argin = this.extract_DevString(in_any);
-	return this.insert(((HdbArchivingWatcher) (device))
-		.is_attribute_correctly_archived_latest_error(argin));
-    }
-
-    // ===============================================================
-    /**
-     * Check if it is allowed to execute the command.
-     */
-    // ===============================================================
-    @Override
-    public boolean is_allowed(DeviceImpl device, Any data_in) {
-	if (device.get_state() == DevState.OFF || device.get_state() == DevState.INIT) {
-	    // End of Generated Code
-
-	    // Re-Start of Generated Code
-	    return false;
-	}
-	return true;
-    }
-}
-// -----------------------------------------------------------------------------
-/*
- * end of $Source:
- * /cvsroot/tango-cs/archiving/server/hdbtdbArchivingServers/src/
- * main/java/HdbArchivingWatcher
- * /Commands/IsAttributeCorrectlyArchivedLatestErrorClass.java,v $
- */
diff --git a/src/main/java/HdbArchivingWatcher/Commands/ResetClass.java b/src/main/java/HdbArchivingWatcher/Commands/ResetClass.java
deleted file mode 100644
index 8e66d936cd2867fee0a067c90a9247860a65c4e8..0000000000000000000000000000000000000000
--- a/src/main/java/HdbArchivingWatcher/Commands/ResetClass.java
+++ /dev/null
@@ -1,162 +0,0 @@
-//+======================================================================
-// $Source$
-//
-// Project:      Tango Device Server
-//
-// Description:  Java source code for the command TemplateClass of the
-//               ArchivingWatcher class.
-//
-// $Author$
-//
-// $Revision$
-//
-// $Log$
-// Revision 1.2  2009/12/17 12:47:15  pierrejoseph
-// CheckStyle:  Organize imports / Format
-//
-// Revision 1.1  2009/08/28 14:27:59  soleilarc
-// add and organize admin report commands to the watcher devices
-//
-// Revision 1.1  2006/08/24 13:51:57  ounsy
-// creation
-//
-// Revision 1.1  2006/01/19 16:36:59  ounsy
-// New device specialised in watching archiving.
-//
-//
-// copyleft :    European Synchrotron Radiation Facility
-//               BP 220, Grenoble 38043
-//               FRANCE
-//
-//-======================================================================
-//
-//  		This file is generated by POGO
-//	(Program Obviously used to Generate tango Object)
-//
-//         (c) - Software Engineering Group - ESRF
-//=============================================================================
-
-/**
- * @author	$Author$
- * @version	$Revision$
- */
-package HdbArchivingWatcher.Commands;
-
-import org.omg.CORBA.Any;
-
-import HdbArchivingWatcher.HdbArchivingWatcher;
-import fr.esrf.Tango.DevFailed;
-import fr.esrf.Tango.DevState;
-import fr.esrf.Tango.DispLevel;
-import fr.esrf.TangoDs.Command;
-import fr.esrf.TangoDs.DeviceImpl;
-import fr.esrf.TangoDs.Except;
-import fr.esrf.TangoDs.TangoConst;
-import fr.esrf.TangoDs.Util;
-
-/**
- * Class Description:
- * 
- */
-@Deprecated
-public class ResetClass extends Command implements TangoConst {
-    // ===============================================================
-    /**
-     * Constructor for Command class ResetClass
-     * 
-     * @param name
-     *            command name
-     * @param in
-     *            argin type
-     * @param out
-     *            argout type
-     */
-    // ===============================================================
-    public ResetClass(String name, int in, int out) {
-	super(name, in, out);
-    }
-
-    // ===============================================================
-    /**
-     * Constructor for Command class ResetClass
-     * 
-     * @param name
-     *            command name
-     * @param in
-     *            argin type
-     * @param in_comments
-     *            argin description
-     * @param out
-     *            argout type
-     * @param out_comments
-     *            argout description
-     */
-    // ===============================================================
-    public ResetClass(String name, int in, int out, String in_comments, String out_comments) {
-	super(name, in, out, in_comments, out_comments);
-    }
-
-    // ===============================================================
-    /**
-     * Constructor for Command class ResetClass
-     * 
-     * @param name
-     *            command name
-     * @param in
-     *            argin type
-     * @param in_comments
-     *            argin description
-     * @param out
-     *            argout type
-     * @param out_comments
-     *            argout description
-     * @param level
-     *            The command display type OPERATOR or EXPERT
-     */
-    // ===============================================================
-    public ResetClass(String name, int in, int out, String in_comments, String out_comments,
-	    DispLevel level) {
-	super(name, in, out, in_comments, out_comments, level);
-    }
-
-    // ===============================================================
-    /**
-     * return the result of the device's command.
-     */
-    // ===============================================================
-    @Override
-    public Any execute(DeviceImpl device, Any in_any) throws DevFailed {
-	if (!(device instanceof HdbArchivingWatcher)) {
-	    Except.throw_exception("DEVICE_ERROR",
-		    "Device parameter is not instance of HdbArchivingWatcher",
-		    "HdbArchivingWatcher");
-	}
-
-	Util.out2.println("ResetClass.execute(): arrived");
-	((HdbArchivingWatcher) (device)).reset();
-	return this.insert();
-    }
-
-    // ===============================================================
-    /**
-     * Check if it is allowed to execute the command.
-     */
-    // ===============================================================
-    @Override
-    public boolean is_allowed(DeviceImpl device, Any data_in) {
-	if (device.get_state() == DevState.ON || device.get_state() == DevState.OFF
-		|| device.get_state() == DevState.FAULT || device.get_state() == DevState.INIT) {
-	    // End of Generated Code
-
-	    // Re-Start of Generated Code
-	    return false;
-	}
-	return true;
-    }
-}
-// -----------------------------------------------------------------------------
-/*
- * end of $Source:
- * /cvsroot/tango-cs/archiving/server/hdbtdbArchivingServers/src/
- * main/java/HdbArchivingWatcher/Commands/ResetClass.java,v $
- */
diff --git a/src/main/java/HdbArchivingWatcher/Commands/RestartClass.java b/src/main/java/HdbArchivingWatcher/Commands/RestartClass.java
deleted file mode 100644
index f2364300edc4167b2b40e76812d7e843c38ca913..0000000000000000000000000000000000000000
--- a/src/main/java/HdbArchivingWatcher/Commands/RestartClass.java
+++ /dev/null
@@ -1,106 +0,0 @@
-package HdbArchivingWatcher.Commands;
-
-import org.omg.CORBA.Any;
-
-import HdbArchivingWatcher.HdbArchivingWatcher;
-import fr.esrf.Tango.DevFailed;
-import fr.esrf.Tango.DispLevel;
-import fr.esrf.TangoDs.Command;
-import fr.esrf.TangoDs.DeviceImpl;
-import fr.esrf.TangoDs.Except;
-import fr.esrf.TangoDs.TangoConst;
-import fr.esrf.TangoDs.Util;
-
-/**
- * Class Description:
- * 
- */
-@Deprecated
-public class RestartClass extends Command implements TangoConst {
-    // ===============================================================
-    /**
-     * Constructor for Command class RestartClass
-     * 
-     * @param name
-     *            command name
-     * @param in
-     *            argin type
-     * @param out
-     *            argout type
-     */
-    // ===============================================================
-    public RestartClass(String name, int in, int out) {
-	super(name, in, out);
-    }
-
-    // ===============================================================
-    /**
-     * Constructor for Command class RestartClass
-     * 
-     * @param name
-     *            command name
-     * @param in
-     *            argin type
-     * @param in_comments
-     *            argin description
-     * @param out
-     *            argout type
-     * @param out_comments
-     *            argout description
-     */
-    // ===============================================================
-    public RestartClass(String name, int in, int out, String in_comments, String out_comments) {
-	super(name, in, out, in_comments, out_comments);
-    }
-
-    // ===============================================================
-    /**
-     * Constructor for Command class RestartClass
-     * 
-     * @param name
-     *            command name
-     * @param in
-     *            argin type
-     * @param in_comments
-     *            argin description
-     * @param out
-     *            argout type
-     * @param out_comments
-     *            argout description
-     * @param level
-     *            The command display type OPERATOR or EXPERT
-     */
-    // ===============================================================
-    public RestartClass(String name, int in, int out, String in_comments, String out_comments,
-	    DispLevel level) {
-	super(name, in, out, in_comments, out_comments, level);
-    }
-
-    // ===============================================================
-    /**
-     * return the result of the device's command.
-     */
-    // ===============================================================
-    @Override
-    public Any execute(DeviceImpl device, Any in_any) throws DevFailed {
-	if (!(device instanceof HdbArchivingWatcher)) {
-	    Except.throw_exception("DEVICE_ERROR",
-		    "Device parameter is not instance of HdbArchivingWatcher",
-		    "HdbArchivingWatcher");
-	}
-
-	Util.out2.println("RestartClass.execute(): arrived");
-	((HdbArchivingWatcher) (device)).restart();
-	return this.insert();
-    }
-
-    // ===============================================================
-    /**
-     * Check if it is allowed to execute the command.
-     */
-    // ===============================================================
-    @Override
-    public boolean is_allowed(DeviceImpl device, Any data_in) {
-	return true;
-    }
-}
diff --git a/src/main/java/HdbArchivingWatcher/Commands/StartAbsoluteClass.java b/src/main/java/HdbArchivingWatcher/Commands/StartAbsoluteClass.java
deleted file mode 100644
index 56adc5a69a9003f991740dfa88621908c6957c9d..0000000000000000000000000000000000000000
--- a/src/main/java/HdbArchivingWatcher/Commands/StartAbsoluteClass.java
+++ /dev/null
@@ -1,162 +0,0 @@
-//+======================================================================
-// $Source$
-//
-// Project:      Tango Device Server
-//
-// Description:  Java source code for the command TemplateClass of the
-//               ArchivingWatcher class.
-//
-// $Author$
-//
-// $Revision$
-//
-// $Log$
-// Revision 1.2  2009/12/17 12:47:16  pierrejoseph
-// CheckStyle:  Organize imports / Format
-//
-// Revision 1.1  2009/08/28 14:27:59  soleilarc
-// add and organize admin report commands to the watcher devices
-//
-// Revision 1.1  2006/08/24 13:51:57  ounsy
-// creation
-//
-// Revision 1.1  2006/01/27 13:07:54  ounsy
-// New commands to start archiving control in absolute/relative mode
-//
-//
-// copyleft :    European Synchrotron Radiation Facility
-//               BP 220, Grenoble 38043
-//               FRANCE
-//
-//-======================================================================
-//
-//  		This file is generated by POGO
-//	(Program Obviously used to Generate tango Object)
-//
-//         (c) - Software Engineering Group - ESRF
-//=============================================================================
-
-/**
- * @author	$Author$
- * @version	$Revision$
- */
-package HdbArchivingWatcher.Commands;
-
-import org.omg.CORBA.Any;
-
-import HdbArchivingWatcher.HdbArchivingWatcher;
-import fr.esrf.Tango.DevFailed;
-import fr.esrf.Tango.DevState;
-import fr.esrf.Tango.DispLevel;
-import fr.esrf.TangoDs.Command;
-import fr.esrf.TangoDs.DeviceImpl;
-import fr.esrf.TangoDs.Except;
-import fr.esrf.TangoDs.TangoConst;
-import fr.esrf.TangoDs.Util;
-
-/**
- * Class Description: Start in absolute mode
- */
-@Deprecated
-public class StartAbsoluteClass extends Command implements TangoConst {
-    // ===============================================================
-    /**
-     * Constructor for Command class StartAbsoluteClass
-     * 
-     * @param name
-     *            command name
-     * @param in
-     *            argin type
-     * @param out
-     *            argout type
-     */
-    // ===============================================================
-    public StartAbsoluteClass(String name, int in, int out) {
-	super(name, in, out);
-    }
-
-    // ===============================================================
-    /**
-     * Constructor for Command class StartAbsoluteClass
-     * 
-     * @param name
-     *            command name
-     * @param in
-     *            argin type
-     * @param in_comments
-     *            argin description
-     * @param out
-     *            argout type
-     * @param out_comments
-     *            argout description
-     */
-    // ===============================================================
-    public StartAbsoluteClass(String name, int in, int out, String in_comments, String out_comments) {
-	super(name, in, out, in_comments, out_comments);
-    }
-
-    // ===============================================================
-    /**
-     * Constructor for Command class StartAbsoluteClass
-     * 
-     * @param name
-     *            command name
-     * @param in
-     *            argin type
-     * @param in_comments
-     *            argin description
-     * @param out
-     *            argout type
-     * @param out_comments
-     *            argout description
-     * @param level
-     *            The command display type OPERATOR or EXPERT
-     */
-    // ===============================================================
-    public StartAbsoluteClass(String name, int in, int out, String in_comments,
-	    String out_comments, DispLevel level) {
-	super(name, in, out, in_comments, out_comments, level);
-    }
-
-    // ===============================================================
-    /**
-     * return the result of the device's command.
-     */
-    // ===============================================================
-    @Override
-    public Any execute(DeviceImpl device, Any in_any) throws DevFailed {
-	if (!(device instanceof HdbArchivingWatcher)) {
-	    Except.throw_exception("DEVICE_ERROR",
-		    "Device parameter is not instance of HdbArchivingWatcher",
-		    "HdbArchivingWatcher");
-	}
-
-	Util.out2.println("StartAbsoluteClass.execute(): arrived");
-	int[] argin = this.extract_DevVarLongArray(in_any);
-	((HdbArchivingWatcher) (device)).start_absolute(argin);
-	return this.insert();
-    }
-
-    // ===============================================================
-    /**
-     * Check if it is allowed to execute the command.
-     */
-    // ===============================================================
-    @Override
-    public boolean is_allowed(DeviceImpl device, Any data_in) {
-	if (device.get_state() == DevState.ON || device.get_state() == DevState.FAULT
-		|| device.get_state() == DevState.INIT || device.get_state() == DevState.ALARM) {
-	    // End of Generated Code
-
-	    // Re-Start of Generated Code
-	    return false;
-	}
-	return true;
-    }
-}
-// -----------------------------------------------------------------------------
-/*
- * end of $Source:
- * /cvsroot/tango-cs/archiving/server/hdbtdbArchivingServers/src/
- * main/java/HdbArchivingWatcher/Commands/StartAbsoluteClass.java,v $
- */
diff --git a/src/main/java/HdbArchivingWatcher/Commands/StartClass.java b/src/main/java/HdbArchivingWatcher/Commands/StartClass.java
deleted file mode 100644
index 577df9e3038d41a405372d3e4f6296fa9b880517..0000000000000000000000000000000000000000
--- a/src/main/java/HdbArchivingWatcher/Commands/StartClass.java
+++ /dev/null
@@ -1,162 +0,0 @@
-//+======================================================================
-// $Source$
-//
-// Project:      Tango Device Server
-//
-// Description:  Java source code for the command TemplateClass of the
-//               ArchivingWatcher class.
-//
-// $Author$
-//
-// $Revision$
-//
-// $Log$
-// Revision 1.2  2009/12/17 12:47:16  pierrejoseph
-// CheckStyle:  Organize imports / Format
-//
-// Revision 1.1  2009/08/28 14:27:59  soleilarc
-// add and organize admin report commands to the watcher devices
-//
-// Revision 1.1  2006/08/24 13:51:57  ounsy
-// creation
-//
-// Revision 1.1  2006/01/19 16:36:59  ounsy
-// New device specialised in watching archiving.
-//
-//
-// copyleft :    European Synchrotron Radiation Facility
-//               BP 220, Grenoble 38043
-//               FRANCE
-//
-//-======================================================================
-//
-//  		This file is generated by POGO
-//	(Program Obviously used to Generate tango Object)
-//
-//         (c) - Software Engineering Group - ESRF
-//=============================================================================
-
-/**
- * @author	$Author$
- * @version	$Revision$
- */
-package HdbArchivingWatcher.Commands;
-
-import org.omg.CORBA.Any;
-
-import HdbArchivingWatcher.HdbArchivingWatcher;
-import fr.esrf.Tango.DevFailed;
-import fr.esrf.Tango.DevState;
-import fr.esrf.Tango.DispLevel;
-import fr.esrf.TangoDs.Command;
-import fr.esrf.TangoDs.DeviceImpl;
-import fr.esrf.TangoDs.Except;
-import fr.esrf.TangoDs.TangoConst;
-import fr.esrf.TangoDs.Util;
-
-/**
- * Class Description:
- * 
- */
-@Deprecated
-public class StartClass extends Command implements TangoConst {
-    // ===============================================================
-    /**
-     * Constructor for Command class StartClass
-     * 
-     * @param name
-     *            command name
-     * @param in
-     *            argin type
-     * @param out
-     *            argout type
-     */
-    // ===============================================================
-    public StartClass(String name, int in, int out) {
-	super(name, in, out);
-    }
-
-    // ===============================================================
-    /**
-     * Constructor for Command class StartClass
-     * 
-     * @param name
-     *            command name
-     * @param in
-     *            argin type
-     * @param in_comments
-     *            argin description
-     * @param out
-     *            argout type
-     * @param out_comments
-     *            argout description
-     */
-    // ===============================================================
-    public StartClass(String name, int in, int out, String in_comments, String out_comments) {
-	super(name, in, out, in_comments, out_comments);
-    }
-
-    // ===============================================================
-    /**
-     * Constructor for Command class StartClass
-     * 
-     * @param name
-     *            command name
-     * @param in
-     *            argin type
-     * @param in_comments
-     *            argin description
-     * @param out
-     *            argout type
-     * @param out_comments
-     *            argout description
-     * @param level
-     *            The command display type OPERATOR or EXPERT
-     */
-    // ===============================================================
-    public StartClass(String name, int in, int out, String in_comments, String out_comments,
-	    DispLevel level) {
-	super(name, in, out, in_comments, out_comments, level);
-    }
-
-    // ===============================================================
-    /**
-     * return the result of the device's command.
-     */
-    // ===============================================================
-    @Override
-    public Any execute(DeviceImpl device, Any in_any) throws DevFailed {
-	if (!(device instanceof HdbArchivingWatcher)) {
-	    Except.throw_exception("DEVICE_ERROR",
-		    "Device parameter is not instance of HdbArchivingWatcher",
-		    "HdbArchivingWatcher");
-	}
-
-	Util.out2.println("StartClass.execute(): arrived");
-	((HdbArchivingWatcher) (device)).start();
-	return this.insert();
-    }
-
-    // ===============================================================
-    /**
-     * Check if it is allowed to execute the command.
-     */
-    // ===============================================================
-    @Override
-    public boolean is_allowed(DeviceImpl device, Any data_in) {
-	if (device.get_state() == DevState.ON || device.get_state() == DevState.FAULT
-		|| device.get_state() == DevState.INIT || device.get_state() == DevState.ALARM) {
-	    // End of Generated Code
-
-	    // Re-Start of Generated Code
-	    return false;
-	}
-	return true;
-    }
-}
-// -----------------------------------------------------------------------------
-/*
- * end of $Source:
- * /cvsroot/tango-cs/archiving/server/hdbtdbArchivingServers/src/
- * main/java/HdbArchivingWatcher/Commands/StartClass.java,v $
- */
diff --git a/src/main/java/HdbArchivingWatcher/Commands/StartRelativeClass.java b/src/main/java/HdbArchivingWatcher/Commands/StartRelativeClass.java
deleted file mode 100644
index 38bbaca506d71728b25447d3002d775e0ad0f313..0000000000000000000000000000000000000000
--- a/src/main/java/HdbArchivingWatcher/Commands/StartRelativeClass.java
+++ /dev/null
@@ -1,162 +0,0 @@
-//+======================================================================
-// $Source$
-//
-// Project:      Tango Device Server
-//
-// Description:  Java source code for the command TemplateClass of the
-//               ArchivingWatcher class.
-//
-// $Author$
-//
-// $Revision$
-//
-// $Log$
-// Revision 1.2  2009/12/17 12:47:15  pierrejoseph
-// CheckStyle:  Organize imports / Format
-//
-// Revision 1.1  2009/08/28 14:27:59  soleilarc
-// add and organize admin report commands to the watcher devices
-//
-// Revision 1.1  2006/08/24 13:51:57  ounsy
-// creation
-//
-// Revision 1.1  2006/01/27 13:07:54  ounsy
-// New commands to start archiving control in absolute/relative mode
-//
-//
-// copyleft :    European Synchrotron Radiation Facility
-//               BP 220, Grenoble 38043
-//               FRANCE
-//
-//-======================================================================
-//
-//  		This file is generated by POGO
-//	(Program Obviously used to Generate tango Object)
-//
-//         (c) - Software Engineering Group - ESRF
-//=============================================================================
-
-/**
- * @author	$Author$
- * @version	$Revision$
- */
-package HdbArchivingWatcher.Commands;
-
-import org.omg.CORBA.Any;
-
-import HdbArchivingWatcher.HdbArchivingWatcher;
-import fr.esrf.Tango.DevFailed;
-import fr.esrf.Tango.DevState;
-import fr.esrf.Tango.DispLevel;
-import fr.esrf.TangoDs.Command;
-import fr.esrf.TangoDs.DeviceImpl;
-import fr.esrf.TangoDs.Except;
-import fr.esrf.TangoDs.TangoConst;
-import fr.esrf.TangoDs.Util;
-
-/**
- * Class Description: Start in relative mode
- */
-@Deprecated
-public class StartRelativeClass extends Command implements TangoConst {
-    // ===============================================================
-    /**
-     * Constructor for Command class StartRelativeClass
-     * 
-     * @param name
-     *            command name
-     * @param in
-     *            argin type
-     * @param out
-     *            argout type
-     */
-    // ===============================================================
-    public StartRelativeClass(String name, int in, int out) {
-	super(name, in, out);
-    }
-
-    // ===============================================================
-    /**
-     * Constructor for Command class StartRelativeClass
-     * 
-     * @param name
-     *            command name
-     * @param in
-     *            argin type
-     * @param in_comments
-     *            argin description
-     * @param out
-     *            argout type
-     * @param out_comments
-     *            argout description
-     */
-    // ===============================================================
-    public StartRelativeClass(String name, int in, int out, String in_comments, String out_comments) {
-	super(name, in, out, in_comments, out_comments);
-    }
-
-    // ===============================================================
-    /**
-     * Constructor for Command class StartRelativeClass
-     * 
-     * @param name
-     *            command name
-     * @param in
-     *            argin type
-     * @param in_comments
-     *            argin description
-     * @param out
-     *            argout type
-     * @param out_comments
-     *            argout description
-     * @param level
-     *            The command display type OPERATOR or EXPERT
-     */
-    // ===============================================================
-    public StartRelativeClass(String name, int in, int out, String in_comments,
-	    String out_comments, DispLevel level) {
-	super(name, in, out, in_comments, out_comments, level);
-    }
-
-    // ===============================================================
-    /**
-     * return the result of the device's command.
-     */
-    // ===============================================================
-    @Override
-    public Any execute(DeviceImpl device, Any in_any) throws DevFailed {
-	if (!(device instanceof HdbArchivingWatcher)) {
-	    Except.throw_exception("DEVICE_ERROR",
-		    "Device parameter is not instance of HdbArchivingWatcher",
-		    "HdbArchivingWatcher");
-	}
-
-	Util.out2.println("StartRelativeClass.execute(): arrived");
-	double argin = this.extract_DevDouble(in_any);
-	((HdbArchivingWatcher) (device)).start_relative(argin);
-	return this.insert();
-    }
-
-    // ===============================================================
-    /**
-     * Check if it is allowed to execute the command.
-     */
-    // ===============================================================
-    @Override
-    public boolean is_allowed(DeviceImpl device, Any data_in) {
-	if (device.get_state() == DevState.ON || device.get_state() == DevState.FAULT
-		|| device.get_state() == DevState.INIT || device.get_state() == DevState.ALARM) {
-	    // End of Generated Code
-
-	    // Re-Start of Generated Code
-	    return false;
-	}
-	return true;
-    }
-}
-// -----------------------------------------------------------------------------
-/*
- * end of $Source:
- * /cvsroot/tango-cs/archiving/server/hdbtdbArchivingServers/src/
- * main/java/HdbArchivingWatcher/Commands/StartRelativeClass.java,v $
- */
diff --git a/src/main/java/HdbArchivingWatcher/Commands/StopClass.java b/src/main/java/HdbArchivingWatcher/Commands/StopClass.java
deleted file mode 100644
index fcb0380e289ed6265625b4c659c4045657652463..0000000000000000000000000000000000000000
--- a/src/main/java/HdbArchivingWatcher/Commands/StopClass.java
+++ /dev/null
@@ -1,161 +0,0 @@
-//+======================================================================
-// $Source$
-//
-// Project:      Tango Device Server
-//
-// Description:  Java source code for the command TemplateClass of the
-//               ArchivingWatcher class.
-//
-// $Author$
-//
-// $Revision$
-//
-// $Log$
-// Revision 1.2  2009/12/17 12:47:16  pierrejoseph
-// CheckStyle:  Organize imports / Format
-//
-// Revision 1.1  2009/08/28 14:27:59  soleilarc
-// add and organize admin report commands to the watcher devices
-//
-// Revision 1.1  2006/08/24 13:51:57  ounsy
-// creation
-//
-// Revision 1.1  2006/01/19 16:36:59  ounsy
-// New device specialised in watching archiving.
-//
-//
-// copyleft :    European Synchrotron Radiation Facility
-//               BP 220, Grenoble 38043
-//               FRANCE
-//
-//-======================================================================
-//
-//  		This file is generated by POGO
-//	(Program Obviously used to Generate tango Object)
-//
-//         (c) - Software Engineering Group - ESRF
-//=============================================================================
-
-/**
- * @author	$Author$
- * @version	$Revision$
- */
-package HdbArchivingWatcher.Commands;
-
-import org.omg.CORBA.Any;
-
-import HdbArchivingWatcher.HdbArchivingWatcher;
-import fr.esrf.Tango.DevFailed;
-import fr.esrf.Tango.DevState;
-import fr.esrf.Tango.DispLevel;
-import fr.esrf.TangoDs.Command;
-import fr.esrf.TangoDs.DeviceImpl;
-import fr.esrf.TangoDs.Except;
-import fr.esrf.TangoDs.TangoConst;
-import fr.esrf.TangoDs.Util;
-
-/**
- * Class Description:
- * 
- */
-@Deprecated
-public class StopClass extends Command implements TangoConst {
-    // ===============================================================
-    /**
-     * Constructor for Command class StopClass
-     * 
-     * @param name
-     *            command name
-     * @param in
-     *            argin type
-     * @param out
-     *            argout type
-     */
-    // ===============================================================
-    public StopClass(String name, int in, int out) {
-	super(name, in, out);
-    }
-
-    // ===============================================================
-    /**
-     * Constructor for Command class StopClass
-     * 
-     * @param name
-     *            command name
-     * @param in
-     *            argin type
-     * @param in_comments
-     *            argin description
-     * @param out
-     *            argout type
-     * @param out_comments
-     *            argout description
-     */
-    // ===============================================================
-    public StopClass(String name, int in, int out, String in_comments, String out_comments) {
-	super(name, in, out, in_comments, out_comments);
-    }
-
-    // ===============================================================
-    /**
-     * Constructor for Command class StopClass
-     * 
-     * @param name
-     *            command name
-     * @param in
-     *            argin type
-     * @param in_comments
-     *            argin description
-     * @param out
-     *            argout type
-     * @param out_comments
-     *            argout description
-     * @param level
-     *            The command display type OPERATOR or EXPERT
-     */
-    // ===============================================================
-    public StopClass(String name, int in, int out, String in_comments, String out_comments,
-	    DispLevel level) {
-	super(name, in, out, in_comments, out_comments, level);
-    }
-
-    // ===============================================================
-    /**
-     * return the result of the device's command.
-     */
-    // ===============================================================
-    @Override
-    public Any execute(DeviceImpl device, Any in_any) throws DevFailed {
-	if (!(device instanceof HdbArchivingWatcher)) {
-	    Except.throw_exception("DEVICE_ERROR",
-		    "Device parameter is not instance of HdbArchivingWatcher",
-		    "HdbArchivingWatcher");
-	}
-
-	Util.out2.println("StopClass.execute(): arrived");
-	((HdbArchivingWatcher) (device)).stop();
-	return this.insert();
-    }
-
-    // ===============================================================
-    /**
-     * Check if it is allowed to execute the command.
-     */
-    // ===============================================================
-    @Override
-    public boolean is_allowed(DeviceImpl device, Any data_in) {
-	if (device.get_state() == DevState.OFF) {
-	    // End of Generated Code
-
-	    // Re-Start of Generated Code
-	    return false;
-	}
-	return true;
-    }
-}
-// -----------------------------------------------------------------------------
-/*
- * end of $Source:
- * /cvsroot/tango-cs/archiving/server/hdbtdbArchivingServers/src/
- * main/java/HdbArchivingWatcher/Commands/StopClass.java,v $
- */
diff --git a/src/main/java/HdbArchivingWatcher/HdbArchivingWatcher.java b/src/main/java/HdbArchivingWatcher/HdbArchivingWatcher.java
deleted file mode 100644
index bba1d51bda0b73cc730f690a8cbbf4bd22f88af3..0000000000000000000000000000000000000000
--- a/src/main/java/HdbArchivingWatcher/HdbArchivingWatcher.java
+++ /dev/null
@@ -1,1079 +0,0 @@
-package HdbArchivingWatcher;
-
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.Collections;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-import java.util.Vector;
-
-import org.omg.CORBA.SystemException;
-import org.omg.CORBA.UserException;
-import org.tango.utils.DevFailedUtils;
-
-import Common.Watcher.AbsArchivingWatcher;
-import fr.esrf.Tango.DevError;
-import fr.esrf.Tango.DevFailed;
-import fr.esrf.Tango.DevState;
-import fr.esrf.Tango.ErrSeverity;
-import fr.esrf.TangoApi.ApiUtil;
-import fr.esrf.TangoApi.DbDatum;
-import fr.esrf.TangoApi.DeviceData;
-import fr.esrf.TangoApi.DeviceProxy;
-import fr.esrf.TangoApi.Group.Group;
-import fr.esrf.TangoApi.Group.GroupCmdReply;
-import fr.esrf.TangoApi.Group.GroupCmdReplyList;
-import fr.esrf.TangoDs.Attribute;
-import fr.esrf.TangoDs.DeviceClass;
-import fr.esrf.TangoDs.Except;
-import fr.esrf.TangoDs.Util;
-import fr.soleil.archiving.common.api.exception.ArchivingException;
-import fr.soleil.archiving.hdbtdb.api.manager.HdbArchivingManagerApiRef;
-import fr.soleil.archiving.hdbtdb.api.tools.mode.Mode;
-import fr.soleil.archiving.hdbtdb.api.watch.dto.ArchivingAttribute;
-import fr.soleil.archiving.hdbtdb.api.watch.dto.ArchivingAttributeSubName;
-import fr.soleil.archiving.hdbtdb.api.watch.dto.ControlResult;
-import fr.soleil.archiving.hdbtdb.api.watch.dto.ControlResultLine;
-import fr.soleil.archiving.hdbtdb.api.watch.dto.Domain;
-import fr.soleil.archiving.hdbtdb.api.watch.dto.ModeData;
-import fr.soleil.archiving.hdbtdb.api.watch.dto.comparators.ArchivingAttributeComparator;
-import fr.soleil.archiving.hdbtdb.api.watch.lifecycle.DefaultLifeCycleManager;
-import fr.soleil.archiving.hdbtdb.api.watch.strategy.delay.IDelayManager;
-
-/**
- * Class Description: This device is in charge of controlling HDB archiving. It
- * does so by comparing the theoretical archiving (the attributes that have been
- * registered for archiving) with the effective archiving (are records being
- * added for the registered attributes). If the effective archiving matches the
- * theoretical archiving, the attribute is called "OK", otherwise "KO". The
- * tightness of the required matching has a default value, but can be
- * user-defined (through expert commands).
- * 
- * ArchivingWatcher controlls all N registered attributes during a full cycle,
- * which duration T is about 4 hours. During one cycle, n sub-controls ("steps"
- * henceforth) are done, for N/n attributes each time (n is chosen so that the
- * control state is refreshed often, and that the database isn't accessed too
- * frequently).
- * 
- * Commands suffixed by "Current" return control information related to the
- * current step, ie. information that is refreshed about every 10 seconds.
- * Commands suffixed by "LatestError" return control information related to the
- * latest full cycle having KO attributes, ie. information that is refreshed
- * about every 4 hours.
- * 
- * Once a cycle has KO attributes, the device's state becomes ALARM, and stays
- * the same even if later cycles have none. This is so that the operator is
- * warned of the archiving problem. After he is, he can "reset" the device's
- * state to normal.
- * 
- * @author $Author: pierrejoseph $
- * @version $Revision: 1.12 $
- */
-
-// --------- Start of States Description ----------
-/*
- * Device States Description: DevState.ON : Controlling. DevState.OFF : Standby.
- * DevState.FAULT : Problem to connect to the database or other severe device
- * conditions. DevState.INIT : Device was started, but no control step has been
- * completed yet. Please Wait. DevState.ALARM : Archiving problems have been
- * detected during this cycle or a previous cycle.
- */
-// --------- End of States Description ----------
-@Deprecated
-public class HdbArchivingWatcher extends AbsArchivingWatcher {
-    // private int state;
-    private final String m_version;
-    // --------- Start of attributes data members ----------
-
-    protected short[] attr_ArchivingHealth_read = new short[1];
-    protected String[] attr_FormattedReport_read = new String[10000];
-
-    // --------- End of attributes data members ----------
-
-    // Add your own data members here
-    private ControlResult controlResult;
-    private ArchivingAttributeComparator archivingAttributeComparator;
-    private IDelayManager delayManager;
-
-    // --------------------------------------
-
-    // =========================================================
-    /**
-     * Constructor for simulated Time Device Server.
-     * 
-     * @param cl
-     *            The DeviceClass object
-     * @param s
-     *            The Device name.
-     * @param version
-     *            The device version
-     */
-    public HdbArchivingWatcher(final DeviceClass cl, final String s, final String version) throws DevFailed {
-        super(cl, s);
-        this.m_version = version;
-        this.init_device();
-    }
-
-    // =========================================================
-    /**
-     * Constructor for simulated Time Device Server.
-     * 
-     * @param cl
-     *            The DeviceClass object
-     * @param s
-     *            The Device name.
-     * @param d
-     *            Device description.
-     * @param version
-     *            The device version
-     */
-    public HdbArchivingWatcher(final DeviceClass cl, final String s, final String d, final String version) throws DevFailed {
-        super(cl, s, d);
-        this.m_version = version;
-        this.init_device();
-    }
-
-    @Override
-    protected DbDatum getClassProperty(final String name) {
-        final HdbArchivingWatcherClass ds_class = (HdbArchivingWatcherClass) super.get_device_class();
-        return ds_class.get_class_property(name);
-    }
-
-    // =========================================================
-    /**
-     * Initialize the device.
-     */
-    // =========================================================
-    @Override
-    public void init_device() throws DevFailed {
-        this.get_device_property();
-        this.initHdbConnectionInfos();
-
-        // Initialise variables to default values
-        // super.initArchivingDataWatch();
-
-        this.initLifeCycleManager(DBtype.HDB);
-
-        this.delayManager = this.getDelayManager();
-        this.archivingAttributeComparator = new ArchivingAttributeComparator();
-    }
-
-    // =========================================================
-    /**
-     * Method always executed before command execution.
-     */
-    // =========================================================
-    @Override
-    public void always_executed_hook() {
-        // get_logger().info("In always_executed_hook method()");
-    }
-
-    // ===================================================================
-    /**
-     * ask all archivers for their KO attributes
-     * 
-     * @return
-     * @throws DevFailed
-     */
-    public String[] getKOAttributesFromArchivers(final boolean doRetry) throws DevFailed {
-        final List<String> archiversStatus = new ArrayList<String>();
-        final String[] archiverNames = ApiUtil.get_db_obj().get_device_exported_for_class(
-                HdbArchivingManagerApiRef.CLASS_DEVICE);
-        final Group group = new Group("archivers");
-        group.add(archiverNames);
-        final GroupCmdReplyList replies = group.command_inout("GetKOAttributes", true);
-        for (final Object reply : replies) {
-            final GroupCmdReply r = (GroupCmdReply) reply;
-            try {
-                final DeviceData result = r.get_data();
-                final String archiverStatus = r.dev_name() + " " + Arrays.toString(result.extractStringArray());
-                archiversStatus.add(archiverStatus);
-                if (doRetry) {
-                    new DeviceProxy(r.dev_name()).command_inout_asynch("RetryForAttribute", result, true);
-                }
-            } catch (final DevFailed e) {
-                archiversStatus.add(r.dev_name() + " ERROR");
-            }
-        }
-        return archiversStatus.toArray(new String[archiversStatus.size()]);
-    }
-
-    // ===================================================================
-    /**
-     * Method called by the read_attributes CORBA operation to read device
-     * hardware
-     * 
-     * @param attr_list
-     *            Vector of index in the attribute vector of attribute to be
-     *            read
-     * @throws DevFailed
-     */
-    // ===================================================================
-    @Override
-    public void read_attr_hardware(@SuppressWarnings("rawtypes") final Vector attr_list) throws DevFailed {
-        this.controlResult = this.updateControlResult();
-    }
-
-    // ===================================================================
-    /**
-     * Method called by the read_attributes CORBA operation to set internal
-     * attribute value.
-     * 
-     * @param attr
-     *            reference to the Attribute object
-     */
-    // ===================================================================
-    @Override
-    public void read_attr(final Attribute attr) throws DevFailed {
-        final String attr_name = attr.get_name();
-        if (attr_name.equals("ArchivingHealth")) {
-            final int code = this.controlResult == null ? ControlResult.NOT_READY : this.controlResult.getCode();
-            attr.set_value((short) code);
-        } else if (attr_name.equals("FormattedReport")) {
-            final String report = this.controlResult == null ? ControlResult.EMPTY_REPORT : this.controlResult
-                    .getReport();
-            final String[] res = new String[1];
-            res[0] = report;
-            attr.set_value(res, 1);
-        } else if (attr_name == "version") {
-            attr.set_value(this.m_version);
-        } else if (attr_name == "koAttributes") {
-            attr.set_value(this.controlResult.getNumberOfKoAttributes());
-        } else if (attr_name == "nullAttributes") {
-            attr.set_value(this.controlResult.getNumberOfAttributesControlledWithSuccessWithNullValue());
-        }
-        // ---------------------------------
-    }
-
-    // =========================================================
-    /**
-     * Execute command "GetReport" on device. Returns the complete formatted
-     * report
-     * 
-     * @return The complete formatted report
-     */
-    // =========================================================
-    private String get_report(final ControlResult _controlResult) throws DevFailed {
-        final String empty = ControlResult.EMPTY_REPORT;
-        if (_controlResult == null) {
-            return empty;
-        }
-
-        return _controlResult.getReport();
-    }
-
-    // =========================================================
-    /**
-     * Execute command "IsAttributeCorrectlyArchived" on device. Returns true if
-     * archiving works correctly for this attribute
-     * 
-     * @param argin
-     *            The complete name of the attribute
-     * @return True if archiving works correctly for this attribute
-     */
-    // =========================================================
-    private boolean is_attribute_correctly_archived(final String argin, final ControlResult _controlResult)
-            throws DevFailed {
-        if (_controlResult == null) {
-            throw new DevFailed(HdbArchivingWatcher.getNotYetReadyError());
-        }
-
-        return _controlResult.isAttributeCorrectlyArchived(argin);
-    }
-
-    private static DevError[] getNotYetReadyError() {
-        final ErrSeverity severity = ErrSeverity.WARN;
-        final String reason = ControlResult.EMPTY_REPORT;
-        final String desc = ControlResult.EMPTY_REPORT;
-        final String origin = ControlResult.EMPTY_REPORT;
-
-        final DevError devError = new DevError(reason, severity, desc, origin);
-        final DevError[] ret = new DevError[1];
-        ret[0] = devError;
-        return ret;
-    }
-
-    // =========================================================
-    /**
-     * Execute command "Start" on device. Starts archiving control with default
-     * parameters. Use start_absolute or start_relative to specify those
-     * parameters.
-     */
-    // =========================================================
-    public void start() throws DevFailed {
-        this.get_logger().info("Entering start()");
-
-        // ---Add your Own code to control device here ---
-        // getLifeCycleManager().startProcessing();
-        // ---END
-
-        this.get_logger().info("Exiting start()");
-    }
-
-    // =========================================================
-    /**
-     * Execute command "StartAbsolute" on device. Starts archiving control in
-     * the specified absolute mode. In this mode, the period that is effectively
-     * controlled is the theoretical period + a fixed duration (hence the name
-     * 'absolute')
-     * 
-     * @param argin
-     *            The absolute mode parameters: argin[0] = the duration amount,
-     *            argin[1] = the duration nature (1=seconds, 2=minutes, 3=hours)
-     */
-    // =========================================================
-    public void start_absolute(final int[] argin) throws DevFailed {
-        this.get_logger().info("Entering start_absolute()");
-
-        // ---Add your Own code to control device here ---
-        if (argin == null || argin.length != 2) {
-            DevFailedUtils.throwDevFailed("Needs 2 int parameters: [ amount , type ]");
-        }
-
-        // final int amount = argin[0];
-        // final int type = argin[1];
-        // SaferPeriodCalculatorFactory.getAbsoluteImpl(amount, type);
-
-        this.start();
-        // ---END
-
-        this.get_logger().info("Exiting start_absolute()");
-    }
-
-    // =========================================================
-    /**
-     * Execute command "StartRelative" on device. Starts archiving control in
-     * the specified relative mode. In this mode, the period that is effectively
-     * controlled is the theoretical period * a multipier (hence the name
-     * 'relative')
-     * 
-     * @param argin
-     *            The multiplier
-     */
-    // =========================================================
-    public void start_relative(final double argin) throws DevFailed {
-        this.get_logger().info("Entering start_absolute()");
-
-        // ---Add your Own code to control device here ---
-        if (argin <= 0) {
-            DevFailedUtils.throwDevFailed("The multiplier has to be > 0");
-        }
-
-        // SaferPeriodCalculatorFactory.getRelativeImpl(argin);
-
-        this.start();
-        // ---END
-
-        this.get_logger().info("Exiting start_absolute()");
-    }
-
-    // =========================================================
-    /**
-     * Execute command "Stop" on device. Stops archiving control, puts device in
-     * standby
-     * 
-     */
-    // =========================================================
-    public void stop() throws DevFailed {
-        this.get_logger().info("Entering stop()");
-
-        // ---Add your Own code to control device here ---
-        this.getLifeCycleManager().stopProcessing();
-        // this.warnOff ();
-        // ---END
-
-        this.get_logger().info("Exiting stop()");
-    }
-
-    // =========================================================
-    /**
-     * Execute command "GetErrorArchiversCurrent" on device. Lists the archivers
-     * that had at least one attribute incorrectly archived during the current
-     * control cycle. Partially refreshed every time an attribute is controlled
-     * (at worst every 10 seconds)
-     * 
-     * @return The list of archivers that have at least one KO attribute.
-     */
-    // =========================================================
-    public String[] get_error_archivers_current() throws DevFailed {
-        // final IDelayManager delayManager =
-        // DelayManagerFactory.getCurrentImpl();
-        final ControlResult _controlResult = this.delayManager.getControlResult(IDelayManager.READ_ROLLOVER);
-
-        return this.get_error_archivers(_controlResult);
-    }
-
-    // =========================================================
-    /**
-     * Execute command "Reset" on device. This is used after a KO control cycle
-     * has set the state to ALARM, to notify the device that the user has seen
-     * the ALARM state. Resets the state to its former value.
-     */
-    // =========================================================
-    public void reset() throws DevFailed {
-        this.get_logger().info("Entering reset()");
-
-        // ---Add your Own code to control device here ---
-        if (this.get_state().value() != DevState._ALARM) {
-            // do nothing
-            return;
-        }
-        // lifeCycleManager =
-        // LifeCycleManagerFactory.getImpl(LifeCycleManagerFactory.HDB_LIFE_CYCLE);
-        this.initLifeCycleManager(DBtype.HDB);
-        // lifeCycleManager = LifeCycleManagerFactory.getCurrentImpl();
-        // final boolean isProcessing = lifeCycleManager.isProcessing();
-        // if (isProcessing) {
-        // this.set_state(DevState.ON);
-        // } else {
-        // this.set_state(DevState.OFF);
-        // }
-
-        this.get_logger().info("Exiting reset()");
-    }
-
-    // =========================================================
-    /**
-     * Execute command "Restart" on device. Restarts the device.
-     */
-    // =========================================================
-    public void restart() throws DevFailed {
-        this.get_logger().info("Entering restart()");
-
-        // complete stop
-        final DefaultLifeCycleManager lifeCycleManager = this.getLifeCycleManager();
-        lifeCycleManager.stopProcessing();
-
-        final Thread watcherThread = lifeCycleManager.getAsThread();
-        try {
-            watcherThread.join(1000);
-        } catch (final InterruptedException e) {
-            DevFailedUtils.throwDevFailed(e);
-        }
-
-        // restarting
-        this.init_device();
-
-        this.get_logger().info("Exiting restart()");
-    }
-
-    // =========================================================
-    /**
-     * Execute command "GetErrorsForDomain" on device. Lists KO attributes for
-     * this domain
-     * 
-     * @param argin
-     *            The domain name
-     * @return The list of KO attributes for this domain.
-     */
-    // =========================================================
-    private String[] get_errors_for_domain(final String argin, final ControlResult _controlResult) throws DevFailed {
-        final String[] empty = new String[0];
-        if (_controlResult == null) {
-            return empty;
-        }
-
-        final Map<String, Domain> _errorDomains = _controlResult.getErrorDomains();
-        if (_errorDomains == null) {
-            return empty;
-        }
-
-        final Domain domain = _errorDomains.get(argin);
-        if (domain == null) {
-            return empty;
-        }
-
-        final Map<String, ArchivingAttribute> _errorAttributes = domain.getKOAttributes();
-        if (_errorAttributes == null) {
-            return empty;
-        }
-
-        final String[] argout = new String[_errorAttributes.size()];
-
-        final List<ArchivingAttribute> list = new Vector<ArchivingAttribute>();
-        list.addAll(_errorAttributes.values());
-        Collections.sort(list, this.archivingAttributeComparator);
-        final Iterator<ArchivingAttribute> it = list.iterator();
-
-        int i = 0;
-        while (it.hasNext()) {
-            final ArchivingAttribute key = it.next();
-            argout[i] = key.getCompleteName();
-            i++;
-        }
-
-        return argout;
-    }
-
-    // =========================================================
-    /**
-     * Execute command "GetErrorsForAttribute" on device. Returns the list of KO
-     * attributes for this attribute name
-     * 
-     * @param argin
-     *            The NOT complete name of the attribute
-     * @return The list of KO attributes for this attribute name
-     */
-    // =========================================================
-    private String[] get_errors_for_attribute(final String argin, final ControlResult _controlResult) throws DevFailed {
-        final String[] empty = new String[0];
-        if (_controlResult == null) {
-            return empty;
-        }
-
-        final Map<String, ArchivingAttributeSubName> _errorAttributeSubNames = _controlResult.getErrorSubAttributes();
-        if (_errorAttributeSubNames == null) {
-            return empty;
-        }
-
-        final ArchivingAttributeSubName attributeSubName = _errorAttributeSubNames.get(argin);
-        if (attributeSubName == null) {
-            return empty;
-        }
-
-        final Map<String, ArchivingAttribute> _errorAttributes = attributeSubName.getKOAttributes();
-        if (_errorAttributes == null) {
-            return empty;
-        }
-
-        final String[] argout = new String[_errorAttributes.size()];
-
-        final List<ArchivingAttribute> list = new Vector<ArchivingAttribute>();
-        list.addAll(_errorAttributes.values());
-        Collections.sort(list, this.archivingAttributeComparator);
-        final Iterator<ArchivingAttribute> it = list.iterator();
-
-        int i = 0;
-        while (it.hasNext()) {
-            final ArchivingAttribute key = it.next();
-            argout[i] = key.getCompleteName();
-            i++;
-        }
-
-        return argout;
-    }
-
-    // =========================================================
-    /**
-     * Execute command "GetReportCurrent" on device. Returns a formatted report
-     * representing the current control cycle results. Partially refreshed every
-     * time an attribute is controlled (at worst every 10 seconds)
-     * 
-     * @return The report
-     */
-    // =========================================================
-    public String get_report_current() throws DevFailed {
-        // final IDelayManager delayManager =
-        // DelayManagerFactory.getCurrentImpl();
-        final ControlResult _controlResult = this.delayManager.getControlResult(IDelayManager.READ_ROLLOVER);
-        return this.get_report(_controlResult);
-    }
-
-    // =========================================================
-    /**
-     * Execute command "GetReportLatestError" on device. Returns a formatted
-     * report representing the latest KO control cycle results. (a control cycle
-     * becomes KO when it has at least one KO atribute, and until the user
-     * cleans the state via the "reset" command or another cycle is KO)
-     * 
-     * @return The report
-     */
-    // =========================================================
-    public String get_report_latest_error() throws DevFailed {
-        // final IDelayManager delayManager =
-        // DelayManagerFactory.getCurrentImpl();
-        final ControlResult _controlResult = this.delayManager.getControlResult(IDelayManager.READ_LATEST_BAD_CYCLE);
-
-        return this.get_report(_controlResult);
-    }
-
-    // =========================================================
-    /**
-     * Execute command "IsAttributeCorrectlyArchivedCurrent" on device. Returns
-     * whether the specified attribute was correctly archiving during the
-     * current control cycle. Partially refreshed every time an attribute is
-     * controlled (at worst every 10 seconds)
-     * 
-     * @param argin
-     *            The attribute complete name
-     * @return True if archiving works correctly for this attribute
-     */
-    // =========================================================
-    public boolean is_attribute_correctly_archived_current(final String argin) throws DevFailed {
-        // final IDelayManager delayManager =
-        // DelayManagerFactory.getCurrentImpl();
-        final ControlResult _controlResult = this.delayManager.getControlResult(IDelayManager.READ_ROLLOVER);
-
-        return this.is_attribute_correctly_archived(argin, _controlResult);
-    }
-
-    // =========================================================
-    /**
-     * Execute command "IsAttributeCorrectlyArchivedLatestError" on device.
-     * Returns whether the specified attribute was correctly archiving during
-     * the current control cycle. (a control cycle becomes KO when it has at
-     * least one KO atribute, and until the user cleans the state via the
-     * "reset" command or another cycle is KO)
-     * 
-     * @param argin
-     *            The attribute complete name
-     * @return True if archiving works correctly for this attribute
-     */
-    // =========================================================
-    public boolean is_attribute_correctly_archived_latest_error(final String argin) throws DevFailed {
-        // final IDelayManager delayManager =
-        // DelayManagerFactory.getCurrentImpl();
-        final ControlResult _controlResult = this.delayManager.getControlResult(IDelayManager.READ_LATEST_BAD_CYCLE);
-
-        return this.is_attribute_correctly_archived(argin, _controlResult);
-    }
-
-    // =========================================================
-    /**
-     * Execute command "GetErrorArchiversLatestError" on device. Lists the
-     * archivers that had at least one attribute incorrectly archived during the
-     * latest KO control cycle. (a control cycle becomes KO when it has at least
-     * one KO atribute, and until the user cleans the state via the "reset"
-     * command or another cycle is KO)
-     * 
-     * @return The list of archivers that had at least one KO attribute.
-     */
-    // =========================================================
-    public String[] get_error_archivers_latest_error() throws DevFailed {
-        // final IDelayManager delayManager =
-        // DelayManagerFactory.getCurrentImpl();
-        final ControlResult _controlResult = this.delayManager.getControlResult(IDelayManager.READ_LATEST_BAD_CYCLE);
-
-        return this.get_error_archivers(_controlResult);
-    }
-
-    // =========================================================
-    /**
-     * Execute command "GetErrorsForArchiverCurrent" on device. Lists the KO
-     * attributes for a given archiver during the current control cycle.
-     * Partially refreshed every time an attribute is controlled (at worst every
-     * 10 seconds)
-     * 
-     * @param argin
-     *            The name of the archiver
-     * @return The list of KO attributes for this archiver
-     */
-    // =========================================================
-    public String[] get_errors_for_archiver_current(final String argin) throws DevFailed {
-        // final IDelayManager delayManager =
-        // DelayManagerFactory.getCurrentImpl();
-        final ControlResult _controlResult = this.delayManager.getControlResult(IDelayManager.READ_ROLLOVER);
-
-        return this.get_errors_for_archiver(argin, _controlResult);
-    }
-
-    // =========================================================
-    /**
-     * Execute command "GetAllArchivingAttributes" on device. Lists all HDB
-     * archiving attributes (does a new request regardless of the watcher
-     * cycle).
-     * 
-     * @return The list of all HDB archiving attributes.
-     */
-    // =========================================================
-    public String[] get_all_archiving_attributes() throws DevFailed {
-        String[] ret = null;
-        try {
-            final Map<String, ModeData> all = this.dbReader.getArchivedAttributes();
-
-            ret = all == null ? null : new String[all.size()];
-            if (ret == null) {
-                return null;
-            }
-
-            final ControlResult cr = this.buildControlResult();
-            cr.setAllArchivingAttributes(all);
-            final ControlResultLine[] orderedLines = cr.sort();
-
-            for (int i = 0; i < all.size(); i++) {
-                ret[i] = orderedLines[i].getAttribute().getCompleteName();
-                final Mode mode = this.dbReader.getModeForAttribute(ret[i]);
-                if (mode != null) {
-                    ret[i] += ": " + mode.toStringWatcher();
-                }
-            }
-        } catch (final Exception df) {
-            this.logger.error("get_all_archiving_attributes/error! V", df);
-            DevFailedUtils.throwDevFailed(df);
-        }
-        return ret;
-    }
-
-    // =========================================================
-    /**
-     * Execute command "GetErrorsForArchiverLatestError" on device. Lists the KO
-     * attributes for a given archiver during the latest KO control cycle. (a
-     * control cycle becomes KO when it has at least one KO atribute, and until
-     * the user cleans the state via the "reset" command or another cycle is KO)
-     * 
-     * @param argin
-     *            The name of the archiver
-     * @return The list of KO attributes for this archiver
-     */
-    // =========================================================
-    public String[] get_errors_for_archiver_latest_error(final String argin) throws DevFailed {
-        // final IDelayManager delayManager =
-        // DelayManagerFactory.getCurrentImpl();
-        final ControlResult _controlResult = this.delayManager.getControlResult(IDelayManager.READ_LATEST_BAD_CYCLE);
-
-        return this.get_errors_for_archiver(argin, _controlResult);
-    }
-
-    // =========================================================
-    /**
-     * Execute command "GetErrorDomainsCurrent" on device. Lists the domains
-     * that had at least one attribute incorrectly archived during the current
-     * control cycle. Partially refreshed every time an attribute is controlled
-     * (at worst every 10 seconds)
-     * 
-     * @return The list of archivers that have at least one KO attribute.
-     */
-    // =========================================================
-    public String[] get_error_domains_current() throws DevFailed {
-        // final IDelayManager delayManager =
-        // DelayManagerFactory.getCurrentImpl();
-        final ControlResult _controlResult = this.delayManager.getControlResult(IDelayManager.READ_ROLLOVER);
-
-        return this.get_error_domains(_controlResult);
-    }
-
-    // =========================================================
-    /**
-     * Execute command "GetErrorDomainsLatestError" on device. Lists the domains
-     * that had at least one attribute incorrectly archived during the latest KO
-     * control cycle. (a control cycle becomes KO when it has at least one KO
-     * atribute, and until the user cleans the state via the "reset" command or
-     * another cycle is KO)
-     * 
-     * @return The list of archivers that had at least one KO attribute.
-     */
-    // =========================================================
-    public String[] get_error_domains_latest_error() throws DevFailed {
-        // final IDelayManager delayManager =
-        // DelayManagerFactory.getCurrentImpl();
-        final ControlResult _controlResult = this.delayManager.getControlResult(IDelayManager.READ_LATEST_BAD_CYCLE);
-
-        return this.get_error_domains(_controlResult);
-    }
-
-    // =========================================================
-    /**
-     * Execute command "GetErrorsForDomainCurrent" on device. Lists the KO
-     * attributes for a given domain during the current control cycle. Partially
-     * refreshed every time an attribute is controlled (at worst every 10
-     * seconds)
-     * 
-     * @param argin
-     *            The name of the domain
-     * @return The list of KO attributes for this domain
-     */
-    // =========================================================
-    public String[] get_errors_for_domain_current(final String argin) throws DevFailed {
-        // final IDelayManager delayManager =
-        // DelayManagerFactory.getCurrentImpl();
-        final ControlResult _controlResult = this.delayManager.getControlResult(IDelayManager.READ_ROLLOVER);
-
-        return this.get_errors_for_domain(argin, _controlResult);
-    }
-
-    // =========================================================
-    /**
-     * Execute command "GetErrorsForDomainLatestError" on device. Lists the KO
-     * attributes for a given domain during the current control cycle. (a
-     * control cycle becomes KO when it has at least one KO atribute, and until
-     * the user cleans the state via the "reset" command or another cycle is KO)
-     * 
-     * @param argin
-     *            The name of the domain
-     * @return The list of KO attributes for this domain
-     */
-    // =========================================================
-    public String[] get_errors_for_domain_latest_error(final String argin) throws DevFailed {
-        // final IDelayManager delayManager =
-        // DelayManagerFactory.getCurrentImpl();
-        final ControlResult _controlResult = this.delayManager.getControlResult(IDelayManager.READ_LATEST_BAD_CYCLE);
-
-        return this.get_errors_for_domain(argin, _controlResult);
-    }
-
-    // =========================================================
-    /**
-     * Execute command "GetErrorsForAttributeCurrent" on device. Lists the KO
-     * attributes with a given name during the current control cycle. Partially
-     * refreshed every time an attribute is controlled (at worst every 10
-     * seconds)
-     * 
-     * @param argin
-     *            The attribute (NOT the complete name)
-     * @return The list of KO attributes with this name
-     */
-    // =========================================================
-    public String[] get_errors_for_attribute_current(final String argin) throws DevFailed {
-        // final IDelayManager delayManager =
-        // DelayManagerFactory.getCurrentImpl();
-        final ControlResult _controlResult = this.delayManager.getControlResult(IDelayManager.READ_ROLLOVER);
-
-        return this.get_errors_for_attribute(argin, _controlResult);
-    }
-
-    // =========================================================
-    /**
-     * Execute command "GetErrorsForAttributeLatestError" on device. Lists the
-     * KO attributes with a given name during the current control cycle. (a
-     * control cycle becomes KO when it has at least one KO atribute, and until
-     * the user cleans the state via the "reset" command or another cycle is KO)
-     * 
-     * @param argin
-     *            The attribute (NOT the complete name)
-     * @return The list of KO attributes with this name
-     */
-    // =========================================================
-    public String[] get_errors_for_attribute_latest_error(final String argin) throws DevFailed {
-        // final IDelayManager delayManager =
-        // DelayManagerFactory.getCurrentImpl();
-        final ControlResult _controlResult = this.delayManager.getControlResult(IDelayManager.READ_LATEST_BAD_CYCLE);
-
-        return this.get_errors_for_attribute(argin, _controlResult);
-    }
-
-    /**
-     * /**
-     * 
-     * @return Watcher Archiving Report
-     */
-    public void start_archiving_report() throws DevFailed {
-        try {
-            if (this.dbReader.getDatabase().isMySQL()) {
-                Except.throw_exception("DATABASE_ERROR", "MySQL Exception", "MySQL is not supported for this command ");
-                return;
-            }
-            this.dbReader.startArchivingReport();
-        } catch (final DevFailed e) {
-            e.printStackTrace();
-        }
-    }
-
-    /**
-     * 
-     * @return Watcher database Report
-     */
-    public String[] get_database_report() throws DevFailed {
-
-        if (this.dbReader.getDatabase().isMySQL()) {
-            Except.throw_exception("DATABASE_ERROR", "MySQL Exception", "MySQL is not supported for this command ");
-        }
-        return this.dbReader.getDatabaseReport();
-
-    }
-
-    /**
-     * 
-     * @return Watcher attributes count
-     */
-    public int get_current_archiving_attributes_count() throws DevFailed {
-
-        try {
-            return this.dbReader.getDatabase().getMode().getCurrentArchivedAttCount();
-        } catch (final ArchivingException e) {
-            throw e.toTangoException();
-        }
-    }
-
-    /**
-     * 
-     * @return Watcher KO attributes count
-     */
-    public int get_ko_attributes_count() throws DevFailed {
-
-        try {
-            if (this.dbReader.getDatabase().isMySQL()) {
-                Except.throw_exception("DATABASE_ERROR", "MySQL Exception", "MySQL is not supported for this command ");
-            }
-            return this.dbReader.getDatabase().getDbUtil().getAttributesCountOkOrKo(false);
-        } catch (final ArchivingException e) {
-            throw e.toTangoException();
-        }
-    }
-
-    /**
-     * 
-     * @return Watcher OK attributes count
-     */
-    public int get_ok_attributes_count() throws DevFailed {
-
-        try {
-            if (this.dbReader.getDatabase().isMySQL()) {
-                Except.throw_exception("DATABASE_ERROR", "MySQL Exception", "MySQL is not supported for this command ");
-            }
-            return this.dbReader.getDatabase().getDbUtil().getAttributesCountOkOrKo(true);
-        } catch (final ArchivingException e) {
-            throw e.toTangoException();
-        }
-    }
-
-    /**
-     * 
-     * @return Watcher list of ko attributes
-     */
-    public String[] get_ko_attributes() throws DevFailed {
-
-        try {
-            if (this.dbReader.getDatabase().isMySQL()) {
-                Except.throw_exception("DATABASE_ERROR", "MySQL Exception", "MySQL is not supported for this command ");
-            }
-
-            return this.dbReader.getDatabase().getDbUtil().getKoAttributes();
-        } catch (final ArchivingException e) {
-            throw e.toTangoException();
-        }
-    }
-
-    /**
-     * 
-     * @return Watcher list of oracle databse partitions
-     */
-    public String[] get_partitions() throws DevFailed {
-
-        try {
-            if (this.dbReader.getDatabase().isMySQL()) {
-                Except.throw_exception("DATABASE_ERROR", "MySQL Exception", "MySQL is not supported for this command ");
-            }
-
-            return this.dbReader.getDatabase().getDbUtil().getListOfPartitions();
-        } catch (final ArchivingException e) {
-            throw e.toTangoException();
-        }
-    }
-
-    /**
-     * 
-     * @return Watcher list of job status
-     */
-    public String[] get_job_status() throws DevFailed {
-
-        try {
-            if (this.dbReader.getDatabase().isMySQL()) {
-                Except.throw_exception("DATABASE_ERROR", "MySQL Exception", "MySQL is not supported for this command ");
-            }
-            final String[] res = { "No Job Status" };
-            final String[] tmp = this.dbReader.getDatabase().getDbUtil().getListOfJobStatus();
-            if (tmp == null) {
-                return res;
-            } else {
-                return tmp;
-            }
-        } catch (final ArchivingException e) {
-            throw e.toTangoException();
-        }
-    }
-
-    /**
-     * 
-     * @return Watcher list of oracle databse partitions
-     */
-    public String[] get_job_errors() throws DevFailed {
-
-        try {
-            if (this.dbReader.getDatabase().isMySQL()) {
-                Except.throw_exception("DATABASE_ERROR", "MySQL Exception", "MySQL is not supported for this command ");
-            }
-            final String[] res = { "No Job Errors" };
-            final String[] tmp = this.dbReader.getDatabase().getDbUtil().getListOfJobErrors();
-            if (tmp == null) {
-                return res;
-            } else {
-                return tmp;
-            }
-        } catch (final ArchivingException e) {
-            throw e.toTangoException();
-        }
-    }
-
-    /**
-     * return in % the feedalive procedure progression level
-     * 
-     * @return
-     */
-    public int get_feedalive_progression_level() throws DevFailed {
-
-        try {
-            if (this.dbReader.getDatabase().isMySQL()) {
-                Except.throw_exception("DATABASE_ERROR", "MySQL Exception", "MySQL is not supported for this command ");
-            }
-            return this.dbReader.getDatabase().getDbUtil().getFeedAliveProgression();
-
-        } catch (final ArchivingException e) {
-            throw e.toTangoException();
-        }
-    }
-
-    /**
-     * get ko attributes by archiver device
-     * 
-     * @return
-     */
-    public String[] get_ko_attributes_count_by_device() throws DevFailed {
-
-        try {
-            if (this.dbReader.getDatabase().isMySQL()) {
-                Except.throw_exception("DATABASE_ERROR", "MySQL Exception", "MySQL is not supported for this command ");
-            }
-            return this.dbReader.getDatabase().getDbUtil().getKOAttrCountByDevice();
-
-        } catch (final ArchivingException e) {
-            throw e.toTangoException();
-        }
-    }
-
-    // =========================================================
-    /**
-     * main part for the device server class
-     */
-    // =========================================================
-    public static void main(final String[] argv) {
-        try {
-            final Util tg = Util.init(argv, "HdbArchivingWatcher");
-            tg.server_init();
-
-            System.out.println("Ready to accept request");
-
-            tg.server_run();
-        }
-
-        catch (final OutOfMemoryError ex) {
-            System.err.println("Can't allocate memory !!!!");
-            System.err.println("Exiting");
-        } catch (final UserException ex) {
-            Except.print_exception(ex);
-
-            System.err.println("Received a CORBA user exception");
-            System.err.println("Exiting");
-        } catch (final SystemException ex) {
-            Except.print_exception(ex);
-
-            System.err.println("Received a CORBA system exception");
-            System.err.println("Exiting");
-        }
-
-        System.exit(-1);
-    }
-
-    @Override
-    public void delete_device() throws DevFailed {
-        // TODO Auto-generated method stub
-
-    }
-}
-
-// --------------------------------------------------------------------------
-/*
- * end of $Source:
- * /cvsroot/tango-cs/tango/jserver/archiving/HdbArchivingWatcher/
- * HdbArchivingWatcher.java,v $
- */
diff --git a/src/main/java/HdbArchivingWatcher/HdbArchivingWatcherClass.java b/src/main/java/HdbArchivingWatcher/HdbArchivingWatcherClass.java
deleted file mode 100644
index d2cdea7d90ec33495a761ab7f746c5d79661c558..0000000000000000000000000000000000000000
--- a/src/main/java/HdbArchivingWatcher/HdbArchivingWatcherClass.java
+++ /dev/null
@@ -1,456 +0,0 @@
-//+======================================================================
-// $Source: /cvsroot/tango-cs/tango/jserver/archiving/HdbArchivingWatcher/HdbArchivingWatcherClass.java,v $
-//
-// Project:   	Tango Device Server
-//
-// Description:	java source code for the ArchivingWatcher class .
-//              This class is a singleton class and implements everything
-//              which exists only once for all the  ArchivingWatcher object
-//              It inherits from the DeviceClass class.
-//
-// $Author: pierrejoseph $
-//
-// $Revision: 1.4 $
-//
-// $Log: HdbArchivingWatcherClass.java,v $
-// Revision 1.4  2007/05/11 13:58:34  pierrejoseph
-// Attribute addition : release version
-//
-// Revision 1.3  2006/09/25 09:50:00  ounsy
-// minor changes
-//
-// Revision 1.2  2006/09/07 15:13:16  ounsy
-// added the getAllArchivingAttributes command
-//
-// Revision 1.1  2006/08/24 13:51:57  ounsy
-// creation
-//
-// Revision 1.4  2006/05/03 09:50:53  ounsy
-// added a restart command that does the same as restarting the device
-//
-// Revision 1.3  2006/03/08 14:36:21  ounsy
-// added pogo comments
-//
-// Revision 1.2  2006/01/27 13:08:18  ounsy
-// New commands to start archiving control in absolute/relative mode
-//
-// Revision 1.1  2006/01/19 16:36:59  ounsy
-// New device specialised in watching archiving.
-//
-//
-// copyleft :    European Synchrotron Radiation Facility
-//               BP 220, Grenoble 38043
-//               FRANCE
-//
-//-======================================================================
-//
-//  		This file is generated by POGO
-//	(Program Obviously used to Generate tango Object)
-//
-//         (c) - Software Engineering Group - ESRF
-//=============================================================================
-
-package HdbArchivingWatcher;
-
-import java.util.ResourceBundle;
-import java.util.Vector;
-
-import HdbArchivingWatcher.Commands.GetAllArchivingAttributesClass;
-import HdbArchivingWatcher.Commands.GetErrorArchiversCurrentClass;
-import HdbArchivingWatcher.Commands.GetErrorArchiversLatestErrorClass;
-import HdbArchivingWatcher.Commands.GetErrorDomainsCurrentClass;
-import HdbArchivingWatcher.Commands.GetErrorDomainsLatestErrorClass;
-import HdbArchivingWatcher.Commands.GetErrorsForArchiverCurrentClass;
-import HdbArchivingWatcher.Commands.GetErrorsForArchiverLatestErrorClass;
-import HdbArchivingWatcher.Commands.GetErrorsForAttributeCurrentClass;
-import HdbArchivingWatcher.Commands.GetErrorsForAttributeLatestErrorClass;
-import HdbArchivingWatcher.Commands.GetErrorsForDomainCurrentClass;
-import HdbArchivingWatcher.Commands.GetErrorsForDomainLatestErrorClass;
-import HdbArchivingWatcher.Commands.GetReportCurrentClass;
-import HdbArchivingWatcher.Commands.GetReportLatestErrorClass;
-import HdbArchivingWatcher.Commands.IsAttributeCorrectlyArchivedCurrentClass;
-import HdbArchivingWatcher.Commands.IsAttributeCorrectlyArchivedLatestErrorClass;
-import HdbArchivingWatcher.Commands.ResetClass;
-import HdbArchivingWatcher.Commands.RestartClass;
-import HdbArchivingWatcher.Commands.StartAbsoluteClass;
-import HdbArchivingWatcher.Commands.StartClass;
-import HdbArchivingWatcher.Commands.StartRelativeClass;
-import HdbArchivingWatcher.Commands.StopClass;
-import HdbArchivingWatcher.Commands.AdminReport.GetAttributesCountClass;
-import HdbArchivingWatcher.Commands.AdminReport.GetFeedAliveProgressionClass;
-import HdbArchivingWatcher.Commands.AdminReport.GetKOAttributesCountClass;
-import HdbArchivingWatcher.Commands.AdminReport.GetKoCountByDeviceClass;
-import HdbArchivingWatcher.Commands.AdminReport.GetListOfJobErrorsClass;
-import HdbArchivingWatcher.Commands.AdminReport.GetListOfJobStatusClass;
-import HdbArchivingWatcher.Commands.AdminReport.GetListOfKOAttributesClass;
-import HdbArchivingWatcher.Commands.AdminReport.GetListOfPartitionsClass;
-import HdbArchivingWatcher.Commands.AdminReport.GetOKAttributesCountClass;
-import HdbArchivingWatcher.Commands.AdminReport.StartArchivingReportClass;
-import fr.esrf.Tango.AttrWriteType;
-import fr.esrf.Tango.DevFailed;
-import fr.esrf.Tango.DispLevel;
-import fr.esrf.TangoApi.DbDatum;
-import fr.esrf.TangoDs.Attr;
-import fr.esrf.TangoDs.DeviceClass;
-import fr.esrf.TangoDs.DeviceImpl;
-import fr.esrf.TangoDs.SpectrumAttr;
-import fr.esrf.TangoDs.TangoConst;
-import fr.esrf.TangoDs.TemplCommandInOut;
-import fr.esrf.TangoDs.UserDefaultAttrProp;
-import fr.esrf.TangoDs.Util;
-
-@Deprecated
-public class HdbArchivingWatcherClass extends DeviceClass implements TangoConst {
-    /**
-     * ArchivingWatcherClass class instance (it is a singleton).
-     */
-    private static HdbArchivingWatcherClass _instance = null;
-
-    /**
-     * Class properties array.
-     */
-    private DbDatum[] cl_prop = null;
-
-    // --------- Start of properties data members ----------
-
-    // --------- End of properties data members ----------
-
-    // ===================================================================
-    //
-    // method : instance()
-    //
-    // description : static method to retrieve the ArchivingWatcherClass object
-    // once it has been initialised
-    //
-    // ===================================================================
-    public static HdbArchivingWatcherClass instance() {
-	if (_instance == null) {
-	    System.err.println("ArchivingWatcherClass is not initialised !!!");
-	    System.err.println("Exiting");
-	    System.exit(-1);
-	}
-	return _instance;
-    }
-
-    // ===================================================================
-    //
-    // method : Init()
-    //
-    // description : static method to create/retrieve the ArchivingWatcherClass
-    // object. This method is the only one which enables a
-    // user to create the object
-    //
-    // in : - class_name : The class name
-    //
-    // ===================================================================
-    public static synchronized HdbArchivingWatcherClass init(String class_name) throws DevFailed {
-	if (_instance == null) {
-	    _instance = new HdbArchivingWatcherClass(class_name);
-	}
-	return _instance;
-    }
-
-    // ===================================================================
-    //
-    // method : ArchivingWatcherClass()
-    //
-    // description : constructor for the ArchivingWatcherClass class
-    //
-    // argument : in : - name : The class name
-    //
-    // ===================================================================
-    protected HdbArchivingWatcherClass(String name) throws DevFailed {
-	super(name);
-
-	Util.out2.println("Entering ArchivingWatcherClass constructor");
-	// write_class_property();
-	this.get_class_property();
-
-	Util.out2.println("Leaving ArchivingWatcherClass constructor");
-    }
-
-    // ===================================================================
-    //
-    // method : command_factory()
-    //
-    // description : Create the command object(s) and store them in the
-    // command list
-    // ===================================================================
-    @Override
-    public void command_factory() {
-	this.command_list.addElement(new GetAllArchivingAttributesClass(
-		"GetAllArchivingAttributes", Tango_DEV_VOID, Tango_DEVVAR_STRINGARRAY, "",
-		"The list of all HDB archiving attributes", DispLevel.OPERATOR));
-	this.command_list.addElement(new RestartClass("Restart", Tango_DEV_VOID, Tango_DEV_VOID,
-		"", "", DispLevel.OPERATOR));
-	this.command_list.addElement(new ResetClass("Reset", Tango_DEV_VOID, Tango_DEV_VOID, "",
-		"", DispLevel.OPERATOR));
-	this.command_list.addElement(new StartClass("Start", Tango_DEV_VOID, Tango_DEV_VOID, "",
-		"", DispLevel.OPERATOR));
-	this.command_list.addElement(new StopClass("Stop", Tango_DEV_VOID, Tango_DEV_VOID, "", "",
-		DispLevel.OPERATOR));
-	this.command_list.addElement(new GetReportCurrentClass("GetReportCurrent", Tango_DEV_VOID,
-		Tango_DEV_STRING, "", "The report for the current cycle", DispLevel.OPERATOR));
-	this.command_list.addElement(new GetReportLatestErrorClass("GetReportLatestError",
-		Tango_DEV_VOID, Tango_DEV_STRING, "", "The report for the latest KO cycle",
-		DispLevel.OPERATOR));
-	this.command_list
-		.addElement(new IsAttributeCorrectlyArchivedCurrentClass(
-			"IsAttributeCorrectlyArchivedCurrent", Tango_DEV_STRING, Tango_DEV_BOOLEAN,
-			"The attribute complete name",
-			"True if this attribute is archiving correctly (current cycle)",
-			DispLevel.OPERATOR));
-	this.command_list.addElement(new IsAttributeCorrectlyArchivedLatestErrorClass(
-		"IsAttributeCorrectlyArchivedLatestError", Tango_DEV_STRING, Tango_DEV_BOOLEAN,
-		"The attribute complete name",
-		"True if archiving works correctly for this attribute (latest KO cycle)",
-		DispLevel.OPERATOR));
-	this.command_list.addElement(new GetErrorArchiversCurrentClass("GetErrorArchiversCurrent",
-		Tango_DEV_VOID, Tango_DEVVAR_STRINGARRAY, "",
-		"The list of archivers that have at least one KO attribute (current cycle)",
-		DispLevel.OPERATOR));
-	this.command_list.addElement(new GetErrorArchiversLatestErrorClass(
-		"GetErrorArchiversLatestError", Tango_DEV_VOID, Tango_DEVVAR_STRINGARRAY, "",
-		"The list of archivers that have at least one KO attribute (latest KO cycle)",
-		DispLevel.OPERATOR));
-	this.command_list.addElement(new GetErrorsForArchiverCurrentClass(
-		"GetErrorsForArchiverCurrent", Tango_DEV_STRING, Tango_DEVVAR_STRINGARRAY,
-		"The name of the archiver",
-		"The list of KO attributes for this archiver (current cycle)", DispLevel.OPERATOR));
-	this.command_list
-		.addElement(new GetErrorsForArchiverLatestErrorClass(
-			"GetErrorsForArchiverLatestError", Tango_DEV_STRING,
-			Tango_DEVVAR_STRINGARRAY, "The name of the archiver",
-			"The list of KO attributes for this archiver (latest KO cycle)",
-			DispLevel.OPERATOR));
-	this.command_list.addElement(new GetErrorDomainsCurrentClass("GetErrorDomainsCurrent",
-		Tango_DEV_VOID, Tango_DEVVAR_STRINGARRAY, "",
-		"The list of domains that have at least one KO attribute (current cycle)",
-		DispLevel.OPERATOR));
-	this.command_list.addElement(new GetErrorDomainsLatestErrorClass(
-		"GetErrorDomainsLatestError", Tango_DEV_VOID, Tango_DEVVAR_STRINGARRAY, "",
-		"The list of domains that have at least one KO attribute (latest KO cycle)",
-		DispLevel.OPERATOR));
-	this.command_list.addElement(new GetErrorsForDomainCurrentClass(
-		"GetErrorsForDomainCurrent", Tango_DEV_STRING, Tango_DEVVAR_STRINGARRAY,
-		"The domain name", "The list of KO attributes for this domain (current cycle)",
-		DispLevel.OPERATOR));
-	this.command_list.addElement(new GetErrorsForDomainLatestErrorClass(
-		"GetErrorsForDomainLatestError", Tango_DEV_STRING, Tango_DEVVAR_STRINGARRAY,
-		"The domain name", "The list of KO attributes for this domain (latest KO cycle)",
-		DispLevel.OPERATOR));
-	this.command_list.addElement(new GetErrorsForAttributeCurrentClass(
-		"GetErrorsForAttributeCurrent", Tango_DEV_STRING, Tango_DEVVAR_STRINGARRAY,
-		"The NOT complete name of the attribute",
-		"The list of KO attributes for this attribute name (current cycle)",
-		DispLevel.OPERATOR));
-	this.command_list.addElement(new GetErrorsForAttributeLatestErrorClass(
-		"GetErrorsForAttributeLatestError", Tango_DEV_STRING, Tango_DEVVAR_STRINGARRAY,
-		"The NOT complete name of the attribute",
-		"The list of KO attributes for this attribute name (latest KO cycle)",
-		DispLevel.OPERATOR));
-	this.command_list.addElement(new StartRelativeClass("StartRelative", Tango_DEV_DOUBLE,
-		Tango_DEV_VOID, "The multiplier", "", DispLevel.EXPERT));
-	this.command_list
-		.addElement(new StartAbsoluteClass(
-			"StartAbsolute",
-			Tango_DEVVAR_LONGARRAY,
-			Tango_DEV_VOID,
-			"The absolute mode parameters: argin[0] = the duration amount, argin[1] = the duration nature (1=seconds, 2=minutes, 3=hours)",
-			"", DispLevel.EXPERT));
-
-	// Admin report commands
-	this.command_list.addElement(new StartArchivingReportClass("StartArchivingReport",
-		Tango_DEV_VOID, Tango_DEV_VOID, "", "Start Watcher archiving report",
-		DispLevel.OPERATOR));
-	//
-	// command_list.addElement(new DataBaseReportClass("DataBaseReport",
-	// Tango_DEV_VOID, Tango_DEVVAR_STRINGARRAY,
-	// "",
-	// "Watcher archiving report",
-	// DispLevel.OPERATOR));
-	this.command_list.addElement(new GetAttributesCountClass("GetCurrentArchivingAttrCount",
-		Tango_DEV_VOID, Tango_DEV_LONG, "", "Current archived attributes count",
-		DispLevel.OPERATOR));
-
-	this.command_list.addElement(new GetKOAttributesCountClass("GetKOAttributesCount",
-		Tango_DEV_VOID, Tango_DEV_LONG, "", "KO attributes count", DispLevel.OPERATOR));
-
-	this.command_list.addElement(new GetOKAttributesCountClass("GetOKAttributesCount",
-		Tango_DEV_VOID, Tango_DEV_LONG, "", "OK attributes count", DispLevel.OPERATOR));
-	this.command_list.addElement(new GetListOfKOAttributesClass("GetListOfKOAttributes",
-		Tango_DEV_VOID, Tango_DEVVAR_STRINGARRAY, "", "List of ko attributes details",
-		DispLevel.OPERATOR));
-	this.command_list.addElement(new GetListOfPartitionsClass("GetListOfPartitions",
-		Tango_DEV_VOID, Tango_DEVVAR_STRINGARRAY, "", "List of databes partitions details",
-		DispLevel.OPERATOR));
-	this.command_list.addElement(new GetListOfJobStatusClass("GetListOfJobStatus",
-		Tango_DEV_VOID, Tango_DEVVAR_STRINGARRAY, "",
-		"List of database job status details", DispLevel.OPERATOR));
-	this.command_list.addElement(new GetListOfJobErrorsClass("GetListOfJobErrors",
-		Tango_DEV_VOID, Tango_DEVVAR_STRINGARRAY, "",
-		"List of database job errors details", DispLevel.OPERATOR));
-	this.command_list.addElement(new GetKoCountByDeviceClass("GetListOfKoNbrByDevice",
-		Tango_DEV_VOID, Tango_DEVVAR_STRINGARRAY, "",
-		"List of ko attributes number by device", DispLevel.OPERATOR));
-
-	this.command_list.addElement(new GetFeedAliveProgressionClass("GetFeedAliveProgression",
-		Tango_DEV_VOID, Tango_DEV_LONG, "", "Percentage of the feedalive execution ",
-		DispLevel.OPERATOR));
-
-	this.command_list.addElement(new TemplCommandInOut("GetKOAttributesFromArchivers",
-		"getKOAttributesFromArchivers", "do a retry", "the list of ko per archiver"));
-	// add polling if any
-	/*
-	 * for (int i = 0; i < command_list.size(); i++) { Command cmd =
-	 * (Command) command_list.elementAt(i); }
-	 */
-    }
-
-    // ===================================================================
-    //
-    // method : device_factory()
-    //
-    // description : Create the device object(s) and store them in the
-    // device list
-    //
-    // argument : in : String[] devlist : The device name list
-    //
-    // ===================================================================
-    @Override
-    public void device_factory(String[] devlist) throws DevFailed {
-	String device_version = ResourceBundle.getBundle("application")
-		.getString("project.version");
-	for (int i = 0; i < devlist.length; i++) {
-	    // Util.out4.println("Device name : " + devlist[i]);
-
-	    // Create device and add it into the device list
-	    // ----------------------------------------------
-	    this.device_list.addElement(new HdbArchivingWatcher(this, devlist[i], device_version));
-
-	    // Export device to the outside world
-	    // ----------------------------------------------
-	    if (Util._UseDb == true) {
-		this.export_device(((DeviceImpl) this.device_list.elementAt(i)));
-	    } else {
-		this.export_device(((DeviceImpl) this.device_list.elementAt(i)), devlist[i]);
-	    }
-	}
-    }
-
-    // =============================================================================
-    //
-    // Method: attribute_factory(Vector att_list)
-    //
-    // =============================================================================
-    @Override
-    public void attribute_factory(Vector att_list) throws DevFailed {
-	// Attribute : FormattedReport
-	SpectrumAttr formatted_report = new SpectrumAttr("FormattedReport", Tango_DEV_STRING, 10000);
-	att_list.addElement(formatted_report);
-
-	// Attribute : ArchivingHealth
-	Attr archiving_health = new Attr("ArchivingHealth", Tango_DEV_SHORT, AttrWriteType.READ);
-	UserDefaultAttrProp archiving_health_prop = new UserDefaultAttrProp();
-	archiving_health_prop.set_description("The archiving health code");
-	archiving_health_prop.set_label("ArchivingHealth");
-	archiving_health.set_default_properties(archiving_health_prop);
-	att_list.addElement(archiving_health);
-
-	Attr koNr = new Attr("koAttributes", Tango_DEV_LONG, AttrWriteType.READ);
-	UserDefaultAttrProp koNr_prop = new UserDefaultAttrProp();
-	koNr_prop.set_description("The number of KO attributes");
-	koNr_prop.set_label("koAttributes");
-	koNr_prop.set_format("%3i");
-	koNr_prop.set_unit("attributes");
-	koNr.set_default_properties(koNr_prop);
-	att_list.addElement(koNr);
-
-	Attr nullNr = new Attr("nullAttributes", Tango_DEV_LONG, AttrWriteType.READ);
-	UserDefaultAttrProp nullNr_prop = new UserDefaultAttrProp();
-	nullNr_prop.set_description("The number of null attributes");
-	nullNr_prop.set_label("nullAttributes");
-	nullNr_prop.set_format("%3i");
-	nullNr_prop.set_unit("attributes");
-	nullNr.set_default_properties(nullNr_prop);
-	att_list.addElement(nullNr);
-
-	// Attribute : version
-	Attr version = new Attr("version", Tango_DEV_STRING, AttrWriteType.READ);
-	UserDefaultAttrProp version_prop = new UserDefaultAttrProp();
-	version_prop.set_label("version");
-	version.set_default_properties(version_prop);
-	att_list.addElement(version);
-    }
-
-    // ===================================================================
-    /**
-     * Get the class property for specified name.
-     * 
-     * @param name
-     *            The property name.
-     */
-    // ===================================================================
-    public DbDatum get_class_property(String name) {
-	for (int i = 0; i < this.cl_prop.length; i++) {
-	    if (this.cl_prop[i].name.equals(name)) {
-		return this.cl_prop[i];
-	    }
-	}
-	// if not found, return an empty DbDatum
-	return new DbDatum(name);
-    }
-
-    // ===================================================================
-    /**
-     * Read the class properties from database.
-     */
-    // ===================================================================
-    public void get_class_property() throws DevFailed {
-	// Initialize your default values here.
-	// ------------------------------------------
-
-	// Read class properties from database.(Automatic code generation)
-	// -------------------------------------------------------------
-	if (Util._UseDb == false) {
-	    return;
-	}
-	String[] propnames = {};
-
-	// Call database and extract values
-	// --------------------------------------------
-	this.cl_prop = this.get_db_class().get_property(propnames);
-	// int i = -1;
-
-	// End of Automatic code generation
-	// -------------------------------------------------------------
-
-    }
-
-    // ===================================================================
-    /**
-     * Set class description as property in database
-     */
-    // ===================================================================
-    // private void write_class_property() throws DevFailed {
-    // // First time, check if database used
-    // // --------------------------------------------
-    // if (Util._UseDb == false) {
-    // return;
-    // }
-    //
-    // // Prepeare DbDatum
-    // // --------------------------------------------
-    // DbDatum[] data = new DbDatum[2];
-    // data[0] = new DbDatum("ProjectTitle");
-    // data[0].insert("null");
-    //
-    // data[1] = new DbDatum("Description");
-    // data[1].insert("Watches archiving");
-    //
-    // // Call database and and values
-    // // --------------------------------------------
-    // get_db_class().put_property(data);
-    // }
-
-}
diff --git a/src/main/java/HdbExtractor/doc_html/Attributes.html b/src/main/java/HdbExtractor/doc_html/Attributes.html
deleted file mode 100644
index d551e6fbf5d5a5994be04ce45d8fdd445e858b6c..0000000000000000000000000000000000000000
--- a/src/main/java/HdbExtractor/doc_html/Attributes.html
+++ /dev/null
@@ -1,53 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
-<HTML>
-<HEAD>
-<Title> Tango Device Server User's Guide </Title>
-   <META NAME="GENERATOR" CONTENT="Mozilla/3.01Gold (X11; I; HP-UX B.10.20 9000/735) [Netscape]">
-</HEAD>
-<BODY TEXT="#000000" BGCOLOR="#FFFFFF" LINK="#0000FF" VLINK="#FF0000" ALINK="#FF0000">
-
-<P><!-------TITLE------></P>
-<table width="100%" height="20%"><tr>
-<td align=LEFT>
-<FONT COLOR="#0000FF"><FONT SIZE=+4>Synchrotron </FONT></FONT>
-<FONT COLOR="#0000FF"><FONT SIZE=+4>Soleil</FONT></FONT>
-<H5>Saint-Aubin - BP 48 91192 GIF-sur-YVETTE CEDEX<BR>
-</td><td>
-<A href="http://www.synchrotron-soleil.fr/">
-<IMG  SRC="http://controle/images/logo-150.gif" 
-		ALT="SOLEIL Logo" ALIGN=RIGHT border="0"></A>
-</td></tr></table>
-
-<HR WIDTH="100%"></H5>
-
-<Br>
-<center>
-<h1>
-Tango Device Server<Br>
-Device Attributes Description
-</h1>
-<Br>
-<b>
-Revision: 1.5 - Author: chinkumo
-</b>
-</center>
-
-
-<Br>
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
-<HTML>
-<HEAD>
-<Title> Tango Device Server User's Guide </Title>
-   <META NAME="GENERATOR" CONTENT="Mozilla/3.01Gold (X11; I; HP-UX B.10.20 9000/735) [Netscape]">
-</HEAD>
-<BODY TEXT="#000000" BGCOLOR="#FFFFFF" LINK="#0000FF" VLINK="#FF0000" ALINK="#FF0000">
-
-<P><!-------TITLE------></P>
-
-<Center>
-<Br>
-<HR WIDTH="100%"></H5>
-<H3>(c) SOLEIL : Groupe ICA Contr�le et Acquisitions </H33>
-</Center>
-</body>
-</html>
diff --git a/src/main/java/HdbExtractor/doc_html/Description b/src/main/java/HdbExtractor/doc_html/Description
deleted file mode 100644
index af2bc1822b5f7e5582e0e12c63e361fedc82dcbb..0000000000000000000000000000000000000000
--- a/src/main/java/HdbExtractor/doc_html/Description
+++ /dev/null
@@ -1,62 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
-<HTML>
-<HEAD>
-<Title> Tango Device Server User's Guide </Title>
-   <META NAME="GENERATOR" CONTENT="Mozilla/3.01Gold (X11; I; HP-UX B.10.20 9000/735) [Netscape]">
-</HEAD>
-<BODY TEXT="#000000" BGCOLOR="#FFFFFF" LINK="#0000FF" VLINK="#FF0000" ALINK="#FF0000">
-
-<P><!-------TITLE------></P>
-<table width="100%" height="20%"><tr>
-<td align=LEFT>
-<FONT COLOR="#0000FF"><FONT SIZE=+4>Synchrotron </FONT></FONT>
-<FONT COLOR="#0000FF"><FONT SIZE=+4>Soleil</FONT></FONT>
-<H5>Saint-Aubin - BP 48 91192 GIF-sur-YVETTE CEDEX<BR>
-</td><td>
-<A href="http://www.synchrotron-soleil.fr/">
-<IMG  SRC="http://controle/images/logo-150.gif" 
-		ALT="SOLEIL Logo" ALIGN=RIGHT border="0"></A>
-</td></tr></table>
-
-<HR WIDTH="100%"></H5>
-
-<Br>
-<center>
-<h1>
-Tango Device Server<Br>
-Device Description
-</h1>
-<Br>
-<b>
-Revision: 1.5 - Author: chinkumo
-</b>
-</center>
-
-
-<Center>
-<Br>
-<Br>
-<Br>
-<Br>
-<Br>
-<Br>
-This Page Must Be Filled by <Br>
-The Programmer
-</Center>
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
-<HTML>
-<HEAD>
-<Title> Tango Device Server User's Guide </Title>
-   <META NAME="GENERATOR" CONTENT="Mozilla/3.01Gold (X11; I; HP-UX B.10.20 9000/735) [Netscape]">
-</HEAD>
-<BODY TEXT="#000000" BGCOLOR="#FFFFFF" LINK="#0000FF" VLINK="#FF0000" ALINK="#FF0000">
-
-<P><!-------TITLE------></P>
-
-<Center>
-<Br>
-<HR WIDTH="100%"></H5>
-<H3>(c) SOLEIL : Groupe ICA Contr�le et Acquisitions </H33>
-</Center>
-</body>
-</html>
diff --git a/src/main/java/HdbExtractor/doc_html/DevCommands.html b/src/main/java/HdbExtractor/doc_html/DevCommands.html
deleted file mode 100644
index ccc6b9074728e64da954ffb660d58c9a17c7f6e7..0000000000000000000000000000000000000000
--- a/src/main/java/HdbExtractor/doc_html/DevCommands.html
+++ /dev/null
@@ -1,886 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
-<HTML>
-<HEAD>
-<Title> Tango Device Server User's Guide </Title>
-   <META NAME="GENERATOR" CONTENT="Mozilla/3.01Gold (X11; I; HP-UX B.10.20 9000/735) [Netscape]">
-</HEAD>
-<BODY TEXT="#000000" BGCOLOR="#FFFFFF" LINK="#0000FF" VLINK="#FF0000" ALINK="#FF0000">
-
-<P><!-------TITLE------></P>
-<table width="100%" height="20%"><tr>
-<td align=LEFT>
-<FONT COLOR="#0000FF"><FONT SIZE=+4>Synchrotron </FONT></FONT>
-<FONT COLOR="#0000FF"><FONT SIZE=+4>Soleil</FONT></FONT>
-<H5>Saint-Aubin - BP 48 91192 GIF-sur-YVETTE CEDEX<BR>
-</td><td>
-<A href="http://www.synchrotron-soleil.fr/">
-<IMG  SRC="http://controle/images/logo-150.gif" 
-		ALT="SOLEIL Logo" ALIGN=RIGHT border="0"></A>
-</td></tr></table>
-
-<HR WIDTH="100%"></H5>
-
-<Br>
-<center>
-<h1>
-Tango Device Server<Br>
-Device Commands Description
-</h1>
-<Br>
-<b>
-Revision: 1.5 - Author: chinkumo
-</b>
-</center>
-
-
-<Br>
-<Br>
-<Br>
-<A NAME="Init"><!-- --></A>
-<A NAME="Init"><!-- --></A>
-<h2>1 - Init</h2>
-<ul>
-<Li><Strong>Description: </Strong> This commands re-initialise a device keeping the same network connection.<Br>
-After an Init command executed on a device, it is not necessary for client to re-connect to the device.<Br>
-This command first calls the device <i> delete_device() </i>method and then execute its <i> init_device()</i> method.<Br>
-For C++ device server, all the memory allocated in the <i> nit_device() </i> method must be freed in the <i> delete_device() </i> method.<Br>
-The language device desctructor automatically calls the <i> delete_device() </i> method.<Br>&nbsp
-<Li><Strong>Argin:<Br>DEV_VOID</Strong>
- : none.<Br>&nbsp
-<Li><Strong>Argout:<Br>DEV_VOID</Strong>
- : none.<Br>&nbsp
-<Li><Strong>Command allowed for: </Strong><Ul>
-</Ul>
-<Br>&nbsp
-</ul><Br>
-<Br>
-<A NAME="State"><!-- --></A>
-<A NAME="State"><!-- --></A>
-<h2>2 - State</h2>
-<ul>
-<Li><Strong>Description: </Strong> This command gets the device state (stored in its <i>device_state</i> data member) and returns it to the caller.<Br>&nbsp
-<Li><Strong>Argin:<Br>DEV_VOID</Strong>
- : none.<Br>&nbsp
-<Li><Strong>Argout:<Br>DEV_STATE</Strong>
- : State Code<Br>&nbsp
-<Li><Strong>Command allowed for: </Strong><Ul>
-</Ul>
-<Br>&nbsp
-</ul><Br>
-<Br>
-<A NAME="Status"><!-- --></A>
-<A NAME="Status"><!-- --></A>
-<h2>3 - Status</h2>
-<ul>
-<Li><Strong>Description: </Strong> This command gets the device status (stored in its <i>device_status</i> data member) and returns it to the caller.<Br>&nbsp
-<Li><Strong>Argin:<Br>DEV_VOID</Strong>
- : none.<Br>&nbsp
-<Li><Strong>Argout:<Br>CONST_DEV_STRING</Strong>
- : Status descrition<Br>&nbsp
-<Li><Strong>Command allowed for: </Strong><Ul>
-</Ul>
-<Br>&nbsp
-</ul><Br>
-<Br>
-<A NAME="GetInfo"><!-- --></A>
-<A NAME="GetInfo"><!-- --></A>
-<h2>4 - GetInfo</h2>
-<ul>
-<Li><Strong>Description: </Strong> Returns misc informations about the database and a set of parameters characterizing the connection.<Br>&nbsp
-<Li><Strong>Argin:<Br>DEV_VOID</Strong>
- : <Br>&nbsp
-<Li><Strong>Argout:<Br>DEV_STRING</Strong>
- : The informations that characterize the database<Br>&nbsp
-<Li><Strong>Command allowed for: </Strong><Ul>
-</Ul>
-<Br>&nbsp
-</ul><Br>
-<Br>
-<A NAME="GetHost"><!-- --></A>
-<A NAME="GetHost"><!-- --></A>
-<h2>5 - GetHost</h2>
-<ul>
-<Li><Strong>Description: </Strong> Returns the connected database host identifier.<Br>&nbsp
-<Li><Strong>Argin:<Br>DEV_VOID</Strong>
- : <Br>&nbsp
-<Li><Strong>Argout:<Br>DEV_STRING</Strong>
- : The connected database host identifier<Br>&nbsp
-<Li><Strong>Command allowed for: </Strong><Ul>
-</Ul>
-<Br>&nbsp
-</ul><Br>
-<Br>
-<A NAME="GetUser"><!-- --></A>
-<A NAME="GetUser"><!-- --></A>
-<h2>6 - GetUser</h2>
-<ul>
-<Li><Strong>Description: </Strong> Gets the current user's name used for the connection<Br>&nbsp
-<Li><Strong>Argin:<Br>DEV_VOID</Strong>
- : <Br>&nbsp
-<Li><Strong>Argout:<Br>DEV_STRING</Strong>
- : The current user's name used for the connection<Br>&nbsp
-<Li><Strong>Command allowed for: </Strong><Ul>
-</Ul>
-<Br>&nbsp
-</ul><Br>
-<Br>
-<A NAME="GetConnectionState"><!-- --></A>
-<A NAME="GetConnectionState"><!-- --></A>
-<h2>7 - GetConnectionState</h2>
-<ul>
-<Li><Strong>Description: </Strong> Cheks if the connection to HDB is alive<Br>&nbsp
-<Li><Strong>Argin:<Br>DEV_VOID</Strong>
- : <Br>&nbsp
-<Li><Strong>Argout:<Br>DEV_BOOLEAN</Strong>
- : The connection state<Br>&nbsp
-<Li><Strong>Command allowed for: </Strong><Ul>
-</Ul>
-<Br>&nbsp
-</ul><Br>
-<Br>
-<A NAME="Reset"><!-- --></A>
-<A NAME="Reset"><!-- --></A>
-<h2>8 - Reset</h2>
-<ul>
-<Li><Strong>Description: </Strong> <Br>&nbsp
-<Li><Strong>Argin:<Br>DEV_VOID</Strong>
- : <Br>&nbsp
-<Li><Strong>Argout:<Br>DEV_STRING</Strong>
- : The user name for the connection<Br>&nbsp
-<Li><Strong>Command allowed for: </Strong><Ul>
-</Ul>
-<Br>&nbsp
-</ul><Br>
-<Br>
-<A NAME="GetAttDefinitionData"><!-- --></A>
-<A NAME="GetAttDefinitionData"><!-- --></A>
-<h2>9 - GetAttDefinitionData</h2>
-<ul>
-<Li><Strong>Description: </Strong> Returns an array containing the differents definition informations for the given attribute.<Br>&nbsp
-<Li><Strong>Argin:<Br>DEV_STRING</Strong>
- : The attribute's name<Br>&nbsp
-<Li><Strong>Argout:<Br>DEVVAR_STRINGARRAY</Strong>
- : Differents definition informations for the given attribute<Br>&nbsp
-<Li><Strong>Command allowed for: </Strong><Ul>
-</Ul>
-<Br>&nbsp
-</ul><Br>
-<Br>
-<A NAME="GetAttId"><!-- --></A>
-<A NAME="GetAttId"><!-- --></A>
-<h2>10 - GetAttId</h2>
-<ul>
-<Li><Strong>Description: </Strong> Gets for a specified attribute its ID as defined in HDB<Br>&nbsp
-<Li><Strong>Argin:<Br>DEV_STRING</Strong>
- : The attribute's name<Br>&nbsp
-<Li><Strong>Argout:<Br>DEV_SHORT</Strong>
- : The HDB's ID that characterize the given attribute<Br>&nbsp
-<Li><Strong>Command allowed for: </Strong><Ul>
-</Ul>
-<Br>&nbsp
-</ul><Br>
-<Br>
-<A NAME="GetAttNameAll"><!-- --></A>
-<A NAME="GetAttNameAll"><!-- --></A>
-<h2>11 - GetAttNameAll</h2>
-<ul>
-<Li><Strong>Description: </Strong> Gets whole list of the attributes registered in HDB<Br>&nbsp
-<Li><Strong>Argin:<Br>DEV_VOID</Strong>
- : <Br>&nbsp
-<Li><Strong>Argout:<Br>DEVVAR_STRINGARRAY</Strong>
- : The whole list of the attributes registered in HDB<Br>&nbsp
-<Li><Strong>Command allowed for: </Strong><Ul>
-</Ul>
-<Br>&nbsp
-</ul><Br>
-<Br>
-<A NAME="GetAttNameFacility"><!-- --></A>
-<A NAME="GetAttNameFacility"><!-- --></A>
-<h2>12 - GetAttNameFacility</h2>
-<ul>
-<Li><Strong>Description: </Strong> Gets whole list of the attributes registered in HDB and that belong to the current facility.<Br>&nbsp
-<Li><Strong>Argin:<Br>DEV_VOID</Strong>
- : <Br>&nbsp
-<Li><Strong>Argout:<Br>DEVVAR_STRINGARRAY</Strong>
- : The whole list of the attributes registered in HDB ,resp TDB), and that belong to the current facility.<Br>&nbsp
-<Li><Strong>Command allowed for: </Strong><Ul>
-</Ul>
-<Br>&nbsp
-</ul><Br>
-<Br>
-<A NAME="GetAttNameFilterFormat"><!-- --></A>
-<A NAME="GetAttNameFilterFormat"><!-- --></A>
-<h2>13 - GetAttNameFilterFormat</h2>
-<ul>
-<Li><Strong>Description: </Strong> Gets the list of <I>HDB</I> registered attributes for the given format<Br>&nbsp
-<Li><Strong>Argin:<Br>DEV_SHORT</Strong>
- : A format [0 -> scalar - 1 -> spectrum - 2 -> image]<Br>&nbsp
-<Li><Strong>Argout:<Br>DEVVAR_STRINGARRAY</Strong>
- : The filtered list of attributes registered in HDB.  The filtering is made according to the given format [0 -> scalar - 1 -> spectrum - 2 -> image]<Br>&nbsp
-<Li><Strong>Command allowed for: </Strong><Ul>
-</Ul>
-<Br>&nbsp
-</ul><Br>
-<Br>
-<A NAME="GetAttNameFilterType"><!-- --></A>
-<A NAME="GetAttNameFilterType"><!-- --></A>
-<h2>14 - GetAttNameFilterType</h2>
-<ul>
-<Li><Strong>Description: </Strong> Gets the list of <I>HDB</I> registered attributes for the given type<Br>&nbsp
-<Li><Strong>Argin:<Br>DEV_SHORT</Strong>
- : A type [2 -> Tango::DevShort | 3 -> Tango::DevLong | 5 -> Tango::DevDouble and 8 -> Tango::DevString]<Br>&nbsp
-<Li><Strong>Argout:<Br>DEVVAR_STRINGARRAY</Strong>
- : The filtered list of attributes registered in HDB.  The filtering is made according to the given type [2 -> Tango::DevShort | 3 -> Tango::DevLong | 5 -> Tango::DevDouble and 8 -> Tango::DevString]<Br>&nbsp
-<Li><Strong>Command allowed for: </Strong><Ul>
-</Ul>
-<Br>&nbsp
-</ul><Br>
-<Br>
-<A NAME="GetAttCountAll"><!-- --></A>
-<A NAME="GetAttCountAll"><!-- --></A>
-<h2>15 - GetAttCountAll</h2>
-<ul>
-<Li><Strong>Description: </Strong> Gets the total number of attributes defined in HDB.<Br>&nbsp
-<Li><Strong>Argin:<Br>DEV_VOID</Strong>
- : <Br>&nbsp
-<Li><Strong>Argout:<Br>DEV_SHORT</Strong>
- : The total number of attributes defined in HDB<Br>&nbsp
-<Li><Strong>Command allowed for: </Strong><Ul>
-</Ul>
-<Br>&nbsp
-</ul><Br>
-<Br>
-<A NAME="GetAttCountFilterFormat"><!-- --></A>
-<A NAME="GetAttCountFilterFormat"><!-- --></A>
-<h2>16 - GetAttCountFilterFormat</h2>
-<ul>
-<Li><Strong>Description: </Strong> Gets the total number of attributes defined in HDB with the given format.<Br>&nbsp
-<Li><Strong>Argin:<Br>DEV_SHORT</Strong>
- : A format [0 -> scalar - 1 -> spectrum - 2 -> image]<Br>&nbsp
-<Li><Strong>Argout:<Br>DEV_SHORT</Strong>
- : The total number of attributes defined in HDB with the given format [0 -> scalar - 1 -> spectrum - 2 -> image]<Br>&nbsp
-<Li><Strong>Command allowed for: </Strong><Ul>
-</Ul>
-<Br>&nbsp
-</ul><Br>
-<Br>
-<A NAME="GetAttCountFilterType"><!-- --></A>
-<A NAME="GetAttCountFilterType"><!-- --></A>
-<h2>17 - GetAttCountFilterType</h2>
-<ul>
-<Li><Strong>Description: </Strong> Gets the total number of attributes defined in HDB with the given type.<Br>&nbsp
-<Li><Strong>Argin:<Br>DEV_SHORT</Strong>
- : A type [2 -> Tango::DevShort | 3 -> Tango::DevLong | 5 -> Tango::DevDouble and 8 -> Tango::DevString]<Br>&nbsp
-<Li><Strong>Argout:<Br>DEV_SHORT</Strong>
- : The total number of attributes defined in HDB with the given type [2 -> Tango::DevShort | 3 -> Tango::DevLong | 5 -> Tango::DevDouble and 8 -> Tango::DevString]<Br>&nbsp
-<Li><Strong>Command allowed for: </Strong><Ul>
-</Ul>
-<Br>&nbsp
-</ul><Br>
-<Br>
-<A NAME="GetDomains"><!-- --></A>
-<A NAME="GetDomains"><!-- --></A>
-<h2>18 - GetDomains</h2>
-<ul>
-<Li><Strong>Description: </Strong> Gets all the registered domains.<Br>&nbsp
-<Li><Strong>Argin:<Br>DEV_VOID</Strong>
- : <Br>&nbsp
-<Li><Strong>Argout:<Br>DEVVAR_STRINGARRAY</Strong>
- : The registered domains<Br>&nbsp
-<Li><Strong>Command allowed for: </Strong><Ul>
-</Ul>
-<Br>&nbsp
-</ul><Br>
-<Br>
-<A NAME="GetFamilies"><!-- --></A>
-<A NAME="GetFamilies"><!-- --></A>
-<h2>19 - GetFamilies</h2>
-<ul>
-<Li><Strong>Description: </Strong> Gets all the registered families<Br>&nbsp
-<Li><Strong>Argin:<Br>DEV_VOID</Strong>
- : <Br>&nbsp
-<Li><Strong>Argout:<Br>DEVVAR_STRINGARRAY</Strong>
- : The registered families<Br>&nbsp
-<Li><Strong>Command allowed for: </Strong><Ul>
-</Ul>
-<Br>&nbsp
-</ul><Br>
-<Br>
-<A NAME="GetFamiliesByDomain"><!-- --></A>
-<A NAME="GetFamiliesByDomain"><!-- --></A>
-<h2>20 - GetFamiliesByDomain</h2>
-<ul>
-<Li><Strong>Description: </Strong> <Br>&nbsp
-<Li><Strong>Argin:<Br>DEVVAR_STRINGARRAY</Strong>
- : The given domain<Br>&nbsp
-<Li><Strong>Argout:<Br>DEVVAR_STRINGARRAY</Strong>
- : The registered families for the given domain<Br>&nbsp
-<Li><Strong>Command allowed for: </Strong><Ul>
-</Ul>
-<Br>&nbsp
-</ul><Br>
-<Br>
-<A NAME="GetMembers"><!-- --></A>
-<A NAME="GetMembers"><!-- --></A>
-<h2>21 - GetMembers</h2>
-<ul>
-<Li><Strong>Description: </Strong> Gets all the registered members<Br>&nbsp
-<Li><Strong>Argin:<Br>DEV_VOID</Strong>
- : <Br>&nbsp
-<Li><Strong>Argout:<Br>DEVVAR_STRINGARRAY</Strong>
- : The registered members<Br>&nbsp
-<Li><Strong>Command allowed for: </Strong><Ul>
-</Ul>
-<Br>&nbsp
-</ul><Br>
-<Br>
-<A NAME="GetMembersByDomainFamily"><!-- --></A>
-<A NAME="GetMembersByDomainFamily"><!-- --></A>
-<h2>22 - GetMembersByDomainFamily</h2>
-<ul>
-<Li><Strong>Description: </Strong> Gets all the registered members for the given domain and family<Br>&nbsp
-<Li><Strong>Argin:<Br>DEVVAR_STRINGARRAY</Strong>
- : The given domain and family<Br>&nbsp
-<Li><Strong>Argout:<Br>DEVVAR_STRINGARRAY</Strong>
- : The registered members for the given domain and family<Br>&nbsp
-<Li><Strong>Command allowed for: </Strong><Ul>
-</Ul>
-<Br>&nbsp
-</ul><Br>
-<Br>
-<A NAME="GetAttPropertiesData"><!-- --></A>
-<A NAME="GetAttPropertiesData"><!-- --></A>
-<h2>23 - GetAttPropertiesData</h2>
-<ul>
-<Li><Strong>Description: </Strong> Gets the differents properties informations for the given attribute<Br>&nbsp
-<Li><Strong>Argin:<Br>DEV_STRING</Strong>
- : The attribute's name<Br>&nbsp
-<Li><Strong>Argout:<Br>DEVVAR_STRINGARRAY</Strong>
- : An array containing the differents properties for the given attribute<Br>&nbsp
-<Li><Strong>Command allowed for: </Strong><Ul>
-</Ul>
-<Br>&nbsp
-</ul><Br>
-<Br>
-<A NAME="GetCurrentArchivedAtt"><!-- --></A>
-<A NAME="GetCurrentArchivedAtt"><!-- --></A>
-<h2>24 - GetCurrentArchivedAtt</h2>
-<ul>
-<Li><Strong>Description: </Strong> Gets the list of attributes that are being archived in <I>HDB</I><Br>&nbsp
-<Li><Strong>Argin:<Br>DEV_VOID</Strong>
- : <Br>&nbsp
-<Li><Strong>Argout:<Br>DEVVAR_STRINGARRAY</Strong>
- : The list of attributes that are being archived<Br>&nbsp
-<Li><Strong>Command allowed for: </Strong><Ul>
-</Ul>
-<Br>&nbsp
-</ul><Br>
-<Br>
-<A NAME="IsArchived"><!-- --></A>
-<A NAME="IsArchived"><!-- --></A>
-<h2>25 - IsArchived</h2>
-<ul>
-<Li><Strong>Description: </Strong> Returns "true" if the attribute of given name is currently archived, "false" otherwise.<Br>&nbsp
-<Li><Strong>Argin:<Br>DEV_STRING</Strong>
- : The attribute's name<Br>&nbsp
-<Li><Strong>Argout:<Br>DEV_BOOLEAN</Strong>
- : true if the given attribute is being archived<Br>&nbsp
-<Li><Strong>Command allowed for: </Strong><Ul>
-</Ul>
-<Br>&nbsp
-</ul><Br>
-<Br>
-<A NAME="GetArchivingMode"><!-- --></A>
-<A NAME="GetArchivingMode"><!-- --></A>
-<h2>26 - GetArchivingMode</h2>
-<ul>
-<Li><Strong>Description: </Strong> Gets the archiving mode used for the specified attribute.<Br>&nbsp
-<Li><Strong>Argin:<Br>DEV_STRING</Strong>
- : The attribute's name<Br>&nbsp
-<Li><Strong>Argout:<Br>DEVVAR_STRINGARRAY</Strong>
- : The archiving mode used for the specified attribute<Br>&nbsp
-<Li><Strong>Command allowed for: </Strong><Ul>
-</Ul>
-<Br>&nbsp
-</ul><Br>
-<Br>
-<A NAME="GetAttScalarData"><!-- --></A>
-<A NAME="GetAttScalarData"><!-- --></A>
-<h2>27 - GetAttScalarData</h2>
-<ul>
-<Li><Strong>Description: </Strong> Gets all the data archieved for an attribute.<Br>&nbsp
-<Li><Strong>Argin:<Br>DEV_STRING</Strong>
- : The attribute's name<Br>&nbsp
-<Li><Strong>Argout:<Br>DEVVAR_DOUBLESTRINGARRAY</Strong>
- : All the wished data<Br>&nbsp
-<Li><Strong>Command allowed for: </Strong><Ul>
-</Ul>
-<Br>&nbsp
-</ul><Br>
-<Br>
-<A NAME="GetAttScalarDataBeetweenDates"><!-- --></A>
-<A NAME="GetAttScalarDataBeetweenDates"><!-- --></A>
-<h2>28 - GetAttScalarDataBeetweenDates</h2>
-<ul>
-<Li><Strong>Description: </Strong> Retrieves data beetwen two dates, for a given scalar attribute.<Br>&nbsp
-<Li><Strong>Argin:<Br>DEVVAR_STRINGARRAY</Strong>
- : The attribute's name, the beginning date  ,DD-MM-YYYY HH24:MI:SS) and the ending date  ,DD-MM-YYYY HH24:MI:SS)<Br>&nbsp
-<Li><Strong>Argout:<Br>DEVVAR_DOUBLESTRINGARRAY</Strong>
- : All the wished data<Br>&nbsp
-<Li><Strong>Command allowed for: </Strong><Ul>
-</Ul>
-<Br>&nbsp
-</ul><Br>
-<Br>
-<A NAME="GetAttScalarDataSupThanBeetweenDates"><!-- --></A>
-<A NAME="GetAttScalarDataSupThanBeetweenDates"><!-- --></A>
-<h2>29 - GetAttScalarDataSupThanBeetweenDates</h2>
-<ul>
-<Li><Strong>Description: </Strong> Retrieves data beetwen two dates (date_1 & date_2) - Data are higher than the given value x.<Br>&nbsp
-<Li><Strong>Argin:<Br>DEVVAR_STRINGARRAY</Strong>
- : The attribute's name, the lower limit, the beginning date  ,DD-MM-YYYY HH24:MI:SS) and the ending date  ,DD-MM-YYYY HH24:MI:SS)<Br>&nbsp
-<Li><Strong>Argout:<Br>DEVVAR_DOUBLESTRINGARRAY</Strong>
- : All the wished data<Br>&nbsp
-<Li><Strong>Command allowed for: </Strong><Ul>
-</Ul>
-<Br>&nbsp
-</ul><Br>
-<Br>
-<A NAME="GetAttScalarDataSupAndInfThanBeetweenDates"><!-- --></A>
-<A NAME="GetAttScalarDataSupAndInfThanBeetweenDates"><!-- --></A>
-<h2>30 - GetAttScalarDataSupAndInfThanBeetweenDates</h2>
-<ul>
-<Li><Strong>Description: </Strong> Retrieves data beetwen two dates (date_1 & date_2) - Data are higher than the given value x AND lower than the given value y.<Br>&nbsp
-<Li><Strong>Argin:<Br>DEVVAR_STRINGARRAY</Strong>
- : The attribute's name, the lower limit, the upper limit, the beginning date  ,DD-MM-YYYY HH24:MI:SS) and the ending date  ,DD-MM-YYYY HH24:MI:SS)<Br>&nbsp
-<Li><Strong>Argout:<Br>DEVVAR_DOUBLESTRINGARRAY</Strong>
- : All the wished data<Br>&nbsp
-<Li><Strong>Command allowed for: </Strong><Ul>
-</Ul>
-<Br>&nbsp
-</ul><Br>
-<Br>
-<A NAME="GetAttScalarDataInfOrSupThanBeetweenDates"><!-- --></A>
-<A NAME="GetAttScalarDataInfOrSupThanBeetweenDates"><!-- --></A>
-<h2>31 - GetAttScalarDataInfOrSupThanBeetweenDates</h2>
-<ul>
-<Li><Strong>Description: </Strong> Retrieves data beetwen two dates (date_1 & date_2) - Data are lower than the given value x OR higher than the given value y.<Br>&nbsp
-<Li><Strong>Argin:<Br>DEVVAR_STRINGARRAY</Strong>
- : The attribute's name, the lower limit, the upper limit, the beginning date  ,DD-MM-YYYY HH24:MI:SS) and the ending date  ,DD-MM-YYYY HH24:MI:SS)<Br>&nbsp
-<Li><Strong>Argout:<Br>DEVVAR_DOUBLESTRINGARRAY</Strong>
- : All the wished data<Br>&nbsp
-<Li><Strong>Command allowed for: </Strong><Ul>
-</Ul>
-<Br>&nbsp
-</ul><Br>
-<Br>
-<A NAME="GetAttScalarDataInfThanBeetweenDates"><!-- --></A>
-<A NAME="GetAttScalarDataInfThanBeetweenDates"><!-- --></A>
-<h2>32 - GetAttScalarDataInfThanBeetweenDates</h2>
-<ul>
-<Li><Strong>Description: </Strong> Retrieves data beetwen two dates (date_1 & date_2) - Data are lower than the given value x.<Br>&nbsp
-<Li><Strong>Argin:<Br>DEVVAR_STRINGARRAY</Strong>
- : The attribute's name, the upper limit, the beginning date  ,DD-MM-YYYY HH24:MI:SS) and the ending date  ,DD-MM-YYYY HH24:MI:SS)<Br>&nbsp
-<Li><Strong>Argout:<Br>DEVVAR_DOUBLESTRINGARRAY</Strong>
- : All the wished data<Br>&nbsp
-<Li><Strong>Command allowed for: </Strong><Ul>
-</Ul>
-<Br>&nbsp
-</ul><Br>
-<Br>
-<A NAME="GetAttScalarDataLastN"><!-- --></A>
-<A NAME="GetAttScalarDataLastN"><!-- --></A>
-<h2>33 - GetAttScalarDataLastN</h2>
-<ul>
-<Li><Strong>Description: </Strong> Retrieves the last n archived data, for a given scalar attribute.<Br>&nbsp
-<Li><Strong>Argin:<Br>DEVVAR_STRINGARRAY</Strong>
- : The attribute's name and the number of wished data<Br>&nbsp
-<Li><Strong>Argout:<Br>DEVVAR_DOUBLESTRINGARRAY</Strong>
- : All the wished data<Br>&nbsp
-<Li><Strong>Command allowed for: </Strong><Ul>
-</Ul>
-<Br>&nbsp
-</ul><Br>
-<Br>
-<A NAME="GetAttScalarDataInfThan"><!-- --></A>
-<A NAME="GetAttScalarDataInfThan"><!-- --></A>
-<h2>34 - GetAttScalarDataInfThan</h2>
-<ul>
-<Li><Strong>Description: </Strong> Retrieves all the data that are lower than the given value x.<Br>&nbsp
-<Li><Strong>Argin:<Br>DEVVAR_STRINGARRAY</Strong>
- : The attribute's name, the upper limit<Br>&nbsp
-<Li><Strong>Argout:<Br>DEVVAR_DOUBLESTRINGARRAY</Strong>
- : All the wished data<Br>&nbsp
-<Li><Strong>Command allowed for: </Strong><Ul>
-</Ul>
-<Br>&nbsp
-</ul><Br>
-<Br>
-<A NAME="GetAttScalarDataSupThan"><!-- --></A>
-<A NAME="GetAttScalarDataSupThan"><!-- --></A>
-<h2>35 - GetAttScalarDataSupThan</h2>
-<ul>
-<Li><Strong>Description: </Strong> Retrieves all the data that are higher than the given value x.<Br>&nbsp
-<Li><Strong>Argin:<Br>DEVVAR_STRINGARRAY</Strong>
- : The attribute's name and the  lower limit<Br>&nbsp
-<Li><Strong>Argout:<Br>DEVVAR_DOUBLESTRINGARRAY</Strong>
- : All the wished data<Br>&nbsp
-<Li><Strong>Command allowed for: </Strong><Ul>
-</Ul>
-<Br>&nbsp
-</ul><Br>
-<Br>
-<A NAME="GetAttScalarDataInfOrSupThan"><!-- --></A>
-<A NAME="GetAttScalarDataInfOrSupThan"><!-- --></A>
-<h2>36 - GetAttScalarDataInfOrSupThan</h2>
-<ul>
-<Li><Strong>Description: </Strong> Retrieves all data that are lower than the given value x OR higher than the given value y.<Br>&nbsp
-<Li><Strong>Argin:<Br>DEVVAR_STRINGARRAY</Strong>
- : The attribute's name, the lower limit and the upper limit<Br>&nbsp
-<Li><Strong>Argout:<Br>DEVVAR_DOUBLESTRINGARRAY</Strong>
- : All the wished data<Br>&nbsp
-<Li><Strong>Command allowed for: </Strong><Ul>
-</Ul>
-<Br>&nbsp
-</ul><Br>
-<Br>
-<A NAME="GetAttScalarDataSupAndInfThan"><!-- --></A>
-<A NAME="GetAttScalarDataSupAndInfThan"><!-- --></A>
-<h2>37 - GetAttScalarDataSupAndInfThan</h2>
-<ul>
-<Li><Strong>Description: </Strong> Retrieves all data that are higher than the given value x AND lower than the given value y.<Br>&nbsp
-<Li><Strong>Argin:<Br>DEVVAR_STRINGARRAY</Strong>
- : The attribute's name, the lower limit and the upper limit<Br>&nbsp
-<Li><Strong>Argout:<Br>DEVVAR_DOUBLESTRINGARRAY</Strong>
- : All the wished data<Br>&nbsp
-<Li><Strong>Command allowed for: </Strong><Ul>
-</Ul>
-<Br>&nbsp
-</ul><Br>
-<Br>
-<A NAME="GetAttScalarDataMax"><!-- --></A>
-<A NAME="GetAttScalarDataMax"><!-- --></A>
-<h2>38 - GetAttScalarDataMax</h2>
-<ul>
-<Li><Strong>Description: </Strong> Returns the biggest value generated by the attribute.<Br>&nbsp
-<Li><Strong>Argin:<Br>DEV_STRING</Strong>
- : The attribute's name<Br>&nbsp
-<Li><Strong>Argout:<Br>DEV_DOUBLE</Strong>
- : The biggest value generated by the attribute<Br>&nbsp
-<Li><Strong>Command allowed for: </Strong><Ul>
-</Ul>
-<Br>&nbsp
-</ul><Br>
-<Br>
-<A NAME="GetAttScalarDataAvg"><!-- --></A>
-<A NAME="GetAttScalarDataAvg"><!-- --></A>
-<h2>39 - GetAttScalarDataAvg</h2>
-<ul>
-<Li><Strong>Description: </Strong> Returns the average value generated by the given attribute.<Br>&nbsp
-<Li><Strong>Argin:<Br>DEV_STRING</Strong>
- : The attribute's name<Br>&nbsp
-<Li><Strong>Argout:<Br>DEV_DOUBLE</Strong>
- : The average of the values generated by the attribute<Br>&nbsp
-<Li><Strong>Command allowed for: </Strong><Ul>
-</Ul>
-<Br>&nbsp
-</ul><Br>
-<Br>
-<A NAME="GetAttScalarDataMin"><!-- --></A>
-<A NAME="GetAttScalarDataMin"><!-- --></A>
-<h2>40 - GetAttScalarDataMin</h2>
-<ul>
-<Li><Strong>Description: </Strong> Returns the smallest scalar value generated by the attribute.<Br>&nbsp
-<Li><Strong>Argin:<Br>DEV_STRING</Strong>
- : The attribute's name<Br>&nbsp
-<Li><Strong>Argout:<Br>DEV_DOUBLE</Strong>
- : The smallest value generated by the attribute<Br>&nbsp
-<Li><Strong>Command allowed for: </Strong><Ul>
-</Ul>
-<Br>&nbsp
-</ul><Br>
-<Br>
-<A NAME="GetAttScalarDataMaxBetweenDates"><!-- --></A>
-<A NAME="GetAttScalarDataMaxBetweenDates"><!-- --></A>
-<h2>41 - GetAttScalarDataMaxBetweenDates</h2>
-<ul>
-<Li><Strong>Description: </Strong> Returns the biggest value generated between the two given dates.<Br>&nbsp
-<Li><Strong>Argin:<Br>DEVVAR_STRINGARRAY</Strong>
- : The attribute's name, the beginning date  ,DD-MM-YYYY HH24:MI:SS) and the ending date  ,DD-MM-YYYY HH24:MI:SS)<Br>&nbsp
-<Li><Strong>Argout:<Br>DEV_DOUBLE</Strong>
- : The beginning date and the ending date<Br>&nbsp
-<Li><Strong>Command allowed for: </Strong><Ul>
-</Ul>
-<Br>&nbsp
-</ul><Br>
-<Br>
-<A NAME="GetAttScalarDataAvgBetweenDates"><!-- --></A>
-<A NAME="GetAttScalarDataAvgBetweenDates"><!-- --></A>
-<h2>42 - GetAttScalarDataAvgBetweenDates</h2>
-<ul>
-<Li><Strong>Description: </Strong> Returns the average value generated by the given attribute and between the two given dates.<Br>&nbsp
-<Li><Strong>Argin:<Br>DEVVAR_STRINGARRAY</Strong>
- : The attribute's name, the beginning date  ,DD-MM-YYYY HH24:MI:SS) and the ending date  ,DD-MM-YYYY HH24:MI:SS)<Br>&nbsp
-<Li><Strong>Argout:<Br>DEV_DOUBLE</Strong>
- : The beginning date and the ending date<Br>&nbsp
-<Li><Strong>Command allowed for: </Strong><Ul>
-</Ul>
-<Br>&nbsp
-</ul><Br>
-<Br>
-<A NAME="GetAttScalarDataMinBetweenDates"><!-- --></A>
-<A NAME="GetAttScalarDataMinBetweenDates"><!-- --></A>
-<h2>43 - GetAttScalarDataMinBetweenDates</h2>
-<ul>
-<Li><Strong>Description: </Strong> Returns the smallest scalar value generated by the given attribute and between two given dates<Br>&nbsp
-<Li><Strong>Argin:<Br>DEVVAR_STRINGARRAY</Strong>
- : The attribute's name, the beginning date  ,DD-MM-YYYY HH24:MI:SS) and the ending date  ,DD-MM-YYYY HH24:MI:SS)<Br>&nbsp
-<Li><Strong>Argout:<Br>DEV_DOUBLE</Strong>
- : The beginning date and the ending date<Br>&nbsp
-<Li><Strong>Command allowed for: </Strong><Ul>
-</Ul>
-<Br>&nbsp
-</ul><Br>
-<Br>
-<A NAME="GetDomainsCount"><!-- --></A>
-<A NAME="GetDomainsCount"><!-- --></A>
-<h2>44 - GetDomainsCount</h2>
-<ul>
-<Li><Strong>Description: </Strong> Returns the number of distinct registered domains.<Br>&nbsp
-<Li><Strong>Argin:<Br>DEV_VOID</Strong>
- : <Br>&nbsp
-<Li><Strong>Argout:<Br>DEV_SHORT</Strong>
- : The number of distinct registered domains.<Br>&nbsp
-<Li><Strong>Command allowed for: </Strong><Ul>
-</Ul>
-<Br>&nbsp
-</ul><Br>
-<Br>
-<A NAME="GetFamiliesCount"><!-- --></A>
-<A NAME="GetFamiliesCount"><!-- --></A>
-<h2>45 - GetFamiliesCount</h2>
-<ul>
-<Li><Strong>Description: </Strong> Returns the number of distinct registered families.<Br>&nbsp
-<Li><Strong>Argin:<Br>DEV_VOID</Strong>
- : <Br>&nbsp
-<Li><Strong>Argout:<Br>DEV_SHORT</Strong>
- : The number of distinct registered families.<Br>&nbsp
-<Li><Strong>Command allowed for: </Strong><Ul>
-</Ul>
-<Br>&nbsp
-</ul><Br>
-<Br>
-<A NAME="GetFamiliesByDomainCount"><!-- --></A>
-<A NAME="GetFamiliesByDomainCount"><!-- --></A>
-<h2>46 - GetFamiliesByDomainCount</h2>
-<ul>
-<Li><Strong>Description: </Strong> Returns the number of distinct registered families for a given domain.<Br>&nbsp
-<Li><Strong>Argin:<Br>DEV_STRING</Strong>
- : A domain name<Br>&nbsp
-<Li><Strong>Argout:<Br>DEV_SHORT</Strong>
- : The number of distinct registered families for a given domain.<Br>&nbsp
-<Li><Strong>Command allowed for: </Strong><Ul>
-</Ul>
-<Br>&nbsp
-</ul><Br>
-<Br>
-<A NAME="GetMembersCount"><!-- --></A>
-<A NAME="GetMembersCount"><!-- --></A>
-<h2>47 - GetMembersCount</h2>
-<ul>
-<Li><Strong>Description: </Strong> Returns the number of distinct members.<Br>&nbsp
-<Li><Strong>Argin:<Br>DEV_VOID</Strong>
- : <Br>&nbsp
-<Li><Strong>Argout:<Br>DEV_SHORT</Strong>
- : The number of distinct members.<Br>&nbsp
-<Li><Strong>Command allowed for: </Strong><Ul>
-</Ul>
-<Br>&nbsp
-</ul><Br>
-<Br>
-<A NAME="GetMembersByDomainFamilyCount"><!-- --></A>
-<A NAME="GetMembersByDomainFamilyCount"><!-- --></A>
-<h2>48 - GetMembersByDomainFamilyCount</h2>
-<ul>
-<Li><Strong>Description: </Strong> Returns the number of distinct registered members for the given domain and family.<Br>&nbsp
-<Li><Strong>Argin:<Br>DEVVAR_STRINGARRAY</Strong>
- : A domain name, a family name<Br>&nbsp
-<Li><Strong>Argout:<Br>DEV_SHORT</Strong>
- : The number of distinct registered members for the given domain and family.<Br>&nbsp
-<Li><Strong>Command allowed for: </Strong><Ul>
-</Ul>
-<Br>&nbsp
-</ul><Br>
-<Br>
-<A NAME="GetAttributesByDomainFamilyMembersCount"><!-- --></A>
-<A NAME="GetAttributesByDomainFamilyMembersCount"><!-- --></A>
-<h2>49 - GetAttributesByDomainFamilyMembersCount</h2>
-<ul>
-<Li><Strong>Description: </Strong> Returns the number of registered the attributes for a given domain, family, member.<Br>&nbsp
-<Li><Strong>Argin:<Br>DEVVAR_STRINGARRAY</Strong>
- : A domain name, a family name, a member name.<Br>&nbsp
-<Li><Strong>Argout:<Br>DEV_SHORT</Strong>
- : The number of registered the attributes for a given  domain, family, member.<Br>&nbsp
-<Li><Strong>Command allowed for: </Strong><Ul>
-</Ul>
-<Br>&nbsp
-</ul><Br>
-<Br>
-<A NAME="GetAttScalarDataCount"><!-- --></A>
-<A NAME="GetAttScalarDataCount"><!-- --></A>
-<h2>50 - GetAttScalarDataCount</h2>
-<ul>
-<Li><Strong>Description: </Strong> Returns the number of the data archieved for an attribute.<Br>&nbsp
-<Li><Strong>Argin:<Br>DEV_STRING</Strong>
- : An attribute name.<Br>&nbsp
-<Li><Strong>Argout:<Br>DEV_SHORT</Strong>
- : The number of the data archieved for an attribute.<Br>&nbsp
-<Li><Strong>Command allowed for: </Strong><Ul>
-</Ul>
-<Br>&nbsp
-</ul><Br>
-<Br>
-<A NAME="GetAttScalarDataBetweenDatesCount"><!-- --></A>
-<A NAME="GetAttScalarDataBetweenDatesCount"><!-- --></A>
-<h2>51 - GetAttScalarDataBetweenDatesCount</h2>
-<ul>
-<Li><Strong>Description: </Strong> Returns the number of data beetwen two dates and, for a given scalar attribute.<Br>&nbsp
-<Li><Strong>Argin:<Br>DEVVAR_STRINGARRAY</Strong>
- : The attribute's name, the beginning ,DD-MM-YYYY HH24:MI:SS) date and the ending date ,DD-MM-YYYY HH24:MI:SS).<Br>&nbsp
-<Li><Strong>Argout:<Br>DEV_SHORT</Strong>
- : The number of data beetwen two dates and, for a given scalar attribute.<Br>&nbsp
-<Li><Strong>Command allowed for: </Strong><Ul>
-</Ul>
-<Br>&nbsp
-</ul><Br>
-<Br>
-<A NAME="GetAttScalarDataInfOrSupThanBetweenDatesCount"><!-- --></A>
-<A NAME="GetAttScalarDataInfOrSupThanBetweenDatesCount"><!-- --></A>
-<h2>52 - GetAttScalarDataInfOrSupThanBetweenDatesCount</h2>
-<ul>
-<Li><Strong>Description: </Strong> Returns the number of data beetwen two dates (date_1 & date_2).
-Data are lower than the given value x OR higher than the given value y.<Br>&nbsp
-<Li><Strong>Argin:<Br>DEVVAR_STRINGARRAY</Strong>
- : The attribute's name, the lower limit, the upper limit, the beginning date ,DD-MM-YYYY HH24:MI:SS) and the ending date ,DD-MM-YYYY HH24:MI:SS).<Br>&nbsp
-<Li><Strong>Argout:<Br>DEV_SHORT</Strong>
- : The number of scalar data lower than the given value x OR higher than the given value y, beetwen two dates and for the specified attribute.<Br>&nbsp
-<Li><Strong>Command allowed for: </Strong><Ul>
-</Ul>
-<Br>&nbsp
-</ul><Br>
-<Br>
-<A NAME="GetAttScalarDataSupThanBetweenDatesCount"><!-- --></A>
-<A NAME="GetAttScalarDataSupThanBetweenDatesCount"><!-- --></A>
-<h2>53 - GetAttScalarDataSupThanBetweenDatesCount</h2>
-<ul>
-<Li><Strong>Description: </Strong> Returns the number of data higher than the given value y, and beetwen two dates (date_1 & date_2).<Br>&nbsp
-<Li><Strong>Argin:<Br>DEVVAR_STRINGARRAY</Strong>
- : The attribute's name, the lower limit, the beginning date  ,DD-MM-YYYY HH24:MI:SS) and the ending date  ,DD-MM-YYYY HH24:MI:SS).<Br>&nbsp
-<Li><Strong>Argout:<Br>DEV_SHORT</Strong>
- : The number of data higher than the given value y, and beetwen two dates ,date_1 & date_2).<Br>&nbsp
-<Li><Strong>Command allowed for: </Strong><Ul>
-</Ul>
-<Br>&nbsp
-</ul><Br>
-<Br>
-<A NAME="GetAttScalarDataSupAndInfThanBetweenDatesCount"><!-- --></A>
-<A NAME="GetAttScalarDataSupAndInfThanBetweenDatesCount"><!-- --></A>
-<h2>54 - GetAttScalarDataSupAndInfThanBetweenDatesCount</h2>
-<ul>
-<Li><Strong>Description: </Strong> Returns the number of data higher than the given value x, (AND) lower than the given value y, and beetwen two dates (date_1 & date_2).<Br>&nbsp
-<Li><Strong>Argin:<Br>DEVVAR_STRINGARRAY</Strong>
- : The attribute's name, the lower limit, the upper limit, the beginning date ,DD-MM-YYYY HH24:MI:SS) and the ending date ,DD-MM-YYYY HH24:MI:SS).<Br>&nbsp
-<Li><Strong>Argout:<Br>DEV_SHORT</Strong>
- : The number of data higher than the given value x, ,AND) lower than the given value y, and beetwen two dates ,date_1 & date_2).<Br>&nbsp
-<Li><Strong>Command allowed for: </Strong><Ul>
-</Ul>
-<Br>&nbsp
-</ul><Br>
-<Br>
-<A NAME="GetAttScalarDataInfThanBetweenDatesCount"><!-- --></A>
-<A NAME="GetAttScalarDataInfThanBetweenDatesCount"><!-- --></A>
-<h2>55 - GetAttScalarDataInfThanBetweenDatesCount</h2>
-<ul>
-<Li><Strong>Description: </Strong> Returns the number data lower than the given value x, and beetwen two dates (date_1 & date_2).<Br>&nbsp
-<Li><Strong>Argin:<Br>DEVVAR_STRINGARRAY</Strong>
- : The attribute's name, the lower limit, the upper limit, the beginning date ,DD-MM-YYYY HH24:MI:SS) and the ending date ,DD-MM-YYYY HH24:MI:SS).<Br>&nbsp
-<Li><Strong>Argout:<Br>DEV_SHORT</Strong>
- : The number data lower than the given value x, and beetwen two dates ,date_1 & date_2).<Br>&nbsp
-<Li><Strong>Command allowed for: </Strong><Ul>
-</Ul>
-<Br>&nbsp
-</ul><Br>
-<Br>
-<A NAME="GetAttScalarDataInfThanCount"><!-- --></A>
-<A NAME="GetAttScalarDataInfThanCount"><!-- --></A>
-<h2>56 - GetAttScalarDataInfThanCount</h2>
-<ul>
-<Li><Strong>Description: </Strong> Returns the number of data lower than the given value.<Br>&nbsp
-<Li><Strong>Argin:<Br>DEVVAR_STRINGARRAY</Strong>
- : The attribute's name and the  upper limit.<Br>&nbsp
-<Li><Strong>Argout:<Br>DEV_SHORT</Strong>
- : The number of scalar data lower than the given value and for the specified attribute.<Br>&nbsp
-<Li><Strong>Command allowed for: </Strong><Ul>
-</Ul>
-<Br>&nbsp
-</ul><Br>
-<Br>
-<A NAME="GetAttScalarDataSupThanCount"><!-- --></A>
-<A NAME="GetAttScalarDataSupThanCount"><!-- --></A>
-<h2>57 - GetAttScalarDataSupThanCount</h2>
-<ul>
-<Li><Strong>Description: </Strong> Returns the number of data higher than the given value.<Br>&nbsp
-<Li><Strong>Argin:<Br>DEVVAR_STRINGARRAY</Strong>
- : The attribute's name and the  lower limit.<Br>&nbsp
-<Li><Strong>Argout:<Br>DEV_SHORT</Strong>
- : The number of data higher than the given value.<Br>&nbsp
-<Li><Strong>Command allowed for: </Strong><Ul>
-</Ul>
-<Br>&nbsp
-</ul><Br>
-<Br>
-<A NAME="GetAttScalarDataInfOrSupThanCount"><!-- --></A>
-<A NAME="GetAttScalarDataInfOrSupThanCount"><!-- --></A>
-<h2>58 - GetAttScalarDataInfOrSupThanCount</h2>
-<ul>
-<Li><Strong>Description: </Strong> Returns the number of data lower than the given value x OR higher than the given value y.<Br>&nbsp
-<Li><Strong>Argin:<Br>DEVVAR_STRINGARRAY</Strong>
- : The attribute's name, the lower limit and the upper limit<Br>&nbsp
-<Li><Strong>Argout:<Br>DEV_SHORT</Strong>
- : The number of scalar data lower than the given value x OR higher than the given value y.<Br>&nbsp
-<Li><Strong>Command allowed for: </Strong><Ul>
-</Ul>
-<Br>&nbsp
-</ul><Br>
-<Br>
-<A NAME="GetAttScalarDataSupAndInfThanCount"><!-- --></A>
-<A NAME="GetAttScalarDataSupAndInfThanCount"><!-- --></A>
-<h2>59 - GetAttScalarDataSupAndInfThanCount</h2>
-<ul>
-<Li><Strong>Description: </Strong> Returns data that are highter than the given value x AND lower than the given value y.<Br>&nbsp
-<Li><Strong>Argin:<Br>DEVVAR_STRINGARRAY</Strong>
- : The attribute's name, the lower limit and the upper limit<Br>&nbsp
-<Li><Strong>Argout:<Br>DEV_SHORT</Strong>
- : The data that are highter than the given value x AND lower than the given value y.<Br>&nbsp
-<Li><Strong>Command allowed for: </Strong><Ul>
-</Ul>
-<Br>&nbsp
-</ul><Br>
-<Br>
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
-<HTML>
-<HEAD>
-<Title> Tango Device Server User's Guide </Title>
-   <META NAME="GENERATOR" CONTENT="Mozilla/3.01Gold (X11; I; HP-UX B.10.20 9000/735) [Netscape]">
-</HEAD>
-<BODY TEXT="#000000" BGCOLOR="#FFFFFF" LINK="#0000FF" VLINK="#FF0000" ALINK="#FF0000">
-
-<P><!-------TITLE------></P>
-
-<Center>
-<Br>
-<HR WIDTH="100%"></H5>
-<H3>(c) SOLEIL : Groupe ICA Contr�le et Acquisitions </H33>
-</Center>
-</body>
-</html>
diff --git a/src/main/java/HdbExtractor/doc_html/DevCommandsFrame.html b/src/main/java/HdbExtractor/doc_html/DevCommandsFrame.html
deleted file mode 100644
index 039ee3311d80a9af10034080ac4d9588e93ca491..0000000000000000000000000000000000000000
--- a/src/main/java/HdbExtractor/doc_html/DevCommandsFrame.html
+++ /dev/null
@@ -1,20 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
-<HTML>
-<HEAD>
-<Title> Tango Device Server User's Guide </Title>
-   <META NAME="GENERATOR" CONTENT="Mozilla/3.01Gold (X11; I; HP-UX B.10.20 9000/735) [Netscape]">
-</HEAD>
-
-<FRAMESET cols="20%,80%">
-<FRAME src="DevCommandsList.html" name="DevCommandsList">
-<FRAME src="DevCommands.html" name="DevCommands">
-</FRAMESET>
-<NOFRAMES>
-<H2>
-Frame Alert</H2>
-
-<P>
-This document is designed to be viewed using the frames feature. If you see this message, you are using a non-frame-capable web client.
-<BR>
-Link to <A HREF="DevCommands.html">Non-frame version.</A></NOFRAMES>
-</HTML>
diff --git a/src/main/java/HdbExtractor/doc_html/DevCommandsList.html b/src/main/java/HdbExtractor/doc_html/DevCommandsList.html
deleted file mode 100644
index 9833a4409c5e25c97abe0b479ebbde1fdb308a18..0000000000000000000000000000000000000000
--- a/src/main/java/HdbExtractor/doc_html/DevCommandsList.html
+++ /dev/null
@@ -1,73 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
-<HTML><HEAD>
-<TITLE>Commands
-</TITLE></HEAD>
-<BODY BGCOLOR="white">
-<FONT size="+1" ID="FrameHeadingFont">
-<B>Commands:</B></FONT>
-<Br>
-<Br>
-<Br>
-<A Href="DevCommands.html#Init" TARGET="DevCommands"> Init</a><Br>
-<A Href="DevCommands.html#State" TARGET="DevCommands"> State</a><Br>
-<A Href="DevCommands.html#Status" TARGET="DevCommands"> Status</a><Br>
-<A Href="DevCommands.html#GetInfo" TARGET="DevCommands"> GetInfo</a><Br>
-<A Href="DevCommands.html#GetHost" TARGET="DevCommands"> GetHost</a><Br>
-<A Href="DevCommands.html#GetUser" TARGET="DevCommands"> GetUser</a><Br>
-<A Href="DevCommands.html#GetConnectionState" TARGET="DevCommands"> GetConnectionState</a><Br>
-<A Href="DevCommands.html#Reset" TARGET="DevCommands"> Reset</a><Br>
-<A Href="DevCommands.html#GetAttDefinitionData" TARGET="DevCommands"> GetAttDefinitionData</a><Br>
-<A Href="DevCommands.html#GetAttId" TARGET="DevCommands"> GetAttId</a><Br>
-<A Href="DevCommands.html#GetAttNameAll" TARGET="DevCommands"> GetAttNameAll</a><Br>
-<A Href="DevCommands.html#GetAttNameFacility" TARGET="DevCommands"> GetAttNameFacility</a><Br>
-<A Href="DevCommands.html#GetAttNameFilterFormat" TARGET="DevCommands"> GetAttNameFilterFormat</a><Br>
-<A Href="DevCommands.html#GetAttNameFilterType" TARGET="DevCommands"> GetAttNameFilterType</a><Br>
-<A Href="DevCommands.html#GetAttCountAll" TARGET="DevCommands"> GetAttCountAll</a><Br>
-<A Href="DevCommands.html#GetAttCountFilterFormat" TARGET="DevCommands"> GetAttCountFilterFormat</a><Br>
-<A Href="DevCommands.html#GetAttCountFilterType" TARGET="DevCommands"> GetAttCountFilterType</a><Br>
-<A Href="DevCommands.html#GetDomains" TARGET="DevCommands"> GetDomains</a><Br>
-<A Href="DevCommands.html#GetFamilies" TARGET="DevCommands"> GetFamilies</a><Br>
-<A Href="DevCommands.html#GetFamiliesByDomain" TARGET="DevCommands"> GetFamiliesByDomain</a><Br>
-<A Href="DevCommands.html#GetMembers" TARGET="DevCommands"> GetMembers</a><Br>
-<A Href="DevCommands.html#GetMembersByDomainFamily" TARGET="DevCommands"> GetMembersByDomainFamily</a><Br>
-<A Href="DevCommands.html#GetAttPropertiesData" TARGET="DevCommands"> GetAttPropertiesData</a><Br>
-<A Href="DevCommands.html#GetCurrentArchivedAtt" TARGET="DevCommands"> GetCurrentArchivedAtt</a><Br>
-<A Href="DevCommands.html#IsArchived" TARGET="DevCommands"> IsArchived</a><Br>
-<A Href="DevCommands.html#GetArchivingMode" TARGET="DevCommands"> GetArchivingMode</a><Br>
-<A Href="DevCommands.html#GetAttScalarData" TARGET="DevCommands"> GetAttScalarData</a><Br>
-<A Href="DevCommands.html#GetAttScalarDataBeetweenDates" TARGET="DevCommands"> GetAttScalarDataBeetweenDates</a><Br>
-<A Href="DevCommands.html#GetAttScalarDataSupThanBeetweenDates" TARGET="DevCommands"> GetAttScalarDataSupThanBeetweenDates</a><Br>
-<A Href="DevCommands.html#GetAttScalarDataSupAndInfThanBeetweenDates" TARGET="DevCommands"> GetAttScalarDataSupAndInfThanBeetweenDates</a><Br>
-<A Href="DevCommands.html#GetAttScalarDataInfOrSupThanBeetweenDates" TARGET="DevCommands"> GetAttScalarDataInfOrSupThanBeetweenDates</a><Br>
-<A Href="DevCommands.html#GetAttScalarDataInfThanBeetweenDates" TARGET="DevCommands"> GetAttScalarDataInfThanBeetweenDates</a><Br>
-<A Href="DevCommands.html#GetAttScalarDataLastN" TARGET="DevCommands"> GetAttScalarDataLastN</a><Br>
-<A Href="DevCommands.html#GetAttScalarDataInfThan" TARGET="DevCommands"> GetAttScalarDataInfThan</a><Br>
-<A Href="DevCommands.html#GetAttScalarDataSupThan" TARGET="DevCommands"> GetAttScalarDataSupThan</a><Br>
-<A Href="DevCommands.html#GetAttScalarDataInfOrSupThan" TARGET="DevCommands"> GetAttScalarDataInfOrSupThan</a><Br>
-<A Href="DevCommands.html#GetAttScalarDataSupAndInfThan" TARGET="DevCommands"> GetAttScalarDataSupAndInfThan</a><Br>
-<A Href="DevCommands.html#GetAttScalarDataMax" TARGET="DevCommands"> GetAttScalarDataMax</a><Br>
-<A Href="DevCommands.html#GetAttScalarDataAvg" TARGET="DevCommands"> GetAttScalarDataAvg</a><Br>
-<A Href="DevCommands.html#GetAttScalarDataMin" TARGET="DevCommands"> GetAttScalarDataMin</a><Br>
-<A Href="DevCommands.html#GetAttScalarDataMaxBetweenDates" TARGET="DevCommands"> GetAttScalarDataMaxBetweenDates</a><Br>
-<A Href="DevCommands.html#GetAttScalarDataAvgBetweenDates" TARGET="DevCommands"> GetAttScalarDataAvgBetweenDates</a><Br>
-<A Href="DevCommands.html#GetAttScalarDataMinBetweenDates" TARGET="DevCommands"> GetAttScalarDataMinBetweenDates</a><Br>
-<A Href="DevCommands.html#GetDomainsCount" TARGET="DevCommands"> GetDomainsCount</a><Br>
-<A Href="DevCommands.html#GetFamiliesCount" TARGET="DevCommands"> GetFamiliesCount</a><Br>
-<A Href="DevCommands.html#GetFamiliesByDomainCount" TARGET="DevCommands"> GetFamiliesByDomainCount</a><Br>
-<A Href="DevCommands.html#GetMembersCount" TARGET="DevCommands"> GetMembersCount</a><Br>
-<A Href="DevCommands.html#GetMembersByDomainFamilyCount" TARGET="DevCommands"> GetMembersByDomainFamilyCount</a><Br>
-<A Href="DevCommands.html#GetAttributesByDomainFamilyMembersCount" TARGET="DevCommands"> GetAttributesByDomainFamilyMembersCount</a><Br>
-<A Href="DevCommands.html#GetAttScalarDataCount" TARGET="DevCommands"> GetAttScalarDataCount</a><Br>
-<A Href="DevCommands.html#GetAttScalarDataBetweenDatesCount" TARGET="DevCommands"> GetAttScalarDataBetweenDatesCount</a><Br>
-<A Href="DevCommands.html#GetAttScalarDataInfOrSupThanBetweenDatesCount" TARGET="DevCommands"> GetAttScalarDataInfOrSupThanBetweenDatesCount</a><Br>
-<A Href="DevCommands.html#GetAttScalarDataSupThanBetweenDatesCount" TARGET="DevCommands"> GetAttScalarDataSupThanBetweenDatesCount</a><Br>
-<A Href="DevCommands.html#GetAttScalarDataSupAndInfThanBetweenDatesCount" TARGET="DevCommands"> GetAttScalarDataSupAndInfThanBetweenDatesCount</a><Br>
-<A Href="DevCommands.html#GetAttScalarDataInfThanBetweenDatesCount" TARGET="DevCommands"> GetAttScalarDataInfThanBetweenDatesCount</a><Br>
-<A Href="DevCommands.html#GetAttScalarDataInfThanCount" TARGET="DevCommands"> GetAttScalarDataInfThanCount</a><Br>
-<A Href="DevCommands.html#GetAttScalarDataSupThanCount" TARGET="DevCommands"> GetAttScalarDataSupThanCount</a><Br>
-<A Href="DevCommands.html#GetAttScalarDataInfOrSupThanCount" TARGET="DevCommands"> GetAttScalarDataInfOrSupThanCount</a><Br>
-<A Href="DevCommands.html#GetAttScalarDataSupAndInfThanCount" TARGET="DevCommands"> GetAttScalarDataSupAndInfThanCount</a><Br>
-
-
-</BODY>
-</HTML>
diff --git a/src/main/java/HdbExtractor/doc_html/DevCommandsTable.html b/src/main/java/HdbExtractor/doc_html/DevCommandsTable.html
deleted file mode 100644
index 92d322b4051e0b5a13b589159e6be878348544e4..0000000000000000000000000000000000000000
--- a/src/main/java/HdbExtractor/doc_html/DevCommandsTable.html
+++ /dev/null
@@ -1,244 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
-<HTML>
-<HEAD>
-<Title> Tango Device Server User's Guide </Title>
-   <META NAME="GENERATOR" CONTENT="Mozilla/3.01Gold (X11; I; HP-UX B.10.20 9000/735) [Netscape]">
-</HEAD>
-<BODY TEXT="#000000" BGCOLOR="#FFFFFF" LINK="#0000FF" VLINK="#FF0000" ALINK="#FF0000">
-
-<P><!-------TITLE------></P>
-<table width="100%" height="20%"><tr>
-<td align=LEFT>
-<FONT COLOR="#0000FF"><FONT SIZE=+4>Synchrotron </FONT></FONT>
-<FONT COLOR="#0000FF"><FONT SIZE=+4>Soleil</FONT></FONT>
-<H5>Saint-Aubin - BP 48 91192 GIF-sur-YVETTE CEDEX<BR>
-</td><td>
-<A href="http://www.synchrotron-soleil.fr/">
-<IMG  SRC="http://controle/images/logo-150.gif" 
-		ALT="SOLEIL Logo" ALIGN=RIGHT border="0"></A>
-</td></tr></table>
-
-<HR WIDTH="100%"></H5>
-
-<Br>
-<center>
-<h1>
-Tango Device Server<Br>
-Device Commands Description
-</h1>
-<Br>
-<b>
-Revision: 1.5 - Author: chinkumo
-</b>
-</center>
-
-
-<Center>
-<Br><Br>
-<A Href="DevCommandsFrame.html"> More Details on commands.... </a><Br>
-<Br> <Br>
-<Table Border=2 Cellpadding=3 CELLSPACING=0 WIDTH="100%">
-<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
-<Td COLSPAN=3> <Font Size=+2><Center><b>Device Commands for Operator Level</b></td></Font></Center>
-<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
-<Td><Center><b>Command name</b></td></Center>
-<Td><Center><b>Argument In</b></td></Center>
-<Td><Center><b>Argument Out</b></td></Center>
-<Tr><Td>Init</Td>
-<Td>DEV_VOID</Td>
-<Td>DEV_VOID</Td>
-<Tr><Td>State</Td>
-<Td>DEV_VOID</Td>
-<Td>DEV_STATE</Td>
-<Tr><Td>Status</Td>
-<Td>DEV_VOID</Td>
-<Td>CONST_DEV_STRING</Td>
-<Tr><Td>GetInfo</Td>
-<Td>DEV_VOID</Td>
-<Td>DEV_STRING</Td>
-<Tr><Td>GetHost</Td>
-<Td>DEV_VOID</Td>
-<Td>DEV_STRING</Td>
-<Tr><Td>GetUser</Td>
-<Td>DEV_VOID</Td>
-<Td>DEV_STRING</Td>
-<Tr><Td>GetConnectionState</Td>
-<Td>DEV_VOID</Td>
-<Td>DEV_BOOLEAN</Td>
-<Tr><Td>Reset</Td>
-<Td>DEV_VOID</Td>
-<Td>DEV_STRING</Td>
-<Tr><Td>GetAttDefinitionData</Td>
-<Td>DEV_STRING</Td>
-<Td>DEVVAR_STRINGARRAY</Td>
-<Tr><Td>GetAttId</Td>
-<Td>DEV_STRING</Td>
-<Td>DEV_SHORT</Td>
-<Tr><Td>GetAttNameAll</Td>
-<Td>DEV_VOID</Td>
-<Td>DEVVAR_STRINGARRAY</Td>
-<Tr><Td>GetAttNameFacility</Td>
-<Td>DEV_VOID</Td>
-<Td>DEVVAR_STRINGARRAY</Td>
-<Tr><Td>GetAttNameFilterFormat</Td>
-<Td>DEV_SHORT</Td>
-<Td>DEVVAR_STRINGARRAY</Td>
-<Tr><Td>GetAttNameFilterType</Td>
-<Td>DEV_SHORT</Td>
-<Td>DEVVAR_STRINGARRAY</Td>
-<Tr><Td>GetAttCountAll</Td>
-<Td>DEV_VOID</Td>
-<Td>DEV_SHORT</Td>
-<Tr><Td>GetAttCountFilterFormat</Td>
-<Td>DEV_SHORT</Td>
-<Td>DEV_SHORT</Td>
-<Tr><Td>GetAttCountFilterType</Td>
-<Td>DEV_SHORT</Td>
-<Td>DEV_SHORT</Td>
-<Tr><Td>GetDomains</Td>
-<Td>DEV_VOID</Td>
-<Td>DEVVAR_STRINGARRAY</Td>
-<Tr><Td>GetFamilies</Td>
-<Td>DEV_VOID</Td>
-<Td>DEVVAR_STRINGARRAY</Td>
-<Tr><Td>GetFamiliesByDomain</Td>
-<Td>DEVVAR_STRINGARRAY</Td>
-<Td>DEVVAR_STRINGARRAY</Td>
-<Tr><Td>GetMembers</Td>
-<Td>DEV_VOID</Td>
-<Td>DEVVAR_STRINGARRAY</Td>
-<Tr><Td>GetMembersByDomainFamily</Td>
-<Td>DEVVAR_STRINGARRAY</Td>
-<Td>DEVVAR_STRINGARRAY</Td>
-<Tr><Td>GetAttPropertiesData</Td>
-<Td>DEV_STRING</Td>
-<Td>DEVVAR_STRINGARRAY</Td>
-<Tr><Td>GetCurrentArchivedAtt</Td>
-<Td>DEV_VOID</Td>
-<Td>DEVVAR_STRINGARRAY</Td>
-<Tr><Td>IsArchived</Td>
-<Td>DEV_STRING</Td>
-<Td>DEV_BOOLEAN</Td>
-<Tr><Td>GetArchivingMode</Td>
-<Td>DEV_STRING</Td>
-<Td>DEVVAR_STRINGARRAY</Td>
-<Tr><Td>GetAttScalarData</Td>
-<Td>DEV_STRING</Td>
-<Td>DEVVAR_DOUBLESTRINGARRAY</Td>
-<Tr><Td>GetAttScalarDataBeetweenDates</Td>
-<Td>DEVVAR_STRINGARRAY</Td>
-<Td>DEVVAR_DOUBLESTRINGARRAY</Td>
-<Tr><Td>GetAttScalarDataSupThanBeetweenDates</Td>
-<Td>DEVVAR_STRINGARRAY</Td>
-<Td>DEVVAR_DOUBLESTRINGARRAY</Td>
-<Tr><Td>GetAttScalarDataSupAndInfThanBeetweenDates</Td>
-<Td>DEVVAR_STRINGARRAY</Td>
-<Td>DEVVAR_DOUBLESTRINGARRAY</Td>
-<Tr><Td>GetAttScalarDataInfOrSupThanBeetweenDates</Td>
-<Td>DEVVAR_STRINGARRAY</Td>
-<Td>DEVVAR_DOUBLESTRINGARRAY</Td>
-<Tr><Td>GetAttScalarDataInfThanBeetweenDates</Td>
-<Td>DEVVAR_STRINGARRAY</Td>
-<Td>DEVVAR_DOUBLESTRINGARRAY</Td>
-<Tr><Td>GetAttScalarDataLastN</Td>
-<Td>DEVVAR_STRINGARRAY</Td>
-<Td>DEVVAR_DOUBLESTRINGARRAY</Td>
-<Tr><Td>GetAttScalarDataInfThan</Td>
-<Td>DEVVAR_STRINGARRAY</Td>
-<Td>DEVVAR_DOUBLESTRINGARRAY</Td>
-<Tr><Td>GetAttScalarDataSupThan</Td>
-<Td>DEVVAR_STRINGARRAY</Td>
-<Td>DEVVAR_DOUBLESTRINGARRAY</Td>
-<Tr><Td>GetAttScalarDataInfOrSupThan</Td>
-<Td>DEVVAR_STRINGARRAY</Td>
-<Td>DEVVAR_DOUBLESTRINGARRAY</Td>
-<Tr><Td>GetAttScalarDataSupAndInfThan</Td>
-<Td>DEVVAR_STRINGARRAY</Td>
-<Td>DEVVAR_DOUBLESTRINGARRAY</Td>
-<Tr><Td>GetAttScalarDataMax</Td>
-<Td>DEV_STRING</Td>
-<Td>DEV_DOUBLE</Td>
-<Tr><Td>GetAttScalarDataAvg</Td>
-<Td>DEV_STRING</Td>
-<Td>DEV_DOUBLE</Td>
-<Tr><Td>GetAttScalarDataMin</Td>
-<Td>DEV_STRING</Td>
-<Td>DEV_DOUBLE</Td>
-<Tr><Td>GetAttScalarDataMaxBetweenDates</Td>
-<Td>DEVVAR_STRINGARRAY</Td>
-<Td>DEV_DOUBLE</Td>
-<Tr><Td>GetAttScalarDataAvgBetweenDates</Td>
-<Td>DEVVAR_STRINGARRAY</Td>
-<Td>DEV_DOUBLE</Td>
-<Tr><Td>GetAttScalarDataMinBetweenDates</Td>
-<Td>DEVVAR_STRINGARRAY</Td>
-<Td>DEV_DOUBLE</Td>
-<Tr><Td>GetDomainsCount</Td>
-<Td>DEV_VOID</Td>
-<Td>DEV_SHORT</Td>
-<Tr><Td>GetFamiliesCount</Td>
-<Td>DEV_VOID</Td>
-<Td>DEV_SHORT</Td>
-<Tr><Td>GetFamiliesByDomainCount</Td>
-<Td>DEV_STRING</Td>
-<Td>DEV_SHORT</Td>
-<Tr><Td>GetMembersCount</Td>
-<Td>DEV_VOID</Td>
-<Td>DEV_SHORT</Td>
-<Tr><Td>GetMembersByDomainFamilyCount</Td>
-<Td>DEVVAR_STRINGARRAY</Td>
-<Td>DEV_SHORT</Td>
-<Tr><Td>GetAttributesByDomainFamilyMembersCount</Td>
-<Td>DEVVAR_STRINGARRAY</Td>
-<Td>DEV_SHORT</Td>
-<Tr><Td>GetAttScalarDataCount</Td>
-<Td>DEV_STRING</Td>
-<Td>DEV_SHORT</Td>
-<Tr><Td>GetAttScalarDataBetweenDatesCount</Td>
-<Td>DEVVAR_STRINGARRAY</Td>
-<Td>DEV_SHORT</Td>
-<Tr><Td>GetAttScalarDataInfOrSupThanBetweenDatesCount</Td>
-<Td>DEVVAR_STRINGARRAY</Td>
-<Td>DEV_SHORT</Td>
-<Tr><Td>GetAttScalarDataSupThanBetweenDatesCount</Td>
-<Td>DEVVAR_STRINGARRAY</Td>
-<Td>DEV_SHORT</Td>
-<Tr><Td>GetAttScalarDataSupAndInfThanBetweenDatesCount</Td>
-<Td>DEVVAR_STRINGARRAY</Td>
-<Td>DEV_SHORT</Td>
-<Tr><Td>GetAttScalarDataInfThanBetweenDatesCount</Td>
-<Td>DEVVAR_STRINGARRAY</Td>
-<Td>DEV_SHORT</Td>
-<Tr><Td>GetAttScalarDataInfThanCount</Td>
-<Td>DEVVAR_STRINGARRAY</Td>
-<Td>DEV_SHORT</Td>
-<Tr><Td>GetAttScalarDataSupThanCount</Td>
-<Td>DEVVAR_STRINGARRAY</Td>
-<Td>DEV_SHORT</Td>
-<Tr><Td>GetAttScalarDataInfOrSupThanCount</Td>
-<Td>DEVVAR_STRINGARRAY</Td>
-<Td>DEV_SHORT</Td>
-<Tr><Td>GetAttScalarDataSupAndInfThanCount</Td>
-<Td>DEVVAR_STRINGARRAY</Td>
-<Td>DEV_SHORT</Td>
-
-
-
-</Table></Center>
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
-<HTML>
-<HEAD>
-<Title> Tango Device Server User's Guide </Title>
-   <META NAME="GENERATOR" CONTENT="Mozilla/3.01Gold (X11; I; HP-UX B.10.20 9000/735) [Netscape]">
-</HEAD>
-<BODY TEXT="#000000" BGCOLOR="#FFFFFF" LINK="#0000FF" VLINK="#FF0000" ALINK="#FF0000">
-
-<P><!-------TITLE------></P>
-
-<Center>
-<Br>
-<HR WIDTH="100%"></H5>
-<H3>(c) SOLEIL : Groupe ICA Contr�le et Acquisitions </H33>
-</Center>
-</body>
-</html>
diff --git a/src/main/java/HdbExtractor/doc_html/Properties.html b/src/main/java/HdbExtractor/doc_html/Properties.html
deleted file mode 100644
index d6ca4ea99c28ffaebe0129214520213316d982a1..0000000000000000000000000000000000000000
--- a/src/main/java/HdbExtractor/doc_html/Properties.html
+++ /dev/null
@@ -1,78 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
-<HTML>
-<HEAD>
-<Title> Tango Device Server User's Guide </Title>
-   <META NAME="GENERATOR" CONTENT="Mozilla/3.01Gold (X11; I; HP-UX B.10.20 9000/735) [Netscape]">
-</HEAD>
-<BODY TEXT="#000000" BGCOLOR="#FFFFFF" LINK="#0000FF" VLINK="#FF0000" ALINK="#FF0000">
-
-<P><!-------TITLE------></P>
-<table width="100%" height="20%"><tr>
-<td align=LEFT>
-<FONT COLOR="#0000FF"><FONT SIZE=+4>Synchrotron </FONT></FONT>
-<FONT COLOR="#0000FF"><FONT SIZE=+4>Soleil</FONT></FONT>
-<H5>Saint-Aubin - BP 48 91192 GIF-sur-YVETTE CEDEX<BR>
-</td><td>
-<A href="http://www.synchrotron-soleil.fr/">
-<IMG  SRC="http://controle/images/logo-150.gif" 
-		ALT="SOLEIL Logo" ALIGN=RIGHT border="0"></A>
-</td></tr></table>
-
-<HR WIDTH="100%"></H5>
-
-<Br>
-<center>
-<h1>
-Tango Device Server<Br>
-Properties Description
-</h1>
-<Br>
-<b>
-Revision: 1.5 - Author: chinkumo
-</b>
-</center>
-
-
-<Br> <Br> <Br> 
-<Center>
-<Br> <Br> <Br> 
-<Table Border=2 Cellpadding=3 CELLSPACING=0 WIDTH="100%">
-<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
-<Td COLSPAN=3> <Font Size=+2><Center><b>Device Properties</b></td></Font></Center>
-<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
-<Td><Center><b>Property name</b></td></Center>
-<Td><Center><b>Property type</b></td></Center>
-<Td><Center><b>Description</b></td></Center>
-<Tr><Td>DbUser</Td>
-<Td>string</Td>
-<Td>User identifier (name) used to connect the database.<br>
-<b>Default value : </b> tdb</Td></Tr>
-
-<Tr><Td>DbPassword</Td>
-<Td>string</Td>
-<Td>Password used to connect the database.<br>
-<b>Default value : </b> tdb</Td></Tr>
-
-</Table>
-
-<Br><Br><Br>
-<Center><b>
-There is no Class properties.<Br><Br>
-</Center></b>
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
-<HTML>
-<HEAD>
-<Title> Tango Device Server User's Guide </Title>
-   <META NAME="GENERATOR" CONTENT="Mozilla/3.01Gold (X11; I; HP-UX B.10.20 9000/735) [Netscape]">
-</HEAD>
-<BODY TEXT="#000000" BGCOLOR="#FFFFFF" LINK="#0000FF" VLINK="#FF0000" ALINK="#FF0000">
-
-<P><!-------TITLE------></P>
-
-<Center>
-<Br>
-<HR WIDTH="100%"></H5>
-<H3>(c) SOLEIL : Groupe ICA Contr�le et Acquisitions </H33>
-</Center>
-</body>
-</html>
diff --git a/src/main/java/HdbExtractor/doc_html/TangoDevStates.html b/src/main/java/HdbExtractor/doc_html/TangoDevStates.html
deleted file mode 100644
index b2fcff6dd7df026fcde07d106ddb8bba40a8b591..0000000000000000000000000000000000000000
--- a/src/main/java/HdbExtractor/doc_html/TangoDevStates.html
+++ /dev/null
@@ -1,65 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
-<HTML>
-<HEAD>
-<Title> Tango Device Server User's Guide </Title>
-   <META NAME="GENERATOR" CONTENT="Mozilla/3.01Gold (X11; I; HP-UX B.10.20 9000/735) [Netscape]">
-</HEAD>
-<BODY TEXT="#000000" BGCOLOR="#FFFFFF" LINK="#0000FF" VLINK="#FF0000" ALINK="#FF0000">
-
-<P><!-------TITLE------></P>
-<table width="100%" height="20%"><tr>
-<td align=LEFT>
-<FONT COLOR="#0000FF"><FONT SIZE=+4>Synchrotron </FONT></FONT>
-<FONT COLOR="#0000FF"><FONT SIZE=+4>Soleil</FONT></FONT>
-<H5>Saint-Aubin - BP 48 91192 GIF-sur-YVETTE CEDEX<BR>
-</td><td>
-<A href="http://www.synchrotron-soleil.fr/">
-<IMG  SRC="http://controle/images/logo-150.gif" 
-		ALT="SOLEIL Logo" ALIGN=RIGHT border="0"></A>
-</td></tr></table>
-
-<HR WIDTH="100%"></H5>
-
-<Br>
-<center>
-<h1>
-Tango Device Server<Br>
-Device States Description
-</h1>
-<Br>
-<b>
-Revision: 1.5 - Author: chinkumo
-</b>
-</center>
-
-
-<Center>
-<Br> <Br> <Br> 
-<Table Border=2 Cellpadding=3 CELLSPACING=0 WIDTH="100%">
-<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
-<Td COLSPAN=2> <Font Size=+2><Center><b>States</b></td></Font></Center>
-<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
-<Td><Center><b>Names</b></td></Center>
-<Td><Center><b>Descriptions</b></td></Center>
-
-
-
-</Table>
-</Center>
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
-<HTML>
-<HEAD>
-<Title> Tango Device Server User's Guide </Title>
-   <META NAME="GENERATOR" CONTENT="Mozilla/3.01Gold (X11; I; HP-UX B.10.20 9000/735) [Netscape]">
-</HEAD>
-<BODY TEXT="#000000" BGCOLOR="#FFFFFF" LINK="#0000FF" VLINK="#FF0000" ALINK="#FF0000">
-
-<P><!-------TITLE------></P>
-
-<Center>
-<Br>
-<HR WIDTH="100%"></H5>
-<H3>(c) SOLEIL : Groupe ICA Contr�le et Acquisitions </H33>
-</Center>
-</body>
-</html>
diff --git a/src/main/java/HdbExtractor/doc_html/index.html b/src/main/java/HdbExtractor/doc_html/index.html
deleted file mode 100644
index 13f5d47f4ce425df665838a7f9ee199dd73674a3..0000000000000000000000000000000000000000
--- a/src/main/java/HdbExtractor/doc_html/index.html
+++ /dev/null
@@ -1,86 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
-<HTML>
-<HEAD>
-<Title> Tango Device Server User's Guide </Title>
-   <META NAME="GENERATOR" CONTENT="Mozilla/3.01Gold (X11; I; HP-UX B.10.20 9000/735) [Netscape]">
-</HEAD>
-<BODY TEXT="#000000" BGCOLOR="#FFFFFF" LINK="#0000FF" VLINK="#FF0000" ALINK="#FF0000">
-
-<P><!-------TITLE------></P>
-<table width="100%" height="20%"><tr>
-<td align=LEFT>
-<FONT COLOR="#0000FF"><FONT SIZE=+4>Synchrotron </FONT></FONT>
-<FONT COLOR="#0000FF"><FONT SIZE=+4>Soleil</FONT></FONT>
-<H5>Saint-Aubin - BP 48 91192 GIF-sur-YVETTE CEDEX<BR>
-</td><td>
-<A href="http://www.synchrotron-soleil.fr/">
-<IMG  SRC="http://controle/images/logo-150.gif" 
-		ALT="SOLEIL Logo" ALIGN=RIGHT border="0"></A>
-</td></tr></table>
-
-<HR WIDTH="100%"></H5>
-
-<Br>
-<center>
-<h1>
-Tango Device Server<Br>
-Device Server User's Guide
-</h1>
-<Br>
-<b>
-Revision: 1.5 - Author: chinkumo
-</b>
-</center>
-<Br>
-<Br>
-<Br>
-<Br>
-<Br>
-<Br>
-<h2>Introduction:</h2>
-A DServer to test the API for extrations<Br>
-<Br>
-<Br>
-<h2>Description:</h2>
-<ul>
-	<li> <a href=Description.html>		Device description.</a>
-	<li> <a href=Properties.html>	Properties description</a>
-	<li> <a href=TangoDevStates.html>	States description</a>
-	<li> <a href=DevCommandsFrame.html>	Commands description</a>
-	<li> <a href=Attributes.html>		Attributes description</a>
-</ul>
-<Br>
-<Br>
-<Br>
-<h2>Extented User's guide (available only for complex DeviceServers): Available in French OR English versions</h2>
-<ul>
-	<li> <a href="..\DeviceServerUsersGuide.doc">		In French word format.</a>
-	<li> <a href="..\DeviceServerUsersGuide.pdf">		In French PDF format.</a>
-	<li> <a href="..\DeviceServerUsersGuide_en.doc">		In English word format.</a>
-	<li> <a href="..\DeviceServerUsersGuide_en.pdf">		In English PDF format.</a>
-</ul>
-<Br>
-<Br>
-<Br>
-<h2>Conclusion:</h2>
-The device server is ready for distribution application programmers.<Br>
-The author will be interested inany feedback which arise from their usage of this device server.
-<Br>
-
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
-<HTML>
-<HEAD>
-<Title> Tango Device Server User's Guide </Title>
-   <META NAME="GENERATOR" CONTENT="Mozilla/3.01Gold (X11; I; HP-UX B.10.20 9000/735) [Netscape]">
-</HEAD>
-<BODY TEXT="#000000" BGCOLOR="#FFFFFF" LINK="#0000FF" VLINK="#FF0000" ALINK="#FF0000">
-
-<P><!-------TITLE------></P>
-
-<Center>
-<Br>
-<HR WIDTH="100%"></H5>
-<H3>(c) SOLEIL : Groupe ICA Contr�le et Acquisitions </H33>
-</Center>
-</body>
-</html>
diff --git a/src/main/java/TdbArchivingWatcher/Commands/AdminRepot/DataBaseReportClass.java b/src/main/java/TdbArchivingWatcher/Commands/AdminRepot/DataBaseReportClass.java
deleted file mode 100644
index 8d38bc4670f51e51b64eb15de99130136a71f788..0000000000000000000000000000000000000000
--- a/src/main/java/TdbArchivingWatcher/Commands/AdminRepot/DataBaseReportClass.java
+++ /dev/null
@@ -1,123 +0,0 @@
-/**
- * @author  $Author$
- * @version $Revision$
- */
-package TdbArchivingWatcher.Commands.AdminRepot;
-
-import org.omg.CORBA.Any;
-
-import TdbArchivingWatcher.TdbArchivingWatcher;
-import fr.esrf.Tango.DevFailed;
-import fr.esrf.Tango.DevState;
-import fr.esrf.Tango.DispLevel;
-import fr.esrf.TangoDs.Command;
-import fr.esrf.TangoDs.DeviceImpl;
-import fr.esrf.TangoDs.Except;
-import fr.esrf.TangoDs.TangoConst;
-import fr.esrf.TangoDs.Util;
-
-/**
- * Class Description:
- * 
- */
-@Deprecated
-public class DataBaseReportClass extends Command implements TangoConst {
-    // ===============================================================
-    /**
-     * Constructor for Command class DataBaseReportClass
-     * 
-     * @param name
-     *            command name
-     * @param in
-     *            argin type
-     * @param out
-     *            argout type
-     */
-    // ===============================================================
-    public DataBaseReportClass(String name, int in, int out) {
-	super(name, in, out);
-    }
-
-    // ===============================================================
-    /**
-     * Constructor for Command class DataBaseReportClass
-     * 
-     * @param name
-     *            command name
-     * @param in
-     *            argin type
-     * @param in_comments
-     *            argin description
-     * @param out
-     *            argout type
-     * @param out_comments
-     *            argout description
-     */
-    // ===============================================================
-    public DataBaseReportClass(String name, int in, int out, String in_comments, String out_comments) {
-	super(name, in, out, in_comments, out_comments);
-    }
-
-    // ===============================================================
-    /**
-     * Constructor for Command class DataBaseReportClass
-     * 
-     * @param name
-     *            command name
-     * @param in
-     *            argin type
-     * @param in_comments
-     *            argin description
-     * @param out
-     *            argout type
-     * @param out_comments
-     *            argout description
-     * @param level
-     *            The command display type OPERATOR or EXPERT
-     */
-    // ===============================================================
-    public DataBaseReportClass(String name, int in, int out, String in_comments,
-	    String out_comments, DispLevel level) {
-	super(name, in, out, in_comments, out_comments, level);
-    }
-
-    // ===============================================================
-    /**
-     * return the result of the device's command.
-     */
-    // ===============================================================
-    @Override
-    public Any execute(DeviceImpl device, Any in_any) throws DevFailed {
-	if (!(device instanceof TdbArchivingWatcher)) {
-	    Except.throw_exception("DEVICE_ERROR",
-		    "Device parameter is not instance of TdbArchivingWatcher",
-		    "TdbArchivingWatcher");
-	}
-
-	Util.out2.println("DataBaseReportClass.execute(): arrived");
-	return this.insert(((TdbArchivingWatcher) (device)).get_database_report());
-    }
-
-    // ===============================================================
-    /**
-     * Check if it is allowed to execute the command.
-     */
-    // ===============================================================
-    @Override
-    public boolean is_allowed(DeviceImpl device, Any data_in) {
-	if (device.get_state() == DevState.OFF || device.get_state() == DevState.INIT) {
-	    // End of Generated Code
-
-	    // Re-Start of Generated Code
-	    return false;
-	}
-	return true;
-    }
-}
-// -----------------------------------------------------------------------------
-/*
- * end of $Source:
- * /cvsroot/tango-cs/archiving/server/hdbtdbArchivingServers/src/
- * main/java/TdbArchivingWatcher/Commands/AdminRepot/DataBaseReportClass.java,v
- * $
- */
diff --git a/src/main/java/TdbArchivingWatcher/Commands/AdminRepot/GetAttributesCountClass.java b/src/main/java/TdbArchivingWatcher/Commands/AdminRepot/GetAttributesCountClass.java
deleted file mode 100644
index 6e61661ee4f1546355117ad458843784faaae26a..0000000000000000000000000000000000000000
--- a/src/main/java/TdbArchivingWatcher/Commands/AdminRepot/GetAttributesCountClass.java
+++ /dev/null
@@ -1,125 +0,0 @@
-/**
- * @author  $Author$
- * @version $Revision$
- */
-package TdbArchivingWatcher.Commands.AdminRepot;
-
-import org.omg.CORBA.Any;
-
-import TdbArchivingWatcher.TdbArchivingWatcher;
-import fr.esrf.Tango.DevFailed;
-import fr.esrf.Tango.DevState;
-import fr.esrf.Tango.DispLevel;
-import fr.esrf.TangoDs.Command;
-import fr.esrf.TangoDs.DeviceImpl;
-import fr.esrf.TangoDs.Except;
-import fr.esrf.TangoDs.TangoConst;
-import fr.esrf.TangoDs.Util;
-
-/**
- * Class Description:
- * 
- */
-@Deprecated
-public class GetAttributesCountClass extends Command implements TangoConst {
-    // ===============================================================
-    /**
-     * Constructor for Command class GetAttributesCountClass
-     * 
-     * @param name
-     *            command name
-     * @param in
-     *            argin type
-     * @param out
-     *            argout type
-     */
-    // ===============================================================
-    public GetAttributesCountClass(String name, int in, int out) {
-	super(name, in, out);
-    }
-
-    // ===============================================================
-    /**
-     * Constructor for Command class GetAttributesCountClass
-     * 
-     * @param name
-     *            command name
-     * @param in
-     *            argin type
-     * @param in_comments
-     *            argin description
-     * @param out
-     *            argout type
-     * @param out_comments
-     *            argout description
-     */
-    // ===============================================================
-    public GetAttributesCountClass(String name, int in, int out, String in_comments,
-	    String out_comments) {
-	super(name, in, out, in_comments, out_comments);
-    }
-
-    // ===============================================================
-    /**
-     * Constructor for Command class GetAttributesCountClass
-     * 
-     * @param name
-     *            command name
-     * @param in
-     *            argin type
-     * @param in_comments
-     *            argin description
-     * @param out
-     *            argout type
-     * @param out_comments
-     *            argout description
-     * @param level
-     *            The command display type OPERATOR or EXPERT
-     */
-    // ===============================================================
-    public GetAttributesCountClass(String name, int in, int out, String in_comments,
-	    String out_comments, DispLevel level) {
-	super(name, in, out, in_comments, out_comments, level);
-    }
-
-    // ===============================================================
-    /**
-     * return the result of the device's command.
-     */
-    // ===============================================================
-    @Override
-    public Any execute(DeviceImpl device, Any in_any) throws DevFailed {
-	if (!(device instanceof TdbArchivingWatcher)) {
-	    Except.throw_exception("DEVICE_ERROR",
-		    "Device parameter is not instance of TdbArchivingWatcher",
-		    "TdbArchivingWatcher");
-	}
-
-	Util.out2.println("GetAttributesCountClass.execute(): arrived");
-	return this.insert(((TdbArchivingWatcher) (device))
-		.get_current_archiving_attributes_count());
-    }
-
-    // ===============================================================
-    /**
-     * Check if it is allowed to execute the command.
-     */
-    // ===============================================================
-    @Override
-    public boolean is_allowed(DeviceImpl device, Any data_in) {
-	if (device.get_state() == DevState.OFF || device.get_state() == DevState.INIT) {
-	    // End of Generated Code
-
-	    // Re-Start of Generated Code
-	    return false;
-	}
-	return true;
-    }
-}
-// -----------------------------------------------------------------------------
-/*
- * end of $Source:
- * /cvsroot/tango-cs/archiving/server/hdbtdbArchivingServers/src/
- * main/java/TdbArchivingWatcher
- * /Commands/AdminRepot/GetAttributesCountClass.java,v $
- */
diff --git a/src/main/java/TdbArchivingWatcher/Commands/AdminRepot/GetFeedAliveProgressionClass.java b/src/main/java/TdbArchivingWatcher/Commands/AdminRepot/GetFeedAliveProgressionClass.java
deleted file mode 100644
index 050ca39b39dbb00433a30df248d29aaf16ab7aa4..0000000000000000000000000000000000000000
--- a/src/main/java/TdbArchivingWatcher/Commands/AdminRepot/GetFeedAliveProgressionClass.java
+++ /dev/null
@@ -1,123 +0,0 @@
-/**
- * @author  $Author$
- * @version $Revision$
- */
-package TdbArchivingWatcher.Commands.AdminRepot;
-
-import org.omg.CORBA.Any;
-
-import TdbArchivingWatcher.TdbArchivingWatcher;
-import fr.esrf.Tango.DevFailed;
-import fr.esrf.Tango.DevState;
-import fr.esrf.Tango.DispLevel;
-import fr.esrf.TangoDs.Command;
-import fr.esrf.TangoDs.DeviceImpl;
-import fr.esrf.TangoDs.Except;
-import fr.esrf.TangoDs.TangoConst;
-
-/**
- * Class Description:
- * 
- */
-@Deprecated
-public class GetFeedAliveProgressionClass extends Command implements TangoConst {
-    // ===============================================================
-    /**
-     * Constructor for Command class GetFeedAliveProgressionClass
-     * 
-     * @param name
-     *            command name
-     * @param in
-     *            argin type
-     * @param out
-     *            argout type
-     */
-    // ===============================================================
-    public GetFeedAliveProgressionClass(String name, int in, int out) {
-	super(name, in, out);
-    }
-
-    // ===============================================================
-    /**
-     * Constructor for Command class GetFeedAliveProgressionClass
-     * 
-     * @param name
-     *            command name
-     * @param in
-     *            argin type
-     * @param in_comments
-     *            argin description
-     * @param out
-     *            argout type
-     * @param out_comments
-     *            argout description
-     */
-    // ===============================================================
-    public GetFeedAliveProgressionClass(String name, int in, int out, String in_comments,
-	    String out_comments) {
-	super(name, in, out, in_comments, out_comments);
-    }
-
-    // ===============================================================
-    /**
-     * Constructor for Command class GetFeedAliveProgressionClass
-     * 
-     * @param name
-     *            command name
-     * @param in
-     *            argin type
-     * @param in_comments
-     *            argin description
-     * @param out
-     *            argout type
-     * @param out_comments
-     *            argout description
-     * @param level
-     *            The command display type OPERATOR or EXPERT
-     */
-    // ===============================================================
-    public GetFeedAliveProgressionClass(String name, int in, int out, String in_comments,
-	    String out_comments, DispLevel level) {
-	super(name, in, out, in_comments, out_comments, level);
-    }
-
-    // ===============================================================
-    /**
-     * return the result of the device's command.
-     */
-    // ===============================================================
-    @Override
-    public Any execute(DeviceImpl device, Any in_any) throws DevFailed {
-	if (!(device instanceof TdbArchivingWatcher)) {
-	    Except.throw_exception("DEVICE_ERROR",
-		    "Device parameter is not instance of TdbArchivingWatcher",
-		    "TdbArchivingWatcher");
-	}
-
-	// Util.out2.println("GetFeedAliveProgressionClass.execute(): arrived");
-	return this.insert(((TdbArchivingWatcher) (device)).get_feedalive_progression_level());
-    }
-
-    // ===============================================================
-    /**
-     * Check if it is allowed to execute the command.
-     */
-    // ===============================================================
-    @Override
-    public boolean is_allowed(DeviceImpl device, Any data_in) {
-	if (device.get_state() == DevState.OFF || device.get_state() == DevState.INIT) {
-	    // End of Generated Code
-
-	    // Re-Start of Generated Code
-	    return false;
-	}
-	return true;
-    }
-}
-// -----------------------------------------------------------------------------
-/*
- * end of $Source:
- * /cvsroot/tango-cs/archiving/server/hdbtdbArchivingServers/src/
- * main/java/TdbArchivingWatcher
- * /Commands/AdminRepot/GetFeedAliveProgressionClass.java,v $
- */
diff --git a/src/main/java/TdbArchivingWatcher/Commands/AdminRepot/GetKOAttributesCountClass.java b/src/main/java/TdbArchivingWatcher/Commands/AdminRepot/GetKOAttributesCountClass.java
deleted file mode 100644
index 70f3eaf9b51f9d52bc9cbb020451750e6c8e927f..0000000000000000000000000000000000000000
--- a/src/main/java/TdbArchivingWatcher/Commands/AdminRepot/GetKOAttributesCountClass.java
+++ /dev/null
@@ -1,124 +0,0 @@
-/**
- * @author  $Author$
- * @version $Revision$
- */
-package TdbArchivingWatcher.Commands.AdminRepot;
-
-import org.omg.CORBA.Any;
-
-import TdbArchivingWatcher.TdbArchivingWatcher;
-import fr.esrf.Tango.DevFailed;
-import fr.esrf.Tango.DevState;
-import fr.esrf.Tango.DispLevel;
-import fr.esrf.TangoDs.Command;
-import fr.esrf.TangoDs.DeviceImpl;
-import fr.esrf.TangoDs.Except;
-import fr.esrf.TangoDs.TangoConst;
-import fr.esrf.TangoDs.Util;
-
-/**
- * Class Description:
- * 
- */
-@Deprecated
-public class GetKOAttributesCountClass extends Command implements TangoConst {
-    // ===============================================================
-    /**
-     * Constructor for Command class GetKOAttributesCountClass
-     * 
-     * @param name
-     *            command name
-     * @param in
-     *            argin type
-     * @param out
-     *            argout type
-     */
-    // ===============================================================
-    public GetKOAttributesCountClass(String name, int in, int out) {
-	super(name, in, out);
-    }
-
-    // ===============================================================
-    /**
-     * Constructor for Command class GetKOAttributesCountClass
-     * 
-     * @param name
-     *            command name
-     * @param in
-     *            argin type
-     * @param in_comments
-     *            argin description
-     * @param out
-     *            argout type
-     * @param out_comments
-     *            argout description
-     */
-    // ===============================================================
-    public GetKOAttributesCountClass(String name, int in, int out, String in_comments,
-	    String out_comments) {
-	super(name, in, out, in_comments, out_comments);
-    }
-
-    // ===============================================================
-    /**
-     * Constructor for Command class GetKOAttributesCountClass
-     * 
-     * @param name
-     *            command name
-     * @param in
-     *            argin type
-     * @param in_comments
-     *            argin description
-     * @param out
-     *            argout type
-     * @param out_comments
-     *            argout description
-     * @param level
-     *            The command display type OPERATOR or EXPERT
-     */
-    // ===============================================================
-    public GetKOAttributesCountClass(String name, int in, int out, String in_comments,
-	    String out_comments, DispLevel level) {
-	super(name, in, out, in_comments, out_comments, level);
-    }
-
-    // ===============================================================
-    /**
-     * return the result of the device's command.
-     */
-    // ===============================================================
-    @Override
-    public Any execute(DeviceImpl device, Any in_any) throws DevFailed {
-	if (!(device instanceof TdbArchivingWatcher)) {
-	    Except.throw_exception("DEVICE_ERROR",
-		    "Device parameter is not instance of TdbArchivingWatcher",
-		    "TdbArchivingWatcher");
-	}
-
-	Util.out2.println("GetKOAttributesCountClass.execute(): arrived");
-	return this.insert(((TdbArchivingWatcher) (device)).get_ko_attributes_count());
-    }
-
-    // ===============================================================
-    /**
-     * Check if it is allowed to execute the command.
-     */
-    // ===============================================================
-    @Override
-    public boolean is_allowed(DeviceImpl device, Any data_in) {
-	if (device.get_state() == DevState.OFF || device.get_state() == DevState.INIT) {
-	    // End of Generated Code
-
-	    // Re-Start of Generated Code
-	    return false;
-	}
-	return true;
-    }
-}
-// -----------------------------------------------------------------------------
-/*
- * end of $Source:
- * /cvsroot/tango-cs/archiving/server/hdbtdbArchivingServers/src/
- * main/java/TdbArchivingWatcher
- * /Commands/AdminRepot/GetKOAttributesCountClass.java,v $
- */
diff --git a/src/main/java/TdbArchivingWatcher/Commands/AdminRepot/GetKoCountByDeviceClass.java b/src/main/java/TdbArchivingWatcher/Commands/AdminRepot/GetKoCountByDeviceClass.java
deleted file mode 100644
index 2b5cf4316d40917c64a87bba636ca98bf024a305..0000000000000000000000000000000000000000
--- a/src/main/java/TdbArchivingWatcher/Commands/AdminRepot/GetKoCountByDeviceClass.java
+++ /dev/null
@@ -1,124 +0,0 @@
-/**
- * @author  $Author$
- * @version $Revision$
- */
-package TdbArchivingWatcher.Commands.AdminRepot;
-
-import org.omg.CORBA.Any;
-
-import TdbArchivingWatcher.TdbArchivingWatcher;
-import fr.esrf.Tango.DevFailed;
-import fr.esrf.Tango.DevState;
-import fr.esrf.Tango.DispLevel;
-import fr.esrf.TangoDs.Command;
-import fr.esrf.TangoDs.DeviceImpl;
-import fr.esrf.TangoDs.Except;
-import fr.esrf.TangoDs.TangoConst;
-import fr.esrf.TangoDs.Util;
-
-/**
- * Class Description:
- * 
- */
-@Deprecated
-public class GetKoCountByDeviceClass extends Command implements TangoConst {
-    // ===============================================================
-    /**
-     * Constructor for Command class GetKoCountByDeviceClass
-     * 
-     * @param name
-     *            command name
-     * @param in
-     *            argin type
-     * @param out
-     *            argout type
-     */
-    // ===============================================================
-    public GetKoCountByDeviceClass(String name, int in, int out) {
-	super(name, in, out);
-    }
-
-    // ===============================================================
-    /**
-     * Constructor for Command class GetKoCountByDeviceClass
-     * 
-     * @param name
-     *            command name
-     * @param in
-     *            argin type
-     * @param in_comments
-     *            argin description
-     * @param out
-     *            argout type
-     * @param out_comments
-     *            argout description
-     */
-    // ===============================================================
-    public GetKoCountByDeviceClass(String name, int in, int out, String in_comments,
-	    String out_comments) {
-	super(name, in, out, in_comments, out_comments);
-    }
-
-    // ===============================================================
-    /**
-     * Constructor for Command class GetKoCountByDeviceClass
-     * 
-     * @param name
-     *            command name
-     * @param in
-     *            argin type
-     * @param in_comments
-     *            argin description
-     * @param out
-     *            argout type
-     * @param out_comments
-     *            argout description
-     * @param level
-     *            The command display type OPERATOR or EXPERT
-     */
-    // ===============================================================
-    public GetKoCountByDeviceClass(String name, int in, int out, String in_comments,
-	    String out_comments, DispLevel level) {
-	super(name, in, out, in_comments, out_comments, level);
-    }
-
-    // ===============================================================
-    /**
-     * return the result of the device's command.
-     */
-    // ===============================================================
-    @Override
-    public Any execute(DeviceImpl device, Any in_any) throws DevFailed {
-	if (!(device instanceof TdbArchivingWatcher)) {
-	    Except.throw_exception("DEVICE_ERROR",
-		    "Device parameter is not instance of TdbArchivingWatcher",
-		    "TdbArchivingWatcher");
-	}
-
-	Util.out2.println("GetKoCountByDeviceClass.execute(): arrived");
-	return this.insert(((TdbArchivingWatcher) (device)).get_ko_attributes_count_by_device());
-    }
-
-    // ===============================================================
-    /**
-     * Check if it is allowed to execute the command.
-     */
-    // ===============================================================
-    @Override
-    public boolean is_allowed(DeviceImpl device, Any data_in) {
-	if (device.get_state() == DevState.OFF || device.get_state() == DevState.INIT) {
-	    // End of Generated Code
-
-	    // Re-Start of Generated Code
-	    return false;
-	}
-	return true;
-    }
-}
-// -----------------------------------------------------------------------------
-/*
- * end of $Source:
- * /cvsroot/tango-cs/archiving/server/hdbtdbArchivingServers/src/
- * main/java/TdbArchivingWatcher
- * /Commands/AdminRepot/GetKoCountByDeviceClass.java,v $
- */
diff --git a/src/main/java/TdbArchivingWatcher/Commands/AdminRepot/GetListOfJobErrorsClass.java b/src/main/java/TdbArchivingWatcher/Commands/AdminRepot/GetListOfJobErrorsClass.java
deleted file mode 100644
index d8f7b63d65afb018d4e56dc068900adc5f49ccc6..0000000000000000000000000000000000000000
--- a/src/main/java/TdbArchivingWatcher/Commands/AdminRepot/GetListOfJobErrorsClass.java
+++ /dev/null
@@ -1,124 +0,0 @@
-/**
- * @author  $Author$
- * @version $Revision$
- */
-package TdbArchivingWatcher.Commands.AdminRepot;
-
-import org.omg.CORBA.Any;
-
-import TdbArchivingWatcher.TdbArchivingWatcher;
-import fr.esrf.Tango.DevFailed;
-import fr.esrf.Tango.DevState;
-import fr.esrf.Tango.DispLevel;
-import fr.esrf.TangoDs.Command;
-import fr.esrf.TangoDs.DeviceImpl;
-import fr.esrf.TangoDs.Except;
-import fr.esrf.TangoDs.TangoConst;
-import fr.esrf.TangoDs.Util;
-
-/**
- * Class Description:
- * 
- */
-@Deprecated
-public class GetListOfJobErrorsClass extends Command implements TangoConst {
-    // ===============================================================
-    /**
-     * Constructor for Command class GetListOfJobErrorsClass
-     * 
-     * @param name
-     *            command name
-     * @param in
-     *            argin type
-     * @param out
-     *            argout type
-     */
-    // ===============================================================
-    public GetListOfJobErrorsClass(String name, int in, int out) {
-	super(name, in, out);
-    }
-
-    // ===============================================================
-    /**
-     * Constructor for Command class GetListOfJobErrorsClass
-     * 
-     * @param name
-     *            command name
-     * @param in
-     *            argin type
-     * @param in_comments
-     *            argin description
-     * @param out
-     *            argout type
-     * @param out_comments
-     *            argout description
-     */
-    // ===============================================================
-    public GetListOfJobErrorsClass(String name, int in, int out, String in_comments,
-	    String out_comments) {
-	super(name, in, out, in_comments, out_comments);
-    }
-
-    // ===============================================================
-    /**
-     * Constructor for Command class GetListOfJobErrorsClass
-     * 
-     * @param name
-     *            command name
-     * @param in
-     *            argin type
-     * @param in_comments
-     *            argin description
-     * @param out
-     *            argout type
-     * @param out_comments
-     *            argout description
-     * @param level
-     *            The command display type OPERATOR or EXPERT
-     */
-    // ===============================================================
-    public GetListOfJobErrorsClass(String name, int in, int out, String in_comments,
-	    String out_comments, DispLevel level) {
-	super(name, in, out, in_comments, out_comments, level);
-    }
-
-    // ===============================================================
-    /**
-     * return the result of the device's command.
-     */
-    // ===============================================================
-    @Override
-    public Any execute(DeviceImpl device, Any in_any) throws DevFailed {
-	if (!(device instanceof TdbArchivingWatcher)) {
-	    Except.throw_exception("DEVICE_ERROR",
-		    "Device parameter is not instance of TdbArchivingWatcher",
-		    "TdbArchivingWatcher");
-	}
-
-	Util.out2.println("GetListOfJobErrorsClass.execute(): arrived");
-	return this.insert(((TdbArchivingWatcher) (device)).get_job_errors());
-    }
-
-    // ===============================================================
-    /**
-     * Check if it is allowed to execute the command.
-     */
-    // ===============================================================
-    @Override
-    public boolean is_allowed(DeviceImpl device, Any data_in) {
-	if (device.get_state() == DevState.OFF || device.get_state() == DevState.INIT) {
-	    // End of Generated Code
-
-	    // Re-Start of Generated Code
-	    return false;
-	}
-	return true;
-    }
-}
-// -----------------------------------------------------------------------------
-/*
- * end of $Source:
- * /cvsroot/tango-cs/archiving/server/hdbtdbArchivingServers/src/
- * main/java/TdbArchivingWatcher
- * /Commands/AdminRepot/GetListOfJobErrorsClass.java,v $
- */
diff --git a/src/main/java/TdbArchivingWatcher/Commands/AdminRepot/GetListOfJobStatusClass.java b/src/main/java/TdbArchivingWatcher/Commands/AdminRepot/GetListOfJobStatusClass.java
deleted file mode 100644
index 4ba9d4b386a38a7c334e42969cde7cd8cb3d1a6d..0000000000000000000000000000000000000000
--- a/src/main/java/TdbArchivingWatcher/Commands/AdminRepot/GetListOfJobStatusClass.java
+++ /dev/null
@@ -1,124 +0,0 @@
-/**
- * @author  $Author$
- * @version $Revision$
- */
-package TdbArchivingWatcher.Commands.AdminRepot;
-
-import org.omg.CORBA.Any;
-
-import TdbArchivingWatcher.TdbArchivingWatcher;
-import fr.esrf.Tango.DevFailed;
-import fr.esrf.Tango.DevState;
-import fr.esrf.Tango.DispLevel;
-import fr.esrf.TangoDs.Command;
-import fr.esrf.TangoDs.DeviceImpl;
-import fr.esrf.TangoDs.Except;
-import fr.esrf.TangoDs.TangoConst;
-import fr.esrf.TangoDs.Util;
-
-/**
- * Class Description:
- * 
- */
-@Deprecated
-public class GetListOfJobStatusClass extends Command implements TangoConst {
-    // ===============================================================
-    /**
-     * Constructor for Command class GetListOfJobStatusClass
-     * 
-     * @param name
-     *            command name
-     * @param in
-     *            argin type
-     * @param out
-     *            argout type
-     */
-    // ===============================================================
-    public GetListOfJobStatusClass(String name, int in, int out) {
-	super(name, in, out);
-    }
-
-    // ===============================================================
-    /**
-     * Constructor for Command class GetListOfJobStatusClass
-     * 
-     * @param name
-     *            command name
-     * @param in
-     *            argin type
-     * @param in_comments
-     *            argin description
-     * @param out
-     *            argout type
-     * @param out_comments
-     *            argout description
-     */
-    // ===============================================================
-    public GetListOfJobStatusClass(String name, int in, int out, String in_comments,
-	    String out_comments) {
-	super(name, in, out, in_comments, out_comments);
-    }
-
-    // ===============================================================
-    /**
-     * Constructor for Command class GetListOfJobStatusClass
-     * 
-     * @param name
-     *            command name
-     * @param in
-     *            argin type
-     * @param in_comments
-     *            argin description
-     * @param out
-     *            argout type
-     * @param out_comments
-     *            argout description
-     * @param level
-     *            The command display type OPERATOR or EXPERT
-     */
-    // ===============================================================
-    public GetListOfJobStatusClass(String name, int in, int out, String in_comments,
-	    String out_comments, DispLevel level) {
-	super(name, in, out, in_comments, out_comments, level);
-    }
-
-    // ===============================================================
-    /**
-     * return the result of the device's command.
-     */
-    // ===============================================================
-    @Override
-    public Any execute(DeviceImpl device, Any in_any) throws DevFailed {
-	if (!(device instanceof TdbArchivingWatcher)) {
-	    Except.throw_exception("DEVICE_ERROR",
-		    "Device parameter is not instance of TdbArchivingWatcher",
-		    "TdbArchivingWatcher");
-	}
-
-	Util.out2.println("GetListOfJobStatusClass.execute(): arrived");
-	return this.insert(((TdbArchivingWatcher) (device)).get_job_status());
-    }
-
-    // ===============================================================
-    /**
-     * Check if it is allowed to execute the command.
-     */
-    // ===============================================================
-    @Override
-    public boolean is_allowed(DeviceImpl device, Any data_in) {
-	if (device.get_state() == DevState.OFF || device.get_state() == DevState.INIT) {
-	    // End of Generated Code
-
-	    // Re-Start of Generated Code
-	    return false;
-	}
-	return true;
-    }
-}
-// -----------------------------------------------------------------------------
-/*
- * end of $Source:
- * /cvsroot/tango-cs/archiving/server/hdbtdbArchivingServers/src/
- * main/java/TdbArchivingWatcher
- * /Commands/AdminRepot/GetListOfJobStatusClass.java,v $
- */
diff --git a/src/main/java/TdbArchivingWatcher/Commands/AdminRepot/GetListOfKOAttributesClass.java b/src/main/java/TdbArchivingWatcher/Commands/AdminRepot/GetListOfKOAttributesClass.java
deleted file mode 100644
index 703ec70f79cd955f6d4ab6300bbe5abe06a27cda..0000000000000000000000000000000000000000
--- a/src/main/java/TdbArchivingWatcher/Commands/AdminRepot/GetListOfKOAttributesClass.java
+++ /dev/null
@@ -1,124 +0,0 @@
-/**
- * @author  $Author$
- * @version $Revision$
- */
-package TdbArchivingWatcher.Commands.AdminRepot;
-
-import org.omg.CORBA.Any;
-
-import TdbArchivingWatcher.TdbArchivingWatcher;
-import fr.esrf.Tango.DevFailed;
-import fr.esrf.Tango.DevState;
-import fr.esrf.Tango.DispLevel;
-import fr.esrf.TangoDs.Command;
-import fr.esrf.TangoDs.DeviceImpl;
-import fr.esrf.TangoDs.Except;
-import fr.esrf.TangoDs.TangoConst;
-import fr.esrf.TangoDs.Util;
-
-/**
- * Class Description:
- * 
- */
-@Deprecated
-public class GetListOfKOAttributesClass extends Command implements TangoConst {
-    // ===============================================================
-    /**
-     * Constructor for Command class GetListOfKOAttributesClass
-     * 
-     * @param name
-     *            command name
-     * @param in
-     *            argin type
-     * @param out
-     *            argout type
-     */
-    // ===============================================================
-    public GetListOfKOAttributesClass(String name, int in, int out) {
-	super(name, in, out);
-    }
-
-    // ===============================================================
-    /**
-     * Constructor for Command class GetListOfKOAttributesClass
-     * 
-     * @param name
-     *            command name
-     * @param in
-     *            argin type
-     * @param in_comments
-     *            argin description
-     * @param out
-     *            argout type
-     * @param out_comments
-     *            argout description
-     */
-    // ===============================================================
-    public GetListOfKOAttributesClass(String name, int in, int out, String in_comments,
-	    String out_comments) {
-	super(name, in, out, in_comments, out_comments);
-    }
-
-    // ===============================================================
-    /**
-     * Constructor for Command class GetListOfKOAttributesClass
-     * 
-     * @param name
-     *            command name
-     * @param in
-     *            argin type
-     * @param in_comments
-     *            argin description
-     * @param out
-     *            argout type
-     * @param out_comments
-     *            argout description
-     * @param level
-     *            The command display type OPERATOR or EXPERT
-     */
-    // ===============================================================
-    public GetListOfKOAttributesClass(String name, int in, int out, String in_comments,
-	    String out_comments, DispLevel level) {
-	super(name, in, out, in_comments, out_comments, level);
-    }
-
-    // ===============================================================
-    /**
-     * return the result of the device's command.
-     */
-    // ===============================================================
-    @Override
-    public Any execute(DeviceImpl device, Any in_any) throws DevFailed {
-	if (!(device instanceof TdbArchivingWatcher)) {
-	    Except.throw_exception("DEVICE_ERROR",
-		    "Device parameter is not instance of TdbArchivingWatcher",
-		    "TdbArchivingWatcher");
-	}
-
-	Util.out2.println("GetListOfKOAttributesClass.execute(): arrived");
-	return this.insert(((TdbArchivingWatcher) (device)).get_ko_attributes());
-    }
-
-    // ===============================================================
-    /**
-     * Check if it is allowed to execute the command.
-     */
-    // ===============================================================
-    @Override
-    public boolean is_allowed(DeviceImpl device, Any data_in) {
-	if (device.get_state() == DevState.OFF || device.get_state() == DevState.INIT) {
-	    // End of Generated Code
-
-	    // Re-Start of Generated Code
-	    return false;
-	}
-	return true;
-    }
-}
-// -----------------------------------------------------------------------------
-/*
- * end of $Source:
- * /cvsroot/tango-cs/archiving/server/hdbtdbArchivingServers/src/
- * main/java/TdbArchivingWatcher
- * /Commands/AdminRepot/GetListOfKOAttributesClass.java,v $
- */
diff --git a/src/main/java/TdbArchivingWatcher/Commands/AdminRepot/GetListOfPartitionsClass.java b/src/main/java/TdbArchivingWatcher/Commands/AdminRepot/GetListOfPartitionsClass.java
deleted file mode 100644
index 3536ab6873f7d385e9295c86941a0051d8edf068..0000000000000000000000000000000000000000
--- a/src/main/java/TdbArchivingWatcher/Commands/AdminRepot/GetListOfPartitionsClass.java
+++ /dev/null
@@ -1,124 +0,0 @@
-/**
- * @author  $Author$
- * @version $Revision$
- */
-package TdbArchivingWatcher.Commands.AdminRepot;
-
-import org.omg.CORBA.Any;
-
-import TdbArchivingWatcher.TdbArchivingWatcher;
-import fr.esrf.Tango.DevFailed;
-import fr.esrf.Tango.DevState;
-import fr.esrf.Tango.DispLevel;
-import fr.esrf.TangoDs.Command;
-import fr.esrf.TangoDs.DeviceImpl;
-import fr.esrf.TangoDs.Except;
-import fr.esrf.TangoDs.TangoConst;
-import fr.esrf.TangoDs.Util;
-
-/**
- * Class Description:
- * 
- */
-@Deprecated
-public class GetListOfPartitionsClass extends Command implements TangoConst {
-    // ===============================================================
-    /**
-     * Constructor for Command class GetListOfPartitionsClass
-     * 
-     * @param name
-     *            command name
-     * @param in
-     *            argin type
-     * @param out
-     *            argout type
-     */
-    // ===============================================================
-    public GetListOfPartitionsClass(String name, int in, int out) {
-	super(name, in, out);
-    }
-
-    // ===============================================================
-    /**
-     * Constructor for Command class GetListOfPartitionsClass
-     * 
-     * @param name
-     *            command name
-     * @param in
-     *            argin type
-     * @param in_comments
-     *            argin description
-     * @param out
-     *            argout type
-     * @param out_comments
-     *            argout description
-     */
-    // ===============================================================
-    public GetListOfPartitionsClass(String name, int in, int out, String in_comments,
-	    String out_comments) {
-	super(name, in, out, in_comments, out_comments);
-    }
-
-    // ===============================================================
-    /**
-     * Constructor for Command class GetListOfPartitionsClass
-     * 
-     * @param name
-     *            command name
-     * @param in
-     *            argin type
-     * @param in_comments
-     *            argin description
-     * @param out
-     *            argout type
-     * @param out_comments
-     *            argout description
-     * @param level
-     *            The command display type OPERATOR or EXPERT
-     */
-    // ===============================================================
-    public GetListOfPartitionsClass(String name, int in, int out, String in_comments,
-	    String out_comments, DispLevel level) {
-	super(name, in, out, in_comments, out_comments, level);
-    }
-
-    // ===============================================================
-    /**
-     * return the result of the device's command.
-     */
-    // ===============================================================
-    @Override
-    public Any execute(DeviceImpl device, Any in_any) throws DevFailed {
-	if (!(device instanceof TdbArchivingWatcher)) {
-	    Except.throw_exception("DEVICE_ERROR",
-		    "Device parameter is not instance of TdbArchivingWatcher",
-		    "TdbArchivingWatcher");
-	}
-
-	Util.out2.println("GetListOfPartitionsClass.execute(): arrived");
-	return this.insert(((TdbArchivingWatcher) (device)).get_partitions());
-    }
-
-    // ===============================================================
-    /**
-     * Check if it is allowed to execute the command.
-     */
-    // ===============================================================
-    @Override
-    public boolean is_allowed(DeviceImpl device, Any data_in) {
-	if (device.get_state() == DevState.OFF || device.get_state() == DevState.INIT) {
-	    // End of Generated Code
-
-	    // Re-Start of Generated Code
-	    return false;
-	}
-	return true;
-    }
-}
-// -----------------------------------------------------------------------------
-/*
- * end of $Source:
- * /cvsroot/tango-cs/archiving/server/hdbtdbArchivingServers/src/
- * main/java/TdbArchivingWatcher
- * /Commands/AdminRepot/GetListOfPartitionsClass.java,v $
- */
diff --git a/src/main/java/TdbArchivingWatcher/Commands/AdminRepot/GetOKAttributesCountClass.java b/src/main/java/TdbArchivingWatcher/Commands/AdminRepot/GetOKAttributesCountClass.java
deleted file mode 100644
index ccfa164fbe6ad11d87a1ed8f4e85d8059945a5c0..0000000000000000000000000000000000000000
--- a/src/main/java/TdbArchivingWatcher/Commands/AdminRepot/GetOKAttributesCountClass.java
+++ /dev/null
@@ -1,124 +0,0 @@
-/**
- * @author  $Author$
- * @version $Revision$
- */
-package TdbArchivingWatcher.Commands.AdminRepot;
-
-import org.omg.CORBA.Any;
-
-import TdbArchivingWatcher.TdbArchivingWatcher;
-import fr.esrf.Tango.DevFailed;
-import fr.esrf.Tango.DevState;
-import fr.esrf.Tango.DispLevel;
-import fr.esrf.TangoDs.Command;
-import fr.esrf.TangoDs.DeviceImpl;
-import fr.esrf.TangoDs.Except;
-import fr.esrf.TangoDs.TangoConst;
-import fr.esrf.TangoDs.Util;
-
-/**
- * Class Description:
- * 
- */
-@Deprecated
-public class GetOKAttributesCountClass extends Command implements TangoConst {
-    // ===============================================================
-    /**
-     * Constructor for Command class GetOKAttributesCountClass
-     * 
-     * @param name
-     *            command name
-     * @param in
-     *            argin type
-     * @param out
-     *            argout type
-     */
-    // ===============================================================
-    public GetOKAttributesCountClass(String name, int in, int out) {
-	super(name, in, out);
-    }
-
-    // ===============================================================
-    /**
-     * Constructor for Command class GetOKAttributesCountClass
-     * 
-     * @param name
-     *            command name
-     * @param in
-     *            argin type
-     * @param in_comments
-     *            argin description
-     * @param out
-     *            argout type
-     * @param out_comments
-     *            argout description
-     */
-    // ===============================================================
-    public GetOKAttributesCountClass(String name, int in, int out, String in_comments,
-	    String out_comments) {
-	super(name, in, out, in_comments, out_comments);
-    }
-
-    // ===============================================================
-    /**
-     * Constructor for Command class GetOKAttributesCountClass
-     * 
-     * @param name
-     *            command name
-     * @param in
-     *            argin type
-     * @param in_comments
-     *            argin description
-     * @param out
-     *            argout type
-     * @param out_comments
-     *            argout description
-     * @param level
-     *            The command display type OPERATOR or EXPERT
-     */
-    // ===============================================================
-    public GetOKAttributesCountClass(String name, int in, int out, String in_comments,
-	    String out_comments, DispLevel level) {
-	super(name, in, out, in_comments, out_comments, level);
-    }
-
-    // ===============================================================
-    /**
-     * return the result of the device's command.
-     */
-    // ===============================================================
-    @Override
-    public Any execute(DeviceImpl device, Any in_any) throws DevFailed {
-	if (!(device instanceof TdbArchivingWatcher)) {
-	    Except.throw_exception("DEVICE_ERROR",
-		    "Device parameter is not instance of TdbArchivingWatcher",
-		    "TdbArchivingWatcher");
-	}
-
-	Util.out2.println("GetOKAttributesCountClass.execute(): arrived");
-	return this.insert(((TdbArchivingWatcher) (device)).get_ok_attributes_count());
-    }
-
-    // ===============================================================
-    /**
-     * Check if it is allowed to execute the command.
-     */
-    // ===============================================================
-    @Override
-    public boolean is_allowed(DeviceImpl device, Any data_in) {
-	if (device.get_state() == DevState.OFF || device.get_state() == DevState.INIT) {
-	    // End of Generated Code
-
-	    // Re-Start of Generated Code
-	    return false;
-	}
-	return true;
-    }
-}
-// -----------------------------------------------------------------------------
-/*
- * end of $Source:
- * /cvsroot/tango-cs/archiving/server/hdbtdbArchivingServers/src/
- * main/java/TdbArchivingWatcher
- * /Commands/AdminRepot/GetOKAttributesCountClass.java,v $
- */
diff --git a/src/main/java/TdbArchivingWatcher/Commands/AdminRepot/StartArchivingReportClass.java b/src/main/java/TdbArchivingWatcher/Commands/AdminRepot/StartArchivingReportClass.java
deleted file mode 100644
index 281b2ad25e00caa99712f0295b18e091e273641e..0000000000000000000000000000000000000000
--- a/src/main/java/TdbArchivingWatcher/Commands/AdminRepot/StartArchivingReportClass.java
+++ /dev/null
@@ -1,125 +0,0 @@
-/**
- * @author  $Author$
- * @version $Revision$
- */
-package TdbArchivingWatcher.Commands.AdminRepot;
-
-import org.omg.CORBA.Any;
-
-import TdbArchivingWatcher.TdbArchivingWatcher;
-import fr.esrf.Tango.DevFailed;
-import fr.esrf.Tango.DevState;
-import fr.esrf.Tango.DispLevel;
-import fr.esrf.TangoDs.Command;
-import fr.esrf.TangoDs.DeviceImpl;
-import fr.esrf.TangoDs.Except;
-import fr.esrf.TangoDs.TangoConst;
-import fr.esrf.TangoDs.Util;
-
-/**
- * Class Description:
- * 
- */
-@Deprecated
-public class StartArchivingReportClass extends Command implements TangoConst {
-    // ===============================================================
-    /**
-     * Constructor for Command class AdminReportClass
-     * 
-     * @param name
-     *            command name
-     * @param in
-     *            argin type
-     * @param out
-     *            argout type
-     */
-    // ===============================================================
-    public StartArchivingReportClass(String name, int in, int out) {
-	super(name, in, out);
-    }
-
-    // ===============================================================
-    /**
-     * Constructor for Command class AdminReportClass
-     * 
-     * @param name
-     *            command name
-     * @param in
-     *            argin type
-     * @param in_comments
-     *            argin description
-     * @param out
-     *            argout type
-     * @param out_comments
-     *            argout description
-     */
-    // ===============================================================
-    public StartArchivingReportClass(String name, int in, int out, String in_comments,
-	    String out_comments) {
-	super(name, in, out, in_comments, out_comments);
-    }
-
-    // ===============================================================
-    /**
-     * Constructor for Command class AdminReportClass
-     * 
-     * @param name
-     *            command name
-     * @param in
-     *            argin type
-     * @param in_comments
-     *            argin description
-     * @param out
-     *            argout type
-     * @param out_comments
-     *            argout description
-     * @param level
-     *            The command display type OPERATOR or EXPERT
-     */
-    // ===============================================================
-    public StartArchivingReportClass(String name, int in, int out, String in_comments,
-	    String out_comments, DispLevel level) {
-	super(name, in, out, in_comments, out_comments, level);
-    }
-
-    // ===============================================================
-    /**
-     * return the result of the device's command.
-     */
-    // ===============================================================
-    @Override
-    public Any execute(DeviceImpl device, Any in_any) throws DevFailed {
-	if (!(device instanceof TdbArchivingWatcher)) {
-	    Except.throw_exception("DEVICE_ERROR",
-		    "Device parameter is not instance of TdbArchivingWatcher",
-		    "TdbArchivingWatcher");
-	}
-
-	Util.out2.println("StartArchivingReportClass.execute(): arrived");
-	((TdbArchivingWatcher) (device)).start_archiving_report();
-	return this.insert();
-    }
-
-    // ===============================================================
-    /**
-     * Check if it is allowed to execute the command.
-     */
-    // ===============================================================
-    @Override
-    public boolean is_allowed(DeviceImpl device, Any data_in) {
-	if (device.get_state() == DevState.OFF || device.get_state() == DevState.INIT) {
-	    // End of Generated Code
-
-	    // Re-Start of Generated Code
-	    return false;
-	}
-	return true;
-    }
-}
-// -----------------------------------------------------------------------------
-/*
- * end of $Source:
- * /cvsroot/tango-cs/archiving/server/hdbtdbArchivingServers/src/
- * main/java/TdbArchivingWatcher
- * /Commands/AdminRepot/StartArchivingReportClass.java,v $
- */
diff --git a/src/main/java/TdbArchivingWatcher/Commands/GetAllArchivingAttributesClass.java b/src/main/java/TdbArchivingWatcher/Commands/GetAllArchivingAttributesClass.java
deleted file mode 100644
index ea16f8634abac2d63da2b5422b7f5688129f225b..0000000000000000000000000000000000000000
--- a/src/main/java/TdbArchivingWatcher/Commands/GetAllArchivingAttributesClass.java
+++ /dev/null
@@ -1,124 +0,0 @@
-/**
- * @author  $Author$
- * @version $Revision$
- */
-package TdbArchivingWatcher.Commands;
-
-import org.omg.CORBA.Any;
-
-import TdbArchivingWatcher.TdbArchivingWatcher;
-import fr.esrf.Tango.DevFailed;
-import fr.esrf.Tango.DevState;
-import fr.esrf.Tango.DispLevel;
-import fr.esrf.TangoDs.Command;
-import fr.esrf.TangoDs.DeviceImpl;
-import fr.esrf.TangoDs.Except;
-import fr.esrf.TangoDs.TangoConst;
-import fr.esrf.TangoDs.Util;
-
-/**
- * Class Description:
- * 
- */
-@Deprecated
-public class GetAllArchivingAttributesClass extends Command implements TangoConst {
-    // ===============================================================
-    /**
-     * Constructor for Command class GetErrorDomainsCurrentClass
-     * 
-     * @param name
-     *            command name
-     * @param in
-     *            argin type
-     * @param out
-     *            argout type
-     */
-    // ===============================================================
-    public GetAllArchivingAttributesClass(String name, int in, int out) {
-	super(name, in, out);
-    }
-
-    // ===============================================================
-    /**
-     * Constructor for Command class GetErrorDomainsCurrentClass
-     * 
-     * @param name
-     *            command name
-     * @param in
-     *            argin type
-     * @param in_comments
-     *            argin description
-     * @param out
-     *            argout type
-     * @param out_comments
-     *            argout description
-     */
-    // ===============================================================
-    public GetAllArchivingAttributesClass(String name, int in, int out, String in_comments,
-	    String out_comments) {
-	super(name, in, out, in_comments, out_comments);
-    }
-
-    // ===============================================================
-    /**
-     * Constructor for Command class GetErrorDomainsCurrentClass
-     * 
-     * @param name
-     *            command name
-     * @param in
-     *            argin type
-     * @param in_comments
-     *            argin description
-     * @param out
-     *            argout type
-     * @param out_comments
-     *            argout description
-     * @param level
-     *            The command display type OPERATOR or EXPERT
-     */
-    // ===============================================================
-    public GetAllArchivingAttributesClass(String name, int in, int out, String in_comments,
-	    String out_comments, DispLevel level) {
-	super(name, in, out, in_comments, out_comments, level);
-    }
-
-    // ===============================================================
-    /**
-     * return the result of the device's command.
-     */
-    // ===============================================================
-    @Override
-    public Any execute(DeviceImpl device, Any in_any) throws DevFailed {
-	if (!(device instanceof TdbArchivingWatcher)) {
-	    Except.throw_exception("DEVICE_ERROR",
-		    "Device parameter is not instance of TdbArchivingWatcher",
-		    "TdbArchivingWatcher");
-	}
-
-	Util.out2.println("GetAllArchivingAttributesClass.execute(): arrived");
-	return this.insert(((TdbArchivingWatcher) (device)).get_all_archiving_attributes());
-    }
-
-    // ===============================================================
-    /**
-     * Check if it is allowed to execute the command.
-     */
-    // ===============================================================
-    @Override
-    public boolean is_allowed(DeviceImpl device, Any data_in) {
-	if (device.get_state() == DevState.OFF || device.get_state() == DevState.INIT) {
-	    // End of Generated Code
-
-	    // Re-Start of Generated Code
-	    return false;
-	}
-	return true;
-    }
-}
-// -----------------------------------------------------------------------------
-/*
- * end of $Source:
- * /cvsroot/tango-cs/archiving/server/hdbtdbArchivingServers/src/
- * main/java/TdbArchivingWatcher/Commands/GetAllArchivingAttributesClass.java,v
- * $
- */
diff --git a/src/main/java/TdbArchivingWatcher/Commands/GetErrorArchiversCurrentClass.java b/src/main/java/TdbArchivingWatcher/Commands/GetErrorArchiversCurrentClass.java
deleted file mode 100644
index a951e845efead67cc718c80b8d08c6c1db0403b5..0000000000000000000000000000000000000000
--- a/src/main/java/TdbArchivingWatcher/Commands/GetErrorArchiversCurrentClass.java
+++ /dev/null
@@ -1,160 +0,0 @@
-//+======================================================================
-// $Source$
-//
-// Project:      Tango Device Server
-//
-// Description:  Java source code for the command TemplateClass of the
-//               ArchivingWatcher class.
-//
-// $Author$
-//
-// $Revision$
-//
-// $Log$
-// Revision 1.2  2009/12/17 12:47:15  pierrejoseph
-// CheckStyle:  Organize imports / Format
-//
-// Revision 1.1  2009/08/28 14:27:59  soleilarc
-// add and organize admin report commands to the watcher devices
-//
-// Revision 1.1  2006/08/24 13:52:22  ounsy
-// creation
-//
-// Revision 1.1  2006/01/19 16:36:59  ounsy
-// New device specialised in watching archiving.
-//
-//
-// copyleft :    European Synchrotron Radiation Facility
-//               BP 220, Grenoble 38043
-//               FRANCE
-//
-//-======================================================================
-//
-//  		This file is generated by POGO
-//	(Program Obviously used to Generate tango Object)
-//
-//         (c) - Software Engineering Group - ESRF
-//=============================================================================
-
-/**
- * @author	$Author$
- * @version	$Revision$
- */
-package TdbArchivingWatcher.Commands;
-
-import org.omg.CORBA.Any;
-
-import TdbArchivingWatcher.TdbArchivingWatcher;
-import fr.esrf.Tango.DevFailed;
-import fr.esrf.Tango.DevState;
-import fr.esrf.Tango.DispLevel;
-import fr.esrf.TangoDs.Command;
-import fr.esrf.TangoDs.DeviceImpl;
-import fr.esrf.TangoDs.Except;
-import fr.esrf.TangoDs.TangoConst;
-import fr.esrf.TangoDs.Util;
-
-/**
- * Class Description:
- * 
- */
-@Deprecated
-public class GetErrorArchiversCurrentClass extends Command implements TangoConst {
-    // ===============================================================
-    /**
-     * Constructor for Command class GetErrorArchiversCurrentClass
-     * 
-     * @param name
-     *            command name
-     * @param in
-     *            argin type
-     * @param out
-     *            argout type
-     */
-    // ===============================================================
-    public GetErrorArchiversCurrentClass(String name, int in, int out) {
-	super(name, in, out);
-    }
-
-    // ===============================================================
-    /**
-     * Constructor for Command class GetErrorArchiversCurrentClass
-     * 
-     * @param name
-     *            command name
-     * @param in
-     *            argin type
-     * @param in_comments
-     *            argin description
-     * @param out
-     *            argout type
-     * @param out_comments
-     *            argout description
-     */
-    // ===============================================================
-    public GetErrorArchiversCurrentClass(String name, int in, int out, String in_comments,
-	    String out_comments) {
-	super(name, in, out, in_comments, out_comments);
-    }
-
-    // ===============================================================
-    /**
-     * Constructor for Command class GetErrorArchiversCurrentClass
-     * 
-     * @param name
-     *            command name
-     * @param in
-     *            argin type
-     * @param in_comments
-     *            argin description
-     * @param out
-     *            argout type
-     * @param out_comments
-     *            argout description
-     * @param level
-     *            The command display type OPERATOR or EXPERT
-     */
-    // ===============================================================
-    public GetErrorArchiversCurrentClass(String name, int in, int out, String in_comments,
-	    String out_comments, DispLevel level) {
-	super(name, in, out, in_comments, out_comments, level);
-    }
-
-    // ===============================================================
-    /**
-     * return the result of the device's command.
-     */
-    // ===============================================================
-    @Override
-    public Any execute(DeviceImpl device, Any in_any) throws DevFailed {
-	if (!(device instanceof TdbArchivingWatcher)) {
-	    Except.throw_exception("DEVICE_ERROR",
-		    "Device parameter is not instance of TdbArchivingWatcher",
-		    "TdbArchivingWatcher");
-	}
-	Util.out2.println("GetErrorArchiversCurrentClass.execute(): arrived");
-	return this.insert(((TdbArchivingWatcher) (device)).get_error_archivers_current());
-    }
-
-    // ===============================================================
-    /**
-     * Check if it is allowed to execute the command.
-     */
-    // ===============================================================
-    @Override
-    public boolean is_allowed(DeviceImpl device, Any data_in) {
-	if (device.get_state() == DevState.OFF || device.get_state() == DevState.INIT) {
-	    // End of Generated Code
-
-	    // Re-Start of Generated Code
-	    return false;
-	}
-	return true;
-    }
-}
-// -----------------------------------------------------------------------------
-/*
- * end of $Source:
- * /cvsroot/tango-cs/archiving/server/hdbtdbArchivingServers/src/
- * main/java/TdbArchivingWatcher/Commands/GetErrorArchiversCurrentClass.java,v $
- */
diff --git a/src/main/java/TdbArchivingWatcher/Commands/GetErrorArchiversLatestErrorClass.java b/src/main/java/TdbArchivingWatcher/Commands/GetErrorArchiversLatestErrorClass.java
deleted file mode 100644
index 7e9bb5011b5b6b10e399dfe4cddb171c7f9a41ed..0000000000000000000000000000000000000000
--- a/src/main/java/TdbArchivingWatcher/Commands/GetErrorArchiversLatestErrorClass.java
+++ /dev/null
@@ -1,161 +0,0 @@
-//+======================================================================
-// $Source$
-//
-// Project:      Tango Device Server
-//
-// Description:  Java source code for the command TemplateClass of the
-//               ArchivingWatcher class.
-//
-// $Author$
-//
-// $Revision$
-//
-// $Log$
-// Revision 1.2  2009/12/17 12:47:15  pierrejoseph
-// CheckStyle:  Organize imports / Format
-//
-// Revision 1.1  2009/08/28 14:27:59  soleilarc
-// add and organize admin report commands to the watcher devices
-//
-// Revision 1.1  2006/08/24 13:52:22  ounsy
-// creation
-//
-// Revision 1.1  2006/01/19 16:36:59  ounsy
-// New device specialised in watching archiving.
-//
-//
-// copyleft :    European Synchrotron Radiation Facility
-//               BP 220, Grenoble 38043
-//               FRANCE
-//
-//-======================================================================
-//
-//  		This file is generated by POGO
-//	(Program Obviously used to Generate tango Object)
-//
-//         (c) - Software Engineering Group - ESRF
-//=============================================================================
-
-/**
- * @author	$Author$
- * @version	$Revision$
- */
-package TdbArchivingWatcher.Commands;
-
-import org.omg.CORBA.Any;
-
-import TdbArchivingWatcher.TdbArchivingWatcher;
-import fr.esrf.Tango.DevFailed;
-import fr.esrf.Tango.DevState;
-import fr.esrf.Tango.DispLevel;
-import fr.esrf.TangoDs.Command;
-import fr.esrf.TangoDs.DeviceImpl;
-import fr.esrf.TangoDs.Except;
-import fr.esrf.TangoDs.TangoConst;
-import fr.esrf.TangoDs.Util;
-
-/**
- * Class Description:
- * 
- */
-@Deprecated
-public class GetErrorArchiversLatestErrorClass extends Command implements TangoConst {
-    // ===============================================================
-    /**
-     * Constructor for Command class GetErrorArchiversLatestErrorClass
-     * 
-     * @param name
-     *            command name
-     * @param in
-     *            argin type
-     * @param out
-     *            argout type
-     */
-    // ===============================================================
-    public GetErrorArchiversLatestErrorClass(String name, int in, int out) {
-	super(name, in, out);
-    }
-
-    // ===============================================================
-    /**
-     * Constructor for Command class GetErrorArchiversLatestErrorClass
-     * 
-     * @param name
-     *            command name
-     * @param in
-     *            argin type
-     * @param in_comments
-     *            argin description
-     * @param out
-     *            argout type
-     * @param out_comments
-     *            argout description
-     */
-    // ===============================================================
-    public GetErrorArchiversLatestErrorClass(String name, int in, int out, String in_comments,
-	    String out_comments) {
-	super(name, in, out, in_comments, out_comments);
-    }
-
-    // ===============================================================
-    /**
-     * Constructor for Command class GetErrorArchiversLatestErrorClass
-     * 
-     * @param name
-     *            command name
-     * @param in
-     *            argin type
-     * @param in_comments
-     *            argin description
-     * @param out
-     *            argout type
-     * @param out_comments
-     *            argout description
-     * @param level
-     *            The command display type OPERATOR or EXPERT
-     */
-    // ===============================================================
-    public GetErrorArchiversLatestErrorClass(String name, int in, int out, String in_comments,
-	    String out_comments, DispLevel level) {
-	super(name, in, out, in_comments, out_comments, level);
-    }
-
-    // ===============================================================
-    /**
-     * return the result of the device's command.
-     */
-    // ===============================================================
-    @Override
-    public Any execute(DeviceImpl device, Any in_any) throws DevFailed {
-	if (!(device instanceof TdbArchivingWatcher)) {
-	    Except.throw_exception("DEVICE_ERROR",
-		    "Device parameter is not instance of TdbArchivingWatcher",
-		    "TdbArchivingWatcher");
-	}
-	Util.out2.println("GetErrorArchiversLatestErrorClass.execute(): arrived");
-	return this.insert(((TdbArchivingWatcher) (device)).get_error_archivers_latest_error());
-    }
-
-    // ===============================================================
-    /**
-     * Check if it is allowed to execute the command.
-     */
-    // ===============================================================
-    @Override
-    public boolean is_allowed(DeviceImpl device, Any data_in) {
-	if (device.get_state() == DevState.OFF || device.get_state() == DevState.INIT) {
-	    // End of Generated Code
-
-	    // Re-Start of Generated Code
-	    return false;
-	}
-	return true;
-    }
-}
-// -----------------------------------------------------------------------------
-/*
- * end of $Source:
- * /cvsroot/tango-cs/archiving/server/hdbtdbArchivingServers/src/
- * main/java/TdbArchivingWatcher
- * /Commands/GetErrorArchiversLatestErrorClass.java,v $
- */
diff --git a/src/main/java/TdbArchivingWatcher/Commands/GetErrorDomainsCurrentClass.java b/src/main/java/TdbArchivingWatcher/Commands/GetErrorDomainsCurrentClass.java
deleted file mode 100644
index 16afe5b699c37e2595b8f9cb40098ce4b3132ff1..0000000000000000000000000000000000000000
--- a/src/main/java/TdbArchivingWatcher/Commands/GetErrorDomainsCurrentClass.java
+++ /dev/null
@@ -1,161 +0,0 @@
-//+======================================================================
-// $Source$
-//
-// Project:      Tango Device Server
-//
-// Description:  Java source code for the command TemplateClass of the
-//               ArchivingWatcher class.
-//
-// $Author$
-//
-// $Revision$
-//
-// $Log$
-// Revision 1.2  2009/12/17 12:47:15  pierrejoseph
-// CheckStyle:  Organize imports / Format
-//
-// Revision 1.1  2009/08/28 14:27:59  soleilarc
-// add and organize admin report commands to the watcher devices
-//
-// Revision 1.1  2006/08/24 13:52:22  ounsy
-// creation
-//
-// Revision 1.1  2006/01/19 16:36:59  ounsy
-// New device specialised in watching archiving.
-//
-//
-// copyleft :    European Synchrotron Radiation Facility
-//               BP 220, Grenoble 38043
-//               FRANCE
-//
-//-======================================================================
-//
-//  		This file is generated by POGO
-//	(Program Obviously used to Generate tango Object)
-//
-//         (c) - Software Engineering Group - ESRF
-//=============================================================================
-
-/**
- * @author	$Author$
- * @version	$Revision$
- */
-package TdbArchivingWatcher.Commands;
-
-import org.omg.CORBA.Any;
-
-import TdbArchivingWatcher.TdbArchivingWatcher;
-import fr.esrf.Tango.DevFailed;
-import fr.esrf.Tango.DevState;
-import fr.esrf.Tango.DispLevel;
-import fr.esrf.TangoDs.Command;
-import fr.esrf.TangoDs.DeviceImpl;
-import fr.esrf.TangoDs.Except;
-import fr.esrf.TangoDs.TangoConst;
-import fr.esrf.TangoDs.Util;
-
-/**
- * Class Description:
- * 
- */
-@Deprecated
-public class GetErrorDomainsCurrentClass extends Command implements TangoConst {
-    // ===============================================================
-    /**
-     * Constructor for Command class GetErrorDomainsCurrentClass
-     * 
-     * @param name
-     *            command name
-     * @param in
-     *            argin type
-     * @param out
-     *            argout type
-     */
-    // ===============================================================
-    public GetErrorDomainsCurrentClass(String name, int in, int out) {
-	super(name, in, out);
-    }
-
-    // ===============================================================
-    /**
-     * Constructor for Command class GetErrorDomainsCurrentClass
-     * 
-     * @param name
-     *            command name
-     * @param in
-     *            argin type
-     * @param in_comments
-     *            argin description
-     * @param out
-     *            argout type
-     * @param out_comments
-     *            argout description
-     */
-    // ===============================================================
-    public GetErrorDomainsCurrentClass(String name, int in, int out, String in_comments,
-	    String out_comments) {
-	super(name, in, out, in_comments, out_comments);
-    }
-
-    // ===============================================================
-    /**
-     * Constructor for Command class GetErrorDomainsCurrentClass
-     * 
-     * @param name
-     *            command name
-     * @param in
-     *            argin type
-     * @param in_comments
-     *            argin description
-     * @param out
-     *            argout type
-     * @param out_comments
-     *            argout description
-     * @param level
-     *            The command display type OPERATOR or EXPERT
-     */
-    // ===============================================================
-    public GetErrorDomainsCurrentClass(String name, int in, int out, String in_comments,
-	    String out_comments, DispLevel level) {
-	super(name, in, out, in_comments, out_comments, level);
-    }
-
-    // ===============================================================
-    /**
-     * return the result of the device's command.
-     */
-    // ===============================================================
-    @Override
-    public Any execute(DeviceImpl device, Any in_any) throws DevFailed {
-	if (!(device instanceof TdbArchivingWatcher)) {
-	    Except.throw_exception("DEVICE_ERROR",
-		    "Device parameter is not instance of TdbArchivingWatcher",
-		    "TdbArchivingWatcher");
-	}
-
-	Util.out2.println("GetErrorDomainsCurrentClass.execute(): arrived");
-	return this.insert(((TdbArchivingWatcher) (device)).get_error_domains_current());
-    }
-
-    // ===============================================================
-    /**
-     * Check if it is allowed to execute the command.
-     */
-    // ===============================================================
-    @Override
-    public boolean is_allowed(DeviceImpl device, Any data_in) {
-	if (device.get_state() == DevState.OFF || device.get_state() == DevState.INIT) {
-	    // End of Generated Code
-
-	    // Re-Start of Generated Code
-	    return false;
-	}
-	return true;
-    }
-}
-// -----------------------------------------------------------------------------
-/*
- * end of $Source:
- * /cvsroot/tango-cs/archiving/server/hdbtdbArchivingServers/src/
- * main/java/TdbArchivingWatcher/Commands/GetErrorDomainsCurrentClass.java,v $
- */
diff --git a/src/main/java/TdbArchivingWatcher/Commands/GetErrorDomainsLatestErrorClass.java b/src/main/java/TdbArchivingWatcher/Commands/GetErrorDomainsLatestErrorClass.java
deleted file mode 100644
index 5019a20db34fd5e891df21670c7b4f08846bbe85..0000000000000000000000000000000000000000
--- a/src/main/java/TdbArchivingWatcher/Commands/GetErrorDomainsLatestErrorClass.java
+++ /dev/null
@@ -1,162 +0,0 @@
-//+======================================================================
-// $Source$
-//
-// Project:      Tango Device Server
-//
-// Description:  Java source code for the command TemplateClass of the
-//               ArchivingWatcher class.
-//
-// $Author$
-//
-// $Revision$
-//
-// $Log$
-// Revision 1.2  2009/12/17 12:47:15  pierrejoseph
-// CheckStyle:  Organize imports / Format
-//
-// Revision 1.1  2009/08/28 14:27:59  soleilarc
-// add and organize admin report commands to the watcher devices
-//
-// Revision 1.1  2006/08/24 13:52:22  ounsy
-// creation
-//
-// Revision 1.1  2006/01/19 16:36:59  ounsy
-// New device specialised in watching archiving.
-//
-//
-// copyleft :    European Synchrotron Radiation Facility
-//               BP 220, Grenoble 38043
-//               FRANCE
-//
-//-======================================================================
-//
-//  		This file is generated by POGO
-//	(Program Obviously used to Generate tango Object)
-//
-//         (c) - Software Engineering Group - ESRF
-//=============================================================================
-
-/**
- * @author	$Author$
- * @version	$Revision$
- */
-package TdbArchivingWatcher.Commands;
-
-import org.omg.CORBA.Any;
-
-import TdbArchivingWatcher.TdbArchivingWatcher;
-import fr.esrf.Tango.DevFailed;
-import fr.esrf.Tango.DevState;
-import fr.esrf.Tango.DispLevel;
-import fr.esrf.TangoDs.Command;
-import fr.esrf.TangoDs.DeviceImpl;
-import fr.esrf.TangoDs.Except;
-import fr.esrf.TangoDs.TangoConst;
-import fr.esrf.TangoDs.Util;
-
-/**
- * Class Description:
- * 
- */
-@Deprecated
-public class GetErrorDomainsLatestErrorClass extends Command implements TangoConst {
-    // ===============================================================
-    /**
-     * Constructor for Command class GetErrorDomainsLatestErrorClass
-     * 
-     * @param name
-     *            command name
-     * @param in
-     *            argin type
-     * @param out
-     *            argout type
-     */
-    // ===============================================================
-    public GetErrorDomainsLatestErrorClass(String name, int in, int out) {
-	super(name, in, out);
-    }
-
-    // ===============================================================
-    /**
-     * Constructor for Command class GetErrorDomainsLatestErrorClass
-     * 
-     * @param name
-     *            command name
-     * @param in
-     *            argin type
-     * @param in_comments
-     *            argin description
-     * @param out
-     *            argout type
-     * @param out_comments
-     *            argout description
-     */
-    // ===============================================================
-    public GetErrorDomainsLatestErrorClass(String name, int in, int out, String in_comments,
-	    String out_comments) {
-	super(name, in, out, in_comments, out_comments);
-    }
-
-    // ===============================================================
-    /**
-     * Constructor for Command class GetErrorDomainsLatestErrorClass
-     * 
-     * @param name
-     *            command name
-     * @param in
-     *            argin type
-     * @param in_comments
-     *            argin description
-     * @param out
-     *            argout type
-     * @param out_comments
-     *            argout description
-     * @param level
-     *            The command display type OPERATOR or EXPERT
-     */
-    // ===============================================================
-    public GetErrorDomainsLatestErrorClass(String name, int in, int out, String in_comments,
-	    String out_comments, DispLevel level) {
-	super(name, in, out, in_comments, out_comments, level);
-    }
-
-    // ===============================================================
-    /**
-     * return the result of the device's command.
-     */
-    // ===============================================================
-    @Override
-    public Any execute(DeviceImpl device, Any in_any) throws DevFailed {
-	if (!(device instanceof TdbArchivingWatcher)) {
-	    Except.throw_exception("DEVICE_ERROR",
-		    "Device parameter is not instance of TdbArchivingWatcher",
-		    "TdbArchivingWatcher");
-	}
-
-	Util.out2.println("GetErrorDomainsLatestErrorClass.execute(): arrived");
-	return this.insert(((TdbArchivingWatcher) (device)).get_error_domains_latest_error());
-    }
-
-    // ===============================================================
-    /**
-     * Check if it is allowed to execute the command.
-     */
-    // ===============================================================
-    @Override
-    public boolean is_allowed(DeviceImpl device, Any data_in) {
-	if (device.get_state() == DevState.OFF || device.get_state() == DevState.INIT) {
-	    // End of Generated Code
-
-	    // Re-Start of Generated Code
-	    return false;
-	}
-	return true;
-    }
-}
-// -----------------------------------------------------------------------------
-/*
- * end of $Source:
- * /cvsroot/tango-cs/archiving/server/hdbtdbArchivingServers/src/
- * main/java/TdbArchivingWatcher/Commands/GetErrorDomainsLatestErrorClass.java,v
- * $
- */
diff --git a/src/main/java/TdbArchivingWatcher/Commands/GetErrorsForArchiverCurrentClass.java b/src/main/java/TdbArchivingWatcher/Commands/GetErrorsForArchiverCurrentClass.java
deleted file mode 100644
index 41f3c8cfff2130a9c0b2b087995ee9f28e3eeec6..0000000000000000000000000000000000000000
--- a/src/main/java/TdbArchivingWatcher/Commands/GetErrorsForArchiverCurrentClass.java
+++ /dev/null
@@ -1,164 +0,0 @@
-//+======================================================================
-// $Source$
-//
-// Project:      Tango Device Server
-//
-// Description:  Java source code for the command TemplateClass of the
-//               ArchivingWatcher class.
-//
-// $Author$
-//
-// $Revision$
-//
-// $Log$
-// Revision 1.2  2009/12/17 12:47:15  pierrejoseph
-// CheckStyle:  Organize imports / Format
-//
-// Revision 1.1  2009/08/28 14:27:59  soleilarc
-// add and organize admin report commands to the watcher devices
-//
-// Revision 1.1  2006/08/24 13:52:22  ounsy
-// creation
-//
-// Revision 1.1  2006/01/19 16:36:59  ounsy
-// New device specialised in watching archiving.
-//
-//
-// copyleft :    European Synchrotron Radiation Facility
-//               BP 220, Grenoble 38043
-//               FRANCE
-//
-//-======================================================================
-//
-//  		This file is generated by POGO
-//	(Program Obviously used to Generate tango Object)
-//
-//         (c) - Software Engineering Group - ESRF
-//=============================================================================
-
-/**
- * @author	$Author$
- * @version	$Revision$
- */
-package TdbArchivingWatcher.Commands;
-
-import org.omg.CORBA.Any;
-
-import TdbArchivingWatcher.TdbArchivingWatcher;
-import fr.esrf.Tango.DevFailed;
-import fr.esrf.Tango.DevState;
-import fr.esrf.Tango.DispLevel;
-import fr.esrf.TangoDs.Command;
-import fr.esrf.TangoDs.DeviceImpl;
-import fr.esrf.TangoDs.Except;
-import fr.esrf.TangoDs.TangoConst;
-import fr.esrf.TangoDs.Util;
-
-/**
- * Class Description:
- * 
- */
-@Deprecated
-public class GetErrorsForArchiverCurrentClass extends Command implements TangoConst {
-    // ===============================================================
-    /**
-     * Constructor for Command class GetErrorsForArchiverCurrentClass
-     * 
-     * @param name
-     *            command name
-     * @param in
-     *            argin type
-     * @param out
-     *            argout type
-     */
-    // ===============================================================
-    public GetErrorsForArchiverCurrentClass(String name, int in, int out) {
-	super(name, in, out);
-    }
-
-    // ===============================================================
-    /**
-     * Constructor for Command class GetErrorsForArchiverCurrentClass
-     * 
-     * @param name
-     *            command name
-     * @param in
-     *            argin type
-     * @param in_comments
-     *            argin description
-     * @param out
-     *            argout type
-     * @param out_comments
-     *            argout description
-     */
-    // ===============================================================
-    public GetErrorsForArchiverCurrentClass(String name, int in, int out, String in_comments,
-	    String out_comments) {
-	super(name, in, out, in_comments, out_comments);
-    }
-
-    // ===============================================================
-    /**
-     * Constructor for Command class GetErrorsForArchiverCurrentClass
-     * 
-     * @param name
-     *            command name
-     * @param in
-     *            argin type
-     * @param in_comments
-     *            argin description
-     * @param out
-     *            argout type
-     * @param out_comments
-     *            argout description
-     * @param level
-     *            The command display type OPERATOR or EXPERT
-     */
-    // ===============================================================
-    public GetErrorsForArchiverCurrentClass(String name, int in, int out, String in_comments,
-	    String out_comments, DispLevel level) {
-	super(name, in, out, in_comments, out_comments, level);
-    }
-
-    // ===============================================================
-    /**
-     * return the result of the device's command.
-     */
-    // ===============================================================
-    @Override
-    public Any execute(DeviceImpl device, Any in_any) throws DevFailed {
-	if (!(device instanceof TdbArchivingWatcher)) {
-	    Except.throw_exception("DEVICE_ERROR",
-		    "Device parameter is not instance of TdbArchivingWatcher",
-		    "TdbArchivingWatcher");
-	}
-
-	Util.out2.println("GetErrorsForArchiverCurrentClass.execute(): arrived");
-	String argin = this.extract_DevString(in_any);
-	return this.insert(((TdbArchivingWatcher) (device))
-		.get_errors_for_archiver_latest_error(argin));
-    }
-
-    // ===============================================================
-    /**
-     * Check if it is allowed to execute the command.
-     */
-    // ===============================================================
-    @Override
-    public boolean is_allowed(DeviceImpl device, Any data_in) {
-	if (device.get_state() == DevState.OFF || device.get_state() == DevState.INIT) {
-	    // End of Generated Code
-
-	    // Re-Start of Generated Code
-	    return false;
-	}
-	return true;
-    }
-}
-// -----------------------------------------------------------------------------
-/*
- * end of $Source:
- * /cvsroot/tango-cs/archiving/server/hdbtdbArchivingServers/src/
- * main/java/TdbArchivingWatcher
- * /Commands/GetErrorsForArchiverCurrentClass.java,v $
- */
diff --git a/src/main/java/TdbArchivingWatcher/Commands/GetErrorsForArchiverLatestErrorClass.java b/src/main/java/TdbArchivingWatcher/Commands/GetErrorsForArchiverLatestErrorClass.java
deleted file mode 100644
index 5e16d8ceeeb88ae7319fc574c4da610fb2743a8b..0000000000000000000000000000000000000000
--- a/src/main/java/TdbArchivingWatcher/Commands/GetErrorsForArchiverLatestErrorClass.java
+++ /dev/null
@@ -1,126 +0,0 @@
-/**
- * @author	$Author$
- * @version	$Revision$
- */
-package TdbArchivingWatcher.Commands;
-
-import org.omg.CORBA.Any;
-
-import TdbArchivingWatcher.TdbArchivingWatcher;
-import fr.esrf.Tango.DevFailed;
-import fr.esrf.Tango.DevState;
-import fr.esrf.Tango.DispLevel;
-import fr.esrf.TangoDs.Command;
-import fr.esrf.TangoDs.DeviceImpl;
-import fr.esrf.TangoDs.Except;
-import fr.esrf.TangoDs.TangoConst;
-import fr.esrf.TangoDs.Util;
-
-/**
- * Class Description:
- * 
- */
-@Deprecated
-public class GetErrorsForArchiverLatestErrorClass extends Command implements TangoConst {
-    // ===============================================================
-    /**
-     * Constructor for Command class GetErrorsForArchiverCurrentClass
-     * 
-     * @param name
-     *            command name
-     * @param in
-     *            argin type
-     * @param out
-     *            argout type
-     */
-    // ===============================================================
-    public GetErrorsForArchiverLatestErrorClass(String name, int in, int out) {
-	super(name, in, out);
-    }
-
-    // ===============================================================
-    /**
-     * Constructor for Command class GetErrorsForArchiverCurrentClass
-     * 
-     * @param name
-     *            command name
-     * @param in
-     *            argin type
-     * @param in_comments
-     *            argin description
-     * @param out
-     *            argout type
-     * @param out_comments
-     *            argout description
-     */
-    // ===============================================================
-    public GetErrorsForArchiverLatestErrorClass(String name, int in, int out, String in_comments,
-	    String out_comments) {
-	super(name, in, out, in_comments, out_comments);
-    }
-
-    // ===============================================================
-    /**
-     * Constructor for Command class GetErrorsForArchiverCurrentClass
-     * 
-     * @param name
-     *            command name
-     * @param in
-     *            argin type
-     * @param in_comments
-     *            argin description
-     * @param out
-     *            argout type
-     * @param out_comments
-     *            argout description
-     * @param level
-     *            The command display type OPERATOR or EXPERT
-     */
-    // ===============================================================
-    public GetErrorsForArchiverLatestErrorClass(String name, int in, int out, String in_comments,
-	    String out_comments, DispLevel level) {
-	super(name, in, out, in_comments, out_comments, level);
-    }
-
-    // ===============================================================
-    /**
-     * return the result of the device's command.
-     */
-    // ===============================================================
-    @Override
-    public Any execute(DeviceImpl device, Any in_any) throws DevFailed {
-	if (!(device instanceof TdbArchivingWatcher)) {
-	    Except.throw_exception("DEVICE_ERROR",
-		    "Device parameter is not instance of TdbArchivingWatcher",
-		    "TdbArchivingWatcher");
-	}
-
-	Util.out2.println("GetErrorsForArchiverCurrentClass.execute(): arrived");
-	String argin = this.extract_DevString(in_any);
-	return this.insert(((TdbArchivingWatcher) (device))
-		.get_errors_for_archiver_latest_error(argin));
-    }
-
-    // ===============================================================
-    /**
-     * Check if it is allowed to execute the command.
-     */
-    // ===============================================================
-    @Override
-    public boolean is_allowed(DeviceImpl device, Any data_in) {
-	if (device.get_state() == DevState.OFF || device.get_state() == DevState.INIT) {
-	    // End of Generated Code
-
-	    // Re-Start of Generated Code
-	    return false;
-	}
-	return true;
-    }
-}
-// -----------------------------------------------------------------------------
-/*
- * end of $Source:
- * /cvsroot/tango-cs/archiving/server/hdbtdbArchivingServers/src/
- * main/java/TdbArchivingWatcher
- * /Commands/GetErrorsForArchiverLatestErrorClass.java,v $
- */
diff --git a/src/main/java/TdbArchivingWatcher/Commands/GetErrorsForAttributeCurrentClass.java b/src/main/java/TdbArchivingWatcher/Commands/GetErrorsForAttributeCurrentClass.java
deleted file mode 100644
index 0b8d3c738681058790215330aac27d23a6ec6d06..0000000000000000000000000000000000000000
--- a/src/main/java/TdbArchivingWatcher/Commands/GetErrorsForAttributeCurrentClass.java
+++ /dev/null
@@ -1,163 +0,0 @@
-//+======================================================================
-// $Source$
-//
-// Project:      Tango Device Server
-//
-// Description:  Java source code for the command TemplateClass of the
-//               ArchivingWatcher class.
-//
-// $Author$
-//
-// $Revision$
-//
-// $Log$
-// Revision 1.2  2009/12/17 12:47:15  pierrejoseph
-// CheckStyle:  Organize imports / Format
-//
-// Revision 1.1  2009/08/28 14:27:59  soleilarc
-// add and organize admin report commands to the watcher devices
-//
-// Revision 1.1  2006/08/24 13:52:22  ounsy
-// creation
-//
-// Revision 1.1  2006/01/19 16:36:59  ounsy
-// New device specialised in watching archiving.
-//
-//
-// copyleft :    European Synchrotron Radiation Facility
-//               BP 220, Grenoble 38043
-//               FRANCE
-//
-//-======================================================================
-//
-//  		This file is generated by POGO
-//	(Program Obviously used to Generate tango Object)
-//
-//         (c) - Software Engineering Group - ESRF
-//=============================================================================
-
-/**
- * @author	$Author$
- * @version	$Revision$
- */
-package TdbArchivingWatcher.Commands;
-
-import org.omg.CORBA.Any;
-
-import TdbArchivingWatcher.TdbArchivingWatcher;
-import fr.esrf.Tango.DevFailed;
-import fr.esrf.Tango.DevState;
-import fr.esrf.Tango.DispLevel;
-import fr.esrf.TangoDs.Command;
-import fr.esrf.TangoDs.DeviceImpl;
-import fr.esrf.TangoDs.Except;
-import fr.esrf.TangoDs.TangoConst;
-import fr.esrf.TangoDs.Util;
-
-/**
- * Class Description:
- * 
- */
-@Deprecated
-public class GetErrorsForAttributeCurrentClass extends Command implements TangoConst {
-    // ===============================================================
-    /**
-     * Constructor for Command class GetErrorsForAttributeCurrentClass
-     * 
-     * @param name
-     *            command name
-     * @param in
-     *            argin type
-     * @param out
-     *            argout type
-     */
-    // ===============================================================
-    public GetErrorsForAttributeCurrentClass(String name, int in, int out) {
-	super(name, in, out);
-    }
-
-    // ===============================================================
-    /**
-     * Constructor for Command class GetErrorsForAttributeCurrentClass
-     * 
-     * @param name
-     *            command name
-     * @param in
-     *            argin type
-     * @param in_comments
-     *            argin description
-     * @param out
-     *            argout type
-     * @param out_comments
-     *            argout description
-     */
-    // ===============================================================
-    public GetErrorsForAttributeCurrentClass(String name, int in, int out, String in_comments,
-	    String out_comments) {
-	super(name, in, out, in_comments, out_comments);
-    }
-
-    // ===============================================================
-    /**
-     * Constructor for Command class GetErrorsForAttributeCurrentClass
-     * 
-     * @param name
-     *            command name
-     * @param in
-     *            argin type
-     * @param in_comments
-     *            argin description
-     * @param out
-     *            argout type
-     * @param out_comments
-     *            argout description
-     * @param level
-     *            The command display type OPERATOR or EXPERT
-     */
-    // ===============================================================
-    public GetErrorsForAttributeCurrentClass(String name, int in, int out, String in_comments,
-	    String out_comments, DispLevel level) {
-	super(name, in, out, in_comments, out_comments, level);
-    }
-
-    // ===============================================================
-    /**
-     * return the result of the device's command.
-     */
-    // ===============================================================
-    @Override
-    public Any execute(DeviceImpl device, Any in_any) throws DevFailed {
-	if (!(device instanceof TdbArchivingWatcher)) {
-	    Except.throw_exception("DEVICE_ERROR",
-		    "Device parameter is not instance of TdbArchivingWatcher",
-		    "TdbArchivingWatcher");
-	}
-	Util.out2.println("GetErrorsForAttributeCurrentClass.execute(): arrived");
-	String argin = this.extract_DevString(in_any);
-	return this
-		.insert(((TdbArchivingWatcher) (device)).get_errors_for_attribute_current(argin));
-    }
-
-    // ===============================================================
-    /**
-     * Check if it is allowed to execute the command.
-     */
-    // ===============================================================
-    @Override
-    public boolean is_allowed(DeviceImpl device, Any data_in) {
-	if (device.get_state() == DevState.OFF || device.get_state() == DevState.INIT) {
-	    // End of Generated Code
-
-	    // Re-Start of Generated Code
-	    return false;
-	}
-	return true;
-    }
-}
-// -----------------------------------------------------------------------------
-/*
- * end of $Source:
- * /cvsroot/tango-cs/archiving/server/hdbtdbArchivingServers/src/
- * main/java/TdbArchivingWatcher
- * /Commands/GetErrorsForAttributeCurrentClass.java,v $
- */
diff --git a/src/main/java/TdbArchivingWatcher/Commands/GetErrorsForAttributeLatestErrorClass.java b/src/main/java/TdbArchivingWatcher/Commands/GetErrorsForAttributeLatestErrorClass.java
deleted file mode 100644
index de784a0678c0d775dc2c7f5378b41c60b339ead7..0000000000000000000000000000000000000000
--- a/src/main/java/TdbArchivingWatcher/Commands/GetErrorsForAttributeLatestErrorClass.java
+++ /dev/null
@@ -1,164 +0,0 @@
-//+======================================================================
-// $Source$
-//
-// Project:      Tango Device Server
-//
-// Description:  Java source code for the command TemplateClass of the
-//               ArchivingWatcher class.
-//
-// $Author$
-//
-// $Revision$
-//
-// $Log$
-// Revision 1.2  2009/12/17 12:47:15  pierrejoseph
-// CheckStyle:  Organize imports / Format
-//
-// Revision 1.1  2009/08/28 14:27:59  soleilarc
-// add and organize admin report commands to the watcher devices
-//
-// Revision 1.1  2006/08/24 13:52:22  ounsy
-// creation
-//
-// Revision 1.1  2006/01/19 16:36:59  ounsy
-// New device specialised in watching archiving.
-//
-//
-// copyleft :    European Synchrotron Radiation Facility
-//               BP 220, Grenoble 38043
-//               FRANCE
-//
-//-======================================================================
-//
-//  		This file is generated by POGO
-//	(Program Obviously used to Generate tango Object)
-//
-//         (c) - Software Engineering Group - ESRF
-//=============================================================================
-
-/**
- * @author	$Author$
- * @version	$Revision$
- */
-package TdbArchivingWatcher.Commands;
-
-import org.omg.CORBA.Any;
-
-import TdbArchivingWatcher.TdbArchivingWatcher;
-import fr.esrf.Tango.DevFailed;
-import fr.esrf.Tango.DevState;
-import fr.esrf.Tango.DispLevel;
-import fr.esrf.TangoDs.Command;
-import fr.esrf.TangoDs.DeviceImpl;
-import fr.esrf.TangoDs.Except;
-import fr.esrf.TangoDs.TangoConst;
-import fr.esrf.TangoDs.Util;
-
-/**
- * Class Description:
- * 
- */
-@Deprecated
-public class GetErrorsForAttributeLatestErrorClass extends Command implements TangoConst {
-    // ===============================================================
-    /**
-     * Constructor for Command class GetErrorsForAttributeLatestErrorClass
-     * 
-     * @param name
-     *            command name
-     * @param in
-     *            argin type
-     * @param out
-     *            argout type
-     */
-    // ===============================================================
-    public GetErrorsForAttributeLatestErrorClass(String name, int in, int out) {
-	super(name, in, out);
-    }
-
-    // ===============================================================
-    /**
-     * Constructor for Command class GetErrorsForAttributeLatestErrorClass
-     * 
-     * @param name
-     *            command name
-     * @param in
-     *            argin type
-     * @param in_comments
-     *            argin description
-     * @param out
-     *            argout type
-     * @param out_comments
-     *            argout description
-     */
-    // ===============================================================
-    public GetErrorsForAttributeLatestErrorClass(String name, int in, int out, String in_comments,
-	    String out_comments) {
-	super(name, in, out, in_comments, out_comments);
-    }
-
-    // ===============================================================
-    /**
-     * Constructor for Command class GetErrorsForAttributeLatestErrorClass
-     * 
-     * @param name
-     *            command name
-     * @param in
-     *            argin type
-     * @param in_comments
-     *            argin description
-     * @param out
-     *            argout type
-     * @param out_comments
-     *            argout description
-     * @param level
-     *            The command display type OPERATOR or EXPERT
-     */
-    // ===============================================================
-    public GetErrorsForAttributeLatestErrorClass(String name, int in, int out, String in_comments,
-	    String out_comments, DispLevel level) {
-	super(name, in, out, in_comments, out_comments, level);
-    }
-
-    // ===============================================================
-    /**
-     * return the result of the device's command.
-     */
-    // ===============================================================
-    @Override
-    public Any execute(DeviceImpl device, Any in_any) throws DevFailed {
-	if (!(device instanceof TdbArchivingWatcher)) {
-	    Except.throw_exception("DEVICE_ERROR",
-		    "Device parameter is not instance of TdbArchivingWatcher",
-		    "TdbArchivingWatcher");
-	}
-
-	Util.out2.println("GetErrorsForAttributeLatestErrorClass.execute(): arrived");
-	String argin = this.extract_DevString(in_any);
-	return this.insert(((TdbArchivingWatcher) (device))
-		.get_errors_for_attribute_latest_error(argin));
-    }
-
-    // ===============================================================
-    /**
-     * Check if it is allowed to execute the command.
-     */
-    // ===============================================================
-    @Override
-    public boolean is_allowed(DeviceImpl device, Any data_in) {
-	if (device.get_state() == DevState.OFF || device.get_state() == DevState.INIT) {
-	    // End of Generated Code
-
-	    // Re-Start of Generated Code
-	    return false;
-	}
-	return true;
-    }
-}
-// -----------------------------------------------------------------------------
-/*
- * end of $Source:
- * /cvsroot/tango-cs/archiving/server/hdbtdbArchivingServers/src/
- * main/java/TdbArchivingWatcher
- * /Commands/GetErrorsForAttributeLatestErrorClass.java,v $
- */
diff --git a/src/main/java/TdbArchivingWatcher/Commands/GetErrorsForDomainCurrentClass.java b/src/main/java/TdbArchivingWatcher/Commands/GetErrorsForDomainCurrentClass.java
deleted file mode 100644
index 176344ce3a57f689aba54fd3cdb4f101314fcc42..0000000000000000000000000000000000000000
--- a/src/main/java/TdbArchivingWatcher/Commands/GetErrorsForDomainCurrentClass.java
+++ /dev/null
@@ -1,162 +0,0 @@
-//+======================================================================
-// $Source$
-//
-// Project:      Tango Device Server
-//
-// Description:  Java source code for the command TemplateClass of the
-//               ArchivingWatcher class.
-//
-// $Author$
-//
-// $Revision$
-//
-// $Log$
-// Revision 1.2  2009/12/17 12:47:15  pierrejoseph
-// CheckStyle:  Organize imports / Format
-//
-// Revision 1.1  2009/08/28 14:27:59  soleilarc
-// add and organize admin report commands to the watcher devices
-//
-// Revision 1.1  2006/08/24 13:52:22  ounsy
-// creation
-//
-// Revision 1.1  2006/01/19 16:36:59  ounsy
-// New device specialised in watching archiving.
-//
-//
-// copyleft :    European Synchrotron Radiation Facility
-//               BP 220, Grenoble 38043
-//               FRANCE
-//
-//-======================================================================
-//
-//  		This file is generated by POGO
-//	(Program Obviously used to Generate tango Object)
-//
-//         (c) - Software Engineering Group - ESRF
-//=============================================================================
-
-/**
- * @author	$Author$
- * @version	$Revision$
- */
-package TdbArchivingWatcher.Commands;
-
-import org.omg.CORBA.Any;
-
-import TdbArchivingWatcher.TdbArchivingWatcher;
-import fr.esrf.Tango.DevFailed;
-import fr.esrf.Tango.DevState;
-import fr.esrf.Tango.DispLevel;
-import fr.esrf.TangoDs.Command;
-import fr.esrf.TangoDs.DeviceImpl;
-import fr.esrf.TangoDs.Except;
-import fr.esrf.TangoDs.TangoConst;
-import fr.esrf.TangoDs.Util;
-
-/**
- * Class Description:
- * 
- */
-@Deprecated
-public class GetErrorsForDomainCurrentClass extends Command implements TangoConst {
-    // ===============================================================
-    /**
-     * Constructor for Command class GetErrorsForDomainCurrentClass
-     * 
-     * @param name
-     *            command name
-     * @param in
-     *            argin type
-     * @param out
-     *            argout type
-     */
-    // ===============================================================
-    public GetErrorsForDomainCurrentClass(String name, int in, int out) {
-	super(name, in, out);
-    }
-
-    // ===============================================================
-    /**
-     * Constructor for Command class GetErrorsForDomainCurrentClass
-     * 
-     * @param name
-     *            command name
-     * @param in
-     *            argin type
-     * @param in_comments
-     *            argin description
-     * @param out
-     *            argout type
-     * @param out_comments
-     *            argout description
-     */
-    // ===============================================================
-    public GetErrorsForDomainCurrentClass(String name, int in, int out, String in_comments,
-	    String out_comments) {
-	super(name, in, out, in_comments, out_comments);
-    }
-
-    // ===============================================================
-    /**
-     * Constructor for Command class GetErrorsForDomainCurrentClass
-     * 
-     * @param name
-     *            command name
-     * @param in
-     *            argin type
-     * @param in_comments
-     *            argin description
-     * @param out
-     *            argout type
-     * @param out_comments
-     *            argout description
-     * @param level
-     *            The command display type OPERATOR or EXPERT
-     */
-    // ===============================================================
-    public GetErrorsForDomainCurrentClass(String name, int in, int out, String in_comments,
-	    String out_comments, DispLevel level) {
-	super(name, in, out, in_comments, out_comments, level);
-    }
-
-    // ===============================================================
-    /**
-     * return the result of the device's command.
-     */
-    // ===============================================================
-    @Override
-    public Any execute(DeviceImpl device, Any in_any) throws DevFailed {
-	if (!(device instanceof TdbArchivingWatcher)) {
-	    Except.throw_exception("DEVICE_ERROR",
-		    "Device parameter is not instance of TdbArchivingWatcher",
-		    "TdbArchivingWatcher");
-	}
-	Util.out2.println("GetErrorsForDomainCurrentClass.execute(): arrived");
-	String argin = this.extract_DevString(in_any);
-	return this.insert(((TdbArchivingWatcher) (device)).get_errors_for_domain_current(argin));
-    }
-
-    // ===============================================================
-    /**
-     * Check if it is allowed to execute the command.
-     */
-    // ===============================================================
-    @Override
-    public boolean is_allowed(DeviceImpl device, Any data_in) {
-	if (device.get_state() == DevState.OFF || device.get_state() == DevState.INIT) {
-	    // End of Generated Code
-
-	    // Re-Start of Generated Code
-	    return false;
-	}
-	return true;
-    }
-}
-// -----------------------------------------------------------------------------
-/*
- * end of $Source:
- * /cvsroot/tango-cs/archiving/server/hdbtdbArchivingServers/src/
- * main/java/TdbArchivingWatcher/Commands/GetErrorsForDomainCurrentClass.java,v
- * $
- */
diff --git a/src/main/java/TdbArchivingWatcher/Commands/GetErrorsForDomainLatestErrorClass.java b/src/main/java/TdbArchivingWatcher/Commands/GetErrorsForDomainLatestErrorClass.java
deleted file mode 100644
index b55780d457230825086a4a47e7ed23acebfdf9dd..0000000000000000000000000000000000000000
--- a/src/main/java/TdbArchivingWatcher/Commands/GetErrorsForDomainLatestErrorClass.java
+++ /dev/null
@@ -1,164 +0,0 @@
-//+======================================================================
-// $Source$
-//
-// Project:      Tango Device Server
-//
-// Description:  Java source code for the command TemplateClass of the
-//               ArchivingWatcher class.
-//
-// $Author$
-//
-// $Revision$
-//
-// $Log$
-// Revision 1.2  2009/12/17 12:47:15  pierrejoseph
-// CheckStyle:  Organize imports / Format
-//
-// Revision 1.1  2009/08/28 14:27:59  soleilarc
-// add and organize admin report commands to the watcher devices
-//
-// Revision 1.1  2006/08/24 13:52:22  ounsy
-// creation
-//
-// Revision 1.1  2006/01/19 16:36:59  ounsy
-// New device specialised in watching archiving.
-//
-//
-// copyleft :    European Synchrotron Radiation Facility
-//               BP 220, Grenoble 38043
-//               FRANCE
-//
-//-======================================================================
-//
-//  		This file is generated by POGO
-//	(Program Obviously used to Generate tango Object)
-//
-//         (c) - Software Engineering Group - ESRF
-//=============================================================================
-
-/**
- * @author	$Author$
- * @version	$Revision$
- */
-package TdbArchivingWatcher.Commands;
-
-import org.omg.CORBA.Any;
-
-import TdbArchivingWatcher.TdbArchivingWatcher;
-import fr.esrf.Tango.DevFailed;
-import fr.esrf.Tango.DevState;
-import fr.esrf.Tango.DispLevel;
-import fr.esrf.TangoDs.Command;
-import fr.esrf.TangoDs.DeviceImpl;
-import fr.esrf.TangoDs.Except;
-import fr.esrf.TangoDs.TangoConst;
-import fr.esrf.TangoDs.Util;
-
-/**
- * Class Description:
- * 
- */
-@Deprecated
-public class GetErrorsForDomainLatestErrorClass extends Command implements TangoConst {
-    // ===============================================================
-    /**
-     * Constructor for Command class GetErrorsForDomainLatestErrorClass
-     * 
-     * @param name
-     *            command name
-     * @param in
-     *            argin type
-     * @param out
-     *            argout type
-     */
-    // ===============================================================
-    public GetErrorsForDomainLatestErrorClass(String name, int in, int out) {
-	super(name, in, out);
-    }
-
-    // ===============================================================
-    /**
-     * Constructor for Command class GetErrorsForDomainLatestErrorClass
-     * 
-     * @param name
-     *            command name
-     * @param in
-     *            argin type
-     * @param in_comments
-     *            argin description
-     * @param out
-     *            argout type
-     * @param out_comments
-     *            argout description
-     */
-    // ===============================================================
-    public GetErrorsForDomainLatestErrorClass(String name, int in, int out, String in_comments,
-	    String out_comments) {
-	super(name, in, out, in_comments, out_comments);
-    }
-
-    // ===============================================================
-    /**
-     * Constructor for Command class GetErrorsForDomainLatestErrorClass
-     * 
-     * @param name
-     *            command name
-     * @param in
-     *            argin type
-     * @param in_comments
-     *            argin description
-     * @param out
-     *            argout type
-     * @param out_comments
-     *            argout description
-     * @param level
-     *            The command display type OPERATOR or EXPERT
-     */
-    // ===============================================================
-    public GetErrorsForDomainLatestErrorClass(String name, int in, int out, String in_comments,
-	    String out_comments, DispLevel level) {
-	super(name, in, out, in_comments, out_comments, level);
-    }
-
-    // ===============================================================
-    /**
-     * return the result of the device's command.
-     */
-    // ===============================================================
-    @Override
-    public Any execute(DeviceImpl device, Any in_any) throws DevFailed {
-	if (!(device instanceof TdbArchivingWatcher)) {
-	    Except.throw_exception("DEVICE_ERROR",
-		    "Device parameter is not instance of TdbArchivingWatcher",
-		    "TdbArchivingWatcher");
-	}
-
-	Util.out2.println("GetErrorsForDomainLatestErrorClass.execute(): arrived");
-	String argin = this.extract_DevString(in_any);
-	return this.insert(((TdbArchivingWatcher) (device))
-		.get_errors_for_domain_latest_error(argin));
-    }
-
-    // ===============================================================
-    /**
-     * Check if it is allowed to execute the command.
-     */
-    // ===============================================================
-    @Override
-    public boolean is_allowed(DeviceImpl device, Any data_in) {
-	if (device.get_state() == DevState.OFF || device.get_state() == DevState.INIT) {
-	    // End of Generated Code
-
-	    // Re-Start of Generated Code
-	    return false;
-	}
-	return true;
-    }
-}
-// -----------------------------------------------------------------------------
-/*
- * end of $Source:
- * /cvsroot/tango-cs/archiving/server/hdbtdbArchivingServers/src/
- * main/java/TdbArchivingWatcher
- * /Commands/GetErrorsForDomainLatestErrorClass.java,v $
- */
diff --git a/src/main/java/TdbArchivingWatcher/Commands/GetReportCurrentClass.java b/src/main/java/TdbArchivingWatcher/Commands/GetReportCurrentClass.java
deleted file mode 100644
index e5257880c080c5d3a58af9f22b2bef7de8f441bf..0000000000000000000000000000000000000000
--- a/src/main/java/TdbArchivingWatcher/Commands/GetReportCurrentClass.java
+++ /dev/null
@@ -1,164 +0,0 @@
-//+======================================================================
-// $Source$
-//
-// Project:      Tango Device Server
-//
-// Description:  Java source code for the command TemplateClass of the
-//               ArchivingWatcher class.
-//
-// $Author$
-//
-// $Revision$
-//
-// $Log$
-// Revision 1.2  2009/12/17 12:47:15  pierrejoseph
-// CheckStyle:  Organize imports / Format
-//
-// Revision 1.1  2009/08/28 14:27:59  soleilarc
-// add and organize admin report commands to the watcher devices
-//
-// Revision 1.1  2006/08/24 13:52:23  ounsy
-// creation
-//
-// Revision 1.2  2006/01/27 13:08:35  ounsy
-// small changes
-//
-// Revision 1.1  2006/01/19 16:36:59  ounsy
-// New device specialised in watching archiving.
-//
-//
-// copyleft :    European Synchrotron Radiation Facility
-//               BP 220, Grenoble 38043
-//               FRANCE
-//
-//-======================================================================
-//
-//  		This file is generated by POGO
-//	(Program Obviously used to Generate tango Object)
-//
-//         (c) - Software Engineering Group - ESRF
-//=============================================================================
-
-/**
- * @author	$Author$
- * @version	$Revision$
- */
-package TdbArchivingWatcher.Commands;
-
-import org.omg.CORBA.Any;
-
-import TdbArchivingWatcher.TdbArchivingWatcher;
-import fr.esrf.Tango.DevFailed;
-import fr.esrf.Tango.DevState;
-import fr.esrf.Tango.DispLevel;
-import fr.esrf.TangoDs.Command;
-import fr.esrf.TangoDs.DeviceImpl;
-import fr.esrf.TangoDs.Except;
-import fr.esrf.TangoDs.TangoConst;
-import fr.esrf.TangoDs.Util;
-
-/**
- * Class Description:
- * 
- */
-@Deprecated
-public class GetReportCurrentClass extends Command implements TangoConst {
-    // ===============================================================
-    /**
-     * Constructor for Command class GetReportCurrentClass
-     * 
-     * @param name
-     *            command name
-     * @param in
-     *            argin type
-     * @param out
-     *            argout type
-     */
-    // ===============================================================
-    public GetReportCurrentClass(String name, int in, int out) {
-	super(name, in, out);
-    }
-
-    // ===============================================================
-    /**
-     * Constructor for Command class GetReportCurrentClass
-     * 
-     * @param name
-     *            command name
-     * @param in
-     *            argin type
-     * @param in_comments
-     *            argin description
-     * @param out
-     *            argout type
-     * @param out_comments
-     *            argout description
-     */
-    // ===============================================================
-    public GetReportCurrentClass(String name, int in, int out, String in_comments,
-	    String out_comments) {
-	super(name, in, out, in_comments, out_comments);
-    }
-
-    // ===============================================================
-    /**
-     * Constructor for Command class GetReportCurrentClass
-     * 
-     * @param name
-     *            command name
-     * @param in
-     *            argin type
-     * @param in_comments
-     *            argin description
-     * @param out
-     *            argout type
-     * @param out_comments
-     *            argout description
-     * @param level
-     *            The command display type OPERATOR or EXPERT
-     */
-    // ===============================================================
-    public GetReportCurrentClass(String name, int in, int out, String in_comments,
-	    String out_comments, DispLevel level) {
-	super(name, in, out, in_comments, out_comments, level);
-    }
-
-    // ===============================================================
-    /**
-     * return the result of the device's command.
-     */
-    // ===============================================================
-    @Override
-    public Any execute(DeviceImpl device, Any in_any) throws DevFailed {
-	if (!(device instanceof TdbArchivingWatcher)) {
-	    Except.throw_exception("DEVICE_ERROR",
-		    "Device parameter is not instance of TdbArchivingWatcher",
-		    "TdbArchivingWatcher");
-	}
-
-	Util.out2.println("GetReportCurrentClass.execute(): arrived");
-	return this.insert(((TdbArchivingWatcher) (device)).get_report_current());
-    }
-
-    // ===============================================================
-    /**
-     * Check if it is allowed to execute the command.
-     */
-    // ===============================================================
-    @Override
-    public boolean is_allowed(DeviceImpl device, Any data_in) {
-	if (device.get_state() == DevState.OFF || device.get_state() == DevState.INIT) {
-	    // End of Generated Code
-
-	    // Re-Start of Generated Code
-	    return false;
-	}
-	return true;
-    }
-}
-// -----------------------------------------------------------------------------
-/*
- * end of $Source:
- * /cvsroot/tango-cs/archiving/server/hdbtdbArchivingServers/src/
- * main/java/TdbArchivingWatcher/Commands/GetReportCurrentClass.java,v $
- */
diff --git a/src/main/java/TdbArchivingWatcher/Commands/GetReportLatestErrorClass.java b/src/main/java/TdbArchivingWatcher/Commands/GetReportLatestErrorClass.java
deleted file mode 100644
index 1e223bb953c3ba1c710b599804df1c7a9816e723..0000000000000000000000000000000000000000
--- a/src/main/java/TdbArchivingWatcher/Commands/GetReportLatestErrorClass.java
+++ /dev/null
@@ -1,164 +0,0 @@
-//+======================================================================
-// $Source$
-//
-// Project:      Tango Device Server
-//
-// Description:  Java source code for the command TemplateClass of the
-//               ArchivingWatcher class.
-//
-// $Author$
-//
-// $Revision$
-//
-// $Log$
-// Revision 1.2  2009/12/17 12:47:15  pierrejoseph
-// CheckStyle:  Organize imports / Format
-//
-// Revision 1.1  2009/08/28 14:27:59  soleilarc
-// add and organize admin report commands to the watcher devices
-//
-// Revision 1.1  2006/08/24 13:52:22  ounsy
-// creation
-//
-// Revision 1.2  2006/01/27 13:08:35  ounsy
-// small changes
-//
-// Revision 1.1  2006/01/19 16:36:59  ounsy
-// New device specialised in watching archiving.
-//
-//
-// copyleft :    European Synchrotron Radiation Facility
-//               BP 220, Grenoble 38043
-//               FRANCE
-//
-//-======================================================================
-//
-//  		This file is generated by POGO
-//	(Program Obviously used to Generate tango Object)
-//
-//         (c) - Software Engineering Group - ESRF
-//=============================================================================
-
-/**
- * @author	$Author$
- * @version	$Revision$
- */
-package TdbArchivingWatcher.Commands;
-
-import org.omg.CORBA.Any;
-
-import TdbArchivingWatcher.TdbArchivingWatcher;
-import fr.esrf.Tango.DevFailed;
-import fr.esrf.Tango.DevState;
-import fr.esrf.Tango.DispLevel;
-import fr.esrf.TangoDs.Command;
-import fr.esrf.TangoDs.DeviceImpl;
-import fr.esrf.TangoDs.Except;
-import fr.esrf.TangoDs.TangoConst;
-import fr.esrf.TangoDs.Util;
-
-/**
- * Class Description:
- * 
- */
-@Deprecated
-public class GetReportLatestErrorClass extends Command implements TangoConst {
-    // ===============================================================
-    /**
-     * Constructor for Command class GetReportLatestErrorClass
-     * 
-     * @param name
-     *            command name
-     * @param in
-     *            argin type
-     * @param out
-     *            argout type
-     */
-    // ===============================================================
-    public GetReportLatestErrorClass(String name, int in, int out) {
-	super(name, in, out);
-    }
-
-    // ===============================================================
-    /**
-     * Constructor for Command class GetReportLatestErrorClass
-     * 
-     * @param name
-     *            command name
-     * @param in
-     *            argin type
-     * @param in_comments
-     *            argin description
-     * @param out
-     *            argout type
-     * @param out_comments
-     *            argout description
-     */
-    // ===============================================================
-    public GetReportLatestErrorClass(String name, int in, int out, String in_comments,
-	    String out_comments) {
-	super(name, in, out, in_comments, out_comments);
-    }
-
-    // ===============================================================
-    /**
-     * Constructor for Command class GetReportLatestErrorClass
-     * 
-     * @param name
-     *            command name
-     * @param in
-     *            argin type
-     * @param in_comments
-     *            argin description
-     * @param out
-     *            argout type
-     * @param out_comments
-     *            argout description
-     * @param level
-     *            The command display type OPERATOR or EXPERT
-     */
-    // ===============================================================
-    public GetReportLatestErrorClass(String name, int in, int out, String in_comments,
-	    String out_comments, DispLevel level) {
-	super(name, in, out, in_comments, out_comments, level);
-    }
-
-    // ===============================================================
-    /**
-     * return the result of the device's command.
-     */
-    // ===============================================================
-    @Override
-    public Any execute(DeviceImpl device, Any in_any) throws DevFailed {
-	if (!(device instanceof TdbArchivingWatcher)) {
-	    Except.throw_exception("DEVICE_ERROR",
-		    "Device parameter is not instance of TdbArchivingWatcher",
-		    "TdbArchivingWatcher");
-	}
-
-	Util.out2.println("GetReportLatestErrorClass.execute(): arrived");
-	return this.insert(((TdbArchivingWatcher) (device)).get_report_latest_error());
-    }
-
-    // ===============================================================
-    /**
-     * Check if it is allowed to execute the command.
-     */
-    // ===============================================================
-    @Override
-    public boolean is_allowed(DeviceImpl device, Any data_in) {
-	if (device.get_state() == DevState.OFF || device.get_state() == DevState.INIT) {
-	    // End of Generated Code
-
-	    // Re-Start of Generated Code
-	    return false;
-	}
-	return true;
-    }
-}
-// -----------------------------------------------------------------------------
-/*
- * end of $Source:
- * /cvsroot/tango-cs/archiving/server/hdbtdbArchivingServers/src/
- * main/java/TdbArchivingWatcher/Commands/GetReportLatestErrorClass.java,v $
- */
diff --git a/src/main/java/TdbArchivingWatcher/Commands/IsAttributeCorrectlyArchivedCurrentClass.java b/src/main/java/TdbArchivingWatcher/Commands/IsAttributeCorrectlyArchivedCurrentClass.java
deleted file mode 100644
index 4c29d1f24f1200c0b29e85c05a610d6740fa68af..0000000000000000000000000000000000000000
--- a/src/main/java/TdbArchivingWatcher/Commands/IsAttributeCorrectlyArchivedCurrentClass.java
+++ /dev/null
@@ -1,164 +0,0 @@
-//+======================================================================
-// $Source$
-//
-// Project:      Tango Device Server
-//
-// Description:  Java source code for the command TemplateClass of the
-//               ArchivingWatcher class.
-//
-// $Author$
-//
-// $Revision$
-//
-// $Log$
-// Revision 1.2  2009/12/17 12:47:15  pierrejoseph
-// CheckStyle:  Organize imports / Format
-//
-// Revision 1.1  2009/08/28 14:27:59  soleilarc
-// add and organize admin report commands to the watcher devices
-//
-// Revision 1.1  2006/08/24 13:52:22  ounsy
-// creation
-//
-// Revision 1.1  2006/01/19 16:36:59  ounsy
-// New device specialised in watching archiving.
-//
-//
-// copyleft :    European Synchrotron Radiation Facility
-//               BP 220, Grenoble 38043
-//               FRANCE
-//
-//-======================================================================
-//
-//  		This file is generated by POGO
-//	(Program Obviously used to Generate tango Object)
-//
-//         (c) - Software Engineering Group - ESRF
-//=============================================================================
-
-/**
- * @author	$Author$
- * @version	$Revision$
- */
-package TdbArchivingWatcher.Commands;
-
-import org.omg.CORBA.Any;
-
-import TdbArchivingWatcher.TdbArchivingWatcher;
-import fr.esrf.Tango.DevFailed;
-import fr.esrf.Tango.DevState;
-import fr.esrf.Tango.DispLevel;
-import fr.esrf.TangoDs.Command;
-import fr.esrf.TangoDs.DeviceImpl;
-import fr.esrf.TangoDs.Except;
-import fr.esrf.TangoDs.TangoConst;
-import fr.esrf.TangoDs.Util;
-
-/**
- * Class Description:
- * 
- */
-@Deprecated
-public class IsAttributeCorrectlyArchivedCurrentClass extends Command implements TangoConst {
-    // ===============================================================
-    /**
-     * Constructor for Command class IsAttributeCorrectlyArchivedCurrentClass
-     * 
-     * @param name
-     *            command name
-     * @param in
-     *            argin type
-     * @param out
-     *            argout type
-     */
-    // ===============================================================
-    public IsAttributeCorrectlyArchivedCurrentClass(String name, int in, int out) {
-	super(name, in, out);
-    }
-
-    // ===============================================================
-    /**
-     * Constructor for Command class IsAttributeCorrectlyArchivedCurrentClass
-     * 
-     * @param name
-     *            command name
-     * @param in
-     *            argin type
-     * @param in_comments
-     *            argin description
-     * @param out
-     *            argout type
-     * @param out_comments
-     *            argout description
-     */
-    // ===============================================================
-    public IsAttributeCorrectlyArchivedCurrentClass(String name, int in, int out,
-	    String in_comments, String out_comments) {
-	super(name, in, out, in_comments, out_comments);
-    }
-
-    // ===============================================================
-    /**
-     * Constructor for Command class IsAttributeCorrectlyArchivedCurrentClass
-     * 
-     * @param name
-     *            command name
-     * @param in
-     *            argin type
-     * @param in_comments
-     *            argin description
-     * @param out
-     *            argout type
-     * @param out_comments
-     *            argout description
-     * @param level
-     *            The command display type OPERATOR or EXPERT
-     */
-    // ===============================================================
-    public IsAttributeCorrectlyArchivedCurrentClass(String name, int in, int out,
-	    String in_comments, String out_comments, DispLevel level) {
-	super(name, in, out, in_comments, out_comments, level);
-    }
-
-    // ===============================================================
-    /**
-     * return the result of the device's command.
-     */
-    // ===============================================================
-    @Override
-    public Any execute(DeviceImpl device, Any in_any) throws DevFailed {
-	if (!(device instanceof TdbArchivingWatcher)) {
-	    Except.throw_exception("DEVICE_ERROR",
-		    "Device parameter is not instance of TdbArchivingWatcher",
-		    "TdbArchivingWatcher");
-	}
-
-	Util.out2.println("IsAttributeCorrectlyArchivedCurrentClass.execute(): arrived");
-	String argin = this.extract_DevString(in_any);
-	return this.insert(((TdbArchivingWatcher) (device))
-		.is_attribute_correctly_archived_current(argin));
-    }
-
-    // ===============================================================
-    /**
-     * Check if it is allowed to execute the command.
-     */
-    // ===============================================================
-    @Override
-    public boolean is_allowed(DeviceImpl device, Any data_in) {
-	if (device.get_state() == DevState.OFF || device.get_state() == DevState.INIT) {
-	    // End of Generated Code
-
-	    // Re-Start of Generated Code
-	    return false;
-	}
-	return true;
-    }
-}
-// -----------------------------------------------------------------------------
-/*
- * end of $Source:
- * /cvsroot/tango-cs/archiving/server/hdbtdbArchivingServers/src/
- * main/java/TdbArchivingWatcher
- * /Commands/IsAttributeCorrectlyArchivedCurrentClass.java,v $
- */
diff --git a/src/main/java/TdbArchivingWatcher/Commands/IsAttributeCorrectlyArchivedLatestErrorClass.java b/src/main/java/TdbArchivingWatcher/Commands/IsAttributeCorrectlyArchivedLatestErrorClass.java
deleted file mode 100644
index ad56ff4acb0bbf2134700b5ef0325f2c1bf6710a..0000000000000000000000000000000000000000
--- a/src/main/java/TdbArchivingWatcher/Commands/IsAttributeCorrectlyArchivedLatestErrorClass.java
+++ /dev/null
@@ -1,167 +0,0 @@
-//+======================================================================
-// $Source$
-//
-// Project:      Tango Device Server
-//
-// Description:  Java source code for the command TemplateClass of the
-//               ArchivingWatcher class.
-//
-// $Author$
-//
-// $Revision$
-//
-// $Log$
-// Revision 1.2  2009/12/17 12:47:15  pierrejoseph
-// CheckStyle:  Organize imports / Format
-//
-// Revision 1.1  2009/08/28 14:27:59  soleilarc
-// add and organize admin report commands to the watcher devices
-//
-// Revision 1.1  2006/08/24 13:52:22  ounsy
-// creation
-//
-// Revision 1.1  2006/01/19 16:36:59  ounsy
-// New device specialised in watching archiving.
-//
-//
-// copyleft :    European Synchrotron Radiation Facility
-//               BP 220, Grenoble 38043
-//               FRANCE
-//
-//-======================================================================
-//
-//  		This file is generated by POGO
-//	(Program Obviously used to Generate tango Object)
-//
-//         (c) - Software Engineering Group - ESRF
-//=============================================================================
-
-/**
- * @author	$Author$
- * @version	$Revision$
- */
-package TdbArchivingWatcher.Commands;
-
-import org.omg.CORBA.Any;
-
-import TdbArchivingWatcher.TdbArchivingWatcher;
-import fr.esrf.Tango.DevFailed;
-import fr.esrf.Tango.DevState;
-import fr.esrf.Tango.DispLevel;
-import fr.esrf.TangoDs.Command;
-import fr.esrf.TangoDs.DeviceImpl;
-import fr.esrf.TangoDs.Except;
-import fr.esrf.TangoDs.TangoConst;
-import fr.esrf.TangoDs.Util;
-
-/**
- * Class Description:
- * 
- */
-@Deprecated
-public class IsAttributeCorrectlyArchivedLatestErrorClass extends Command implements TangoConst {
-    // ===============================================================
-    /**
-     * Constructor for Command class
-     * IsAttributeCorrectlyArchivedLatestErrorClass
-     * 
-     * @param name
-     *            command name
-     * @param in
-     *            argin type
-     * @param out
-     *            argout type
-     */
-    // ===============================================================
-    public IsAttributeCorrectlyArchivedLatestErrorClass(String name, int in, int out) {
-	super(name, in, out);
-    }
-
-    // ===============================================================
-    /**
-     * Constructor for Command class
-     * IsAttributeCorrectlyArchivedLatestErrorClass
-     * 
-     * @param name
-     *            command name
-     * @param in
-     *            argin type
-     * @param in_comments
-     *            argin description
-     * @param out
-     *            argout type
-     * @param out_comments
-     *            argout description
-     */
-    // ===============================================================
-    public IsAttributeCorrectlyArchivedLatestErrorClass(String name, int in, int out,
-	    String in_comments, String out_comments) {
-	super(name, in, out, in_comments, out_comments);
-    }
-
-    // ===============================================================
-    /**
-     * Constructor for Command class
-     * IsAttributeCorrectlyArchivedLatestErrorClass
-     * 
-     * @param name
-     *            command name
-     * @param in
-     *            argin type
-     * @param in_comments
-     *            argin description
-     * @param out
-     *            argout type
-     * @param out_comments
-     *            argout description
-     * @param level
-     *            The command display type OPERATOR or EXPERT
-     */
-    // ===============================================================
-    public IsAttributeCorrectlyArchivedLatestErrorClass(String name, int in, int out,
-	    String in_comments, String out_comments, DispLevel level) {
-	super(name, in, out, in_comments, out_comments, level);
-    }
-
-    // ===============================================================
-    /**
-     * return the result of the device's command.
-     */
-    // ===============================================================
-    @Override
-    public Any execute(DeviceImpl device, Any in_any) throws DevFailed {
-	if (!(device instanceof TdbArchivingWatcher)) {
-	    Except.throw_exception("DEVICE_ERROR",
-		    "Device parameter is not instance of TdbArchivingWatcher",
-		    "TdbArchivingWatcher");
-	}
-
-	Util.out2.println("IsAttributeCorrectlyArchivedLatestErrorClass.execute(): arrived");
-	String argin = this.extract_DevString(in_any);
-	return this.insert(((TdbArchivingWatcher) (device))
-		.is_attribute_correctly_archived_latest_error(argin));
-    }
-
-    // ===============================================================
-    /**
-     * Check if it is allowed to execute the command.
-     */
-    // ===============================================================
-    @Override
-    public boolean is_allowed(DeviceImpl device, Any data_in) {
-	if (device.get_state() == DevState.OFF || device.get_state() == DevState.INIT) {
-	    // End of Generated Code
-
-	    // Re-Start of Generated Code
-	    return false;
-	}
-	return true;
-    }
-}
-// -----------------------------------------------------------------------------
-/*
- * end of $Source:
- * /cvsroot/tango-cs/archiving/server/hdbtdbArchivingServers/src/
- * main/java/TdbArchivingWatcher
- * /Commands/IsAttributeCorrectlyArchivedLatestErrorClass.java,v $
- */
diff --git a/src/main/java/TdbArchivingWatcher/Commands/ResetClass.java b/src/main/java/TdbArchivingWatcher/Commands/ResetClass.java
deleted file mode 100644
index 20fa94523bf9ca3ee5e7106a6cd4e9832a5cb1fd..0000000000000000000000000000000000000000
--- a/src/main/java/TdbArchivingWatcher/Commands/ResetClass.java
+++ /dev/null
@@ -1,162 +0,0 @@
-//+======================================================================
-// $Source$
-//
-// Project:      Tango Device Server
-//
-// Description:  Java source code for the command TemplateClass of the
-//               ArchivingWatcher class.
-//
-// $Author$
-//
-// $Revision$
-//
-// $Log$
-// Revision 1.2  2009/12/17 12:47:15  pierrejoseph
-// CheckStyle:  Organize imports / Format
-//
-// Revision 1.1  2009/08/28 14:27:59  soleilarc
-// add and organize admin report commands to the watcher devices
-//
-// Revision 1.1  2006/08/24 13:52:22  ounsy
-// creation
-//
-// Revision 1.1  2006/01/19 16:36:59  ounsy
-// New device specialised in watching archiving.
-//
-//
-// copyleft :    European Synchrotron Radiation Facility
-//               BP 220, Grenoble 38043
-//               FRANCE
-//
-//-======================================================================
-//
-//  		This file is generated by POGO
-//	(Program Obviously used to Generate tango Object)
-//
-//         (c) - Software Engineering Group - ESRF
-//=============================================================================
-
-/**
- * @author	$Author$
- * @version	$Revision$
- */
-package TdbArchivingWatcher.Commands;
-
-import org.omg.CORBA.Any;
-
-import TdbArchivingWatcher.TdbArchivingWatcher;
-import fr.esrf.Tango.DevFailed;
-import fr.esrf.Tango.DevState;
-import fr.esrf.Tango.DispLevel;
-import fr.esrf.TangoDs.Command;
-import fr.esrf.TangoDs.DeviceImpl;
-import fr.esrf.TangoDs.Except;
-import fr.esrf.TangoDs.TangoConst;
-import fr.esrf.TangoDs.Util;
-
-/**
- * Class Description:
- * 
- */
-@Deprecated
-public class ResetClass extends Command implements TangoConst {
-    // ===============================================================
-    /**
-     * Constructor for Command class ResetClass
-     * 
-     * @param name
-     *            command name
-     * @param in
-     *            argin type
-     * @param out
-     *            argout type
-     */
-    // ===============================================================
-    public ResetClass(String name, int in, int out) {
-	super(name, in, out);
-    }
-
-    // ===============================================================
-    /**
-     * Constructor for Command class ResetClass
-     * 
-     * @param name
-     *            command name
-     * @param in
-     *            argin type
-     * @param in_comments
-     *            argin description
-     * @param out
-     *            argout type
-     * @param out_comments
-     *            argout description
-     */
-    // ===============================================================
-    public ResetClass(String name, int in, int out, String in_comments, String out_comments) {
-	super(name, in, out, in_comments, out_comments);
-    }
-
-    // ===============================================================
-    /**
-     * Constructor for Command class ResetClass
-     * 
-     * @param name
-     *            command name
-     * @param in
-     *            argin type
-     * @param in_comments
-     *            argin description
-     * @param out
-     *            argout type
-     * @param out_comments
-     *            argout description
-     * @param level
-     *            The command display type OPERATOR or EXPERT
-     */
-    // ===============================================================
-    public ResetClass(String name, int in, int out, String in_comments, String out_comments,
-	    DispLevel level) {
-	super(name, in, out, in_comments, out_comments, level);
-    }
-
-    // ===============================================================
-    /**
-     * return the result of the device's command.
-     */
-    // ===============================================================
-    @Override
-    public Any execute(DeviceImpl device, Any in_any) throws DevFailed {
-	if (!(device instanceof TdbArchivingWatcher)) {
-	    Except.throw_exception("DEVICE_ERROR",
-		    "Device parameter is not instance of TdbArchivingWatcher",
-		    "TdbArchivingWatcher");
-	}
-
-	Util.out2.println("ResetClass.execute(): arrived");
-	((TdbArchivingWatcher) (device)).reset();
-	return this.insert();
-    }
-
-    // ===============================================================
-    /**
-     * Check if it is allowed to execute the command.
-     */
-    // ===============================================================
-    @Override
-    public boolean is_allowed(DeviceImpl device, Any data_in) {
-	if (device.get_state() == DevState.ON || device.get_state() == DevState.OFF
-		|| device.get_state() == DevState.FAULT || device.get_state() == DevState.INIT) {
-	    // End of Generated Code
-
-	    // Re-Start of Generated Code
-	    return false;
-	}
-	return true;
-    }
-}
-// -----------------------------------------------------------------------------
-/*
- * end of $Source:
- * /cvsroot/tango-cs/archiving/server/hdbtdbArchivingServers/src/
- * main/java/TdbArchivingWatcher/Commands/ResetClass.java,v $
- */
diff --git a/src/main/java/TdbArchivingWatcher/Commands/RestartClass.java b/src/main/java/TdbArchivingWatcher/Commands/RestartClass.java
deleted file mode 100644
index 6374d9812033af1337937c606b29d851da391eb6..0000000000000000000000000000000000000000
--- a/src/main/java/TdbArchivingWatcher/Commands/RestartClass.java
+++ /dev/null
@@ -1,106 +0,0 @@
-package TdbArchivingWatcher.Commands;
-
-import org.omg.CORBA.Any;
-
-import TdbArchivingWatcher.TdbArchivingWatcher;
-import fr.esrf.Tango.DevFailed;
-import fr.esrf.Tango.DispLevel;
-import fr.esrf.TangoDs.Command;
-import fr.esrf.TangoDs.DeviceImpl;
-import fr.esrf.TangoDs.Except;
-import fr.esrf.TangoDs.TangoConst;
-import fr.esrf.TangoDs.Util;
-
-/**
- * Class Description:
- * 
- */
-@Deprecated
-public class RestartClass extends Command implements TangoConst {
-    // ===============================================================
-    /**
-     * Constructor for Command class RestartClass
-     * 
-     * @param name
-     *            command name
-     * @param in
-     *            argin type
-     * @param out
-     *            argout type
-     */
-    // ===============================================================
-    public RestartClass(String name, int in, int out) {
-	super(name, in, out);
-    }
-
-    // ===============================================================
-    /**
-     * Constructor for Command class RestartClass
-     * 
-     * @param name
-     *            command name
-     * @param in
-     *            argin type
-     * @param in_comments
-     *            argin description
-     * @param out
-     *            argout type
-     * @param out_comments
-     *            argout description
-     */
-    // ===============================================================
-    public RestartClass(String name, int in, int out, String in_comments, String out_comments) {
-	super(name, in, out, in_comments, out_comments);
-    }
-
-    // ===============================================================
-    /**
-     * Constructor for Command class RestartClass
-     * 
-     * @param name
-     *            command name
-     * @param in
-     *            argin type
-     * @param in_comments
-     *            argin description
-     * @param out
-     *            argout type
-     * @param out_comments
-     *            argout description
-     * @param level
-     *            The command display type OPERATOR or EXPERT
-     */
-    // ===============================================================
-    public RestartClass(String name, int in, int out, String in_comments, String out_comments,
-	    DispLevel level) {
-	super(name, in, out, in_comments, out_comments, level);
-    }
-
-    // ===============================================================
-    /**
-     * return the result of the device's command.
-     */
-    // ===============================================================
-    @Override
-    public Any execute(DeviceImpl device, Any in_any) throws DevFailed {
-	if (!(device instanceof TdbArchivingWatcher)) {
-	    Except.throw_exception("DEVICE_ERROR",
-		    "Device parameter is not instance of TdbArchivingWatcher",
-		    "TdbArchivingWatcher");
-	}
-
-	Util.out2.println("RestartClass.execute(): arrived");
-	((TdbArchivingWatcher) (device)).restart();
-	return this.insert();
-    }
-
-    // ===============================================================
-    /**
-     * Check if it is allowed to execute the command.
-     */
-    // ===============================================================
-    @Override
-    public boolean is_allowed(DeviceImpl device, Any data_in) {
-	return true;
-    }
-}
diff --git a/src/main/java/TdbArchivingWatcher/Commands/StartAbsoluteClass.java b/src/main/java/TdbArchivingWatcher/Commands/StartAbsoluteClass.java
deleted file mode 100644
index a88626504876a470858777f25d1048a0f493e71e..0000000000000000000000000000000000000000
--- a/src/main/java/TdbArchivingWatcher/Commands/StartAbsoluteClass.java
+++ /dev/null
@@ -1,162 +0,0 @@
-//+======================================================================
-// $Source$
-//
-// Project:      Tango Device Server
-//
-// Description:  Java source code for the command TemplateClass of the
-//               ArchivingWatcher class.
-//
-// $Author$
-//
-// $Revision$
-//
-// $Log$
-// Revision 1.2  2009/12/17 12:47:15  pierrejoseph
-// CheckStyle:  Organize imports / Format
-//
-// Revision 1.1  2009/08/28 14:27:59  soleilarc
-// add and organize admin report commands to the watcher devices
-//
-// Revision 1.1  2006/08/24 13:52:22  ounsy
-// creation
-//
-// Revision 1.1  2006/01/27 13:07:54  ounsy
-// New commands to start archiving control in absolute/relative mode
-//
-//
-// copyleft :    European Synchrotron Radiation Facility
-//               BP 220, Grenoble 38043
-//               FRANCE
-//
-//-======================================================================
-//
-//  		This file is generated by POGO
-//	(Program Obviously used to Generate tango Object)
-//
-//         (c) - Software Engineering Group - ESRF
-//=============================================================================
-
-/**
- * @author	$Author$
- * @version	$Revision$
- */
-package TdbArchivingWatcher.Commands;
-
-import org.omg.CORBA.Any;
-
-import TdbArchivingWatcher.TdbArchivingWatcher;
-import fr.esrf.Tango.DevFailed;
-import fr.esrf.Tango.DevState;
-import fr.esrf.Tango.DispLevel;
-import fr.esrf.TangoDs.Command;
-import fr.esrf.TangoDs.DeviceImpl;
-import fr.esrf.TangoDs.Except;
-import fr.esrf.TangoDs.TangoConst;
-import fr.esrf.TangoDs.Util;
-
-/**
- * Class Description: Start in absolute mode
- */
-@Deprecated
-public class StartAbsoluteClass extends Command implements TangoConst {
-    // ===============================================================
-    /**
-     * Constructor for Command class StartAbsoluteClass
-     * 
-     * @param name
-     *            command name
-     * @param in
-     *            argin type
-     * @param out
-     *            argout type
-     */
-    // ===============================================================
-    public StartAbsoluteClass(String name, int in, int out) {
-	super(name, in, out);
-    }
-
-    // ===============================================================
-    /**
-     * Constructor for Command class StartAbsoluteClass
-     * 
-     * @param name
-     *            command name
-     * @param in
-     *            argin type
-     * @param in_comments
-     *            argin description
-     * @param out
-     *            argout type
-     * @param out_comments
-     *            argout description
-     */
-    // ===============================================================
-    public StartAbsoluteClass(String name, int in, int out, String in_comments, String out_comments) {
-	super(name, in, out, in_comments, out_comments);
-    }
-
-    // ===============================================================
-    /**
-     * Constructor for Command class StartAbsoluteClass
-     * 
-     * @param name
-     *            command name
-     * @param in
-     *            argin type
-     * @param in_comments
-     *            argin description
-     * @param out
-     *            argout type
-     * @param out_comments
-     *            argout description
-     * @param level
-     *            The command display type OPERATOR or EXPERT
-     */
-    // ===============================================================
-    public StartAbsoluteClass(String name, int in, int out, String in_comments,
-	    String out_comments, DispLevel level) {
-	super(name, in, out, in_comments, out_comments, level);
-    }
-
-    // ===============================================================
-    /**
-     * return the result of the device's command.
-     */
-    // ===============================================================
-    @Override
-    public Any execute(DeviceImpl device, Any in_any) throws DevFailed {
-	if (!(device instanceof TdbArchivingWatcher)) {
-	    Except.throw_exception("DEVICE_ERROR",
-		    "Device parameter is not instance of TdbArchivingWatcher",
-		    "TdbArchivingWatcher");
-	}
-
-	Util.out2.println("StartAbsoluteClass.execute(): arrived");
-	int[] argin = this.extract_DevVarLongArray(in_any);
-	((TdbArchivingWatcher) (device)).start_absolute(argin);
-	return this.insert();
-    }
-
-    // ===============================================================
-    /**
-     * Check if it is allowed to execute the command.
-     */
-    // ===============================================================
-    @Override
-    public boolean is_allowed(DeviceImpl device, Any data_in) {
-	if (device.get_state() == DevState.ON || device.get_state() == DevState.FAULT
-		|| device.get_state() == DevState.INIT || device.get_state() == DevState.ALARM) {
-	    // End of Generated Code
-
-	    // Re-Start of Generated Code
-	    return false;
-	}
-	return true;
-    }
-}
-// -----------------------------------------------------------------------------
-/*
- * end of $Source:
- * /cvsroot/tango-cs/archiving/server/hdbtdbArchivingServers/src/
- * main/java/TdbArchivingWatcher/Commands/StartAbsoluteClass.java,v $
- */
diff --git a/src/main/java/TdbArchivingWatcher/Commands/StartClass.java b/src/main/java/TdbArchivingWatcher/Commands/StartClass.java
deleted file mode 100644
index 784719ce441576e57c596b1236ff0d9a8c7915f8..0000000000000000000000000000000000000000
--- a/src/main/java/TdbArchivingWatcher/Commands/StartClass.java
+++ /dev/null
@@ -1,162 +0,0 @@
-//+======================================================================
-// $Source$
-//
-// Project:      Tango Device Server
-//
-// Description:  Java source code for the command TemplateClass of the
-//               ArchivingWatcher class.
-//
-// $Author$
-//
-// $Revision$
-//
-// $Log$
-// Revision 1.2  2009/12/17 12:47:15  pierrejoseph
-// CheckStyle:  Organize imports / Format
-//
-// Revision 1.1  2009/08/28 14:27:59  soleilarc
-// add and organize admin report commands to the watcher devices
-//
-// Revision 1.1  2006/08/24 13:52:22  ounsy
-// creation
-//
-// Revision 1.1  2006/01/19 16:36:59  ounsy
-// New device specialised in watching archiving.
-//
-//
-// copyleft :    European Synchrotron Radiation Facility
-//               BP 220, Grenoble 38043
-//               FRANCE
-//
-//-======================================================================
-//
-//  		This file is generated by POGO
-//	(Program Obviously used to Generate tango Object)
-//
-//         (c) - Software Engineering Group - ESRF
-//=============================================================================
-
-/**
- * @author	$Author$
- * @version	$Revision$
- */
-package TdbArchivingWatcher.Commands;
-
-import org.omg.CORBA.Any;
-
-import TdbArchivingWatcher.TdbArchivingWatcher;
-import fr.esrf.Tango.DevFailed;
-import fr.esrf.Tango.DevState;
-import fr.esrf.Tango.DispLevel;
-import fr.esrf.TangoDs.Command;
-import fr.esrf.TangoDs.DeviceImpl;
-import fr.esrf.TangoDs.Except;
-import fr.esrf.TangoDs.TangoConst;
-import fr.esrf.TangoDs.Util;
-
-/**
- * Class Description:
- * 
- */
-@Deprecated
-public class StartClass extends Command implements TangoConst {
-    // ===============================================================
-    /**
-     * Constructor for Command class StartClass
-     * 
-     * @param name
-     *            command name
-     * @param in
-     *            argin type
-     * @param out
-     *            argout type
-     */
-    // ===============================================================
-    public StartClass(String name, int in, int out) {
-	super(name, in, out);
-    }
-
-    // ===============================================================
-    /**
-     * Constructor for Command class StartClass
-     * 
-     * @param name
-     *            command name
-     * @param in
-     *            argin type
-     * @param in_comments
-     *            argin description
-     * @param out
-     *            argout type
-     * @param out_comments
-     *            argout description
-     */
-    // ===============================================================
-    public StartClass(String name, int in, int out, String in_comments, String out_comments) {
-	super(name, in, out, in_comments, out_comments);
-    }
-
-    // ===============================================================
-    /**
-     * Constructor for Command class StartClass
-     * 
-     * @param name
-     *            command name
-     * @param in
-     *            argin type
-     * @param in_comments
-     *            argin description
-     * @param out
-     *            argout type
-     * @param out_comments
-     *            argout description
-     * @param level
-     *            The command display type OPERATOR or EXPERT
-     */
-    // ===============================================================
-    public StartClass(String name, int in, int out, String in_comments, String out_comments,
-	    DispLevel level) {
-	super(name, in, out, in_comments, out_comments, level);
-    }
-
-    // ===============================================================
-    /**
-     * return the result of the device's command.
-     */
-    // ===============================================================
-    @Override
-    public Any execute(DeviceImpl device, Any in_any) throws DevFailed {
-	if (!(device instanceof TdbArchivingWatcher)) {
-	    Except.throw_exception("DEVICE_ERROR",
-		    "Device parameter is not instance of TdbArchivingWatcher",
-		    "TdbArchivingWatcher");
-	}
-
-	Util.out2.println("StartClass.execute(): arrived");
-	((TdbArchivingWatcher) (device)).start();
-	return this.insert();
-    }
-
-    // ===============================================================
-    /**
-     * Check if it is allowed to execute the command.
-     */
-    // ===============================================================
-    @Override
-    public boolean is_allowed(DeviceImpl device, Any data_in) {
-	if (device.get_state() == DevState.ON || device.get_state() == DevState.FAULT
-		|| device.get_state() == DevState.INIT || device.get_state() == DevState.ALARM) {
-	    // End of Generated Code
-
-	    // Re-Start of Generated Code
-	    return false;
-	}
-	return true;
-    }
-}
-// -----------------------------------------------------------------------------
-/*
- * end of $Source:
- * /cvsroot/tango-cs/archiving/server/hdbtdbArchivingServers/src/
- * main/java/TdbArchivingWatcher/Commands/StartClass.java,v $
- */
diff --git a/src/main/java/TdbArchivingWatcher/Commands/StartRelativeClass.java b/src/main/java/TdbArchivingWatcher/Commands/StartRelativeClass.java
deleted file mode 100644
index 6d22f765164efe60e7dd65ba6df31fb722af9227..0000000000000000000000000000000000000000
--- a/src/main/java/TdbArchivingWatcher/Commands/StartRelativeClass.java
+++ /dev/null
@@ -1,162 +0,0 @@
-//+======================================================================
-// $Source$
-//
-// Project:      Tango Device Server
-//
-// Description:  Java source code for the command TemplateClass of the
-//               ArchivingWatcher class.
-//
-// $Author$
-//
-// $Revision$
-//
-// $Log$
-// Revision 1.2  2009/12/17 12:47:15  pierrejoseph
-// CheckStyle:  Organize imports / Format
-//
-// Revision 1.1  2009/08/28 14:27:59  soleilarc
-// add and organize admin report commands to the watcher devices
-//
-// Revision 1.1  2006/08/24 13:52:22  ounsy
-// creation
-//
-// Revision 1.1  2006/01/27 13:07:54  ounsy
-// New commands to start archiving control in absolute/relative mode
-//
-//
-// copyleft :    European Synchrotron Radiation Facility
-//               BP 220, Grenoble 38043
-//               FRANCE
-//
-//-======================================================================
-//
-//  		This file is generated by POGO
-//	(Program Obviously used to Generate tango Object)
-//
-//         (c) - Software Engineering Group - ESRF
-//=============================================================================
-
-/**
- * @author	$Author$
- * @version	$Revision$
- */
-package TdbArchivingWatcher.Commands;
-
-import org.omg.CORBA.Any;
-
-import TdbArchivingWatcher.TdbArchivingWatcher;
-import fr.esrf.Tango.DevFailed;
-import fr.esrf.Tango.DevState;
-import fr.esrf.Tango.DispLevel;
-import fr.esrf.TangoDs.Command;
-import fr.esrf.TangoDs.DeviceImpl;
-import fr.esrf.TangoDs.Except;
-import fr.esrf.TangoDs.TangoConst;
-import fr.esrf.TangoDs.Util;
-
-/**
- * Class Description: Start in relative mode
- */
-@Deprecated
-public class StartRelativeClass extends Command implements TangoConst {
-    // ===============================================================
-    /**
-     * Constructor for Command class StartRelativeClass
-     * 
-     * @param name
-     *            command name
-     * @param in
-     *            argin type
-     * @param out
-     *            argout type
-     */
-    // ===============================================================
-    public StartRelativeClass(String name, int in, int out) {
-	super(name, in, out);
-    }
-
-    // ===============================================================
-    /**
-     * Constructor for Command class StartRelativeClass
-     * 
-     * @param name
-     *            command name
-     * @param in
-     *            argin type
-     * @param in_comments
-     *            argin description
-     * @param out
-     *            argout type
-     * @param out_comments
-     *            argout description
-     */
-    // ===============================================================
-    public StartRelativeClass(String name, int in, int out, String in_comments, String out_comments) {
-	super(name, in, out, in_comments, out_comments);
-    }
-
-    // ===============================================================
-    /**
-     * Constructor for Command class StartRelativeClass
-     * 
-     * @param name
-     *            command name
-     * @param in
-     *            argin type
-     * @param in_comments
-     *            argin description
-     * @param out
-     *            argout type
-     * @param out_comments
-     *            argout description
-     * @param level
-     *            The command display type OPERATOR or EXPERT
-     */
-    // ===============================================================
-    public StartRelativeClass(String name, int in, int out, String in_comments,
-	    String out_comments, DispLevel level) {
-	super(name, in, out, in_comments, out_comments, level);
-    }
-
-    // ===============================================================
-    /**
-     * return the result of the device's command.
-     */
-    // ===============================================================
-    @Override
-    public Any execute(DeviceImpl device, Any in_any) throws DevFailed {
-	if (!(device instanceof TdbArchivingWatcher)) {
-	    Except.throw_exception("DEVICE_ERROR",
-		    "Device parameter is not instance of TdbArchivingWatcher",
-		    "TdbArchivingWatcher");
-	}
-
-	Util.out2.println("StartRelativeClass.execute(): arrived");
-	double argin = this.extract_DevDouble(in_any);
-	((TdbArchivingWatcher) (device)).start_relative(argin);
-	return this.insert();
-    }
-
-    // ===============================================================
-    /**
-     * Check if it is allowed to execute the command.
-     */
-    // ===============================================================
-    @Override
-    public boolean is_allowed(DeviceImpl device, Any data_in) {
-	if (device.get_state() == DevState.ON || device.get_state() == DevState.FAULT
-		|| device.get_state() == DevState.INIT || device.get_state() == DevState.ALARM) {
-	    // End of Generated Code
-
-	    // Re-Start of Generated Code
-	    return false;
-	}
-	return true;
-    }
-}
-// -----------------------------------------------------------------------------
-/*
- * end of $Source:
- * /cvsroot/tango-cs/archiving/server/hdbtdbArchivingServers/src/
- * main/java/TdbArchivingWatcher/Commands/StartRelativeClass.java,v $
- */
diff --git a/src/main/java/TdbArchivingWatcher/Commands/StopClass.java b/src/main/java/TdbArchivingWatcher/Commands/StopClass.java
deleted file mode 100644
index 7665eb8d2ac3d691e81e35fb10d8682e113c2e40..0000000000000000000000000000000000000000
--- a/src/main/java/TdbArchivingWatcher/Commands/StopClass.java
+++ /dev/null
@@ -1,161 +0,0 @@
-//+======================================================================
-// $Source$
-//
-// Project:      Tango Device Server
-//
-// Description:  Java source code for the command TemplateClass of the
-//               ArchivingWatcher class.
-//
-// $Author$
-//
-// $Revision$
-//
-// $Log$
-// Revision 1.2  2009/12/17 12:47:15  pierrejoseph
-// CheckStyle:  Organize imports / Format
-//
-// Revision 1.1  2009/08/28 14:27:59  soleilarc
-// add and organize admin report commands to the watcher devices
-//
-// Revision 1.1  2006/08/24 13:52:22  ounsy
-// creation
-//
-// Revision 1.1  2006/01/19 16:36:59  ounsy
-// New device specialised in watching archiving.
-//
-//
-// copyleft :    European Synchrotron Radiation Facility
-//               BP 220, Grenoble 38043
-//               FRANCE
-//
-//-======================================================================
-//
-//  		This file is generated by POGO
-//	(Program Obviously used to Generate tango Object)
-//
-//         (c) - Software Engineering Group - ESRF
-//=============================================================================
-
-/**
- * @author	$Author$
- * @version	$Revision$
- */
-package TdbArchivingWatcher.Commands;
-
-import org.omg.CORBA.Any;
-
-import TdbArchivingWatcher.TdbArchivingWatcher;
-import fr.esrf.Tango.DevFailed;
-import fr.esrf.Tango.DevState;
-import fr.esrf.Tango.DispLevel;
-import fr.esrf.TangoDs.Command;
-import fr.esrf.TangoDs.DeviceImpl;
-import fr.esrf.TangoDs.Except;
-import fr.esrf.TangoDs.TangoConst;
-import fr.esrf.TangoDs.Util;
-
-/**
- * Class Description:
- * 
- */
-@Deprecated
-public class StopClass extends Command implements TangoConst {
-    // ===============================================================
-    /**
-     * Constructor for Command class StopClass
-     * 
-     * @param name
-     *            command name
-     * @param in
-     *            argin type
-     * @param out
-     *            argout type
-     */
-    // ===============================================================
-    public StopClass(String name, int in, int out) {
-	super(name, in, out);
-    }
-
-    // ===============================================================
-    /**
-     * Constructor for Command class StopClass
-     * 
-     * @param name
-     *            command name
-     * @param in
-     *            argin type
-     * @param in_comments
-     *            argin description
-     * @param out
-     *            argout type
-     * @param out_comments
-     *            argout description
-     */
-    // ===============================================================
-    public StopClass(String name, int in, int out, String in_comments, String out_comments) {
-	super(name, in, out, in_comments, out_comments);
-    }
-
-    // ===============================================================
-    /**
-     * Constructor for Command class StopClass
-     * 
-     * @param name
-     *            command name
-     * @param in
-     *            argin type
-     * @param in_comments
-     *            argin description
-     * @param out
-     *            argout type
-     * @param out_comments
-     *            argout description
-     * @param level
-     *            The command display type OPERATOR or EXPERT
-     */
-    // ===============================================================
-    public StopClass(String name, int in, int out, String in_comments, String out_comments,
-	    DispLevel level) {
-	super(name, in, out, in_comments, out_comments, level);
-    }
-
-    // ===============================================================
-    /**
-     * return the result of the device's command.
-     */
-    // ===============================================================
-    @Override
-    public Any execute(DeviceImpl device, Any in_any) throws DevFailed {
-	if (!(device instanceof TdbArchivingWatcher)) {
-	    Except.throw_exception("DEVICE_ERROR",
-		    "Device parameter is not instance of TdbArchivingWatcher",
-		    "TdbArchivingWatcher");
-	}
-
-	Util.out2.println("StopClass.execute(): arrived");
-	((TdbArchivingWatcher) (device)).stop();
-	return this.insert();
-    }
-
-    // ===============================================================
-    /**
-     * Check if it is allowed to execute the command.
-     */
-    // ===============================================================
-    @Override
-    public boolean is_allowed(DeviceImpl device, Any data_in) {
-	if (device.get_state() == DevState.OFF) {
-	    // End of Generated Code
-
-	    // Re-Start of Generated Code
-	    return false;
-	}
-	return true;
-    }
-}
-// -----------------------------------------------------------------------------
-/*
- * end of $Source:
- * /cvsroot/tango-cs/archiving/server/hdbtdbArchivingServers/src/
- * main/java/TdbArchivingWatcher/Commands/StopClass.java,v $
- */
diff --git a/src/main/java/TdbArchivingWatcher/TdbArchivingWatcher.java b/src/main/java/TdbArchivingWatcher/TdbArchivingWatcher.java
deleted file mode 100644
index 6a0c5c4f90cd1a6e06f8d1764dc56505c5f7992d..0000000000000000000000000000000000000000
--- a/src/main/java/TdbArchivingWatcher/TdbArchivingWatcher.java
+++ /dev/null
@@ -1,1126 +0,0 @@
-package TdbArchivingWatcher;
-
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.Collections;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-import java.util.Vector;
-
-import org.omg.CORBA.SystemException;
-import org.omg.CORBA.UserException;
-import org.tango.utils.DevFailedUtils;
-
-import Common.Watcher.AbsArchivingWatcher;
-import fr.esrf.Tango.DevError;
-import fr.esrf.Tango.DevFailed;
-import fr.esrf.Tango.DevState;
-import fr.esrf.Tango.ErrSeverity;
-import fr.esrf.TangoApi.ApiUtil;
-import fr.esrf.TangoApi.DbDatum;
-import fr.esrf.TangoApi.DeviceData;
-import fr.esrf.TangoApi.DeviceProxy;
-import fr.esrf.TangoApi.Group.Group;
-import fr.esrf.TangoApi.Group.GroupCmdReply;
-import fr.esrf.TangoApi.Group.GroupCmdReplyList;
-import fr.esrf.TangoDs.Attribute;
-import fr.esrf.TangoDs.DeviceClass;
-import fr.esrf.TangoDs.Except;
-import fr.esrf.TangoDs.Util;
-import fr.soleil.archiving.common.api.exception.ArchivingException;
-import fr.soleil.archiving.hdbtdb.api.manager.TdbArchivingManagerApiRef;
-import fr.soleil.archiving.hdbtdb.api.tools.mode.Mode;
-import fr.soleil.archiving.hdbtdb.api.watch.dto.ArchivingAttribute;
-import fr.soleil.archiving.hdbtdb.api.watch.dto.ArchivingAttributeSubName;
-import fr.soleil.archiving.hdbtdb.api.watch.dto.ControlResult;
-import fr.soleil.archiving.hdbtdb.api.watch.dto.ControlResultLine;
-import fr.soleil.archiving.hdbtdb.api.watch.dto.Domain;
-import fr.soleil.archiving.hdbtdb.api.watch.dto.ModeData;
-import fr.soleil.archiving.hdbtdb.api.watch.dto.comparators.ArchivingAttributeComparator;
-import fr.soleil.archiving.hdbtdb.api.watch.lifecycle.DefaultLifeCycleManager;
-import fr.soleil.archiving.hdbtdb.api.watch.strategy.delay.IDelayManager;
-
-/**
- * Class Description: This device is in charge of controlling HDB archiving. It
- * does so by comparing the theoretical archiving (the attributes that have been
- * registered for archiving) with the effective archiving (are records being
- * added for the registered attributes). If the effective archiving matches the
- * theoretical archiving, the attribute is called "OK", otherwise "KO". The
- * tightness of the required matching has a default value, but can be
- * user-defined (through expert commands).
- * 
- * ArchivingWatcher controlls all N registered attributes during a full cycle,
- * which duration T is about 4 hours. During one cycle, n sub-controls ("steps"
- * henceforth) are done, for N/n attributes each time (n is chosen so that the
- * control state is refreshed often, and that the database isn't accessed too
- * frequently).
- * 
- * Commands suffixed by "Current" return control information related to the
- * current step, ie. information that is refreshed about every 10 seconds.
- * Commands suffixed by "LatestError" return control information related to the
- * latest full cycle having KO attributes, ie. information that is refreshed
- * about every 4 hours.
- * 
- * Once a cycle has KO attributes, the device's state becomes ALARM, and stays
- * the same even if later cycles have none. This is so that the operator is
- * warned of the archiving problem. After he is, he can "reset" the device's
- * state to normal.
- * 
- * @author $Author: pierrejoseph $
- * @version $Revision: 1.12 $
- */
-
-// --------- Start of States Description ----------
-/*
- * Device States Description: DevState.ON : Controlling. DevState.OFF : Standby.
- * DevState.FAULT : Problem to connect to the database or other severe device
- * conditions. DevState.INIT : Device was started, but no control step has been
- * completed yet. Please Wait. DevState.ALARM : Archiving problems have been
- * detected during this cycle or a previous cycle.
- */
-// --------- End of States Description ----------
-@Deprecated
-public class TdbArchivingWatcher extends AbsArchivingWatcher {
-    // private int state;
-    private final String m_version;
-    // --------- Start of attributes data members ----------
-
-    protected short[] attr_ArchivingHealth_read = new short[1];
-    protected String[] attr_FormattedReport_read = new String[10000];
-
-    private ArchivingAttributeComparator archivingAttributeComparator;
-
-    // --------- End of attributes data members ----------
-
-    // Add your own data members here
-    private ControlResult controlResult;
-
-    private IDelayManager delayManager;
-
-    // --------------------------------------
-
-    // =========================================================
-    /**
-     * Constructor for simulated Time Device Server.
-     * 
-     * @param cl
-     *            The DeviceClass object
-     * @param s
-     *            The Device name.
-     * @param version
-     *            The device version
-     */
-    TdbArchivingWatcher(final DeviceClass cl, final String s, final String version) throws DevFailed {
-        super(cl, s);
-        this.m_version = version;
-        this.init_device();
-    }
-
-    // =========================================================
-    /**
-     * Constructor for simulated Time Device Server.
-     * 
-     * @param cl
-     *            The DeviceClass object
-     * @param s
-     *            The Device name.
-     * @param d
-     *            Device description.
-     * @param version
-     *            The device version
-     */
-    TdbArchivingWatcher(final DeviceClass cl, final String s, final String d, final String version) throws DevFailed {
-        super(cl, s, d);
-        this.m_version = version;
-        this.init_device();
-    }
-
-    //
-    @Override
-    protected DbDatum getClassProperty(final String name) {
-        final TdbArchivingWatcherClass ds_class = (TdbArchivingWatcherClass) super.get_device_class();
-        return ds_class.get_class_property(name);
-    }
-
-    // =========================================================
-    /**
-     * Initialize the device.
-     */
-    // =========================================================
-    @Override
-    public void init_device() throws DevFailed {
-        this.get_device_property();
-        this.initTdbConnectionInfos();
-
-        // Initialise variables to default values
-        // super.initArchivingDataWatch();
-
-        this.initLifeCycleManager(DBtype.TDB);
-        this.delayManager = this.getDelayManager();
-        this.archivingAttributeComparator = new ArchivingAttributeComparator();
-    }
-
-    /**
-     * ask all archivers for their KO attributes
-     * 
-     * @return
-     * @throws DevFailed
-     */
-    public String[] getKOAttributesFromArchivers(final boolean doRetry) throws DevFailed {
-
-        final List<String> archiversStatus = new ArrayList<String>();
-        final String[] archiverNames = ApiUtil.get_db_obj().get_device_exported_for_class(
-                TdbArchivingManagerApiRef.CLASS_DEVICE);
-        final Group group = new Group("archivers");
-        group.add(archiverNames);
-        final GroupCmdReplyList replies = group.command_inout("GetKOAttributes", true);
-        for (final Object reply : replies) {
-            final GroupCmdReply r = (GroupCmdReply) reply;
-            try {
-                final DeviceData result = r.get_data();
-                final String archiverStatus = r.dev_name() + " " + Arrays.toString(result.extractStringArray());
-                archiversStatus.add(archiverStatus);
-                if (doRetry) {
-                    new DeviceProxy(r.dev_name()).command_inout_asynch("RetryForAttribute", result, true);
-                }
-            } catch (final DevFailed e) {
-                archiversStatus.add(r.dev_name() + " ERROR");
-            }
-        }
-        return archiversStatus.toArray(new String[archiversStatus.size()]);
-    }
-
-    // =========================================================
-    /**
-     * Method always executed before command execution.
-     */
-    // =========================================================
-    @Override
-    public void always_executed_hook() {
-        // get_logger().info("In always_executed_hook method()");
-    }
-
-    // ===================================================================
-
-    // ===================================================================
-    /**
-     * Method called by the read_attributes CORBA operation to read device
-     * hardware
-     * 
-     * @param attr_list
-     *            Vector of index in the attribute vector of attribute to be
-     *            read
-     * @throws DevFailed
-     */
-    // ===================================================================
-    @Override
-    public void read_attr_hardware(@SuppressWarnings("rawtypes") final Vector attr_list) throws DevFailed {
-        this.controlResult = this.updateControlResult();
-    }
-
-    // ===================================================================
-    /**
-     * Method called by the read_attributes CORBA operation to set internal
-     * attribute value.
-     * 
-     * @param attr
-     *            reference to the Attribute object
-     */
-    // ===================================================================
-    @Override
-    public void read_attr(final Attribute attr) throws DevFailed {
-        final String attr_name = attr.get_name();
-
-        // Switch on attribute name
-        if (attr_name.equals("ArchivingHealth")) {
-            final int code = this.controlResult == null ? ControlResult.NOT_READY : this.controlResult.getCode();
-            attr.set_value((short) code);
-        } else if (attr_name.equals("FormattedReport")) {
-            final String report = this.controlResult == null ? ControlResult.EMPTY_REPORT : this.controlResult
-                    .getReport();
-            final String[] res = new String[1];
-            res[0] = report;
-            attr.set_value(res, 1);
-        } else if (attr_name == "version") {
-            // Add your own code here
-            attr.set_value(this.m_version);
-        } else if (attr_name == "koAttributes") {
-            attr.set_value(this.controlResult.getNumberOfKoAttributes());
-        } else if (attr_name == "nullAttributes") {
-            attr.set_value(this.controlResult.getNumberOfAttributesControlledWithSuccessWithNullValue());
-        }
-        // ---------------------------------
-    }
-
-    // =========================================================
-    /**
-     * Execute command "GetReport" on device. Returns the complete formatted
-     * report
-     * 
-     * @return The complete formatted report
-     */
-    // =========================================================
-    private String get_report(final ControlResult _controlResult) throws DevFailed {
-        final String empty = ControlResult.EMPTY_REPORT;
-        if (_controlResult == null) {
-            return empty;
-        }
-
-        return _controlResult.getReport();
-    }
-
-    // =========================================================
-    /**
-     * Execute command "IsAttributeCorrectlyArchived" on device. Returns true if
-     * archiving works correctly for this attribute
-     * 
-     * @param argin
-     *            The complete name of the attribute
-     * @return True if archiving works correctly for this attribute
-     */
-    // =========================================================
-    private boolean is_attribute_correctly_archived(final String argin, final ControlResult _controlResult)
-            throws DevFailed {
-        if (_controlResult == null) {
-            throw new DevFailed(TdbArchivingWatcher.getNotYetReadyError());
-        }
-
-        return _controlResult.isAttributeCorrectlyArchived(argin);
-    }
-
-    private static DevError[] getNotYetReadyError() {
-        final ErrSeverity severity = ErrSeverity.WARN;
-        final String reason = ControlResult.EMPTY_REPORT;
-        final String desc = ControlResult.EMPTY_REPORT;
-        final String origin = ControlResult.EMPTY_REPORT;
-
-        final DevError devError = new DevError(reason, severity, desc, origin);
-        final DevError[] ret = new DevError[1];
-        ret[0] = devError;
-        return ret;
-    }
-
-    // =========================================================
-    /**
-     * Execute command "Start" on device. Starts archiving control with default
-     * parameters. Use start_absolute or start_relative to specify those
-     * parameters.
-     */
-    // =========================================================
-    public void start() throws DevFailed {
-        this.get_logger().info("Entering start()");
-
-        // ---Add your Own code to control device here ---
-        this.getLifeCycleManager().startProcessing();
-        // ---END
-
-        this.get_logger().info("Exiting start()");
-    }
-
-    // =========================================================
-    /**
-     * Execute command "StartAbsolute" on device. Starts archiving control in
-     * the specified absolute mode. In this mode, the period that is effectively
-     * controlled is the theoretical period + a fixed duration (hence the name
-     * 'absolute')
-     * 
-     * @param argin
-     *            The absolute mode parameters: argin[0] = the duration amount,
-     *            argin[1] = the duration nature (1=seconds, 2=minutes, 3=hours)
-     */
-    // =========================================================
-    public void start_absolute(final int[] argin) throws DevFailed {
-        this.get_logger().info("Entering start_absolute()");
-
-        // ---Add your Own code to control device here ---
-        if (argin == null || argin.length != 2) {
-            DevFailedUtils.throwDevFailed("Needs 2 int parameters: [ amount , type ]");
-        }
-
-        // final int amount = argin[0];
-        // final int type = argin[1];
-        // SaferPeriodCalculatorFactory.getAbsoluteImpl(amount, type);
-
-        this.start();
-        // ---END
-
-        this.get_logger().info("Exiting start_absolute()");
-    }
-
-    // =========================================================
-    /**
-     * Execute command "StartRelative" on device. Starts archiving control in
-     * the specified relative mode. In this mode, the period that is effectively
-     * controlled is the theoretical period * a multipier (hence the name
-     * 'relative')
-     * 
-     * @param argin
-     *            The multiplier
-     */
-    // =========================================================
-    public void start_relative(final double argin) throws DevFailed {
-        this.get_logger().info("Entering start_absolute()");
-
-        // ---Add your Own code to control device here ---
-        if (argin <= 0) {
-            DevFailedUtils.throwDevFailed("The multiplier has to be > 0");
-        }
-
-        // SaferPeriodCalculatorFactory.getRelativeImpl(argin);
-
-        this.start();
-        // ---END
-
-        this.get_logger().info("Exiting start_absolute()");
-    }
-
-    // =========================================================
-    /**
-     * Execute command "Stop" on device. Stops archiving control, puts device in
-     * standby
-     * 
-     */
-    // =========================================================
-    public void stop() throws DevFailed {
-        this.get_logger().info("Entering stop()");
-
-        // ---Add your Own code to control device here ---
-        this.getLifeCycleManager().stopProcessing();
-        // this.warnOff ();
-        // ---END
-
-        this.get_logger().info("Exiting stop()");
-    }
-
-    // =========================================================
-    /**
-     * Execute command "GetErrorArchiversCurrent" on device. Lists the archivers
-     * that had at least one attribute incorrectly archived during the current
-     * control cycle. Partially refreshed every time an attribute is controlled
-     * (at worst every 10 seconds)
-     * 
-     * @return The list of archivers that have at least one KO attribute.
-     */
-    // =========================================================
-    public String[] get_error_archivers_current() throws DevFailed {
-        // final IDelayManager delayManager =
-        // DelayManagerFactory.getCurrentImpl();
-        final ControlResult _controlResult = this.delayManager.getControlResult(IDelayManager.READ_ROLLOVER);
-
-        return this.get_error_archivers(_controlResult);
-    }
-
-    // =========================================================
-    /**
-     * Execute command "Reset" on device. This is used after a KO control cycle
-     * has set the state to ALARM, to notify the device that the user has seen
-     * the ALARM state. Resets the state to its former value.
-     */
-    // =========================================================
-    public void reset() throws DevFailed {
-        this.get_logger().info("Entering reset()");
-
-        // ---Add your Own code to control device here ---
-        if (this.get_state().value() != DevState._ALARM) {
-            // do nothing
-            return;
-        }
-        this.initLifeCycleManager(DBtype.TDB);
-        this.get_logger().info("Exiting reset()");
-    }
-
-    // =========================================================
-    /**
-     * Execute command "Restart" on device. Restarts the device.
-     */
-    // =========================================================
-    public void restart() throws DevFailed {
-        this.get_logger().info("Entering restart()");
-
-        // complete stop
-        final DefaultLifeCycleManager lifeCycleManager = this.getLifeCycleManager();
-        lifeCycleManager.stopProcessing();
-
-        final Thread watcherThread = lifeCycleManager.getAsThread();
-        try {
-            watcherThread.join(1000);
-        } catch (final InterruptedException e) {
-            DevFailedUtils.throwDevFailed(e);
-        }
-
-        // restarting
-        this.init_device();
-        this.get_logger().info("Exiting restart()");
-    }
-
-    // =========================================================
-    /**
-     * Execute command "GetErrorsForDomain" on device. Lists KO attributes for
-     * this domain
-     * 
-     * @param argin
-     *            The domain name
-     * @return The list of KO attributes for this domain.
-     */
-    // =========================================================
-    private String[] get_errors_for_domain(final String argin, final ControlResult _controlResult) throws DevFailed {
-        final String[] empty = new String[0];
-        if (_controlResult == null) {
-            return empty;
-        }
-
-        final Map<String, Domain> _errorDomains = _controlResult.getErrorDomains();
-        if (_errorDomains == null) {
-            return empty;
-        }
-
-        final Domain domain = _errorDomains.get(argin);
-        if (domain == null) {
-            return empty;
-        }
-
-        final Map<String, ArchivingAttribute> _errorAttributes = domain.getKOAttributes();
-        if (_errorAttributes == null) {
-            return empty;
-        }
-
-        final String[] argout = new String[_errorAttributes.size()];
-
-        final List<ArchivingAttribute> list = new Vector<ArchivingAttribute>();
-        list.addAll(_errorAttributes.values());
-        Collections.sort(list, this.archivingAttributeComparator);
-        final Iterator<ArchivingAttribute> it = list.iterator();
-
-        int i = 0;
-        while (it.hasNext()) {
-            final ArchivingAttribute key = it.next();
-            argout[i] = key.getCompleteName();
-            i++;
-        }
-
-        return argout;
-    }
-
-    // =========================================================
-    /**
-     * Execute command "GetErrorsForAttribute" on device. Returns the list of KO
-     * attributes for this attribute name
-     * 
-     * @param argin
-     *            The NOT complete name of the attribute
-     * @return The list of KO attributes for this attribute name
-     */
-    // =========================================================
-    private String[] get_errors_for_attribute(final String argin, final ControlResult _controlResult) throws DevFailed {
-        final String[] empty = new String[0];
-        if (_controlResult == null) {
-            return empty;
-        }
-
-        final Map<String, ArchivingAttributeSubName> _errorAttributeSubNames = _controlResult.getErrorSubAttributes();
-        if (_errorAttributeSubNames == null) {
-            return empty;
-        }
-
-        final ArchivingAttributeSubName attributeSubName = _errorAttributeSubNames.get(argin);
-        if (attributeSubName == null) {
-            return empty;
-        }
-
-        final Map<String, ArchivingAttribute> _errorAttributes = attributeSubName.getKOAttributes();
-        if (_errorAttributes == null) {
-            return empty;
-        }
-
-        final String[] argout = new String[_errorAttributes.size()];
-
-        final List<ArchivingAttribute> list = new Vector<ArchivingAttribute>();
-        list.addAll(_errorAttributes.values());
-        Collections.sort(list, this.archivingAttributeComparator);
-        final Iterator<ArchivingAttribute> it = list.iterator();
-
-        int i = 0;
-        while (it.hasNext()) {
-            final ArchivingAttribute key = it.next();
-            argout[i] = key.getCompleteName();
-            i++;
-        }
-
-        return argout;
-    }
-
-    // =========================================================
-    /**
-     * Execute command "GetReportCurrent" on device. Returns a formatted report
-     * representing the current control cycle results. Partially refreshed every
-     * time an attribute is controlled (at worst every 10 seconds)
-     * 
-     * @return The report
-     */
-    // =========================================================
-    public String get_report_current() throws DevFailed {
-        // final IDelayManager delayManager =
-        // DelayManagerFactory.getCurrentImpl();
-        final ControlResult _controlResult = this.delayManager.getControlResult(IDelayManager.READ_ROLLOVER);
-        // ControlResult _controlResult = delayManager.getControlResult (
-        // IDelayManager.READ_ROLLOVER );
-
-        return this.get_report(_controlResult);
-    }
-
-    // =========================================================
-    /**
-     * Execute command "GetReportLatestError" on device. Returns a formatted
-     * report representing the latest KO control cycle results. (a control cycle
-     * becomes KO when it has at least one KO atribute, and until the user
-     * cleans the state via the "reset" command or another cycle is KO)
-     * 
-     * @return The report
-     */
-    // =========================================================
-    public String get_report_latest_error() throws DevFailed {
-        // final IDelayManager delayManager =
-        // DelayManagerFactory.getCurrentImpl();
-        final ControlResult _controlResult = this.delayManager.getControlResult(IDelayManager.READ_LATEST_BAD_CYCLE);
-
-        return this.get_report(_controlResult);
-    }
-
-    // =========================================================
-    /**
-     * Execute command "IsAttributeCorrectlyArchivedCurrent" on device. Returns
-     * whether the specified attribute was correctly archiving during the
-     * current control cycle. Partially refreshed every time an attribute is
-     * controlled (at worst every 10 seconds)
-     * 
-     * @param argin
-     *            The attribute complete name
-     * @return True if archiving works correctly for this attribute
-     */
-    // =========================================================
-    public boolean is_attribute_correctly_archived_current(final String argin) throws DevFailed {
-        // final IDelayManager delayManager =
-        // DelayManagerFactory.getCurrentImpl();
-        final ControlResult _controlResult = this.delayManager.getControlResult(IDelayManager.READ_ROLLOVER);
-
-        return this.is_attribute_correctly_archived(argin, _controlResult);
-    }
-
-    // =========================================================
-    /**
-     * Execute command "IsAttributeCorrectlyArchivedLatestError" on device.
-     * Returns whether the specified attribute was correctly archiving during
-     * the current control cycle. (a control cycle becomes KO when it has at
-     * least one KO atribute, and until the user cleans the state via the
-     * "reset" command or another cycle is KO)
-     * 
-     * @param argin
-     *            The attribute complete name
-     * @return True if archiving works correctly for this attribute
-     */
-    // =========================================================
-    public boolean is_attribute_correctly_archived_latest_error(final String argin) throws DevFailed {
-        // final IDelayManager delayManager =
-        // DelayManagerFactory.getCurrentImpl();
-        final ControlResult _controlResult = this.delayManager.getControlResult(IDelayManager.READ_LATEST_BAD_CYCLE);
-
-        return this.is_attribute_correctly_archived(argin, _controlResult);
-    }
-
-    // =========================================================
-    /**
-     * Execute command "GetErrorArchiversLatestError" on device. Lists the
-     * archivers that had at least one attribute incorrectly archived during the
-     * latest KO control cycle. (a control cycle becomes KO when it has at least
-     * one KO atribute, and until the user cleans the state via the "reset"
-     * command or another cycle is KO)
-     * 
-     * @return The list of archivers that had at least one KO attribute.
-     */
-    // =========================================================
-    public String[] get_error_archivers_latest_error() throws DevFailed {
-        // final IDelayManager delayManager =
-        // DelayManagerFactory.getCurrentImpl();
-        final ControlResult _controlResult = this.delayManager.getControlResult(IDelayManager.READ_LATEST_BAD_CYCLE);
-
-        return this.get_error_archivers(_controlResult);
-    }
-
-    // =========================================================
-    /**
-     * Execute command "GetErrorsForArchiverCurrent" on device. Lists the KO
-     * attributes for a given archiver during the current control cycle.
-     * Partially refreshed every time an attribute is controlled (at worst every
-     * 10 seconds)
-     * 
-     * @param argin
-     *            The name of the archiver
-     * @return The list of KO attributes for this archiver
-     */
-    // =========================================================
-    public String[] get_errors_for_archiver_current(final String argin) throws DevFailed {
-        // final IDelayManager delayManager =
-        // DelayManagerFactory.getCurrentImpl();
-        final ControlResult _controlResult = this.delayManager.getControlResult(IDelayManager.READ_ROLLOVER);
-
-        return this.get_errors_for_archiver(argin, _controlResult);
-    }
-
-    // =========================================================
-    /**
-     * Execute command "GetErrorsForArchiverLatestError" on device. Lists the KO
-     * attributes for a given archiver during the latest KO control cycle. (a
-     * control cycle becomes KO when it has at least one KO atribute, and until
-     * the user cleans the state via the "reset" command or another cycle is KO)
-     * 
-     * @param argin
-     *            The name of the archiver
-     * @return The list of KO attributes for this archiver
-     */
-    // =========================================================
-    public String[] get_errors_for_archiver_latest_error(final String argin) throws DevFailed {
-        // final IDelayManager delayManager =
-        // DelayManagerFactory.getCurrentImpl();
-        final ControlResult _controlResult = this.delayManager.getControlResult(IDelayManager.READ_LATEST_BAD_CYCLE);
-
-        return this.get_errors_for_archiver(argin, _controlResult);
-    }
-
-    // =========================================================
-    /**
-     * Execute command "GetAllArchivingAttributes" on device. Lists all TDB
-     * archiving attributes (does a new request regardless of the watcher
-     * cycle).
-     * 
-     * @return The list of all TDB archiving attributes.
-     */
-    // =========================================================
-    public String[] get_all_archiving_attributes() throws DevFailed {
-        String[] ret = null;
-
-        try {
-            final Map<String, ModeData> all = this.dbReader.getArchivedAttributes();
-            if (all != null) {
-                ret = new String[all.size()];
-            } else {
-                return null;
-            }
-
-            final ControlResult cr = this.buildControlResult();
-            cr.setAllArchivingAttributes(all);
-            final ControlResultLine[] orderedLines = cr.sort();
-
-            for (int i = 0; i < all.size(); i++) {
-                ret[i] = orderedLines[i].getAttribute().getCompleteName();
-                final Mode mode = this.dbReader.getModeForAttribute(ret[i]);
-                if (mode != null) {
-                    ret[i] += ": " + mode.toStringWatcher();
-                }
-            }
-        } catch (final Exception e) {
-            this.logger.error("get_all_archiving_attributes/error! VVVVVVVVVVVVVVVVV", e);
-            DevFailedUtils.throwDevFailed(e);
-        }
-
-        return ret;
-    }
-
-    // =========================================================
-    /**
-     * Execute command "GetErrorDomainsCurrent" on device. Lists the domains
-     * that had at least one attribute incorrectly archived during the current
-     * control cycle. Partially refreshed every time an attribute is controlled
-     * (at worst every 10 seconds)
-     * 
-     * @return The list of archivers that have at least one KO attribute.
-     */
-    // =========================================================
-    public String[] get_error_domains_current() throws DevFailed {
-        // final IDelayManager delayManager =
-        // DelayManagerFactory.getCurrentImpl();
-        final ControlResult _controlResult = this.delayManager.getControlResult(IDelayManager.READ_ROLLOVER);
-
-        return this.get_error_domains(_controlResult);
-    }
-
-    // =========================================================
-    /**
-     * Execute command "GetErrorDomainsLatestError" on device. Lists the domains
-     * that had at least one attribute incorrectly archived during the latest KO
-     * control cycle. (a control cycle becomes KO when it has at least one KO
-     * atribute, and until the user cleans the state via the "reset" command or
-     * another cycle is KO)
-     * 
-     * @return The list of archivers that had at least one KO attribute.
-     */
-    // =========================================================
-    public String[] get_error_domains_latest_error() throws DevFailed {
-        // final IDelayManager delayManager =
-        // DelayManagerFactory.getCurrentImpl();
-        final ControlResult _controlResult = this.delayManager.getControlResult(IDelayManager.READ_LATEST_BAD_CYCLE);
-
-        return this.get_error_domains(_controlResult);
-    }
-
-    // =========================================================
-    /**
-     * Execute command "GetErrorsForDomainCurrent" on device. Lists the KO
-     * attributes for a given domain during the current control cycle. Partially
-     * refreshed every time an attribute is controlled (at worst every 10
-     * seconds)
-     * 
-     * @param argin
-     *            The name of the domain
-     * @return The list of KO attributes for this domain
-     */
-    // =========================================================
-    public String[] get_errors_for_domain_current(final String argin) throws DevFailed {
-        // final IDelayManager delayManager =
-        // DelayManagerFactory.getCurrentImpl();
-        final ControlResult _controlResult = this.delayManager.getControlResult(IDelayManager.READ_ROLLOVER);
-
-        return this.get_errors_for_domain(argin, _controlResult);
-    }
-
-    // =========================================================
-    /**
-     * Execute command "GetErrorsForDomainLatestError" on device. Lists the KO
-     * attributes for a given domain during the current control cycle. (a
-     * control cycle becomes KO when it has at least one KO atribute, and until
-     * the user cleans the state via the "reset" command or another cycle is KO)
-     * 
-     * @param argin
-     *            The name of the domain
-     * @return The list of KO attributes for this domain
-     */
-    // =========================================================
-    public String[] get_errors_for_domain_latest_error(final String argin) throws DevFailed {
-        // final IDelayManager delayManager =
-        // DelayManagerFactory.getCurrentImpl();
-        final ControlResult _controlResult = this.delayManager.getControlResult(IDelayManager.READ_LATEST_BAD_CYCLE);
-
-        return this.get_errors_for_domain(argin, _controlResult);
-    }
-
-    // =========================================================
-    /**
-     * Execute command "GetErrorsForAttributeCurrent" on device. Lists the KO
-     * attributes with a given name during the current control cycle. Partially
-     * refreshed every time an attribute is controlled (at worst every 10
-     * seconds)
-     * 
-     * @param argin
-     *            The attribute (NOT the complete name)
-     * @return The list of KO attributes with this name
-     */
-    // =========================================================
-    public String[] get_errors_for_attribute_current(final String argin) throws DevFailed {
-        // final IDelayManager delayManager =
-        // DelayManagerFactory.getCurrentImpl();
-        final ControlResult _controlResult = this.delayManager.getControlResult(IDelayManager.READ_ROLLOVER);
-
-        return this.get_errors_for_attribute(argin, _controlResult);
-    }
-
-    // =========================================================
-    /**
-     * Execute command "GetErrorsForAttributeLatestError" on device. Lists the
-     * KO attributes with a given name during the current control cycle. (a
-     * control cycle becomes KO when it has at least one KO atribute, and until
-     * the user cleans the state via the "reset" command or another cycle is KO)
-     * 
-     * @param argin
-     *            The attribute (NOT the complete name)
-     * @return The list of KO attributes with this name
-     */
-    // =========================================================
-    public String[] get_errors_for_attribute_latest_error(final String argin) throws DevFailed {
-        // final IDelayManager delayManager =
-        // DelayManagerFactory.getCurrentImpl();
-        final ControlResult _controlResult = this.delayManager.getControlResult(IDelayManager.READ_LATEST_BAD_CYCLE);
-
-        return this.get_errors_for_attribute(argin, _controlResult);
-    }
-
-    // =========================================================
-    /**
-     * main part for the device server class
-     */
-    // =========================================================
-    public static void main(final String[] argv) {
-        try {
-            final Util tg = Util.init(argv, "TdbArchivingWatcher");
-            tg.server_init();
-
-            System.out.println("Ready to accept request");
-
-            tg.server_run();
-        }
-
-        catch (final OutOfMemoryError ex) {
-            System.err.println("Can't allocate memory !!!!");
-            System.err.println("Exiting");
-        } catch (final UserException ex) {
-            Except.print_exception(ex);
-
-            System.err.println("Received a CORBA user exception");
-            System.err.println("Exiting");
-        } catch (final SystemException ex) {
-            Except.print_exception(ex);
-
-            System.err.println("Received a CORBA system exception");
-            System.err.println("Exiting");
-        }
-
-        System.exit(-1);
-    }
-
-    /**
-     * 
-     * @return Watcher Archiving Report
-     */
-    public void start_archiving_report() throws DevFailed {
-        // TODO Auto-generated method stub
-        try {
-            if (this.dbReader.getDatabase().isMySQL()) {
-                Except.throw_exception("DATABASE_ERROR", "MySql Exception", "MySql is not supported for this command ");
-                return;
-            }
-            this.dbReader.startArchivingReport();
-        } catch (final DevFailed e) {
-            // TODO Auto-generated catch block
-            e.printStackTrace();
-        }
-
-    }
-
-    /**
-     * 
-     * @return Watcher database Report
-     */
-    public String[] get_database_report() {
-        // TODO Auto-generated method stub
-        try {
-            if (this.dbReader.getDatabase().isMySQL()) {
-                Except.throw_exception("DATABASE_ERROR", "MySql Exception", "MySql is not supported for this command ");
-            }
-            return this.dbReader.getDatabaseReport();
-        } catch (final DevFailed e) {
-            // TODO Auto-generated catch block
-            e.printStackTrace();
-        }
-        return null;
-    }
-
-    /**
-     * 
-     * @return Watcher attributes count
-     */
-    public int get_current_archiving_attributes_count() throws DevFailed {
-        // TODO Auto-generated method stub
-
-        try {
-            return this.dbReader.getDatabase().getMode().getCurrentArchivedAttCount();
-        } catch (final ArchivingException e) {
-            // TODO Auto-generated catch block
-            e.printStackTrace();
-        }
-        return 0;
-    }
-
-    /**
-     * 
-     * @return Watcher KO attributes count
-     */
-    public int get_ko_attributes_count() throws DevFailed {
-        // TODO Auto-generated method stub
-
-        try {
-            if (this.dbReader.getDatabase().isMySQL()) {
-                Except.throw_exception("DATABASE_ERROR", "MySql Exception", "MySql is not supported for this command ");
-            }
-            return this.dbReader.getDatabase().getDbUtil().getAttributesCountOkOrKo(false);
-        } catch (final ArchivingException e) {
-            // TODO Auto-generated catch block
-            e.printStackTrace();
-        }
-        return 0;
-    }
-
-    /**
-     * 
-     * @return Watcher OK attributes count
-     */
-    public int get_ok_attributes_count() throws DevFailed {
-        // TODO Auto-generated method stub
-
-        try {
-            if (this.dbReader.getDatabase().isMySQL()) {
-                Except.throw_exception("DATABASE_ERROR", "MySql Exception", "MySql is not supported for this command ");
-            }
-            return this.dbReader.getDatabase().getDbUtil().getAttributesCountOkOrKo(true);
-        } catch (final ArchivingException e) {
-            // TODO Auto-generated catch block
-            e.printStackTrace();
-        }
-        return 0;
-    }
-
-    /**
-     * 
-     * @return Watcher list of ko attributes
-     */
-    public String[] get_ko_attributes() throws DevFailed {
-        // TODO Auto-generated method stub
-
-        try {
-            if (this.dbReader.getDatabase().isMySQL()) {
-                Except.throw_exception("DATABASE_ERROR", "MySql Exception", "MySql is not supported for this command ");
-            }
-
-            return this.dbReader.getDatabase().getDbUtil().getKoAttributes();
-        } catch (final ArchivingException e) {
-            // TODO Auto-generated catch block
-            e.printStackTrace();
-        }
-
-        return null;
-    }
-
-    /**
-     * 
-     * @return Watcher list of oracle databse partitions
-     */
-    public String[] get_partitions() throws DevFailed {
-        // TODO Auto-generated method stub
-
-        try {
-            if (this.dbReader.getDatabase().isMySQL()) {
-                Except.throw_exception("DATABASE_ERROR", "MySql Exception", "MySql is not supported for this command ");
-            }
-
-            return this.dbReader.getDatabase().getDbUtil().getListOfPartitions();
-        } catch (final ArchivingException e) {
-            // TODO Auto-generated catch block
-            e.printStackTrace();
-        }
-
-        return null;
-    }
-
-    /**
-     * 
-     * @return Watcher list of job status
-     */
-    public String[] get_job_status() throws DevFailed {
-        // TODO Auto-generated method stub
-
-        try {
-            if (this.dbReader.getDatabase().isMySQL()) {
-                Except.throw_exception("DATABASE_ERROR", "MySql Exception", "MySql is not supported for this command ");
-            }
-            final String[] res = { "No Job Status" };
-
-            final String[] tmp = this.dbReader.getDatabase().getDbUtil().getListOfJobStatus();
-            if (tmp == null) {
-                return res;
-            } else {
-                return tmp;
-            }
-        } catch (final ArchivingException e) {
-            // TODO Auto-generated catch block
-            e.printStackTrace();
-        }
-
-        return null;
-    }
-
-    /**
-     * 
-     * @return Watcher list of oracle databse partitions
-     */
-    public String[] get_job_errors() throws DevFailed {
-        // Auto-generated method stub
-
-        try {
-            if (this.dbReader.getDatabase().isMySQL()) {
-                Except.throw_exception("DATABASE_ERROR", "MySql Exception", "MySql is not supported for this command ");
-            }
-            final String[] res = { "No Job Errors" };
-            final String[] tmp = this.dbReader.getDatabase().getDbUtil().getListOfJobErrors();
-            if (tmp == null) {
-                return res;
-            } else {
-                return tmp;
-            }
-        } catch (final ArchivingException e) {
-            // TODO Auto-generated catch block
-            e.printStackTrace();
-        }
-
-        return null;
-    }
-
-    /**
-     * get ko attributes by archiver device
-     * 
-     * @return
-     */
-    public String[] get_ko_attributes_count_by_device() throws DevFailed {
-        // TODO Auto-generated method stub
-
-        try {
-            if (this.dbReader.getDatabase().isMySQL()) {
-                Except.throw_exception("DATABASE_ERROR", "MySql Exception", "MySql is not supported for this command ");
-            }
-
-            return this.dbReader.getDatabase().getDbUtil().getKOAttrCountByDevice();
-
-        } catch (final ArchivingException e) {
-            // TODO Auto-generated catch block
-            e.printStackTrace();
-        }
-
-        return null;
-    }
-
-    /**
-     * return in % the feedalive procedure progression level
-     * 
-     * @return
-     */
-    public int get_feedalive_progression_level() throws DevFailed {
-        // TODO Auto-generated method stub
-
-        try {
-            if (this.dbReader.getDatabase().isMySQL()) {
-                Except.throw_exception("DATABASE_ERROR", "MySql Exception", "MySql is not supported for this command ");
-            }
-
-            return this.dbReader.getDatabase().getDbUtil().getFeedAliveProgression();
-
-        } catch (final ArchivingException e) {
-            // TODO Auto-generated catch block
-            e.printStackTrace();
-        }
-
-        return 0;
-    }
-
-    // =========================================================
-
-    @Override
-    public void delete_device() throws DevFailed {
-        // TODO Auto-generated method stub
-
-    }
-
-}
-
-// --------------------------------------------------------------------------
-/*
- * end of $Source:
- * /cvsroot/tango-cs/tango/jserver/archiving/TdbArchivingWatcher/
- * TdbArchivingWatcher.java,v $
- */
diff --git a/src/main/java/TdbArchivingWatcher/TdbArchivingWatcherClass.java b/src/main/java/TdbArchivingWatcher/TdbArchivingWatcherClass.java
deleted file mode 100644
index 890294484aa07208b40e04edf8d1d21fd51ce71a..0000000000000000000000000000000000000000
--- a/src/main/java/TdbArchivingWatcher/TdbArchivingWatcherClass.java
+++ /dev/null
@@ -1,453 +0,0 @@
-//+======================================================================
-// $Source: /cvsroot/tango-cs/tango/jserver/archiving/TdbArchivingWatcher/TdbArchivingWatcherClass.java,v $
-//
-// Project:   	Tango Device Server
-//
-// Description:	java source code for the ArchivingWatcher class .
-//              This class is a singleton class and implements everything
-//              which exists only once for all the  ArchivingWatcher object
-//              It inherits from the DeviceClass class.
-//
-// $Author: pierrejoseph $
-//
-// $Revision: 1.3 $
-//
-// $Log: TdbArchivingWatcherClass.java,v $
-// Revision 1.3  2007/05/11 13:58:53  pierrejoseph
-// Attribute addition : release version
-//
-// Revision 1.2  2006/09/07 15:13:16  ounsy
-// added the getAllArchivingAttributes command
-//
-// Revision 1.1  2006/08/24 13:52:22  ounsy
-// creation
-//
-// Revision 1.4  2006/05/03 09:50:53  ounsy
-// added a restart command that does the same as restarting the device
-//
-// Revision 1.3  2006/03/08 14:36:21  ounsy
-// added pogo comments
-//
-// Revision 1.2  2006/01/27 13:08:18  ounsy
-// New commands to start archiving control in absolute/relative mode
-//
-// Revision 1.1  2006/01/19 16:36:59  ounsy
-// New device specialised in watching archiving.
-//
-//
-// copyleft :    European Synchrotron Radiation Facility
-//               BP 220, Grenoble 38043
-//               FRANCE
-//
-//-======================================================================
-//
-//  		This file is generated by POGO
-//	(Program Obviously used to Generate tango Object)
-//
-//         (c) - Software Engineering Group - ESRF
-//=============================================================================
-
-package TdbArchivingWatcher;
-
-import java.util.ResourceBundle;
-import java.util.Vector;
-
-import TdbArchivingWatcher.Commands.GetAllArchivingAttributesClass;
-import TdbArchivingWatcher.Commands.GetErrorArchiversCurrentClass;
-import TdbArchivingWatcher.Commands.GetErrorArchiversLatestErrorClass;
-import TdbArchivingWatcher.Commands.GetErrorDomainsCurrentClass;
-import TdbArchivingWatcher.Commands.GetErrorDomainsLatestErrorClass;
-import TdbArchivingWatcher.Commands.GetErrorsForArchiverCurrentClass;
-import TdbArchivingWatcher.Commands.GetErrorsForArchiverLatestErrorClass;
-import TdbArchivingWatcher.Commands.GetErrorsForAttributeCurrentClass;
-import TdbArchivingWatcher.Commands.GetErrorsForAttributeLatestErrorClass;
-import TdbArchivingWatcher.Commands.GetErrorsForDomainCurrentClass;
-import TdbArchivingWatcher.Commands.GetErrorsForDomainLatestErrorClass;
-import TdbArchivingWatcher.Commands.GetReportCurrentClass;
-import TdbArchivingWatcher.Commands.GetReportLatestErrorClass;
-import TdbArchivingWatcher.Commands.IsAttributeCorrectlyArchivedCurrentClass;
-import TdbArchivingWatcher.Commands.IsAttributeCorrectlyArchivedLatestErrorClass;
-import TdbArchivingWatcher.Commands.ResetClass;
-import TdbArchivingWatcher.Commands.RestartClass;
-import TdbArchivingWatcher.Commands.StartAbsoluteClass;
-import TdbArchivingWatcher.Commands.StartClass;
-import TdbArchivingWatcher.Commands.StartRelativeClass;
-import TdbArchivingWatcher.Commands.StopClass;
-import TdbArchivingWatcher.Commands.AdminRepot.GetAttributesCountClass;
-import TdbArchivingWatcher.Commands.AdminRepot.GetFeedAliveProgressionClass;
-import TdbArchivingWatcher.Commands.AdminRepot.GetKOAttributesCountClass;
-import TdbArchivingWatcher.Commands.AdminRepot.GetKoCountByDeviceClass;
-import TdbArchivingWatcher.Commands.AdminRepot.GetListOfJobErrorsClass;
-import TdbArchivingWatcher.Commands.AdminRepot.GetListOfJobStatusClass;
-import TdbArchivingWatcher.Commands.AdminRepot.GetListOfKOAttributesClass;
-import TdbArchivingWatcher.Commands.AdminRepot.GetListOfPartitionsClass;
-import TdbArchivingWatcher.Commands.AdminRepot.GetOKAttributesCountClass;
-import TdbArchivingWatcher.Commands.AdminRepot.StartArchivingReportClass;
-import fr.esrf.Tango.AttrWriteType;
-import fr.esrf.Tango.DevFailed;
-import fr.esrf.Tango.DispLevel;
-import fr.esrf.TangoApi.DbDatum;
-import fr.esrf.TangoDs.Attr;
-import fr.esrf.TangoDs.DeviceClass;
-import fr.esrf.TangoDs.DeviceImpl;
-import fr.esrf.TangoDs.SpectrumAttr;
-import fr.esrf.TangoDs.TangoConst;
-import fr.esrf.TangoDs.TemplCommandInOut;
-import fr.esrf.TangoDs.UserDefaultAttrProp;
-import fr.esrf.TangoDs.Util;
-
-@Deprecated
-public class TdbArchivingWatcherClass extends DeviceClass implements TangoConst {
-    /**
-     * ArchivingWatcherClass class instance (it is a singleton).
-     */
-    private static TdbArchivingWatcherClass _instance = null;
-
-    /**
-     * Class properties array.
-     */
-    private DbDatum[] cl_prop = null;
-
-    // --------- Start of properties data members ----------
-
-    // --------- End of properties data members ----------
-
-    // ===================================================================
-    //
-    // method : instance()
-    //
-    // description : static method to retrieve the ArchivingWatcherClass object
-    // once it has been initialised
-    //
-    // ===================================================================
-    public static TdbArchivingWatcherClass instance() {
-	if (_instance == null) {
-	    System.err.println("ArchivingWatcherClass is not initialised !!!");
-	    System.err.println("Exiting");
-	    System.exit(-1);
-	}
-	return _instance;
-    }
-
-    // ===================================================================
-    //
-    // method : Init()
-    //
-    // description : static method to create/retrieve the ArchivingWatcherClass
-    // object. This method is the only one which enables a
-    // user to create the object
-    //
-    // in : - class_name : The class name
-    //
-    // ===================================================================
-    public static synchronized TdbArchivingWatcherClass init(String class_name) throws DevFailed {
-	if (_instance == null) {
-	    _instance = new TdbArchivingWatcherClass(class_name);
-	}
-	return _instance;
-    }
-
-    // ===================================================================
-    //
-    // method : ArchivingWatcherClass()
-    //
-    // description : constructor for the ArchivingWatcherClass class
-    //
-    // argument : in : - name : The class name
-    //
-    // ===================================================================
-    protected TdbArchivingWatcherClass(String name) throws DevFailed {
-	super(name);
-
-	Util.out2.println("Entering ArchivingWatcherClass constructor");
-	// write_class_property();
-	this.get_class_property();
-
-	Util.out2.println("Leaving ArchivingWatcherClass constructor");
-    }
-
-    // ===================================================================
-    //
-    // method : command_factory()
-    //
-    // description : Create the command object(s) and store them in the
-    // command list
-    // ===================================================================
-    @Override
-    public void command_factory() {
-	this.command_list.addElement(new GetAllArchivingAttributesClass(
-		"GetAllArchivingAttributes", Tango_DEV_VOID, Tango_DEVVAR_STRINGARRAY, "",
-		"The list of all TDB archiving attributes", DispLevel.OPERATOR));
-	this.command_list.addElement(new RestartClass("Restart", Tango_DEV_VOID, Tango_DEV_VOID,
-		"", "", DispLevel.OPERATOR));
-	this.command_list.addElement(new ResetClass("Reset", Tango_DEV_VOID, Tango_DEV_VOID, "",
-		"", DispLevel.OPERATOR));
-	this.command_list.addElement(new StartClass("Start", Tango_DEV_VOID, Tango_DEV_VOID, "",
-		"", DispLevel.OPERATOR));
-	this.command_list.addElement(new StopClass("Stop", Tango_DEV_VOID, Tango_DEV_VOID, "", "",
-		DispLevel.OPERATOR));
-	this.command_list.addElement(new GetReportCurrentClass("GetReportCurrent", Tango_DEV_VOID,
-		Tango_DEV_STRING, "", "The report for the current cycle", DispLevel.OPERATOR));
-	this.command_list.addElement(new GetReportLatestErrorClass("GetReportLatestError",
-		Tango_DEV_VOID, Tango_DEV_STRING, "", "The report for the latest KO cycle",
-		DispLevel.OPERATOR));
-	this.command_list
-		.addElement(new IsAttributeCorrectlyArchivedCurrentClass(
-			"IsAttributeCorrectlyArchivedCurrent", Tango_DEV_STRING, Tango_DEV_BOOLEAN,
-			"The attribute complete name",
-			"True if this attribute is archiving correctly (current cycle)",
-			DispLevel.OPERATOR));
-	this.command_list.addElement(new IsAttributeCorrectlyArchivedLatestErrorClass(
-		"IsAttributeCorrectlyArchivedLatestError", Tango_DEV_STRING, Tango_DEV_BOOLEAN,
-		"The attribute complete name",
-		"True if archiving works correctly for this attribute (latest KO cycle)",
-		DispLevel.OPERATOR));
-	this.command_list.addElement(new GetErrorArchiversCurrentClass("GetErrorArchiversCurrent",
-		Tango_DEV_VOID, Tango_DEVVAR_STRINGARRAY, "",
-		"The list of archivers that have at least one KO attribute (current cycle)",
-		DispLevel.OPERATOR));
-	this.command_list.addElement(new GetErrorArchiversLatestErrorClass(
-		"GetErrorArchiversLatestError", Tango_DEV_VOID, Tango_DEVVAR_STRINGARRAY, "",
-		"The list of archivers that have at least one KO attribute (latest KO cycle)",
-		DispLevel.OPERATOR));
-	this.command_list.addElement(new GetErrorsForArchiverCurrentClass(
-		"GetErrorsForArchiverCurrent", Tango_DEV_STRING, Tango_DEVVAR_STRINGARRAY,
-		"The name of the archiver",
-		"The list of KO attributes for this archiver (current cycle)", DispLevel.OPERATOR));
-	this.command_list
-		.addElement(new GetErrorsForArchiverLatestErrorClass(
-			"GetErrorsForArchiverLatestError", Tango_DEV_STRING,
-			Tango_DEVVAR_STRINGARRAY, "The name of the archiver",
-			"The list of KO attributes for this archiver (latest KO cycle)",
-			DispLevel.OPERATOR));
-	this.command_list.addElement(new GetErrorDomainsCurrentClass("GetErrorDomainsCurrent",
-		Tango_DEV_VOID, Tango_DEVVAR_STRINGARRAY, "",
-		"The list of domains that have at least one KO attribute (current cycle)",
-		DispLevel.OPERATOR));
-	this.command_list.addElement(new GetErrorDomainsLatestErrorClass(
-		"GetErrorDomainsLatestError", Tango_DEV_VOID, Tango_DEVVAR_STRINGARRAY, "",
-		"The list of domains that have at least one KO attribute (latest KO cycle)",
-		DispLevel.OPERATOR));
-	this.command_list.addElement(new GetErrorsForDomainCurrentClass(
-		"GetErrorsForDomainCurrent", Tango_DEV_STRING, Tango_DEVVAR_STRINGARRAY,
-		"The domain name", "The list of KO attributes for this domain (current cycle)",
-		DispLevel.OPERATOR));
-	this.command_list.addElement(new GetErrorsForDomainLatestErrorClass(
-		"GetErrorsForDomainLatestError", Tango_DEV_STRING, Tango_DEVVAR_STRINGARRAY,
-		"The domain name", "The list of KO attributes for this domain (latest KO cycle)",
-		DispLevel.OPERATOR));
-	this.command_list.addElement(new GetErrorsForAttributeCurrentClass(
-		"GetErrorsForAttributeCurrent", Tango_DEV_STRING, Tango_DEVVAR_STRINGARRAY,
-		"The NOT complete name of the attribute",
-		"The list of KO attributes for this attribute name (current cycle)",
-		DispLevel.OPERATOR));
-	this.command_list.addElement(new GetErrorsForAttributeLatestErrorClass(
-		"GetErrorsForAttributeLatestError", Tango_DEV_STRING, Tango_DEVVAR_STRINGARRAY,
-		"The NOT complete name of the attribute",
-		"The list of KO attributes for this attribute name (latest KO cycle)",
-		DispLevel.OPERATOR));
-	this.command_list.addElement(new StartRelativeClass("StartRelative", Tango_DEV_DOUBLE,
-		Tango_DEV_VOID, "The multiplier", "", DispLevel.EXPERT));
-	this.command_list
-		.addElement(new StartAbsoluteClass(
-			"StartAbsolute",
-			Tango_DEVVAR_LONGARRAY,
-			Tango_DEV_VOID,
-			"The absolute mode parameters: argin[0] = the duration amount, argin[1] = the duration nature (1=seconds, 2=minutes, 3=hours)",
-			"", DispLevel.EXPERT));
-
-	// Admin report commands
-	this.command_list.addElement(new StartArchivingReportClass("StartArchivingReport",
-		Tango_DEV_VOID, Tango_DEV_VOID, "", "Start Watcher archiving report",
-		DispLevel.OPERATOR));
-	//
-	// command_list.addElement(new DataBaseReportClass("DataBaseReport",
-	// Tango_DEV_VOID, Tango_DEVVAR_STRINGARRAY,
-	// "",
-	// "Watcher archiving report",
-	// DispLevel.OPERATOR));
-	//
-	this.command_list.addElement(new GetAttributesCountClass("GetCurrentArchivingAttrCount",
-		Tango_DEV_VOID, Tango_DEV_LONG, "", "Current archived attributes count",
-		DispLevel.OPERATOR));
-
-	this.command_list.addElement(new GetKOAttributesCountClass("GetKOAttributesCount",
-		Tango_DEV_VOID, Tango_DEV_LONG, "", "KO attributes count", DispLevel.OPERATOR));
-
-	this.command_list.addElement(new GetOKAttributesCountClass("GetOKAttributesCount",
-		Tango_DEV_VOID, Tango_DEV_LONG, "", "OK attributes count", DispLevel.OPERATOR));
-	this.command_list.addElement(new GetListOfKOAttributesClass("GetListOfKOAttributes",
-		Tango_DEV_VOID, Tango_DEVVAR_STRINGARRAY, "", "List of ko attributes details",
-		DispLevel.OPERATOR));
-	this.command_list.addElement(new GetListOfPartitionsClass("GetListOfPartitions",
-		Tango_DEV_VOID, Tango_DEVVAR_STRINGARRAY, "", "List of databes partitions details",
-		DispLevel.OPERATOR));
-	this.command_list.addElement(new GetListOfJobStatusClass("GetListOfJobStatus",
-		Tango_DEV_VOID, Tango_DEVVAR_STRINGARRAY, "",
-		"List of database job status details", DispLevel.OPERATOR));
-	this.command_list.addElement(new GetListOfJobErrorsClass("GetListOfJobErrors",
-		Tango_DEV_VOID, Tango_DEVVAR_STRINGARRAY, "",
-		"List of database job errors details", DispLevel.OPERATOR));
-
-	this.command_list.addElement(new GetKoCountByDeviceClass("GetListOfKoNbrByDevice",
-		Tango_DEV_VOID, Tango_DEVVAR_STRINGARRAY, "",
-		"List of ko attributes number by device", DispLevel.OPERATOR));
-
-	this.command_list.addElement(new GetFeedAliveProgressionClass("GetFeedAliveProgression",
-		Tango_DEV_VOID, Tango_DEV_LONG, "", "Percentage of the feedalive execution ",
-		DispLevel.OPERATOR));
-	this.command_list.addElement(new TemplCommandInOut("GetKOAttributesFromArchivers",
-		"getKOAttributesFromArchivers", "do a retry", "the list of ko per archiver"));
-
-	// add polling if any
-	/*
-	 * for (int i = 0; i < command_list.size(); i++) { Command cmd =
-	 * (Command) command_list.elementAt(i); }
-	 */
-    }
-
-    // ===================================================================
-    //
-    // method : device_factory()
-    //
-    // description : Create the device object(s) and store them in the
-    // device list
-    //
-    // argument : in : String[] devlist : The device name list
-    //
-    // ===================================================================
-    @Override
-    public void device_factory(String[] devlist) throws DevFailed {
-	String device_version = ResourceBundle.getBundle("application")
-		.getString("project.version");
-
-	for (int i = 0; i < devlist.length; i++) {
-	    // Util.out4.println("Device name : " + devlist[i]);
-
-	    // Create device and add it into the device list
-	    // ----------------------------------------------
-	    this.device_list.addElement(new TdbArchivingWatcher(this, devlist[i], device_version));
-
-	    // Export device to the outside world
-	    // ----------------------------------------------
-	    if (Util._UseDb == true) {
-		this.export_device(((DeviceImpl) this.device_list.elementAt(i)));
-	    } else {
-		this.export_device(((DeviceImpl) this.device_list.elementAt(i)), devlist[i]);
-	    }
-	}
-    }
-
-    // =============================================================================
-    //
-    // Method: attribute_factory(Vector att_list)
-    //
-    // =============================================================================
-    @Override
-    public void attribute_factory(Vector att_list) throws DevFailed {
-	// Attribute : ArchivingHealth
-	Attr archiving_health = new Attr("ArchivingHealth", Tango_DEV_SHORT, AttrWriteType.READ);
-	UserDefaultAttrProp archiving_health_prop = new UserDefaultAttrProp();
-	archiving_health_prop.set_description("The archiving health code");
-	archiving_health_prop.set_label("ArchivingHealth");
-	archiving_health.set_default_properties(archiving_health_prop);
-	att_list.addElement(archiving_health);
-
-	Attr koNr = new Attr("koAttributes", Tango_DEV_LONG, AttrWriteType.READ);
-	UserDefaultAttrProp koNr_prop = new UserDefaultAttrProp();
-	koNr_prop.set_description("The number of KO attributes");
-	koNr_prop.set_label("koAttributes");
-	koNr_prop.set_format("%3i");
-	koNr_prop.set_unit("attributes");
-	koNr.set_default_properties(koNr_prop);
-	att_list.addElement(koNr);
-
-	Attr nullNr = new Attr("nullAttributes", Tango_DEV_LONG, AttrWriteType.READ);
-	UserDefaultAttrProp nullNr_prop = new UserDefaultAttrProp();
-	nullNr_prop.set_description("The number of null attributes");
-	nullNr_prop.set_label("nullAttributes");
-	nullNr_prop.set_format("%3i");
-	nullNr_prop.set_unit("attributes");
-	nullNr.set_default_properties(nullNr_prop);
-	att_list.addElement(nullNr);
-
-	// Attribute : FormattedReport
-	SpectrumAttr formatted_report = new SpectrumAttr("FormattedReport", Tango_DEV_STRING, 10000);
-	att_list.addElement(formatted_report);
-
-	// Attribute : version
-	Attr version = new Attr("version", Tango_DEV_STRING, AttrWriteType.READ);
-	att_list.addElement(version);
-    }
-
-    // ===================================================================
-    /**
-     * Get the class property for specified name.
-     * 
-     * @param name
-     *            The property name.
-     */
-    // ===================================================================
-    public DbDatum get_class_property(String name) {
-	for (int i = 0; i < this.cl_prop.length; i++) {
-	    if (this.cl_prop[i].name.equals(name)) {
-		return this.cl_prop[i];
-	    }
-	}
-	// if not found, return an empty DbDatum
-	return new DbDatum(name);
-    }
-
-    // ===================================================================
-    /**
-     * Read the class properties from database.
-     */
-    // ===================================================================
-    public void get_class_property() throws DevFailed {
-	// Initialize your default values here.
-	// ------------------------------------------
-
-	// Read class properties from database.(Automatic code generation)
-	// -------------------------------------------------------------
-	if (Util._UseDb == false) {
-	    return;
-	}
-	String[] propnames = {};
-
-	// Call database and extract values
-	// --------------------------------------------
-	this.cl_prop = this.get_db_class().get_property(propnames);
-	// int i = -1;
-
-	// End of Automatic code generation
-	// -------------------------------------------------------------
-
-    }
-
-    // ===================================================================
-    /**
-     * Set class description as property in database
-     */
-    // ===================================================================
-    // private void write_class_property() throws DevFailed {
-    // // First time, check if database used
-    // // --------------------------------------------
-    // if (Util._UseDb == false) {
-    // return;
-    // }
-    //
-    // // Prepeare DbDatum
-    // // --------------------------------------------
-    // DbDatum[] data = new DbDatum[2];
-    // data[0] = new DbDatum("ProjectTitle");
-    // data[0].insert("null");
-    //
-    // data[1] = new DbDatum("Description");
-    // data[1].insert("Watches archiving");
-    //
-    // // Call database and and values
-    // // --------------------------------------------
-    // get_db_class().put_property(data);
-    // }
-
-}
diff --git a/src/test/resources/log4j.xml b/src/test/resources/log4j.xml
deleted file mode 100644
index 1ab8bcd1294238c56020c1fff4d3a264538b0f0b..0000000000000000000000000000000000000000
--- a/src/test/resources/log4j.xml
+++ /dev/null
@@ -1,10 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" ?>
-<!DOCTYPE log4j:configuration SYSTEM "log4j.dtd">
-
-<log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/">
-
-	<logger name="org.jacorb">
-		<level value="ERROR" />
-	</logger>
-
-</log4j:configuration>
diff --git a/tdbarchiver/pom.xml b/tdbarchiver/pom.xml
new file mode 100644
index 0000000000000000000000000000000000000000..4570d1bbe7eca5521ea92a4de555d6013ef5dc90
--- /dev/null
+++ b/tdbarchiver/pom.xml
@@ -0,0 +1,44 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"
+  xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+  <modelVersion>4.0.0</modelVersion>
+
+  <parent>
+    <groupId>fr.soleil.deviceservers</groupId>
+    <artifactId>historicalarchivingservers</artifactId>
+    <version>2.6.1</version>
+  </parent>
+
+  <groupId>fr.soleil.deviceservers</groupId>
+  <artifactId>tdbarchiver</artifactId>
+
+  <developers>
+    <developer>
+      <id>girardot</id>
+      <name>Raphaël GIRARDOT</name>
+      <email>raphael.girardot@synchrotron-soleil.fr</email>
+      <organization>Synchrotron Soleil</organization>
+      <organizationUrl>http://www.synchrotron-soleil.fr</organizationUrl>
+      <roles>
+        <role>Java Developer</role>
+      </roles>
+      <timezone>1</timezone>
+    </developer>
+  </developers>
+
+  <dependencies>
+    <dependency>
+      <groupId>fr.soleil.deviceservers</groupId>
+      <artifactId>archiving-common-collector</artifactId>
+    </dependency>
+    <dependency>
+      <artifactId>log4j</artifactId>
+      <groupId>log4j</groupId>
+    </dependency>
+  </dependencies>
+
+  <properties>
+    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
+  </properties>
+
+</project>
diff --git a/src/main/java/TdbArchiver/Collector/DbProxy.java b/tdbarchiver/src/main/java/TdbArchiver/Collector/DbProxy.java
similarity index 93%
rename from src/main/java/TdbArchiver/Collector/DbProxy.java
rename to tdbarchiver/src/main/java/TdbArchiver/Collector/DbProxy.java
index 05882dbb881cbae8c4b742495acb67aa704a3d14..7eee1ed8e9c5190d723a72a79106dbec3965a8e9 100644
--- a/src/main/java/TdbArchiver/Collector/DbProxy.java
+++ b/tdbarchiver/src/main/java/TdbArchiver/Collector/DbProxy.java
@@ -1,197 +1,191 @@
-// +======================================================================
-// $Source: /cvsroot/tango-cs/tango/jserver/archiving/TdbArchiver/Collector/DbProxy.java,v $
-//
-// Project:      Tango Archiving Service
-//
-// Description:  Java source code for the class  DbProxy.
-//						(Chinkumo Jean) - 23 janv. 2005
-//
-// $Author: ounsy $
-//
-// $Revision: 1.11 $
-//
-// $Log: DbProxy.java,v $
-// Revision 1.11  2007/03/05 16:25:20  ounsy
-// non-static DataBase
-//
-// Revision 1.10  2006/11/09 15:47:36  ounsy
-// calls to exportToDB_Scalar2 now renamed to exportToDB_Scalar
-//
-// Revision 1.9  2006/07/06 09:46:18  ounsy
-// modified the exportToDB_XXX so that they call the new file export methods
-// (job importing)
-//
-// Revision 1.8  2006/04/11 09:13:15  ounsy
-// added some attribute checking methods
-//
-// Revision 1.7  2006/02/24 12:08:57  ounsy
-// removed useless logs
-//
-// Revision 1.6  2006/02/13 09:36:49  chinkumo
-// Changes made into the DataBaseApi Class were reported here.
-// (Methods 'exportToDB_ScalarRO/WO/RW', 'exportToDB_SpectrumRO/WO/RW' and 'exportToDB_ImageRO/WO/RW' were generalized into 'exportToDB_Scalar', 'exportToDB_Spectrum' and 'exportToDB_Image')
-//
-// Revision 1.5  2006/01/13 14:28:35  chinkumo
-// Changes made to avoid multi lines in AMT table when archivers are rebooted.
-//
-// Revision 1.4  2005/11/29 17:34:14  chinkumo
-// no message
-//
-// Revision 1.3.10.2  2005/11/29 16:15:11  chinkumo
-// Code reformated (pogo compatible)
-//
-// Revision 1.3.10.1  2005/11/15 13:45:38  chinkumo
-// ...
-//
-// Revision 1.3  2005/06/14 10:39:09  chinkumo
-// Branch (tdbArchiver_1_0_1-branch_0)  and HEAD merged.
-//
-// Revision 1.2.6.2  2005/06/13 13:59:17  chinkumo
-// Changes made to improve the management of exceptions were reported here.
-//
-// Revision 1.2.6.1  2005/05/11 15:55:22  chinkumo
-// Minor change in a logg message.
-//
-// Revision 1.2  2005/02/04 17:10:40  chinkumo
-// The trouble with the grouped stopping strategy was fixed.
-//
-// Revision 1.1  2005/01/31 14:51:32  chinkumo
-// This class replaces the old TdbProxy class.
-//
-//
-// copyleft :	Synchrotron SOLEIL
-//					L'Orme des Merisiers
-//					Saint-Aubin - BP 48
-//					91192 GIF-sur-YVETTE CEDEX
-//
-//-======================================================================
-package TdbArchiver.Collector;
-
-import java.util.Collection;
-
-import fr.esrf.Tango.DevFailed;
-import fr.esrf.Tango.ErrSeverity;
-import fr.esrf.TangoApi.Database;
-import fr.esrf.TangoDs.Util;
-import fr.soleil.archiving.common.api.ConnectionFactory;
-import fr.soleil.archiving.common.api.exception.ArchivingException;
-import fr.soleil.archiving.common.api.tools.GlobalConst;
-import fr.soleil.archiving.hdbtdb.api.ConfigConst;
-import fr.soleil.archiving.hdbtdb.api.DataBaseManager;
-import fr.soleil.archiving.hdbtdb.api.TDBDataBaseManager;
-import fr.soleil.archiving.hdbtdb.api.manager.ArchivingManagerApiRefFactory;
-import fr.soleil.archiving.hdbtdb.api.manager.IArchivingManagerApiRef;
-import fr.soleil.archiving.hdbtdb.api.tools.AttributeLightMode;
-
-public class DbProxy {
-    private final IArchivingManagerApiRef manager;
-
-    public DbProxy(final String myDbHost, final String myDbName, final String mySchemaName, final String myDbUser,
-            final String myDbPassword, final boolean myRacConnection) throws ArchivingException {
-        try {
-            manager = ArchivingManagerApiRefFactory.getInstance(false, ConnectionFactory.connectThroughTango(
-                    ConfigConst.TDB_CLASS_DEVICE, ConfigConst.TDB_CLASS_DEVICE, myDbHost, myDbName, mySchemaName,
-                    myDbUser, myDbPassword, null, null, myRacConnection, false, true));
-            manager.archivingConfigureWithoutArchiverListInit();
-        } catch (DevFailed e) {
-            throw new ArchivingException(e);
-        }
-    }
-
-    public boolean is_db_connected() {
-        return manager.isDbConnected();
-    }
-
-    public DataBaseManager getDataBase() {
-        return manager.getDataBase();
-    }
-
-    public void insertModeRecord(final AttributeLightMode attributeLightMode) throws ArchivingException {
-        // System.out.println("CLA/insertModeRecord/getAttribute_complete_name/"+attributeLightMode.getAttribute_complete_name()+" BEFORE");
-        manager.getDataBase().getMode().insertModeRecord(attributeLightMode);
-        // System.out.println("CLA/insertModeRecord/getAttribute_complete_name/"+attributeLightMode.getAttribute_complete_name()+" AFTER");
-    }
-
-    public boolean isArchived(final String att_name) throws ArchivingException {
-        return manager.getDataBase().getMode().isArchived(att_name);
-    }
-
-    public boolean isArchived(final String att_name, final String device_name) throws ArchivingException {
-        return manager.getDataBase().getMode().isArchived(att_name, device_name);
-
-    }
-
-    public void updateModeRecord(final AttributeLightMode attributeLightMode) throws ArchivingException {
-        manager.getDataBase().getMode().updateModeRecord(attributeLightMode.getAttributeCompleteName());
-    }
-
-    public void updateModeRecordWithoutStop(final AttributeLightMode attributeLightMode) throws ArchivingException {
-        manager.getDataBase().getMode().updateModeRecordWithoutStop(attributeLightMode);
-    }
-
-    public void updateModeRecord(final String att_name) throws ArchivingException {
-
-        Util.out4.println("DbProxy.updateModeRecord");
-        try {
-            // System.out.println("CLA/updateModeRecord/att_name/"+att_name+"/BEFORE");
-            manager.getDataBase().getMode().updateModeRecord(att_name);
-            // System.out.println("CLA/updateModeRecord/att_name/"+att_name+"/AFTER");
-        } catch (final ArchivingException e) {
-            Util.out2.println(e.toString());
-            throw e;
-        }
-    }
-
-    public void exportToDB_Scalar(final String remoteFilePath, final String fileName, final String tableName,
-            final int writable) throws ArchivingException {
-        // ArchivingManagerApi.getDataBase(false).exportToDB_Scalar(remoteFilePath
-        // , fileName , tableName, writable);
-        ((TDBDataBaseManager) manager.getDataBase()).getTdbExport().exportToDB_Data(remoteFilePath, fileName,
-                tableName, writable);
-    }
-
-    public void exportToDB_Spectrum(final String remoteFilePath, final String fileName, final String tableName,
-            final int writable) throws ArchivingException {
-        // ArchivingManagerApi.getDataBase(false).exportToDB_Spectrum(remoteFilePath
-        // , fileName , tableName, writable);
-        ((TDBDataBaseManager) manager.getDataBase()).getTdbExport().exportToDB_Data(remoteFilePath, fileName,
-                tableName, writable);
-    }
-
-    public void exportToDB_Image(final String remoteFilePath, final String fileName, final String tableName,
-            final int writable) throws ArchivingException {
-        // ArchivingManagerApi.getDataBase(false).exportToDB_Image(remoteFilePath
-        // , fileName , tableName, writable);
-        ((TDBDataBaseManager) manager.getDataBase()).getTdbExport().exportToDB_Data(remoteFilePath, fileName,
-                tableName, writable);
-    }
-
-    public Collection<AttributeLightMode> getArchiverCurrentTasks(final String archiverName) throws ArchivingException {
-        Collection<AttributeLightMode> archiverCurrentTasks;
-        final boolean facility = manager.getFacility();
-        try {
-            archiverCurrentTasks = manager
-                    .getDataBase()
-                    .getMode()
-                    .getArchiverCurrentTasks(
-                            (facility ? "//" + new Database().get_tango_host() + "/" : "") + archiverName);
-        } catch (final DevFailed devFailed) {
-            final String message = GlobalConst.ARCHIVING_ERROR_PREFIX + " : " + GlobalConst.DBT_UNREACH_EXCEPTION;
-            final String reason = GlobalConst.TANGO_COMM_EXCEPTION;
-            final String desc = "Failed while executing DbProxy.getArchiverCurrentTasks() method...";
-            throw new ArchivingException(message, reason, ErrSeverity.PANIC, desc, "", devFailed);
-        }
-        System.out.println("Current Tasks (" + archiverCurrentTasks.size() + "): .... \n\r\t");
-        int i = 0;
-        for (final AttributeLightMode attributeLightMode : archiverCurrentTasks) {
-            System.out.println(">>>>>>>>>>>>\t" + i++ + "\t<<<<<<<<<<<<");
-            System.out.println("attributeLightMode.toString() : \r\n" + attributeLightMode.toString() + "\r\n");
-        }
-        return archiverCurrentTasks;
-
-    }
-
-    public void deleteOldRecords(final long time, final String[] attributeList) throws ArchivingException {
-        ((TDBDataBaseManager) manager.getDataBase()).getTdbDeleteAttribute().deleteOldRecords(time, attributeList);
-    }
+// +======================================================================
+// $Source: /cvsroot/tango-cs/tango/jserver/archiving/TdbArchiver/Collector/DbProxy.java,v $
+//
+// Project:      Tango Archiving Service
+//
+// Description:  Java source code for the class  DbProxy.
+//						(Chinkumo Jean) - 23 janv. 2005
+//
+// $Author: ounsy $
+//
+// $Revision: 1.11 $
+//
+// $Log: DbProxy.java,v $
+// Revision 1.11  2007/03/05 16:25:20  ounsy
+// non-static DataBase
+//
+// Revision 1.10  2006/11/09 15:47:36  ounsy
+// calls to exportToDB_Scalar2 now renamed to exportToDB_Scalar
+//
+// Revision 1.9  2006/07/06 09:46:18  ounsy
+// modified the exportToDB_XXX so that they call the new file export methods
+// (job importing)
+//
+// Revision 1.8  2006/04/11 09:13:15  ounsy
+// added some attribute checking methods
+//
+// Revision 1.7  2006/02/24 12:08:57  ounsy
+// removed useless logs
+//
+// Revision 1.6  2006/02/13 09:36:49  chinkumo
+// Changes made into the DataBaseApi Class were reported here.
+// (Methods 'exportToDB_ScalarRO/WO/RW', 'exportToDB_SpectrumRO/WO/RW' and 'exportToDB_ImageRO/WO/RW' were generalized into 'exportToDB_Scalar', 'exportToDB_Spectrum' and 'exportToDB_Image')
+//
+// Revision 1.5  2006/01/13 14:28:35  chinkumo
+// Changes made to avoid multi lines in AMT table when archivers are rebooted.
+//
+// Revision 1.4  2005/11/29 17:34:14  chinkumo
+// no message
+//
+// Revision 1.3.10.2  2005/11/29 16:15:11  chinkumo
+// Code reformated (pogo compatible)
+//
+// Revision 1.3.10.1  2005/11/15 13:45:38  chinkumo
+// ...
+//
+// Revision 1.3  2005/06/14 10:39:09  chinkumo
+// Branch (tdbArchiver_1_0_1-branch_0)  and HEAD merged.
+//
+// Revision 1.2.6.2  2005/06/13 13:59:17  chinkumo
+// Changes made to improve the management of exceptions were reported here.
+//
+// Revision 1.2.6.1  2005/05/11 15:55:22  chinkumo
+// Minor change in a logg message.
+//
+// Revision 1.2  2005/02/04 17:10:40  chinkumo
+// The trouble with the grouped stopping strategy was fixed.
+//
+// Revision 1.1  2005/01/31 14:51:32  chinkumo
+// This class replaces the old TdbProxy class.
+//
+//
+// copyleft :	Synchrotron SOLEIL
+//					L'Orme des Merisiers
+//					Saint-Aubin - BP 48
+//					91192 GIF-sur-YVETTE CEDEX
+//
+//-======================================================================
+package TdbArchiver.Collector;
+
+import java.util.Collection;
+
+import fr.esrf.Tango.DevFailed;
+import fr.esrf.Tango.ErrSeverity;
+import fr.esrf.TangoApi.Database;
+import fr.esrf.TangoDs.Util;
+import fr.soleil.archiving.common.api.ConnectionFactory;
+import fr.soleil.archiving.common.api.exception.ArchivingException;
+import fr.soleil.archiving.common.api.tools.GlobalConst;
+import fr.soleil.archiving.hdbtdb.api.ConfigConst;
+import fr.soleil.archiving.hdbtdb.api.DataBaseManager;
+import fr.soleil.archiving.hdbtdb.api.TDBDataBaseManager;
+import fr.soleil.archiving.hdbtdb.api.manager.ArchivingManagerApiRefFactory;
+import fr.soleil.archiving.hdbtdb.api.manager.IArchivingManagerApiRef;
+import fr.soleil.archiving.hdbtdb.api.tools.AttributeLightMode;
+import fr.soleil.database.connection.DataBaseParameters;
+
+public class DbProxy {
+    private final IArchivingManagerApiRef manager;
+
+    public DbProxy(DataBaseParameters parameters) throws ArchivingException {
+            manager = ArchivingManagerApiRefFactory.getInstance(false, ConnectionFactory.connect(parameters));
+            manager.archivingConfigureWithoutArchiverListInit();
+    }
+
+    public boolean is_db_connected() {
+        return manager.isDbConnected();
+    }
+
+    public DataBaseManager getDataBase() {
+        return manager.getDataBase();
+    }
+
+    public void insertModeRecord(final AttributeLightMode attributeLightMode) throws ArchivingException {
+        // System.out.println("CLA/insertModeRecord/getAttribute_complete_name/"+attributeLightMode.getAttribute_complete_name()+" BEFORE");
+        manager.getDataBase().getMode().insertModeRecord(attributeLightMode);
+        // System.out.println("CLA/insertModeRecord/getAttribute_complete_name/"+attributeLightMode.getAttribute_complete_name()+" AFTER");
+    }
+
+    public boolean isArchived(final String att_name) throws ArchivingException {
+        return manager.getDataBase().getMode().isArchived(att_name);
+    }
+
+    public boolean isArchived(final String att_name, final String device_name) throws ArchivingException {
+        return manager.getDataBase().getMode().isArchived(att_name, device_name);
+
+    }
+
+    public void updateModeRecord(final AttributeLightMode attributeLightMode) throws ArchivingException {
+        manager.getDataBase().getMode().updateModeRecord(attributeLightMode.getAttributeCompleteName());
+    }
+
+    public void updateModeRecordWithoutStop(final AttributeLightMode attributeLightMode) throws ArchivingException {
+        manager.getDataBase().getMode().updateModeRecordWithoutStop(attributeLightMode);
+    }
+
+    public void updateModeRecord(final String att_name) throws ArchivingException {
+
+        Util.out4.println("DbProxy.updateModeRecord");
+        try {
+            // System.out.println("CLA/updateModeRecord/att_name/"+att_name+"/BEFORE");
+            manager.getDataBase().getMode().updateModeRecord(att_name);
+            // System.out.println("CLA/updateModeRecord/att_name/"+att_name+"/AFTER");
+        } catch (final ArchivingException e) {
+            Util.out2.println(e.toString());
+            throw e;
+        }
+    }
+
+    public void exportToDB_Scalar(final String remoteFilePath, final String fileName, final String tableName,
+            final int writable) throws ArchivingException {
+        // ArchivingManagerApi.getDataBase(false).exportToDB_Scalar(remoteFilePath
+        // , fileName , tableName, writable);
+        ((TDBDataBaseManager) manager.getDataBase()).getTdbExport().exportToDB_Data(remoteFilePath, fileName,
+                tableName, writable);
+    }
+
+    public void exportToDB_Spectrum(final String remoteFilePath, final String fileName, final String tableName,
+            final int writable) throws ArchivingException {
+        // ArchivingManagerApi.getDataBase(false).exportToDB_Spectrum(remoteFilePath
+        // , fileName , tableName, writable);
+        ((TDBDataBaseManager) manager.getDataBase()).getTdbExport().exportToDB_Data(remoteFilePath, fileName,
+                tableName, writable);
+    }
+
+    public void exportToDB_Image(final String remoteFilePath, final String fileName, final String tableName,
+            final int writable) throws ArchivingException {
+        // ArchivingManagerApi.getDataBase(false).exportToDB_Image(remoteFilePath
+        // , fileName , tableName, writable);
+        ((TDBDataBaseManager) manager.getDataBase()).getTdbExport().exportToDB_Data(remoteFilePath, fileName,
+                tableName, writable);
+    }
+
+    public Collection<AttributeLightMode> getArchiverCurrentTasks(final String archiverName) throws ArchivingException {
+        Collection<AttributeLightMode> archiverCurrentTasks;
+        final boolean facility = manager.getFacility();
+        try {
+            archiverCurrentTasks = manager
+                    .getDataBase()
+                    .getMode()
+                    .getArchiverCurrentTasks(
+                            (facility ? "//" + new Database().get_tango_host() + "/" : "") + archiverName);
+        } catch (final DevFailed devFailed) {
+            final String message = GlobalConst.ARCHIVING_ERROR_PREFIX + " : " + GlobalConst.DBT_UNREACH_EXCEPTION;
+            final String reason = GlobalConst.TANGO_COMM_EXCEPTION;
+            final String desc = "Failed while executing DbProxy.getArchiverCurrentTasks() method...";
+            throw new ArchivingException(message, reason, ErrSeverity.PANIC, desc, "", devFailed);
+        }
+        System.out.println("Current Tasks (" + archiverCurrentTasks.size() + "): .... \n\r\t");
+        int i = 0;
+        for (final AttributeLightMode attributeLightMode : archiverCurrentTasks) {
+            System.out.println(">>>>>>>>>>>>\t" + i++ + "\t<<<<<<<<<<<<");
+            System.out.println("attributeLightMode.toString() : \r\n" + attributeLightMode.toString() + "\r\n");
+        }
+        return archiverCurrentTasks;
+
+    }
+
+    public void deleteOldRecords(final long time, final String[] attributeList) throws ArchivingException {
+        ((TDBDataBaseManager) manager.getDataBase()).getTdbDeleteAttribute().deleteOldRecords(time, attributeList);
+    }
 }
\ No newline at end of file
diff --git a/src/main/java/TdbArchiver/Collector/TdbCollector.java b/tdbarchiver/src/main/java/TdbArchiver/Collector/TdbCollector.java
similarity index 97%
rename from src/main/java/TdbArchiver/Collector/TdbCollector.java
rename to tdbarchiver/src/main/java/TdbArchiver/Collector/TdbCollector.java
index e74f6e754c0cb3ef5ebc3c4e0f44e7eda5de607d..6ac86f4d14c866fe656e1c9fb26f5ea8d339cbc3 100644
--- a/src/main/java/TdbArchiver/Collector/TdbCollector.java
+++ b/tdbarchiver/src/main/java/TdbArchiver/Collector/TdbCollector.java
@@ -1,437 +1,437 @@
-// +======================================================================
-// $Source: /cvsroot/tango-cs/tango/jserver/archiving/TdbArchiver/Collector/TdbCollector.java,v $
-//
-// Project:      Tango Archiving Service
-//
-// Description:  Java source code for the class  TdbCollector.
-//						(Chinkumo Jean) - Mar 24, 2004
-//
-// $Author: pierrejoseph $
-//
-// $Revision: 1.32 $
-//
-// $Log: TdbCollector.java,v $
-// Revision 1.32  2007/06/13 13:12:03  pierrejoseph
-// modeHandler is stored in a common archiver part
-//
-// Revision 1.31  2007/06/11 12:16:33  pierrejoseph
-// doArchive method has been added in the TdbCollector class with new catched exceptions that can be raised by the isDataArchivable method.
-//
-// Revision 1.30  2007/06/07 09:54:55  pierrejoseph
-// Hastable specification
-//
-// Revision 1.29  2007/06/01 09:45:53  pierrejoseph
-// Attribute ArchiverCollectro.logger has been renamed in m_logger
-//
-// Revision 1.28  2007/05/25 12:03:36  pierrejoseph
-// Pb mode counter on various mode in the same collector : one ModesCounters object by attribut stored in a hashtable of the ArchiverCollector object (in common part)
-//
-// Revision 1.27  2007/04/03 15:15:13  ounsy
-// corrected a deadlock problem
-//
-// Revision 1.26  2007/03/27 15:17:06  ounsy
-// added a isFirstValue attribute
-//
-// Revision 1.25  2007/03/26 14:36:13  ounsy
-// trying a new method to avoid double records.
-//
-// Revision 1.24  2007/03/05 16:25:20  ounsy
-// non-static DataBase
-//
-// Revision 1.23  2007/02/26 09:51:51  ounsy
-// the cleaning is never done directly by the archivers themselves anymore
-// (even in MySQL)
-//
-// Revision 1.22  2007/01/09 15:25:28  ounsy
-// set the most frequent traces to DEBUG level
-//
-// Revision 1.21  2006/11/15 16:29:42  ounsy
-// refresher with synchronized period
-//
-// Revision 1.20  2006/10/19 12:24:37  ounsy
-// modified exportFile2Db() to take a new parameter isAsynchronous
-//
-// Revision 1.19  2006/08/08 13:41:14  ounsy
-// no more cleaning thread with oracle : the database auto cleans
-//
-// Revision 1.18  2006/07/26 08:37:21  ounsy
-// try number no more static and reinitialized with change events (errorchange, numberscalarchange, etc...)
-//
-// Revision 1.17  2006/07/25 13:39:14  ounsy
-// correcting bad merge
-//
-// Revision 1.16  2006/07/25 09:47:29  ounsy
-// added a loadAssessment() method
-//
-// Revision 1.15  2006/07/21 14:42:14  ounsy
-// replaced the lastTimestampHashtable with lastTimestampStacksHashtable, to keep track of more than one timestamp in the past
-//
-// Revision 1.14  2006/07/18 08:01:28  ounsy
-// exportFile2Db() now returns the table name
-//
-// Revision 1.13  2006/06/16 09:25:33  ounsy
-// changed imports because of the diary package moving to the javaapi project
-//
-// Revision 1.12  2006/06/08 08:34:31  ounsy
-// added new diary logging system: the results of tmp file exports are logged in a text file (one per archiver and per day)
-//
-// Revision 1.11  2006/06/07 12:57:02  ounsy
-// minor changes
-//
-// Revision 1.10  2006/06/02 08:40:57  ounsy
-// now keep a reference to the Warnable that instantiated it so this API class can warn the required TdbArchiver device
-//
-// Revision 1.9  2006/05/23 11:56:04  ounsy
-// added a lastTimestamp Hashtable in the same vein as the lastValue one in HdbModeHandler to avoid getting twice the same timestamp in a row
-//
-// Revision 1.8  2006/05/16 09:29:30  ounsy
-// added what's necessary for the old files deletion mechanism
-//
-// Revision 1.7  2006/05/12 09:20:17  ounsy
-// list concurrent modification bug correction
-//
-// Revision 1.6  2005/11/29 17:34:14  chinkumo
-// no message
-//
-// Revision 1.5.10.4  2005/11/29 16:15:11  chinkumo
-// Code reformated (pogo compatible)
-//
-// Revision 1.5.10.3  2005/11/15 13:45:38  chinkumo
-// ...
-//
-// Revision 1.5.10.2  2005/09/26 08:01:54  chinkumo
-// Minor changes !
-//
-// Revision 1.5.10.1  2005/09/09 10:17:59  chinkumo
-// Minor changes.
-//
-// Revision 1.5  2005/06/14 10:39:09  chinkumo
-// Branch (tdbArchiver_1_0_1-branch_0)  and HEAD merged.
-//
-// Revision 1.4.6.1  2005/06/13 13:47:46  chinkumo
-// Changes made to improve the management of exceptions were reported here.
-//
-// Revision 1.4  2005/02/07 09:37:15  chinkumo
-// To avoid side effects when including events in ATK, AttributeList object is replaced with the AttributePolledList object.
-//
-// Revision 1.3  2005/02/04 17:10:40  chinkumo
-// The trouble with the grouped stopping strategy was fixed.
-//
-// Revision 1.2  2005/01/31 15:09:05  chinkumo
-// Changes made since the TdbProxy class was changed into the DbProxy class.
-//
-// Revision 1.1  2004/12/06 16:43:24  chinkumo
-// First commit (new architecture).
-//
-// Revision 1.5  2004/09/30 15:19:08  chinkumo
-// The sleeping time for the thread wich deletes records was moved from 30 minutes to 10.
-//
-// Revision 1.4  2004/09/14 07:33:51  chinkumo
-// Some unused 'import' were removed.
-// Some error messages were re-written to fit the 'error policy' recently decided.
-//
-// A new class was included inside 'TdbCollector' class.
-// This class was named 'KeepingThread'. This class represent a thread wich the job is to delete, periodicaly, database's old records.
-//
-// Revision 1.3  2004/09/01 15:32:25  chinkumo
-// Heading was updated.
-//
-//
-// copyleft :	Synchrotron SOLEIL
-//					L'Orme des Merisiers
-//					Saint-Aubin - BP 48
-//					91192 GIF-sur-YVETTE CEDEX
-//
-//-======================================================================
-package TdbArchiver.Collector;
-
-import java.io.IOException;
-import java.sql.Timestamp;
-import java.util.Map;
-import java.util.concurrent.ConcurrentHashMap;
-
-import org.slf4j.Logger;
-
-import Common.Archiver.Collector.ArchiverCollector;
-import TdbArchiver.Collector.Tools.FileTools;
-import fr.esrf.Tango.AttrWriteType;
-import fr.esrf.Tango.ErrSeverity;
-import fr.esrf.TangoDs.Util;
-import fr.esrf.tangoatk.core.ConnectionException;
-import fr.esrf.tangoatk.core.IEntity;
-import fr.soleil.archiving.common.api.exception.ArchivingException;
-import fr.soleil.archiving.common.api.tools.ArchivingEvent;
-import fr.soleil.archiving.common.api.tools.GlobalConst;
-import fr.soleil.archiving.hdbtdb.api.tools.AttributeLightMode;
-import fr.soleil.archiving.hdbtdb.api.tools.ImageEvent_RO;
-import fr.soleil.archiving.hdbtdb.api.tools.LimitedStack;
-import fr.soleil.archiving.hdbtdb.api.tools.ScalarEvent;
-import fr.soleil.archiving.hdbtdb.api.tools.SpectrumEvent_RO;
-import fr.soleil.archiving.hdbtdb.api.tools.SpectrumEvent_RW;
-
-public abstract class TdbCollector extends ArchiverCollector {
-
-    private static final long serialVersionUID = 3515399630926405546L;
-
-    /**
-     * A file is associated to each archived attribute. We them must keep a the
-     * association (attribute name / corresponding file )
-     */
-    private final Map<String, FileTools> filesNames = new ConcurrentHashMap<String, FileTools>();
-    /**
-     * This parameter specify the number of time a Collector retry the archiving
-     * of an attribute event
-     */
-    protected final static int DEFAULT_TRY_NUMBER = 2;
-
-    protected long keepingPeriod;
-
-    private final Map<String, LimitedStack> lastTimestampStacks = new ConcurrentHashMap<String, LimitedStack>();
-
-    /**
-     * This Map is used to store the last value of an attribute. This value will
-     * be compared to the current one (cf. Modes)
-     */
-    private final Map<String, Object> lastValueHashtable = new ConcurrentHashMap<String, Object>();
-
-    protected volatile Map<String, Boolean> isFirstValueList = new ConcurrentHashMap<String, Boolean>();
-
-    protected DbProxy dbProxy;
-
-    protected String m_currentDbPath = "";
-
-    protected String m_currentDsPath = "";
-
-    private final AttrWriteType writableType;
-
-    public TdbCollector(final TdbModeHandler _modeHandler, final String currentDsPath, final String currentDbPath,
-            final AttrWriteType writableType, final Logger logger) {
-        super(_modeHandler, logger);
-        this.writableType = writableType;
-        m_currentDbPath = currentDbPath;
-        m_currentDsPath = currentDsPath;
-    }
-
-    protected AttrWriteType getWritableValue() {
-        return writableType;
-    }
-
-    protected void setLastValue(final ScalarEvent scalarEvent, final Object lastValue) {
-        String key = scalarEvent.getAttributeCompleteName();
-        if (key != null) {
-            setLastTimestamp(scalarEvent);
-            if (lastValue == null) {
-                lastValueHashtable.remove(key);
-            } else {
-                lastValueHashtable.put(key, lastValue);
-            }
-        }
-    }
-
-    protected Object getLastValue(final ScalarEvent scalarEvent) {
-        return scalarEvent.getAttributeCompleteName() == null ? null : lastValueHashtable.get(scalarEvent
-                .getAttributeCompleteName());
-    }
-
-    /**
-     * Adds an attribute to the list of the attributes for which is responsible
-     * this TdbCollector.
-     * 
-     * @param attributeLightMode
-     * @throws ArchivingException
-     */
-    public synchronized final void addSource(final AttributeLightMode attributeLightMode, final int attributePerFile)
-            throws ArchivingException {
-        if (attributeLightMode != null) {
-            final String attName = attributeLightMode.getAttributeCompleteName();
-            if ((attName != null) && (attributeList.get(attName) == null)) {
-                try {
-                    stopCollecting();
-                    final IEntity attribute = attributeList.add(attName);
-                    addListeners(attribute);
-                    Util.out4.println("\t The attribute named " + attName + " was hired to the Collector list...");
-                    // informs the mother class that one new attribute must be managed
-                    addAttribute(attName);
-                    // Verify that the recording file exists
-                    final String table_name = dbProxy.getDataBase().getDbUtil().getTableName(attName);
-                    if (filesNames.get(attName.toLowerCase()) == null) {
-                        final FileTools myFile = new FileTools(attName, table_name, attributeLightMode.getDataFormat(),
-                                attributeLightMode.getWritable(), attributeLightMode.getMode().getTdbSpec()
-                                        .getExportPeriod(), super.logger, dbProxy, m_currentDsPath, m_currentDbPath);
-                        myFile.setAttributePerFile(attributePerFile);
-                        filesNames.put(attName.toLowerCase(), myFile);
-                    }
-
-                    isFirstValueList.put(attName.toLowerCase(), true);
-                    removeErrorMessage(attName);
-                } catch (final ConnectionException e) {
-                    logger.error("add source failed", e);
-                    registerErrorMessage(attName, e.getMessage());
-                    final String message = GlobalConst.ARCHIVING_ERROR_PREFIX + "Failed adding '"
-                            + attributeLightMode.getAttributeCompleteName() + "' as source";
-                    final String reason = GlobalConst.TANGO_COMM_EXCEPTION;
-                    final String desc = "Failed while executing BooleanScalar.addSource() method...";
-                    throw new ArchivingException(message, reason, ErrSeverity.WARN, desc, "", e);
-                } catch (final Exception e) {
-                    registerErrorMessage(attName, e);
-                    logger.error("Unexpected exception during addSource:"
-                            + attributeLightMode.getAttributeCompleteName());
-                    logger.error("Unexpected exception during addSource", e);
-                } finally {
-                    startCollecting();
-                }
-            }
-        }
-    }
-
-    public abstract void addListeners(IEntity attribute) throws ArchivingException;
-
-    /**
-     * Removes an attribute from the list of the attributes for which is
-     * responsible this TdbCollector.
-     * 
-     * @param attributeName
-     * @throws ArchivingException
-     */
-    public synchronized void removeSource(final String attributeName, final boolean closeFile)
-            throws ArchivingException {
-        Util.out2.println(getClass().getSimpleName() + ".removeSource");
-        try {
-            stopCollecting();
-            final IEntity attribute = attributeList.get(attributeName);
-            if (attribute != null) {
-                removeListeners(attribute);
-                isFirstValueList.remove(attributeName.toLowerCase());
-                attributeList.remove(attributeName);
-
-                // informs the mother class that one new attribute must be
-                // removed
-                removeAttribute(attributeName);
-                removeTimestamps(attributeName);
-                Util.out4.println("\t The attribute named " + attributeName + " was fired from the Collector list...");
-                if (closeFile) {
-                    filesNames.get(attributeName.toLowerCase()).closeFile();
-                    filesNames.remove(attributeName.toLowerCase());
-                }
-                removeErrorMessage(attributeName);
-            }
-        } catch (final Exception e) {
-            final String message = GlobalConst.ARCHIVING_ERROR_PREFIX + "Failed removing '" + attributeName
-                    + "' from sources";
-            final String reason = GlobalConst.TANGO_COMM_EXCEPTION;
-            final String desc = "Failed while executing BooleanScalar.removeSource() method...";
-            throw new ArchivingException(message, reason, ErrSeverity.WARN, desc, "", e);
-        } finally {
-            startCollecting();
-        }
-    }
-
-    public abstract void removeListeners(IEntity attribute) throws ArchivingException;
-
-    public String exportFile2Db(final String attributeName) throws IOException, ArchivingException {
-        logger.debug("XXXXXXX FORCING export for " + attributeName);
-        final String result = filesNames.get(attributeName.toLowerCase()).switchFile();
-        logger.debug("Export forced done for " + attributeName + " - " + result);
-        return result;
-    }
-
-    protected void processFileScalar(final ScalarEvent scalarEvent) throws ArchivingException {
-        final String attrName = scalarEvent.getAttributeCompleteName();
-        filesNames.get(attrName.toLowerCase()).processEventScalar(scalarEvent);
-    }
-
-    protected void processFileSpectrum(final SpectrumEvent_RO spectrumEvent) throws ArchivingException {
-        final String attrName = spectrumEvent.getAttributeCompleteName();
-        filesNames.get(attrName.toLowerCase()).processEventSpectrum(spectrumEvent);
-    }
-
-    protected void processFileSpectrum(final SpectrumEvent_RW spectrumEvent) throws ArchivingException {
-        final String attrName = spectrumEvent.getAttributeCompleteName();
-        filesNames.get(attrName.toLowerCase()).processEventSpectrum(spectrumEvent);
-    }
-
-    protected void processFileImage(final ImageEvent_RO imageEvent) throws ArchivingException {
-        final String attrName = imageEvent.getAttributeCompleteName();
-        filesNames.get(attrName.toLowerCase()).processEventImage(imageEvent);
-    }
-
-    protected void setLastTimestamp(final ArchivingEvent<?> scalarEvent) {
-        if (scalarEvent != null) {
-            final String name = scalarEvent.getAttributeCompleteName();
-            final Long longTimeStamp = new Long(scalarEvent.getTimeStamp());
-
-            LimitedStack lastTimestampStack;
-            if (lastTimestampStacks.containsKey(name)) {
-                lastTimestampStack = lastTimestampStacks.get(name);
-            } else {
-                lastTimestampStack = new LimitedStack();
-                lastTimestampStacks.put(name, lastTimestampStack);
-            }
-            lastTimestampStack.push(longTimeStamp);
-        }
-    }
-
-    protected void removeTimestamps(final String attributeName) {
-        lastTimestampStacks.remove(attributeName);
-    }
-
-    protected LimitedStack getTimestamps(final String attributeName) {
-        return lastTimestampStacks.get(attributeName);
-    }
-
-    protected boolean isDataArchivableTimestampWise(final ArchivingEvent<?> scalarEvent) {
-        final String name = scalarEvent.getAttributeCompleteName();
-
-        final long newTime = scalarEvent.getTimeStamp();
-        if (newTime == 0) {
-            StringBuilder builder = new StringBuilder("NOARCHIVING - received a zero timestamp for ");
-            builder.append(name).append(" - tableName: ").append(scalarEvent.getTableName());
-            String error = builder.toString();
-            logger.warn(error);
-            registerErrorMessage(name, error);
-            return false;
-        }
-
-        final LimitedStack lastTimestampStack = getTimestamps(name);
-        if (lastTimestampStack == null) {
-            // System.out.println ( "isDataArchivableTimestampWise/name/2");
-            return true;
-        }
-
-        final boolean isAlreadyRegisteredDate = lastTimestampStack.containsDate(newTime);
-        // System.out.println (
-        // "isDataArchivableTimestampWise/isAlreadyRegisteredDate/"+isAlreadyRegisteredDate);
-        final boolean isValidRegisteredDate = lastTimestampStack.validateDate(newTime);
-        // System.out.println (
-        // "isDataArchivableTimestampWise/isAlreadyRegisteredDate/"+isAlreadyRegisteredDate);
-        if (isAlreadyRegisteredDate || !isValidRegisteredDate) {
-            Timestamp timestamp = new Timestamp(newTime);
-            StringBuilder builder = new StringBuilder("NOARCHIVING - AlreadyRegisteredDate - attribute: ");
-            builder.append(name).append(" - timestamp: ").append(timestamp);
-            logger.warn(builder.toString());
-            builder = new StringBuilder("NOARCHIVING - attribute ").append(name)
-                    .append(" seems to be frozen - timestamp: ").append(timestamp);
-            registerErrorMessage(name, builder.toString());
-            return false;
-        }
-        // m_logger.trace(ILogger.LEVEL_DEBUG, name + " timestamp OK: " + new
-        // Timestamp(newTime));
-        // System.out.println ( "isDataArchivableTimestampWise/name/3");
-        return true;
-    }
-
-    public void setDbProxy(final DbProxy _dbProxy) {
-        dbProxy = _dbProxy;
-    }
-
-    // synchronized because of attribute list
-    @Override
-    public synchronized void clear() {
-        super.clear();
-        lastTimestampStacks.clear();
-        isFirstValueList.clear();
-        lastValueHashtable.clear();
-        filesNames.clear();
-    }
-
+// +======================================================================
+// $Source: /cvsroot/tango-cs/tango/jserver/archiving/TdbArchiver/Collector/TdbCollector.java,v $
+//
+// Project:      Tango Archiving Service
+//
+// Description:  Java source code for the class  TdbCollector.
+//						(Chinkumo Jean) - Mar 24, 2004
+//
+// $Author: pierrejoseph $
+//
+// $Revision: 1.32 $
+//
+// $Log: TdbCollector.java,v $
+// Revision 1.32  2007/06/13 13:12:03  pierrejoseph
+// modeHandler is stored in a common archiver part
+//
+// Revision 1.31  2007/06/11 12:16:33  pierrejoseph
+// doArchive method has been added in the TdbCollector class with new catched exceptions that can be raised by the isDataArchivable method.
+//
+// Revision 1.30  2007/06/07 09:54:55  pierrejoseph
+// Hastable specification
+//
+// Revision 1.29  2007/06/01 09:45:53  pierrejoseph
+// Attribute ArchiverCollectro.logger has been renamed in m_logger
+//
+// Revision 1.28  2007/05/25 12:03:36  pierrejoseph
+// Pb mode counter on various mode in the same collector : one ModesCounters object by attribut stored in a hashtable of the ArchiverCollector object (in common part)
+//
+// Revision 1.27  2007/04/03 15:15:13  ounsy
+// corrected a deadlock problem
+//
+// Revision 1.26  2007/03/27 15:17:06  ounsy
+// added a isFirstValue attribute
+//
+// Revision 1.25  2007/03/26 14:36:13  ounsy
+// trying a new method to avoid double records.
+//
+// Revision 1.24  2007/03/05 16:25:20  ounsy
+// non-static DataBase
+//
+// Revision 1.23  2007/02/26 09:51:51  ounsy
+// the cleaning is never done directly by the archivers themselves anymore
+// (even in MySQL)
+//
+// Revision 1.22  2007/01/09 15:25:28  ounsy
+// set the most frequent traces to DEBUG level
+//
+// Revision 1.21  2006/11/15 16:29:42  ounsy
+// refresher with synchronized period
+//
+// Revision 1.20  2006/10/19 12:24:37  ounsy
+// modified exportFile2Db() to take a new parameter isAsynchronous
+//
+// Revision 1.19  2006/08/08 13:41:14  ounsy
+// no more cleaning thread with oracle : the database auto cleans
+//
+// Revision 1.18  2006/07/26 08:37:21  ounsy
+// try number no more static and reinitialized with change events (errorchange, numberscalarchange, etc...)
+//
+// Revision 1.17  2006/07/25 13:39:14  ounsy
+// correcting bad merge
+//
+// Revision 1.16  2006/07/25 09:47:29  ounsy
+// added a loadAssessment() method
+//
+// Revision 1.15  2006/07/21 14:42:14  ounsy
+// replaced the lastTimestampHashtable with lastTimestampStacksHashtable, to keep track of more than one timestamp in the past
+//
+// Revision 1.14  2006/07/18 08:01:28  ounsy
+// exportFile2Db() now returns the table name
+//
+// Revision 1.13  2006/06/16 09:25:33  ounsy
+// changed imports because of the diary package moving to the javaapi project
+//
+// Revision 1.12  2006/06/08 08:34:31  ounsy
+// added new diary logging system: the results of tmp file exports are logged in a text file (one per archiver and per day)
+//
+// Revision 1.11  2006/06/07 12:57:02  ounsy
+// minor changes
+//
+// Revision 1.10  2006/06/02 08:40:57  ounsy
+// now keep a reference to the Warnable that instantiated it so this API class can warn the required TdbArchiver device
+//
+// Revision 1.9  2006/05/23 11:56:04  ounsy
+// added a lastTimestamp Hashtable in the same vein as the lastValue one in HdbModeHandler to avoid getting twice the same timestamp in a row
+//
+// Revision 1.8  2006/05/16 09:29:30  ounsy
+// added what's necessary for the old files deletion mechanism
+//
+// Revision 1.7  2006/05/12 09:20:17  ounsy
+// list concurrent modification bug correction
+//
+// Revision 1.6  2005/11/29 17:34:14  chinkumo
+// no message
+//
+// Revision 1.5.10.4  2005/11/29 16:15:11  chinkumo
+// Code reformated (pogo compatible)
+//
+// Revision 1.5.10.3  2005/11/15 13:45:38  chinkumo
+// ...
+//
+// Revision 1.5.10.2  2005/09/26 08:01:54  chinkumo
+// Minor changes !
+//
+// Revision 1.5.10.1  2005/09/09 10:17:59  chinkumo
+// Minor changes.
+//
+// Revision 1.5  2005/06/14 10:39:09  chinkumo
+// Branch (tdbArchiver_1_0_1-branch_0)  and HEAD merged.
+//
+// Revision 1.4.6.1  2005/06/13 13:47:46  chinkumo
+// Changes made to improve the management of exceptions were reported here.
+//
+// Revision 1.4  2005/02/07 09:37:15  chinkumo
+// To avoid side effects when including events in ATK, AttributeList object is replaced with the AttributePolledList object.
+//
+// Revision 1.3  2005/02/04 17:10:40  chinkumo
+// The trouble with the grouped stopping strategy was fixed.
+//
+// Revision 1.2  2005/01/31 15:09:05  chinkumo
+// Changes made since the TdbProxy class was changed into the DbProxy class.
+//
+// Revision 1.1  2004/12/06 16:43:24  chinkumo
+// First commit (new architecture).
+//
+// Revision 1.5  2004/09/30 15:19:08  chinkumo
+// The sleeping time for the thread wich deletes records was moved from 30 minutes to 10.
+//
+// Revision 1.4  2004/09/14 07:33:51  chinkumo
+// Some unused 'import' were removed.
+// Some error messages were re-written to fit the 'error policy' recently decided.
+//
+// A new class was included inside 'TdbCollector' class.
+// This class was named 'KeepingThread'. This class represent a thread wich the job is to delete, periodicaly, database's old records.
+//
+// Revision 1.3  2004/09/01 15:32:25  chinkumo
+// Heading was updated.
+//
+//
+// copyleft :	Synchrotron SOLEIL
+//					L'Orme des Merisiers
+//					Saint-Aubin - BP 48
+//					91192 GIF-sur-YVETTE CEDEX
+//
+//-======================================================================
+package TdbArchiver.Collector;
+
+import java.io.IOException;
+import java.sql.Timestamp;
+import java.util.Map;
+import java.util.concurrent.ConcurrentHashMap;
+
+import org.slf4j.Logger;
+
+import Common.Archiver.Collector.ArchiverCollector;
+import TdbArchiver.Collector.Tools.FileTools;
+import fr.esrf.Tango.AttrWriteType;
+import fr.esrf.Tango.ErrSeverity;
+import fr.esrf.TangoDs.Util;
+import fr.esrf.tangoatk.core.ConnectionException;
+import fr.esrf.tangoatk.core.IEntity;
+import fr.soleil.archiving.common.api.exception.ArchivingException;
+import fr.soleil.archiving.common.api.tools.ArchivingEvent;
+import fr.soleil.archiving.common.api.tools.GlobalConst;
+import fr.soleil.archiving.hdbtdb.api.tools.AttributeLightMode;
+import fr.soleil.archiving.hdbtdb.api.tools.ImageEvent_RO;
+import fr.soleil.archiving.hdbtdb.api.tools.LimitedStack;
+import fr.soleil.archiving.hdbtdb.api.tools.ScalarEvent;
+import fr.soleil.archiving.hdbtdb.api.tools.SpectrumEvent_RO;
+import fr.soleil.archiving.hdbtdb.api.tools.SpectrumEvent_RW;
+
+public abstract class TdbCollector extends ArchiverCollector {
+
+    private static final long serialVersionUID = 3515399630926405546L;
+
+    /**
+     * A file is associated to each archived attribute. We them must keep a the
+     * association (attribute name / corresponding file )
+     */
+    private final Map<String, FileTools> filesNames = new ConcurrentHashMap<String, FileTools>();
+    /**
+     * This parameter specify the number of time a Collector retry the archiving
+     * of an attribute event
+     */
+    protected final static int DEFAULT_TRY_NUMBER = 2;
+
+    protected long keepingPeriod;
+
+    private final Map<String, LimitedStack> lastTimestampStacks = new ConcurrentHashMap<String, LimitedStack>();
+
+    /**
+     * This Map is used to store the last value of an attribute. This value will
+     * be compared to the current one (cf. Modes)
+     */
+    private final Map<String, Object> lastValueHashtable = new ConcurrentHashMap<String, Object>();
+
+    protected volatile Map<String, Boolean> isFirstValueList = new ConcurrentHashMap<String, Boolean>();
+
+    protected DbProxy dbProxy;
+
+    protected String m_currentDbPath = "";
+
+    protected String m_currentDsPath = "";
+
+    private final AttrWriteType writableType;
+
+    public TdbCollector(final TdbModeHandler _modeHandler, final String currentDsPath, final String currentDbPath,
+            final AttrWriteType writableType, final Logger logger) {
+        super(_modeHandler, logger);
+        this.writableType = writableType;
+        m_currentDbPath = currentDbPath;
+        m_currentDsPath = currentDsPath;
+    }
+
+    protected AttrWriteType getWritableValue() {
+        return writableType;
+    }
+
+    protected void setLastValue(final ScalarEvent scalarEvent, final Object lastValue) {
+        String key = scalarEvent.getAttributeCompleteName();
+        if (key != null) {
+            setLastTimestamp(scalarEvent);
+            if (lastValue == null) {
+                lastValueHashtable.remove(key);
+            } else {
+                lastValueHashtable.put(key, lastValue);
+            }
+        }
+    }
+
+    protected Object getLastValue(final ScalarEvent scalarEvent) {
+        return scalarEvent.getAttributeCompleteName() == null ? null : lastValueHashtable.get(scalarEvent
+                .getAttributeCompleteName());
+    }
+
+    /**
+     * Adds an attribute to the list of the attributes for which is responsible
+     * this TdbCollector.
+     * 
+     * @param attributeLightMode
+     * @throws ArchivingException
+     */
+    public synchronized final void addSource(final AttributeLightMode attributeLightMode, final int attributePerFile)
+            throws ArchivingException {
+        if (attributeLightMode != null) {
+            final String attName = attributeLightMode.getAttributeCompleteName();
+            if ((attName != null) && (attributeList.get(attName) == null)) {
+                try {
+                    stopCollecting();
+                    final IEntity attribute = attributeList.add(attName);
+                    addListeners(attribute);
+                    Util.out4.println("\t The attribute named " + attName + " was hired to the Collector list...");
+                    // informs the mother class that one new attribute must be managed
+                    addAttribute(attName);
+                    // Verify that the recording file exists
+                    final String table_name = dbProxy.getDataBase().getDbUtil().getTableName(attName);
+                    if (filesNames.get(attName.toLowerCase()) == null) {
+                        final FileTools myFile = new FileTools(attName, table_name, attributeLightMode.getDataFormat(),
+                                attributeLightMode.getWritable(), attributeLightMode.getMode().getTdbSpec()
+                                        .getExportPeriod(), super.logger, dbProxy, m_currentDsPath, m_currentDbPath);
+                        myFile.setAttributePerFile(attributePerFile);
+                        filesNames.put(attName.toLowerCase(), myFile);
+                    }
+
+                    isFirstValueList.put(attName.toLowerCase(), true);
+                    removeErrorMessage(attName);
+                } catch (final ConnectionException e) {
+                    logger.error("add source failed", e);
+                    registerErrorMessage(attName, e.getMessage());
+                    final String message = GlobalConst.ARCHIVING_ERROR_PREFIX + "Failed adding '"
+                            + attributeLightMode.getAttributeCompleteName() + "' as source";
+                    final String reason = GlobalConst.TANGO_COMM_EXCEPTION;
+                    final String desc = "Failed while executing BooleanScalar.addSource() method...";
+                    throw new ArchivingException(message, reason, ErrSeverity.WARN, desc, "", e);
+                } catch (final Exception e) {
+                    registerErrorMessage(attName, e);
+                    logger.error("Unexpected exception during addSource:"
+                            + attributeLightMode.getAttributeCompleteName());
+                    logger.error("Unexpected exception during addSource", e);
+                } finally {
+                    startCollecting();
+                }
+            }
+        }
+    }
+
+    public abstract void addListeners(IEntity attribute) throws ArchivingException;
+
+    /**
+     * Removes an attribute from the list of the attributes for which is
+     * responsible this TdbCollector.
+     * 
+     * @param attributeName
+     * @throws ArchivingException
+     */
+    public synchronized void removeSource(final String attributeName, final boolean closeFile)
+            throws ArchivingException {
+        Util.out2.println(getClass().getSimpleName() + ".removeSource");
+        try {
+            stopCollecting();
+            final IEntity attribute = attributeList.get(attributeName);
+            if (attribute != null) {
+                removeListeners(attribute);
+                isFirstValueList.remove(attributeName.toLowerCase());
+                attributeList.remove(attributeName);
+
+                // informs the mother class that one new attribute must be
+                // removed
+                removeAttribute(attributeName);
+                removeTimestamps(attributeName);
+                Util.out4.println("\t The attribute named " + attributeName + " was fired from the Collector list...");
+                if (closeFile) {
+                    filesNames.get(attributeName.toLowerCase()).closeFile();
+                    filesNames.remove(attributeName.toLowerCase());
+                }
+                removeErrorMessage(attributeName);
+            }
+        } catch (final Exception e) {
+            final String message = GlobalConst.ARCHIVING_ERROR_PREFIX + "Failed removing '" + attributeName
+                    + "' from sources";
+            final String reason = GlobalConst.TANGO_COMM_EXCEPTION;
+            final String desc = "Failed while executing BooleanScalar.removeSource() method...";
+            throw new ArchivingException(message, reason, ErrSeverity.WARN, desc, "", e);
+        } finally {
+            startCollecting();
+        }
+    }
+
+    public abstract void removeListeners(IEntity attribute) throws ArchivingException;
+
+    public String exportFile2Db(final String attributeName) throws IOException, ArchivingException {
+        logger.debug("XXXXXXX FORCING export for " + attributeName);
+        final String result = filesNames.get(attributeName.toLowerCase()).switchFile();
+        logger.debug("Export forced done for " + attributeName + " - " + result);
+        return result;
+    }
+
+    protected void processFileScalar(final ScalarEvent scalarEvent) throws ArchivingException {
+        final String attrName = scalarEvent.getAttributeCompleteName();
+        filesNames.get(attrName.toLowerCase()).processEventScalar(scalarEvent);
+    }
+
+    protected void processFileSpectrum(final SpectrumEvent_RO spectrumEvent) throws ArchivingException {
+        final String attrName = spectrumEvent.getAttributeCompleteName();
+        filesNames.get(attrName.toLowerCase()).processEventSpectrum(spectrumEvent);
+    }
+
+    protected void processFileSpectrum(final SpectrumEvent_RW spectrumEvent) throws ArchivingException {
+        final String attrName = spectrumEvent.getAttributeCompleteName();
+        filesNames.get(attrName.toLowerCase()).processEventSpectrum(spectrumEvent);
+    }
+
+    protected void processFileImage(final ImageEvent_RO imageEvent) throws ArchivingException {
+        final String attrName = imageEvent.getAttributeCompleteName();
+        filesNames.get(attrName.toLowerCase()).processEventImage(imageEvent);
+    }
+
+    protected void setLastTimestamp(final ArchivingEvent<?> scalarEvent) {
+        if (scalarEvent != null) {
+            final String name = scalarEvent.getAttributeCompleteName();
+            final Long longTimeStamp = new Long(scalarEvent.getTimeStamp());
+
+            LimitedStack lastTimestampStack;
+            if (lastTimestampStacks.containsKey(name)) {
+                lastTimestampStack = lastTimestampStacks.get(name);
+            } else {
+                lastTimestampStack = new LimitedStack();
+                lastTimestampStacks.put(name, lastTimestampStack);
+            }
+            lastTimestampStack.push(longTimeStamp);
+        }
+    }
+
+    protected void removeTimestamps(final String attributeName) {
+        lastTimestampStacks.remove(attributeName);
+    }
+
+    protected LimitedStack getTimestamps(final String attributeName) {
+        return lastTimestampStacks.get(attributeName);
+    }
+
+    protected boolean isDataArchivableTimestampWise(final ArchivingEvent<?> scalarEvent) {
+        final String name = scalarEvent.getAttributeCompleteName();
+
+        final long newTime = scalarEvent.getTimeStamp();
+        if (newTime == 0) {
+            StringBuilder builder = new StringBuilder("NOARCHIVING - received a zero timestamp for ");
+            builder.append(name).append(" - tableName: ").append(scalarEvent.getTableName());
+            String error = builder.toString();
+            logger.warn(error);
+            registerErrorMessage(name, error);
+            return false;
+        }
+
+        final LimitedStack lastTimestampStack = getTimestamps(name);
+        if (lastTimestampStack == null) {
+            // System.out.println ( "isDataArchivableTimestampWise/name/2");
+            return true;
+        }
+
+        final boolean isAlreadyRegisteredDate = lastTimestampStack.containsDate(newTime);
+        // System.out.println (
+        // "isDataArchivableTimestampWise/isAlreadyRegisteredDate/"+isAlreadyRegisteredDate);
+        final boolean isValidRegisteredDate = lastTimestampStack.validateDate(newTime);
+        // System.out.println (
+        // "isDataArchivableTimestampWise/isAlreadyRegisteredDate/"+isAlreadyRegisteredDate);
+        if (isAlreadyRegisteredDate || !isValidRegisteredDate) {
+            Timestamp timestamp = new Timestamp(newTime);
+            StringBuilder builder = new StringBuilder("NOARCHIVING - AlreadyRegisteredDate - attribute: ");
+            builder.append(name).append(" - timestamp: ").append(timestamp);
+            logger.warn(builder.toString());
+            builder = new StringBuilder("NOARCHIVING - attribute ").append(name)
+                    .append(" seems to be frozen - timestamp: ").append(timestamp);
+            registerErrorMessage(name, builder.toString());
+            return false;
+        }
+        // m_logger.trace(ILogger.LEVEL_DEBUG, name + " timestamp OK: " + new
+        // Timestamp(newTime));
+        // System.out.println ( "isDataArchivableTimestampWise/name/3");
+        return true;
+    }
+
+    public void setDbProxy(final DbProxy _dbProxy) {
+        dbProxy = _dbProxy;
+    }
+
+    // synchronized because of attribute list
+    @Override
+    public synchronized void clear() {
+        super.clear();
+        lastTimestampStacks.clear();
+        isFirstValueList.clear();
+        lastValueHashtable.clear();
+        filesNames.clear();
+    }
+
 }
\ No newline at end of file
diff --git a/src/main/java/TdbArchiver/Collector/TdbCollectorFactory.java b/tdbarchiver/src/main/java/TdbArchiver/Collector/TdbCollectorFactory.java
similarity index 97%
rename from src/main/java/TdbArchiver/Collector/TdbCollectorFactory.java
rename to tdbarchiver/src/main/java/TdbArchiver/Collector/TdbCollectorFactory.java
index 17d4eef9376a8cf768a9503b9d9026d2b8fe8aa0..008ca61d419653010d8fb24a208265fc51f77db8 100644
--- a/src/main/java/TdbArchiver/Collector/TdbCollectorFactory.java
+++ b/tdbarchiver/src/main/java/TdbArchiver/Collector/TdbCollectorFactory.java
@@ -1,467 +1,467 @@
-// +======================================================================
-// $Source: /cvsroot/tango-cs/tango/jserver/archiving/TdbArchiver/Collector/TdbCollectorFactory.java,v $
-//
-// Project:      Tango Archiving Service
-//
-// Description:  Java source code for the class  TdbCollectorFactory.
-//						(Chinkumo Jean) - Mar 24, 2004
-//
-// $Author: pierrejoseph $
-//
-// $Revision: 1.25 $
-//
-// $Log: TdbCollectorFactory.java,v $
-// Revision 1.25  2007/08/27 14:14:35  pierrejoseph
-// Traces addition : the logger object is stored in the TdbCollectorFactory
-//
-// Revision 1.24  2007/03/05 16:25:20  ounsy
-// non-static DataBase
-//
-// Revision 1.23  2007/01/09 15:15:24  ounsy
-// put the Giacomo version back for removeAllForAttribute
-//
-// Revision 1.22  2006/11/24 14:54:17  ounsy
-// we re-use the old removeAllForAttribute
-//
-// Revision 1.21  2006/11/24 14:04:16  ounsy
-// the diary entry in case of missing collector is now done by he archiver
-//
-// Revision 1.20  2006/11/24 13:19:35  ounsy
-// TdbCollectorFactory.get(attrLightMode) has a new parameter "doCreateCollectorIfMissing". A missing collector will only be created if this is true, otherwise a message in logged into the archiver's diary and an exception launched
-//
-// Revision 1.19  2006/11/15 15:48:38  ounsy
-// added the Giacomo correction of removeAllForAttribute
-//
-// Revision 1.18  2006/08/23 09:42:56  ounsy
-// Spectrum_xxx renamed as NumberSpectrum_xxx
-//
-// Revision 1.17  2006/07/26 08:44:19  ounsy
-// TdbCollectorFactory no more static
-//
-// Revision 1.16  2006/07/25 09:47:39  ounsy
-// added a factoryLoadAssessment() method
-//
-// Revision 1.15  2006/06/27 12:07:13  ounsy
-// Corrected the bug that made the collectors all have the same logger for a given
-// SuperMode (instead of one logger per TdbArchiver)
-//
-// Revision 1.14  2006/06/16 09:25:33  ounsy
-// changed imports because of the diary package moving to the javaapi project
-//
-// Revision 1.13  2006/06/15 15:16:39  ounsy
-// added a protection against the ConcurrentModificationException that sometimes occur when launching the archivers
-//
-// Revision 1.12  2006/06/08 08:34:31  ounsy
-// added new diary logging system: the results of tmp file exports are logged in a text file (one per archiver and per day)
-//
-// Revision 1.11  2006/05/12 09:20:17  ounsy
-// list concurrent modification bug correction
-//
-// Revision 1.10  2006/04/11 09:13:32  ounsy
-// added some attribute removing methods
-//
-// Revision 1.9  2006/04/05 13:49:52  ounsy
-// new types full support
-//
-// Revision 1.8  2006/03/10 12:01:59  ounsy
-// state and string support
-//
-// Revision 1.7  2006/02/15 11:13:53  chinkumo
-// Minor change : Exception message updated.
-//
-// Revision 1.6  2006/02/07 11:56:54  ounsy
-// added spectrum RW support
-//
-// Revision 1.5  2005/11/29 17:34:14  chinkumo
-// no message
-//
-// Revision 1.4.8.3  2005/11/29 16:15:11  chinkumo
-// Code reformated (pogo compatible)
-//
-// Revision 1.4.8.2  2005/11/15 13:45:38  chinkumo
-// ...
-//
-// Revision 1.4.8.1  2005/09/09 10:18:25  chinkumo
-// Since the collecting politic was simplified and improved CollectorFactory was modified.
-//
-// Revision 1.4  2005/06/24 12:06:38  chinkumo
-// Some constants were moved from fr.soleil.hdbtdbArchivingApi.ArchivingApi.ConfigConst to fr.soleil.hdbtdbArchivingApi.ArchivingTools.Tools.GlobalConst.
-
-// This change was reported here.
-//
-// Revision 1.3  2005/06/14 10:39:09  chinkumo
-// Branch (tdbArchiver_1_0_1-branch_0)  and HEAD merged.
-//
-// Revision 1.2.6.1  2005/06/13 13:46:45  chinkumo
-// Changes made to improve the management of exceptions were reported here.
-//
-// Revision 1.2  2005/02/04 17:10:40  chinkumo
-// The trouble with the grouped stopping strategy was fixed.
-//
-// Revision 1.1  2004/12/06 16:43:24  chinkumo
-// First commit (new architecture).
-//
-// Revision 1.3  2004/09/27 13:06:33  chinkumo
-// The destroy method were changed.
-//
-// Revision 1.2  2004/09/01 15:32:37  chinkumo
-// Heading was updated.
-//
-//
-// copyleft :	Synchrotron SOLEIL
-//					L'Orme des Merisiers
-//					Saint-Aubin - BP 48
-//					91192 GIF-sur-YVETTE CEDEX
-//
-//-======================================================================
-
-package TdbArchiver.Collector;
-
-import java.util.Collection;
-import java.util.Map;
-import java.util.concurrent.ConcurrentHashMap;
-
-import org.slf4j.Logger;
-
-import TdbArchiver.Collector.image.Image_RO;
-import TdbArchiver.Collector.scalar.BooleanScalar;
-import TdbArchiver.Collector.scalar.NumberScalar;
-import TdbArchiver.Collector.scalar.StateScalar;
-import TdbArchiver.Collector.scalar.StringScalar;
-import TdbArchiver.Collector.spectrum.BooleanSpectrum;
-import TdbArchiver.Collector.spectrum.NumberSpectrum;
-import TdbArchiver.Collector.spectrum.StringSpectrum;
-import fr.esrf.Tango.AttrDataFormat;
-import fr.esrf.Tango.AttrWriteType;
-import fr.esrf.Tango.ErrSeverity;
-import fr.esrf.TangoDs.TangoConst;
-import fr.soleil.archiving.common.api.exception.ArchivingException;
-import fr.soleil.archiving.common.api.tools.GlobalConst;
-import fr.soleil.archiving.hdbtdb.api.tools.AttributeLightMode;
-import fr.soleil.archiving.hdbtdb.api.tools.AttributeSupport;
-import fr.soleil.archiving.hdbtdb.api.tools.mode.SuperMode;
-
-public class TdbCollectorFactory {
-    private final ConcurrentHashMap<SuperMode, TdbCollector> tableCollector = new ConcurrentHashMap<SuperMode, TdbCollector>();
-    private final Map<String, String> collectorErrorTable = new ConcurrentHashMap<String, String>();
-    private final Logger logger;
-
-    private String m_currentDbPath = "";
-    private String m_currentDsPath = "";
-
-    public TdbCollectorFactory(final Logger logger, final String dsPath, final String dbPath) {
-        this.logger = logger;
-        m_currentDbPath = dbPath;
-        m_currentDsPath = dsPath;
-    }
-
-    /**
-     * This method returns the instance of TdbCollector associated / associable
-     * to an attribute. In this method, attributes are not grouped by mode.
-     * 
-     * @param attributeLightMode
-     *            Attribute associated to the looked collector.
-     * @return the instance of TdbCollector associated / associable to an
-     *         attribute.
-     */
-    public TdbCollector get(final AttributeLightMode attributeLightMode) {
-
-        final SuperMode superMode = new SuperMode(attributeLightMode.getDataFormat(), attributeLightMode.getDataType(),
-                attributeLightMode.getWritable(), attributeLightMode.getMode());
-
-        TdbCollector collector = null;
-        collector = tableCollector.get(superMode);
-        return collector;
-    }
-
-    public TdbCollector get(final String attributeName) {
-        TdbCollector result = null;
-        for (TdbCollector collector : tableCollector.values()) {
-            if (collector.isCollected(attributeName)) {
-                result = collector;
-                break;
-            }
-        }
-        return result;
-    }
-
-    public TdbCollector quickGet(final String attributeName) {
-        TdbCollector result = null;
-        for (final TdbCollector collector : tableCollector.values()) {
-            if (collector.isPotentiallyCollected(attributeName)) {
-                result = collector;
-                break;
-            }
-        }
-        return result;
-    }
-
-    /**
-     * This method create a new TdbCollector instance if required associated to
-     * an attribute. In this method, attributes are not grouped by mode.
-     * 
-     * @param attributeLightMode
-     *            Attribute associated to the looked collector.
-     */
-    public void createCollectorAndAddSource(final AttributeLightMode attributeLightMode, final DbProxy dbProxy,
-            final int attributePerFile) throws ArchivingException {
-        final SuperMode superMode = new SuperMode(attributeLightMode.getDataFormat(), attributeLightMode.getDataType(),
-                attributeLightMode.getWritable(), attributeLightMode.getMode());
-        String attrName = attributeLightMode.getAttributeCompleteName();
-        TdbCollector collector = null;
-        ArchivingException lastException = null;
-        try {
-            collector = tableCollector.get(superMode);
-            if (collector == null) {
-                collector = create(attributeLightMode);
-                collector.setDbProxy(dbProxy);
-                // collector.setDiaryLogger(logger);
-                TdbCollector tmp = tableCollector.putIfAbsent(superMode, collector);
-                if (tmp != null) {
-                    collector = tmp;
-                }
-                collector.addSource(attributeLightMode, attributePerFile);
-                removeErrorMessage(attrName);
-            } else {
-                collector.addSource(attributeLightMode, attributePerFile);
-                removeErrorMessage(attrName);
-            }
-        } catch (ArchivingException e) {
-            registerError(attrName, e);
-            lastException = e;
-        }
-        if (lastException != null) {
-            throw lastException;
-        }
-    }
-
-    public String getLastError(AttributeLightMode attributeLightMode) {
-        String result;
-        String attrName = (attributeLightMode == null ? null : attributeLightMode.getAttributeCompleteName());
-        if (attrName == null) {
-            result = null;
-        } else {
-            result = collectorErrorTable.get(attrName.toLowerCase());
-            if (result == null) {
-                TdbCollector collector = get(attributeLightMode);
-                if (collector == null) {
-                    result = "No TdbCollector found";
-                } else {
-                    result = collector.getErrorMessage(attrName);
-                }
-            }
-        }
-        if (result == null) {
-            result = "";
-        }
-        return result;
-    }
-
-    public void registerError(String attrName, Exception exception) {
-        if (exception != null) {
-            registerErrorMessage(attrName, exception.getMessage());
-        }
-    }
-
-    public void registerErrorMessage(String attrName, String message) {
-        if ((attrName != null) && (message != null)) {
-            collectorErrorTable.put(attrName.toLowerCase(), message);
-        }
-    }
-
-    public void removeErrorMessage(String attrName) {
-        if (attrName != null) {
-            collectorErrorTable.remove(attrName.toLowerCase());
-        }
-    }
-
-    /**
-     * This method returns the instance of TdbCollector associated / associable
-     * to an attribute. In this method, attributes are grouped by mode.
-     * 
-     * @param attributeLightMode
-     *            Attribute associated to the looked collector.
-     * @return the instance of TdbCollector associated / associable to an
-     *         attribute.
-     */
-    private TdbCollector create(final AttributeLightMode attributeLightMode) throws ArchivingException {
-        System.out.println("TdbCollectorFactory.create\r\n\t" + attributeLightMode.toString());
-        final String name = attributeLightMode.getAttributeCompleteName();
-        final int data_type = attributeLightMode.getDataType();
-        final int data_format = attributeLightMode.getDataFormat();
-        final int writable = attributeLightMode.getWritable();
-        final TdbModeHandler modeHandler = new TdbModeHandler(attributeLightMode.getMode());
-        TdbCollector collector = null;
-        if (AttributeSupport.checkAttributeSupport(name, data_type, data_format, writable)) {
-            switch (data_format) { // [0 - > SCALAR] (1 - > SPECTRUM] [2 - >
-            // IMAGE]
-                case AttrDataFormat._SCALAR: // SCALAR
-                    switch (data_type) {
-                        case TangoConst.Tango_DEV_SHORT:
-                        case TangoConst.Tango_DEV_USHORT:
-                        case TangoConst.Tango_DEV_LONG:
-                        case TangoConst.Tango_DEV_ULONG:
-                        case TangoConst.Tango_DEV_DOUBLE:
-                        case TangoConst.Tango_DEV_FLOAT:
-                        case TangoConst.Tango_DEV_ULONG64:
-                        case TangoConst.Tango_DEV_LONG64:
-                        case TangoConst.Tango_DEV_UCHAR:
-                            collector = new NumberScalar(modeHandler, m_currentDsPath, m_currentDbPath,
-                                    AttrWriteType.from_int(writable), logger);
-                            break;
-                        case TangoConst.Tango_DEV_BOOLEAN:
-                            collector = new BooleanScalar(modeHandler, m_currentDsPath, m_currentDbPath,
-                                    AttrWriteType.from_int(writable), logger);
-                            break;
-                        case TangoConst.Tango_DEV_STATE:
-                            collector = new StateScalar(modeHandler, m_currentDsPath, m_currentDbPath,
-                                    AttrWriteType.from_int(writable), logger);
-                            break;
-                        case TangoConst.Tango_DEV_STRING:
-                            collector = new StringScalar(modeHandler, m_currentDsPath, m_currentDbPath,
-                                    AttrWriteType.from_int(writable), logger);
-                            break;
-                        default:
-                            generateException(GlobalConst.DATA_TYPE_EXCEPTION, data_type, name);
-                    }
-                    break;
-                case AttrDataFormat._SPECTRUM: // SPECTRUM
-                    switch (data_type) {
-                        case TangoConst.Tango_DEV_SHORT:
-                        case TangoConst.Tango_DEV_USHORT:
-                        case TangoConst.Tango_DEV_LONG:
-                        case TangoConst.Tango_DEV_ULONG:
-                        case TangoConst.Tango_DEV_DOUBLE:
-                        case TangoConst.Tango_DEV_FLOAT:
-                        case TangoConst.Tango_DEV_ULONG64:
-                        case TangoConst.Tango_DEV_LONG64:
-                        case TangoConst.Tango_DEV_UCHAR:
-                            collector = new NumberSpectrum(modeHandler, m_currentDsPath, m_currentDbPath,
-                                    AttrWriteType.from_int(writable), logger);
-                            break;
-                        case TangoConst.Tango_DEV_BOOLEAN:
-                            collector = new BooleanSpectrum(modeHandler, m_currentDsPath, m_currentDbPath,
-                                    AttrWriteType.from_int(writable), logger);
-                            break;
-                        case TangoConst.Tango_DEV_STRING:
-                            collector = new StringSpectrum(modeHandler, m_currentDsPath, m_currentDbPath,
-                                    AttrWriteType.from_int(writable), logger);
-                            break;
-                        default:
-                            generateException(GlobalConst.DATA_TYPE_EXCEPTION, data_type, name);
-                    }
-                    break;
-                case AttrDataFormat._IMAGE: // IMAGE
-                    collector = new Image_RO(modeHandler, m_currentDsPath, m_currentDbPath,
-                            AttrWriteType.from_int(writable), logger);
-                    break;
-                default:
-                    generateException(GlobalConst.DATA_FORMAT_EXCEPTION, data_format, name);
-            }
-        }
-
-        return collector;
-    }
-
-    public void destroy(final AttributeLightMode attributeLightMode) {
-        final SuperMode superMode = new SuperMode(attributeLightMode.getDataFormat(), attributeLightMode.getDataType(),
-                attributeLightMode.getWritable(), attributeLightMode.getMode());
-        tableCollector.remove(superMode);
-    }
-
-    public void remove(final String attributeName) throws ArchivingException {
-        // final List<SuperMode> modes = new ArrayList<SuperMode>();
-        for (final Map.Entry<SuperMode, TdbCollector> entry : tableCollector.entrySet()) {
-            // final SuperMode mode = entry.getKey();
-            final TdbCollector collector = entry.getValue();
-            if (collector.getAttributeList().contains(attributeName)) {
-                collector.removeSource(attributeName, false);
-            }
-            // if (collector.hasEmptyList()) {
-            // modes.add(mode);
-            // }
-        }
-        // XXX : collector is not removed from map, because a retry make
-        // close/open file all the time
-        // for (final SuperMode superMode : modes) {
-        // tableCollector.remove(superMode);
-        // }
-    }
-
-    public void removeAllForAttribute(final AttributeLightMode attributeLightMode) throws ArchivingException {
-        SuperMode superMode;
-        // HashSet<SuperMode> toRemove = new HashSet<SuperMode>();
-
-        superMode = new SuperMode(attributeLightMode.getDataFormat(), attributeLightMode.getDataType(),
-                attributeLightMode.getWritable(), attributeLightMode.getMode());
-
-        final TdbCollector collector = tableCollector.get(superMode);
-
-        if (collector != null) {
-            logger.debug("===> Collector found : removeSource is requested ... ");
-            collector.removeSource(attributeLightMode.getAttributeCompleteName(), false);
-            logger.debug("===> ... removeSource is done");
-            // if (collector.hasEmptyList()) {
-            // toRemove.add(superMode);
-            // }
-        }
-        // XXX : collector is not removed from map, because a retry make
-        // close/open file all the time
-        // Iterator<SuperMode> toRemoveIterator = toRemove.iterator();
-        // while (toRemoveIterator.hasNext()) {
-        // tableCollector.remove(toRemoveIterator.next());
-        // }
-
-    }
-
-    public String factoryAssessment() {
-        final StringBuilder ass = new StringBuilder();
-        if (tableCollector != null) {
-            if (!tableCollector.isEmpty()) {
-                // to avoid collector addition during tableCollector scanning
-                final Collection<TdbCollector> collectors = tableCollector.values();
-                int i = 1;
-                final int size = collectors.size();
-                for (final TdbCollector tdbCollector : collectors) {
-                    ass.append("*********************************" + " " + i++ + "/" + size + " "
-                            + "*********************************" + "\r\n");
-                    ass.append(tdbCollector.assessment());
-                }
-            }
-        }
-        return ass.toString();
-    }
-
-    private static void generateException(final String cause, final int cause_value, final String name)
-            throws ArchivingException {
-        final String message = GlobalConst.ARCHIVING_ERROR_PREFIX + " : " + cause;
-        final String reason = "Failed while executing TdbCollectorFactory.create() method...";
-        final String desc = cause + " (" + cause_value + ") not supported !! [" + name + "]";
-        throw new ArchivingException(message, reason, ErrSeverity.PANIC, desc, "");
-    }
-
-    public int[] factoryLoadAssessment() {
-        final int[] ret = new int[3];
-        if (tableCollector != null) {
-            if (!tableCollector.isEmpty()) {
-                final Collection<TdbCollector> collectors = tableCollector.values();
-                for (final TdbCollector tdbCollector : collectors) {
-                    final TdbCollector collector = tdbCollector;
-                    final int[] collectorLoad = collector.loadAssessment();
-                    ret[0] += collectorLoad[0];
-                    ret[1] += collectorLoad[1];
-                    ret[2] += collectorLoad[2];
-                }
-
-            }
-        }
-        return ret;
-    }
-
-    public void clear() {
-        for (TdbCollector collector : tableCollector.values()) {
-            collector.clear();
-        }
-        tableCollector.clear();
-    }
-}
+// +======================================================================
+// $Source: /cvsroot/tango-cs/tango/jserver/archiving/TdbArchiver/Collector/TdbCollectorFactory.java,v $
+//
+// Project:      Tango Archiving Service
+//
+// Description:  Java source code for the class  TdbCollectorFactory.
+//						(Chinkumo Jean) - Mar 24, 2004
+//
+// $Author: pierrejoseph $
+//
+// $Revision: 1.25 $
+//
+// $Log: TdbCollectorFactory.java,v $
+// Revision 1.25  2007/08/27 14:14:35  pierrejoseph
+// Traces addition : the logger object is stored in the TdbCollectorFactory
+//
+// Revision 1.24  2007/03/05 16:25:20  ounsy
+// non-static DataBase
+//
+// Revision 1.23  2007/01/09 15:15:24  ounsy
+// put the Giacomo version back for removeAllForAttribute
+//
+// Revision 1.22  2006/11/24 14:54:17  ounsy
+// we re-use the old removeAllForAttribute
+//
+// Revision 1.21  2006/11/24 14:04:16  ounsy
+// the diary entry in case of missing collector is now done by he archiver
+//
+// Revision 1.20  2006/11/24 13:19:35  ounsy
+// TdbCollectorFactory.get(attrLightMode) has a new parameter "doCreateCollectorIfMissing". A missing collector will only be created if this is true, otherwise a message in logged into the archiver's diary and an exception launched
+//
+// Revision 1.19  2006/11/15 15:48:38  ounsy
+// added the Giacomo correction of removeAllForAttribute
+//
+// Revision 1.18  2006/08/23 09:42:56  ounsy
+// Spectrum_xxx renamed as NumberSpectrum_xxx
+//
+// Revision 1.17  2006/07/26 08:44:19  ounsy
+// TdbCollectorFactory no more static
+//
+// Revision 1.16  2006/07/25 09:47:39  ounsy
+// added a factoryLoadAssessment() method
+//
+// Revision 1.15  2006/06/27 12:07:13  ounsy
+// Corrected the bug that made the collectors all have the same logger for a given
+// SuperMode (instead of one logger per TdbArchiver)
+//
+// Revision 1.14  2006/06/16 09:25:33  ounsy
+// changed imports because of the diary package moving to the javaapi project
+//
+// Revision 1.13  2006/06/15 15:16:39  ounsy
+// added a protection against the ConcurrentModificationException that sometimes occur when launching the archivers
+//
+// Revision 1.12  2006/06/08 08:34:31  ounsy
+// added new diary logging system: the results of tmp file exports are logged in a text file (one per archiver and per day)
+//
+// Revision 1.11  2006/05/12 09:20:17  ounsy
+// list concurrent modification bug correction
+//
+// Revision 1.10  2006/04/11 09:13:32  ounsy
+// added some attribute removing methods
+//
+// Revision 1.9  2006/04/05 13:49:52  ounsy
+// new types full support
+//
+// Revision 1.8  2006/03/10 12:01:59  ounsy
+// state and string support
+//
+// Revision 1.7  2006/02/15 11:13:53  chinkumo
+// Minor change : Exception message updated.
+//
+// Revision 1.6  2006/02/07 11:56:54  ounsy
+// added spectrum RW support
+//
+// Revision 1.5  2005/11/29 17:34:14  chinkumo
+// no message
+//
+// Revision 1.4.8.3  2005/11/29 16:15:11  chinkumo
+// Code reformated (pogo compatible)
+//
+// Revision 1.4.8.2  2005/11/15 13:45:38  chinkumo
+// ...
+//
+// Revision 1.4.8.1  2005/09/09 10:18:25  chinkumo
+// Since the collecting politic was simplified and improved CollectorFactory was modified.
+//
+// Revision 1.4  2005/06/24 12:06:38  chinkumo
+// Some constants were moved from fr.soleil.hdbtdbArchivingApi.ArchivingApi.ConfigConst to fr.soleil.hdbtdbArchivingApi.ArchivingTools.Tools.GlobalConst.
+
+// This change was reported here.
+//
+// Revision 1.3  2005/06/14 10:39:09  chinkumo
+// Branch (tdbArchiver_1_0_1-branch_0)  and HEAD merged.
+//
+// Revision 1.2.6.1  2005/06/13 13:46:45  chinkumo
+// Changes made to improve the management of exceptions were reported here.
+//
+// Revision 1.2  2005/02/04 17:10:40  chinkumo
+// The trouble with the grouped stopping strategy was fixed.
+//
+// Revision 1.1  2004/12/06 16:43:24  chinkumo
+// First commit (new architecture).
+//
+// Revision 1.3  2004/09/27 13:06:33  chinkumo
+// The destroy method were changed.
+//
+// Revision 1.2  2004/09/01 15:32:37  chinkumo
+// Heading was updated.
+//
+//
+// copyleft :	Synchrotron SOLEIL
+//					L'Orme des Merisiers
+//					Saint-Aubin - BP 48
+//					91192 GIF-sur-YVETTE CEDEX
+//
+//-======================================================================
+
+package TdbArchiver.Collector;
+
+import java.util.Collection;
+import java.util.Map;
+import java.util.concurrent.ConcurrentHashMap;
+
+import org.slf4j.Logger;
+
+import TdbArchiver.Collector.image.Image_RO;
+import TdbArchiver.Collector.scalar.BooleanScalar;
+import TdbArchiver.Collector.scalar.NumberScalar;
+import TdbArchiver.Collector.scalar.StateScalar;
+import TdbArchiver.Collector.scalar.StringScalar;
+import TdbArchiver.Collector.spectrum.BooleanSpectrum;
+import TdbArchiver.Collector.spectrum.NumberSpectrum;
+import TdbArchiver.Collector.spectrum.StringSpectrum;
+import fr.esrf.Tango.AttrDataFormat;
+import fr.esrf.Tango.AttrWriteType;
+import fr.esrf.Tango.ErrSeverity;
+import fr.esrf.TangoDs.TangoConst;
+import fr.soleil.archiving.common.api.exception.ArchivingException;
+import fr.soleil.archiving.common.api.tools.GlobalConst;
+import fr.soleil.archiving.hdbtdb.api.tools.AttributeLightMode;
+import fr.soleil.archiving.hdbtdb.api.tools.AttributeSupport;
+import fr.soleil.archiving.hdbtdb.api.tools.mode.SuperMode;
+
+public class TdbCollectorFactory {
+    private final ConcurrentHashMap<SuperMode, TdbCollector> tableCollector = new ConcurrentHashMap<SuperMode, TdbCollector>();
+    private final Map<String, String> collectorErrorTable = new ConcurrentHashMap<String, String>();
+    private final Logger logger;
+
+    private String m_currentDbPath = "";
+    private String m_currentDsPath = "";
+
+    public TdbCollectorFactory(final Logger logger, final String dsPath, final String dbPath) {
+        this.logger = logger;
+        m_currentDbPath = dbPath;
+        m_currentDsPath = dsPath;
+    }
+
+    /**
+     * This method returns the instance of TdbCollector associated / associable
+     * to an attribute. In this method, attributes are not grouped by mode.
+     * 
+     * @param attributeLightMode
+     *            Attribute associated to the looked collector.
+     * @return the instance of TdbCollector associated / associable to an
+     *         attribute.
+     */
+    public TdbCollector get(final AttributeLightMode attributeLightMode) {
+
+        final SuperMode superMode = new SuperMode(attributeLightMode.getDataFormat(), attributeLightMode.getDataType(),
+                attributeLightMode.getWritable(), attributeLightMode.getMode());
+
+        TdbCollector collector = null;
+        collector = tableCollector.get(superMode);
+        return collector;
+    }
+
+    public TdbCollector get(final String attributeName) {
+        TdbCollector result = null;
+        for (TdbCollector collector : tableCollector.values()) {
+            if (collector.isCollected(attributeName)) {
+                result = collector;
+                break;
+            }
+        }
+        return result;
+    }
+
+    public TdbCollector quickGet(final String attributeName) {
+        TdbCollector result = null;
+        for (final TdbCollector collector : tableCollector.values()) {
+            if (collector.isPotentiallyCollected(attributeName)) {
+                result = collector;
+                break;
+            }
+        }
+        return result;
+    }
+
+    /**
+     * This method create a new TdbCollector instance if required associated to
+     * an attribute. In this method, attributes are not grouped by mode.
+     * 
+     * @param attributeLightMode
+     *            Attribute associated to the looked collector.
+     */
+    public void createCollectorAndAddSource(final AttributeLightMode attributeLightMode, final DbProxy dbProxy,
+            final int attributePerFile) throws ArchivingException {
+        final SuperMode superMode = new SuperMode(attributeLightMode.getDataFormat(), attributeLightMode.getDataType(),
+                attributeLightMode.getWritable(), attributeLightMode.getMode());
+        String attrName = attributeLightMode.getAttributeCompleteName();
+        TdbCollector collector = null;
+        ArchivingException lastException = null;
+        try {
+            collector = tableCollector.get(superMode);
+            if (collector == null) {
+                collector = create(attributeLightMode);
+                collector.setDbProxy(dbProxy);
+                // collector.setDiaryLogger(logger);
+                TdbCollector tmp = tableCollector.putIfAbsent(superMode, collector);
+                if (tmp != null) {
+                    collector = tmp;
+                }
+                collector.addSource(attributeLightMode, attributePerFile);
+                removeErrorMessage(attrName);
+            } else {
+                collector.addSource(attributeLightMode, attributePerFile);
+                removeErrorMessage(attrName);
+            }
+        } catch (ArchivingException e) {
+            registerError(attrName, e);
+            lastException = e;
+        }
+        if (lastException != null) {
+            throw lastException;
+        }
+    }
+
+    public String getLastError(AttributeLightMode attributeLightMode) {
+        String result;
+        String attrName = (attributeLightMode == null ? null : attributeLightMode.getAttributeCompleteName());
+        if (attrName == null) {
+            result = null;
+        } else {
+            result = collectorErrorTable.get(attrName.toLowerCase());
+            if (result == null) {
+                TdbCollector collector = get(attributeLightMode);
+                if (collector == null) {
+                    result = "No TdbCollector found";
+                } else {
+                    result = collector.getErrorMessage(attrName);
+                }
+            }
+        }
+        if (result == null) {
+            result = "";
+        }
+        return result;
+    }
+
+    public void registerError(String attrName, Exception exception) {
+        if (exception != null) {
+            registerErrorMessage(attrName, exception.getMessage());
+        }
+    }
+
+    public void registerErrorMessage(String attrName, String message) {
+        if ((attrName != null) && (message != null)) {
+            collectorErrorTable.put(attrName.toLowerCase(), message);
+        }
+    }
+
+    public void removeErrorMessage(String attrName) {
+        if (attrName != null) {
+            collectorErrorTable.remove(attrName.toLowerCase());
+        }
+    }
+
+    /**
+     * This method returns the instance of TdbCollector associated / associable
+     * to an attribute. In this method, attributes are grouped by mode.
+     * 
+     * @param attributeLightMode
+     *            Attribute associated to the looked collector.
+     * @return the instance of TdbCollector associated / associable to an
+     *         attribute.
+     */
+    private TdbCollector create(final AttributeLightMode attributeLightMode) throws ArchivingException {
+        System.out.println("TdbCollectorFactory.create\r\n\t" + attributeLightMode.toString());
+        final String name = attributeLightMode.getAttributeCompleteName();
+        final int data_type = attributeLightMode.getDataType();
+        final int data_format = attributeLightMode.getDataFormat();
+        final int writable = attributeLightMode.getWritable();
+        final TdbModeHandler modeHandler = new TdbModeHandler(attributeLightMode.getMode());
+        TdbCollector collector = null;
+        if (AttributeSupport.checkAttributeSupport(name, data_type, data_format, writable)) {
+            switch (data_format) { // [0 - > SCALAR] (1 - > SPECTRUM] [2 - >
+            // IMAGE]
+                case AttrDataFormat._SCALAR: // SCALAR
+                    switch (data_type) {
+                        case TangoConst.Tango_DEV_SHORT:
+                        case TangoConst.Tango_DEV_USHORT:
+                        case TangoConst.Tango_DEV_LONG:
+                        case TangoConst.Tango_DEV_ULONG:
+                        case TangoConst.Tango_DEV_DOUBLE:
+                        case TangoConst.Tango_DEV_FLOAT:
+                        case TangoConst.Tango_DEV_ULONG64:
+                        case TangoConst.Tango_DEV_LONG64:
+                        case TangoConst.Tango_DEV_UCHAR:
+                            collector = new NumberScalar(modeHandler, m_currentDsPath, m_currentDbPath,
+                                    AttrWriteType.from_int(writable), logger);
+                            break;
+                        case TangoConst.Tango_DEV_BOOLEAN:
+                            collector = new BooleanScalar(modeHandler, m_currentDsPath, m_currentDbPath,
+                                    AttrWriteType.from_int(writable), logger);
+                            break;
+                        case TangoConst.Tango_DEV_STATE:
+                            collector = new StateScalar(modeHandler, m_currentDsPath, m_currentDbPath,
+                                    AttrWriteType.from_int(writable), logger);
+                            break;
+                        case TangoConst.Tango_DEV_STRING:
+                            collector = new StringScalar(modeHandler, m_currentDsPath, m_currentDbPath,
+                                    AttrWriteType.from_int(writable), logger);
+                            break;
+                        default:
+                            generateException(GlobalConst.DATA_TYPE_EXCEPTION, data_type, name);
+                    }
+                    break;
+                case AttrDataFormat._SPECTRUM: // SPECTRUM
+                    switch (data_type) {
+                        case TangoConst.Tango_DEV_SHORT:
+                        case TangoConst.Tango_DEV_USHORT:
+                        case TangoConst.Tango_DEV_LONG:
+                        case TangoConst.Tango_DEV_ULONG:
+                        case TangoConst.Tango_DEV_DOUBLE:
+                        case TangoConst.Tango_DEV_FLOAT:
+                        case TangoConst.Tango_DEV_ULONG64:
+                        case TangoConst.Tango_DEV_LONG64:
+                        case TangoConst.Tango_DEV_UCHAR:
+                            collector = new NumberSpectrum(modeHandler, m_currentDsPath, m_currentDbPath,
+                                    AttrWriteType.from_int(writable), logger);
+                            break;
+                        case TangoConst.Tango_DEV_BOOLEAN:
+                            collector = new BooleanSpectrum(modeHandler, m_currentDsPath, m_currentDbPath,
+                                    AttrWriteType.from_int(writable), logger);
+                            break;
+                        case TangoConst.Tango_DEV_STRING:
+                            collector = new StringSpectrum(modeHandler, m_currentDsPath, m_currentDbPath,
+                                    AttrWriteType.from_int(writable), logger);
+                            break;
+                        default:
+                            generateException(GlobalConst.DATA_TYPE_EXCEPTION, data_type, name);
+                    }
+                    break;
+                case AttrDataFormat._IMAGE: // IMAGE
+                    collector = new Image_RO(modeHandler, m_currentDsPath, m_currentDbPath,
+                            AttrWriteType.from_int(writable), logger);
+                    break;
+                default:
+                    generateException(GlobalConst.DATA_FORMAT_EXCEPTION, data_format, name);
+            }
+        }
+
+        return collector;
+    }
+
+    public void destroy(final AttributeLightMode attributeLightMode) {
+        final SuperMode superMode = new SuperMode(attributeLightMode.getDataFormat(), attributeLightMode.getDataType(),
+                attributeLightMode.getWritable(), attributeLightMode.getMode());
+        tableCollector.remove(superMode);
+    }
+
+    public void remove(final String attributeName) throws ArchivingException {
+        // final List<SuperMode> modes = new ArrayList<SuperMode>();
+        for (final Map.Entry<SuperMode, TdbCollector> entry : tableCollector.entrySet()) {
+            // final SuperMode mode = entry.getKey();
+            final TdbCollector collector = entry.getValue();
+            if (collector.getAttributeList().contains(attributeName)) {
+                collector.removeSource(attributeName, false);
+            }
+            // if (collector.hasEmptyList()) {
+            // modes.add(mode);
+            // }
+        }
+        // XXX : collector is not removed from map, because a retry make
+        // close/open file all the time
+        // for (final SuperMode superMode : modes) {
+        // tableCollector.remove(superMode);
+        // }
+    }
+
+    public void removeAllForAttribute(final AttributeLightMode attributeLightMode) throws ArchivingException {
+        SuperMode superMode;
+        // HashSet<SuperMode> toRemove = new HashSet<SuperMode>();
+
+        superMode = new SuperMode(attributeLightMode.getDataFormat(), attributeLightMode.getDataType(),
+                attributeLightMode.getWritable(), attributeLightMode.getMode());
+
+        final TdbCollector collector = tableCollector.get(superMode);
+
+        if (collector != null) {
+            logger.debug("===> Collector found : removeSource is requested ... ");
+            collector.removeSource(attributeLightMode.getAttributeCompleteName(), false);
+            logger.debug("===> ... removeSource is done");
+            // if (collector.hasEmptyList()) {
+            // toRemove.add(superMode);
+            // }
+        }
+        // XXX : collector is not removed from map, because a retry make
+        // close/open file all the time
+        // Iterator<SuperMode> toRemoveIterator = toRemove.iterator();
+        // while (toRemoveIterator.hasNext()) {
+        // tableCollector.remove(toRemoveIterator.next());
+        // }
+
+    }
+
+    public String factoryAssessment() {
+        final StringBuilder ass = new StringBuilder();
+        if (tableCollector != null) {
+            if (!tableCollector.isEmpty()) {
+                // to avoid collector addition during tableCollector scanning
+                final Collection<TdbCollector> collectors = tableCollector.values();
+                int i = 1;
+                final int size = collectors.size();
+                for (final TdbCollector tdbCollector : collectors) {
+                    ass.append("*********************************" + " " + i++ + "/" + size + " "
+                            + "*********************************" + "\r\n");
+                    ass.append(tdbCollector.assessment());
+                }
+            }
+        }
+        return ass.toString();
+    }
+
+    private static void generateException(final String cause, final int cause_value, final String name)
+            throws ArchivingException {
+        final String message = GlobalConst.ARCHIVING_ERROR_PREFIX + " : " + cause;
+        final String reason = "Failed while executing TdbCollectorFactory.create() method...";
+        final String desc = cause + " (" + cause_value + ") not supported !! [" + name + "]";
+        throw new ArchivingException(message, reason, ErrSeverity.PANIC, desc, "");
+    }
+
+    public int[] factoryLoadAssessment() {
+        final int[] ret = new int[3];
+        if (tableCollector != null) {
+            if (!tableCollector.isEmpty()) {
+                final Collection<TdbCollector> collectors = tableCollector.values();
+                for (final TdbCollector tdbCollector : collectors) {
+                    final TdbCollector collector = tdbCollector;
+                    final int[] collectorLoad = collector.loadAssessment();
+                    ret[0] += collectorLoad[0];
+                    ret[1] += collectorLoad[1];
+                    ret[2] += collectorLoad[2];
+                }
+
+            }
+        }
+        return ret;
+    }
+
+    public void clear() {
+        for (TdbCollector collector : tableCollector.values()) {
+            collector.clear();
+        }
+        tableCollector.clear();
+    }
+}
diff --git a/src/main/java/TdbArchiver/Collector/TdbModeHandler.java b/tdbarchiver/src/main/java/TdbArchiver/Collector/TdbModeHandler.java
similarity index 96%
rename from src/main/java/TdbArchiver/Collector/TdbModeHandler.java
rename to tdbarchiver/src/main/java/TdbArchiver/Collector/TdbModeHandler.java
index 2cff7f95c625675db68fde35785fc21acdc93d53..3f7dce14bea241ee1127708c2dd49ebcd70d4879 100644
--- a/src/main/java/TdbArchiver/Collector/TdbModeHandler.java
+++ b/tdbarchiver/src/main/java/TdbArchiver/Collector/TdbModeHandler.java
@@ -1,105 +1,105 @@
-//+======================================================================
-// $Source: /cvsroot/tango-cs/tango/jserver/archiving/TdbArchiver/Collector/TdbModeHandler.java,v $
-//
-// Project:      Tango Archiving Service
-//
-// Description:  Java source code for the class  TdbModeHandler.
-//						(Chinkumo Jean) - Apr 27, 2004
-//
-// $Author: pierrejoseph $
-//
-// $Revision: 1.17 $
-//
-// $Log: TdbModeHandler.java,v $
-// Revision 1.17  2007/06/13 13:12:03  pierrejoseph
-// modeHandler is stored in a common archiver part
-//
-// Revision 1.16  2007/05/25 12:03:36  pierrejoseph
-// Pb mode counter on various mode in the same collector : one ModesCounters object by attribut stored in a hashtable of the ArchiverCollector object (in common part)
-//
-// Revision 1.15  2007/04/24 14:29:28  ounsy
-// added a log in the case of unexpected ClassCast exception on the event's value
-//
-// Revision 1.14  2007/04/03 15:15:41  ounsy
-// corrected isDataArchivable
-//
-// Revision 1.13  2007/03/20 10:46:51  ounsy
-// minor changes
-//
-// Revision 1.12  2006/11/30 14:17:44  ounsy
-// minor changes
-//
-// Revision 1.11  2006/11/09 14:21:55  ounsy
-// minor changes
-//
-// Revision 1.10  2006/11/08 10:11:11  ounsy
-// minor changes
-//
-// Revision 1.9  2006/11/07 16:13:35  ounsy
-// corrected the state/string bug
-//
-// Revision 1.8  2006/07/27 12:37:20  ounsy
-// corrected the absolute and relative modes
-//
-// Revision 1.7  2006/05/16 09:27:50  ounsy
-// added a rounding step to avoid the irrational period ratios problem
-//
-// Revision 1.6  2006/03/13 15:26:36  ounsy
-// Long as an int management
-//
-// Revision 1.5  2006/03/10 12:01:59  ounsy
-// state and string support
-//
-// Revision 1.4  2005/11/29 17:34:14  chinkumo
-// no message
-//
-// Revision 1.3.10.4  2005/11/29 16:15:11  chinkumo
-// Code reformated (pogo compatible)
-//
-// Revision 1.3.10.3  2005/11/15 13:45:38  chinkumo
-// ...
-//
-// Revision 1.3.10.2  2005/09/26 08:01:54  chinkumo
-// Minor changes !
-//
-// Revision 1.3.10.1  2005/09/09 10:18:58  chinkumo
-// Since the collecting politic was simplified and improved this class was modified.
-//
-// Revision 1.3  2005/06/14 10:39:09  chinkumo
-// Branch (tdbArchiver_1_0_1-branch_0)  and HEAD merged.
-//
-// Revision 1.2.6.1  2005/05/11 15:56:38  chinkumo
-// The 'absolute mode' just behaved like the 'threshold mode'. This was corrected.
-//
-// Revision 1.2  2005/02/04 17:10:41  chinkumo
-// The trouble with the grouped stopping strategy was fixed.
-//
-// Revision 1.1  2004/12/06 16:43:24  chinkumo
-// First commit (new architecture).
-//
-// Revision 1.3  2004/09/07 13:19:15  ho
-// Fixe the bug in the relative mode when the value is negative
-//
-// Revision 1.2  2004/09/01 15:32:53  chinkumo
-// Heading was updated.
-//
-//
-// copyleft :	Synchrotron SOLEIL
-//					L'Orme des Merisiers
-//					Saint-Aubin - BP 48
-//					91192 GIF-sur-YVETTE CEDEX
-//
-//-======================================================================
-package TdbArchiver.Collector;
-
-import Common.Archiver.Collector.ModeHandler;
-import fr.soleil.archiving.hdbtdb.api.tools.mode.Mode;
-
-public class TdbModeHandler extends ModeHandler {
-	/**
-	 * Creates a new instance of TdbModeHandler
-	 */
-	public TdbModeHandler(Mode tdbMode) {
-		super(tdbMode);
-	}
-}
+//+======================================================================
+// $Source: /cvsroot/tango-cs/tango/jserver/archiving/TdbArchiver/Collector/TdbModeHandler.java,v $
+//
+// Project:      Tango Archiving Service
+//
+// Description:  Java source code for the class  TdbModeHandler.
+//						(Chinkumo Jean) - Apr 27, 2004
+//
+// $Author: pierrejoseph $
+//
+// $Revision: 1.17 $
+//
+// $Log: TdbModeHandler.java,v $
+// Revision 1.17  2007/06/13 13:12:03  pierrejoseph
+// modeHandler is stored in a common archiver part
+//
+// Revision 1.16  2007/05/25 12:03:36  pierrejoseph
+// Pb mode counter on various mode in the same collector : one ModesCounters object by attribut stored in a hashtable of the ArchiverCollector object (in common part)
+//
+// Revision 1.15  2007/04/24 14:29:28  ounsy
+// added a log in the case of unexpected ClassCast exception on the event's value
+//
+// Revision 1.14  2007/04/03 15:15:41  ounsy
+// corrected isDataArchivable
+//
+// Revision 1.13  2007/03/20 10:46:51  ounsy
+// minor changes
+//
+// Revision 1.12  2006/11/30 14:17:44  ounsy
+// minor changes
+//
+// Revision 1.11  2006/11/09 14:21:55  ounsy
+// minor changes
+//
+// Revision 1.10  2006/11/08 10:11:11  ounsy
+// minor changes
+//
+// Revision 1.9  2006/11/07 16:13:35  ounsy
+// corrected the state/string bug
+//
+// Revision 1.8  2006/07/27 12:37:20  ounsy
+// corrected the absolute and relative modes
+//
+// Revision 1.7  2006/05/16 09:27:50  ounsy
+// added a rounding step to avoid the irrational period ratios problem
+//
+// Revision 1.6  2006/03/13 15:26:36  ounsy
+// Long as an int management
+//
+// Revision 1.5  2006/03/10 12:01:59  ounsy
+// state and string support
+//
+// Revision 1.4  2005/11/29 17:34:14  chinkumo
+// no message
+//
+// Revision 1.3.10.4  2005/11/29 16:15:11  chinkumo
+// Code reformated (pogo compatible)
+//
+// Revision 1.3.10.3  2005/11/15 13:45:38  chinkumo
+// ...
+//
+// Revision 1.3.10.2  2005/09/26 08:01:54  chinkumo
+// Minor changes !
+//
+// Revision 1.3.10.1  2005/09/09 10:18:58  chinkumo
+// Since the collecting politic was simplified and improved this class was modified.
+//
+// Revision 1.3  2005/06/14 10:39:09  chinkumo
+// Branch (tdbArchiver_1_0_1-branch_0)  and HEAD merged.
+//
+// Revision 1.2.6.1  2005/05/11 15:56:38  chinkumo
+// The 'absolute mode' just behaved like the 'threshold mode'. This was corrected.
+//
+// Revision 1.2  2005/02/04 17:10:41  chinkumo
+// The trouble with the grouped stopping strategy was fixed.
+//
+// Revision 1.1  2004/12/06 16:43:24  chinkumo
+// First commit (new architecture).
+//
+// Revision 1.3  2004/09/07 13:19:15  ho
+// Fixe the bug in the relative mode when the value is negative
+//
+// Revision 1.2  2004/09/01 15:32:53  chinkumo
+// Heading was updated.
+//
+//
+// copyleft :	Synchrotron SOLEIL
+//					L'Orme des Merisiers
+//					Saint-Aubin - BP 48
+//					91192 GIF-sur-YVETTE CEDEX
+//
+//-======================================================================
+package TdbArchiver.Collector;
+
+import Common.Archiver.Collector.ModeHandler;
+import fr.soleil.archiving.hdbtdb.api.tools.mode.Mode;
+
+public class TdbModeHandler extends ModeHandler {
+	/**
+	 * Creates a new instance of TdbModeHandler
+	 */
+	public TdbModeHandler(Mode tdbMode) {
+		super(tdbMode);
+	}
+}
diff --git a/src/main/java/TdbArchiver/Collector/Tools/FileTools.java b/tdbarchiver/src/main/java/TdbArchiver/Collector/Tools/FileTools.java
similarity index 95%
rename from src/main/java/TdbArchiver/Collector/Tools/FileTools.java
rename to tdbarchiver/src/main/java/TdbArchiver/Collector/Tools/FileTools.java
index b16f2ee1ca633b076849ab39e55c812c69f84765..aca2d9b4e9d456b05d5a94ec6914cce026ff2363 100644
--- a/src/main/java/TdbArchiver/Collector/Tools/FileTools.java
+++ b/tdbarchiver/src/main/java/TdbArchiver/Collector/Tools/FileTools.java
@@ -1,772 +1,776 @@
-// +======================================================================
-//$Source: /cvsroot/tango-cs/tango/jserver/archiving/TdbArchiver/Collector/Tools/FileTools.java,v $
-
-//Project:      Tango Archiving Service
-
-//Description:  Java source code for the class  FileTools.
-//(Chinkumo Jean) - Jun 4, 2004
-
-//$Author: pierrejoseph $
-
-//$Revision: 1.52 $
-
-//$Log: FileTools.java,v $
-//Revision 1.52  2007/06/04 09:57:21  pierrejoseph
-//NIO usage
-
-//Revision 1.3  2007/04/16 14:57:21  ounsy
-//threads are now started via an ExecutorService
-
-//Revision 1.2  2007/04/16 12:54:51  ounsy
-//added a trace in write() in case of IOException
-
-//Revision 1.1  2007/03/20 14:54:38  ounsy
-//creation
-
-//Revision 1.46  2007/03/16 15:36:10  ounsy
-//now uses a file channel
-
-//Revision 1.45  2007/03/05 16:25:19  ounsy
-//non-static DataBase
-
-//Revision 1.44  2007/02/27 15:34:48  ounsy
-//corrected a severe bug in  processEventSpectrum(SpectrumEvent_RO spectrumEvent_ro) (the value wasn't filled)
-
-//Revision 1.43  2007/01/31 13:06:34  ounsy
-//attempted to correct the "Stream Closed" bug by removing a useless call to flush in flusBuffer
-
-//Revision 1.42  2007/01/08 12:44:51  ounsy
-//modified WindowThread.destroy to comment the thread.interrupt command which causes InterruptedException for no good reason
-
-//Revision 1.41  2006/12/07 15:19:17  ounsy
-//simpler synchronize structuer
-
-//Revision 1.40  2006/12/01 13:53:47  ounsy
-//added the missing synchronizes on _bufferedWriter operations
-
-//Revision 1.39  2006/11/29 15:20:11  ounsy
-//removed the class-level reference to the FileWriter instance; the ThreadGroup is now an AttributeThreadGroup that overrides uncaughtException to add unexpected exceptions logging
-
-//Revision 1.38  2006/11/29 13:37:29  ounsy
-//added a trace in case of uncaught exception in WindowThread
-
-//Revision 1.37  2006/11/20 09:25:35  ounsy
-//the TMP file name has changed, and the flush is only on file closing
-
-//Revision 1.36  2006/11/09 14:22:11  ounsy
-//minor changes
-
-//Revision 1.35  2006/11/07 16:13:50  ounsy
-//minor changes
-
-//Revision 1.34  2006/10/31 16:54:12  ounsy
-//milliseconds and null values management
-
-//Revision 1.33  2006/10/19 12:26:37  ounsy
-//replaced ExportThread with an ExportTask that can be synchronous or asynchronous
-
-//Revision 1.32  2006/08/23 09:55:15  ounsy
-//FileTools compatible with the new TDB file management
-//+ keeping period removed from FileTools (it was already no more used, but the parameter was still here. Only removed a no more used parameter)
-
-//Revision 1.31  2006/07/24 07:32:35  ounsy
-//better image support
-
-//Revision 1.30  2006/07/20 09:23:22  ounsy
-//String encoding before file writing
-
-//Revision 1.29  2006/07/18 08:00:47  ounsy
-//swapFile() now returns the table name
-
-//Revision 1.28  2006/07/06 09:46:56  ounsy
-//removed the calls to file cleaning threads (job importing)
-
-//Revision 1.27  2006/06/16 09:25:33  ounsy
-//changed imports because of the diary package moving to the javaapi project
-
-//Revision 1.26  2006/06/15 15:17:50  ounsy
-//added a protection against writing in closed files in case of forced exports (eg. a stopArchiving command)
-
-//Revision 1.25  2006/06/14 08:16:32  ounsy
-//boolean value protected with '
-
-//Revision 1.24  2006/06/13 14:06:44  ounsy
-//Added calls to the garbage collector in file deletion Threads
-
-//Revision 1.23  2006/06/13 13:30:30  ounsy
-//added diary messages for tmp files deleting
-
-//Revision 1.22  2006/06/08 08:34:31  ounsy
-//added new diary logging system: the results of tmp file exports are logged in a text file (one per archiver and per day)
-
-//Revision 1.21  2006/06/07 12:57:02  ounsy
-//minor changes
-
-//Revision 1.20  2006/05/30 12:37:00  ounsy
-//added a cleanOldFiles property
-
-//Revision 1.19  2006/05/24 08:08:18  ounsy
-//added a millisecond parameter to the Thread.join method
-
-//Revision 1.18  2006/05/23 12:00:20  ounsy
-//corrected a synchronization problem between file exporting and event writing in the same file
-
-//Revision 1.17  2006/05/16 09:30:41  ounsy
-//added what's necessary for the old files deletion mechanism
-
-//Revision 1.16  2006/03/28 11:15:39  ounsy
-//minor changes
-
-//Revision 1.15  2006/03/27 13:56:03  ounsy
-//replaced
-//( new exportThread(get_fileName()) ).start();
-//with
-//( new exportThread(get_fileName()) ).run();
-
-//Revision 1.14  2006/03/21 14:18:42  ounsy
-//bug correction on archiving stop
-
-//Revision 1.13  2006/03/15 16:06:50  ounsy
-//corrected the bug where some temp files were randomly not purged
-
-//Revision 1.12  2006/03/13 14:54:59  ounsy
-//minor changes
-
-//Revision 1.11  2006/02/15 11:19:26  chinkumo
-//Since the spectrum storage used type was changed on the Oracle side processEventSpectrum was modified.
-//This change enables partitionning on Oracle server.
-
-//Revision 1.10  2006/02/13 09:36:49  chinkumo
-//Changes made into the DataBaseApi Class were reported here.
-//(Methods 'exportToDB_ScalarRO/WO/RW', 'exportToDB_SpectrumRO/WO/RW' and 'exportToDB_ImageRO/WO/RW' were generalized into 'exportToDB_Scalar', 'exportToDB_Spectrum' and 'exportToDB_Image')
-
-//Revision 1.9  2006/02/07 11:57:15  ounsy
-//added spectrum RW support
-
-//Revision 1.8  2005/11/29 17:34:14  chinkumo
-//no message
-
-//Revision 1.7.8.3  2005/11/29 16:15:11  chinkumo
-//Code reformated (pogo compatible)
-
-//Revision 1.7.8.2  2005/11/15 13:45:38  chinkumo
-//...
-
-//Revision 1.7.8.1  2005/09/09 10:26:21  chinkumo
-//Since the collecting politic was simplified and improved this class was modified.
-
-//Revision 1.7  2005/06/24 12:05:17  chinkumo
-//Changes made to make the processEventScalarXXXXXX method use the fr.soleil.hdbtdbArchivingApi.ArchivingTools.Tools.DateUtil's milliToString() method.
-
-//Revision 1.6  2005/06/14 10:39:09  chinkumo
-//Branch (tdbArchiver_1_0_1-branch_0)  and HEAD merged.
-
-//Revision 1.5.4.2  2005/06/13 13:43:33  chinkumo
-//Changes made to improve the management of exceptions were reported here.
-
-//Revision 1.5.4.1  2005/04/29 18:40:09  chinkumo
-//Date format changed to improve efficiency while  archiving. This improve a lot temporary archiving.
-
-//Revision 1.5  2005/04/07 13:36:04  chinkumo
-//the apostrophe date surround string (") was removed when . This is to avoid problems with some MySQL versions (4.1.x) when inserting records.
-
-//Revision 1.4  2005/04/06 19:14:18  chinkumo
-//Changes done to optimize the use of String object type.
-//The quote string (') was changed into the apostrophe string ("). This is to avoid problems with some MySQL versions (4.1.x) when inserting records with date field.
-
-//Revision 1.3  2005/02/04 17:10:38  chinkumo
-//The trouble with the grouped stopping strategy was fixed.
-
-//Revision 1.2  2005/01/31 15:09:04  chinkumo
-//Changes made since the TdbProxy class was changed into the DbProxy class.
-
-//Revision 1.1  2004/12/06 16:43:25  chinkumo
-//First commit (new architecture).
-
-//Revision 1.7  2004/10/07 15:05:39  chinkumo
-//The problem of 'regional parameters' was fixed.
-
-//Revision 1.5  2004/09/27 13:44:22  chinkumo
-//A new thread was created to delete files.
-//In general, the behavior of the various threads was improved (synchronization).
-
-//Revision 1.4  2004/09/14 13:28:51  chinkumo
-//Thread stuff simplified !
-
-//Revision 1.3  2004/09/01 15:51:54  chinkumo
-//Heading was updated.
-
-//copyleft :   Synchrotron SOLEIL
-//L'Orme des Merisiers
-//Saint-Aubin - BP 48
-//91192 GIF-sur-YVETTE CEDEX
-
-//-======================================================================
-package TdbArchiver.Collector.Tools;
-
-import java.io.File;
-import java.io.FileOutputStream;
-import java.io.IOException;
-import java.nio.ByteBuffer;
-import java.nio.channels.FileChannel;
-import java.sql.Timestamp;
-import java.util.Date;
-
-import org.slf4j.Logger;
-
-import TdbArchiver.Collector.DbProxy;
-import fr.esrf.Tango.AttrDataFormat;
-import fr.esrf.Tango.AttrWriteType;
-import fr.esrf.Tango.ErrSeverity;
-import fr.esrf.TangoDs.TangoConst;
-import fr.esrf.TangoDs.Util;
-import fr.soleil.archiving.common.api.exception.ArchivingException;
-import fr.soleil.archiving.common.api.tools.DateHeure;
-import fr.soleil.archiving.common.api.tools.GlobalConst;
-import fr.soleil.archiving.common.api.tools.StringFormater;
-import fr.soleil.archiving.hdbtdb.api.ConfigConst;
-import fr.soleil.archiving.hdbtdb.api.tools.DateUtil;
-import fr.soleil.archiving.hdbtdb.api.tools.ImageEvent_RO;
-import fr.soleil.archiving.hdbtdb.api.tools.ScalarEvent;
-import fr.soleil.archiving.hdbtdb.api.tools.SpectrumEvent_RO;
-import fr.soleil.archiving.hdbtdb.api.tools.SpectrumEvent_RW;
-
-public class FileTools {
-    private final int dataFormat;
-    private final int writable;
-    private String fileName;
-    private final String tableName;
-    private FileChannel channel;
-    private final String localFilePath;
-    private final String remoteFilePath;
-
-    private final Logger logger;
-    private final DbProxy dbProxy;
-    private Timestamp lastTimestamp;
-    private final String attributeName;
-    private int writtenAttributes;
-    private int attributePerFile;
-    private Date creationFileDate;
-    private final long exportPeriod;
-
-    public FileTools(final String attributeName, final String tableName, final int dataFormat, final int writable,
-            final long windowsDuration, final Logger logger, final DbProxy dbProxy, final String workingDsPath,
-            final String workingDbPath) throws IOException, ArchivingException {
-        this.dataFormat = dataFormat;
-        this.writable = writable;
-        this.tableName = tableName;
-        this.logger = logger;
-        this.dbProxy = dbProxy;
-        this.attributeName = attributeName;
-        exportPeriod = windowsDuration;
-        attributePerFile = 0;
-        localFilePath = workingDsPath;
-        remoteFilePath = workingDbPath;
-        writtenAttributes = 0;
-        logger.debug("new FileTools for " + attributeName + " at " + localFilePath);
-
-        checkDirs(localFilePath);
-        openFile();
-    }
-
-    private String buidFileName(final String tableName) {
-        final StringBuilder fileName = new StringBuilder();
-        creationFileDate = new Date();
-        final DateHeure dh = new DateHeure(creationFileDate);
-        fileName.append(tableName);
-        fileName.append("-");
-        fileName.append(dh.toString("yyyyMMdd"));
-        fileName.append("-");
-        fileName.append(dh.toString("HHmmss"));
-        fileName.append(".dat");
-        return fileName.toString();
-    }
-
-    private static void checkDirs(final String path) {
-        final File pathDir = new File(path);
-        if (!pathDir.exists()) {
-            pathDir.mkdirs();
-        }
-    }
-
-    private String getLocalFilePath() {
-        return localFilePath + File.separator + fileName;
-    }
-
-    private synchronized void openFile() throws IOException, ArchivingException {
-        try {
-            fileName = buidFileName(tableName);
-            logger.info("open file " + getLocalFilePath());
-            channel = new FileOutputStream(new File(getLocalFilePath())).getChannel();
-            if (dbProxy.getDataBase().isOracle()) {
-                exportFileToDB(fileName);
-            }
-        } catch (final IOException e) {
-            StringBuilder messageBuilder = new StringBuilder();
-            messageBuilder.append("ERROR !! ").append("\r\n").append("\t Origin : \t ").append("FileTools.initFile")
-                    .append("\r\n").append("\t Reason : \t ").append(e.getClass().getName()).append("\r\n")
-                    .append("\t Description : \t ").append(e.getMessage()).append("\r\n")
-                    .append("\t Additional information : \t ").append("").append("\r\n");
-            logger.error(messageBuilder.toString());
-            e.printStackTrace();
-            throw e;
-        }
-    }
-
-    /**
-     * Close the file and launch an export of this file to the database.
-     */
-    public synchronized void closeFile() throws IOException, ArchivingException {
-        final String oldFileName = fileName;
-        logger.info("closing file " + getLocalFilePath());
-        channel.close();
-        logger.info("file closed " + getLocalFilePath());
-        if (dbProxy.getDataBase().isMySQL()) {
-            exportFileToDB(oldFileName);
-        }
-    }
-
-    public synchronized void processEventScalar(final ScalarEvent scalarEvent) throws ArchivingException {
-        try {
-            String readValue = scalarEvent.valueToString(0);
-            String writeValue = scalarEvent.valueToString(1);
-            final long timeStampValue = scalarEvent.getTimeStamp();
-            if (isValidLine(timeStampValue)) {
-                doExport();
-                if (dbProxy.getDataBase().isOracle()) {
-                    if (readValue == null || GlobalConst.ARCHIVER_NULL_VALUE.equalsIgnoreCase(readValue.trim())) {
-                        readValue = GlobalConst.ORACLE_NULL_VALUE;
-                    }
-                    if (writeValue == null || GlobalConst.ARCHIVER_NULL_VALUE.equalsIgnoreCase(writeValue.trim())) {
-                        writeValue = GlobalConst.ORACLE_NULL_VALUE;
-                    }
-                    if (scalarEvent.getDataType() == TangoConst.Tango_DEV_STRING) {
-                        readValue = StringFormater.formatStringToWrite(readValue);
-                        writeValue = StringFormater.formatStringToWrite(writeValue);
-                    }
-                    final StringBuilder stringBuffer = new StringBuilder();
-                    stringBuffer.append("\"");
-                    stringBuffer.append(DateUtil.milliToString(timeStampValue, DateUtil.FR_DATE_PATTERN));
-                    stringBuffer.append("\"");
-                    stringBuffer.append(",");
-
-                    switch (scalarEvent.getWritable()) {
-                        case AttrWriteType._READ:
-                            stringBuffer.append("\"").append(readValue).append("\"");
-                            break;
-                        case AttrWriteType._READ_WRITE:
-                        case AttrWriteType._READ_WITH_WRITE:
-                            stringBuffer.append("\"").append(readValue).append("\"");
-                            stringBuffer.append(",");
-                            stringBuffer.append("\"").append(writeValue).append("\"");
-                            break;
-                        case AttrWriteType._WRITE:
-                            stringBuffer.append("\"").append(writeValue).append("\"");
-                            break;
-                    }
-                    write(stringBuffer.toString());
-                    write(ConfigConst.NEW_LINE);
-
-                } else if (dbProxy.getDataBase().isMySQL()) {
-                    if (readValue == null || GlobalConst.ARCHIVER_NULL_VALUE.equalsIgnoreCase(readValue.trim())) {
-                        readValue = GlobalConst.MYSQL_NULL_VALUE;
-                    }
-                    if (writeValue == null || GlobalConst.ARCHIVER_NULL_VALUE.equalsIgnoreCase(writeValue.trim())) {
-                        writeValue = GlobalConst.MYSQL_NULL_VALUE;
-                    }
-                    if (scalarEvent.getDataType() == TangoConst.Tango_DEV_STRING) {
-                        readValue = StringFormater.formatStringToWrite(readValue);
-                        writeValue = StringFormater.formatStringToWrite(writeValue);
-                    }
-
-                    switch (scalarEvent.getWritable()) {
-                        case AttrWriteType._READ:
-                            write(new StringBuilder().append(toDbTimeStringMySQL(scalarEvent.getTimeStamp()))
-                                    .append(ConfigConst.FIELDS_LIMIT).append(readValue).append(ConfigConst.LINES_LIMIT)
-                                    .toString());
-                            break;
-                        case AttrWriteType._READ_WITH_WRITE:
-                            write(new StringBuilder().append(toDbTimeStringMySQL(scalarEvent.getTimeStamp()))
-                                    .append(ConfigConst.FIELDS_LIMIT).append(readValue)
-                                    .append(ConfigConst.FIELDS_LIMIT).append(writeValue)
-                                    .append(ConfigConst.LINES_LIMIT).toString());
-                            break;
-                        case AttrWriteType._WRITE:
-                            write(new StringBuilder().append(toDbTimeStringMySQL(scalarEvent.getTimeStamp()))
-                                    .append(ConfigConst.FIELDS_LIMIT).append(writeValue)
-                                    .append(ConfigConst.LINES_LIMIT).toString());
-                            break;
-                        case AttrWriteType._READ_WRITE:
-                            write(new StringBuilder().append(toDbTimeStringMySQL(scalarEvent.getTimeStamp()))
-                                    .append(ConfigConst.FIELDS_LIMIT).append(readValue)
-                                    .append(ConfigConst.FIELDS_LIMIT).append(writeValue)
-                                    .append(ConfigConst.LINES_LIMIT).toString());
-                            break;
-                    }
-                }
-
-            } else {
-                logger.debug("This timestamps has already been inserted : " + new Timestamp(timeStampValue)
-                        + " in the file " + fileName + "for " + scalarEvent.getAttributeCompleteName());
-            }
-
-        } catch (final IOException e) {
-            e.printStackTrace();
-            logger.error("IOException for " + scalarEvent.getAttributeCompleteName());
-            throw new NoRetryException("File access error", e.getClass().getName(), null, ErrSeverity.ERR,
-                    e.getMessage(), "FileTools.processEventScalar", e);
-        } catch (Exception e) {
-            e.printStackTrace();
-            logger.error("Unknow Exception for " + scalarEvent.getAttributeCompleteName());
-            if (e instanceof ArchivingException) {
-                throw new NoRetryException((ArchivingException) e);
-            } else {
-                throw new NoRetryException("Unexpected error: " + e.getMessage(), e.getClass().getName(), null,
-                        ErrSeverity.ERR, e.getMessage(), "FileTools.processEventScalar", e);
-            }
-        }
-    }
-
-    private void doExport() throws IOException, ArchivingException {
-
-        // System.out.println("writtenAttributes " + writtenAttributes);
-        final long currentDate = System.currentTimeMillis();
-        final long elapseTime = currentDate - creationFileDate.getTime();
-        // attributePerFile is not defined so just check exportPeriod
-        if (attributePerFile <= 0 && elapseTime >= exportPeriod) {
-            logger.debug("export because of elapseTime " + elapseTime);
-            switchFile();
-            // check attributePerFile and
-            // exportPeriod
-        } else if (attributePerFile > 0) {
-            writtenAttributes++;
-            if (writtenAttributes >= attributePerFile || elapseTime >= exportPeriod) {
-                logger.debug("export due to writtenAttributes " + writtenAttributes + " - elapseTime " + elapseTime);
-                switchFile();
-                writtenAttributes = 0;
-            }
-        }
-    }
-
-    private synchronized void write(final String line) throws IOException {
-        try {
-            final ByteBuffer buff = ByteBuffer.wrap(line.getBytes());
-            channel.write(buff);
-        } catch (final IOException e) {
-            e.printStackTrace();
-            final String msg = "FileToolsWithNio/write/problem writing for attribute/" + tableName;
-            logger.error(msg, e);
-            throw e;
-        }
-    }
-
-    public synchronized void processEventSpectrum(final SpectrumEvent_RO spectrumEvent_ro) throws ArchivingException {
-        try {
-            final long timeStampValue = spectrumEvent_ro.getTimeStamp();
-
-            if (isValidLine(timeStampValue)) {
-                doExport();
-                if (spectrumEvent_ro.getDataType() == TangoConst.Tango_DEV_STRING) {
-                    final String[] value = (String[]) spectrumEvent_ro.getValue();
-                    String[] transformedValue = null;
-                    if (value != null) {
-                        transformedValue = new String[value.length];
-                        for (int i = 0; i < value.length; i++) {
-                            transformedValue[i] = StringFormater.formatStringToWrite(value[i]);
-                        }
-                        boolean[] nullElements = spectrumEvent_ro.getNullElements();
-                        if (nullElements != null) {
-                            nullElements = nullElements.clone();
-                        }
-                        spectrumEvent_ro.setValue(transformedValue, nullElements);
-                    }
-
-                }
-                String value = spectrumEvent_ro.getValueAsString();
-                if (dbProxy.getDataBase().isOracle()) {
-
-                    if (GlobalConst.ARCHIVER_NULL_VALUE.equals(value)) {
-                        value = GlobalConst.ORACLE_NULL_VALUE;
-                    }
-                    write(new StringBuilder().append("\"")
-                            .append(DateUtil.milliToString(spectrumEvent_ro.getTimeStamp(), DateUtil.FR_DATE_PATTERN))
-                            .append("\"").append(",").append("\"").append(Double.toString(spectrumEvent_ro.getDimX()))
-                            .append("\"").append(",").append("\"").append(value).append("\"").toString());
-                    write(ConfigConst.NEW_LINE);
-
-                } else if (dbProxy.getDataBase().isMySQL()) {
-                    if (GlobalConst.ARCHIVER_NULL_VALUE.equals(value)) {
-                        value = GlobalConst.MYSQL_NULL_VALUE;
-                    }
-
-                    final StringBuilder buff = new StringBuilder();
-                    buff.append(toDbTimeStringMySQL(spectrumEvent_ro.getTimeStamp()));
-                    buff.append(ConfigConst.FIELDS_LIMIT);
-                    buff.append((double) spectrumEvent_ro.getDimX());
-                    buff.append(ConfigConst.FIELDS_LIMIT);
-                    buff.append(value);
-                    buff.append(ConfigConst.LINES_LIMIT);
-                    write(buff.toString());
-                }
-
-            } else {
-                logger.info("This timestamps has already been inserted : " + new Timestamp(timeStampValue)
-                        + " in the file " + fileName);
-            }
-        } catch (final IOException e) {
-            Util.out2.println("ERROR !! " + "\r\n" + "\t Origin : \t " + "FileTools.processEventSpectrum" + "\r\n"
-                    + "\t Reason : \t " + e.getClass().getName() + "\r\n" + "\t Description : \t " + e.getMessage()
-                    + "\r\n" + "\t Additional information : \t " + "File :\t " + fileName + "\r\n");
-            throw new NoRetryException("File access error", e.getClass().getName(), null, ErrSeverity.ERR,
-                    e.getMessage(), "FileTools.processEventSpectrum", e);
-        }
-    }
-
-    /**
-     * @param spectrumEvent_rw
-     * @throws ArchivingException
-     */
-    public synchronized void processEventSpectrum(final SpectrumEvent_RW spectrumEvent_rw) throws ArchivingException {
-        try {
-            final long timeStampValue = spectrumEvent_rw.getTimeStamp();
-
-            if (isValidLine(timeStampValue)) {
-                if (spectrumEvent_rw.getDataType() == TangoConst.Tango_DEV_STRING) {
-                    final String[] value = (String[]) spectrumEvent_rw.getValue();
-                    String[] transformedValue = null;
-                    if (value != null) {
-                        transformedValue = new String[value.length];
-                        for (int i = 0; i < value.length; i++) {
-                            transformedValue[i] = StringFormater.formatStringToWrite(value[i]);
-                        }
-                        boolean[] nullElements = spectrumEvent_rw.getNullElements();
-                        if (nullElements != null) {
-                            nullElements = nullElements.clone();
-                        }
-                        spectrumEvent_rw.setValue(transformedValue, nullElements);
-                    }
-                }
-                String readValue = spectrumEvent_rw.getSpectrumValueRW_AsString_Read();
-                String writeValue = spectrumEvent_rw.getSpectrumValueRW_AsString_Write();
-                if (dbProxy.getDataBase().isOracle()) {
-
-                    if (GlobalConst.ARCHIVER_NULL_VALUE.equals(readValue)) {
-                        readValue = GlobalConst.ORACLE_NULL_VALUE;
-                    }
-                    if (GlobalConst.ARCHIVER_NULL_VALUE.equals(writeValue)) {
-                        writeValue = GlobalConst.ORACLE_NULL_VALUE;
-                    }
-                    final StringBuilder buff = new StringBuilder();
-
-                    buff.append("\"");
-                    buff.append(DateUtil.milliToString(spectrumEvent_rw.getTimeStamp(), DateUtil.FR_DATE_PATTERN));
-                    buff.append("\"");
-
-                    buff.append(",");
-                    buff.append("\"");
-                    buff.append(Double.toString(spectrumEvent_rw.getDimX()));
-                    buff.append("\"");
-
-                    buff.append(",");
-                    buff.append("\"");
-                    buff.append(readValue);
-                    buff.append("\"");
-
-                    buff.append(",");
-                    buff.append("\"");
-                    buff.append(writeValue);
-                    buff.append("\"");
-
-                    final String content = buff.toString();
-
-                    write(content);
-                    write(ConfigConst.NEW_LINE);
-
-                } else if (dbProxy.getDataBase().isMySQL()) {
-                    if (GlobalConst.ARCHIVER_NULL_VALUE.equals(readValue)) {
-                        readValue = GlobalConst.MYSQL_NULL_VALUE;
-                    }
-                    if (GlobalConst.ARCHIVER_NULL_VALUE.equals(writeValue)) {
-                        writeValue = GlobalConst.MYSQL_NULL_VALUE;
-                    }
-                    final StringBuilder buff = new StringBuilder();
-
-                    buff.append(toDbTimeStringMySQL(spectrumEvent_rw.getTimeStamp()));
-                    buff.append(ConfigConst.FIELDS_LIMIT);
-                    buff.append((double) spectrumEvent_rw.getDimX());
-                    buff.append(ConfigConst.FIELDS_LIMIT);
-                    buff.append(readValue);
-                    buff.append(ConfigConst.FIELDS_LIMIT);
-                    buff.append(writeValue);
-                    buff.append(ConfigConst.LINES_LIMIT).toString();
-
-                    final String content = buff.toString();
-                    write(content);
-                }
-                doExport();
-            } else {
-                logger.info("This timestamps has already been inserted : " + new Timestamp(timeStampValue)
-                        + " in the file " + fileName);
-            }
-        } catch (final IOException e) {
-            logger.error("ERROR !! " + "\r\n" + "\t Origin : \t " + "FileTools.processEventSpectrum" + "\r\n"
-                    + "\t Reason : \t " + e.getClass().getName() + "\r\n" + "\t Description : \t " + e.getMessage()
-                    + "\r\n" + "\t Additional information : \t " + "File :\t " + fileName + "\r\n");
-            throw new NoRetryException("File access error", e.getClass().getName(), null, ErrSeverity.ERR,
-                    e.getMessage(), "FileTools.processEventSpectrum", e);
-        }
-    }
-
-    public synchronized void processEventImage(final ImageEvent_RO imageEvent_ro) throws ArchivingException {
-        try {
-            doExport();
-            if (imageEvent_ro.getDataType() == TangoConst.Tango_DEV_STRING) {
-                final String[] value = (String[]) imageEvent_ro.getValue();
-                String[] transformedValue = null;
-                if (value != null) {
-                    transformedValue = new String[value.length];
-                    for (int i = 0; i < value.length; i++) {
-                        transformedValue[i] = StringFormater.formatStringToWrite(value[i]);
-                    }
-                    boolean[][] nullElements = imageEvent_ro.getNullElements();
-                    if (nullElements != null) {
-                        nullElements = nullElements.clone();
-                        for (int i = 0; i < nullElements.length; i++) {
-                            if (nullElements[i] != null) {
-                                nullElements[i] = nullElements[i].clone();
-                            }
-                        }
-                    }
-                    imageEvent_ro.setValue(transformedValue, nullElements);
-                }
-
-            }
-            if (dbProxy.getDataBase().isOracle()) {
-                write(new StringBuilder().append("\"")
-                        .append(DateUtil.milliToString(imageEvent_ro.getTimeStamp(), DateUtil.FR_DATE_PATTERN))
-                        .append("\"").append(",").append("\"").append(Double.toString(imageEvent_ro.getDimX()))
-                        .append("\"").append(",").append("\"").append(Double.toString(imageEvent_ro.getDimY()))
-                        .append("\"").append(",").append("\"").append(imageEvent_ro.getValueAsString()).append("\"")
-                        .toString());
-                write(ConfigConst.NEW_LINE);
-            } else if (dbProxy.getDataBase().isMySQL()) {
-                final long timeStampValue = imageEvent_ro.getTimeStamp();
-
-                if (isValidLine(timeStampValue)) {
-                    write(new StringBuilder().append("\"")
-                            .append(DateUtil.milliToString(imageEvent_ro.getTimeStamp(), DateUtil.FR_DATE_PATTERN))
-                            .append("\"").append(",").append("\"").append(Double.toString(imageEvent_ro.getDimX()))
-                            .append("\"").append(",").append("\"").append(Double.toString(imageEvent_ro.getDimY()))
-                            .append("\"").append(",").append("\"").append(imageEvent_ro.getValueAsString())
-                            .append("\"").toString());
-                    write(ConfigConst.NEW_LINE);
-                } else {
-                    logger.info("This timestamps has already been inserted : " + new Timestamp(timeStampValue)
-                            + " in the file " + fileName);
-                }
-
-            }
-
-        } catch (final IOException e) {
-            StringBuilder messageBuilder = new StringBuilder();
-            messageBuilder.append("ERROR !! ").append("\r\n").append("\t Origin : \t ")
-                    .append("FileTools.processEventImage").append("\r\n").append("\t Reason : \t ")
-                    .append(e.getClass().getName()).append("\r\n").append("\t Description : \t ")
-                    .append(e.getMessage()).append("\r\n").append("\t Additional information : \t ")
-                    .append("File :\t ").append(fileName).append("\r\n");
-            logger.error(messageBuilder.toString());
-            throw new NoRetryException("File access error", e.getClass().getName(), null, ErrSeverity.ERR,
-                    e.getMessage(), "FileTools.processEventImage", e);
-        }
-    }
-
-    private String toDbTimeStringMySQL(final long time) {
-        return new Timestamp(time).toString();
-    }
-
-    /**
-     * Switch file in an atomic action
-     * 
-     * @throws IOException
-     * @throws ArchivingException
-     */
-    public synchronized String switchFile() throws IOException, ArchivingException {
-        logger.info("#######Exporting file " + fileName + " - attribute " + attributeName + "-  period " + exportPeriod
-                + " - attrPerFile " + attributePerFile);
-
-        closeFile();
-        openFile();
-        return tableName;
-    }
-
-    /**
-     * Close the file and launch an export of this file to the database.
-     */
-
-    private void exportFileToDB(final String fileName) {
-        try {
-            logger.debug("start exporting " + remoteFilePath + "/" + fileName + " - _tableName:" + tableName
-                    + " - attribute " + attributeName);
-            switch (dataFormat) {
-                case AttrDataFormat._SCALAR:
-                    dbProxy.exportToDB_Scalar(remoteFilePath, fileName, tableName, writable);
-                    break;
-                case AttrDataFormat._SPECTRUM:
-                    dbProxy.exportToDB_Spectrum(remoteFilePath, fileName, tableName, writable);
-                    break;
-                case AttrDataFormat._IMAGE:
-                    dbProxy.exportToDB_Image(remoteFilePath, fileName, tableName, writable);
-                    break;
-                default:
-                    Util.out2.println("Export : " + "DataFormat (" + dataFormat + ") not supported !! ");
-                    break;
-            }
-
-            final String message = "Export out OK -  of " + remoteFilePath + "/" + fileName + " - _tableName:"
-                    + tableName + " - attribute " + attributeName;
-            logger.debug(message);
-        } catch (final ArchivingException e) {
-            e.printStackTrace();
-            final String message = "Problem (ArchivingException) exporting file: _remoteFilePath|" + remoteFilePath
-                    + "|_exportFileName|" + fileName + "|_tableName|" + tableName;
-            logger.error(message, e);
-        }
-    }
-
-    /**
-     * This class represent the object that is called each time a file must be
-     * sent to the database.
-     */
-    // private class ExportTask implements Runnable {
-    //
-    // public void run() {
-    // try {
-    // switchFile();
-    // } catch (final IOException e) {
-    // e.printStackTrace();
-    // final String message = "Error while switching file: " + remoteFilePath
-    // + " - tableName: " + tableName;
-    // logger.trace(ILogger.LEVEL_CRITIC, message);
-    // }
-    // }
-    // }
-
-    private boolean isValidLine(final long currentTimestamp) {
-        boolean res = false;
-        final Timestamp ts = new Timestamp(currentTimestamp);
-        if (ts != null && (lastTimestamp == null || ts.after(lastTimestamp))) {
-            res = true;
-            lastTimestamp = ts;
-        }
-        return res;
-    }
-
-    public int getAttributePerFile() {
-        return attributePerFile;
-    }
-
-    public void setAttributePerFile(final int attributePerFile) {
-        this.attributePerFile = attributePerFile;
-    }
-
+// +======================================================================
+//$Source: /cvsroot/tango-cs/tango/jserver/archiving/TdbArchiver/Collector/Tools/FileTools.java,v $
+
+//Project:      Tango Archiving Service
+
+//Description:  Java source code for the class  FileTools.
+//(Chinkumo Jean) - Jun 4, 2004
+
+//$Author: pierrejoseph $
+
+//$Revision: 1.52 $
+
+//$Log: FileTools.java,v $
+//Revision 1.52  2007/06/04 09:57:21  pierrejoseph
+//NIO usage
+
+//Revision 1.3  2007/04/16 14:57:21  ounsy
+//threads are now started via an ExecutorService
+
+//Revision 1.2  2007/04/16 12:54:51  ounsy
+//added a trace in write() in case of IOException
+
+//Revision 1.1  2007/03/20 14:54:38  ounsy
+//creation
+
+//Revision 1.46  2007/03/16 15:36:10  ounsy
+//now uses a file channel
+
+//Revision 1.45  2007/03/05 16:25:19  ounsy
+//non-static DataBase
+
+//Revision 1.44  2007/02/27 15:34:48  ounsy
+//corrected a severe bug in  processEventSpectrum(SpectrumEvent_RO spectrumEvent_ro) (the value wasn't filled)
+
+//Revision 1.43  2007/01/31 13:06:34  ounsy
+//attempted to correct the "Stream Closed" bug by removing a useless call to flush in flusBuffer
+
+//Revision 1.42  2007/01/08 12:44:51  ounsy
+//modified WindowThread.destroy to comment the thread.interrupt command which causes InterruptedException for no good reason
+
+//Revision 1.41  2006/12/07 15:19:17  ounsy
+//simpler synchronize structuer
+
+//Revision 1.40  2006/12/01 13:53:47  ounsy
+//added the missing synchronizes on _bufferedWriter operations
+
+//Revision 1.39  2006/11/29 15:20:11  ounsy
+//removed the class-level reference to the FileWriter instance; the ThreadGroup is now an AttributeThreadGroup that overrides uncaughtException to add unexpected exceptions logging
+
+//Revision 1.38  2006/11/29 13:37:29  ounsy
+//added a trace in case of uncaught exception in WindowThread
+
+//Revision 1.37  2006/11/20 09:25:35  ounsy
+//the TMP file name has changed, and the flush is only on file closing
+
+//Revision 1.36  2006/11/09 14:22:11  ounsy
+//minor changes
+
+//Revision 1.35  2006/11/07 16:13:50  ounsy
+//minor changes
+
+//Revision 1.34  2006/10/31 16:54:12  ounsy
+//milliseconds and null values management
+
+//Revision 1.33  2006/10/19 12:26:37  ounsy
+//replaced ExportThread with an ExportTask that can be synchronous or asynchronous
+
+//Revision 1.32  2006/08/23 09:55:15  ounsy
+//FileTools compatible with the new TDB file management
+//+ keeping period removed from FileTools (it was already no more used, but the parameter was still here. Only removed a no more used parameter)
+
+//Revision 1.31  2006/07/24 07:32:35  ounsy
+//better image support
+
+//Revision 1.30  2006/07/20 09:23:22  ounsy
+//String encoding before file writing
+
+//Revision 1.29  2006/07/18 08:00:47  ounsy
+//swapFile() now returns the table name
+
+//Revision 1.28  2006/07/06 09:46:56  ounsy
+//removed the calls to file cleaning threads (job importing)
+
+//Revision 1.27  2006/06/16 09:25:33  ounsy
+//changed imports because of the diary package moving to the javaapi project
+
+//Revision 1.26  2006/06/15 15:17:50  ounsy
+//added a protection against writing in closed files in case of forced exports (eg. a stopArchiving command)
+
+//Revision 1.25  2006/06/14 08:16:32  ounsy
+//boolean value protected with '
+
+//Revision 1.24  2006/06/13 14:06:44  ounsy
+//Added calls to the garbage collector in file deletion Threads
+
+//Revision 1.23  2006/06/13 13:30:30  ounsy
+//added diary messages for tmp files deleting
+
+//Revision 1.22  2006/06/08 08:34:31  ounsy
+//added new diary logging system: the results of tmp file exports are logged in a text file (one per archiver and per day)
+
+//Revision 1.21  2006/06/07 12:57:02  ounsy
+//minor changes
+
+//Revision 1.20  2006/05/30 12:37:00  ounsy
+//added a cleanOldFiles property
+
+//Revision 1.19  2006/05/24 08:08:18  ounsy
+//added a millisecond parameter to the Thread.join method
+
+//Revision 1.18  2006/05/23 12:00:20  ounsy
+//corrected a synchronization problem between file exporting and event writing in the same file
+
+//Revision 1.17  2006/05/16 09:30:41  ounsy
+//added what's necessary for the old files deletion mechanism
+
+//Revision 1.16  2006/03/28 11:15:39  ounsy
+//minor changes
+
+//Revision 1.15  2006/03/27 13:56:03  ounsy
+//replaced
+//( new exportThread(get_fileName()) ).start();
+//with
+//( new exportThread(get_fileName()) ).run();
+
+//Revision 1.14  2006/03/21 14:18:42  ounsy
+//bug correction on archiving stop
+
+//Revision 1.13  2006/03/15 16:06:50  ounsy
+//corrected the bug where some temp files were randomly not purged
+
+//Revision 1.12  2006/03/13 14:54:59  ounsy
+//minor changes
+
+//Revision 1.11  2006/02/15 11:19:26  chinkumo
+//Since the spectrum storage used type was changed on the Oracle side processEventSpectrum was modified.
+//This change enables partitionning on Oracle server.
+
+//Revision 1.10  2006/02/13 09:36:49  chinkumo
+//Changes made into the DataBaseApi Class were reported here.
+//(Methods 'exportToDB_ScalarRO/WO/RW', 'exportToDB_SpectrumRO/WO/RW' and 'exportToDB_ImageRO/WO/RW' were generalized into 'exportToDB_Scalar', 'exportToDB_Spectrum' and 'exportToDB_Image')
+
+//Revision 1.9  2006/02/07 11:57:15  ounsy
+//added spectrum RW support
+
+//Revision 1.8  2005/11/29 17:34:14  chinkumo
+//no message
+
+//Revision 1.7.8.3  2005/11/29 16:15:11  chinkumo
+//Code reformated (pogo compatible)
+
+//Revision 1.7.8.2  2005/11/15 13:45:38  chinkumo
+//...
+
+//Revision 1.7.8.1  2005/09/09 10:26:21  chinkumo
+//Since the collecting politic was simplified and improved this class was modified.
+
+//Revision 1.7  2005/06/24 12:05:17  chinkumo
+//Changes made to make the processEventScalarXXXXXX method use the fr.soleil.hdbtdbArchivingApi.ArchivingTools.Tools.DateUtil's milliToString() method.
+
+//Revision 1.6  2005/06/14 10:39:09  chinkumo
+//Branch (tdbArchiver_1_0_1-branch_0)  and HEAD merged.
+
+//Revision 1.5.4.2  2005/06/13 13:43:33  chinkumo
+//Changes made to improve the management of exceptions were reported here.
+
+//Revision 1.5.4.1  2005/04/29 18:40:09  chinkumo
+//Date format changed to improve efficiency while  archiving. This improve a lot temporary archiving.
+
+//Revision 1.5  2005/04/07 13:36:04  chinkumo
+//the apostrophe date surround string (") was removed when . This is to avoid problems with some MySQL versions (4.1.x) when inserting records.
+
+//Revision 1.4  2005/04/06 19:14:18  chinkumo
+//Changes done to optimize the use of String object type.
+//The quote string (') was changed into the apostrophe string ("). This is to avoid problems with some MySQL versions (4.1.x) when inserting records with date field.
+
+//Revision 1.3  2005/02/04 17:10:38  chinkumo
+//The trouble with the grouped stopping strategy was fixed.
+
+//Revision 1.2  2005/01/31 15:09:04  chinkumo
+//Changes made since the TdbProxy class was changed into the DbProxy class.
+
+//Revision 1.1  2004/12/06 16:43:25  chinkumo
+//First commit (new architecture).
+
+//Revision 1.7  2004/10/07 15:05:39  chinkumo
+//The problem of 'regional parameters' was fixed.
+
+//Revision 1.5  2004/09/27 13:44:22  chinkumo
+//A new thread was created to delete files.
+//In general, the behavior of the various threads was improved (synchronization).
+
+//Revision 1.4  2004/09/14 13:28:51  chinkumo
+//Thread stuff simplified !
+
+//Revision 1.3  2004/09/01 15:51:54  chinkumo
+//Heading was updated.
+
+//copyleft :   Synchrotron SOLEIL
+//L'Orme des Merisiers
+//Saint-Aubin - BP 48
+//91192 GIF-sur-YVETTE CEDEX
+
+//-======================================================================
+package TdbArchiver.Collector.Tools;
+
+import java.io.File;
+import java.io.FileOutputStream;
+import java.io.IOException;
+import java.nio.ByteBuffer;
+import java.nio.channels.FileChannel;
+import java.sql.Timestamp;
+import java.util.Date;
+
+import org.slf4j.Logger;
+
+import TdbArchiver.Collector.DbProxy;
+import fr.esrf.Tango.AttrDataFormat;
+import fr.esrf.Tango.AttrWriteType;
+import fr.esrf.Tango.ErrSeverity;
+import fr.esrf.TangoDs.TangoConst;
+import fr.esrf.TangoDs.Util;
+import fr.soleil.archiving.common.api.exception.ArchivingException;
+import fr.soleil.archiving.common.api.tools.DateHeure;
+import fr.soleil.archiving.common.api.tools.GlobalConst;
+import fr.soleil.archiving.common.api.tools.StringFormater;
+import fr.soleil.archiving.hdbtdb.api.ConfigConst;
+import fr.soleil.archiving.hdbtdb.api.tools.DateUtil;
+import fr.soleil.archiving.hdbtdb.api.tools.ImageEvent_RO;
+import fr.soleil.archiving.hdbtdb.api.tools.ScalarEvent;
+import fr.soleil.archiving.hdbtdb.api.tools.SpectrumEvent_RO;
+import fr.soleil.archiving.hdbtdb.api.tools.SpectrumEvent_RW;
+
+public class FileTools {
+    private static final String NAN_VALUE = "NAN";
+    private final int dataFormat;
+    private final int writable;
+    private String fileName;
+    private final String tableName;
+    private FileChannel channel;
+    private final String localFilePath;
+    private final String remoteFilePath;
+
+    private final Logger logger;
+    private final DbProxy dbProxy;
+    private Timestamp lastTimestamp;
+    private final String attributeName;
+    private int writtenAttributes;
+    private int attributePerFile;
+    private Date creationFileDate;
+    private final long exportPeriod;
+
+    public FileTools(final String attributeName, final String tableName, final int dataFormat, final int writable,
+            final long windowsDuration, final Logger logger, final DbProxy dbProxy, final String workingDsPath,
+            final String workingDbPath) throws IOException, ArchivingException {
+        this.dataFormat = dataFormat;
+        this.writable = writable;
+        this.tableName = tableName;
+        this.logger = logger;
+        this.dbProxy = dbProxy;
+        this.attributeName = attributeName;
+        exportPeriod = windowsDuration;
+        attributePerFile = 0;
+        localFilePath = workingDsPath;
+        remoteFilePath = workingDbPath;
+        writtenAttributes = 0;
+        logger.debug("new FileTools for " + attributeName + " at " + localFilePath);
+
+        checkDirs(localFilePath);
+        openFile();
+    }
+
+    private String buidFileName(final String tableName) {
+        final StringBuilder fileName = new StringBuilder();
+        creationFileDate = new Date();
+        final DateHeure dh = new DateHeure(creationFileDate);
+        fileName.append(tableName);
+        fileName.append("-");
+        fileName.append(dh.toString("yyyyMMdd"));
+        fileName.append("-");
+        fileName.append(dh.toString("HHmmss"));
+        fileName.append(".dat");
+        return fileName.toString();
+    }
+
+    private static void checkDirs(final String path) {
+        final File pathDir = new File(path);
+        if (!pathDir.exists()) {
+            pathDir.mkdirs();
+        }
+    }
+
+    private String getLocalFilePath() {
+        return localFilePath + File.separator + fileName;
+    }
+
+    private synchronized void openFile() throws IOException, ArchivingException {
+        try {
+            fileName = buidFileName(tableName);
+            logger.info("open file " + getLocalFilePath());
+            channel = new FileOutputStream(new File(getLocalFilePath())).getChannel();
+            if (dbProxy.getDataBase().isOracle()) {
+                exportFileToDB(fileName);
+            }
+        } catch (final IOException e) {
+            final StringBuilder messageBuilder = new StringBuilder();
+            messageBuilder.append("ERROR !! ").append("\r\n").append("\t Origin : \t ").append("FileTools.initFile")
+                    .append("\r\n").append("\t Reason : \t ").append(e.getClass().getName()).append("\r\n")
+                    .append("\t Description : \t ").append(e.getMessage()).append("\r\n")
+                    .append("\t Additional information : \t ").append("").append("\r\n");
+            logger.error(messageBuilder.toString());
+            e.printStackTrace();
+            throw e;
+        }
+    }
+
+    /**
+     * Close the file and launch an export of this file to the database.
+     */
+    public synchronized void closeFile() throws IOException, ArchivingException {
+        final String oldFileName = fileName;
+        logger.info("closing file " + getLocalFilePath());
+        channel.close();
+        logger.info("file closed " + getLocalFilePath());
+        if (dbProxy.getDataBase().isMySQL()) {
+            exportFileToDB(oldFileName);
+        }
+    }
+
+    public synchronized void processEventScalar(final ScalarEvent scalarEvent) throws ArchivingException {
+        try {
+            String readValue = scalarEvent.valueToString(0);
+            String writeValue = scalarEvent.valueToString(1);
+            final long timeStampValue = scalarEvent.getTimeStamp();
+            if (isValidLine(timeStampValue)) {
+                doExport();
+                if (dbProxy.getDataBase().isOracle()) {
+                    // XXX : regression for oracle that do no more support NaN. cf JIRA SOLEIL CTRLDESK-2282
+                    if (readValue == null || readValue.equalsIgnoreCase(NAN_VALUE)
+                            || GlobalConst.ARCHIVER_NULL_VALUE.equalsIgnoreCase(readValue.trim())) {
+                        readValue = GlobalConst.ORACLE_NULL_VALUE;
+                    }
+                    if (writeValue == null || writeValue.equalsIgnoreCase(NAN_VALUE)
+                            || GlobalConst.ARCHIVER_NULL_VALUE.equalsIgnoreCase(writeValue.trim())) {
+                        writeValue = GlobalConst.ORACLE_NULL_VALUE;
+                    }
+                    if (scalarEvent.getDataType() == TangoConst.Tango_DEV_STRING) {
+                        readValue = StringFormater.formatStringToWrite(readValue);
+                        writeValue = StringFormater.formatStringToWrite(writeValue);
+                    }
+                    final StringBuilder stringBuffer = new StringBuilder();
+                    stringBuffer.append("\"");
+                    stringBuffer.append(DateUtil.milliToString(timeStampValue, DateUtil.FR_DATE_PATTERN));
+                    stringBuffer.append("\"");
+                    stringBuffer.append(",");
+
+                    switch (scalarEvent.getWritable()) {
+                        case AttrWriteType._READ:
+                            stringBuffer.append("\"").append(readValue).append("\"");
+                            break;
+                        case AttrWriteType._READ_WRITE:
+                        case AttrWriteType._READ_WITH_WRITE:
+                            stringBuffer.append("\"").append(readValue).append("\"");
+                            stringBuffer.append(",");
+                            stringBuffer.append("\"").append(writeValue).append("\"");
+                            break;
+                        case AttrWriteType._WRITE:
+                            stringBuffer.append("\"").append(writeValue).append("\"");
+                            break;
+                    }
+                    write(stringBuffer.toString());
+                    write(ConfigConst.NEW_LINE);
+
+                } else if (dbProxy.getDataBase().isMySQL()) {
+                    if (readValue == null || GlobalConst.ARCHIVER_NULL_VALUE.equalsIgnoreCase(readValue.trim())) {
+                        readValue = GlobalConst.MYSQL_NULL_VALUE;
+                    }
+                    if (writeValue == null || GlobalConst.ARCHIVER_NULL_VALUE.equalsIgnoreCase(writeValue.trim())) {
+                        writeValue = GlobalConst.MYSQL_NULL_VALUE;
+                    }
+                    if (scalarEvent.getDataType() == TangoConst.Tango_DEV_STRING) {
+                        readValue = StringFormater.formatStringToWrite(readValue);
+                        writeValue = StringFormater.formatStringToWrite(writeValue);
+                    }
+
+                    switch (scalarEvent.getWritable()) {
+                        case AttrWriteType._READ:
+                            write(new StringBuilder().append(toDbTimeStringMySQL(scalarEvent.getTimeStamp()))
+                                    .append(ConfigConst.FIELDS_LIMIT).append(readValue).append(ConfigConst.LINES_LIMIT)
+                                    .toString());
+                            break;
+                        case AttrWriteType._READ_WITH_WRITE:
+                            write(new StringBuilder().append(toDbTimeStringMySQL(scalarEvent.getTimeStamp()))
+                                    .append(ConfigConst.FIELDS_LIMIT).append(readValue)
+                                    .append(ConfigConst.FIELDS_LIMIT).append(writeValue)
+                                    .append(ConfigConst.LINES_LIMIT).toString());
+                            break;
+                        case AttrWriteType._WRITE:
+                            write(new StringBuilder().append(toDbTimeStringMySQL(scalarEvent.getTimeStamp()))
+                                    .append(ConfigConst.FIELDS_LIMIT).append(writeValue)
+                                    .append(ConfigConst.LINES_LIMIT).toString());
+                            break;
+                        case AttrWriteType._READ_WRITE:
+                            write(new StringBuilder().append(toDbTimeStringMySQL(scalarEvent.getTimeStamp()))
+                                    .append(ConfigConst.FIELDS_LIMIT).append(readValue)
+                                    .append(ConfigConst.FIELDS_LIMIT).append(writeValue)
+                                    .append(ConfigConst.LINES_LIMIT).toString());
+                            break;
+                    }
+                }
+
+            } else {
+                logger.debug("This timestamps has already been inserted : " + new Timestamp(timeStampValue)
+                        + " in the file " + fileName + "for " + scalarEvent.getAttributeCompleteName());
+            }
+
+        } catch (final IOException e) {
+            e.printStackTrace();
+            logger.error("IOException for " + scalarEvent.getAttributeCompleteName());
+            throw new NoRetryException("File access error", e.getClass().getName(), null, ErrSeverity.ERR,
+                    e.getMessage(), "FileTools.processEventScalar", e);
+        } catch (final Exception e) {
+            e.printStackTrace();
+            logger.error("Unknow Exception for " + scalarEvent.getAttributeCompleteName());
+            if (e instanceof ArchivingException) {
+                throw new NoRetryException((ArchivingException) e);
+            } else {
+                throw new NoRetryException("Unexpected error: " + e.getMessage(), e.getClass().getName(), null,
+                        ErrSeverity.ERR, e.getMessage(), "FileTools.processEventScalar", e);
+            }
+        }
+    }
+
+    private void doExport() throws IOException, ArchivingException {
+
+        // System.out.println("writtenAttributes " + writtenAttributes);
+        final long currentDate = System.currentTimeMillis();
+        final long elapseTime = currentDate - creationFileDate.getTime();
+        // attributePerFile is not defined so just check exportPeriod
+        if (attributePerFile <= 0 && elapseTime >= exportPeriod) {
+            logger.debug("export because of elapseTime " + elapseTime);
+            switchFile();
+            // check attributePerFile and
+            // exportPeriod
+        } else if (attributePerFile > 0) {
+            writtenAttributes++;
+            if (writtenAttributes >= attributePerFile || elapseTime >= exportPeriod) {
+                logger.debug("export due to writtenAttributes " + writtenAttributes + " - elapseTime " + elapseTime);
+                switchFile();
+                writtenAttributes = 0;
+            }
+        }
+    }
+
+    private synchronized void write(final String line) throws IOException {
+        try {
+            final ByteBuffer buff = ByteBuffer.wrap(line.getBytes());
+            channel.write(buff);
+        } catch (final IOException e) {
+            e.printStackTrace();
+            final String msg = "FileToolsWithNio/write/problem writing for attribute/" + tableName;
+            logger.error(msg, e);
+            throw e;
+        }
+    }
+
+    public synchronized void processEventSpectrum(final SpectrumEvent_RO spectrumEvent_ro) throws ArchivingException {
+        try {
+            final long timeStampValue = spectrumEvent_ro.getTimeStamp();
+
+            if (isValidLine(timeStampValue)) {
+                doExport();
+                if (spectrumEvent_ro.getDataType() == TangoConst.Tango_DEV_STRING) {
+                    final String[] value = (String[]) spectrumEvent_ro.getValue();
+                    String[] transformedValue = null;
+                    if (value != null) {
+                        transformedValue = new String[value.length];
+                        for (int i = 0; i < value.length; i++) {
+                            transformedValue[i] = StringFormater.formatStringToWrite(value[i]);
+                        }
+                        boolean[] nullElements = spectrumEvent_ro.getNullElements();
+                        if (nullElements != null) {
+                            nullElements = nullElements.clone();
+                        }
+                        spectrumEvent_ro.setValue(transformedValue, nullElements);
+                    }
+
+                }
+                String value = spectrumEvent_ro.getValueAsString();
+                if (dbProxy.getDataBase().isOracle()) {
+
+                    if (GlobalConst.ARCHIVER_NULL_VALUE.equals(value)) {
+                        value = GlobalConst.ORACLE_NULL_VALUE;
+                    }
+                    write(new StringBuilder().append("\"")
+                            .append(DateUtil.milliToString(spectrumEvent_ro.getTimeStamp(), DateUtil.FR_DATE_PATTERN))
+                            .append("\"").append(",").append("\"").append(Double.toString(spectrumEvent_ro.getDimX()))
+                            .append("\"").append(",").append("\"").append(value).append("\"").toString());
+                    write(ConfigConst.NEW_LINE);
+
+                } else if (dbProxy.getDataBase().isMySQL()) {
+                    if (GlobalConst.ARCHIVER_NULL_VALUE.equals(value)) {
+                        value = GlobalConst.MYSQL_NULL_VALUE;
+                    }
+
+                    final StringBuilder buff = new StringBuilder();
+                    buff.append(toDbTimeStringMySQL(spectrumEvent_ro.getTimeStamp()));
+                    buff.append(ConfigConst.FIELDS_LIMIT);
+                    buff.append((double) spectrumEvent_ro.getDimX());
+                    buff.append(ConfigConst.FIELDS_LIMIT);
+                    buff.append(value);
+                    buff.append(ConfigConst.LINES_LIMIT);
+                    write(buff.toString());
+                }
+
+            } else {
+                logger.info("This timestamps has already been inserted : " + new Timestamp(timeStampValue)
+                        + " in the file " + fileName);
+            }
+        } catch (final IOException e) {
+            Util.out2.println("ERROR !! " + "\r\n" + "\t Origin : \t " + "FileTools.processEventSpectrum" + "\r\n"
+                    + "\t Reason : \t " + e.getClass().getName() + "\r\n" + "\t Description : \t " + e.getMessage()
+                    + "\r\n" + "\t Additional information : \t " + "File :\t " + fileName + "\r\n");
+            throw new NoRetryException("File access error", e.getClass().getName(), null, ErrSeverity.ERR,
+                    e.getMessage(), "FileTools.processEventSpectrum", e);
+        }
+    }
+
+    /**
+     * @param spectrumEvent_rw
+     * @throws ArchivingException
+     */
+    public synchronized void processEventSpectrum(final SpectrumEvent_RW spectrumEvent_rw) throws ArchivingException {
+        try {
+            final long timeStampValue = spectrumEvent_rw.getTimeStamp();
+
+            if (isValidLine(timeStampValue)) {
+                if (spectrumEvent_rw.getDataType() == TangoConst.Tango_DEV_STRING) {
+                    final String[] value = (String[]) spectrumEvent_rw.getValue();
+                    String[] transformedValue = null;
+                    if (value != null) {
+                        transformedValue = new String[value.length];
+                        for (int i = 0; i < value.length; i++) {
+                            transformedValue[i] = StringFormater.formatStringToWrite(value[i]);
+                        }
+                        boolean[] nullElements = spectrumEvent_rw.getNullElements();
+                        if (nullElements != null) {
+                            nullElements = nullElements.clone();
+                        }
+                        spectrumEvent_rw.setValue(transformedValue, nullElements);
+                    }
+                }
+                String readValue = spectrumEvent_rw.getSpectrumValueRW_AsString_Read();
+                String writeValue = spectrumEvent_rw.getSpectrumValueRW_AsString_Write();
+                if (dbProxy.getDataBase().isOracle()) {
+
+                    if (GlobalConst.ARCHIVER_NULL_VALUE.equals(readValue)) {
+                        readValue = GlobalConst.ORACLE_NULL_VALUE;
+                    }
+                    if (GlobalConst.ARCHIVER_NULL_VALUE.equals(writeValue)) {
+                        writeValue = GlobalConst.ORACLE_NULL_VALUE;
+                    }
+                    final StringBuilder buff = new StringBuilder();
+
+                    buff.append("\"");
+                    buff.append(DateUtil.milliToString(spectrumEvent_rw.getTimeStamp(), DateUtil.FR_DATE_PATTERN));
+                    buff.append("\"");
+
+                    buff.append(",");
+                    buff.append("\"");
+                    buff.append(Double.toString(spectrumEvent_rw.getDimX()));
+                    buff.append("\"");
+
+                    buff.append(",");
+                    buff.append("\"");
+                    buff.append(readValue);
+                    buff.append("\"");
+
+                    buff.append(",");
+                    buff.append("\"");
+                    buff.append(writeValue);
+                    buff.append("\"");
+
+                    final String content = buff.toString();
+
+                    write(content);
+                    write(ConfigConst.NEW_LINE);
+
+                } else if (dbProxy.getDataBase().isMySQL()) {
+                    if (GlobalConst.ARCHIVER_NULL_VALUE.equals(readValue)) {
+                        readValue = GlobalConst.MYSQL_NULL_VALUE;
+                    }
+                    if (GlobalConst.ARCHIVER_NULL_VALUE.equals(writeValue)) {
+                        writeValue = GlobalConst.MYSQL_NULL_VALUE;
+                    }
+                    final StringBuilder buff = new StringBuilder();
+
+                    buff.append(toDbTimeStringMySQL(spectrumEvent_rw.getTimeStamp()));
+                    buff.append(ConfigConst.FIELDS_LIMIT);
+                    buff.append((double) spectrumEvent_rw.getDimX());
+                    buff.append(ConfigConst.FIELDS_LIMIT);
+                    buff.append(readValue);
+                    buff.append(ConfigConst.FIELDS_LIMIT);
+                    buff.append(writeValue);
+                    buff.append(ConfigConst.LINES_LIMIT).toString();
+
+                    final String content = buff.toString();
+                    write(content);
+                }
+                doExport();
+            } else {
+                logger.info("This timestamps has already been inserted : " + new Timestamp(timeStampValue)
+                        + " in the file " + fileName);
+            }
+        } catch (final IOException e) {
+            logger.error("ERROR !! " + "\r\n" + "\t Origin : \t " + "FileTools.processEventSpectrum" + "\r\n"
+                    + "\t Reason : \t " + e.getClass().getName() + "\r\n" + "\t Description : \t " + e.getMessage()
+                    + "\r\n" + "\t Additional information : \t " + "File :\t " + fileName + "\r\n");
+            throw new NoRetryException("File access error", e.getClass().getName(), null, ErrSeverity.ERR,
+                    e.getMessage(), "FileTools.processEventSpectrum", e);
+        }
+    }
+
+    public synchronized void processEventImage(final ImageEvent_RO imageEvent_ro) throws ArchivingException {
+        try {
+            doExport();
+            if (imageEvent_ro.getDataType() == TangoConst.Tango_DEV_STRING) {
+                final String[] value = (String[]) imageEvent_ro.getValue();
+                String[] transformedValue = null;
+                if (value != null) {
+                    transformedValue = new String[value.length];
+                    for (int i = 0; i < value.length; i++) {
+                        transformedValue[i] = StringFormater.formatStringToWrite(value[i]);
+                    }
+                    boolean[][] nullElements = imageEvent_ro.getNullElements();
+                    if (nullElements != null) {
+                        nullElements = nullElements.clone();
+                        for (int i = 0; i < nullElements.length; i++) {
+                            if (nullElements[i] != null) {
+                                nullElements[i] = nullElements[i].clone();
+                            }
+                        }
+                    }
+                    imageEvent_ro.setValue(transformedValue, nullElements);
+                }
+
+            }
+            if (dbProxy.getDataBase().isOracle()) {
+                write(new StringBuilder().append("\"")
+                        .append(DateUtil.milliToString(imageEvent_ro.getTimeStamp(), DateUtil.FR_DATE_PATTERN))
+                        .append("\"").append(",").append("\"").append(Double.toString(imageEvent_ro.getDimX()))
+                        .append("\"").append(",").append("\"").append(Double.toString(imageEvent_ro.getDimY()))
+                        .append("\"").append(",").append("\"").append(imageEvent_ro.getValueAsString()).append("\"")
+                        .toString());
+                write(ConfigConst.NEW_LINE);
+            } else if (dbProxy.getDataBase().isMySQL()) {
+                final long timeStampValue = imageEvent_ro.getTimeStamp();
+
+                if (isValidLine(timeStampValue)) {
+                    write(new StringBuilder().append("\"")
+                            .append(DateUtil.milliToString(imageEvent_ro.getTimeStamp(), DateUtil.FR_DATE_PATTERN))
+                            .append("\"").append(",").append("\"").append(Double.toString(imageEvent_ro.getDimX()))
+                            .append("\"").append(",").append("\"").append(Double.toString(imageEvent_ro.getDimY()))
+                            .append("\"").append(",").append("\"").append(imageEvent_ro.getValueAsString())
+                            .append("\"").toString());
+                    write(ConfigConst.NEW_LINE);
+                } else {
+                    logger.info("This timestamps has already been inserted : " + new Timestamp(timeStampValue)
+                            + " in the file " + fileName);
+                }
+
+            }
+
+        } catch (final IOException e) {
+            final StringBuilder messageBuilder = new StringBuilder();
+            messageBuilder.append("ERROR !! ").append("\r\n").append("\t Origin : \t ")
+                    .append("FileTools.processEventImage").append("\r\n").append("\t Reason : \t ")
+                    .append(e.getClass().getName()).append("\r\n").append("\t Description : \t ")
+                    .append(e.getMessage()).append("\r\n").append("\t Additional information : \t ")
+                    .append("File :\t ").append(fileName).append("\r\n");
+            logger.error(messageBuilder.toString());
+            throw new NoRetryException("File access error", e.getClass().getName(), null, ErrSeverity.ERR,
+                    e.getMessage(), "FileTools.processEventImage", e);
+        }
+    }
+
+    private String toDbTimeStringMySQL(final long time) {
+        return new Timestamp(time).toString();
+    }
+
+    /**
+     * Switch file in an atomic action
+     *
+     * @throws IOException
+     * @throws ArchivingException
+     */
+    public synchronized String switchFile() throws IOException, ArchivingException {
+        logger.info("#######Exporting file " + fileName + " - attribute " + attributeName + "-  period " + exportPeriod
+                + " - attrPerFile " + attributePerFile);
+
+        closeFile();
+        openFile();
+        return tableName;
+    }
+
+    /**
+     * Close the file and launch an export of this file to the database.
+     */
+
+    private void exportFileToDB(final String fileName) {
+        try {
+            logger.debug("start exporting " + remoteFilePath + "/" + fileName + " - _tableName:" + tableName
+                    + " - attribute " + attributeName);
+            switch (dataFormat) {
+                case AttrDataFormat._SCALAR:
+                    dbProxy.exportToDB_Scalar(remoteFilePath, fileName, tableName, writable);
+                    break;
+                case AttrDataFormat._SPECTRUM:
+                    dbProxy.exportToDB_Spectrum(remoteFilePath, fileName, tableName, writable);
+                    break;
+                case AttrDataFormat._IMAGE:
+                    dbProxy.exportToDB_Image(remoteFilePath, fileName, tableName, writable);
+                    break;
+                default:
+                    Util.out2.println("Export : " + "DataFormat (" + dataFormat + ") not supported !! ");
+                    break;
+            }
+
+            final String message = "Export out OK -  of " + remoteFilePath + "/" + fileName + " - _tableName:"
+                    + tableName + " - attribute " + attributeName;
+            logger.debug(message);
+        } catch (final ArchivingException e) {
+            e.printStackTrace();
+            final String message = "Problem (ArchivingException) exporting file: _remoteFilePath|" + remoteFilePath
+                    + "|_exportFileName|" + fileName + "|_tableName|" + tableName;
+            logger.error(message, e);
+        }
+    }
+
+    /**
+     * This class represent the object that is called each time a file must be
+     * sent to the database.
+     */
+    // private class ExportTask implements Runnable {
+    //
+    // public void run() {
+    // try {
+    // switchFile();
+    // } catch (final IOException e) {
+    // e.printStackTrace();
+    // final String message = "Error while switching file: " + remoteFilePath
+    // + " - tableName: " + tableName;
+    // logger.trace(ILogger.LEVEL_CRITIC, message);
+    // }
+    // }
+    // }
+
+    private boolean isValidLine(final long currentTimestamp) {
+        boolean res = false;
+        final Timestamp ts = new Timestamp(currentTimestamp);
+        if (ts != null && (lastTimestamp == null || ts.after(lastTimestamp))) {
+            res = true;
+            lastTimestamp = ts;
+        }
+        return res;
+    }
+
+    public int getAttributePerFile() {
+        return attributePerFile;
+    }
+
+    public void setAttributePerFile(final int attributePerFile) {
+        this.attributePerFile = attributePerFile;
+    }
+
 }
\ No newline at end of file
diff --git a/src/main/java/TdbArchiver/Collector/Tools/NoRetryException.java b/tdbarchiver/src/main/java/TdbArchiver/Collector/Tools/NoRetryException.java
similarity index 100%
rename from src/main/java/TdbArchiver/Collector/Tools/NoRetryException.java
rename to tdbarchiver/src/main/java/TdbArchiver/Collector/Tools/NoRetryException.java
diff --git a/src/main/java/TdbArchiver/Collector/image/Image_RO.java b/tdbarchiver/src/main/java/TdbArchiver/Collector/image/Image_RO.java
similarity index 97%
rename from src/main/java/TdbArchiver/Collector/image/Image_RO.java
rename to tdbarchiver/src/main/java/TdbArchiver/Collector/image/Image_RO.java
index bb32cdebe197b2f03ef37d08b7e9239f5f7b39c5..822d9115679260797b70f5ac17f948ba2ec9050b 100644
--- a/src/main/java/TdbArchiver/Collector/image/Image_RO.java
+++ b/tdbarchiver/src/main/java/TdbArchiver/Collector/image/Image_RO.java
@@ -1,203 +1,203 @@
-// +======================================================================
-// $Source: /cvsroot/tango-cs/tango/jserver/archiving/TdbArchiver/Collector/image/Image_RO.java,v $
-//
-// Project:      Tango Archiving Service
-//
-// Description:  Java source code for the class  Image_RO.
-//						(Chinkumo Jean) - Mar 24, 2004
-//
-// $Author: pierrejoseph $
-//
-// $Revision: 1.17 $
-//
-// $Log: Image_RO.java,v $
-// Revision 1.17  2007/06/01 09:45:53  pierrejoseph
-// Attribute ArchiverCollectro.logger has been renamed in m_logger
-//
-// Revision 1.16  2007/03/05 16:25:19  ounsy
-// non-static DataBase
-//
-// Revision 1.15  2007/02/13 14:19:16  ounsy
-// corrected a bug in addSource: an infinite nnumber of FileTools instances could potentially be created
-//
-// Revision 1.14  2006/10/31 16:54:12  ounsy
-// milliseconds and null values management
-//
-// Revision 1.13  2006/10/19 12:25:51  ounsy
-// modfiied the removeSource to take into account the new isAsuynchronous parameter
-//
-// Revision 1.12  2006/08/23 09:55:15  ounsy
-// FileTools compatible with the new TDB file management
-// + keeping period removed from FileTools (it was already no more used, but the parameter was still here. Only removed a no more used parameter)
-//
-// Revision 1.11  2006/07/26 08:37:21  ounsy
-// try number no more static and reinitialized with change events (errorchange, numberscalarchange, etc...)
-//
-// Revision 1.10  2006/06/08 08:34:31  ounsy
-// added new diary logging system: the results of tmp file exports are logged in a text file (one per archiver and per day)
-//
-// Revision 1.9  2006/05/23 11:58:03  ounsy
-// now checks the timeCondition condition before calling FileTools.processEvent
-//
-// Revision 1.8  2006/05/16 07:51:15  ounsy
-// added the keepingPeriod creation parameter, used to delete older files
-//
-// Revision 1.7  2005/11/29 17:34:14  chinkumo
-// no message
-//
-// Revision 1.6.8.3  2005/11/29 16:15:11  chinkumo
-// Code reformated (pogo compatible)
-//
-// Revision 1.6.8.2  2005/11/15 13:45:38  chinkumo
-// ...
-//
-// Revision 1.6.8.1  2005/09/26 08:01:54  chinkumo
-// Minor changes !
-//
-// Revision 1.6  2005/06/24 12:06:38  chinkumo
-// Some constants were moved from fr.soleil.hdbtdbArchivingApi.ArchivingApi.ConfigConst to fr.soleil.hdbtdbArchivingApi.ArchivingTools.Tools.GlobalConst.
-
-// This change was reported here.
-//
-// Revision 1.5  2005/06/14 10:39:09  chinkumo
-// Branch (tdbArchiver_1_0_1-branch_0)  and HEAD merged.
-//
-// Revision 1.4.4.1  2005/06/13 13:57:32  chinkumo
-// Changes made to improve the management of exceptions were reported here.
-//
-// Revision 1.4  2005/04/08 15:37:06  chinkumo
-// errorChange method filled.
-
-// The aim of this method is to manage possible attribute's problem while polling attributes.
-
-// In case of unavailable value, a record is nevertheless carried out with the event timestamp, but with a kind of NULL value.
-//
-// Revision 1.3  2005/02/04 17:10:38  chinkumo
-// The trouble with the grouped stopping strategy was fixed.
-//
-// Revision 1.2  2005/01/31 15:09:04  chinkumo
-// Changes made since the TdbProxy class was changed into the DbProxy class.
-//
-// Revision 1.1  2004/12/06 16:43:25  chinkumo
-// First commit (new architecture).
-//
-// Revision 1.5  2004/09/27 13:17:36  chinkumo
-// The addSource method were improved : The two calls 'myFile.checkDirs();' + 'myFile.initFile();' were gathered into one single call (myFile.initialize();).
-//
-// Revision 1.4  2004/09/14 07:00:32  chinkumo
-// Some unused 'import' were removed.
-// Some error messages were re-written to fit the 'error policy' recently decided.
-//
-// Revision 1.3  2004/09/01 15:40:44  chinkumo
-// Heading was updated.
-// As the Mode object now includes the exportPeriod information the way to build a FileTools object was modified (see addSource(..)).
-//
-//
-// copyleft :	Synchrotron SOLEIL
-//					L'Orme des Merisiers
-//					Saint-Aubin - BP 48
-//					91192 GIF-sur-YVETTE CEDEX
-//
-//-======================================================================
-
-package TdbArchiver.Collector.image;
-
-import org.slf4j.Logger;
-
-import TdbArchiver.Collector.TdbCollector;
-import TdbArchiver.Collector.TdbModeHandler;
-import fr.esrf.Tango.AttrWriteType;
-import fr.esrf.TangoDs.Util;
-import fr.esrf.tangoatk.core.AttributeStateEvent;
-import fr.esrf.tangoatk.core.ErrorEvent;
-import fr.esrf.tangoatk.core.IEntity;
-import fr.esrf.tangoatk.core.IImageListener;
-import fr.esrf.tangoatk.core.INumberImage;
-import fr.esrf.tangoatk.core.NumberImageEvent;
-import fr.soleil.archiving.common.api.exception.ArchivingException;
-import fr.soleil.archiving.hdbtdb.api.tools.ImageEvent_RO;
-
-public class Image_RO extends TdbCollector implements IImageListener {
-
-    private static final long serialVersionUID = -5351464886930082626L;
-
-    public Image_RO(final TdbModeHandler modeHandler, final String currentDsPath, final String currentDbPath,
-            final AttrWriteType writableType, Logger logger) {
-        super(modeHandler, currentDsPath, currentDbPath, writableType, logger);
-    }
-
-    @Override
-    public void removeListeners(final IEntity attribute) throws ArchivingException {
-        if (attribute instanceof INumberImage) {
-            ((INumberImage) attribute).removeImageListener(this);
-            ((INumberImage) attribute).removeErrorListener(this);
-        }
-    }
-
-    @Override
-    protected void treatErrorEventAfterLogging(ErrorEvent errorEvent) {
-        final double[][] value = null;
-        final ImageEvent_RO imageEvent_ro = new ImageEvent_RO();
-        imageEvent_ro.setAttributeCompleteName(errorEvent.getSource().toString());
-        imageEvent_ro.setTimeStamp(errorEvent.getTimeStamp());
-        imageEvent_ro.setImageValueRO(value, null);
-        processEventImage(imageEvent_ro, DEFAULT_TRY_NUMBER);
-    }
-
-    @Override
-    public void imageChange(final NumberImageEvent event) {
-        final int tryNumber = DEFAULT_TRY_NUMBER;
-        final String attributeName = ((INumberImage) event.getSource()).getName();
-        final double[][] value = event.getValue();
-        int length = 0, length2 = 0;
-        if (value != null) {
-            length = value.length;
-            if (length > 0 && value[0] != null) {
-                length2 = value[0].length;
-            }
-        }
-        final double[][] imageValue = new double[length][];
-        for (int i = 0; i < length; i++) {
-            imageValue[i] = (value[i] == null ? null : value[i].clone());
-        }
-
-        final ImageEvent_RO imageEvent_ro = new ImageEvent_RO();
-        removeErrorMessage(attributeName);
-        imageEvent_ro.setAttributeCompleteName(attributeName);
-        imageEvent_ro.setTimeStamp(event.getTimeStamp());
-        imageEvent_ro.setDimX(length);
-        imageEvent_ro.setDimY(length2);
-        imageEvent_ro.setImageValueRO(imageValue, null);
-
-        processEventImage(imageEvent_ro, tryNumber);
-    }
-
-    @Override
-    public void stateChange(final AttributeStateEvent event) {
-    }
-
-    public void processEventImage(final ImageEvent_RO event, final int try_number) {
-        Util.out4.println("Image_RO.processEventImage");
-        if (isDataArchivableTimestampWise(event)) {
-            final String attributeName = event.getAttributeCompleteName();
-            try {
-                processFileImage(event);
-                super.setLastTimestamp(event);
-            } catch (final Exception e) {
-                registerErrorMessage(attributeName, e.getMessage());
-                Util.out2.println("ERROR !! " + "\r\n" + "\t Origin : \t " + "Image_RO.processEventImage" + "\r\n"
-                        + "\t Reason : \t " + e.getClass().getName() + "\r\n" + "\t Description : \t " + e.getMessage()
-                        + "\r\n" + "\t Additional information : \t " + "" + "\r\n");
-                e.printStackTrace();
-            }
-        }
-    }
-
-    @Override
-    public void addListeners(final IEntity attribute) throws ArchivingException {
-        if (attribute instanceof INumberImage) {
-            ((INumberImage) attribute).addImageListener(this);
-            ((INumberImage) attribute).addErrorListener(this);
-        }
-    }
-}
+// +======================================================================
+// $Source: /cvsroot/tango-cs/tango/jserver/archiving/TdbArchiver/Collector/image/Image_RO.java,v $
+//
+// Project:      Tango Archiving Service
+//
+// Description:  Java source code for the class  Image_RO.
+//						(Chinkumo Jean) - Mar 24, 2004
+//
+// $Author: pierrejoseph $
+//
+// $Revision: 1.17 $
+//
+// $Log: Image_RO.java,v $
+// Revision 1.17  2007/06/01 09:45:53  pierrejoseph
+// Attribute ArchiverCollectro.logger has been renamed in m_logger
+//
+// Revision 1.16  2007/03/05 16:25:19  ounsy
+// non-static DataBase
+//
+// Revision 1.15  2007/02/13 14:19:16  ounsy
+// corrected a bug in addSource: an infinite nnumber of FileTools instances could potentially be created
+//
+// Revision 1.14  2006/10/31 16:54:12  ounsy
+// milliseconds and null values management
+//
+// Revision 1.13  2006/10/19 12:25:51  ounsy
+// modfiied the removeSource to take into account the new isAsuynchronous parameter
+//
+// Revision 1.12  2006/08/23 09:55:15  ounsy
+// FileTools compatible with the new TDB file management
+// + keeping period removed from FileTools (it was already no more used, but the parameter was still here. Only removed a no more used parameter)
+//
+// Revision 1.11  2006/07/26 08:37:21  ounsy
+// try number no more static and reinitialized with change events (errorchange, numberscalarchange, etc...)
+//
+// Revision 1.10  2006/06/08 08:34:31  ounsy
+// added new diary logging system: the results of tmp file exports are logged in a text file (one per archiver and per day)
+//
+// Revision 1.9  2006/05/23 11:58:03  ounsy
+// now checks the timeCondition condition before calling FileTools.processEvent
+//
+// Revision 1.8  2006/05/16 07:51:15  ounsy
+// added the keepingPeriod creation parameter, used to delete older files
+//
+// Revision 1.7  2005/11/29 17:34:14  chinkumo
+// no message
+//
+// Revision 1.6.8.3  2005/11/29 16:15:11  chinkumo
+// Code reformated (pogo compatible)
+//
+// Revision 1.6.8.2  2005/11/15 13:45:38  chinkumo
+// ...
+//
+// Revision 1.6.8.1  2005/09/26 08:01:54  chinkumo
+// Minor changes !
+//
+// Revision 1.6  2005/06/24 12:06:38  chinkumo
+// Some constants were moved from fr.soleil.hdbtdbArchivingApi.ArchivingApi.ConfigConst to fr.soleil.hdbtdbArchivingApi.ArchivingTools.Tools.GlobalConst.
+
+// This change was reported here.
+//
+// Revision 1.5  2005/06/14 10:39:09  chinkumo
+// Branch (tdbArchiver_1_0_1-branch_0)  and HEAD merged.
+//
+// Revision 1.4.4.1  2005/06/13 13:57:32  chinkumo
+// Changes made to improve the management of exceptions were reported here.
+//
+// Revision 1.4  2005/04/08 15:37:06  chinkumo
+// errorChange method filled.
+
+// The aim of this method is to manage possible attribute's problem while polling attributes.
+
+// In case of unavailable value, a record is nevertheless carried out with the event timestamp, but with a kind of NULL value.
+//
+// Revision 1.3  2005/02/04 17:10:38  chinkumo
+// The trouble with the grouped stopping strategy was fixed.
+//
+// Revision 1.2  2005/01/31 15:09:04  chinkumo
+// Changes made since the TdbProxy class was changed into the DbProxy class.
+//
+// Revision 1.1  2004/12/06 16:43:25  chinkumo
+// First commit (new architecture).
+//
+// Revision 1.5  2004/09/27 13:17:36  chinkumo
+// The addSource method were improved : The two calls 'myFile.checkDirs();' + 'myFile.initFile();' were gathered into one single call (myFile.initialize();).
+//
+// Revision 1.4  2004/09/14 07:00:32  chinkumo
+// Some unused 'import' were removed.
+// Some error messages were re-written to fit the 'error policy' recently decided.
+//
+// Revision 1.3  2004/09/01 15:40:44  chinkumo
+// Heading was updated.
+// As the Mode object now includes the exportPeriod information the way to build a FileTools object was modified (see addSource(..)).
+//
+//
+// copyleft :	Synchrotron SOLEIL
+//					L'Orme des Merisiers
+//					Saint-Aubin - BP 48
+//					91192 GIF-sur-YVETTE CEDEX
+//
+//-======================================================================
+
+package TdbArchiver.Collector.image;
+
+import org.slf4j.Logger;
+
+import TdbArchiver.Collector.TdbCollector;
+import TdbArchiver.Collector.TdbModeHandler;
+import fr.esrf.Tango.AttrWriteType;
+import fr.esrf.TangoDs.Util;
+import fr.esrf.tangoatk.core.AttributeStateEvent;
+import fr.esrf.tangoatk.core.ErrorEvent;
+import fr.esrf.tangoatk.core.IEntity;
+import fr.esrf.tangoatk.core.IImageListener;
+import fr.esrf.tangoatk.core.INumberImage;
+import fr.esrf.tangoatk.core.NumberImageEvent;
+import fr.soleil.archiving.common.api.exception.ArchivingException;
+import fr.soleil.archiving.hdbtdb.api.tools.ImageEvent_RO;
+
+public class Image_RO extends TdbCollector implements IImageListener {
+
+    private static final long serialVersionUID = -5351464886930082626L;
+
+    public Image_RO(final TdbModeHandler modeHandler, final String currentDsPath, final String currentDbPath,
+            final AttrWriteType writableType, Logger logger) {
+        super(modeHandler, currentDsPath, currentDbPath, writableType, logger);
+    }
+
+    @Override
+    public void removeListeners(final IEntity attribute) throws ArchivingException {
+        if (attribute instanceof INumberImage) {
+            ((INumberImage) attribute).removeImageListener(this);
+            ((INumberImage) attribute).removeErrorListener(this);
+        }
+    }
+
+    @Override
+    protected void treatErrorEventAfterLogging(ErrorEvent errorEvent) {
+        final double[][] value = null;
+        final ImageEvent_RO imageEvent_ro = new ImageEvent_RO();
+        imageEvent_ro.setAttributeCompleteName(errorEvent.getSource().toString());
+        imageEvent_ro.setTimeStamp(errorEvent.getTimeStamp());
+        imageEvent_ro.setImageValueRO(value, null);
+        processEventImage(imageEvent_ro, DEFAULT_TRY_NUMBER);
+    }
+
+    @Override
+    public void imageChange(final NumberImageEvent event) {
+        final int tryNumber = DEFAULT_TRY_NUMBER;
+        final String attributeName = ((INumberImage) event.getSource()).getName();
+        final double[][] value = event.getValue();
+        int length = 0, length2 = 0;
+        if (value != null) {
+            length = value.length;
+            if (length > 0 && value[0] != null) {
+                length2 = value[0].length;
+            }
+        }
+        final double[][] imageValue = new double[length][];
+        for (int i = 0; i < length; i++) {
+            imageValue[i] = (value[i] == null ? null : value[i].clone());
+        }
+
+        final ImageEvent_RO imageEvent_ro = new ImageEvent_RO();
+        removeErrorMessage(attributeName);
+        imageEvent_ro.setAttributeCompleteName(attributeName);
+        imageEvent_ro.setTimeStamp(event.getTimeStamp());
+        imageEvent_ro.setDimX(length);
+        imageEvent_ro.setDimY(length2);
+        imageEvent_ro.setImageValueRO(imageValue, null);
+
+        processEventImage(imageEvent_ro, tryNumber);
+    }
+
+    @Override
+    public void stateChange(final AttributeStateEvent event) {
+    }
+
+    public void processEventImage(final ImageEvent_RO event, final int try_number) {
+        Util.out4.println("Image_RO.processEventImage");
+        if (isDataArchivableTimestampWise(event)) {
+            final String attributeName = event.getAttributeCompleteName();
+            try {
+                processFileImage(event);
+                super.setLastTimestamp(event);
+            } catch (final Exception e) {
+                registerErrorMessage(attributeName, e.getMessage());
+                Util.out2.println("ERROR !! " + "\r\n" + "\t Origin : \t " + "Image_RO.processEventImage" + "\r\n"
+                        + "\t Reason : \t " + e.getClass().getName() + "\r\n" + "\t Description : \t " + e.getMessage()
+                        + "\r\n" + "\t Additional information : \t " + "" + "\r\n");
+                e.printStackTrace();
+            }
+        }
+    }
+
+    @Override
+    public void addListeners(final IEntity attribute) throws ArchivingException {
+        if (attribute instanceof INumberImage) {
+            ((INumberImage) attribute).addImageListener(this);
+            ((INumberImage) attribute).addErrorListener(this);
+        }
+    }
+}
diff --git a/src/main/java/TdbArchiver/Collector/scalar/BooleanScalar.java b/tdbarchiver/src/main/java/TdbArchiver/Collector/scalar/BooleanScalar.java
similarity index 97%
rename from src/main/java/TdbArchiver/Collector/scalar/BooleanScalar.java
rename to tdbarchiver/src/main/java/TdbArchiver/Collector/scalar/BooleanScalar.java
index 48ac7e04455bef48851b9c1ab0ba44e1872bc2b9..f4650f1799af081472a9549d0f4a931ab7cd19e8 100644
--- a/src/main/java/TdbArchiver/Collector/scalar/BooleanScalar.java
+++ b/tdbarchiver/src/main/java/TdbArchiver/Collector/scalar/BooleanScalar.java
@@ -1,246 +1,246 @@
-// +======================================================================
-// $Source: /cvsroot/tango-cs/tango/jserver/archiving/TdbArchiver/Collector/scalar/BooleanScalar.java,v $
-//
-// Project:      Tango Archiving Service
-//
-// Description:  Java source code for the class  BooleanScalar.
-//						(Chinkumo Jean) - Aug 30, 2005
-//
-// $Author: pierrejoseph $
-//
-// $Revision: 1.23 $
-//
-// $Log: BooleanScalar.java,v $
-// Revision 1.23  2007/06/14 07:09:36  pierrejoseph
-// Exception addition in errorChange + retrieve the data_type of a Number Event
-//
-// Revision 1.22  2007/06/11 12:16:33  pierrejoseph
-// doArchive method has been added in the TdbCollector class with new catched exceptions that can be raised by the isDataArchivable method.
-//
-// Revision 1.21  2007/06/01 09:47:40  pierrejoseph
-// Mantis 5232 : in the errorChange method with the scalarevent was created the data_type was missing so in case of error nothing was stored in the BD
-//
-// Revision 1.20  2007/05/25 12:03:36  pierrejoseph
-// Pb mode counter on various mode in the same collector : one ModesCounters object by attribut stored in a hashtable of the ArchiverCollector object (in common part)
-//
-// Revision 1.19  2007/04/24 14:29:28  ounsy
-// added a log in the case of unexpected ClassCast exception on the event's value
-//
-// Revision 1.18  2007/04/03 15:40:26  ounsy
-// removed logs
-//
-// Revision 1.17  2007/03/27 15:17:43  ounsy
-// corrected the processEventScalar method to use the isFirstValue boolean
-//
-// Revision 1.16  2007/03/20 15:03:15  ounsy
-// trying alternate version of processEventScalar
-//
-// Revision 1.15  2007/03/05 16:25:20  ounsy
-// non-static DataBase
-//
-// Revision 1.14  2007/02/13 14:41:45  ounsy
-// added diary entry in the case of unexpected exceptions in addSource
-//
-// Revision 1.13  2007/02/13 14:19:16  ounsy
-// corrected a bug in addSource: an infinite nnumber of FileTools instances could potentially be created
-//
-// Revision 1.12  2006/10/19 12:26:01  ounsy
-// modfiied the removeSource to take into account the new isAsuynchronous parameter
-//
-// Revision 1.11  2006/08/23 09:55:15  ounsy
-// FileTools compatible with the new TDB file management
-// + keeping period removed from FileTools (it was already no more used, but the parameter was still here. Only removed a no more used parameter)
-//
-// Revision 1.10  2006/07/27 12:42:19  ounsy
-// modified processEventScalar so that it calls setLastValue even if the current value doesn't have to be archived
-//
-// Revision 1.9  2006/07/26 08:37:21  ounsy
-// try number no more static and reinitialized with change events (errorchange, numberscalarchange, etc...)
-//
-// Revision 1.8  2006/07/21 14:40:50  ounsy
-// modified processEventScalar: moved the time condition test to imitate Hdb
-//
-// Revision 1.7  2006/06/08 08:34:31  ounsy
-// added new diary logging system: the results of tmp file exports are logged in a text file (one per archiver and per day)
-//
-// Revision 1.6  2006/05/23 11:58:03  ounsy
-// now checks the timeCondition condition before calling FileTools.processEvent
-//
-// Revision 1.5  2006/05/16 09:29:53  ounsy
-// added what's necessary for the old files deletion mechanism
-//
-// Revision 1.4  2005/11/29 16:15:11  chinkumo
-// Code reformated (pogo compatible)
-//
-// Revision 1.3  2005/11/15 13:45:38  chinkumo
-// ...
-//
-// Revision 1.2  2005/09/26 08:01:54  chinkumo
-// Minor changes !
-//
-// Revision 1.1  2005/09/09 10:04:03  chinkumo
-// First commit !
-// (Dynamic attribut release)
-//
-//
-// copyleft :	Synchrotron SOLEIL
-//					L'Orme des Merisiers
-//					Saint-Aubin - BP 48
-//					91192 GIF-sur-YVETTE CEDEX
-//
-//-======================================================================
-
-package TdbArchiver.Collector.scalar;
-
-import org.slf4j.Logger;
-
-import Common.Archiver.Collector.ModesCounters;
-import TdbArchiver.Collector.TdbCollector;
-import TdbArchiver.Collector.TdbModeHandler;
-import TdbArchiver.Collector.Tools.NoRetryException;
-import fr.esrf.Tango.AttrDataFormat;
-import fr.esrf.Tango.AttrWriteType;
-import fr.esrf.Tango.DevFailed;
-import fr.esrf.Tango.ErrSeverity;
-import fr.esrf.TangoDs.TangoConst;
-import fr.esrf.TangoDs.Util;
-import fr.esrf.tangoatk.core.AttributeStateEvent;
-import fr.esrf.tangoatk.core.BooleanScalarEvent;
-import fr.esrf.tangoatk.core.ErrorEvent;
-import fr.esrf.tangoatk.core.IBooleanScalar;
-import fr.esrf.tangoatk.core.IBooleanScalarListener;
-import fr.esrf.tangoatk.core.IEntity;
-import fr.soleil.archiving.common.api.exception.ArchivingException;
-import fr.soleil.archiving.common.api.tools.GlobalConst;
-import fr.soleil.archiving.hdbtdb.api.tools.ScalarEvent;
-
-public class BooleanScalar extends TdbCollector implements IBooleanScalarListener {
-
-    private static final long serialVersionUID = 5228824848296112846L;
-
-    public BooleanScalar(final TdbModeHandler modeHandler, final String currentDsPath, final String currentDbPath,
-            final AttrWriteType writableType, Logger logger) {
-        super(modeHandler, currentDsPath, currentDbPath, writableType, logger);
-    }
-
-    @Override
-    public void addListeners(final IEntity attribute) throws ArchivingException {
-        if (attribute instanceof IBooleanScalar) {
-            ((IBooleanScalar) attribute).addBooleanScalarListener(this);
-            ((IBooleanScalar) attribute).addErrorListener(this);
-        }
-    }
-
-    @Override
-    public void removeListeners(final IEntity attribute) throws ArchivingException {
-        if (attribute instanceof IBooleanScalar) {
-            ((IBooleanScalar) attribute).removeBooleanScalarListener(this);
-            ((IBooleanScalar) attribute).removeErrorListener(this);
-        }
-    }
-
-    @Override
-    public void booleanScalarChange(final BooleanScalarEvent event) {
-        if (event != null && event.getSource() != null) {
-            final ScalarEvent scalarEvent = new ScalarEvent();
-            String attributeName = ((IBooleanScalar) event.getSource()).getName();
-            try {
-                removeErrorMessage(attributeName);
-                scalarEvent.setAttributeCompleteName(attributeName);
-                scalarEvent.setDataFormat(AttrDataFormat._SCALAR);
-                scalarEvent.setDataType(((IBooleanScalar) event.getSource()).getAttribute().getType());
-                scalarEvent.setWritable(getWritableValue().value());
-                scalarEvent.setTimeStamp(event.getTimeStamp());
-                if (getWritableValue().equals(AttrWriteType.WRITE)) {
-                    scalarEvent.setValue(Boolean.valueOf(((IBooleanScalar) event.getSource()).getSetPoint()), null);
-                } else if (getWritableValue().equals(AttrWriteType.READ_WRITE)) {
-                    final boolean[] bvalue = new boolean[2];
-                    bvalue[0] = ((IBooleanScalar) event.getSource()).getValue();
-                    bvalue[1] = ((IBooleanScalar) event.getSource()).getSetPoint();
-                    scalarEvent.setValue(bvalue, null);
-                } else {
-                    scalarEvent.setValue(Boolean.valueOf(((IBooleanScalar) event.getSource()).getValue()), null);
-                }
-                processEventScalar(scalarEvent, DEFAULT_TRY_NUMBER);
-            } catch (final DevFailed devFailed) {
-                registerErrorMessage(attributeName, devFailed);
-                printException(GlobalConst.DATA_TYPE_EXCEPTION, AttrDataFormat._SCALAR,
-                        scalarEvent.getAttributeCompleteName(), devFailed);
-            }
-        } else {
-            final String message = "event is null or empty: " + event;
-            System.err.println(message);
-            logger.error(message);
-        }
-    }
-
-    private void processEventScalar(final ScalarEvent scalarEvent, int try_number) {
-        final boolean timeCondition = super.isDataArchivableTimestampWise(scalarEvent);
-        if (!timeCondition) {
-            return;
-        }
-        String attributeName = scalarEvent.getAttributeCompleteName();
-        try {
-            boolean doArchive = false;
-            if (isFirstValueList.get(attributeName.toLowerCase())) {
-                doArchive = true;
-                isFirstValueList.put(attributeName.toLowerCase(), false);
-                logger.debug(attributeName + " first value, forcing archiving");
-            } else {
-                final ModesCounters mc = getModeCounter(attributeName);
-                if (mc == null) {
-                    logger.error(attributeName + "Attribute Counters unknown");
-                } else {
-                    doArchive = doArchiveEvent(mc, scalarEvent.getDataType(), scalarEvent.getReadValue(),
-                            getLastValue(scalarEvent), attributeName);
-                }
-            }
-
-            if (doArchive) {
-                processFileScalar(scalarEvent);
-            }
-
-            setLastValue(scalarEvent, scalarEvent.getReadValue());
-        } catch (final Exception e) {
-            registerErrorMessage(attributeName, e.getMessage());
-            if (!(e instanceof NoRetryException)) {
-                try_number--;
-                if (try_number > 0) {
-                    Util.out2.println("BooleanScalar.processEventScalar : retry " + try_number + "failed...");
-                    processEventScalar(scalarEvent, try_number);
-                }
-            }
-        }
-    }
-
-    protected void printException(final String cause, final int cause_value, final String name,
-            final DevFailed devFailed) {
-        final String message = GlobalConst.ARCHIVING_ERROR_PREFIX + " : " + cause;
-        final String reason = "Failed while executing BooleanScalar.booleanScalarChange()...";
-        final String desc = cause_value != -1 ? cause + " (" + cause_value + ") not supported !! [" + name + "]"
-                : "Unable to retrieve the attribute data type";
-        Util.out2.println(devFailed == null ? new ArchivingException(message, reason, ErrSeverity.PANIC, desc, "")
-                .toString() : new ArchivingException(message, reason, ErrSeverity.PANIC, desc, "", devFailed)
-                .toString());
-    }
-
-    @Override
-    protected void treatErrorEventAfterLogging(ErrorEvent errorEvent) {
-        try {
-            processEventScalar(
-                    getNullValueScalarEvent(errorEvent, TangoConst.Tango_DEV_BOOLEAN, getWritableValue().value()),
-                    DEFAULT_TRY_NUMBER);
-        } catch (final Exception e) {
-            logger.error(this.getClass().getSimpleName() + ".errorChange : during processEventScalar creation execp : "
-                    + e);
-            e.printStackTrace();
-        }
-    }
-
-    @Override
-    public void stateChange(final AttributeStateEvent e) {
-        // TODO Auto-generated method stub
-
-    }
-
-}
+// +======================================================================
+// $Source: /cvsroot/tango-cs/tango/jserver/archiving/TdbArchiver/Collector/scalar/BooleanScalar.java,v $
+//
+// Project:      Tango Archiving Service
+//
+// Description:  Java source code for the class  BooleanScalar.
+//						(Chinkumo Jean) - Aug 30, 2005
+//
+// $Author: pierrejoseph $
+//
+// $Revision: 1.23 $
+//
+// $Log: BooleanScalar.java,v $
+// Revision 1.23  2007/06/14 07:09:36  pierrejoseph
+// Exception addition in errorChange + retrieve the data_type of a Number Event
+//
+// Revision 1.22  2007/06/11 12:16:33  pierrejoseph
+// doArchive method has been added in the TdbCollector class with new catched exceptions that can be raised by the isDataArchivable method.
+//
+// Revision 1.21  2007/06/01 09:47:40  pierrejoseph
+// Mantis 5232 : in the errorChange method with the scalarevent was created the data_type was missing so in case of error nothing was stored in the BD
+//
+// Revision 1.20  2007/05/25 12:03:36  pierrejoseph
+// Pb mode counter on various mode in the same collector : one ModesCounters object by attribut stored in a hashtable of the ArchiverCollector object (in common part)
+//
+// Revision 1.19  2007/04/24 14:29:28  ounsy
+// added a log in the case of unexpected ClassCast exception on the event's value
+//
+// Revision 1.18  2007/04/03 15:40:26  ounsy
+// removed logs
+//
+// Revision 1.17  2007/03/27 15:17:43  ounsy
+// corrected the processEventScalar method to use the isFirstValue boolean
+//
+// Revision 1.16  2007/03/20 15:03:15  ounsy
+// trying alternate version of processEventScalar
+//
+// Revision 1.15  2007/03/05 16:25:20  ounsy
+// non-static DataBase
+//
+// Revision 1.14  2007/02/13 14:41:45  ounsy
+// added diary entry in the case of unexpected exceptions in addSource
+//
+// Revision 1.13  2007/02/13 14:19:16  ounsy
+// corrected a bug in addSource: an infinite nnumber of FileTools instances could potentially be created
+//
+// Revision 1.12  2006/10/19 12:26:01  ounsy
+// modfiied the removeSource to take into account the new isAsuynchronous parameter
+//
+// Revision 1.11  2006/08/23 09:55:15  ounsy
+// FileTools compatible with the new TDB file management
+// + keeping period removed from FileTools (it was already no more used, but the parameter was still here. Only removed a no more used parameter)
+//
+// Revision 1.10  2006/07/27 12:42:19  ounsy
+// modified processEventScalar so that it calls setLastValue even if the current value doesn't have to be archived
+//
+// Revision 1.9  2006/07/26 08:37:21  ounsy
+// try number no more static and reinitialized with change events (errorchange, numberscalarchange, etc...)
+//
+// Revision 1.8  2006/07/21 14:40:50  ounsy
+// modified processEventScalar: moved the time condition test to imitate Hdb
+//
+// Revision 1.7  2006/06/08 08:34:31  ounsy
+// added new diary logging system: the results of tmp file exports are logged in a text file (one per archiver and per day)
+//
+// Revision 1.6  2006/05/23 11:58:03  ounsy
+// now checks the timeCondition condition before calling FileTools.processEvent
+//
+// Revision 1.5  2006/05/16 09:29:53  ounsy
+// added what's necessary for the old files deletion mechanism
+//
+// Revision 1.4  2005/11/29 16:15:11  chinkumo
+// Code reformated (pogo compatible)
+//
+// Revision 1.3  2005/11/15 13:45:38  chinkumo
+// ...
+//
+// Revision 1.2  2005/09/26 08:01:54  chinkumo
+// Minor changes !
+//
+// Revision 1.1  2005/09/09 10:04:03  chinkumo
+// First commit !
+// (Dynamic attribut release)
+//
+//
+// copyleft :	Synchrotron SOLEIL
+//					L'Orme des Merisiers
+//					Saint-Aubin - BP 48
+//					91192 GIF-sur-YVETTE CEDEX
+//
+//-======================================================================
+
+package TdbArchiver.Collector.scalar;
+
+import org.slf4j.Logger;
+
+import Common.Archiver.Collector.ModesCounters;
+import TdbArchiver.Collector.TdbCollector;
+import TdbArchiver.Collector.TdbModeHandler;
+import TdbArchiver.Collector.Tools.NoRetryException;
+import fr.esrf.Tango.AttrDataFormat;
+import fr.esrf.Tango.AttrWriteType;
+import fr.esrf.Tango.DevFailed;
+import fr.esrf.Tango.ErrSeverity;
+import fr.esrf.TangoDs.TangoConst;
+import fr.esrf.TangoDs.Util;
+import fr.esrf.tangoatk.core.AttributeStateEvent;
+import fr.esrf.tangoatk.core.BooleanScalarEvent;
+import fr.esrf.tangoatk.core.ErrorEvent;
+import fr.esrf.tangoatk.core.IBooleanScalar;
+import fr.esrf.tangoatk.core.IBooleanScalarListener;
+import fr.esrf.tangoatk.core.IEntity;
+import fr.soleil.archiving.common.api.exception.ArchivingException;
+import fr.soleil.archiving.common.api.tools.GlobalConst;
+import fr.soleil.archiving.hdbtdb.api.tools.ScalarEvent;
+
+public class BooleanScalar extends TdbCollector implements IBooleanScalarListener {
+
+    private static final long serialVersionUID = 5228824848296112846L;
+
+    public BooleanScalar(final TdbModeHandler modeHandler, final String currentDsPath, final String currentDbPath,
+            final AttrWriteType writableType, Logger logger) {
+        super(modeHandler, currentDsPath, currentDbPath, writableType, logger);
+    }
+
+    @Override
+    public void addListeners(final IEntity attribute) throws ArchivingException {
+        if (attribute instanceof IBooleanScalar) {
+            ((IBooleanScalar) attribute).addBooleanScalarListener(this);
+            ((IBooleanScalar) attribute).addErrorListener(this);
+        }
+    }
+
+    @Override
+    public void removeListeners(final IEntity attribute) throws ArchivingException {
+        if (attribute instanceof IBooleanScalar) {
+            ((IBooleanScalar) attribute).removeBooleanScalarListener(this);
+            ((IBooleanScalar) attribute).removeErrorListener(this);
+        }
+    }
+
+    @Override
+    public void booleanScalarChange(final BooleanScalarEvent event) {
+        if (event != null && event.getSource() != null) {
+            final ScalarEvent scalarEvent = new ScalarEvent();
+            String attributeName = ((IBooleanScalar) event.getSource()).getName();
+            try {
+                removeErrorMessage(attributeName);
+                scalarEvent.setAttributeCompleteName(attributeName);
+                scalarEvent.setDataFormat(AttrDataFormat._SCALAR);
+                scalarEvent.setDataType(((IBooleanScalar) event.getSource()).getAttribute().getType());
+                scalarEvent.setWritable(getWritableValue().value());
+                scalarEvent.setTimeStamp(event.getTimeStamp());
+                if (getWritableValue().equals(AttrWriteType.WRITE)) {
+                    scalarEvent.setValue(Boolean.valueOf(((IBooleanScalar) event.getSource()).getSetPoint()), null);
+                } else if (getWritableValue().equals(AttrWriteType.READ_WRITE)) {
+                    final boolean[] bvalue = new boolean[2];
+                    bvalue[0] = ((IBooleanScalar) event.getSource()).getValue();
+                    bvalue[1] = ((IBooleanScalar) event.getSource()).getSetPoint();
+                    scalarEvent.setValue(bvalue, null);
+                } else {
+                    scalarEvent.setValue(Boolean.valueOf(((IBooleanScalar) event.getSource()).getValue()), null);
+                }
+                processEventScalar(scalarEvent, DEFAULT_TRY_NUMBER);
+            } catch (final DevFailed devFailed) {
+                registerErrorMessage(attributeName, devFailed);
+                printException(GlobalConst.DATA_TYPE_EXCEPTION, AttrDataFormat._SCALAR,
+                        scalarEvent.getAttributeCompleteName(), devFailed);
+            }
+        } else {
+            final String message = "event is null or empty: " + event;
+            System.err.println(message);
+            logger.error(message);
+        }
+    }
+
+    private void processEventScalar(final ScalarEvent scalarEvent, int try_number) {
+        final boolean timeCondition = super.isDataArchivableTimestampWise(scalarEvent);
+        if (!timeCondition) {
+            return;
+        }
+        String attributeName = scalarEvent.getAttributeCompleteName();
+        try {
+            boolean doArchive = false;
+            if (isFirstValueList.get(attributeName.toLowerCase())) {
+                doArchive = true;
+                isFirstValueList.put(attributeName.toLowerCase(), false);
+                logger.debug(attributeName + " first value, forcing archiving");
+            } else {
+                final ModesCounters mc = getModeCounter(attributeName);
+                if (mc == null) {
+                    logger.error(attributeName + "Attribute Counters unknown");
+                } else {
+                    doArchive = doArchiveEvent(mc, scalarEvent.getDataType(), scalarEvent.getReadValue(),
+                            getLastValue(scalarEvent), attributeName);
+                }
+            }
+
+            if (doArchive) {
+                processFileScalar(scalarEvent);
+            }
+
+            setLastValue(scalarEvent, scalarEvent.getReadValue());
+        } catch (final Exception e) {
+            registerErrorMessage(attributeName, e.getMessage());
+            if (!(e instanceof NoRetryException)) {
+                try_number--;
+                if (try_number > 0) {
+                    Util.out2.println("BooleanScalar.processEventScalar : retry " + try_number + "failed...");
+                    processEventScalar(scalarEvent, try_number);
+                }
+            }
+        }
+    }
+
+    protected void printException(final String cause, final int cause_value, final String name,
+            final DevFailed devFailed) {
+        final String message = GlobalConst.ARCHIVING_ERROR_PREFIX + " : " + cause;
+        final String reason = "Failed while executing BooleanScalar.booleanScalarChange()...";
+        final String desc = cause_value != -1 ? cause + " (" + cause_value + ") not supported !! [" + name + "]"
+                : "Unable to retrieve the attribute data type";
+        Util.out2.println(devFailed == null ? new ArchivingException(message, reason, ErrSeverity.PANIC, desc, "")
+                .toString() : new ArchivingException(message, reason, ErrSeverity.PANIC, desc, "", devFailed)
+                .toString());
+    }
+
+    @Override
+    protected void treatErrorEventAfterLogging(ErrorEvent errorEvent) {
+        try {
+            processEventScalar(
+                    getNullValueScalarEvent(errorEvent, TangoConst.Tango_DEV_BOOLEAN, getWritableValue().value()),
+                    DEFAULT_TRY_NUMBER);
+        } catch (final Exception e) {
+            logger.error(this.getClass().getSimpleName() + ".errorChange : during processEventScalar creation execp : "
+                    + e);
+            e.printStackTrace();
+        }
+    }
+
+    @Override
+    public void stateChange(final AttributeStateEvent e) {
+        // TODO Auto-generated method stub
+
+    }
+
+}
diff --git a/src/main/java/TdbArchiver/Collector/scalar/NumberScalar.java b/tdbarchiver/src/main/java/TdbArchiver/Collector/scalar/NumberScalar.java
similarity index 97%
rename from src/main/java/TdbArchiver/Collector/scalar/NumberScalar.java
rename to tdbarchiver/src/main/java/TdbArchiver/Collector/scalar/NumberScalar.java
index aeaa9f5b2aabc1141f7cae33f50f95550339a228..13c24bba31465da0b0adfc34049cc5b07890c1fd 100644
--- a/src/main/java/TdbArchiver/Collector/scalar/NumberScalar.java
+++ b/tdbarchiver/src/main/java/TdbArchiver/Collector/scalar/NumberScalar.java
@@ -1,385 +1,385 @@
-// +======================================================================
-// $Source: /cvsroot/tango-cs/tango/jserver/archiving/TdbArchiver/Collector/scalar/NumberScalar.java,v $
-//
-// Project:      Tango Archiving Service
-//
-// Description:  Java source code for the class  NumberScalar.
-//						(Chinkumo Jean) - Mar 25, 2004
-//
-// $Author: pierrejoseph $
-//
-// $Revision: 1.34 $
-//
-// $Log: NumberScalar.java,v $
-// Revision 1.34  2007/08/27 14:14:35  pierrejoseph
-// Traces addition : the logger object is stored in the TdbCollectorFactory
-//
-// Revision 1.33  2007/06/14 07:09:37  pierrejoseph
-// Exception addition in errorChange + retrieve the data_type of a Number Event
-//
-// Revision 1.32  2007/06/11 12:16:33  pierrejoseph
-// doArchive method has been added in the TdbCollector class with new catched exceptions that can be raised by the isDataArchivable method.
-//
-// Revision 1.31  2007/06/01 09:47:40  pierrejoseph
-// Mantis 5232 : in the errorChange method with the scalarevent was created the data_type was missing so in case of error nothing was stored in the BD
-//
-// Revision 1.30  2007/05/25 12:03:36  pierrejoseph
-// Pb mode counter on various mode in the same collector : one ModesCounters object by attribut stored in a hashtable of the ArchiverCollector object (in common part)
-//
-// Revision 1.29  2007/04/24 14:29:28  ounsy
-// added a log in the case of unexpected ClassCast exception on the event's value
-//
-// Revision 1.28  2007/04/03 15:16:00  ounsy
-// removed useless logs
-//
-// Revision 1.27  2007/03/27 15:17:43  ounsy
-// corrected the processEventScalar method to use the isFirstValue boolean
-//
-// Revision 1.26  2007/03/14 09:17:51  ounsy
-// added a call to scalarEvent.avoidUnderFlow () in processNumberScalarEvent
-//
-// Revision 1.25  2007/03/05 16:25:20  ounsy
-// non-static DataBase
-//
-// Revision 1.24  2007/02/13 14:41:45  ounsy
-// added diary entry in the case of unexpected exceptions in addSource
-//
-// Revision 1.23  2007/02/13 14:19:16  ounsy
-// corrected a bug in addSource: an infinite nnumber of FileTools instances could potentially be created
-//
-// Revision 1.22  2007/01/11 14:39:57  ounsy
-// minor changes
-//
-// Revision 1.21  2006/10/19 12:25:51  ounsy
-// modfiied the removeSource to take into account the new isAsuynchronous parameter
-//
-// Revision 1.20  2006/08/23 09:55:15  ounsy
-// FileTools compatible with the new TDB file management
-// + keeping period removed from FileTools (it was already no more used, but the parameter was still here. Only removed a no more used parameter)
-//
-// Revision 1.19  2006/07/27 12:42:19  ounsy
-// modified processEventScalar so that it calls setLastValue even if the current value doesn't have to be archived
-//
-// Revision 1.18  2006/07/26 08:37:21  ounsy
-// try number no more static and reinitialized with change events (errorchange, numberscalarchange, etc...)
-//
-// Revision 1.17  2006/07/21 14:40:51  ounsy
-// modified processEventScalar: moved the time condition test to imitate Hdb
-//
-// Revision 1.16  2006/06/08 08:34:31  ounsy
-// added new diary logging system: the results of tmp file exports are logged in a text file (one per archiver and per day)
-//
-// Revision 1.15  2006/06/07 12:57:02  ounsy
-// minor changes
-//
-// Revision 1.14  2006/05/23 11:58:03  ounsy
-// now checks the timeCondition condition before calling FileTools.processEvent
-//
-// Revision 1.13  2006/05/16 09:29:53  ounsy
-// added what's necessary for the old files deletion mechanism
-//
-// Revision 1.12  2006/04/05 13:49:51  ounsy
-// new types full support
-//
-// Revision 1.11  2006/03/16 09:37:36  ounsy
-// synchronized
-//
-// Revision 1.10  2006/03/15 16:06:51  ounsy
-// corrected the bug where some temp files were randomly not purged
-//
-// Revision 1.9  2006/02/24 12:09:13  ounsy
-// removed useless logs
-//
-// Revision 1.8  2005/11/29 17:34:14  chinkumo
-// no message
-//
-// Revision 1.7.8.4  2005/11/29 16:15:11  chinkumo
-// Code reformated (pogo compatible)
-//
-// Revision 1.7.8.3  2005/11/15 13:45:38  chinkumo
-// ...
-//
-// Revision 1.7.8.2  2005/09/26 08:01:54  chinkumo
-// Minor changes !
-//
-// Revision 1.7.8.1  2005/09/09 10:17:25  chinkumo
-// Since the collecting politic was simplified and improved this class was modified.
-//
-// Revision 1.7  2005/06/24 12:06:38  chinkumo
-// Some constants were moved from fr.soleil.hdbtdbArchivingApi.ArchivingApi.ConfigConst to fr.soleil.hdbtdbArchivingApi.ArchivingTools.Tools.GlobalConst.
-
-// This change was reported here.
-//
-// Revision 1.6  2005/06/14 10:39:09  chinkumo
-// Branch (tdbArchiver_1_0_1-branch_0)  and HEAD merged.
-//
-// Revision 1.5.4.1  2005/06/13 13:57:32  chinkumo
-// Changes made to improve the management of exceptions were reported here.
-//
-// Revision 1.5  2005/04/08 15:40:43  chinkumo
-// Code reformated.
-//
-// Revision 1.4  2005/03/07 16:26:25  chinkumo
-// Minor change (tag renamed)
-//
-// Revision 1.3  2005/02/04 17:10:39  chinkumo
-// The trouble with the grouped stopping strategy was fixed.
-//
-// Revision 1.2  2005/01/31 15:09:04  chinkumo
-// Changes made since the TdbProxy class was changed into the DbProxy class.
-//
-// Revision 1.1  2004/12/06 16:43:24  chinkumo
-// First commit (new architecture).
-//
-// Revision 1.5  2004/09/27 13:17:36  chinkumo
-// The addSource method were improved : The two calls 'myFile.checkDirs();' + 'myFile.initFile();' were gathered into one single call (myFile.initialize();).
-//
-// Revision 1.4  2004/09/14 07:03:43  chinkumo
-// Some unused 'import' were removed.
-// Some error messages were re-written to fit the 'error policy' recently decided.
-//
-// Revision 1.3  2004/09/01 15:53:16  chinkumo
-// Heading was updated.
-// As the Mode object now includes the exportPeriod information the way to build a FileTools object was modified (see addSource(..)).
-//
-//
-// copyleft :	Synchrotron SOLEIL
-//					L'Orme des Merisiers
-//					Saint-Aubin - BP 48
-//					91192 GIF-sur-YVETTE CEDEX
-//
-//-======================================================================
-package TdbArchiver.Collector.scalar;
-
-import org.slf4j.Logger;
-
-import Common.Archiver.Collector.ModesCounters;
-import TdbArchiver.Collector.TdbCollector;
-import TdbArchiver.Collector.TdbModeHandler;
-import TdbArchiver.Collector.Tools.NoRetryException;
-import fr.esrf.Tango.AttrDataFormat;
-import fr.esrf.Tango.AttrWriteType;
-import fr.esrf.Tango.DevFailed;
-import fr.esrf.Tango.ErrSeverity;
-import fr.esrf.TangoDs.TangoConst;
-import fr.esrf.TangoDs.Util;
-import fr.esrf.tangoatk.core.AttributeStateEvent;
-import fr.esrf.tangoatk.core.ErrorEvent;
-import fr.esrf.tangoatk.core.IEntity;
-import fr.esrf.tangoatk.core.INumberScalar;
-import fr.esrf.tangoatk.core.INumberScalarListener;
-import fr.esrf.tangoatk.core.NumberScalarEvent;
-import fr.esrf.tangoatk.core.attribute.AAttribute;
-import fr.soleil.archiving.common.api.exception.ArchivingException;
-import fr.soleil.archiving.common.api.tools.GlobalConst;
-import fr.soleil.archiving.hdbtdb.api.tools.ScalarEvent;
-
-public class NumberScalar extends TdbCollector implements INumberScalarListener {
-
-    private static final long serialVersionUID = 6715016406530300376L;
-
-    public NumberScalar(final TdbModeHandler modeHandler, final String currentDsPath, final String currentDbPath,
-            final AttrWriteType writableType, Logger logger) {
-        super(modeHandler, currentDsPath, currentDbPath, writableType, logger);
-    }
-
-    @Override
-    public void addListeners(final IEntity attribute) throws ArchivingException {
-        if (attribute instanceof INumberScalar) {
-            ((INumberScalar) attribute).addNumberScalarListener(this);
-            ((INumberScalar) attribute).addErrorListener(this);
-        }
-    }
-
-    @Override
-    public void removeListeners(final IEntity attribute) throws ArchivingException {
-        if (attribute instanceof INumberScalar) {
-            ((INumberScalar) attribute).removeNumberScalarListener(this);
-            ((INumberScalar) attribute).removeErrorListener(this);
-        }
-    }
-
-    public void processEventScalar(final ScalarEvent scalarEvent, int try_number) {
-        if (isDataArchivableTimestampWise(scalarEvent)) {
-            String attributeName = scalarEvent.getAttributeCompleteName();
-            try {
-                scalarEvent.avoidUnderFlow();
-
-                boolean doArchive = false;
-                if (isFirstValueList.get(attributeName.toLowerCase())) {
-                    doArchive = true;
-                    isFirstValueList.put(attributeName.toLowerCase(), false);
-                    logger.debug(attributeName + " first value, forcing archiving");
-                } else {
-                    final ModesCounters mc = getModeCounter(attributeName);
-                    if (mc == null) {
-                        logger.error(attributeName + " Attribute Counters unknown");
-                    } else {
-                        doArchive = doArchiveEvent(mc, scalarEvent.getDataType(), scalarEvent.getReadValue(),
-                                getLastValue(scalarEvent), attributeName);
-                    }
-                }
-
-                if (doArchive) {
-                    processFileScalar(scalarEvent);
-                }
-                setLastValue(scalarEvent, scalarEvent.getReadValue());
-            } catch (final Exception e) {
-                registerErrorMessage(attributeName, e.getMessage());
-                if (!(e instanceof NoRetryException)) {
-                    try_number--;
-                    if (try_number > 0) {
-                        Util.out2.println("NumberScalar.processEventScalar : retry " + try_number + "failed...");
-                        processEventScalar(scalarEvent, try_number);
-                    }
-                }
-            }
-        }
-    }
-
-    protected void printException(final String cause, final int cause_value, final String name,
-            final DevFailed devFailed) {
-        final String message = GlobalConst.ARCHIVING_ERROR_PREFIX + " : " + cause;
-        final String reason = "Failed while executing NumberScalar.numberScalarChange()...";
-        final String desc = cause_value != -1 ? cause + " (" + cause_value + ") not supported !! [" + name + "]"
-                : "Unable to retrieve the attribute data type";
-        Util.out2.println(devFailed == null ? new ArchivingException(message, reason, ErrSeverity.PANIC, desc, "")
-                .toString() : new ArchivingException(message, reason, ErrSeverity.PANIC, desc, "", devFailed)
-                .toString());
-    }
-
-    @Override
-    public void numberScalarChange(final NumberScalarEvent event) {
-        if (event != null && event.getNumberSource() != null) {
-            final ScalarEvent scalarEvent = new ScalarEvent();
-            String attributeName = event.getNumberSource().getName();
-            removeErrorMessage(attributeName);
-            scalarEvent.setAttributeCompleteName(attributeName);
-            scalarEvent.setDataFormat(AttrDataFormat._SCALAR);
-            scalarEvent.setWritable(getWritableValue().value());
-
-            try {
-                scalarEvent.setDataType(event.getNumberSource().getAttribute().getType());
-                scalarEvent.setTimeStamp(event.getTimeStamp());
-                if (getWritableValue().equals(AttrWriteType.READ)) {
-                    switch (scalarEvent.getDataType()) {
-                        case TangoConst.Tango_DEV_SHORT:
-                        case TangoConst.Tango_DEV_USHORT:
-                        case TangoConst.Tango_DEV_UCHAR:
-                            scalarEvent.setValue((short) event.getNumberSource().getNumberScalarValue(), null);
-                            break;
-                        case TangoConst.Tango_DEV_LONG:
-                        case TangoConst.Tango_DEV_ULONG:
-                            scalarEvent.setValue((int) event.getNumberSource().getNumberScalarValue(), null);
-                            break;
-                        case TangoConst.Tango_DEV_LONG64:
-                        case TangoConst.Tango_DEV_ULONG64:
-                            scalarEvent.setValue((long) event.getNumberSource().getNumberScalarValue(), null);
-                            break;
-                        case TangoConst.Tango_DEV_DOUBLE:
-                            scalarEvent.setValue(event.getNumberSource().getNumberScalarValue(), null);
-                            break;
-                        case TangoConst.Tango_DEV_FLOAT:
-                            scalarEvent.setValue((float) event.getNumberSource().getNumberScalarValue(), null);
-                            break;
-                        default:
-                            scalarEvent.setValue(event.getNumberSource().getNumberScalarValue(), null);
-                            break;
-                    }
-                } else if (getWritableValue().equals(AttrWriteType.READ_WRITE)) {
-                    switch (scalarEvent.getDataType()) {
-                        case TangoConst.Tango_DEV_SHORT:
-                        case TangoConst.Tango_DEV_USHORT:
-                        case TangoConst.Tango_DEV_UCHAR:
-                            final short[] svalue = new short[2];
-                            svalue[0] = (short) event.getNumberSource().getNumberScalarValue();
-                            svalue[1] = (short) event.getNumberSource().getNumberScalarSetPoint();
-                            scalarEvent.setValue(svalue, null);
-                            break;
-                        case TangoConst.Tango_DEV_LONG:
-                        case TangoConst.Tango_DEV_ULONG:
-                            final int[] ivalue = new int[2];
-                            ivalue[0] = (int) event.getNumberSource().getNumberScalarValue();
-                            ivalue[1] = (int) event.getNumberSource().getNumberScalarSetPoint();
-                            scalarEvent.setValue(ivalue, null);
-                            break;
-                        case TangoConst.Tango_DEV_LONG64:
-                        case TangoConst.Tango_DEV_ULONG64:
-                            final long[] lvalue = new long[2];
-                            lvalue[0] = (long) event.getNumberSource().getNumberScalarValue();
-                            lvalue[1] = (long) event.getNumberSource().getNumberScalarSetPoint();
-                            scalarEvent.setValue(lvalue, null);
-                            break;
-                        case TangoConst.Tango_DEV_FLOAT:
-                            final float[] fvalue = new float[2];
-                            fvalue[0] = (float) event.getNumberSource().getNumberScalarValue();
-                            fvalue[1] = (float) event.getNumberSource().getNumberScalarSetPoint();
-                            scalarEvent.setValue(fvalue, null);
-                            break;
-                        case TangoConst.Tango_DEV_DOUBLE:
-                        default:
-                            final double[] dvalue = new double[2];
-                            dvalue[0] = event.getNumberSource().getNumberScalarValue();
-                            dvalue[1] = event.getNumberSource().getNumberScalarSetPoint();
-                            scalarEvent.setValue(dvalue, null);
-                            break;
-                    }
-                } else {
-                    switch (scalarEvent.getDataType()) {
-                        case TangoConst.Tango_DEV_SHORT:
-                            scalarEvent.setValue((short) event.getNumberSource().getNumberScalarSetPoint(), null);
-                            break;
-                        case TangoConst.Tango_DEV_USHORT:
-                            scalarEvent.setValue((short) event.getNumberSource().getNumberScalarSetPoint(), null);
-                            break;
-                        case TangoConst.Tango_DEV_LONG:
-                            scalarEvent.setValue((int) event.getNumberSource().getNumberScalarSetPoint(), null);
-                            break;
-                        case TangoConst.Tango_DEV_ULONG:
-                            scalarEvent.setValue((int) event.getNumberSource().getNumberScalarSetPoint(), null);
-                            break;
-                        case TangoConst.Tango_DEV_DOUBLE:
-                            scalarEvent.setValue(event.getNumberSource().getNumberScalarSetPoint(), null);
-                            break;
-                        case TangoConst.Tango_DEV_FLOAT:
-                            scalarEvent.setValue((float) event.getNumberSource().getNumberScalarSetPoint(), null);
-                            break;
-                        default:
-                            scalarEvent.setValue(event.getNumberSource().getNumberScalarSetPoint(), null);
-                            break;
-                    }
-                }
-            } catch (final DevFailed devFailed) {
-                registerErrorMessage(attributeName, devFailed);
-                printException(GlobalConst.DATA_TYPE_EXCEPTION, AttrDataFormat._SCALAR,
-                        scalarEvent.getAttributeCompleteName(), devFailed);
-            }
-
-            processEventScalar(scalarEvent, DEFAULT_TRY_NUMBER);
-
-        } else {
-            final String message = "event is null or empty: " + event;
-            System.err.println(message);
-            logger.error(message);
-        }
-    }
-
-    @Override
-    protected void treatErrorEventAfterLogging(ErrorEvent errorEvent) {
-        try {
-            processEventScalar(
-                    getNullValueScalarEvent(errorEvent, ((AAttribute) errorEvent.getSource()).getTangoDataType(),
-                            getWritableValue().value()), DEFAULT_TRY_NUMBER);
-        } catch (final Exception e) {
-            logger.error(this.getClass().getSimpleName() + ".errorChange : during processEventScalar creation execp : "
-                    + e);
-            e.printStackTrace();
-        }
-    }
-
-    @Override
-    public void stateChange(final AttributeStateEvent e) {
-        // TODO Auto-generated method stub
-
-    }
-}
+// +======================================================================
+// $Source: /cvsroot/tango-cs/tango/jserver/archiving/TdbArchiver/Collector/scalar/NumberScalar.java,v $
+//
+// Project:      Tango Archiving Service
+//
+// Description:  Java source code for the class  NumberScalar.
+//						(Chinkumo Jean) - Mar 25, 2004
+//
+// $Author: pierrejoseph $
+//
+// $Revision: 1.34 $
+//
+// $Log: NumberScalar.java,v $
+// Revision 1.34  2007/08/27 14:14:35  pierrejoseph
+// Traces addition : the logger object is stored in the TdbCollectorFactory
+//
+// Revision 1.33  2007/06/14 07:09:37  pierrejoseph
+// Exception addition in errorChange + retrieve the data_type of a Number Event
+//
+// Revision 1.32  2007/06/11 12:16:33  pierrejoseph
+// doArchive method has been added in the TdbCollector class with new catched exceptions that can be raised by the isDataArchivable method.
+//
+// Revision 1.31  2007/06/01 09:47:40  pierrejoseph
+// Mantis 5232 : in the errorChange method with the scalarevent was created the data_type was missing so in case of error nothing was stored in the BD
+//
+// Revision 1.30  2007/05/25 12:03:36  pierrejoseph
+// Pb mode counter on various mode in the same collector : one ModesCounters object by attribut stored in a hashtable of the ArchiverCollector object (in common part)
+//
+// Revision 1.29  2007/04/24 14:29:28  ounsy
+// added a log in the case of unexpected ClassCast exception on the event's value
+//
+// Revision 1.28  2007/04/03 15:16:00  ounsy
+// removed useless logs
+//
+// Revision 1.27  2007/03/27 15:17:43  ounsy
+// corrected the processEventScalar method to use the isFirstValue boolean
+//
+// Revision 1.26  2007/03/14 09:17:51  ounsy
+// added a call to scalarEvent.avoidUnderFlow () in processNumberScalarEvent
+//
+// Revision 1.25  2007/03/05 16:25:20  ounsy
+// non-static DataBase
+//
+// Revision 1.24  2007/02/13 14:41:45  ounsy
+// added diary entry in the case of unexpected exceptions in addSource
+//
+// Revision 1.23  2007/02/13 14:19:16  ounsy
+// corrected a bug in addSource: an infinite nnumber of FileTools instances could potentially be created
+//
+// Revision 1.22  2007/01/11 14:39:57  ounsy
+// minor changes
+//
+// Revision 1.21  2006/10/19 12:25:51  ounsy
+// modfiied the removeSource to take into account the new isAsuynchronous parameter
+//
+// Revision 1.20  2006/08/23 09:55:15  ounsy
+// FileTools compatible with the new TDB file management
+// + keeping period removed from FileTools (it was already no more used, but the parameter was still here. Only removed a no more used parameter)
+//
+// Revision 1.19  2006/07/27 12:42:19  ounsy
+// modified processEventScalar so that it calls setLastValue even if the current value doesn't have to be archived
+//
+// Revision 1.18  2006/07/26 08:37:21  ounsy
+// try number no more static and reinitialized with change events (errorchange, numberscalarchange, etc...)
+//
+// Revision 1.17  2006/07/21 14:40:51  ounsy
+// modified processEventScalar: moved the time condition test to imitate Hdb
+//
+// Revision 1.16  2006/06/08 08:34:31  ounsy
+// added new diary logging system: the results of tmp file exports are logged in a text file (one per archiver and per day)
+//
+// Revision 1.15  2006/06/07 12:57:02  ounsy
+// minor changes
+//
+// Revision 1.14  2006/05/23 11:58:03  ounsy
+// now checks the timeCondition condition before calling FileTools.processEvent
+//
+// Revision 1.13  2006/05/16 09:29:53  ounsy
+// added what's necessary for the old files deletion mechanism
+//
+// Revision 1.12  2006/04/05 13:49:51  ounsy
+// new types full support
+//
+// Revision 1.11  2006/03/16 09:37:36  ounsy
+// synchronized
+//
+// Revision 1.10  2006/03/15 16:06:51  ounsy
+// corrected the bug where some temp files were randomly not purged
+//
+// Revision 1.9  2006/02/24 12:09:13  ounsy
+// removed useless logs
+//
+// Revision 1.8  2005/11/29 17:34:14  chinkumo
+// no message
+//
+// Revision 1.7.8.4  2005/11/29 16:15:11  chinkumo
+// Code reformated (pogo compatible)
+//
+// Revision 1.7.8.3  2005/11/15 13:45:38  chinkumo
+// ...
+//
+// Revision 1.7.8.2  2005/09/26 08:01:54  chinkumo
+// Minor changes !
+//
+// Revision 1.7.8.1  2005/09/09 10:17:25  chinkumo
+// Since the collecting politic was simplified and improved this class was modified.
+//
+// Revision 1.7  2005/06/24 12:06:38  chinkumo
+// Some constants were moved from fr.soleil.hdbtdbArchivingApi.ArchivingApi.ConfigConst to fr.soleil.hdbtdbArchivingApi.ArchivingTools.Tools.GlobalConst.
+
+// This change was reported here.
+//
+// Revision 1.6  2005/06/14 10:39:09  chinkumo
+// Branch (tdbArchiver_1_0_1-branch_0)  and HEAD merged.
+//
+// Revision 1.5.4.1  2005/06/13 13:57:32  chinkumo
+// Changes made to improve the management of exceptions were reported here.
+//
+// Revision 1.5  2005/04/08 15:40:43  chinkumo
+// Code reformated.
+//
+// Revision 1.4  2005/03/07 16:26:25  chinkumo
+// Minor change (tag renamed)
+//
+// Revision 1.3  2005/02/04 17:10:39  chinkumo
+// The trouble with the grouped stopping strategy was fixed.
+//
+// Revision 1.2  2005/01/31 15:09:04  chinkumo
+// Changes made since the TdbProxy class was changed into the DbProxy class.
+//
+// Revision 1.1  2004/12/06 16:43:24  chinkumo
+// First commit (new architecture).
+//
+// Revision 1.5  2004/09/27 13:17:36  chinkumo
+// The addSource method were improved : The two calls 'myFile.checkDirs();' + 'myFile.initFile();' were gathered into one single call (myFile.initialize();).
+//
+// Revision 1.4  2004/09/14 07:03:43  chinkumo
+// Some unused 'import' were removed.
+// Some error messages were re-written to fit the 'error policy' recently decided.
+//
+// Revision 1.3  2004/09/01 15:53:16  chinkumo
+// Heading was updated.
+// As the Mode object now includes the exportPeriod information the way to build a FileTools object was modified (see addSource(..)).
+//
+//
+// copyleft :	Synchrotron SOLEIL
+//					L'Orme des Merisiers
+//					Saint-Aubin - BP 48
+//					91192 GIF-sur-YVETTE CEDEX
+//
+//-======================================================================
+package TdbArchiver.Collector.scalar;
+
+import org.slf4j.Logger;
+
+import Common.Archiver.Collector.ModesCounters;
+import TdbArchiver.Collector.TdbCollector;
+import TdbArchiver.Collector.TdbModeHandler;
+import TdbArchiver.Collector.Tools.NoRetryException;
+import fr.esrf.Tango.AttrDataFormat;
+import fr.esrf.Tango.AttrWriteType;
+import fr.esrf.Tango.DevFailed;
+import fr.esrf.Tango.ErrSeverity;
+import fr.esrf.TangoDs.TangoConst;
+import fr.esrf.TangoDs.Util;
+import fr.esrf.tangoatk.core.AttributeStateEvent;
+import fr.esrf.tangoatk.core.ErrorEvent;
+import fr.esrf.tangoatk.core.IEntity;
+import fr.esrf.tangoatk.core.INumberScalar;
+import fr.esrf.tangoatk.core.INumberScalarListener;
+import fr.esrf.tangoatk.core.NumberScalarEvent;
+import fr.esrf.tangoatk.core.attribute.AAttribute;
+import fr.soleil.archiving.common.api.exception.ArchivingException;
+import fr.soleil.archiving.common.api.tools.GlobalConst;
+import fr.soleil.archiving.hdbtdb.api.tools.ScalarEvent;
+
+public class NumberScalar extends TdbCollector implements INumberScalarListener {
+
+    private static final long serialVersionUID = 6715016406530300376L;
+
+    public NumberScalar(final TdbModeHandler modeHandler, final String currentDsPath, final String currentDbPath,
+            final AttrWriteType writableType, Logger logger) {
+        super(modeHandler, currentDsPath, currentDbPath, writableType, logger);
+    }
+
+    @Override
+    public void addListeners(final IEntity attribute) throws ArchivingException {
+        if (attribute instanceof INumberScalar) {
+            ((INumberScalar) attribute).addNumberScalarListener(this);
+            ((INumberScalar) attribute).addErrorListener(this);
+        }
+    }
+
+    @Override
+    public void removeListeners(final IEntity attribute) throws ArchivingException {
+        if (attribute instanceof INumberScalar) {
+            ((INumberScalar) attribute).removeNumberScalarListener(this);
+            ((INumberScalar) attribute).removeErrorListener(this);
+        }
+    }
+
+    public void processEventScalar(final ScalarEvent scalarEvent, int try_number) {
+        if (isDataArchivableTimestampWise(scalarEvent)) {
+            String attributeName = scalarEvent.getAttributeCompleteName();
+            try {
+                scalarEvent.avoidUnderFlow();
+
+                boolean doArchive = false;
+                if (isFirstValueList.get(attributeName.toLowerCase())) {
+                    doArchive = true;
+                    isFirstValueList.put(attributeName.toLowerCase(), false);
+                    logger.debug(attributeName + " first value, forcing archiving");
+                } else {
+                    final ModesCounters mc = getModeCounter(attributeName);
+                    if (mc == null) {
+                        logger.error(attributeName + " Attribute Counters unknown");
+                    } else {
+                        doArchive = doArchiveEvent(mc, scalarEvent.getDataType(), scalarEvent.getReadValue(),
+                                getLastValue(scalarEvent), attributeName);
+                    }
+                }
+
+                if (doArchive) {
+                    processFileScalar(scalarEvent);
+                }
+                setLastValue(scalarEvent, scalarEvent.getReadValue());
+            } catch (final Exception e) {
+                registerErrorMessage(attributeName, e.getMessage());
+                if (!(e instanceof NoRetryException)) {
+                    try_number--;
+                    if (try_number > 0) {
+                        Util.out2.println("NumberScalar.processEventScalar : retry " + try_number + "failed...");
+                        processEventScalar(scalarEvent, try_number);
+                    }
+                }
+            }
+        }
+    }
+
+    protected void printException(final String cause, final int cause_value, final String name,
+            final DevFailed devFailed) {
+        final String message = GlobalConst.ARCHIVING_ERROR_PREFIX + " : " + cause;
+        final String reason = "Failed while executing NumberScalar.numberScalarChange()...";
+        final String desc = cause_value != -1 ? cause + " (" + cause_value + ") not supported !! [" + name + "]"
+                : "Unable to retrieve the attribute data type";
+        Util.out2.println(devFailed == null ? new ArchivingException(message, reason, ErrSeverity.PANIC, desc, "")
+                .toString() : new ArchivingException(message, reason, ErrSeverity.PANIC, desc, "", devFailed)
+                .toString());
+    }
+
+    @Override
+    public void numberScalarChange(final NumberScalarEvent event) {
+        if (event != null && event.getNumberSource() != null) {
+            final ScalarEvent scalarEvent = new ScalarEvent();
+            String attributeName = event.getNumberSource().getName();
+            removeErrorMessage(attributeName);
+            scalarEvent.setAttributeCompleteName(attributeName);
+            scalarEvent.setDataFormat(AttrDataFormat._SCALAR);
+            scalarEvent.setWritable(getWritableValue().value());
+
+            try {
+                scalarEvent.setDataType(event.getNumberSource().getAttribute().getType());
+                scalarEvent.setTimeStamp(event.getTimeStamp());
+                if (getWritableValue().equals(AttrWriteType.READ)) {
+                    switch (scalarEvent.getDataType()) {
+                        case TangoConst.Tango_DEV_SHORT:
+                        case TangoConst.Tango_DEV_USHORT:
+                        case TangoConst.Tango_DEV_UCHAR:
+                            scalarEvent.setValue((short) event.getNumberSource().getNumberScalarValue(), null);
+                            break;
+                        case TangoConst.Tango_DEV_LONG:
+                        case TangoConst.Tango_DEV_ULONG:
+                            scalarEvent.setValue((int) event.getNumberSource().getNumberScalarValue(), null);
+                            break;
+                        case TangoConst.Tango_DEV_LONG64:
+                        case TangoConst.Tango_DEV_ULONG64:
+                            scalarEvent.setValue((long) event.getNumberSource().getNumberScalarValue(), null);
+                            break;
+                        case TangoConst.Tango_DEV_DOUBLE:
+                            scalarEvent.setValue(event.getNumberSource().getNumberScalarValue(), null);
+                            break;
+                        case TangoConst.Tango_DEV_FLOAT:
+                            scalarEvent.setValue((float) event.getNumberSource().getNumberScalarValue(), null);
+                            break;
+                        default:
+                            scalarEvent.setValue(event.getNumberSource().getNumberScalarValue(), null);
+                            break;
+                    }
+                } else if (getWritableValue().equals(AttrWriteType.READ_WRITE)) {
+                    switch (scalarEvent.getDataType()) {
+                        case TangoConst.Tango_DEV_SHORT:
+                        case TangoConst.Tango_DEV_USHORT:
+                        case TangoConst.Tango_DEV_UCHAR:
+                            final short[] svalue = new short[2];
+                            svalue[0] = (short) event.getNumberSource().getNumberScalarValue();
+                            svalue[1] = (short) event.getNumberSource().getNumberScalarSetPoint();
+                            scalarEvent.setValue(svalue, null);
+                            break;
+                        case TangoConst.Tango_DEV_LONG:
+                        case TangoConst.Tango_DEV_ULONG:
+                            final int[] ivalue = new int[2];
+                            ivalue[0] = (int) event.getNumberSource().getNumberScalarValue();
+                            ivalue[1] = (int) event.getNumberSource().getNumberScalarSetPoint();
+                            scalarEvent.setValue(ivalue, null);
+                            break;
+                        case TangoConst.Tango_DEV_LONG64:
+                        case TangoConst.Tango_DEV_ULONG64:
+                            final long[] lvalue = new long[2];
+                            lvalue[0] = (long) event.getNumberSource().getNumberScalarValue();
+                            lvalue[1] = (long) event.getNumberSource().getNumberScalarSetPoint();
+                            scalarEvent.setValue(lvalue, null);
+                            break;
+                        case TangoConst.Tango_DEV_FLOAT:
+                            final float[] fvalue = new float[2];
+                            fvalue[0] = (float) event.getNumberSource().getNumberScalarValue();
+                            fvalue[1] = (float) event.getNumberSource().getNumberScalarSetPoint();
+                            scalarEvent.setValue(fvalue, null);
+                            break;
+                        case TangoConst.Tango_DEV_DOUBLE:
+                        default:
+                            final double[] dvalue = new double[2];
+                            dvalue[0] = event.getNumberSource().getNumberScalarValue();
+                            dvalue[1] = event.getNumberSource().getNumberScalarSetPoint();
+                            scalarEvent.setValue(dvalue, null);
+                            break;
+                    }
+                } else {
+                    switch (scalarEvent.getDataType()) {
+                        case TangoConst.Tango_DEV_SHORT:
+                            scalarEvent.setValue((short) event.getNumberSource().getNumberScalarSetPoint(), null);
+                            break;
+                        case TangoConst.Tango_DEV_USHORT:
+                            scalarEvent.setValue((short) event.getNumberSource().getNumberScalarSetPoint(), null);
+                            break;
+                        case TangoConst.Tango_DEV_LONG:
+                            scalarEvent.setValue((int) event.getNumberSource().getNumberScalarSetPoint(), null);
+                            break;
+                        case TangoConst.Tango_DEV_ULONG:
+                            scalarEvent.setValue((int) event.getNumberSource().getNumberScalarSetPoint(), null);
+                            break;
+                        case TangoConst.Tango_DEV_DOUBLE:
+                            scalarEvent.setValue(event.getNumberSource().getNumberScalarSetPoint(), null);
+                            break;
+                        case TangoConst.Tango_DEV_FLOAT:
+                            scalarEvent.setValue((float) event.getNumberSource().getNumberScalarSetPoint(), null);
+                            break;
+                        default:
+                            scalarEvent.setValue(event.getNumberSource().getNumberScalarSetPoint(), null);
+                            break;
+                    }
+                }
+            } catch (final DevFailed devFailed) {
+                registerErrorMessage(attributeName, devFailed);
+                printException(GlobalConst.DATA_TYPE_EXCEPTION, AttrDataFormat._SCALAR,
+                        scalarEvent.getAttributeCompleteName(), devFailed);
+            }
+
+            processEventScalar(scalarEvent, DEFAULT_TRY_NUMBER);
+
+        } else {
+            final String message = "event is null or empty: " + event;
+            System.err.println(message);
+            logger.error(message);
+        }
+    }
+
+    @Override
+    protected void treatErrorEventAfterLogging(ErrorEvent errorEvent) {
+        try {
+            processEventScalar(
+                    getNullValueScalarEvent(errorEvent, ((AAttribute) errorEvent.getSource()).getTangoDataType(),
+                            getWritableValue().value()), DEFAULT_TRY_NUMBER);
+        } catch (final Exception e) {
+            logger.error(this.getClass().getSimpleName() + ".errorChange : during processEventScalar creation execp : "
+                    + e);
+            e.printStackTrace();
+        }
+    }
+
+    @Override
+    public void stateChange(final AttributeStateEvent e) {
+        // TODO Auto-generated method stub
+
+    }
+}
diff --git a/src/main/java/TdbArchiver/Collector/scalar/StateScalar.java b/tdbarchiver/src/main/java/TdbArchiver/Collector/scalar/StateScalar.java
similarity index 97%
rename from src/main/java/TdbArchiver/Collector/scalar/StateScalar.java
rename to tdbarchiver/src/main/java/TdbArchiver/Collector/scalar/StateScalar.java
index 8187498c62c02f604307cccd8a0a50cdfc632d24..30d3a30532abe048a2af3649ea50db7c28f44f1f 100644
--- a/src/main/java/TdbArchiver/Collector/scalar/StateScalar.java
+++ b/tdbarchiver/src/main/java/TdbArchiver/Collector/scalar/StateScalar.java
@@ -1,164 +1,164 @@
-/*
- * Synchrotron Soleil
- * 
- * File : StateScalar.java
- * 
- * Project : TdbArchiver_CVS
- * 
- * Description :
- * 
- * Author : SOLEIL
- * 
- * Original : 10 mars 2006
- * 
- * Revision: Author:
- * Date: State:
- * 
- * Log: StateScalar.java,v
- */
-package TdbArchiver.Collector.scalar;
-
-import org.slf4j.Logger;
-
-import Common.Archiver.Collector.ModesCounters;
-import TdbArchiver.Collector.TdbCollector;
-import TdbArchiver.Collector.TdbModeHandler;
-import TdbArchiver.Collector.Tools.NoRetryException;
-import fr.esrf.Tango.AttrDataFormat;
-import fr.esrf.Tango.AttrWriteType;
-import fr.esrf.Tango.DevFailed;
-import fr.esrf.Tango.ErrSeverity;
-import fr.esrf.TangoApi.StateUtilities;
-import fr.esrf.TangoDs.TangoConst;
-import fr.esrf.TangoDs.Util;
-import fr.esrf.tangoatk.core.AttributeStateEvent;
-import fr.esrf.tangoatk.core.DevStateScalarEvent;
-import fr.esrf.tangoatk.core.ErrorEvent;
-import fr.esrf.tangoatk.core.IDevStateScalar;
-import fr.esrf.tangoatk.core.IDevStateScalarListener;
-import fr.esrf.tangoatk.core.IEntity;
-import fr.soleil.archiving.common.api.exception.ArchivingException;
-import fr.soleil.archiving.common.api.tools.GlobalConst;
-import fr.soleil.archiving.hdbtdb.api.tools.ScalarEvent;
-
-public class StateScalar extends TdbCollector implements IDevStateScalarListener {
-
-    private static final long serialVersionUID = -5522616792702806746L;
-
-    public StateScalar(final TdbModeHandler modeHandler, final String currentDsPath, final String currentDbPath,
-            final AttrWriteType writableType, Logger logger) {
-        super(modeHandler, currentDsPath, currentDbPath, writableType, logger);
-    }
-
-    public void processEventScalar(final ScalarEvent scalarEvent, int try_number) {
-        final boolean timeCondition = super.isDataArchivableTimestampWise(scalarEvent);
-        if (!timeCondition) {
-            return;
-        }
-        String attributeName = scalarEvent.getAttributeCompleteName();
-        try {
-            boolean doArchive = false;
-            if (isFirstValueList.get(attributeName.toLowerCase())) {
-                doArchive = true;
-                isFirstValueList.put(attributeName.toLowerCase(), false);
-                logger.debug(attributeName + " first value, forcing archiving");
-            } else {
-                final ModesCounters mc = getModeCounter(attributeName);
-                if (mc == null) {
-                    logger.error(attributeName + " Attribute Counters unknown");
-                } else {
-                    doArchive = doArchiveEvent(mc, scalarEvent.getDataType(), scalarEvent.getReadValue(),
-                            getLastValue(scalarEvent), attributeName);
-                }
-            }
-
-            if (doArchive) {
-                processFileScalar(scalarEvent);
-            }
-            setLastValue(scalarEvent, scalarEvent.getReadValue());
-        } catch (final Exception e) {
-            registerErrorMessage(attributeName, e.getMessage());
-            if (!(e instanceof NoRetryException)) {
-                try_number--;
-                if (try_number > 0) {
-                    Util.out2.println("StateScalar.processEventScalar : retry " + try_number + "failed...");
-                    processEventScalar(scalarEvent, try_number);
-                }
-            }
-        }
-    }
-
-    protected void printException(final String cause, final int cause_value, final String name,
-            final DevFailed devFailed) {
-        final String message = GlobalConst.ARCHIVING_ERROR_PREFIX + " : " + cause;
-        final String reason = "Failed while executing StateScalar.devStateScalarChange()...";
-        final String desc = cause_value != -1 ? cause + " (" + cause_value + ") not supported !! [" + name + "]"
-                : "Unable to retrieve the attribute data type";
-        Util.out2.println(devFailed == null ? new ArchivingException(message, reason, ErrSeverity.PANIC, desc, "")
-                .toString() : new ArchivingException(message, reason, ErrSeverity.PANIC, desc, "", devFailed)
-                .toString());
-    }
-
-    @Override
-    public void addListeners(final IEntity attribute) throws ArchivingException {
-        if (attribute instanceof IDevStateScalar) {
-            ((IDevStateScalar) attribute).addDevStateScalarListener(this);
-            ((IDevStateScalar) attribute).addErrorListener(this);
-        }
-    }
-
-    @Override
-    public void removeListeners(final IEntity attribute) throws ArchivingException {
-        if (attribute instanceof IDevStateScalar) {
-            ((IDevStateScalar) attribute).removeDevStateScalarListener(this);
-            ((IDevStateScalar) attribute).removeErrorListener(this);
-        }
-    }
-
-    @Override
-    public void stateChange(final AttributeStateEvent e) {
-    }
-
-    @Override
-    public void devStateScalarChange(final DevStateScalarEvent event) {
-        if (event != null && event.getSource() != null) {
-            final ScalarEvent scalarEvent = new ScalarEvent();
-            String attributeName = ((IDevStateScalar) event.getSource()).getName();
-            removeErrorMessage(attributeName);
-            scalarEvent.setAttributeCompleteName(attributeName);
-            try {
-                scalarEvent.setDataFormat(AttrDataFormat._SCALAR);
-                scalarEvent.setWritable(getWritableValue().value());
-                scalarEvent.setDataType(((IDevStateScalar) event.getSource()).getAttribute().getType());
-
-                scalarEvent.setTimeStamp(event.getTimeStamp());
-
-                final String value = ((IDevStateScalar) event.getSource()).getValue();
-                scalarEvent.setValue(StateUtilities.getStateForName(value), null);
-                processEventScalar(scalarEvent, DEFAULT_TRY_NUMBER);
-
-            } catch (final DevFailed devFailed) {
-                registerErrorMessage(attributeName, devFailed);
-                printException(GlobalConst.DATA_TYPE_EXCEPTION, AttrDataFormat._SCALAR,
-                        scalarEvent.getAttributeCompleteName(), devFailed);
-            }
-        } else {
-            final String message = "event is null or empty: " + event;
-            System.err.println(message);
-            logger.error(message);
-        }
-    }
-
-    @Override
-    protected void treatErrorEventAfterLogging(ErrorEvent errorEvent) {
-        try {
-            processEventScalar(
-                    getNullValueScalarEvent(errorEvent, TangoConst.Tango_DEV_STATE, getWritableValue().value()),
-                    DEFAULT_TRY_NUMBER);
-        } catch (final Exception e) {
-            logger.error(this.getClass().getSimpleName() + ".errorChange : during processEventScalar creation execp : "
-                    + e);
-            e.printStackTrace();
-        }
-    }
-}
+/*
+ * Synchrotron Soleil
+ * 
+ * File : StateScalar.java
+ * 
+ * Project : TdbArchiver_CVS
+ * 
+ * Description :
+ * 
+ * Author : SOLEIL
+ * 
+ * Original : 10 mars 2006
+ * 
+ * Revision: Author:
+ * Date: State:
+ * 
+ * Log: StateScalar.java,v
+ */
+package TdbArchiver.Collector.scalar;
+
+import org.slf4j.Logger;
+
+import Common.Archiver.Collector.ModesCounters;
+import TdbArchiver.Collector.TdbCollector;
+import TdbArchiver.Collector.TdbModeHandler;
+import TdbArchiver.Collector.Tools.NoRetryException;
+import fr.esrf.Tango.AttrDataFormat;
+import fr.esrf.Tango.AttrWriteType;
+import fr.esrf.Tango.DevFailed;
+import fr.esrf.Tango.ErrSeverity;
+import fr.esrf.TangoApi.StateUtilities;
+import fr.esrf.TangoDs.TangoConst;
+import fr.esrf.TangoDs.Util;
+import fr.esrf.tangoatk.core.AttributeStateEvent;
+import fr.esrf.tangoatk.core.DevStateScalarEvent;
+import fr.esrf.tangoatk.core.ErrorEvent;
+import fr.esrf.tangoatk.core.IDevStateScalar;
+import fr.esrf.tangoatk.core.IDevStateScalarListener;
+import fr.esrf.tangoatk.core.IEntity;
+import fr.soleil.archiving.common.api.exception.ArchivingException;
+import fr.soleil.archiving.common.api.tools.GlobalConst;
+import fr.soleil.archiving.hdbtdb.api.tools.ScalarEvent;
+
+public class StateScalar extends TdbCollector implements IDevStateScalarListener {
+
+    private static final long serialVersionUID = -5522616792702806746L;
+
+    public StateScalar(final TdbModeHandler modeHandler, final String currentDsPath, final String currentDbPath,
+            final AttrWriteType writableType, Logger logger) {
+        super(modeHandler, currentDsPath, currentDbPath, writableType, logger);
+    }
+
+    public void processEventScalar(final ScalarEvent scalarEvent, int try_number) {
+        final boolean timeCondition = super.isDataArchivableTimestampWise(scalarEvent);
+        if (!timeCondition) {
+            return;
+        }
+        String attributeName = scalarEvent.getAttributeCompleteName();
+        try {
+            boolean doArchive = false;
+            if (isFirstValueList.get(attributeName.toLowerCase())) {
+                doArchive = true;
+                isFirstValueList.put(attributeName.toLowerCase(), false);
+                logger.debug(attributeName + " first value, forcing archiving");
+            } else {
+                final ModesCounters mc = getModeCounter(attributeName);
+                if (mc == null) {
+                    logger.error(attributeName + " Attribute Counters unknown");
+                } else {
+                    doArchive = doArchiveEvent(mc, scalarEvent.getDataType(), scalarEvent.getReadValue(),
+                            getLastValue(scalarEvent), attributeName);
+                }
+            }
+
+            if (doArchive) {
+                processFileScalar(scalarEvent);
+            }
+            setLastValue(scalarEvent, scalarEvent.getReadValue());
+        } catch (final Exception e) {
+            registerErrorMessage(attributeName, e.getMessage());
+            if (!(e instanceof NoRetryException)) {
+                try_number--;
+                if (try_number > 0) {
+                    Util.out2.println("StateScalar.processEventScalar : retry " + try_number + "failed...");
+                    processEventScalar(scalarEvent, try_number);
+                }
+            }
+        }
+    }
+
+    protected void printException(final String cause, final int cause_value, final String name,
+            final DevFailed devFailed) {
+        final String message = GlobalConst.ARCHIVING_ERROR_PREFIX + " : " + cause;
+        final String reason = "Failed while executing StateScalar.devStateScalarChange()...";
+        final String desc = cause_value != -1 ? cause + " (" + cause_value + ") not supported !! [" + name + "]"
+                : "Unable to retrieve the attribute data type";
+        Util.out2.println(devFailed == null ? new ArchivingException(message, reason, ErrSeverity.PANIC, desc, "")
+                .toString() : new ArchivingException(message, reason, ErrSeverity.PANIC, desc, "", devFailed)
+                .toString());
+    }
+
+    @Override
+    public void addListeners(final IEntity attribute) throws ArchivingException {
+        if (attribute instanceof IDevStateScalar) {
+            ((IDevStateScalar) attribute).addDevStateScalarListener(this);
+            ((IDevStateScalar) attribute).addErrorListener(this);
+        }
+    }
+
+    @Override
+    public void removeListeners(final IEntity attribute) throws ArchivingException {
+        if (attribute instanceof IDevStateScalar) {
+            ((IDevStateScalar) attribute).removeDevStateScalarListener(this);
+            ((IDevStateScalar) attribute).removeErrorListener(this);
+        }
+    }
+
+    @Override
+    public void stateChange(final AttributeStateEvent e) {
+    }
+
+    @Override
+    public void devStateScalarChange(final DevStateScalarEvent event) {
+        if (event != null && event.getSource() != null) {
+            final ScalarEvent scalarEvent = new ScalarEvent();
+            String attributeName = ((IDevStateScalar) event.getSource()).getName();
+            removeErrorMessage(attributeName);
+            scalarEvent.setAttributeCompleteName(attributeName);
+            try {
+                scalarEvent.setDataFormat(AttrDataFormat._SCALAR);
+                scalarEvent.setWritable(getWritableValue().value());
+                scalarEvent.setDataType(((IDevStateScalar) event.getSource()).getAttribute().getType());
+
+                scalarEvent.setTimeStamp(event.getTimeStamp());
+
+                final String value = ((IDevStateScalar) event.getSource()).getValue();
+                scalarEvent.setValue(StateUtilities.getStateForName(value), null);
+                processEventScalar(scalarEvent, DEFAULT_TRY_NUMBER);
+
+            } catch (final DevFailed devFailed) {
+                registerErrorMessage(attributeName, devFailed);
+                printException(GlobalConst.DATA_TYPE_EXCEPTION, AttrDataFormat._SCALAR,
+                        scalarEvent.getAttributeCompleteName(), devFailed);
+            }
+        } else {
+            final String message = "event is null or empty: " + event;
+            System.err.println(message);
+            logger.error(message);
+        }
+    }
+
+    @Override
+    protected void treatErrorEventAfterLogging(ErrorEvent errorEvent) {
+        try {
+            processEventScalar(
+                    getNullValueScalarEvent(errorEvent, TangoConst.Tango_DEV_STATE, getWritableValue().value()),
+                    DEFAULT_TRY_NUMBER);
+        } catch (final Exception e) {
+            logger.error(this.getClass().getSimpleName() + ".errorChange : during processEventScalar creation execp : "
+                    + e);
+            e.printStackTrace();
+        }
+    }
+}
diff --git a/src/main/java/TdbArchiver/Collector/scalar/StringScalar.java b/tdbarchiver/src/main/java/TdbArchiver/Collector/scalar/StringScalar.java
similarity index 97%
rename from src/main/java/TdbArchiver/Collector/scalar/StringScalar.java
rename to tdbarchiver/src/main/java/TdbArchiver/Collector/scalar/StringScalar.java
index 7101d8c506f270e6eed520bcf886da3f3eb0eecb..4a55a5a8eea41583e02c5688534b9ce945327194 100644
--- a/src/main/java/TdbArchiver/Collector/scalar/StringScalar.java
+++ b/tdbarchiver/src/main/java/TdbArchiver/Collector/scalar/StringScalar.java
@@ -1,175 +1,175 @@
-/*
- * Synchrotron Soleil
- * 
- * File : StringScalar.java
- * 
- * Project : TdbArchiver_CVS
- * 
- * Description :
- * 
- * Author : SOLEIL
- * 
- * Original : 28 f�vr. 2006
- * 
- * Revision: Author:
- * Date: State:
- * 
- * Log: StringScalar.java,v
- */
-package TdbArchiver.Collector.scalar;
-
-import org.slf4j.Logger;
-
-import Common.Archiver.Collector.ModesCounters;
-import TdbArchiver.Collector.TdbCollector;
-import TdbArchiver.Collector.TdbModeHandler;
-import TdbArchiver.Collector.Tools.NoRetryException;
-import fr.esrf.Tango.AttrDataFormat;
-import fr.esrf.Tango.AttrWriteType;
-import fr.esrf.Tango.DevFailed;
-import fr.esrf.Tango.ErrSeverity;
-import fr.esrf.TangoDs.TangoConst;
-import fr.esrf.TangoDs.Util;
-import fr.esrf.tangoatk.core.AttributeStateEvent;
-import fr.esrf.tangoatk.core.ErrorEvent;
-import fr.esrf.tangoatk.core.IEntity;
-import fr.esrf.tangoatk.core.IStringScalar;
-import fr.esrf.tangoatk.core.IStringScalarListener;
-import fr.esrf.tangoatk.core.StringScalarEvent;
-import fr.soleil.archiving.common.api.exception.ArchivingException;
-import fr.soleil.archiving.common.api.tools.GlobalConst;
-import fr.soleil.archiving.hdbtdb.api.tools.ScalarEvent;
-
-public class StringScalar extends TdbCollector implements IStringScalarListener {
-
-    private static final long serialVersionUID = -715278918992422328L;
-
-    public StringScalar(final TdbModeHandler modeHandler, final String currentDsPath, final String currentDbPath,
-            final AttrWriteType writableType, Logger logger) {
-        super(modeHandler, currentDsPath, currentDbPath, writableType, logger);
-    }
-
-    @Override
-    public void addListeners(final IEntity attribute) throws ArchivingException {
-        if (attribute instanceof IStringScalar) {
-            ((IStringScalar) attribute).addStringScalarListener(this);
-            ((IStringScalar) attribute).addErrorListener(this);
-        }
-    }
-
-    @Override
-    public void removeListeners(final IEntity attribute) throws ArchivingException {
-        if (attribute instanceof IStringScalar) {
-            ((IStringScalar) attribute).removeStringScalarListener(this);
-            ((IStringScalar) attribute).removeErrorListener(this);
-        }
-    }
-
-    @Override
-    public void stateChange(final AttributeStateEvent e) {
-    }
-
-    public void processEventScalar(final ScalarEvent scalarEvent, int try_number) {
-        if (isDataArchivableTimestampWise(scalarEvent)) {
-            String attributeName = scalarEvent.getAttributeCompleteName();
-            try {
-                boolean doArchive = false;
-                if (isFirstValueList.get(attributeName.toLowerCase())) {
-                    doArchive = true;
-                    isFirstValueList.put(attributeName.toLowerCase(), false);
-                    logger.debug(attributeName + " first value, forcing archiving");
-                } else {
-
-                    final ModesCounters mc = getModeCounter(attributeName);
-                    if (mc == null) {
-                        logger.error(attributeName + " Attribute Counters unknown");
-                    } else {
-                        doArchive = doArchiveEvent(mc, scalarEvent.getDataType(), scalarEvent.getReadValue(),
-                                getLastValue(scalarEvent), attributeName);
-                    }
-                }
-
-                if (doArchive) {
-                    processFileScalar(scalarEvent);
-                }
-                setLastValue(scalarEvent, scalarEvent.getReadValue());
-            } catch (final Exception e) {
-                registerErrorMessage(attributeName, e.getMessage());
-                e.printStackTrace();
-                if (!(e instanceof NoRetryException)) {
-                    try_number--;
-                    if (try_number > 0) {
-                        Util.out2.println("StringScalar.processEventScalar : retry " + try_number + "failed...");
-                        processEventScalar(scalarEvent, try_number);
-                    }
-                }
-            }
-        }
-    }
-
-    protected void printException(final String cause, final int cause_value, final String name,
-            final DevFailed devFailed) {
-        final String message = GlobalConst.ARCHIVING_ERROR_PREFIX + " : " + cause;
-        final String reason = "Failed while executing StringScalar.stringScalarChange()...";
-        final String desc = cause_value != -1 ? cause + " (" + cause_value + ") not supported !! [" + name + "]"
-                : "Unable to retrieve the attribute data type";
-        Util.out2.println(devFailed == null ? new ArchivingException(message, reason, ErrSeverity.PANIC, desc, "")
-                .toString() : new ArchivingException(message, reason, ErrSeverity.PANIC, desc, "", devFailed)
-                .toString());
-    }
-
-    @Override
-    public void stringScalarChange(final StringScalarEvent event) {
-        if (event != null && event.getSource() != null) {
-            final ScalarEvent scalarEvent = new ScalarEvent();
-            String attributeName = ((IStringScalar) event.getSource()).getName();
-            removeErrorMessage(attributeName);
-            scalarEvent.setAttributeCompleteName(attributeName);
-
-            try {
-                scalarEvent.setDataFormat(AttrDataFormat._SCALAR);
-                scalarEvent.setWritable(getWritableValue().value());
-                scalarEvent.setDataType(((IStringScalar) event.getSource()).getAttribute().getType());
-                scalarEvent.setTimeStamp(event.getTimeStamp());
-
-                if (getWritableValue().equals(AttrWriteType.READ)) {
-                    final String value = ((IStringScalar) event.getSource()).getStringValue();
-                    scalarEvent.setValue(value, null);
-                } else if (getWritableValue().equals(AttrWriteType.READ_WRITE)) {
-                    final String[] svalue = new String[2];
-                    svalue[0] = ((IStringScalar) event.getSource()).getStringValue();
-                    svalue[1] = ((IStringScalar) event.getSource()).getStringSetPoint();
-                    scalarEvent.setValue(svalue, null);
-                } else {
-                    final String value = ((IStringScalar) event.getSource()).getStringSetPoint();
-                    scalarEvent.setValue(value, null);
-                }
-
-                processEventScalar(scalarEvent, DEFAULT_TRY_NUMBER);
-
-            } catch (final DevFailed devFailed) {
-                registerErrorMessage(attributeName, devFailed);
-                printException(GlobalConst.DATA_TYPE_EXCEPTION, AttrDataFormat._SCALAR,
-                        scalarEvent.getAttributeCompleteName(), devFailed);
-            }
-        } else {
-            final String message = "event is null or empty: " + event;
-            System.err.println(message);
-            logger.error(message);
-        }
-
-    }
-
-    @Override
-    protected void treatErrorEventAfterLogging(ErrorEvent errorEvent) {
-        try {
-            processEventScalar(
-                    getNullValueScalarEvent(errorEvent, TangoConst.Tango_DEV_STRING, getWritableValue().value()),
-                    DEFAULT_TRY_NUMBER);
-        } catch (final Exception e) {
-            logger.error(this.getClass().getSimpleName() + ".errorChange : during processEventScalar creation execp : "
-                    + e);
-            e.printStackTrace();
-        }
-    }
-}
+/*
+ * Synchrotron Soleil
+ * 
+ * File : StringScalar.java
+ * 
+ * Project : TdbArchiver_CVS
+ * 
+ * Description :
+ * 
+ * Author : SOLEIL
+ * 
+ * Original : 28 f�vr. 2006
+ * 
+ * Revision: Author:
+ * Date: State:
+ * 
+ * Log: StringScalar.java,v
+ */
+package TdbArchiver.Collector.scalar;
+
+import org.slf4j.Logger;
+
+import Common.Archiver.Collector.ModesCounters;
+import TdbArchiver.Collector.TdbCollector;
+import TdbArchiver.Collector.TdbModeHandler;
+import TdbArchiver.Collector.Tools.NoRetryException;
+import fr.esrf.Tango.AttrDataFormat;
+import fr.esrf.Tango.AttrWriteType;
+import fr.esrf.Tango.DevFailed;
+import fr.esrf.Tango.ErrSeverity;
+import fr.esrf.TangoDs.TangoConst;
+import fr.esrf.TangoDs.Util;
+import fr.esrf.tangoatk.core.AttributeStateEvent;
+import fr.esrf.tangoatk.core.ErrorEvent;
+import fr.esrf.tangoatk.core.IEntity;
+import fr.esrf.tangoatk.core.IStringScalar;
+import fr.esrf.tangoatk.core.IStringScalarListener;
+import fr.esrf.tangoatk.core.StringScalarEvent;
+import fr.soleil.archiving.common.api.exception.ArchivingException;
+import fr.soleil.archiving.common.api.tools.GlobalConst;
+import fr.soleil.archiving.hdbtdb.api.tools.ScalarEvent;
+
+public class StringScalar extends TdbCollector implements IStringScalarListener {
+
+    private static final long serialVersionUID = -715278918992422328L;
+
+    public StringScalar(final TdbModeHandler modeHandler, final String currentDsPath, final String currentDbPath,
+            final AttrWriteType writableType, Logger logger) {
+        super(modeHandler, currentDsPath, currentDbPath, writableType, logger);
+    }
+
+    @Override
+    public void addListeners(final IEntity attribute) throws ArchivingException {
+        if (attribute instanceof IStringScalar) {
+            ((IStringScalar) attribute).addStringScalarListener(this);
+            ((IStringScalar) attribute).addErrorListener(this);
+        }
+    }
+
+    @Override
+    public void removeListeners(final IEntity attribute) throws ArchivingException {
+        if (attribute instanceof IStringScalar) {
+            ((IStringScalar) attribute).removeStringScalarListener(this);
+            ((IStringScalar) attribute).removeErrorListener(this);
+        }
+    }
+
+    @Override
+    public void stateChange(final AttributeStateEvent e) {
+    }
+
+    public void processEventScalar(final ScalarEvent scalarEvent, int try_number) {
+        if (isDataArchivableTimestampWise(scalarEvent)) {
+            String attributeName = scalarEvent.getAttributeCompleteName();
+            try {
+                boolean doArchive = false;
+                if (isFirstValueList.get(attributeName.toLowerCase())) {
+                    doArchive = true;
+                    isFirstValueList.put(attributeName.toLowerCase(), false);
+                    logger.debug(attributeName + " first value, forcing archiving");
+                } else {
+
+                    final ModesCounters mc = getModeCounter(attributeName);
+                    if (mc == null) {
+                        logger.error(attributeName + " Attribute Counters unknown");
+                    } else {
+                        doArchive = doArchiveEvent(mc, scalarEvent.getDataType(), scalarEvent.getReadValue(),
+                                getLastValue(scalarEvent), attributeName);
+                    }
+                }
+
+                if (doArchive) {
+                    processFileScalar(scalarEvent);
+                }
+                setLastValue(scalarEvent, scalarEvent.getReadValue());
+            } catch (final Exception e) {
+                registerErrorMessage(attributeName, e.getMessage());
+                e.printStackTrace();
+                if (!(e instanceof NoRetryException)) {
+                    try_number--;
+                    if (try_number > 0) {
+                        Util.out2.println("StringScalar.processEventScalar : retry " + try_number + "failed...");
+                        processEventScalar(scalarEvent, try_number);
+                    }
+                }
+            }
+        }
+    }
+
+    protected void printException(final String cause, final int cause_value, final String name,
+            final DevFailed devFailed) {
+        final String message = GlobalConst.ARCHIVING_ERROR_PREFIX + " : " + cause;
+        final String reason = "Failed while executing StringScalar.stringScalarChange()...";
+        final String desc = cause_value != -1 ? cause + " (" + cause_value + ") not supported !! [" + name + "]"
+                : "Unable to retrieve the attribute data type";
+        Util.out2.println(devFailed == null ? new ArchivingException(message, reason, ErrSeverity.PANIC, desc, "")
+                .toString() : new ArchivingException(message, reason, ErrSeverity.PANIC, desc, "", devFailed)
+                .toString());
+    }
+
+    @Override
+    public void stringScalarChange(final StringScalarEvent event) {
+        if (event != null && event.getSource() != null) {
+            final ScalarEvent scalarEvent = new ScalarEvent();
+            String attributeName = ((IStringScalar) event.getSource()).getName();
+            removeErrorMessage(attributeName);
+            scalarEvent.setAttributeCompleteName(attributeName);
+
+            try {
+                scalarEvent.setDataFormat(AttrDataFormat._SCALAR);
+                scalarEvent.setWritable(getWritableValue().value());
+                scalarEvent.setDataType(((IStringScalar) event.getSource()).getAttribute().getType());
+                scalarEvent.setTimeStamp(event.getTimeStamp());
+
+                if (getWritableValue().equals(AttrWriteType.READ)) {
+                    final String value = ((IStringScalar) event.getSource()).getStringValue();
+                    scalarEvent.setValue(value, null);
+                } else if (getWritableValue().equals(AttrWriteType.READ_WRITE)) {
+                    final String[] svalue = new String[2];
+                    svalue[0] = ((IStringScalar) event.getSource()).getStringValue();
+                    svalue[1] = ((IStringScalar) event.getSource()).getStringSetPoint();
+                    scalarEvent.setValue(svalue, null);
+                } else {
+                    final String value = ((IStringScalar) event.getSource()).getStringSetPoint();
+                    scalarEvent.setValue(value, null);
+                }
+
+                processEventScalar(scalarEvent, DEFAULT_TRY_NUMBER);
+
+            } catch (final DevFailed devFailed) {
+                registerErrorMessage(attributeName, devFailed);
+                printException(GlobalConst.DATA_TYPE_EXCEPTION, AttrDataFormat._SCALAR,
+                        scalarEvent.getAttributeCompleteName(), devFailed);
+            }
+        } else {
+            final String message = "event is null or empty: " + event;
+            System.err.println(message);
+            logger.error(message);
+        }
+
+    }
+
+    @Override
+    protected void treatErrorEventAfterLogging(ErrorEvent errorEvent) {
+        try {
+            processEventScalar(
+                    getNullValueScalarEvent(errorEvent, TangoConst.Tango_DEV_STRING, getWritableValue().value()),
+                    DEFAULT_TRY_NUMBER);
+        } catch (final Exception e) {
+            logger.error(this.getClass().getSimpleName() + ".errorChange : during processEventScalar creation execp : "
+                    + e);
+            e.printStackTrace();
+        }
+    }
+}
diff --git a/src/main/java/TdbArchiver/Collector/spectrum/BooleanSpectrum.java b/tdbarchiver/src/main/java/TdbArchiver/Collector/spectrum/BooleanSpectrum.java
similarity index 97%
rename from src/main/java/TdbArchiver/Collector/spectrum/BooleanSpectrum.java
rename to tdbarchiver/src/main/java/TdbArchiver/Collector/spectrum/BooleanSpectrum.java
index c798e4d3cf1290462b95a340ad8c1f51c97cdc61..d75250ba1aada81641e8a12b3ecd2fd77a0822ca 100644
--- a/src/main/java/TdbArchiver/Collector/spectrum/BooleanSpectrum.java
+++ b/tdbarchiver/src/main/java/TdbArchiver/Collector/spectrum/BooleanSpectrum.java
@@ -1,138 +1,138 @@
-package TdbArchiver.Collector.spectrum;
-
-import org.slf4j.Logger;
-
-import TdbArchiver.Collector.TdbCollector;
-import TdbArchiver.Collector.TdbModeHandler;
-import fr.esrf.Tango.AttrWriteType;
-import fr.esrf.Tango.DevFailed;
-import fr.esrf.TangoDs.Except;
-import fr.esrf.TangoDs.Util;
-import fr.esrf.tangoatk.core.AttributeStateEvent;
-import fr.esrf.tangoatk.core.BooleanSpectrumEvent;
-import fr.esrf.tangoatk.core.ErrorEvent;
-import fr.esrf.tangoatk.core.IBooleanSpectrum;
-import fr.esrf.tangoatk.core.IBooleanSpectrumListener;
-import fr.esrf.tangoatk.core.IEntity;
-import fr.soleil.archiving.common.api.exception.ArchivingException;
-import fr.soleil.archiving.hdbtdb.api.tools.SpectrumEvent_RO;
-import fr.soleil.archiving.hdbtdb.api.tools.SpectrumEvent_RW;
-
-public class BooleanSpectrum extends TdbCollector implements IBooleanSpectrumListener {
-
-    private static final long serialVersionUID = -81167565700285692L;
-
-    public BooleanSpectrum(final TdbModeHandler modeHandler, final String currentDsPath, final String currentDbPath,
-            final AttrWriteType writableType, Logger logger) {
-        super(modeHandler, currentDsPath, currentDbPath, writableType, logger);
-    }
-
-    @Override
-    public void addListeners(final IEntity attribute) throws ArchivingException {
-        if (attribute instanceof IBooleanSpectrum) {
-            ((IBooleanSpectrum) attribute).addBooleanSpectrumListener(this);
-            ((IBooleanSpectrum) attribute).addErrorListener(this);
-        }
-    }
-
-    @Override
-    public void removeListeners(final IEntity attribute) throws ArchivingException {
-        if (attribute instanceof IBooleanSpectrum) {
-            ((IBooleanSpectrum) attribute).removeBooleanSpectrumListener(this);
-            ((IBooleanSpectrum) attribute).removeErrorListener(this);
-        }
-    }
-
-    @Override
-    protected void treatErrorEventAfterLogging(ErrorEvent errorEvent) {
-        final boolean[] value = null;
-        final SpectrumEvent_RO spectrumEvent_ro = new SpectrumEvent_RO();
-        spectrumEvent_ro.setAttributeCompleteName(((IBooleanSpectrum) errorEvent.getSource()).getName());
-        spectrumEvent_ro.setTimeStamp(errorEvent.getTimeStamp());
-        spectrumEvent_ro.setValue(value, null);
-        processEventSpectrum(spectrumEvent_ro, DEFAULT_TRY_NUMBER);
-    }
-
-    @Override
-    public void booleanSpectrumChange(final BooleanSpectrumEvent event) {
-        IBooleanSpectrum eventSrc = (IBooleanSpectrum) event.getSource();
-        String attributeName = eventSrc.getName();
-        final boolean[] spectrumvalueR = eventSrc.getValue();
-        final boolean[] spectrumvalueW = eventSrc.getSetPoint();
-        boolean[] value = null;
-        removeErrorMessage(attributeName);
-        if (spectrumvalueR != null) {
-            if (getWritableValue().equals(AttrWriteType.READ)) {
-                value = new boolean[spectrumvalueR.length];
-            } else {
-                value = new boolean[spectrumvalueR.length + spectrumvalueW.length];
-            }
-            System.arraycopy(spectrumvalueR, 0, value, 0, spectrumvalueR.length);
-            if (!getWritableValue().equals(AttrWriteType.READ)) {
-                System.arraycopy(spectrumvalueW, 0, value, spectrumvalueR.length, spectrumvalueW.length);
-            }
-        }
-
-        try {
-            if (getWritableValue().equals(AttrWriteType.READ)) {
-                final SpectrumEvent_RO spectrumEvent_ro = new SpectrumEvent_RO();
-                spectrumEvent_ro.setAttributeCompleteName(attributeName);
-                spectrumEvent_ro.setDimX(value.length);
-                spectrumEvent_ro.setTimeStamp(event.getTimeStamp());
-                spectrumEvent_ro.setValue(value, null);
-                spectrumEvent_ro.setDataType(eventSrc.getAttribute().getType());
-                processEventSpectrum(spectrumEvent_ro, DEFAULT_TRY_NUMBER);
-            } else {
-                final SpectrumEvent_RW spectrumEvent_rw = new SpectrumEvent_RW();
-                spectrumEvent_rw.setAttributeCompleteName(attributeName);
-                spectrumEvent_rw.setDataType(eventSrc.getAttribute().getType());
-                spectrumEvent_rw.setTimeStamp(event.getTimeStamp());
-                spectrumEvent_rw.setValue(value, null);
-                processEventSpectrum(spectrumEvent_rw, DEFAULT_TRY_NUMBER);
-            }
-
-        } catch (final DevFailed devFailed) {
-            registerErrorMessage(attributeName, devFailed);
-            Except.print_exception(devFailed);
-        }
-
-    }
-
-    @Override
-    public void stateChange(final AttributeStateEvent event) {
-    }
-
-    public void processEventSpectrum(final SpectrumEvent_RO event, final int try_number) {
-        Util.out4.println("BooleanSpectrum_RO.processEventSpectrum");
-        if (isDataArchivableTimestampWise(event)) {
-            final String attributeName = event.getAttributeCompleteName();
-            try {
-                processFileSpectrum(event);
-                super.setLastTimestamp(event);
-            } catch (final Exception e) {
-                registerErrorMessage(attributeName, e.getMessage());
-                Util.out2.println("ERROR !! " + "\r\n" + "\t Origin : \t " + "BooleanSpectrum_RO.processEventSpectrum"
-                        + "\r\n" + "\t Reason : \t " + e.getClass().getName() + "\r\n" + "\t Description : \t "
-                        + e.getMessage() + "\r\n" + "\t Additional information : \t " + "" + "\r\n");
-                e.printStackTrace();
-            }
-        }
-    }
-
-    public void processEventSpectrum(final SpectrumEvent_RW event, final int try_number) {
-        Util.out4.println("BooleanSpectrum_RW.processEventSpectrum");
-        if (isDataArchivableTimestampWise(event)) {
-            final String attributeName = event.getAttributeCompleteName();
-            try {
-                processFileSpectrum(event);
-                super.setLastTimestamp(event);
-            } catch (final Exception e) {
-                registerErrorMessage(attributeName, e.getMessage());
-                Util.out2.println("ERROR !! " + "\r\n" + "\t Origin : \t " + "BooleanSpectrum_RW.processEventSpectrum"
-                        + "\r\n" + "\t Reason : \t " + e.getClass().getName() + "\r\n" + "\t Description : \t "
-                        + e.getMessage() + "\r\n" + "\t Additional information : \t " + "" + "\r\n");
-                e.printStackTrace();
-            }
-        }
-    }
+package TdbArchiver.Collector.spectrum;
+
+import org.slf4j.Logger;
+
+import TdbArchiver.Collector.TdbCollector;
+import TdbArchiver.Collector.TdbModeHandler;
+import fr.esrf.Tango.AttrWriteType;
+import fr.esrf.Tango.DevFailed;
+import fr.esrf.TangoDs.Except;
+import fr.esrf.TangoDs.Util;
+import fr.esrf.tangoatk.core.AttributeStateEvent;
+import fr.esrf.tangoatk.core.BooleanSpectrumEvent;
+import fr.esrf.tangoatk.core.ErrorEvent;
+import fr.esrf.tangoatk.core.IBooleanSpectrum;
+import fr.esrf.tangoatk.core.IBooleanSpectrumListener;
+import fr.esrf.tangoatk.core.IEntity;
+import fr.soleil.archiving.common.api.exception.ArchivingException;
+import fr.soleil.archiving.hdbtdb.api.tools.SpectrumEvent_RO;
+import fr.soleil.archiving.hdbtdb.api.tools.SpectrumEvent_RW;
+
+public class BooleanSpectrum extends TdbCollector implements IBooleanSpectrumListener {
+
+    private static final long serialVersionUID = -81167565700285692L;
+
+    public BooleanSpectrum(final TdbModeHandler modeHandler, final String currentDsPath, final String currentDbPath,
+            final AttrWriteType writableType, Logger logger) {
+        super(modeHandler, currentDsPath, currentDbPath, writableType, logger);
+    }
+
+    @Override
+    public void addListeners(final IEntity attribute) throws ArchivingException {
+        if (attribute instanceof IBooleanSpectrum) {
+            ((IBooleanSpectrum) attribute).addBooleanSpectrumListener(this);
+            ((IBooleanSpectrum) attribute).addErrorListener(this);
+        }
+    }
+
+    @Override
+    public void removeListeners(final IEntity attribute) throws ArchivingException {
+        if (attribute instanceof IBooleanSpectrum) {
+            ((IBooleanSpectrum) attribute).removeBooleanSpectrumListener(this);
+            ((IBooleanSpectrum) attribute).removeErrorListener(this);
+        }
+    }
+
+    @Override
+    protected void treatErrorEventAfterLogging(ErrorEvent errorEvent) {
+        final boolean[] value = null;
+        final SpectrumEvent_RO spectrumEvent_ro = new SpectrumEvent_RO();
+        spectrumEvent_ro.setAttributeCompleteName(((IBooleanSpectrum) errorEvent.getSource()).getName());
+        spectrumEvent_ro.setTimeStamp(errorEvent.getTimeStamp());
+        spectrumEvent_ro.setValue(value, null);
+        processEventSpectrum(spectrumEvent_ro, DEFAULT_TRY_NUMBER);
+    }
+
+    @Override
+    public void booleanSpectrumChange(final BooleanSpectrumEvent event) {
+        IBooleanSpectrum eventSrc = (IBooleanSpectrum) event.getSource();
+        String attributeName = eventSrc.getName();
+        final boolean[] spectrumvalueR = eventSrc.getValue();
+        final boolean[] spectrumvalueW = eventSrc.getSetPoint();
+        boolean[] value = null;
+        removeErrorMessage(attributeName);
+        if (spectrumvalueR != null) {
+            if (getWritableValue().equals(AttrWriteType.READ)) {
+                value = new boolean[spectrumvalueR.length];
+            } else {
+                value = new boolean[spectrumvalueR.length + spectrumvalueW.length];
+            }
+            System.arraycopy(spectrumvalueR, 0, value, 0, spectrumvalueR.length);
+            if (!getWritableValue().equals(AttrWriteType.READ)) {
+                System.arraycopy(spectrumvalueW, 0, value, spectrumvalueR.length, spectrumvalueW.length);
+            }
+        }
+
+        try {
+            if (getWritableValue().equals(AttrWriteType.READ)) {
+                final SpectrumEvent_RO spectrumEvent_ro = new SpectrumEvent_RO();
+                spectrumEvent_ro.setAttributeCompleteName(attributeName);
+                spectrumEvent_ro.setDimX(value.length);
+                spectrumEvent_ro.setTimeStamp(event.getTimeStamp());
+                spectrumEvent_ro.setValue(value, null);
+                spectrumEvent_ro.setDataType(eventSrc.getAttribute().getType());
+                processEventSpectrum(spectrumEvent_ro, DEFAULT_TRY_NUMBER);
+            } else {
+                final SpectrumEvent_RW spectrumEvent_rw = new SpectrumEvent_RW();
+                spectrumEvent_rw.setAttributeCompleteName(attributeName);
+                spectrumEvent_rw.setDataType(eventSrc.getAttribute().getType());
+                spectrumEvent_rw.setTimeStamp(event.getTimeStamp());
+                spectrumEvent_rw.setValue(value, null);
+                processEventSpectrum(spectrumEvent_rw, DEFAULT_TRY_NUMBER);
+            }
+
+        } catch (final DevFailed devFailed) {
+            registerErrorMessage(attributeName, devFailed);
+            Except.print_exception(devFailed);
+        }
+
+    }
+
+    @Override
+    public void stateChange(final AttributeStateEvent event) {
+    }
+
+    public void processEventSpectrum(final SpectrumEvent_RO event, final int try_number) {
+        Util.out4.println("BooleanSpectrum_RO.processEventSpectrum");
+        if (isDataArchivableTimestampWise(event)) {
+            final String attributeName = event.getAttributeCompleteName();
+            try {
+                processFileSpectrum(event);
+                super.setLastTimestamp(event);
+            } catch (final Exception e) {
+                registerErrorMessage(attributeName, e.getMessage());
+                Util.out2.println("ERROR !! " + "\r\n" + "\t Origin : \t " + "BooleanSpectrum_RO.processEventSpectrum"
+                        + "\r\n" + "\t Reason : \t " + e.getClass().getName() + "\r\n" + "\t Description : \t "
+                        + e.getMessage() + "\r\n" + "\t Additional information : \t " + "" + "\r\n");
+                e.printStackTrace();
+            }
+        }
+    }
+
+    public void processEventSpectrum(final SpectrumEvent_RW event, final int try_number) {
+        Util.out4.println("BooleanSpectrum_RW.processEventSpectrum");
+        if (isDataArchivableTimestampWise(event)) {
+            final String attributeName = event.getAttributeCompleteName();
+            try {
+                processFileSpectrum(event);
+                super.setLastTimestamp(event);
+            } catch (final Exception e) {
+                registerErrorMessage(attributeName, e.getMessage());
+                Util.out2.println("ERROR !! " + "\r\n" + "\t Origin : \t " + "BooleanSpectrum_RW.processEventSpectrum"
+                        + "\r\n" + "\t Reason : \t " + e.getClass().getName() + "\r\n" + "\t Description : \t "
+                        + e.getMessage() + "\r\n" + "\t Additional information : \t " + "" + "\r\n");
+                e.printStackTrace();
+            }
+        }
+    }
 }
\ No newline at end of file
diff --git a/src/main/java/TdbArchiver/Collector/spectrum/NumberSpectrum.java b/tdbarchiver/src/main/java/TdbArchiver/Collector/spectrum/NumberSpectrum.java
similarity index 97%
rename from src/main/java/TdbArchiver/Collector/spectrum/NumberSpectrum.java
rename to tdbarchiver/src/main/java/TdbArchiver/Collector/spectrum/NumberSpectrum.java
index 15b851ba8a1b00de5c6b6023265531291b515db5..b7a2c369c0c0fbd5d12b2f974c8101e79d98b256 100644
--- a/src/main/java/TdbArchiver/Collector/spectrum/NumberSpectrum.java
+++ b/tdbarchiver/src/main/java/TdbArchiver/Collector/spectrum/NumberSpectrum.java
@@ -1,265 +1,265 @@
-// +======================================================================
-// $Source$
-//
-// Project:      Tango Archiving Service
-//
-// Description:  Java source code for the class  NumberSpectrum_RO.
-//						(Chinkumo Jean) - Mar 24, 2004
-//
-// $Author$
-//
-// $Revision$
-//
-// $Log$
-// Revision 1.2  2010/12/15 16:08:53  abeilleg
-// refactoring: try to remove some copy/paste
-//
-// Revision 1.1  2010/12/15 10:53:56  abeilleg
-// refactoring: try to remove some copy/paste
-//
-// Revision 1.7  2007/06/01 09:45:53  pierrejoseph
-// Attribute ArchiverCollectro.logger has been renamed in m_logger
-//
-// Revision 1.6  2007/03/05 16:25:20  ounsy
-// non-static DataBase
-//
-// Revision 1.5  2007/02/13 14:41:45  ounsy
-// added diary entry in the case of unexpected exceptions in addSource
-//
-// Revision 1.4  2007/02/13 14:19:16  ounsy
-// corrected a bug in addSource: an infinite nnumber of FileTools instances could potentially be created
-//
-// Revision 1.3  2006/10/31 16:54:12  ounsy
-// milliseconds and null values management
-//
-// Revision 1.2  2006/10/19 12:25:51  ounsy
-// modfiied the removeSource to take into account the new isAsuynchronous parameter
-//
-// Revision 1.1  2006/08/23 09:42:56  ounsy
-// Spectrum_xxx renamed as NumberSpectrum_xxx
-//
-// Revision 1.13  2006/07/26 08:37:21  ounsy
-// try number no more static and reinitialized with change events (errorchange, numberscalarchange, etc...)
-//
-// Revision 1.12  2006/06/08 08:34:31  ounsy
-// added new diary logging system: the results of tmp file exports are logged in a text file (one per archiver and per day)
-//
-// Revision 1.11  2006/05/23 11:58:03  ounsy
-// now checks the timeCondition condition before calling FileTools.processEvent
-//
-// Revision 1.10  2006/05/16 09:30:30  ounsy
-// added what's necessary for the old files deletion mechanism
-//
-// Revision 1.9  2006/04/05 13:49:51  ounsy
-// new types full support
-//
-// Revision 1.8  2006/03/28 11:14:38  ounsy
-// better spectrum management
-//
-// Revision 1.7  2005/11/29 17:34:14  chinkumo
-// no message
-//
-// Revision 1.6.8.2  2005/11/29 16:15:11  chinkumo
-// Code reformated (pogo compatible)
-//
-// Revision 1.6.8.1  2005/11/15 13:45:38  chinkumo
-// ...
-//
-// Revision 1.6  2005/06/24 12:06:38  chinkumo
-// Some constants were moved from fr.soleil.hdbtdbArchivingApi.ArchivingApi.ConfigConst to fr.soleil.hdbtdbArchivingApi.ArchivingTools.Tools.GlobalConst.
-
-// This change was reported here.
-//
-// Revision 1.5  2005/06/14 10:39:09  chinkumo
-// Branch (tdbArchiver_1_0_1-branch_0)  and HEAD merged.
-//
-// Revision 1.4.4.1  2005/06/13 13:49:34  chinkumo
-// Changes made to improve the management of exceptions were reported here.
-//
-// Revision 1.4  2005/04/08 15:37:06  chinkumo
-// errorChange method filled.
-
-// The aim of this method is to manage possible attribute's problem while polling attributes.
-
-// In case of unavailable value, a record is nevertheless carried out with the event timestamp, but with a kind of NULL value.
-//
-// Revision 1.3  2005/02/04 17:10:39  chinkumo
-// The trouble with the grouped stopping strategy was fixed.
-//
-// Revision 1.2  2005/01/31 15:09:04  chinkumo
-// Changes made since the TdbProxy class was changed into the DbProxy class.
-//
-// Revision 1.1  2004/12/06 16:43:26  chinkumo
-// First commit (new architecture).
-//
-// Revision 1.5  2004/09/27 13:17:36  chinkumo
-// The addSource method were improved : The two calls 'myFile.checkDirs();' + 'myFile.initFile();' were gathered into one single call (myFile.initialize();).
-//
-// Revision 1.4  2004/09/14 06:55:44  chinkumo
-// Some unused 'import' were removed.
-// Some error messages were re-written to fit the 'error policy' recently decided.
-//
-// Revision 1.3  2004/09/01 15:38:21  chinkumo
-// Heading was updated.
-// As the Mode object now includes the exportPeriod information the way to build a FileTools object was modified (see addSource(..)).
-//
-//
-// copyleft :	Synchrotron SOLEIL
-//					L'Orme des Merisiers
-//					Saint-Aubin - BP 48
-//					91192 GIF-sur-YVETTE CEDEX
-//
-//-======================================================================
-
-package TdbArchiver.Collector.spectrum;
-
-import org.slf4j.Logger;
-
-import TdbArchiver.Collector.TdbCollector;
-import TdbArchiver.Collector.TdbModeHandler;
-import fr.esrf.Tango.AttrWriteType;
-import fr.esrf.Tango.DevFailed;
-import fr.esrf.TangoDs.Except;
-import fr.esrf.TangoDs.Util;
-import fr.esrf.tangoatk.core.AttributeStateEvent;
-import fr.esrf.tangoatk.core.ErrorEvent;
-import fr.esrf.tangoatk.core.IEntity;
-import fr.esrf.tangoatk.core.INumberSpectrum;
-import fr.esrf.tangoatk.core.ISpectrumListener;
-import fr.esrf.tangoatk.core.NumberSpectrumEvent;
-import fr.soleil.archiving.common.api.exception.ArchivingException;
-import fr.soleil.archiving.hdbtdb.api.tools.SpectrumEvent_RO;
-import fr.soleil.archiving.hdbtdb.api.tools.SpectrumEvent_RW;
-
-public class NumberSpectrum extends TdbCollector implements ISpectrumListener {
-
-    private static final long serialVersionUID = 2281186188634390196L;
-
-    public NumberSpectrum(final TdbModeHandler modeHandler, final String currentDsPath, final String currentDbPath,
-            final AttrWriteType writableType, Logger logger) {
-        super(modeHandler, currentDsPath, currentDbPath, writableType, logger);
-    }
-
-    @Override
-    public void addListeners(final IEntity attribute) throws ArchivingException {
-        if (attribute instanceof INumberSpectrum) {
-            ((INumberSpectrum) attribute).addSpectrumListener(this);
-            ((INumberSpectrum) attribute).addErrorListener(this);
-        }
-    }
-
-    @Override
-    public void removeListeners(final IEntity attribute) throws ArchivingException {
-        if (attribute instanceof INumberSpectrum) {
-            ((INumberSpectrum) attribute).removeSpectrumListener(this);
-            ((INumberSpectrum) attribute).removeErrorListener(this);
-        }
-    }
-
-    @Override
-    protected void treatErrorEventAfterLogging(ErrorEvent errorEvent) {
-        final double[] value = null;
-        final SpectrumEvent_RO spectrumEvent_ro = new SpectrumEvent_RO();
-        spectrumEvent_ro.setAttributeCompleteName(((INumberSpectrum) errorEvent.getSource()).getName());
-        spectrumEvent_ro.setTimeStamp(errorEvent.getTimeStamp());
-        spectrumEvent_ro.setValue(value, null);
-        processEventSpectrum(spectrumEvent_ro, DEFAULT_TRY_NUMBER);
-    }
-
-    @Override
-    public void spectrumChange(final NumberSpectrumEvent event) {
-
-        // final double[] spectrumvalue = event.getValue();
-        // double[] value;
-        // if (spectrumvalue == null) {
-        // value = null;
-        // } else {
-        // value = new Double[spectrumvalue.length];
-        // for (int i = 0; i < spectrumvalue.length; i++) {
-        // value[i] = new Double(spectrumvalue[i]);
-        // }
-        // }
-
-        INumberSpectrum eventSrc = (INumberSpectrum) event.getSource();
-        String attributeName = eventSrc.getName();
-        removeErrorMessage(attributeName);
-        final double[] spectrumvalueR = eventSrc.getSpectrumDeviceValue();
-        final double[] spectrumvalueW = eventSrc.getSpectrumDeviceSetPoint();
-        double[] value = null;
-        if (spectrumvalueR != null) {
-            if (getWritableValue().equals(AttrWriteType.READ)) {
-                value = new double[spectrumvalueR.length];
-            } else {
-                value = new double[spectrumvalueR.length + spectrumvalueW.length];
-            }
-            System.arraycopy(spectrumvalueR, 0, value, 0, spectrumvalueR.length);
-            if (!getWritableValue().equals(AttrWriteType.READ)) {
-                System.arraycopy(spectrumvalueW, 0, value, spectrumvalueR.length, spectrumvalueW.length);
-            }
-        }
-        try {
-            if (getWritableValue().equals(AttrWriteType.READ)) {
-                final SpectrumEvent_RO spectrumEvent_ro = new SpectrumEvent_RO();
-                spectrumEvent_ro.setAttributeCompleteName(attributeName);
-                spectrumEvent_ro.setDataType(eventSrc.getAttribute().getType());
-                spectrumEvent_ro.setDimX(value.length);
-                spectrumEvent_ro.setTimeStamp(event.getTimeStamp());
-                spectrumEvent_ro.setValue(value, null);
-
-                processEventSpectrum(spectrumEvent_ro, DEFAULT_TRY_NUMBER);
-            } else {
-
-                final SpectrumEvent_RW spectrumEvent_rw = new SpectrumEvent_RW();
-                spectrumEvent_rw.setAttributeCompleteName(attributeName);
-                spectrumEvent_rw.setDataType(eventSrc.getAttribute().getType());
-                spectrumEvent_rw.setDimX(eventSrc.getXDimension());
-                spectrumEvent_rw.setTimeStamp(event.getTimeStamp());
-                spectrumEvent_rw.setValue(value, null);
-
-                processEventSpectrum(spectrumEvent_rw, DEFAULT_TRY_NUMBER);
-            }
-        } catch (final DevFailed devFailed) {
-            registerErrorMessage(attributeName, devFailed);
-            Except.print_exception(devFailed);
-        }
-
-    }
-
-    @Override
-    public void stateChange(final AttributeStateEvent event) {
-    }
-
-    public void processEventSpectrum(final SpectrumEvent_RO event, final int try_number) {
-        Util.out4.println("NumberSpectrum_RO.processEventSpectrum");
-        if (isDataArchivableTimestampWise(event)) {
-            final String attributeName = event.getAttributeCompleteName();
-            try {
-                processFileSpectrum(event);
-                super.setLastTimestamp(event);
-            } catch (final Exception e) {
-                registerErrorMessage(attributeName, e.getMessage());
-                Util.out2.println("ERROR !! " + "\r\n" + "\t Origin : \t " + "NumberSpectrum_RO.processEventSpectrum"
-                        + "\r\n" + "\t Reason : \t " + e.getClass().getName() + "\r\n" + "\t Description : \t "
-                        + e.getMessage() + "\r\n" + "\t Additional information : \t " + "" + "\r\n");
-                e.printStackTrace();
-            }
-        }
-    }
-
-    public void processEventSpectrum(final SpectrumEvent_RW event, final int try_number) {
-        Util.out4.println("NumberSpectrum_RW.processEventSpectrum");
-        if (isDataArchivableTimestampWise(event)) {
-            final String attributeName = event.getAttributeCompleteName();
-            try {
-                processFileSpectrum(event);
-                super.setLastTimestamp(event);
-            } catch (final Exception e) {
-                registerErrorMessage(attributeName, e.getMessage());
-                Util.out2.println("ERROR !! " + "\r\n" + "\t Origin : \t " + "NumberSpectrum_RW.processEventSpectrum"
-                        + "\r\n" + "\t Reason : \t " + e.getClass().getName() + "\r\n" + "\t Description : \t "
-                        + e.getMessage() + "\r\n" + "\t Additional information : \t " + "" + "\r\n");
-                e.printStackTrace();
-            }
-        }
-    }
-}
+// +======================================================================
+// $Source$
+//
+// Project:      Tango Archiving Service
+//
+// Description:  Java source code for the class  NumberSpectrum_RO.
+//						(Chinkumo Jean) - Mar 24, 2004
+//
+// $Author: candelrg $
+//
+// $Revision: 28719 $
+//
+// $Log$
+// Revision 1.2  2010/12/15 16:08:53  abeilleg
+// refactoring: try to remove some copy/paste
+//
+// Revision 1.1  2010/12/15 10:53:56  abeilleg
+// refactoring: try to remove some copy/paste
+//
+// Revision 1.7  2007/06/01 09:45:53  pierrejoseph
+// Attribute ArchiverCollectro.logger has been renamed in m_logger
+//
+// Revision 1.6  2007/03/05 16:25:20  ounsy
+// non-static DataBase
+//
+// Revision 1.5  2007/02/13 14:41:45  ounsy
+// added diary entry in the case of unexpected exceptions in addSource
+//
+// Revision 1.4  2007/02/13 14:19:16  ounsy
+// corrected a bug in addSource: an infinite nnumber of FileTools instances could potentially be created
+//
+// Revision 1.3  2006/10/31 16:54:12  ounsy
+// milliseconds and null values management
+//
+// Revision 1.2  2006/10/19 12:25:51  ounsy
+// modfiied the removeSource to take into account the new isAsuynchronous parameter
+//
+// Revision 1.1  2006/08/23 09:42:56  ounsy
+// Spectrum_xxx renamed as NumberSpectrum_xxx
+//
+// Revision 1.13  2006/07/26 08:37:21  ounsy
+// try number no more static and reinitialized with change events (errorchange, numberscalarchange, etc...)
+//
+// Revision 1.12  2006/06/08 08:34:31  ounsy
+// added new diary logging system: the results of tmp file exports are logged in a text file (one per archiver and per day)
+//
+// Revision 1.11  2006/05/23 11:58:03  ounsy
+// now checks the timeCondition condition before calling FileTools.processEvent
+//
+// Revision 1.10  2006/05/16 09:30:30  ounsy
+// added what's necessary for the old files deletion mechanism
+//
+// Revision 1.9  2006/04/05 13:49:51  ounsy
+// new types full support
+//
+// Revision 1.8  2006/03/28 11:14:38  ounsy
+// better spectrum management
+//
+// Revision 1.7  2005/11/29 17:34:14  chinkumo
+// no message
+//
+// Revision 1.6.8.2  2005/11/29 16:15:11  chinkumo
+// Code reformated (pogo compatible)
+//
+// Revision 1.6.8.1  2005/11/15 13:45:38  chinkumo
+// ...
+//
+// Revision 1.6  2005/06/24 12:06:38  chinkumo
+// Some constants were moved from fr.soleil.hdbtdbArchivingApi.ArchivingApi.ConfigConst to fr.soleil.hdbtdbArchivingApi.ArchivingTools.Tools.GlobalConst.
+
+// This change was reported here.
+//
+// Revision 1.5  2005/06/14 10:39:09  chinkumo
+// Branch (tdbArchiver_1_0_1-branch_0)  and HEAD merged.
+//
+// Revision 1.4.4.1  2005/06/13 13:49:34  chinkumo
+// Changes made to improve the management of exceptions were reported here.
+//
+// Revision 1.4  2005/04/08 15:37:06  chinkumo
+// errorChange method filled.
+
+// The aim of this method is to manage possible attribute's problem while polling attributes.
+
+// In case of unavailable value, a record is nevertheless carried out with the event timestamp, but with a kind of NULL value.
+//
+// Revision 1.3  2005/02/04 17:10:39  chinkumo
+// The trouble with the grouped stopping strategy was fixed.
+//
+// Revision 1.2  2005/01/31 15:09:04  chinkumo
+// Changes made since the TdbProxy class was changed into the DbProxy class.
+//
+// Revision 1.1  2004/12/06 16:43:26  chinkumo
+// First commit (new architecture).
+//
+// Revision 1.5  2004/09/27 13:17:36  chinkumo
+// The addSource method were improved : The two calls 'myFile.checkDirs();' + 'myFile.initFile();' were gathered into one single call (myFile.initialize();).
+//
+// Revision 1.4  2004/09/14 06:55:44  chinkumo
+// Some unused 'import' were removed.
+// Some error messages were re-written to fit the 'error policy' recently decided.
+//
+// Revision 1.3  2004/09/01 15:38:21  chinkumo
+// Heading was updated.
+// As the Mode object now includes the exportPeriod information the way to build a FileTools object was modified (see addSource(..)).
+//
+//
+// copyleft :	Synchrotron SOLEIL
+//					L'Orme des Merisiers
+//					Saint-Aubin - BP 48
+//					91192 GIF-sur-YVETTE CEDEX
+//
+//-======================================================================
+
+package TdbArchiver.Collector.spectrum;
+
+import org.slf4j.Logger;
+
+import TdbArchiver.Collector.TdbCollector;
+import TdbArchiver.Collector.TdbModeHandler;
+import fr.esrf.Tango.AttrWriteType;
+import fr.esrf.Tango.DevFailed;
+import fr.esrf.TangoDs.Except;
+import fr.esrf.TangoDs.Util;
+import fr.esrf.tangoatk.core.AttributeStateEvent;
+import fr.esrf.tangoatk.core.ErrorEvent;
+import fr.esrf.tangoatk.core.IEntity;
+import fr.esrf.tangoatk.core.INumberSpectrum;
+import fr.esrf.tangoatk.core.ISpectrumListener;
+import fr.esrf.tangoatk.core.NumberSpectrumEvent;
+import fr.soleil.archiving.common.api.exception.ArchivingException;
+import fr.soleil.archiving.hdbtdb.api.tools.SpectrumEvent_RO;
+import fr.soleil.archiving.hdbtdb.api.tools.SpectrumEvent_RW;
+
+public class NumberSpectrum extends TdbCollector implements ISpectrumListener {
+
+    private static final long serialVersionUID = 2281186188634390196L;
+
+    public NumberSpectrum(final TdbModeHandler modeHandler, final String currentDsPath, final String currentDbPath,
+            final AttrWriteType writableType, Logger logger) {
+        super(modeHandler, currentDsPath, currentDbPath, writableType, logger);
+    }
+
+    @Override
+    public void addListeners(final IEntity attribute) throws ArchivingException {
+        if (attribute instanceof INumberSpectrum) {
+            ((INumberSpectrum) attribute).addSpectrumListener(this);
+            ((INumberSpectrum) attribute).addErrorListener(this);
+        }
+    }
+
+    @Override
+    public void removeListeners(final IEntity attribute) throws ArchivingException {
+        if (attribute instanceof INumberSpectrum) {
+            ((INumberSpectrum) attribute).removeSpectrumListener(this);
+            ((INumberSpectrum) attribute).removeErrorListener(this);
+        }
+    }
+
+    @Override
+    protected void treatErrorEventAfterLogging(ErrorEvent errorEvent) {
+        final double[] value = null;
+        final SpectrumEvent_RO spectrumEvent_ro = new SpectrumEvent_RO();
+        spectrumEvent_ro.setAttributeCompleteName(((INumberSpectrum) errorEvent.getSource()).getName());
+        spectrumEvent_ro.setTimeStamp(errorEvent.getTimeStamp());
+        spectrumEvent_ro.setValue(value, null);
+        processEventSpectrum(spectrumEvent_ro, DEFAULT_TRY_NUMBER);
+    }
+
+    @Override
+    public void spectrumChange(final NumberSpectrumEvent event) {
+
+        // final double[] spectrumvalue = event.getValue();
+        // double[] value;
+        // if (spectrumvalue == null) {
+        // value = null;
+        // } else {
+        // value = new Double[spectrumvalue.length];
+        // for (int i = 0; i < spectrumvalue.length; i++) {
+        // value[i] = new Double(spectrumvalue[i]);
+        // }
+        // }
+
+        INumberSpectrum eventSrc = (INumberSpectrum) event.getSource();
+        String attributeName = eventSrc.getName();
+        removeErrorMessage(attributeName);
+        final double[] spectrumvalueR = eventSrc.getSpectrumDeviceValue();
+        final double[] spectrumvalueW = eventSrc.getSpectrumDeviceSetPoint();
+        double[] value = null;
+        if (spectrumvalueR != null) {
+            if (getWritableValue().equals(AttrWriteType.READ)) {
+                value = new double[spectrumvalueR.length];
+            } else {
+                value = new double[spectrumvalueR.length + spectrumvalueW.length];
+            }
+            System.arraycopy(spectrumvalueR, 0, value, 0, spectrumvalueR.length);
+            if (!getWritableValue().equals(AttrWriteType.READ)) {
+                System.arraycopy(spectrumvalueW, 0, value, spectrumvalueR.length, spectrumvalueW.length);
+            }
+        }
+        try {
+            if (getWritableValue().equals(AttrWriteType.READ)) {
+                final SpectrumEvent_RO spectrumEvent_ro = new SpectrumEvent_RO();
+                spectrumEvent_ro.setAttributeCompleteName(attributeName);
+                spectrumEvent_ro.setDataType(eventSrc.getAttribute().getType());
+                spectrumEvent_ro.setDimX(value.length);
+                spectrumEvent_ro.setTimeStamp(event.getTimeStamp());
+                spectrumEvent_ro.setValue(value, null);
+
+                processEventSpectrum(spectrumEvent_ro, DEFAULT_TRY_NUMBER);
+            } else {
+
+                final SpectrumEvent_RW spectrumEvent_rw = new SpectrumEvent_RW();
+                spectrumEvent_rw.setAttributeCompleteName(attributeName);
+                spectrumEvent_rw.setDataType(eventSrc.getAttribute().getType());
+                spectrumEvent_rw.setDimX(eventSrc.getXDimension());
+                spectrumEvent_rw.setTimeStamp(event.getTimeStamp());
+                spectrumEvent_rw.setValue(value, null);
+
+                processEventSpectrum(spectrumEvent_rw, DEFAULT_TRY_NUMBER);
+            }
+        } catch (final DevFailed devFailed) {
+            registerErrorMessage(attributeName, devFailed);
+            Except.print_exception(devFailed);
+        }
+
+    }
+
+    @Override
+    public void stateChange(final AttributeStateEvent event) {
+    }
+
+    public void processEventSpectrum(final SpectrumEvent_RO event, final int try_number) {
+        Util.out4.println("NumberSpectrum_RO.processEventSpectrum");
+        if (isDataArchivableTimestampWise(event)) {
+            final String attributeName = event.getAttributeCompleteName();
+            try {
+                processFileSpectrum(event);
+                super.setLastTimestamp(event);
+            } catch (final Exception e) {
+                registerErrorMessage(attributeName, e.getMessage());
+                Util.out2.println("ERROR !! " + "\r\n" + "\t Origin : \t " + "NumberSpectrum_RO.processEventSpectrum"
+                        + "\r\n" + "\t Reason : \t " + e.getClass().getName() + "\r\n" + "\t Description : \t "
+                        + e.getMessage() + "\r\n" + "\t Additional information : \t " + "" + "\r\n");
+                e.printStackTrace();
+            }
+        }
+    }
+
+    public void processEventSpectrum(final SpectrumEvent_RW event, final int try_number) {
+        Util.out4.println("NumberSpectrum_RW.processEventSpectrum");
+        if (isDataArchivableTimestampWise(event)) {
+            final String attributeName = event.getAttributeCompleteName();
+            try {
+                processFileSpectrum(event);
+                super.setLastTimestamp(event);
+            } catch (final Exception e) {
+                registerErrorMessage(attributeName, e.getMessage());
+                Util.out2.println("ERROR !! " + "\r\n" + "\t Origin : \t " + "NumberSpectrum_RW.processEventSpectrum"
+                        + "\r\n" + "\t Reason : \t " + e.getClass().getName() + "\r\n" + "\t Description : \t "
+                        + e.getMessage() + "\r\n" + "\t Additional information : \t " + "" + "\r\n");
+                e.printStackTrace();
+            }
+        }
+    }
+}
diff --git a/src/main/java/TdbArchiver/Collector/spectrum/StringSpectrum.java b/tdbarchiver/src/main/java/TdbArchiver/Collector/spectrum/StringSpectrum.java
similarity index 97%
rename from src/main/java/TdbArchiver/Collector/spectrum/StringSpectrum.java
rename to tdbarchiver/src/main/java/TdbArchiver/Collector/spectrum/StringSpectrum.java
index e81a17545671402b8157dfec0426e91f6f2031cb..a37e1e51e85d51ae704f8410082b80824f822b42 100644
--- a/src/main/java/TdbArchiver/Collector/spectrum/StringSpectrum.java
+++ b/tdbarchiver/src/main/java/TdbArchiver/Collector/spectrum/StringSpectrum.java
@@ -1,245 +1,245 @@
-// +======================================================================
-// $Source$
-//
-// Project:      Tango Archiving Service
-//
-// Description:  Java source code for the class  Spectrum_RO.
-//						(Chinkumo Jean) - Mar 24, 2004
-//
-// $Author$
-//
-// $Revision$
-//
-// $Log$
-// Revision 1.3  2010/12/16 10:20:50  abeilleg
-// find bugs
-//
-// Revision 1.2  2010/12/15 16:08:53  abeilleg
-// refactoring: try to remove some copy/paste
-//
-// Revision 1.1  2010/12/15 10:53:56  abeilleg
-// refactoring: try to remove some copy/paste
-//
-// Revision 1.12  2007/06/01 09:45:53  pierrejoseph
-// Attribute ArchiverCollectro.logger has been renamed in m_logger
-//
-// Revision 1.11  2007/03/05 16:25:20  ounsy
-// non-static DataBase
-//
-// Revision 1.10  2007/02/13 14:41:45  ounsy
-// added diary entry in the case of unexpected exceptions in addSource
-//
-// Revision 1.9  2007/02/13 14:19:16  ounsy
-// corrected a bug in addSource: an infinite nnumber of FileTools instances could potentially be created
-//
-// Revision 1.8  2006/10/31 16:54:12  ounsy
-// milliseconds and null values management
-//
-// Revision 1.7  2006/10/19 12:25:51  ounsy
-// modfiied the removeSource to take into account the new isAsuynchronous parameter
-//
-// Revision 1.6  2006/08/23 09:55:15  ounsy
-// FileTools compatible with the new TDB file management
-// + keeping period removed from FileTools (it was already no more used, but the parameter was still here. Only removed a no more used parameter)
-//
-// Revision 1.5  2006/07/26 08:37:21  ounsy
-// try number no more static and reinitialized with change events (errorchange, numberscalarchange, etc...)
-//
-// Revision 1.4  2006/06/08 08:34:31  ounsy
-// added new diary logging system: the results of tmp file exports are logged in a text file (one per archiver and per day)
-//
-// Revision 1.3  2006/05/23 11:58:03  ounsy
-// now checks the timeCondition condition before calling FileTools.processEvent
-//
-// Revision 1.2  2006/05/16 09:30:30  ounsy
-// added what's necessary for the old files deletion mechanism
-//
-// Revision 1.1  2006/04/05 13:49:51  ounsy
-// new types full support
-//
-// Revision 1.8  2006/03/28 11:14:38  ounsy
-// better spectrum management
-//
-// Revision 1.7  2005/11/29 17:34:14  chinkumo
-// no message
-//
-// Revision 1.6.8.2  2005/11/29 16:15:11  chinkumo
-// Code reformated (pogo compatible)
-//
-// Revision 1.6.8.1  2005/11/15 13:45:38  chinkumo
-// ...
-//
-// Revision 1.6  2005/06/24 12:06:38  chinkumo
-// Some constants were moved from fr.soleil.hdbtdbArchivingApi.ArchivingApi.ConfigConst to fr.soleil.hdbtdbArchivingApi.ArchivingTools.Tools.GlobalConst.
-
-// This change was reported here.
-//
-// Revision 1.5  2005/06/14 10:39:09  chinkumo
-// Branch (tdbArchiver_1_0_1-branch_0)  and HEAD merged.
-//
-// Revision 1.4.4.1  2005/06/13 13:49:34  chinkumo
-// Changes made to improve the management of exceptions were reported here.
-//
-// Revision 1.4  2005/04/08 15:37:06  chinkumo
-// errorChange method filled.
-
-// The aim of this method is to manage possible attribute's problem while polling attributes.
-
-// In case of unavailable value, a record is nevertheless carried out with the event timestamp, but with a kind of NULL value.
-//
-// Revision 1.3  2005/02/04 17:10:39  chinkumo
-// The trouble with the grouped stopping strategy was fixed.
-//
-// Revision 1.2  2005/01/31 15:09:04  chinkumo
-// Changes made since the TdbProxy class was changed into the DbProxy class.
-//
-// Revision 1.1  2004/12/06 16:43:26  chinkumo
-// First commit (new architecture).
-//
-// Revision 1.5  2004/09/27 13:17:36  chinkumo
-// The addSource method were improved : The two calls 'myFile.checkDirs();' + 'myFile.initFile();' were gathered into one single call (myFile.initialize();).
-//
-// Revision 1.4  2004/09/14 06:55:44  chinkumo
-// Some unused 'import' were removed.
-// Some error messages were re-written to fit the 'error policy' recently decided.
-//
-// Revision 1.3  2004/09/01 15:38:21  chinkumo
-// Heading was updated.
-// As the Mode object now includes the exportPeriod information the way to build a FileTools object was modified (see addSource(..)).
-//
-//
-// copyleft :	Synchrotron SOLEIL
-//					L'Orme des Merisiers
-//					Saint-Aubin - BP 48
-//					91192 GIF-sur-YVETTE CEDEX
-//
-//-======================================================================
-
-package TdbArchiver.Collector.spectrum;
-
-import org.apache.commons.lang.ArrayUtils;
-import org.slf4j.Logger;
-
-import TdbArchiver.Collector.TdbCollector;
-import TdbArchiver.Collector.TdbModeHandler;
-import fr.esrf.Tango.AttrWriteType;
-import fr.esrf.Tango.DevFailed;
-import fr.esrf.TangoDs.Except;
-import fr.esrf.TangoDs.Util;
-import fr.esrf.tangoatk.core.AttributeStateEvent;
-import fr.esrf.tangoatk.core.ErrorEvent;
-import fr.esrf.tangoatk.core.IEntity;
-import fr.esrf.tangoatk.core.IStringSpectrum;
-import fr.esrf.tangoatk.core.IStringSpectrumListener;
-import fr.esrf.tangoatk.core.StringSpectrumEvent;
-import fr.soleil.archiving.common.api.exception.ArchivingException;
-import fr.soleil.archiving.hdbtdb.api.tools.SpectrumEvent_RO;
-import fr.soleil.archiving.hdbtdb.api.tools.SpectrumEvent_RW;
-
-public class StringSpectrum extends TdbCollector implements IStringSpectrumListener {
-
-    private static final long serialVersionUID = -3360928252839966564L;
-
-    public StringSpectrum(final TdbModeHandler modeHandler, final String currentDsPath, final String currentDbPath,
-            final AttrWriteType writableType, Logger logger) {
-        super(modeHandler, currentDsPath, currentDbPath, writableType, logger);
-    }
-
-    @Override
-    public void addListeners(final IEntity attribute) throws ArchivingException {
-        if (attribute instanceof IStringSpectrum) {
-            ((IStringSpectrum) attribute).addListener(this);
-            ((IStringSpectrum) attribute).addErrorListener(this);
-        }
-    }
-
-    @Override
-    public void removeListeners(final IEntity attribute) throws ArchivingException {
-        if (attribute instanceof IStringSpectrum) {
-            ((IStringSpectrum) attribute).removeListener(this);
-            ((IStringSpectrum) attribute).removeErrorListener(this);
-        }
-    }
-
-    @Override
-    protected void treatErrorEventAfterLogging(ErrorEvent errorEvent) {
-        final String[] value = null;
-        final SpectrumEvent_RO spectrumEvent_ro = new SpectrumEvent_RO();
-        spectrumEvent_ro.setAttributeCompleteName(((IStringSpectrum) errorEvent.getSource()).getName());
-        spectrumEvent_ro.setTimeStamp(errorEvent.getTimeStamp());
-        spectrumEvent_ro.setValue(value, null);
-        processEventSpectrum(spectrumEvent_ro, DEFAULT_TRY_NUMBER);
-    }
-
-    @Override
-    public void stringSpectrumChange(final StringSpectrumEvent event) {
-        IStringSpectrum eventSrc = (IStringSpectrum) event.getSource();
-        final String[] spectrumvalueR = eventSrc.getStringSpectrumValue();
-        final String[] spectrumvalueW = eventSrc.getStringSpectrumSetPoint();
-        String attributeName = eventSrc.getName();
-        removeErrorMessage(attributeName);
-
-        try {
-            if (getWritableValue().equals(AttrWriteType.READ)) {
-
-                final SpectrumEvent_RO spectrumEvent_ro = new SpectrumEvent_RO();
-                spectrumEvent_ro.setAttributeCompleteName(attributeName);
-                spectrumEvent_ro.setDataType(eventSrc.getAttribute().getType());
-                spectrumEvent_ro.setDimX(spectrumvalueR.length);
-                spectrumEvent_ro.setTimeStamp(event.getTimeStamp());
-                spectrumEvent_ro.setValue(spectrumvalueR, null);
-                processEventSpectrum(spectrumEvent_ro, DEFAULT_TRY_NUMBER);
-            } else {
-                final SpectrumEvent_RW spectrumEvent_rw = new SpectrumEvent_RW();
-                spectrumEvent_rw.setAttributeCompleteName(attributeName);
-                spectrumEvent_rw.setDataType(eventSrc.getAttribute().getType());
-                spectrumEvent_rw.setDimX(eventSrc.getXDimension());
-                spectrumEvent_rw.setTimeStamp(event.getTimeStamp());
-                spectrumEvent_rw.setValue(ArrayUtils.addAll(spectrumvalueR, spectrumvalueW), null);
-
-                processEventSpectrum(spectrumEvent_rw, DEFAULT_TRY_NUMBER);
-            }
-        } catch (final DevFailed devFailed) {
-            Except.print_exception(devFailed);
-        }
-
-    }
-
-    @Override
-    public void stateChange(final AttributeStateEvent event) {
-    }
-
-    public void processEventSpectrum(final SpectrumEvent_RO event, final int try_number) {
-        Util.out4.println("StringSpectrum_RO.processEventSpectrum");
-        if (isDataArchivableTimestampWise(event)) {
-            final String attributeName = event.getAttributeCompleteName();
-            try {
-                processFileSpectrum(event);
-                super.setLastTimestamp(event);
-            } catch (final Exception e) {
-                registerErrorMessage(attributeName, e.getMessage());
-                Util.out2.println("ERROR !! " + "\r\n" + "\t Origin : \t " + "StringSpectrum_RO.processEventSpectrum"
-                        + "\r\n" + "\t Reason : \t " + e.getClass().getName() + "\r\n" + "\t Description : \t "
-                        + e.getMessage() + "\r\n" + "\t Additional information : \t " + "" + "\r\n");
-                e.printStackTrace();
-            }
-        }
-    }
-
-    public void processEventSpectrum(final SpectrumEvent_RW event, final int try_number) {
-        Util.out4.println("StringSpectrum_RW.processEventSpectrum");
-        if (isDataArchivableTimestampWise(event)) {
-            final String attributeName = event.getAttributeCompleteName();
-            try {
-                processFileSpectrum(event);
-                super.setLastTimestamp(event);
-            } catch (final Exception e) {
-                registerErrorMessage(attributeName, e.getMessage());
-                Util.out2.println("ERROR !! " + "\r\n" + "\t Origin : \t " + "StringSpectrum_RW.processEventSpectrum"
-                        + "\r\n" + "\t Reason : \t " + e.getClass().getName() + "\r\n" + "\t Description : \t "
-                        + e.getMessage() + "\r\n" + "\t Additional information : \t " + "" + "\r\n");
-                e.printStackTrace();
-            }
-        }
-    }
-}
+// +======================================================================
+// $Source$
+//
+// Project:      Tango Archiving Service
+//
+// Description:  Java source code for the class  Spectrum_RO.
+//						(Chinkumo Jean) - Mar 24, 2004
+//
+// $Author: candelrg $
+//
+// $Revision: 28719 $
+//
+// $Log$
+// Revision 1.3  2010/12/16 10:20:50  abeilleg
+// find bugs
+//
+// Revision 1.2  2010/12/15 16:08:53  abeilleg
+// refactoring: try to remove some copy/paste
+//
+// Revision 1.1  2010/12/15 10:53:56  abeilleg
+// refactoring: try to remove some copy/paste
+//
+// Revision 1.12  2007/06/01 09:45:53  pierrejoseph
+// Attribute ArchiverCollectro.logger has been renamed in m_logger
+//
+// Revision 1.11  2007/03/05 16:25:20  ounsy
+// non-static DataBase
+//
+// Revision 1.10  2007/02/13 14:41:45  ounsy
+// added diary entry in the case of unexpected exceptions in addSource
+//
+// Revision 1.9  2007/02/13 14:19:16  ounsy
+// corrected a bug in addSource: an infinite nnumber of FileTools instances could potentially be created
+//
+// Revision 1.8  2006/10/31 16:54:12  ounsy
+// milliseconds and null values management
+//
+// Revision 1.7  2006/10/19 12:25:51  ounsy
+// modfiied the removeSource to take into account the new isAsuynchronous parameter
+//
+// Revision 1.6  2006/08/23 09:55:15  ounsy
+// FileTools compatible with the new TDB file management
+// + keeping period removed from FileTools (it was already no more used, but the parameter was still here. Only removed a no more used parameter)
+//
+// Revision 1.5  2006/07/26 08:37:21  ounsy
+// try number no more static and reinitialized with change events (errorchange, numberscalarchange, etc...)
+//
+// Revision 1.4  2006/06/08 08:34:31  ounsy
+// added new diary logging system: the results of tmp file exports are logged in a text file (one per archiver and per day)
+//
+// Revision 1.3  2006/05/23 11:58:03  ounsy
+// now checks the timeCondition condition before calling FileTools.processEvent
+//
+// Revision 1.2  2006/05/16 09:30:30  ounsy
+// added what's necessary for the old files deletion mechanism
+//
+// Revision 1.1  2006/04/05 13:49:51  ounsy
+// new types full support
+//
+// Revision 1.8  2006/03/28 11:14:38  ounsy
+// better spectrum management
+//
+// Revision 1.7  2005/11/29 17:34:14  chinkumo
+// no message
+//
+// Revision 1.6.8.2  2005/11/29 16:15:11  chinkumo
+// Code reformated (pogo compatible)
+//
+// Revision 1.6.8.1  2005/11/15 13:45:38  chinkumo
+// ...
+//
+// Revision 1.6  2005/06/24 12:06:38  chinkumo
+// Some constants were moved from fr.soleil.hdbtdbArchivingApi.ArchivingApi.ConfigConst to fr.soleil.hdbtdbArchivingApi.ArchivingTools.Tools.GlobalConst.
+
+// This change was reported here.
+//
+// Revision 1.5  2005/06/14 10:39:09  chinkumo
+// Branch (tdbArchiver_1_0_1-branch_0)  and HEAD merged.
+//
+// Revision 1.4.4.1  2005/06/13 13:49:34  chinkumo
+// Changes made to improve the management of exceptions were reported here.
+//
+// Revision 1.4  2005/04/08 15:37:06  chinkumo
+// errorChange method filled.
+
+// The aim of this method is to manage possible attribute's problem while polling attributes.
+
+// In case of unavailable value, a record is nevertheless carried out with the event timestamp, but with a kind of NULL value.
+//
+// Revision 1.3  2005/02/04 17:10:39  chinkumo
+// The trouble with the grouped stopping strategy was fixed.
+//
+// Revision 1.2  2005/01/31 15:09:04  chinkumo
+// Changes made since the TdbProxy class was changed into the DbProxy class.
+//
+// Revision 1.1  2004/12/06 16:43:26  chinkumo
+// First commit (new architecture).
+//
+// Revision 1.5  2004/09/27 13:17:36  chinkumo
+// The addSource method were improved : The two calls 'myFile.checkDirs();' + 'myFile.initFile();' were gathered into one single call (myFile.initialize();).
+//
+// Revision 1.4  2004/09/14 06:55:44  chinkumo
+// Some unused 'import' were removed.
+// Some error messages were re-written to fit the 'error policy' recently decided.
+//
+// Revision 1.3  2004/09/01 15:38:21  chinkumo
+// Heading was updated.
+// As the Mode object now includes the exportPeriod information the way to build a FileTools object was modified (see addSource(..)).
+//
+//
+// copyleft :	Synchrotron SOLEIL
+//					L'Orme des Merisiers
+//					Saint-Aubin - BP 48
+//					91192 GIF-sur-YVETTE CEDEX
+//
+//-======================================================================
+
+package TdbArchiver.Collector.spectrum;
+
+import org.apache.commons.lang.ArrayUtils;
+import org.slf4j.Logger;
+
+import TdbArchiver.Collector.TdbCollector;
+import TdbArchiver.Collector.TdbModeHandler;
+import fr.esrf.Tango.AttrWriteType;
+import fr.esrf.Tango.DevFailed;
+import fr.esrf.TangoDs.Except;
+import fr.esrf.TangoDs.Util;
+import fr.esrf.tangoatk.core.AttributeStateEvent;
+import fr.esrf.tangoatk.core.ErrorEvent;
+import fr.esrf.tangoatk.core.IEntity;
+import fr.esrf.tangoatk.core.IStringSpectrum;
+import fr.esrf.tangoatk.core.IStringSpectrumListener;
+import fr.esrf.tangoatk.core.StringSpectrumEvent;
+import fr.soleil.archiving.common.api.exception.ArchivingException;
+import fr.soleil.archiving.hdbtdb.api.tools.SpectrumEvent_RO;
+import fr.soleil.archiving.hdbtdb.api.tools.SpectrumEvent_RW;
+
+public class StringSpectrum extends TdbCollector implements IStringSpectrumListener {
+
+    private static final long serialVersionUID = -3360928252839966564L;
+
+    public StringSpectrum(final TdbModeHandler modeHandler, final String currentDsPath, final String currentDbPath,
+            final AttrWriteType writableType, Logger logger) {
+        super(modeHandler, currentDsPath, currentDbPath, writableType, logger);
+    }
+
+    @Override
+    public void addListeners(final IEntity attribute) throws ArchivingException {
+        if (attribute instanceof IStringSpectrum) {
+            ((IStringSpectrum) attribute).addListener(this);
+            ((IStringSpectrum) attribute).addErrorListener(this);
+        }
+    }
+
+    @Override
+    public void removeListeners(final IEntity attribute) throws ArchivingException {
+        if (attribute instanceof IStringSpectrum) {
+            ((IStringSpectrum) attribute).removeListener(this);
+            ((IStringSpectrum) attribute).removeErrorListener(this);
+        }
+    }
+
+    @Override
+    protected void treatErrorEventAfterLogging(ErrorEvent errorEvent) {
+        final String[] value = null;
+        final SpectrumEvent_RO spectrumEvent_ro = new SpectrumEvent_RO();
+        spectrumEvent_ro.setAttributeCompleteName(((IStringSpectrum) errorEvent.getSource()).getName());
+        spectrumEvent_ro.setTimeStamp(errorEvent.getTimeStamp());
+        spectrumEvent_ro.setValue(value, null);
+        processEventSpectrum(spectrumEvent_ro, DEFAULT_TRY_NUMBER);
+    }
+
+    @Override
+    public void stringSpectrumChange(final StringSpectrumEvent event) {
+        IStringSpectrum eventSrc = (IStringSpectrum) event.getSource();
+        final String[] spectrumvalueR = eventSrc.getStringSpectrumValue();
+        final String[] spectrumvalueW = eventSrc.getStringSpectrumSetPoint();
+        String attributeName = eventSrc.getName();
+        removeErrorMessage(attributeName);
+
+        try {
+            if (getWritableValue().equals(AttrWriteType.READ)) {
+
+                final SpectrumEvent_RO spectrumEvent_ro = new SpectrumEvent_RO();
+                spectrumEvent_ro.setAttributeCompleteName(attributeName);
+                spectrumEvent_ro.setDataType(eventSrc.getAttribute().getType());
+                spectrumEvent_ro.setDimX(spectrumvalueR.length);
+                spectrumEvent_ro.setTimeStamp(event.getTimeStamp());
+                spectrumEvent_ro.setValue(spectrumvalueR, null);
+                processEventSpectrum(spectrumEvent_ro, DEFAULT_TRY_NUMBER);
+            } else {
+                final SpectrumEvent_RW spectrumEvent_rw = new SpectrumEvent_RW();
+                spectrumEvent_rw.setAttributeCompleteName(attributeName);
+                spectrumEvent_rw.setDataType(eventSrc.getAttribute().getType());
+                spectrumEvent_rw.setDimX(eventSrc.getXDimension());
+                spectrumEvent_rw.setTimeStamp(event.getTimeStamp());
+                spectrumEvent_rw.setValue(ArrayUtils.addAll(spectrumvalueR, spectrumvalueW), null);
+
+                processEventSpectrum(spectrumEvent_rw, DEFAULT_TRY_NUMBER);
+            }
+        } catch (final DevFailed devFailed) {
+            Except.print_exception(devFailed);
+        }
+
+    }
+
+    @Override
+    public void stateChange(final AttributeStateEvent event) {
+    }
+
+    public void processEventSpectrum(final SpectrumEvent_RO event, final int try_number) {
+        Util.out4.println("StringSpectrum_RO.processEventSpectrum");
+        if (isDataArchivableTimestampWise(event)) {
+            final String attributeName = event.getAttributeCompleteName();
+            try {
+                processFileSpectrum(event);
+                super.setLastTimestamp(event);
+            } catch (final Exception e) {
+                registerErrorMessage(attributeName, e.getMessage());
+                Util.out2.println("ERROR !! " + "\r\n" + "\t Origin : \t " + "StringSpectrum_RO.processEventSpectrum"
+                        + "\r\n" + "\t Reason : \t " + e.getClass().getName() + "\r\n" + "\t Description : \t "
+                        + e.getMessage() + "\r\n" + "\t Additional information : \t " + "" + "\r\n");
+                e.printStackTrace();
+            }
+        }
+    }
+
+    public void processEventSpectrum(final SpectrumEvent_RW event, final int try_number) {
+        Util.out4.println("StringSpectrum_RW.processEventSpectrum");
+        if (isDataArchivableTimestampWise(event)) {
+            final String attributeName = event.getAttributeCompleteName();
+            try {
+                processFileSpectrum(event);
+                super.setLastTimestamp(event);
+            } catch (final Exception e) {
+                registerErrorMessage(attributeName, e.getMessage());
+                Util.out2.println("ERROR !! " + "\r\n" + "\t Origin : \t " + "StringSpectrum_RW.processEventSpectrum"
+                        + "\r\n" + "\t Reason : \t " + e.getClass().getName() + "\r\n" + "\t Description : \t "
+                        + e.getMessage() + "\r\n" + "\t Additional information : \t " + "" + "\r\n");
+                e.printStackTrace();
+            }
+        }
+    }
+}
diff --git a/src/main/java/TdbArchiver/ExportData2DbCmd.java b/tdbarchiver/src/main/java/TdbArchiver/ExportData2DbCmd.java
similarity index 96%
rename from src/main/java/TdbArchiver/ExportData2DbCmd.java
rename to tdbarchiver/src/main/java/TdbArchiver/ExportData2DbCmd.java
index af9880caa21b5d0c29f3fa281524c4d434bdf9b8..263b41b481aecb4872271ec4f74f7321af5775e3 100644
--- a/src/main/java/TdbArchiver/ExportData2DbCmd.java
+++ b/tdbarchiver/src/main/java/TdbArchiver/ExportData2DbCmd.java
@@ -1,167 +1,167 @@
-// +======================================================================
-// $Source: /cvsroot/tango-cs/tango/jserver/archiving/TdbArchiver/ExportData2DbCmd.java,v $
-//
-// Project:      Tango Device Server
-//
-// Description:  Java source code for the command TemplateClass of the
-//               TdbArchiver class.
-//
-// $Author: chinkumo $
-//
-// $Revision: 1.4 $
-//
-// $Log: ExportData2DbCmd.java,v $
-// Revision 1.4  2005/11/29 17:34:14  chinkumo
-// no message
-//
-// Revision 1.3.10.3  2005/11/29 16:15:11  chinkumo
-// Code reformated (pogo compatible)
-//
-// Revision 1.3.10.2  2005/11/15 13:45:39  chinkumo
-// ...
-//
-// Revision 1.3.10.1  2005/09/26 08:01:54  chinkumo
-// Minor changes !
-//
-// Revision 1.3  2005/06/15 14:02:59  chinkumo
-// The device was regenerated in Tango V5.
-//
-//
-// copyleft :    European Synchrotron Radiation Facility
-//               BP 220, Grenoble 38043
-//               FRANCE
-//
-//-======================================================================
-//
-//  		This file is generated by POGO
-//	(Program Obviously used to Generate tango Object)
-//
-//         (c) - Software Engineering Group - ESRF
-//=============================================================================
-
-/**
- * @author $Author: chinkumo $
- * @version $Revision: 1.4 $
- */
-package TdbArchiver;
-
-import org.omg.CORBA.Any;
-
-import fr.esrf.Tango.DevFailed;
-import fr.esrf.Tango.DevState;
-import fr.esrf.Tango.DispLevel;
-import fr.esrf.TangoDs.Command;
-import fr.esrf.TangoDs.DeviceImpl;
-import fr.esrf.TangoDs.Except;
-import fr.esrf.TangoDs.TangoConst;
-import fr.esrf.TangoDs.Util;
-import fr.soleil.archiving.hdbtdb.api.ConfigConst;
-
-/**
- * Class Description: This command need an AttributeLightMode type object. An
- * AttributeLightMode type object encapsulate all the informations needed to
- * found the Collector in charge of the archiving of the specified attribute The
- * informations needed are the type, the format, the writable property and the
- * archiving mode
- */
-
-public class ExportData2DbCmd extends Command implements TangoConst {
-    // ===============================================================
-    /**
-     * Constructor for Command class ExportData2DbCmd
-     * 
-     * @param name
-     *            command name
-     * @param in
-     *            argin type
-     * @param out
-     *            argout type
-     */
-    // ===============================================================
-    public ExportData2DbCmd(String name, int in, int out) {
-        super(name, in, out);
-    }
-
-    // ===============================================================
-    /**
-     * Constructor for Command class ExportData2DbCmd
-     * 
-     * @param name
-     *            command name
-     * @param in
-     *            argin type
-     * @param in_comments
-     *            argin description
-     * @param out
-     *            argout type
-     * @param out_comments
-     *            argout description
-     */
-    // ===============================================================
-    public ExportData2DbCmd(String name, int in, int out, String in_comments, String out_comments) {
-        super(name, in, out, in_comments, out_comments);
-    }
-
-    // ===============================================================
-    /**
-     * Constructor for Command class ExportData2DbCmd
-     * 
-     * @param name
-     *            command name
-     * @param in
-     *            argin type
-     * @param in_comments
-     *            argin description
-     * @param out
-     *            argout type
-     * @param out_comments
-     *            argout description
-     * @param level
-     *            The command display type OPERATOR or EXPERT
-     */
-    // ===============================================================
-    public ExportData2DbCmd(String name, int in, int out, String in_comments, String out_comments, DispLevel level) {
-        super(name, in, out, in_comments, out_comments, level);
-    }
-
-    // ===============================================================
-    /**
-     * return the result of the device's command.
-     */
-    // ===============================================================
-    @Override
-    public Any execute(DeviceImpl device, Any in_any) throws DevFailed {
-        Util.out2.println("ExportData2DbCmd.execute(): arrived");
-        if (!(device instanceof TdbArchiver)) {
-            Except.throw_exception("DEVICE_ERROR", "Device parameter is not instance of TdbArchiver",
-                    ConfigConst.TDB_CLASS_DEVICE);
-        }
-
-        String[] argin = extract_DevVarStringArray(in_any);
-        ((TdbArchiver) (device)).export_data2_db(argin);
-        return insert();
-    }
-
-    // ===============================================================
-    /**
-     * Check if it is allowed to execute the command.
-     */
-    // ===============================================================
-    @Override
-    public boolean is_allowed(DeviceImpl device, Any data_in) {
-        if (device.get_state() == DevState.FAULT) {
-            // End of Generated Code
-
-            // Re-Start of Generated Code
-            return false;
-        }
-        return true;
-    }
-}
-
-// -----------------------------------------------------------------------------
-/*
- * end of $Source:
- * /cvsroot/tango-cs/tango/jserver/archiving/TdbArchiver/ExportData2DbCmd.java,v
- * $
- */
+// +======================================================================
+// $Source: /cvsroot/tango-cs/tango/jserver/archiving/TdbArchiver/ExportData2DbCmd.java,v $
+//
+// Project:      Tango Device Server
+//
+// Description:  Java source code for the command TemplateClass of the
+//               TdbArchiver class.
+//
+// $Author: chinkumo $
+//
+// $Revision: 1.4 $
+//
+// $Log: ExportData2DbCmd.java,v $
+// Revision 1.4  2005/11/29 17:34:14  chinkumo
+// no message
+//
+// Revision 1.3.10.3  2005/11/29 16:15:11  chinkumo
+// Code reformated (pogo compatible)
+//
+// Revision 1.3.10.2  2005/11/15 13:45:39  chinkumo
+// ...
+//
+// Revision 1.3.10.1  2005/09/26 08:01:54  chinkumo
+// Minor changes !
+//
+// Revision 1.3  2005/06/15 14:02:59  chinkumo
+// The device was regenerated in Tango V5.
+//
+//
+// copyleft :    European Synchrotron Radiation Facility
+//               BP 220, Grenoble 38043
+//               FRANCE
+//
+//-======================================================================
+//
+//  		This file is generated by POGO
+//	(Program Obviously used to Generate tango Object)
+//
+//         (c) - Software Engineering Group - ESRF
+//=============================================================================
+
+/**
+ * @author $Author: chinkumo $
+ * @version $Revision: 1.4 $
+ */
+package TdbArchiver;
+
+import org.omg.CORBA.Any;
+
+import fr.esrf.Tango.DevFailed;
+import fr.esrf.Tango.DevState;
+import fr.esrf.Tango.DispLevel;
+import fr.esrf.TangoDs.Command;
+import fr.esrf.TangoDs.DeviceImpl;
+import fr.esrf.TangoDs.Except;
+import fr.esrf.TangoDs.TangoConst;
+import fr.esrf.TangoDs.Util;
+import fr.soleil.archiving.hdbtdb.api.ConfigConst;
+
+/**
+ * Class Description: This command need an AttributeLightMode type object. An
+ * AttributeLightMode type object encapsulate all the informations needed to
+ * found the Collector in charge of the archiving of the specified attribute The
+ * informations needed are the type, the format, the writable property and the
+ * archiving mode
+ */
+
+public class ExportData2DbCmd extends Command implements TangoConst {
+    // ===============================================================
+    /**
+     * Constructor for Command class ExportData2DbCmd
+     * 
+     * @param name
+     *            command name
+     * @param in
+     *            argin type
+     * @param out
+     *            argout type
+     */
+    // ===============================================================
+    public ExportData2DbCmd(String name, int in, int out) {
+        super(name, in, out);
+    }
+
+    // ===============================================================
+    /**
+     * Constructor for Command class ExportData2DbCmd
+     * 
+     * @param name
+     *            command name
+     * @param in
+     *            argin type
+     * @param in_comments
+     *            argin description
+     * @param out
+     *            argout type
+     * @param out_comments
+     *            argout description
+     */
+    // ===============================================================
+    public ExportData2DbCmd(String name, int in, int out, String in_comments, String out_comments) {
+        super(name, in, out, in_comments, out_comments);
+    }
+
+    // ===============================================================
+    /**
+     * Constructor for Command class ExportData2DbCmd
+     * 
+     * @param name
+     *            command name
+     * @param in
+     *            argin type
+     * @param in_comments
+     *            argin description
+     * @param out
+     *            argout type
+     * @param out_comments
+     *            argout description
+     * @param level
+     *            The command display type OPERATOR or EXPERT
+     */
+    // ===============================================================
+    public ExportData2DbCmd(String name, int in, int out, String in_comments, String out_comments, DispLevel level) {
+        super(name, in, out, in_comments, out_comments, level);
+    }
+
+    // ===============================================================
+    /**
+     * return the result of the device's command.
+     */
+    // ===============================================================
+    @Override
+    public Any execute(DeviceImpl device, Any in_any) throws DevFailed {
+        Util.out2.println("ExportData2DbCmd.execute(): arrived");
+        if (!(device instanceof TdbArchiver)) {
+            Except.throw_exception("DEVICE_ERROR", "Device parameter is not instance of TdbArchiver",
+                    ConfigConst.TDB_CLASS_DEVICE);
+        }
+
+        String[] argin = extract_DevVarStringArray(in_any);
+        ((TdbArchiver) (device)).export_data2_db(argin);
+        return insert();
+    }
+
+    // ===============================================================
+    /**
+     * Check if it is allowed to execute the command.
+     */
+    // ===============================================================
+    @Override
+    public boolean is_allowed(DeviceImpl device, Any data_in) {
+        if (device.get_state() == DevState.FAULT) {
+            // End of Generated Code
+
+            // Re-Start of Generated Code
+            return false;
+        }
+        return true;
+    }
+}
+
+// -----------------------------------------------------------------------------
+/*
+ * end of $Source:
+ * /cvsroot/tango-cs/tango/jserver/archiving/TdbArchiver/ExportData2DbCmd.java,v
+ * $
+ */
diff --git a/src/main/java/TdbArchiver/GetErrorMessageForAttribute.java b/tdbarchiver/src/main/java/TdbArchiver/GetErrorMessageForAttribute.java
similarity index 100%
rename from src/main/java/TdbArchiver/GetErrorMessageForAttribute.java
rename to tdbarchiver/src/main/java/TdbArchiver/GetErrorMessageForAttribute.java
diff --git a/src/main/java/TdbArchiver/RetryForAttributeCmd.java b/tdbarchiver/src/main/java/TdbArchiver/RetryForAttributeCmd.java
similarity index 97%
rename from src/main/java/TdbArchiver/RetryForAttributeCmd.java
rename to tdbarchiver/src/main/java/TdbArchiver/RetryForAttributeCmd.java
index 85d39e125297c151339cd0ffbeb6e26033794364..4fe6184558fd3b84b58fbcf951cc4ccce73cf091 100644
--- a/src/main/java/TdbArchiver/RetryForAttributeCmd.java
+++ b/tdbarchiver/src/main/java/TdbArchiver/RetryForAttributeCmd.java
@@ -1,122 +1,122 @@
-package TdbArchiver;
-
-import org.omg.CORBA.Any;
-
-import fr.esrf.Tango.DevFailed;
-import fr.esrf.Tango.DevState;
-import fr.esrf.Tango.DispLevel;
-import fr.esrf.TangoDs.Command;
-import fr.esrf.TangoDs.DeviceImpl;
-import fr.esrf.TangoDs.Except;
-import fr.esrf.TangoDs.TangoConst;
-import fr.soleil.archiving.hdbtdb.api.ConfigConst;
-
-/**
- * Class Description: Command that stops the archiving of an attibute. This
- * command need an AttributeLightMode type object. An AttributeLightMode type
- * object encapsulate all the informations needed to found the Collector in
- * charge of the archiving of the specified attribute The informations needed
- * are the type, the format, the writable property and the archiving mode
- */
-
-public class RetryForAttributeCmd extends Command implements TangoConst {
-    // ===============================================================
-    /**
-     * Constructor for Command class StopArchiveAttCmd
-     * 
-     * @param name
-     *            command name
-     * @param in
-     *            argin type
-     * @param out
-     *            argout type
-     */
-    // ===============================================================
-    public RetryForAttributeCmd(final String name, final int in, final int out) {
-        super(name, in, out);
-    }
-
-    // ===============================================================
-    /**
-     * Constructor for Command class StopArchiveAttCmd
-     * 
-     * @param name
-     *            command name
-     * @param in
-     *            argin type
-     * @param in_comments
-     *            argin description
-     * @param out
-     *            argout type
-     * @param out_comments
-     *            argout description
-     */
-    // ===============================================================
-    public RetryForAttributeCmd(final String name, final int in, final int out, final String in_comments,
-            final String out_comments) {
-        super(name, in, out, in_comments, out_comments);
-    }
-
-    // ===============================================================
-    /**
-     * Constructor for Command class StopArchiveAttCmd
-     * 
-     * @param name
-     *            command name
-     * @param in
-     *            argin type
-     * @param in_comments
-     *            argin description
-     * @param out
-     *            argout type
-     * @param out_comments
-     *            argout description
-     * @param level
-     *            The command display type OPERATOR or EXPERT
-     */
-    // ===============================================================
-    public RetryForAttributeCmd(final String name, final int in, final int out, final String in_comments,
-            final String out_comments, final DispLevel level) {
-        super(name, in, out, in_comments, out_comments, level);
-    }
-
-    // ===============================================================
-    /**
-     * return the result of the device's command.
-     */
-    // ===============================================================
-    @Override
-    public Any execute(final DeviceImpl device, final Any in_any) throws DevFailed {
-        if (!(device instanceof TdbArchiver)) {
-            Except.throw_exception("DEVICE_ERROR", "Device parameter is not instance of TdbArchiver",
-                    ConfigConst.TDB_CLASS_DEVICE);
-        }
-
-        final String argin = super.extract_DevString(in_any);
-        return insert(((TdbArchiver) device).retry_for_attribute(argin));
-    }
-
-    // ===============================================================
-    /**
-     * Check if it is allowed to execute the command.
-     */
-    // ===============================================================
-    @Override
-    public boolean is_allowed(final DeviceImpl device, final Any data_in) {
-        if (device.get_state() == DevState.FAULT) {
-            // if (device.get_state() != DevState.ON) {
-            // End of Generated Code
-
-            // Re-Start of Generated Code
-            return false;
-        }
-        return true;
-    }
-}
-
-// -----------------------------------------------------------------------------
-/*
- * end of $Source:
- * /cvsroot/tango-cs/tango/jserver/archiving/TdbArchiver/RetryForAttributeCmd
- * .java,v $
- */
+package TdbArchiver;
+
+import org.omg.CORBA.Any;
+
+import fr.esrf.Tango.DevFailed;
+import fr.esrf.Tango.DevState;
+import fr.esrf.Tango.DispLevel;
+import fr.esrf.TangoDs.Command;
+import fr.esrf.TangoDs.DeviceImpl;
+import fr.esrf.TangoDs.Except;
+import fr.esrf.TangoDs.TangoConst;
+import fr.soleil.archiving.hdbtdb.api.ConfigConst;
+
+/**
+ * Class Description: Command that stops the archiving of an attibute. This
+ * command need an AttributeLightMode type object. An AttributeLightMode type
+ * object encapsulate all the informations needed to found the Collector in
+ * charge of the archiving of the specified attribute The informations needed
+ * are the type, the format, the writable property and the archiving mode
+ */
+
+public class RetryForAttributeCmd extends Command implements TangoConst {
+    // ===============================================================
+    /**
+     * Constructor for Command class StopArchiveAttCmd
+     * 
+     * @param name
+     *            command name
+     * @param in
+     *            argin type
+     * @param out
+     *            argout type
+     */
+    // ===============================================================
+    public RetryForAttributeCmd(final String name, final int in, final int out) {
+        super(name, in, out);
+    }
+
+    // ===============================================================
+    /**
+     * Constructor for Command class StopArchiveAttCmd
+     * 
+     * @param name
+     *            command name
+     * @param in
+     *            argin type
+     * @param in_comments
+     *            argin description
+     * @param out
+     *            argout type
+     * @param out_comments
+     *            argout description
+     */
+    // ===============================================================
+    public RetryForAttributeCmd(final String name, final int in, final int out, final String in_comments,
+            final String out_comments) {
+        super(name, in, out, in_comments, out_comments);
+    }
+
+    // ===============================================================
+    /**
+     * Constructor for Command class StopArchiveAttCmd
+     * 
+     * @param name
+     *            command name
+     * @param in
+     *            argin type
+     * @param in_comments
+     *            argin description
+     * @param out
+     *            argout type
+     * @param out_comments
+     *            argout description
+     * @param level
+     *            The command display type OPERATOR or EXPERT
+     */
+    // ===============================================================
+    public RetryForAttributeCmd(final String name, final int in, final int out, final String in_comments,
+            final String out_comments, final DispLevel level) {
+        super(name, in, out, in_comments, out_comments, level);
+    }
+
+    // ===============================================================
+    /**
+     * return the result of the device's command.
+     */
+    // ===============================================================
+    @Override
+    public Any execute(final DeviceImpl device, final Any in_any) throws DevFailed {
+        if (!(device instanceof TdbArchiver)) {
+            Except.throw_exception("DEVICE_ERROR", "Device parameter is not instance of TdbArchiver",
+                    ConfigConst.TDB_CLASS_DEVICE);
+        }
+
+        final String argin = super.extract_DevString(in_any);
+        return insert(((TdbArchiver) device).retry_for_attribute(argin));
+    }
+
+    // ===============================================================
+    /**
+     * Check if it is allowed to execute the command.
+     */
+    // ===============================================================
+    @Override
+    public boolean is_allowed(final DeviceImpl device, final Any data_in) {
+        if (device.get_state() == DevState.FAULT) {
+            // if (device.get_state() != DevState.ON) {
+            // End of Generated Code
+
+            // Re-Start of Generated Code
+            return false;
+        }
+        return true;
+    }
+}
+
+// -----------------------------------------------------------------------------
+/*
+ * end of $Source:
+ * /cvsroot/tango-cs/tango/jserver/archiving/TdbArchiver/RetryForAttributeCmd
+ * .java,v $
+ */
diff --git a/src/main/java/TdbArchiver/RetryForAttributesCmd.java b/tdbarchiver/src/main/java/TdbArchiver/RetryForAttributesCmd.java
similarity index 97%
rename from src/main/java/TdbArchiver/RetryForAttributesCmd.java
rename to tdbarchiver/src/main/java/TdbArchiver/RetryForAttributesCmd.java
index ccf45f861f9624f18a88534e447178a36071ea39..b3844f4952b516581e01fdf4698d86e1849c53fc 100644
--- a/src/main/java/TdbArchiver/RetryForAttributesCmd.java
+++ b/tdbarchiver/src/main/java/TdbArchiver/RetryForAttributesCmd.java
@@ -1,121 +1,121 @@
-package TdbArchiver;
-
-import org.omg.CORBA.Any;
-
-import fr.esrf.Tango.DevFailed;
-import fr.esrf.Tango.DevState;
-import fr.esrf.Tango.DispLevel;
-import fr.esrf.TangoDs.Command;
-import fr.esrf.TangoDs.DeviceImpl;
-import fr.esrf.TangoDs.Except;
-import fr.esrf.TangoDs.TangoConst;
-import fr.esrf.TangoDs.Util;
-import fr.soleil.archiving.hdbtdb.api.ConfigConst;
-
-/**
- * Class Description:
- * 
- */
-
-public class RetryForAttributesCmd extends Command implements TangoConst {
-    // ===============================================================
-    /**
-     * Constructor for Command class StopArchiveAttCmd
-     * 
-     * @param name
-     *            command name
-     * @param in
-     *            argin type
-     * @param out
-     *            argout type
-     */
-    // ===============================================================
-    public RetryForAttributesCmd(final String name, final int in, final int out) {
-        super(name, in, out);
-    }
-
-    // ===============================================================
-    /**
-     * Constructor for Command class StopArchiveAttCmd
-     * 
-     * @param name
-     *            command name
-     * @param in
-     *            argin type
-     * @param in_comments
-     *            argin description
-     * @param out
-     *            argout type
-     * @param out_comments
-     *            argout description
-     */
-    // ===============================================================
-    public RetryForAttributesCmd(final String name, final int in, final int out, final String in_comments,
-            final String out_comments) {
-        super(name, in, out, in_comments, out_comments);
-    }
-
-    // ===============================================================
-    /**
-     * Constructor for Command class StopArchiveAttCmd
-     * 
-     * @param name
-     *            command name
-     * @param in
-     *            argin type
-     * @param in_comments
-     *            argin description
-     * @param out
-     *            argout type
-     * @param out_comments
-     *            argout description
-     * @param level
-     *            The command display type OPERATOR or EXPERT
-     */
-    // ===============================================================
-    public RetryForAttributesCmd(final String name, final int in, final int out, final String in_comments,
-            final String out_comments, final DispLevel level) {
-        super(name, in, out, in_comments, out_comments, level);
-    }
-
-    // ===============================================================
-    /**
-     * return the result of the device's command.
-     */
-    // ===============================================================
-    @Override
-    public Any execute(final DeviceImpl device, final Any in_any) throws DevFailed {
-        Util.out2.println("RetryForAttributesCmd.execute(): arrived");
-        if (!(device instanceof TdbArchiver)) {
-            Except.throw_exception("DEVICE_ERROR", "Device parameter is not instance of TdbArchiver",
-                    ConfigConst.TDB_CLASS_DEVICE);
-        }
-
-        final String[] argin = super.extract_DevVarStringArray(in_any);
-        return insert(((TdbArchiver) device).retry_for_attributes(argin));
-    }
-
-    // ===============================================================
-    /**
-     * Check if it is allowed to execute the command.
-     */
-    // ===============================================================
-    @Override
-    public boolean is_allowed(final DeviceImpl device, final Any data_in) {
-        if (device.get_state() == DevState.FAULT) {
-            // if (device.get_state() != DevState.ON) {
-            // End of Generated Code
-
-            // Re-Start of Generated Code
-            return false;
-        }
-        return true;
-    }
-}
-
-// -----------------------------------------------------------------------------
-/*
- * end of $Source:
- * /cvsroot/tango-cs/tango/jserver/archiving/TdbArchiver/RetryForAttributesCmd
- * .java,v $
- */
+package TdbArchiver;
+
+import org.omg.CORBA.Any;
+
+import fr.esrf.Tango.DevFailed;
+import fr.esrf.Tango.DevState;
+import fr.esrf.Tango.DispLevel;
+import fr.esrf.TangoDs.Command;
+import fr.esrf.TangoDs.DeviceImpl;
+import fr.esrf.TangoDs.Except;
+import fr.esrf.TangoDs.TangoConst;
+import fr.esrf.TangoDs.Util;
+import fr.soleil.archiving.hdbtdb.api.ConfigConst;
+
+/**
+ * Class Description:
+ * 
+ */
+
+public class RetryForAttributesCmd extends Command implements TangoConst {
+    // ===============================================================
+    /**
+     * Constructor for Command class StopArchiveAttCmd
+     * 
+     * @param name
+     *            command name
+     * @param in
+     *            argin type
+     * @param out
+     *            argout type
+     */
+    // ===============================================================
+    public RetryForAttributesCmd(final String name, final int in, final int out) {
+        super(name, in, out);
+    }
+
+    // ===============================================================
+    /**
+     * Constructor for Command class StopArchiveAttCmd
+     * 
+     * @param name
+     *            command name
+     * @param in
+     *            argin type
+     * @param in_comments
+     *            argin description
+     * @param out
+     *            argout type
+     * @param out_comments
+     *            argout description
+     */
+    // ===============================================================
+    public RetryForAttributesCmd(final String name, final int in, final int out, final String in_comments,
+            final String out_comments) {
+        super(name, in, out, in_comments, out_comments);
+    }
+
+    // ===============================================================
+    /**
+     * Constructor for Command class StopArchiveAttCmd
+     * 
+     * @param name
+     *            command name
+     * @param in
+     *            argin type
+     * @param in_comments
+     *            argin description
+     * @param out
+     *            argout type
+     * @param out_comments
+     *            argout description
+     * @param level
+     *            The command display type OPERATOR or EXPERT
+     */
+    // ===============================================================
+    public RetryForAttributesCmd(final String name, final int in, final int out, final String in_comments,
+            final String out_comments, final DispLevel level) {
+        super(name, in, out, in_comments, out_comments, level);
+    }
+
+    // ===============================================================
+    /**
+     * return the result of the device's command.
+     */
+    // ===============================================================
+    @Override
+    public Any execute(final DeviceImpl device, final Any in_any) throws DevFailed {
+        Util.out2.println("RetryForAttributesCmd.execute(): arrived");
+        if (!(device instanceof TdbArchiver)) {
+            Except.throw_exception("DEVICE_ERROR", "Device parameter is not instance of TdbArchiver",
+                    ConfigConst.TDB_CLASS_DEVICE);
+        }
+
+        final String[] argin = super.extract_DevVarStringArray(in_any);
+        return insert(((TdbArchiver) device).retry_for_attributes(argin));
+    }
+
+    // ===============================================================
+    /**
+     * Check if it is allowed to execute the command.
+     */
+    // ===============================================================
+    @Override
+    public boolean is_allowed(final DeviceImpl device, final Any data_in) {
+        if (device.get_state() == DevState.FAULT) {
+            // if (device.get_state() != DevState.ON) {
+            // End of Generated Code
+
+            // Re-Start of Generated Code
+            return false;
+        }
+        return true;
+    }
+}
+
+// -----------------------------------------------------------------------------
+/*
+ * end of $Source:
+ * /cvsroot/tango-cs/tango/jserver/archiving/TdbArchiver/RetryForAttributesCmd
+ * .java,v $
+ */
diff --git a/src/main/java/TdbArchiver/StateDetailedClass.java b/tdbarchiver/src/main/java/TdbArchiver/StateDetailedClass.java
similarity index 96%
rename from src/main/java/TdbArchiver/StateDetailedClass.java
rename to tdbarchiver/src/main/java/TdbArchiver/StateDetailedClass.java
index d45a7d885b9964eeee590c8b2e76ba7323e12cd8..74ab372b8daaa85c677120523cdbd2f4eba47c83 100644
--- a/src/main/java/TdbArchiver/StateDetailedClass.java
+++ b/tdbarchiver/src/main/java/TdbArchiver/StateDetailedClass.java
@@ -1,150 +1,150 @@
-// +======================================================================
-// $Source: /cvsroot/tango-cs/tango/jserver/archiving/TdbArchiver/StateDetailedClass.java,v $
-//
-// Project:      Tango Device Server
-//
-// Description:  Java source code for the command TemplateClass of the
-//               TdbArchiver class.
-//
-// $Author: chinkumo $
-//
-// $Revision: 1.2 $
-//
-// $Log: StateDetailedClass.java,v $
-// Revision 1.2  2005/11/29 17:34:14  chinkumo
-// no message
-//
-// Revision 1.1.2.2  2005/11/29 16:15:11  chinkumo
-// Code reformated (pogo compatible)
-//
-// Revision 1.1.2.1  2005/11/15 13:55:09  chinkumo
-// First commit !
-//
-//
-// copyleft :    European Synchrotron Radiation Facility
-//               BP 220, Grenoble 38043
-//               FRANCE
-//
-//-======================================================================
-//
-//  		This file is generated by POGO
-//	(Program Obviously used to Generate tango Object)
-//
-//         (c) - Software Engineering Group - ESRF
-//=============================================================================
-
-/**
- * @author $Author: chinkumo $
- * @version $Revision: 1.2 $
- */
-package TdbArchiver;
-
-import org.omg.CORBA.Any;
-
-import fr.esrf.Tango.DevFailed;
-import fr.esrf.Tango.DispLevel;
-import fr.esrf.TangoDs.Command;
-import fr.esrf.TangoDs.DeviceImpl;
-import fr.esrf.TangoDs.Except;
-import fr.esrf.TangoDs.TangoConst;
-import fr.esrf.TangoDs.Util;
-import fr.soleil.archiving.hdbtdb.api.ConfigConst;
-
-/**
- * Class Description: This command returns a detailed state of the device.
- */
-
-public class StateDetailedClass extends Command implements TangoConst {
-    // ===============================================================
-    /**
-     * Constructor for Command class StateDetailedClass
-     * 
-     * @param name
-     *            command name
-     * @param in
-     *            argin type
-     * @param out
-     *            argout type
-     */
-    // ===============================================================
-    public StateDetailedClass(String name, int in, int out) {
-        super(name, in, out);
-    }
-
-    // ===============================================================
-    /**
-     * Constructor for Command class StateDetailedClass
-     * 
-     * @param name
-     *            command name
-     * @param in
-     *            argin type
-     * @param in_comments
-     *            argin description
-     * @param out
-     *            argout type
-     * @param out_comments
-     *            argout description
-     */
-    // ===============================================================
-    public StateDetailedClass(String name, int in, int out, String in_comments, String out_comments) {
-        super(name, in, out, in_comments, out_comments);
-    }
-
-    // ===============================================================
-    /**
-     * Constructor for Command class StateDetailedClass
-     * 
-     * @param name
-     *            command name
-     * @param in
-     *            argin type
-     * @param in_comments
-     *            argin description
-     * @param out
-     *            argout type
-     * @param out_comments
-     *            argout description
-     * @param level
-     *            The command display type OPERATOR or EXPERT
-     */
-    // ===============================================================
-    public StateDetailedClass(String name, int in, int out, String in_comments, String out_comments, DispLevel level) {
-        super(name, in, out, in_comments, out_comments, level);
-    }
-
-    // ===============================================================
-    /**
-     * return the result of the device's command.
-     */
-    // ===============================================================
-    @Override
-    public Any execute(DeviceImpl device, Any in_any) throws DevFailed {
-        Util.out2.println("StateDetailedClass.execute(): arrived");
-        if (!(device instanceof TdbArchiver)) {
-            Except.throw_exception("DEVICE_ERROR", "Device parameter is not instance of TdbArchiver",
-                    ConfigConst.TDB_CLASS_DEVICE);
-        }
-        return insert(((TdbArchiver) (device)).state_detailed());
-    }
-
-    // ===============================================================
-    /**
-     * Check if it is allowed to execute the command.
-     */
-    // ===============================================================
-    @Override
-    public boolean is_allowed(DeviceImpl device, Any data_in) {
-        // End of Generated Code
-
-        // Re-Start of Generated Code
-        return true;
-    }
-}
-
-// -----------------------------------------------------------------------------
-/*
- * end of $Source:
- * /cvsroot/tango-cs/tango/jserver/archiving/TdbArchiver/StateDetailedClass
- * .java,v $
- */
+// +======================================================================
+// $Source: /cvsroot/tango-cs/tango/jserver/archiving/TdbArchiver/StateDetailedClass.java,v $
+//
+// Project:      Tango Device Server
+//
+// Description:  Java source code for the command TemplateClass of the
+//               TdbArchiver class.
+//
+// $Author: chinkumo $
+//
+// $Revision: 1.2 $
+//
+// $Log: StateDetailedClass.java,v $
+// Revision 1.2  2005/11/29 17:34:14  chinkumo
+// no message
+//
+// Revision 1.1.2.2  2005/11/29 16:15:11  chinkumo
+// Code reformated (pogo compatible)
+//
+// Revision 1.1.2.1  2005/11/15 13:55:09  chinkumo
+// First commit !
+//
+//
+// copyleft :    European Synchrotron Radiation Facility
+//               BP 220, Grenoble 38043
+//               FRANCE
+//
+//-======================================================================
+//
+//  		This file is generated by POGO
+//	(Program Obviously used to Generate tango Object)
+//
+//         (c) - Software Engineering Group - ESRF
+//=============================================================================
+
+/**
+ * @author $Author: chinkumo $
+ * @version $Revision: 1.2 $
+ */
+package TdbArchiver;
+
+import org.omg.CORBA.Any;
+
+import fr.esrf.Tango.DevFailed;
+import fr.esrf.Tango.DispLevel;
+import fr.esrf.TangoDs.Command;
+import fr.esrf.TangoDs.DeviceImpl;
+import fr.esrf.TangoDs.Except;
+import fr.esrf.TangoDs.TangoConst;
+import fr.esrf.TangoDs.Util;
+import fr.soleil.archiving.hdbtdb.api.ConfigConst;
+
+/**
+ * Class Description: This command returns a detailed state of the device.
+ */
+
+public class StateDetailedClass extends Command implements TangoConst {
+    // ===============================================================
+    /**
+     * Constructor for Command class StateDetailedClass
+     * 
+     * @param name
+     *            command name
+     * @param in
+     *            argin type
+     * @param out
+     *            argout type
+     */
+    // ===============================================================
+    public StateDetailedClass(String name, int in, int out) {
+        super(name, in, out);
+    }
+
+    // ===============================================================
+    /**
+     * Constructor for Command class StateDetailedClass
+     * 
+     * @param name
+     *            command name
+     * @param in
+     *            argin type
+     * @param in_comments
+     *            argin description
+     * @param out
+     *            argout type
+     * @param out_comments
+     *            argout description
+     */
+    // ===============================================================
+    public StateDetailedClass(String name, int in, int out, String in_comments, String out_comments) {
+        super(name, in, out, in_comments, out_comments);
+    }
+
+    // ===============================================================
+    /**
+     * Constructor for Command class StateDetailedClass
+     * 
+     * @param name
+     *            command name
+     * @param in
+     *            argin type
+     * @param in_comments
+     *            argin description
+     * @param out
+     *            argout type
+     * @param out_comments
+     *            argout description
+     * @param level
+     *            The command display type OPERATOR or EXPERT
+     */
+    // ===============================================================
+    public StateDetailedClass(String name, int in, int out, String in_comments, String out_comments, DispLevel level) {
+        super(name, in, out, in_comments, out_comments, level);
+    }
+
+    // ===============================================================
+    /**
+     * return the result of the device's command.
+     */
+    // ===============================================================
+    @Override
+    public Any execute(DeviceImpl device, Any in_any) throws DevFailed {
+        Util.out2.println("StateDetailedClass.execute(): arrived");
+        if (!(device instanceof TdbArchiver)) {
+            Except.throw_exception("DEVICE_ERROR", "Device parameter is not instance of TdbArchiver",
+                    ConfigConst.TDB_CLASS_DEVICE);
+        }
+        return insert(((TdbArchiver) (device)).state_detailed());
+    }
+
+    // ===============================================================
+    /**
+     * Check if it is allowed to execute the command.
+     */
+    // ===============================================================
+    @Override
+    public boolean is_allowed(DeviceImpl device, Any data_in) {
+        // End of Generated Code
+
+        // Re-Start of Generated Code
+        return true;
+    }
+}
+
+// -----------------------------------------------------------------------------
+/*
+ * end of $Source:
+ * /cvsroot/tango-cs/tango/jserver/archiving/TdbArchiver/StateDetailedClass
+ * .java,v $
+ */
diff --git a/src/main/java/TdbArchiver/StopArchiveAttCmd.java b/tdbarchiver/src/main/java/TdbArchiver/StopArchiveAttCmd.java
similarity index 96%
rename from src/main/java/TdbArchiver/StopArchiveAttCmd.java
rename to tdbarchiver/src/main/java/TdbArchiver/StopArchiveAttCmd.java
index de4392e69cda058a7435dbcd4e446e49709c57f7..429e196952cf09a98805891828ae66828116fef0 100644
--- a/src/main/java/TdbArchiver/StopArchiveAttCmd.java
+++ b/tdbarchiver/src/main/java/TdbArchiver/StopArchiveAttCmd.java
@@ -1,167 +1,167 @@
-// +======================================================================
-// $Source: /cvsroot/tango-cs/tango/jserver/archiving/TdbArchiver/StopArchiveAttCmd.java,v $
-//
-// Project:      Tango Device Server
-//
-// Description:  Java source code for the command TemplateClass of the
-//               TdbArchiver class.
-//
-// $Author: chinkumo $
-//
-// $Revision: 1.4 $
-//
-// $Log: StopArchiveAttCmd.java,v $
-// Revision 1.4  2005/11/29 17:34:14  chinkumo
-// no message
-//
-// Revision 1.3.10.3  2005/11/29 16:15:11  chinkumo
-// Code reformated (pogo compatible)
-//
-// Revision 1.3.10.2  2005/11/15 13:45:39  chinkumo
-// ...
-//
-// Revision 1.3.10.1  2005/09/26 08:01:54  chinkumo
-// Minor changes !
-//
-// Revision 1.3  2005/06/15 14:03:00  chinkumo
-// The device was regenerated in Tango V5.
-//
-//
-// copyleft :    European Synchrotron Radiation Facility
-//               BP 220, Grenoble 38043
-//               FRANCE
-//
-//-======================================================================
-//
-//  		This file is generated by POGO
-//	(Program Obviously used to Generate tango Object)
-//
-//         (c) - Software Engineering Group - ESRF
-//=============================================================================
-
-/**
- * @author $Author: chinkumo $
- * @version $Revision: 1.4 $
- */
-package TdbArchiver;
-
-import org.omg.CORBA.Any;
-
-import fr.esrf.Tango.DevFailed;
-import fr.esrf.Tango.DevState;
-import fr.esrf.Tango.DispLevel;
-import fr.esrf.TangoDs.Command;
-import fr.esrf.TangoDs.DeviceImpl;
-import fr.esrf.TangoDs.Except;
-import fr.esrf.TangoDs.TangoConst;
-import fr.esrf.TangoDs.Util;
-import fr.soleil.archiving.hdbtdb.api.ConfigConst;
-
-/**
- * Class Description: This command need an AttributeLightMode type object. An
- * AttributeLightMode type object encapsulate all the informations needed to
- * found the Collector in charge of the archiving of the specified attribute The
- * informations needed are the type, the format, the writable property and the
- * archiving mode
- */
-
-public class StopArchiveAttCmd extends Command implements TangoConst {
-    // ===============================================================
-    /**
-     * Constructor for Command class StopArchiveAttCmd
-     * 
-     * @param name
-     *            command name
-     * @param in
-     *            argin type
-     * @param out
-     *            argout type
-     */
-    // ===============================================================
-    public StopArchiveAttCmd(String name, int in, int out) {
-        super(name, in, out);
-    }
-
-    // ===============================================================
-    /**
-     * Constructor for Command class StopArchiveAttCmd
-     * 
-     * @param name
-     *            command name
-     * @param in
-     *            argin type
-     * @param in_comments
-     *            argin description
-     * @param out
-     *            argout type
-     * @param out_comments
-     *            argout description
-     */
-    // ===============================================================
-    public StopArchiveAttCmd(String name, int in, int out, String in_comments, String out_comments) {
-        super(name, in, out, in_comments, out_comments);
-    }
-
-    // ===============================================================
-    /**
-     * Constructor for Command class StopArchiveAttCmd
-     * 
-     * @param name
-     *            command name
-     * @param in
-     *            argin type
-     * @param in_comments
-     *            argin description
-     * @param out
-     *            argout type
-     * @param out_comments
-     *            argout description
-     * @param level
-     *            The command display type OPERATOR or EXPERT
-     */
-    // ===============================================================
-    public StopArchiveAttCmd(String name, int in, int out, String in_comments, String out_comments, DispLevel level) {
-        super(name, in, out, in_comments, out_comments, level);
-    }
-
-    // ===============================================================
-    /**
-     * return the result of the device's command.
-     */
-    // ===============================================================
-    @Override
-    public Any execute(DeviceImpl device, Any in_any) throws DevFailed {
-        Util.out2.println("StopArchiveAttCmd.execute(): arrived");
-        if (!(device instanceof TdbArchiver)) {
-            Except.throw_exception("DEVICE_ERROR", "Device parameter is not instance of TdbArchiver",
-                    ConfigConst.TDB_CLASS_DEVICE);
-        }
-
-        String[] argin = extract_DevVarStringArray(in_any);
-        ((TdbArchiver) (device)).stop_archive_att(argin);
-        return insert();
-    }
-
-    // ===============================================================
-    /**
-     * Check if it is allowed to execute the command.
-     */
-    // ===============================================================
-    @Override
-    public boolean is_allowed(DeviceImpl device, Any data_in) {
-        if (device.get_state() == DevState.FAULT) {
-            // End of Generated Code
-
-            // Re-Start of Generated Code
-            return false;
-        }
-        return true;
-    }
-}
-
-// -----------------------------------------------------------------------------
-/*
- * end of $Source:
- * /cvsroot/tango-cs/tango/jserver/archiving/TdbArchiver/StopArchiveAttCmd
- * .java,v $
- */
+// +======================================================================
+// $Source: /cvsroot/tango-cs/tango/jserver/archiving/TdbArchiver/StopArchiveAttCmd.java,v $
+//
+// Project:      Tango Device Server
+//
+// Description:  Java source code for the command TemplateClass of the
+//               TdbArchiver class.
+//
+// $Author: chinkumo $
+//
+// $Revision: 1.4 $
+//
+// $Log: StopArchiveAttCmd.java,v $
+// Revision 1.4  2005/11/29 17:34:14  chinkumo
+// no message
+//
+// Revision 1.3.10.3  2005/11/29 16:15:11  chinkumo
+// Code reformated (pogo compatible)
+//
+// Revision 1.3.10.2  2005/11/15 13:45:39  chinkumo
+// ...
+//
+// Revision 1.3.10.1  2005/09/26 08:01:54  chinkumo
+// Minor changes !
+//
+// Revision 1.3  2005/06/15 14:03:00  chinkumo
+// The device was regenerated in Tango V5.
+//
+//
+// copyleft :    European Synchrotron Radiation Facility
+//               BP 220, Grenoble 38043
+//               FRANCE
+//
+//-======================================================================
+//
+//  		This file is generated by POGO
+//	(Program Obviously used to Generate tango Object)
+//
+//         (c) - Software Engineering Group - ESRF
+//=============================================================================
+
+/**
+ * @author $Author: chinkumo $
+ * @version $Revision: 1.4 $
+ */
+package TdbArchiver;
+
+import org.omg.CORBA.Any;
+
+import fr.esrf.Tango.DevFailed;
+import fr.esrf.Tango.DevState;
+import fr.esrf.Tango.DispLevel;
+import fr.esrf.TangoDs.Command;
+import fr.esrf.TangoDs.DeviceImpl;
+import fr.esrf.TangoDs.Except;
+import fr.esrf.TangoDs.TangoConst;
+import fr.esrf.TangoDs.Util;
+import fr.soleil.archiving.hdbtdb.api.ConfigConst;
+
+/**
+ * Class Description: This command need an AttributeLightMode type object. An
+ * AttributeLightMode type object encapsulate all the informations needed to
+ * found the Collector in charge of the archiving of the specified attribute The
+ * informations needed are the type, the format, the writable property and the
+ * archiving mode
+ */
+
+public class StopArchiveAttCmd extends Command implements TangoConst {
+    // ===============================================================
+    /**
+     * Constructor for Command class StopArchiveAttCmd
+     * 
+     * @param name
+     *            command name
+     * @param in
+     *            argin type
+     * @param out
+     *            argout type
+     */
+    // ===============================================================
+    public StopArchiveAttCmd(String name, int in, int out) {
+        super(name, in, out);
+    }
+
+    // ===============================================================
+    /**
+     * Constructor for Command class StopArchiveAttCmd
+     * 
+     * @param name
+     *            command name
+     * @param in
+     *            argin type
+     * @param in_comments
+     *            argin description
+     * @param out
+     *            argout type
+     * @param out_comments
+     *            argout description
+     */
+    // ===============================================================
+    public StopArchiveAttCmd(String name, int in, int out, String in_comments, String out_comments) {
+        super(name, in, out, in_comments, out_comments);
+    }
+
+    // ===============================================================
+    /**
+     * Constructor for Command class StopArchiveAttCmd
+     * 
+     * @param name
+     *            command name
+     * @param in
+     *            argin type
+     * @param in_comments
+     *            argin description
+     * @param out
+     *            argout type
+     * @param out_comments
+     *            argout description
+     * @param level
+     *            The command display type OPERATOR or EXPERT
+     */
+    // ===============================================================
+    public StopArchiveAttCmd(String name, int in, int out, String in_comments, String out_comments, DispLevel level) {
+        super(name, in, out, in_comments, out_comments, level);
+    }
+
+    // ===============================================================
+    /**
+     * return the result of the device's command.
+     */
+    // ===============================================================
+    @Override
+    public Any execute(DeviceImpl device, Any in_any) throws DevFailed {
+        Util.out2.println("StopArchiveAttCmd.execute(): arrived");
+        if (!(device instanceof TdbArchiver)) {
+            Except.throw_exception("DEVICE_ERROR", "Device parameter is not instance of TdbArchiver",
+                    ConfigConst.TDB_CLASS_DEVICE);
+        }
+
+        String[] argin = extract_DevVarStringArray(in_any);
+        ((TdbArchiver) (device)).stop_archive_att(argin);
+        return insert();
+    }
+
+    // ===============================================================
+    /**
+     * Check if it is allowed to execute the command.
+     */
+    // ===============================================================
+    @Override
+    public boolean is_allowed(DeviceImpl device, Any data_in) {
+        if (device.get_state() == DevState.FAULT) {
+            // End of Generated Code
+
+            // Re-Start of Generated Code
+            return false;
+        }
+        return true;
+    }
+}
+
+// -----------------------------------------------------------------------------
+/*
+ * end of $Source:
+ * /cvsroot/tango-cs/tango/jserver/archiving/TdbArchiver/StopArchiveAttCmd
+ * .java,v $
+ */
diff --git a/src/main/java/TdbArchiver/StopArchiveConfCmd.java b/tdbarchiver/src/main/java/TdbArchiver/StopArchiveConfCmd.java
similarity index 96%
rename from src/main/java/TdbArchiver/StopArchiveConfCmd.java
rename to tdbarchiver/src/main/java/TdbArchiver/StopArchiveConfCmd.java
index 7aadc29ee088c38dfccc26efa244039334d9a5b7..4b21f871ed16a286fb5f8efc46acf20368f0f3e0 100644
--- a/src/main/java/TdbArchiver/StopArchiveConfCmd.java
+++ b/tdbarchiver/src/main/java/TdbArchiver/StopArchiveConfCmd.java
@@ -1,164 +1,164 @@
-// +======================================================================
-// $Source: /cvsroot/tango-cs/tango/jserver/archiving/TdbArchiver/StopArchiveConfCmd.java,v $
-//
-// Project:      Tango Device Server
-//
-// Description:  Java source code for the command TemplateClass of the
-//               TdbArchiver class.
-//
-// $Author: chinkumo $
-//
-// $Revision: 1.4 $
-//
-// $Log: StopArchiveConfCmd.java,v $
-// Revision 1.4  2005/11/29 17:34:14  chinkumo
-// no message
-//
-// Revision 1.3.10.3  2005/11/29 16:15:11  chinkumo
-// Code reformated (pogo compatible)
-//
-// Revision 1.3.10.2  2005/11/15 13:45:39  chinkumo
-// ...
-//
-// Revision 1.3.10.1  2005/09/26 08:01:54  chinkumo
-// Minor changes !
-//
-// Revision 1.3  2005/06/15 14:03:00  chinkumo
-// The device was regenerated in Tango V5.
-//
-//
-// copyleft :    European Synchrotron Radiation Facility
-//               BP 220, Grenoble 38043
-//               FRANCE
-//
-//-======================================================================
-//
-//  		This file is generated by POGO
-//	(Program Obviously used to Generate tango Object)
-//
-//         (c) - Software Engineering Group - ESRF
-//=============================================================================
-
-/**
- * @author $Author: chinkumo $
- * @version $Revision: 1.4 $
- */
-package TdbArchiver;
-
-import org.omg.CORBA.Any;
-
-import fr.esrf.Tango.DevFailed;
-import fr.esrf.Tango.DevState;
-import fr.esrf.Tango.DispLevel;
-import fr.esrf.TangoDs.Command;
-import fr.esrf.TangoDs.DeviceImpl;
-import fr.esrf.TangoDs.Except;
-import fr.esrf.TangoDs.TangoConst;
-import fr.esrf.TangoDs.Util;
-import fr.soleil.archiving.hdbtdb.api.ConfigConst;
-
-/**
- * Class Description: This command is invoked when stopping the archiving of a
- * group of attributes.
- */
-
-public class StopArchiveConfCmd extends Command implements TangoConst {
-    // ===============================================================
-    /**
-     * Constructor for Command class StopArchiveConfCmd
-     * 
-     * @param name
-     *            command name
-     * @param in
-     *            argin type
-     * @param out
-     *            argout type
-     */
-    // ===============================================================
-    public StopArchiveConfCmd(String name, int in, int out) {
-        super(name, in, out);
-    }
-
-    // ===============================================================
-    /**
-     * Constructor for Command class StopArchiveConfCmd
-     * 
-     * @param name
-     *            command name
-     * @param in
-     *            argin type
-     * @param in_comments
-     *            argin description
-     * @param out
-     *            argout type
-     * @param out_comments
-     *            argout description
-     */
-    // ===============================================================
-    public StopArchiveConfCmd(String name, int in, int out, String in_comments, String out_comments) {
-        super(name, in, out, in_comments, out_comments);
-    }
-
-    // ===============================================================
-    /**
-     * Constructor for Command class StopArchiveConfCmd
-     * 
-     * @param name
-     *            command name
-     * @param in
-     *            argin type
-     * @param in_comments
-     *            argin description
-     * @param out
-     *            argout type
-     * @param out_comments
-     *            argout description
-     * @param level
-     *            The command display type OPERATOR or EXPERT
-     */
-    // ===============================================================
-    public StopArchiveConfCmd(String name, int in, int out, String in_comments, String out_comments, DispLevel level) {
-        super(name, in, out, in_comments, out_comments, level);
-    }
-
-    // ===============================================================
-    /**
-     * return the result of the device's command.
-     */
-    // ===============================================================
-    @Override
-    public Any execute(DeviceImpl device, Any in_any) throws DevFailed {
-        Util.out2.println("StopArchiveConfCmd.execute(): arrived");
-        if (!(device instanceof TdbArchiver)) {
-            Except.throw_exception("DEVICE_ERROR", "Device parameter is not instance of TdbArchiver",
-                    ConfigConst.TDB_CLASS_DEVICE);
-        }
-
-        String[] argin = extract_DevVarStringArray(in_any);
-        ((TdbArchiver) (device)).stop_archive_conf(argin);
-        return insert();
-    }
-
-    // ===============================================================
-    /**
-     * Check if it is allowed to execute the command.
-     */
-    // ===============================================================
-    @Override
-    public boolean is_allowed(DeviceImpl device, Any data_in) {
-        if (device.get_state() == DevState.FAULT) {
-            // End of Generated Code
-
-            // Re-Start of Generated Code
-            return false;
-        }
-        return true;
-    }
-}
-
-// -----------------------------------------------------------------------------
-/*
- * end of $Source:
- * /cvsroot/tango-cs/tango/jserver/archiving/TdbArchiver/StopArchiveConfCmd
- * .java,v $
- */
+// +======================================================================
+// $Source: /cvsroot/tango-cs/tango/jserver/archiving/TdbArchiver/StopArchiveConfCmd.java,v $
+//
+// Project:      Tango Device Server
+//
+// Description:  Java source code for the command TemplateClass of the
+//               TdbArchiver class.
+//
+// $Author: chinkumo $
+//
+// $Revision: 1.4 $
+//
+// $Log: StopArchiveConfCmd.java,v $
+// Revision 1.4  2005/11/29 17:34:14  chinkumo
+// no message
+//
+// Revision 1.3.10.3  2005/11/29 16:15:11  chinkumo
+// Code reformated (pogo compatible)
+//
+// Revision 1.3.10.2  2005/11/15 13:45:39  chinkumo
+// ...
+//
+// Revision 1.3.10.1  2005/09/26 08:01:54  chinkumo
+// Minor changes !
+//
+// Revision 1.3  2005/06/15 14:03:00  chinkumo
+// The device was regenerated in Tango V5.
+//
+//
+// copyleft :    European Synchrotron Radiation Facility
+//               BP 220, Grenoble 38043
+//               FRANCE
+//
+//-======================================================================
+//
+//  		This file is generated by POGO
+//	(Program Obviously used to Generate tango Object)
+//
+//         (c) - Software Engineering Group - ESRF
+//=============================================================================
+
+/**
+ * @author $Author: chinkumo $
+ * @version $Revision: 1.4 $
+ */
+package TdbArchiver;
+
+import org.omg.CORBA.Any;
+
+import fr.esrf.Tango.DevFailed;
+import fr.esrf.Tango.DevState;
+import fr.esrf.Tango.DispLevel;
+import fr.esrf.TangoDs.Command;
+import fr.esrf.TangoDs.DeviceImpl;
+import fr.esrf.TangoDs.Except;
+import fr.esrf.TangoDs.TangoConst;
+import fr.esrf.TangoDs.Util;
+import fr.soleil.archiving.hdbtdb.api.ConfigConst;
+
+/**
+ * Class Description: This command is invoked when stopping the archiving of a
+ * group of attributes.
+ */
+
+public class StopArchiveConfCmd extends Command implements TangoConst {
+    // ===============================================================
+    /**
+     * Constructor for Command class StopArchiveConfCmd
+     * 
+     * @param name
+     *            command name
+     * @param in
+     *            argin type
+     * @param out
+     *            argout type
+     */
+    // ===============================================================
+    public StopArchiveConfCmd(String name, int in, int out) {
+        super(name, in, out);
+    }
+
+    // ===============================================================
+    /**
+     * Constructor for Command class StopArchiveConfCmd
+     * 
+     * @param name
+     *            command name
+     * @param in
+     *            argin type
+     * @param in_comments
+     *            argin description
+     * @param out
+     *            argout type
+     * @param out_comments
+     *            argout description
+     */
+    // ===============================================================
+    public StopArchiveConfCmd(String name, int in, int out, String in_comments, String out_comments) {
+        super(name, in, out, in_comments, out_comments);
+    }
+
+    // ===============================================================
+    /**
+     * Constructor for Command class StopArchiveConfCmd
+     * 
+     * @param name
+     *            command name
+     * @param in
+     *            argin type
+     * @param in_comments
+     *            argin description
+     * @param out
+     *            argout type
+     * @param out_comments
+     *            argout description
+     * @param level
+     *            The command display type OPERATOR or EXPERT
+     */
+    // ===============================================================
+    public StopArchiveConfCmd(String name, int in, int out, String in_comments, String out_comments, DispLevel level) {
+        super(name, in, out, in_comments, out_comments, level);
+    }
+
+    // ===============================================================
+    /**
+     * return the result of the device's command.
+     */
+    // ===============================================================
+    @Override
+    public Any execute(DeviceImpl device, Any in_any) throws DevFailed {
+        Util.out2.println("StopArchiveConfCmd.execute(): arrived");
+        if (!(device instanceof TdbArchiver)) {
+            Except.throw_exception("DEVICE_ERROR", "Device parameter is not instance of TdbArchiver",
+                    ConfigConst.TDB_CLASS_DEVICE);
+        }
+
+        String[] argin = extract_DevVarStringArray(in_any);
+        ((TdbArchiver) (device)).stop_archive_conf(argin);
+        return insert();
+    }
+
+    // ===============================================================
+    /**
+     * Check if it is allowed to execute the command.
+     */
+    // ===============================================================
+    @Override
+    public boolean is_allowed(DeviceImpl device, Any data_in) {
+        if (device.get_state() == DevState.FAULT) {
+            // End of Generated Code
+
+            // Re-Start of Generated Code
+            return false;
+        }
+        return true;
+    }
+}
+
+// -----------------------------------------------------------------------------
+/*
+ * end of $Source:
+ * /cvsroot/tango-cs/tango/jserver/archiving/TdbArchiver/StopArchiveConfCmd
+ * .java,v $
+ */
diff --git a/src/main/java/TdbArchiver/TdbArchiver.java b/tdbarchiver/src/main/java/TdbArchiver/TdbArchiver.java
similarity index 97%
rename from src/main/java/TdbArchiver/TdbArchiver.java
rename to tdbarchiver/src/main/java/TdbArchiver/TdbArchiver.java
index b7309070a7bfd8dee772f828d4abce05b6028cc1..9a95a7b3b741e7a2063c6ad6b07610b317e75019 100644
--- a/src/main/java/TdbArchiver/TdbArchiver.java
+++ b/tdbarchiver/src/main/java/TdbArchiver/TdbArchiver.java
@@ -1,1515 +1,1511 @@
-// +============================================================================
-// $Source: /cvsroot/tango-cs/tango/jserver/archiving/TdbArchiver/TdbArchiver.java,v $
-//
-// project :     Tango Device Server
-//
-// Description: java source code for the TdbArchiver class and its commands.
-//              This class is derived from DeviceImpl class.
-//              It represents the CORBA servant obbject which
-//              will be accessed from the network. All commands which
-//              can be executed on the TdbArchiver are implemented
-//              in this file.
-//
-// $Author: pierrejoseph $
-//
-// $Revision: 1.85 $
-//
-// $Log: TdbArchiver.java,v $
-// Revision 1.85  2007/08/27 14:14:35  pierrejoseph
-// Traces addition : the logger object is stored in the TdbCollectorFactory
-//
-// Revision 1.84  2007/06/15 14:27:41  pierrejoseph
-// add traces in trigger to locate the collector freezing
-//
-// Revision 1.83  2007/06/04 11:51:24  pierrejoseph
-// logger info addition in trigger_archive_conf
-//
-// Revision 1.82  2007/06/04 10:36:53  pierrejoseph
-// logger info addition
-//
-// Revision 1.81  2007/05/25 12:06:54  pierrejoseph
-// system.out suppressions
-// update trigger_archive_conf if the insertModeRecord raised an exception (aligned on Hdb behaviour)
-//
-// Revision 1.80  2007/05/11 13:58:55  pierrejoseph
-// Attribute addition : release version
-//
-// Revision 1.79  2007/05/10 16:23:45  chinkumo
-// Archiving Version 1.2.0  for Tango 5.5.8
-//
-// Revision 1.78  2007/04/24 14:29:28  ounsy
-// added a log in the case of unexpected ClassCast exception on the event's value
-//
-// Revision 1.77  2007/04/05 10:06:03  chinkumo
-// New Release 5.5.7
-//
-// Revision 1.76  2007/03/27 09:17:52  ounsy
-// move the AMT updating upwards in stop_archive_att so that the archiving can be stopped even if no collector was created (as can happen for reserved attributes of formerly-dedicated archivers).
-//
-// Revision 1.75  2007/03/05 16:25:19  ounsy
-// non-static DataBase
-//
-// Revision 1.74  2007/02/27 15:32:21  ounsy
-// added a bit of test code in read_attr
-//
-// Revision 1.73  2007/02/26 16:14:24  ounsy
-// archiving devices now inherits just from DeviceImpl instead of
-// DeviceImplWithShutdownRunnable (they're nonlonger unexported onn shutdown)
-//
-// Revision 1.72  2007/02/26 08:31:47  chinkumo
-// For Tango 5.5.6
-//
-// Revision 1.71  2007/02/19 13:01:45  pierrejoseph
-// Add a trace in case of insertion error in amt table.
-//
-// Revision 1.70  2007/02/19 09:06:26  chinkumo
-// Release 19 - 02 - 2007 for Tango 5.5.6
-//
-// Revision 1.69  2007/02/01 13:52:41  pierrejoseph
-// minor changes
-//
-// Revision 1.68  2007/01/11 07:36:07  chinkumo
-// Release / 2007-01-11
-//
-// Revision 1.67  2007/01/09 16:44:57  ounsy
-// commands that lock the device into the RUNNING state now set it back to ON even if they encountered exceptions. in this case an entry is logged into the archiver's diary.
-//
-// Revision 1.66  2007/01/09 15:16:04  ounsy
-// put the Giacomo version back for XDBCollectorFactory.removeAllForAttribute
-//
-// Revision 1.65  2007/01/05 12:56:35  pierrejoseph
-// Modification of the ArchivingMessConfig object creation and the trigger_archive_conf method argin has lost its first value.
-//
-// Revision 1.64  2007/01/04 08:48:02  chinkumo
-// Production of the dated version 2007-01-04
-//
-// Revision 1.63  2006/12/08 07:45:13  chinkumo
-// date of the version : 2006-12-08
-//
-// Revision 1.62  2006/11/24 14:54:16  ounsy
-// we re-use the old removeAllForAttribute
-//
-// Revision 1.61  2006/11/24 14:04:16  ounsy
-// the diary entry in case of missing collector is now done by he archiver
-//
-// Revision 1.60  2006/11/24 13:19:35  ounsy
-// TdbCollectorFactory.get(attrLightMode) has a new parameter "doCreateCollectorIfMissing". A missing collector will only be created if this is true, otherwise a message in logged into the archiver's diary and an exception launched
-//
-// Revision 1.59  2006/11/20 09:24:30  ounsy
-// minor changes
-//
-// Revision 1.58  2006/11/16 11:11:18  pierrejoseph
-// Version : 2006-11-16
-//
-// Revision 1.57  2006/11/15 15:48:38  ounsy
-// added the Giacomo correction of removeAllForAttribute
-//
-// Revision 1.56  2006/11/13 15:57:36  ounsy
-// all java devices now inherit from UnexportOnShutdownDeviceImpl instead of from DeviceImpl
-//
-// Revision 1.55  2006/10/19 12:22:52  ounsy
-// modified export_data2_db() to take a new parameter isAsynchronous= false
-//
-// Revision 1.52  2006/10/13 15:00:20  ounsy
-// release date updated
-//
-// Revision 1.51  2006/10/12 15:08:46  ounsy
-// removed a test on whether the archiver is "archiving/tdbarchiver/45" in trigger_archive_conf
-//
-// Revision 1.50  2006/10/11 08:44:15  ounsy
-// release date updated
-//
-// Revision 1.49  2006/10/11 08:31:50  ounsy
-// modified the trigger_archive_conf commands to accept the same parameters as the archiving manager
-//
-// Revision 1.48  2006/10/09 13:55:34  ounsy
-// removed logs
-//
-// Revision 1.47  2006/10/05 15:42:20  ounsy
-// added archivingMessConfig.filter in trigger_archive_conf
-//
-// Revision 1.46  2006/09/18 09:05:01  ounsy
-// minor chages
-//
-// Revision 1.45  2006/09/15 08:56:54  ounsy
-// release date updated
-//
-// Revision 1.44  2006/09/13 09:49:43  ounsy
-// corrected a bug in getDeviceproperty
-//
-// Revision 1.43  2006/09/12 13:01:42  ounsy
-// methods that put the archiver in the RUNNING state now do it from the start and only go to the ON state at the end of the method
-//
-// Revision 1.42  2006/09/08 14:17:45  ounsy
-// added missing descriptions of properties, removed obsolete properties,
-//
-// Revision 1.41  2006/08/29 15:15:12  ounsy
-// release date updated
-//
-// Revision 1.40  2006/08/10 09:28:28  ounsy
-// release date updated
-//
-// Revision 1.39  2006/08/08 12:22:39  ounsy
-// release date updated
-//
-// Revision 1.38  2006/07/31 08:01:23  ounsy
-// release date updated
-//
-// Revision 1.37  2006/07/31 08:00:55  ounsy
-// release date updated
-//
-// Revision 1.36  2006/07/28 13:50:40  ounsy
-// corrected the method name in logRetry
-//
-// Revision 1.35  2006/07/28 09:33:39  ounsy
-// added diary logging on retryForXXXmethods
-//
-// Revision 1.34  2006/07/26 08:44:19  ounsy
-// TdbCollectorFactory no more static
-//
-// Revision 1.33  2006/07/26 08:35:43  ounsy
-// initDevice synchronized
-//
-// Revision 1.32  2006/07/25 13:22:32  ounsy
-// added a "version" attribute
-//
-// Revision 1.31  2006/07/25 09:47:16  ounsy
-// changed the XXX_charge management
-//
-// Revision 1.30  2006/07/21 14:39:02  ounsy
-// minor changes
-//
-// Revision 1.29  2006/07/18 15:11:55  ounsy
-// added a diaryLogLevel property
-//
-// Revision 1.28  2006/07/18 08:02:33  ounsy
-// export_data2_db() now returns the table name
-//
-// Revision 1.27  2006/06/29 08:45:10  ounsy
-// added a hasDiary property (default false) that has to be set to true for the logging to do anything
-//
-// Revision 1.26  2006/06/27 08:35:05  ounsy
-// Corrected a grave bug in logging by removing the "synchronized" tag from the trace methods, that was causing deadlocks
-//
-// Revision 1.25  2006/06/16 09:25:32  ounsy
-// changed imports because of the diary package moving to the javaapi project
-//
-// Revision 1.24  2006/06/13 13:30:04  ounsy
-// minor changes
-//
-// Revision 1.23  2006/06/08 08:34:31  ounsy
-// added new diary logging system: the results of tmp file exports are logged in a text file (one per archiver and per day)
-//
-// Revision 1.22  2006/06/07 12:57:02  ounsy
-// minor changes
-//
-// Revision 1.21  2006/06/02 08:40:00  ounsy
-// now exends Warnable so that API classes can warn the required TdbArchiver device
-//
-// Revision 1.20  2006/05/30 12:37:00  ounsy
-// added a cleanOldFiles property
-//
-// Revision 1.19  2006/05/23 12:01:20  ounsy
-// +added a hasThreadedStartup which if true does the AMT inserts in a separate thread
-//
-// Revision 1.18  2006/04/11 09:12:55  ounsy
-// double archiving protection
-//
-// Revision 1.17  2006/03/29 10:20:51  ounsy
-// Added content to the error message:
-// each atribute with an invalid mode has a specific log
-//
-// Revision 1.16  2006/03/27 13:51:09  ounsy
-// catched the ArchivingException on checkMode so that if an attribute's mode
-// is invalid, the other attributes can still be archived
-//
-// Revision 1.15  2006/03/08 16:26:24  ounsy
-// added the global POGO class comments for the devices:
-// -HDBArchiver
-// -TDBArchiver
-// -ArchivingWatcher
-//
-// Revision 1.14  2006/03/08 14:36:21  ounsy
-// added pogo comments
-//
-// Revision 1.13  2006/02/24 12:08:39  ounsy
-// corrected a  bug where an incorrect Periodic mode wasn't reported
-//
-// Revision 1.12  2006/02/15 12:55:37  ounsy
-// added retry_for_attribute and retry_for_attributes commands
-//
-// Revision 1.11  2006/02/15 11:10:11  chinkumo
-// Javadoc comment update.
-//
-// Revision 1.10  2006/01/27 13:07:20  ounsy
-// organised imports
-//
-// Revision 1.9  2006/01/13 14:28:35  chinkumo
-// Changes made to avoid multi lines in AMT table when archivers are rebooted.
-//
-// Revision 1.8  2005/11/29 17:34:14  chinkumo
-// no message
-//
-// Revision 1.7.8.5  2005/11/29 16:15:11  chinkumo
-// Code reformated (pogo compatible)
-//
-// Revision 1.7.8.4  2005/11/15 13:45:39  chinkumo
-// ...
-//
-// Revision 1.7.8.3  2005/09/26 08:01:54  chinkumo
-// Minor changes !
-//
-// Revision 1.7.8.2  2005/09/16 08:08:42  chinkumo
-// Minor changes.
-//
-// Revision 1.7.8.1  2005/09/14 14:25:06  chinkumo
-// 'trigger_archive_conf' methods were changed to allow the management of ArchivingMessConfig objects.
-//
-// Revision 1.7  2005/06/24 12:06:38  chinkumo
-// Some constants were moved from fr.soleil.hdbtdbArchivingApi.ArchivingApi.ConfigConst to fr.soleil.hdbtdbArchivingApi.ArchivingTools.Tools.GlobalConst.
-
-// This change was reported here.
-//
-// Revision 1.6  2005/06/15 14:03:00  chinkumo
-// The device was regenerated in Tango V5.
-//
-// Revision 1.5  2005/06/14 10:39:09  chinkumo
-// Branch (tdbArchiver_1_0_1-branch_0)  and HEAD merged.
-//
-// Revision 1.4.6.3  2005/06/13 13:42:24  chinkumo
-// Changes made to improve the management of exceptions were reported here.
-//
-// Revision 1.4.6.2  2005/05/11 16:02:46  chinkumo
-// Minor changes made (some variables were renamed).
-//
-// Revision 1.4.6.1  2005/05/03 16:24:37  chinkumo
-// Some constants in the class 'fr.soleil.hdbtdbArchivingApi.ArchivingApi.ConfigConst' were renamed. Changes reported here.
-// Some unuse references removed.
-//
-// Revision 1.4  2005/02/04 17:10:41  chinkumo
-// The trouble with the grouped stopping strategy was fixed.
-//
-// Revision 1.3  2005/01/31 17:17:03  chinkumo
-// Minors change made into the set_status message of the method named 'stop_archive_att' (same message as on the historical side).
-//
-// Revision 1.2  2005/01/31 15:09:05  chinkumo
-// Changes made since the TdbProxy class was changed into the DbProxy class.
-//
-// Revision 1.1  2004/12/06 16:43:22  chinkumo
-// First commit (new architecture).
-//
-// Revision 1.6  2004/10/07 14:31:21  chinkumo
-// Since the facility of the archiver is taken into account when registrated into the AMT table, the ini_device() method was changed.
-//
-// Revision 1.5  2004/09/01 16:04:51  chinkumo
-// Minor changes were made.
-//
-// Revision 1.4  2004/08/16 16:31:31  chinkumo
-// Changes made to fit with the modification added to the file java/fr/soleil/TangoArchiving/HdbApi/HdbDataBase.java.
-// (The way to connect to the database)
-//
-// Revision 1.3  2004/07/23 14:30:04  chinkumo
-// Some javadoc comments changed.
-//
-// Revision 1.2  2004/07/22 15:36:15  chinkumo
-// Changes made
-// - to make the property 'DbHost' and 'DbName' be class property.
-// - to make the property 'DbUser', 'DbPassword', 'DsPath' and 'DbPath' be device property.
-//
-// - to enable device able restart jobs after a crash.
-//
-// - to take note of renamed classes.
-//
-// Revision 1.1  2004/07/12 12:43:42  chinkumo
-// First commit for this device.
-// (This device as been renamed from 'HdbFastArchiver' to 'TdbArchiver').
-//
-// Revision 1.14  2004/07/07 16:50:57  chinkumo
-// Initialization of default values in the get_device_property() method added again.
-// They were firstly removed because of a possible dbt side effect.
-// The property is invisible from Jive but seems to be be read from somewhere out of the dserver source code... (dbt ??)
-//
-// Revision 1.13  2004/07/07 12:10:56  ho
-// Remove the comment before dbPath and dsPath in order to have default values
-//
-// Revision 1.12  2004/07/02 15:42:11  chinkumo
-// Initialization of default values in the get_device_property() method removed.
-//
-// Revision 1.11  2004/07/02 15:14:30  chinkumo
-// No more used property data members removed
-//
-// Revision 1.10  2004/06/30 14:52:42  chinkumo
-// Changes made to destroy collectors that have empty attribute list to collect data from.
-//
-// Revision 1.9  2004/06/30 10:00:59  chinkumo
-// Status informations changed.
-//
-// Revision 1.8  2004/06/29 16:02:46  chinkumo
-// A command to force the export of data to the temporay database added.
-//
-// Revision 1.7  2004/06/25 08:01:46  ho
-// Add Data base information
-//
-// Revision 1.6  2004/06/18 14:03:26  chinkumo
-// Informations to enable the connection to the database are no more 'device properties'.
-// They are 'class properties'.
-// Thoses informations are : DbHost, DbName, DbUser, DbPassword.
-//
-// Revision 1.5  2004/06/17 07:51:00  chinkumo
-// DServer status's initialization added
-//
-// Revision 1.4  2004/06/14 15:23:29  chinkumo
-// Minors logging messages changes
-//
-// Revision 1.3  2004/06/14 12:33:37  chinkumo
-// A property named DbName has been defined to define the name of the database.
-//
-// Revision 1.2  2004/06/14 10:25:39  chinkumo
-// Names of properties updated.
-//
-// Revision 1.1  2004/06/11 14:13:42  chinkumo
-// The first team version.
-//
-//
-// copyleft :   European Synchrotron Radiation Facility
-//              BP 220, Grenoble 38043
-//              FRANCE
-//
-//-============================================================================
-//
-//          This file is generated by POGO
-//  (Program Obviously used to Generate tango Object)
-//
-//         (c) - Software Engineering Group - ESRF
-//=============================================================================
-
-package TdbArchiver;
-
-import java.io.IOException;
-import java.sql.Timestamp;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.Collection;
-import java.util.Collections;
-import java.util.HashMap;
-import java.util.Map;
-import java.util.Set;
-import java.util.concurrent.ConcurrentHashMap;
-import java.util.concurrent.Executors;
-
-import org.omg.CORBA.SystemException;
-import org.omg.CORBA.UserException;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.tango.utils.DevFailedUtils;
-
-import TdbArchiver.Collector.DbProxy;
-import TdbArchiver.Collector.TdbCollector;
-import TdbArchiver.Collector.TdbCollectorFactory;
-import fr.esrf.Tango.DevFailed;
-import fr.esrf.Tango.ErrSeverity;
-import fr.esrf.TangoApi.DbDatum;
-import fr.esrf.TangoApi.DbDevice;
-import fr.esrf.TangoDs.Attribute;
-import fr.esrf.TangoDs.DeviceClass;
-import fr.esrf.TangoDs.DeviceImpl;
-import fr.esrf.TangoDs.Except;
-import fr.esrf.TangoDs.TangoConst;
-import fr.esrf.TangoDs.Util;
-import fr.soleil.archiving.common.api.exception.ArchivingException;
-import fr.soleil.archiving.common.api.tools.GlobalConst;
-import fr.soleil.archiving.common.api.utils.LoggingUtils;
-import fr.soleil.archiving.common.api.utils.TangoStateUtils;
-import fr.soleil.archiving.hdbtdb.api.ConfigConst;
-import fr.soleil.archiving.hdbtdb.api.GetArchivingConf;
-import fr.soleil.archiving.hdbtdb.api.HdbTdbConnectionParameters;
-import fr.soleil.archiving.hdbtdb.api.management.database.tdb.data.export.TdbDataExport;
-import fr.soleil.archiving.hdbtdb.api.manager.ArchivingManagerApiRef;
-import fr.soleil.archiving.hdbtdb.api.tools.ArchivingMessConfig;
-import fr.soleil.archiving.hdbtdb.api.tools.AttributeLightMode;
-import fr.soleil.archiving.hdbtdb.api.tools.AttributeSupport;
-import fr.soleil.archiving.hdbtdb.api.tools.DBTools;
-import fr.soleil.archiving.hdbtdb.api.tools.mode.TdbSpec;
-
-/**
- * Class Description: This device is in charge of archiving Tango attributes to
- * the Temporary Database, as known as TDB. On startup, it looks up in database
- * the attributes it is in charge of. A collector thread retrieves attribute
- * values, with the associated timestamp. For each attribute, the values are
- * then inserted into TDB every [base period], and if so required, when its
- * value meets certain user-defined criterions. The typical TDB archiving is
- * higher frequency than HDB archiving. Thus, records are not directly inserted
- * into TDB. Instead, they are written to a temp file, which is periodically
- * imported by TDB.
- * 
- * @author $Author: pierrejoseph $
- * @version $Revision: 1.85 $
- */
-
-// --------- Start of States Description ----------
-/*
- * Device States Description: DevState.RUNNING : The device is not avalaible
- * because it is executing a command DevState.ON : The device is ready to use
- * DevState.INIT : The device has been initialized but not ready to use
- * DevState.FAULT : The device has been initialized but the connection to the
- * database crashed.
- */
-// --------- End of States Description ----------
-
-public class TdbArchiver extends DeviceImpl implements TangoConst {
-    protected int state;
-    private DbProxy dbProxy;
-
-    // --------- Start of attributes data members ----------
-
-    protected int attr_scalar_charge_read;
-    protected int attr_spectrum_charge_read;
-    protected int attr_image_charge_read;
-
-    protected String m_version;
-
-    // --------- End of attributes data members ----------
-
-    // --------- Start of properties data members ----------
-
-    /**
-     * Path to the working directory. <br>
-     * This directory will be used to temporarily store data. <br>
-     * Data will finally be stored into the database. <br>
-     * <b>Default value : </b> C:\tango\TdbArchiver
-     */
-    protected String dsPath;
-    /**
-     * Path used by the database service to access temporary data through the
-     * network.<br>
-     * <p/>
-     * <b>Default value : </b> C:\tango\TdbArchiver
-     */
-    protected String dbPath;
-
-    /**
-     * Property used to describe the startup behaviour of the device. <br>
-     * If set to true, the inserts in AMT are done in another thread so that the
-     * device can be exported earlier. <br>
-     * If set to false, the inserts in AMT are done in the main thread
-     * sequentially.<br>
-     * <b>Default value : </b>false
-     */
-    protected boolean hasThreadedStartup;
-
-    /**
-     * Defines whether the archiver will log to a diary. <b>Default value :
-     * </b>false
-     */
-    protected boolean hasDiary;
-
-    /**
-     * The criticity threshold of the archiver's logging. Only messages with a
-     * criticity higher than this attribute will be logged to the diary.
-     * Possible values are:
-     * <UL>
-     * <LI>DEBUG
-     * <LI>INFO
-     * <LI>WARNING
-     * <LI>ERROR
-     * <LI>CRITIC
-     * </UL>
-     * <b>Default value : </b>DEBUG
-     */
-    protected String diaryLogLevel;
-
-    /**
-     * The path of the diary logs. Don't include a filename, diary files are
-     * named automatically. <b>Default value : </b> dsPath
-     */
-    protected String diaryPath;
-
-    /**
-     * Defines whether the archiver is a "dedicated archiver". A
-     * "dedicated archiver" is an archiver specialized in archiving a specific
-     * list of attributes, and none others. If the value is false, the related
-     * attribute "reservedAttributes" won't be used. <b>Default value :
-     * </b>false
-     */
-    protected boolean isDedicated;
-
-    /**
-     * The list of attributes that will always be archived on this archiver no
-     * matter the load-balancing situation. Be aware that: - this list will be
-     * ignored if the related attribute "isDedicated" is false or missing - one
-     * attribute shouldn't be on the reservedAttributes list of several
-     * archivers
-     */
-    protected String[] reservedAttributes;
-    private int attributePerFile = 0;
-    // --------- End of properties data members ----------
-
-    // Add your own data members here
-    protected TdbCollectorFactory collectorFactory;
-    public static final short NA = 10;
-    public static final short SUCCEEDED = 20;
-    public static final short FAILED = 30;
-
-    private final Set<String> koAttributes = Collections.newSetFromMap(new ConcurrentHashMap<String, Boolean>());
-    private final Set<String> okAttributes = Collections.newSetFromMap(new ConcurrentHashMap<String, Boolean>());
-    private Logger logger;
-
-    private boolean databaseConnectionFault = false;
-
-    // --------------------------------------
-
-    // =========================================================
-    /**
-     * Constructor for simulated Time Device Server.
-     * 
-     * @param cl
-     *            The DeviceClass object
-     * @param s
-     *            The Device name.
-     * @param version
-     *            The device version
-     */
-    // =========================================================
-    TdbArchiver(final DeviceClass cl, final String s, final String version) throws DevFailed {
-        super(cl, s);
-        m_version = version;
-        init_device();
-    }
-
-    // =========================================================
-    /**
-     * Constructor for simulated Time Device Server.
-     * 
-     * @param cl
-     *            The DeviceClass object
-     * @param s
-     *            The Device name.
-     * @param d
-     *            Device description.
-     * @param version
-     *            The device version
-     */
-    // =========================================================
-    TdbArchiver(final DeviceClass cl, final String s, final String d, final String version) throws DevFailed {
-        super(cl, s, d);
-        m_version = version;
-        init_device();
-    }
-
-    // =========================================================
-    /**
-     * Initialize the device.
-     */
-    // =========================================================
-    @Override
-    public void init_device() throws DevFailed {
-        System.out.println("-------------------------------------- init_device in");
-        // PROBLEM-310: read device properties before logging configuration
-        get_device_property();
-        try {
-            logger = LoggingUtils.configureLogging(device_name, hasDiary, diaryPath, diaryLogLevel);
-        } catch (final IOException e) {
-            logger = LoggerFactory.getLogger(device_name); // ensure logger is not null
-            TangoStateUtils.setFault(this, "logging configuration failed");
-        }
-        if (databaseConnectionFault) {
-            logger.error("The connection with the database hasn't been made previously, "
-                    + "so you'll need to restart the device to make the connection work correctly.");
-        } else {
-            logger.info("TdbArchiver() create " + device_name);
-
-            // stop archiving before doing anything else
-            if (collectorFactory != null) {
-                collectorFactory.clear();
-            }
-
-            attr_image_charge_read = 0;
-            attr_spectrum_charge_read = 0;
-            attr_scalar_charge_read = 0;
-            koAttributes.clear();
-            okAttributes.clear();
-
-            logger.info("dsPath = " + dsPath);
-            logger.info("dbPath = " + dbPath);
-            logger.info("hasThreadedStartup = " + hasThreadedStartup);
-            logger.info("hasDiary = " + hasDiary);
-            logger.info("diaryLogLevel = " + diaryLogLevel);
-            logger.info("diaryPath = " + diaryPath);
-            logger.info("isDedicated = " + isDedicated);
-            logger.info("reservedAttributes = " + traceStrings(reservedAttributes));
-
-            collectorFactory = new TdbCollectorFactory(logger, dsPath, dbPath);
-
-            connectDatabase();
-        }
-        System.out.println("------------------------------------- init_device out");
-    }
-
-    private void connectDatabase() {
-        try {
-            DbDevice device = get_db_device();
-            HdbTdbConnectionParameters.performTDBInit(device, true, true);
-
-            String dbHost = HdbTdbConnectionParameters.getTDbHost();
-            String dbName = HdbTdbConnectionParameters.getTDbName();
-            String dbSchema = HdbTdbConnectionParameters.getTDbSchema();
-            String dbUser = HdbTdbConnectionParameters.getTDBUser();
-            String dbPassword = HdbTdbConnectionParameters.getTDBPassword();
-            boolean isRac = HdbTdbConnectionParameters.isTDBRac();
-
-            HdbTdbConnectionParameters.printTDBConnectionInfoLog();
-
-            dbProxy = new DbProxy(dbHost, dbName, dbSchema, dbUser, dbPassword, isRac);
-            Executors.newSingleThreadExecutor().submit(new InitDeviceTask());
-            databaseConnectionFault = false;
-        } catch (final ArchivingException e) {
-            TangoStateUtils.setFault(this, "Historical database connection failed: " + e);
-            logger.error("ERROR : Database unconnected !!");
-            databaseConnectionFault = true;
-        }
-    }
-
-    private synchronized void reconnectDatabaseIfNecessary() {
-        if (dbProxy == null) {
-            connectDatabase();
-        }
-    }
-
-    private String traceStrings(final String[] reservedAttributes2) {
-        if (reservedAttributes2 == null || reservedAttributes2.length == 0) {
-            return "";
-        }
-
-        String ret = "";
-        for (int i = 0; i < reservedAttributes2.length; i++) {
-            ret += reservedAttributes2[i];
-            if (i < reservedAttributes2.length - 1) {
-                ret += ", ";
-            }
-        }
-        return ret;
-    }
-
-    private void startArchiving(final ArchivingMessConfig archivingMessConfig, final boolean forceThreadedMode,
-            final boolean updateAMTTable) throws DevFailed {
-        final StartArchivingRunnable startArchivingRunnable = new StartArchivingRunnable(archivingMessConfig,
-                updateAMTTable);
-        final Thread startArchivingThread = new Thread(startArchivingRunnable, "TDBStartArchivingThread");
-
-        logger.info("startArchiving/hasThreadedStartup/" + hasThreadedStartup);
-        if (hasThreadedStartup || forceThreadedMode) {
-            startArchivingThread.start();
-        } else {
-            startArchivingThread.run();
-        }
-    }
-
-    private void logArchivingError(DevFailed df, ArchivingMessConfig config) {
-        StringBuilder errorBuilder = new StringBuilder(getClass().getSimpleName());
-        errorBuilder.append(" failed to start archiving:");
-        String[] lines = config.toArray();
-        if (lines != null) {
-            for (String line : lines) {
-                if (line != null) {
-                    errorBuilder.append("\n").append(line);
-                }
-            }
-        }
-        errorBuilder.append("\n--> reason: ").append(DevFailedUtils.toString(df));
-        logger.error(errorBuilder.toString());
-    }
-
-    private class InitDeviceTask implements Runnable {
-        @Override
-        public void run() {
-            Collection<AttributeLightMode> myCurrentTasks = null;
-            if (dbProxy != null) {
-                try {
-                    myCurrentTasks = dbProxy.getArchiverCurrentTasks(device_name);
-                } catch (final ArchivingException e) {
-                    logger.error("cannot getArchiverCurrentTasks " + e);
-                    TangoStateUtils.setFault(TdbArchiver.this, e.getMessage());
-                }
-            }
-            final ArchivingMessConfig archivingMessConfig = ArchivingMessConfig.basicObjectCreation();
-            try {
-                if (myCurrentTasks != null && myCurrentTasks.size() > 0) {
-                    for (final AttributeLightMode attributeLightMode : myCurrentTasks) {
-                        archivingMessConfig.add(attributeLightMode);
-                    }
-                    triggerArchiving(archivingMessConfig.toArray(), false);
-                }
-            } catch (final DevFailed devFailed) {
-                logArchivingError(devFailed, archivingMessConfig);
-            } finally {
-                TangoStateUtils.updateState(TdbArchiver.this, koAttributes, okAttributes);
-            }
-        }
-    }
-
-    private class StartArchivingRunnable implements Runnable {
-        private final ArchivingMessConfig archivingMessConfig;
-        private final boolean updateAMTTable;
-
-        public StartArchivingRunnable(final ArchivingMessConfig archivingMessConfig, final boolean updateAMTTable) {
-            this.archivingMessConfig = archivingMessConfig;
-            this.updateAMTTable = updateAMTTable;
-        }
-
-        @Override
-        public void run() {
-            try {
-                triggerArchiving(archivingMessConfig.toArray(), updateAMTTable);
-            } catch (final DevFailed devFailed) {
-                logArchivingError(devFailed, archivingMessConfig);
-            } finally {
-                TangoStateUtils.updateState(TdbArchiver.this, koAttributes, okAttributes);
-            }
-        }
-    }
-
-    // ===================================================================
-    /**
-     * Read the device properties from database.
-     */
-    // ===================================================================
-    public void get_device_property() throws DevFailed {
-        // Initialize your default values here.
-        // ------------------------------------------
-        dsPath = "C:\\tango\\TdbArchiver";
-        dbPath = "C:\\tango\\TdbArchiver";
-        // cleaner = false;
-        hasThreadedStartup = false;
-        attributePerFile = 0;
-        /*
-         * cleanOldFiles = false; hasTriggeredExport = false;
-         */
-        hasDiary = false;
-        diaryLogLevel = "DEBUG";
-        diaryPath = null;
-        isDedicated = false;
-        reservedAttributes = null;
-
-        // Read device properties from database.(Automatic code generation)
-        // -------------------------------------------------------------
-        if (Util._UseDb == false) {
-            return;
-        }
-        final String[] propnames = { "DsPath", "DbPath",
-                // "Cleaner",
-                "HasThreadedStartup",
-                // "CleanOldFiles",
-                // "HasNewExport",
-                "HasDiary", "DiaryLogLevel", "DiaryPath", "IsDedicated", "ReservedAttributes", "AttributePerFile" };
-
-        // Call database and extract values
-        // --------------------------------------------
-        final DbDatum[] dev_prop = get_db_device().get_property(propnames);
-        final TdbArchiverClass ds_class = (TdbArchiverClass) get_device_class();
-        int i = -1;
-
-        // Extract DsPath value
-        if (dev_prop[++i].is_empty() == false) {
-            dsPath = dev_prop[i].extractString();
-        } else {
-            // Try to get value from class property
-            final DbDatum cl_prop = ds_class.get_class_property(dev_prop[i].name);
-            if (cl_prop.is_empty() == false) {
-                dsPath = cl_prop.extractString();
-            }
-        }
-
-        // Extract DbPath value
-        if (dev_prop[++i].is_empty() == false) {
-            dbPath = dev_prop[i].extractString();
-        } else {
-            // Try to get value from class property
-            final DbDatum cl_prop = ds_class.get_class_property(dev_prop[i].name);
-            if (cl_prop.is_empty() == false) {
-                dbPath = cl_prop.extractString();
-            }
-        }
-
-        // Extract HasThreadedStartup value
-        if (dev_prop[++i].is_empty() == false) {
-            hasThreadedStartup = dev_prop[i].extractBoolean();
-        } else {
-            // Try to get value from class property
-            final DbDatum cl_prop = ds_class.get_class_property(dev_prop[i].name);
-            if (cl_prop.is_empty() == false) {
-                hasThreadedStartup = cl_prop.extractBoolean();
-            }
-        }
-
-        // Extract hasDiary value
-        if (dev_prop[++i].is_empty() == false) {
-            hasDiary = dev_prop[i].extractBoolean();
-        } else {
-            // Try to get value from class property
-            final DbDatum cl_prop = ds_class.get_class_property(dev_prop[i].name);
-            if (cl_prop.is_empty() == false) {
-                hasDiary = cl_prop.extractBoolean();
-            }
-        }
-
-        // Extract DiaryLogLevel value
-        if (dev_prop[++i].is_empty() == false) {
-            diaryLogLevel = dev_prop[i].extractString();
-        } else {
-            // Try to get value from class property
-            final DbDatum cl_prop = ds_class.get_class_property(dev_prop[i].name);
-            if (cl_prop.is_empty() == false) {
-                diaryLogLevel = cl_prop.extractString();
-            }
-        }
-
-        // Extract DiaryPath value
-        if (dev_prop[++i].is_empty() == false) {
-            diaryPath = dev_prop[i].extractString();
-        } else {
-            // Try to get value from class property
-            final DbDatum cl_prop = ds_class.get_class_property(dev_prop[i].name);
-            if (cl_prop.is_empty() == false) {
-                diaryPath = cl_prop.extractString();
-            }
-        }
-        if (diaryPath == null || diaryPath.equals("")) {
-            diaryPath = dsPath;
-        }
-
-        // Extract IsDedicated value
-        if (dev_prop[++i].is_empty() == false) {
-            isDedicated = dev_prop[i].extractBoolean();
-        } else {
-            // Try to get value from class property
-            final DbDatum cl_prop = ds_class.get_class_property(dev_prop[i].name);
-            if (cl_prop.is_empty() == false) {
-                isDedicated = cl_prop.extractBoolean();
-            }
-        }
-
-        // Extract ReservedAttributes value
-        if (dev_prop[++i].is_empty() == false) {
-            reservedAttributes = dev_prop[i].extractStringArray();
-        } else {
-            // Try to get value from class property
-            final DbDatum cl_prop = ds_class.get_class_property(dev_prop[i].name);
-            if (cl_prop.is_empty() == false) {
-                reservedAttributes = cl_prop.extractStringArray();
-            }
-        }
-        // AttributePerFile
-        if (dev_prop[++i].is_empty() == false) {
-            attributePerFile = dev_prop[i].extractLong();
-        } else {
-            // Try to get value from class property
-            final DbDatum cl_prop = ds_class.get_class_property(dev_prop[i].name);
-            if (cl_prop.is_empty() == false) {
-                attributePerFile = cl_prop.extractLong();
-            }
-        }
-        // End of Automatic code generation
-        // -------------------------------------------------------------
-
-    }
-
-    // =========================================================
-    /**
-     * Method always executed before command execution.
-     */
-    // =========================================================
-    @Override
-    public void always_executed_hook() {
-    }
-
-    public String[] getKOAttributes() {
-        return koAttributes.toArray(new String[koAttributes.size()]);
-    }
-
-    public String getErrorMessageForAttribute(String attributeName) {
-        final TdbCollector tdbCollector = collectorFactory.quickGet(attributeName);
-        String result;
-        if (tdbCollector == null) {
-            StringBuilder builder = new StringBuilder("No TdbCollector found for attribute '");
-            builder.append(attributeName).append("' - Reason: ");
-            result = "No TdbCollector found for attribute '" + attributeName + "'";
-            try {
-                if (dbProxy != null) {
-                    final Collection<AttributeLightMode> myCurrentTasks = dbProxy.getArchiverCurrentTasks(device_name);
-                    boolean done = false;
-                    for (final AttributeLightMode attributeLightMode : myCurrentTasks) {
-                        final String attrName = attributeLightMode.getAttributeCompleteName();
-                        if (attrName.equalsIgnoreCase(attributeName)) {
-                            done = true;
-                            String message = collectorFactory.getLastError(attributeLightMode);
-                            if ((message == null) || (message.trim().isEmpty())) {
-                                builder.append(" no valid reason found");
-                            } else {
-                                builder.append(message);
-                            }
-                            break;
-                        }
-                    }
-                    if (!done) {
-                        builder.append(" this attribute does not seem to be managed by this archiver");
-                    }
-                }
-            } catch (Exception e) {
-                builder.append(" Could not recover attribute archiving configuration: ").append(e.getMessage());
-            }
-            result = builder.toString();
-        } else {
-            result = tdbCollector.getErrorMessage(attributeName);
-        }
-        if (result == null) {
-            result = "";
-        }
-        return result;
-    }
-
-    // ===================================================================
-    /**
-     * Method called by the read_attributes CORBA operation to set internal
-     * attribute value.
-     * 
-     * @param attr
-     *            reference to the Attribute object
-     */
-    // ===================================================================
-    @Override
-    public void read_attr(final Attribute attr) throws DevFailed {
-        final String attr_name = attr.get_name();
-
-        // Switch on attribute name
-        // ---------------------------------
-        if (attr_name == "scalar_charge") {
-            attr.set_value(attr_scalar_charge_read);
-        } else if (attr_name == "spectrum_charge") {
-            attr.set_value(attr_spectrum_charge_read);
-        } else if (attr_name == "image_charge") {
-            attr.set_value(attr_image_charge_read);
-        } else if (attr_name == "version") {
-            attr.set_value(m_version);
-        }
-    }
-
-    // =========================================================
-    /**
-     * Execute command "TriggerArchiveConf" on device. This command is invoked
-     * when the archiving (intermediate archiving) of a group of attributes is
-     * triggered. The group of attributes is therefore encapsulated in an
-     * ArchivingMessConfig type object. The use of this command suppose that the
-     * database is ready to host those attributes's values. That means
-     * registrations were made, the associated tables built, ...
-     * 
-     * @param argin
-     *            The group of attributes to archive
-     * @see ArchivingMessConfig
-     * @see AttributeLightMode
-     */
-    // =========================================================
-    public void trigger_archive_conf(final String[] argin) throws DevFailed {
-
-        TangoStateUtils.isAllowed(this);
-        try {
-            triggerArchiving(argin, true);
-        } finally {
-            TangoStateUtils.updateState(this, koAttributes, okAttributes);
-        }
-    }
-
-    private void triggerArchiving(final String[] argin, final boolean updateAMTTable) throws DevFailed {
-        TangoStateUtils.setRunning(this);
-        logger.debug("trigger_archive_conf - in");
-
-        final ArchivingException archivingException = new ArchivingException();
-        final ArchivingMessConfig archivingMessConfig = ArchivingMessConfig.creationWithFullInformation(argin);
-        archivingMessConfig.filter(isDedicated, reservedAttributes);
-
-        boolean hasToThrow = false;
-        final Set<String> attributes = archivingMessConfig.getAttributeListKeys();
-        for (final String attribute : attributes) {
-            final AttributeLightMode attributeLightMode = archivingMessConfig.getAttribute(attribute);
-            attributeLightMode.setTrigger_time(new Timestamp(System.currentTimeMillis()));
-            boolean att_support = false;
-            final String attCompleteName = attributeLightMode.getAttributeCompleteName();
-            logger.info("managing {}", attCompleteName);
-            try {
-                att_support = AttributeSupport.checkAttributeSupport(attCompleteName, attributeLightMode.getDataType(),
-                        attributeLightMode.getDataFormat(), attributeLightMode.getWritable());
-
-                if (att_support) {
-                    attributeLightMode.getMode().checkMode(false, attCompleteName);
-                    if (attributeLightMode.getMode().getTdbSpec() != null) {
-                        attributeLightMode.getMode().getTdbSpec().setExportPeriod(getExportPeriod());
-                    } else {
-                        attributeLightMode.getMode().setTdbSpec(new TdbSpec(getExportPeriod(), 0));
-                    }
-                    attributeLightMode.setDevice_in_charge(device_name);
-                    // stop current data collection
-                    collectorFactory.remove(attCompleteName);
-                    if (dbProxy != null) {
-                        // start a new data collection
-                        final TdbCollector m_collector = collectorFactory.get(attributeLightMode);
-                        if (m_collector == null) {
-                            logger.debug("Entering addSource " + attCompleteName);
-                            collectorFactory.createCollectorAndAddSource(attributeLightMode, dbProxy, attributePerFile);
-                        } else {
-                            logger.debug("addSource " + attCompleteName);
-                            m_collector.addSource(attributeLightMode, attributePerFile);
-                        }
-
-                        // update AMT table in db with new configuration
-                        if (updateAMTTable) {
-                            if (dbProxy.isArchived(attCompleteName, device_name)) {
-                                dbProxy.updateModeRecord(attCompleteName);
-                            }
-                            dbProxy.insertModeRecord(attributeLightMode);
-                        }
-                    }
-                }
-                okAttributes.add(attCompleteName.toLowerCase());
-                koAttributes.remove(attCompleteName.toLowerCase());
-                logger.info("OK: " + attCompleteName);
-            } catch (final ArchivingException e) {
-                try {
-                    collectorFactory.remove(attCompleteName);
-                } catch (final ArchivingException e1) {
-                }
-                e.printStackTrace();
-                final String message = GlobalConst.ARCHIVING_ERROR_PREFIX + " : ";
-                archivingException.addStack(message, e);
-                hasToThrow = true;
-                logger.error("start failed ", e);
-                String name = attCompleteName.toLowerCase();
-                koAttributes.add(name);
-                okAttributes.remove(name);
-                collectorFactory.registerError(attCompleteName, e);
-                logger.error("KO: " + attCompleteName);
-            } catch (final Exception e) {
-                try {
-                    collectorFactory.remove(attCompleteName);
-                } catch (final ArchivingException e1) {
-                }
-                e.printStackTrace();
-                String name = attCompleteName.toLowerCase();
-                koAttributes.add(name);
-                okAttributes.remove(name);
-                collectorFactory.registerError(attCompleteName, e);
-                logger.error("KO " + attCompleteName + " unexpected " + e);
-            }
-        }
-
-        computeLoads();
-
-        if (hasToThrow) {
-            logger.error("trigger_archive_conf ERROR - out");
-            throw archivingException.toTangoException();
-        }
-
-        logger.debug("trigger_archive_conf - out");
-    }
-
-    /**
-     * 
-     * @return the export period from the TdbArchiver Class property
-     */
-    private long getExportPeriod() {
-        try {
-            return GetArchivingConf.readLongInDB(ConfigConst.TDB_CLASS_DEVICE, TdbDataExport.EXPORT_PERIOD_PROPERTY,
-                    TdbDataExport.DEFAULT_EXPORT_PERIOD_VALUE);
-        } catch (final ArchivingException e) {
-            e.printStackTrace();
-        }
-        return TdbDataExport.DEFAULT_EXPORT_PERIOD_VALUE;
-    }
-
-    // =========================================================
-    /**
-     * Execute command "TriggerArchiveAtt" on device. This command is invoked
-     * when the archiving (intermediate archiving) of an attribute is triggered.
-     * The attribute to archive is therefore encapsulated in a
-     * fr.soleil.hdbtdbArchivingApi.ArchivingTools.Tools.AttributeLight type
-     * object. The use of this command suppose that the TDB database is ready to
-     * host that attribute's values. That means the registration was made, the
-     * associated table built, ...
-     * 
-     * @param argin
-     *            The attribute to archive
-     * @see ArchivingMessConfig
-     * @see AttributeLightMode
-     * @deprecated use trigger_archive_conf(String[] argin) instead
-     */
-    // =========================================================
-    @Deprecated
-    public void trigger_archive_att(final String[] argin) throws DevFailed {
-    }
-
-    // =========================================================
-    /**
-     * Execute command "TriggerArchiveAttCheck" on device. This command is
-     * invoked when the archiving (intermediate archiving) of an attribute is
-     * triggered. Before archiving, this command checks that TDB database is
-     * ready to host the given attribute values. If not registrations is done
-     * and the associated table is built.
-     * 
-     * @param argin
-     *            The name of the attribute to archive
-     * @deprecated use trigger_archive_conf(String[] argin) instead
-     */
-    // =========================================================
-    @Deprecated
-    public void trigger_archive_att_check(final String argin) throws DevFailed {
-
-        logger.info("Entering trigger_archive_att_check()");
-        logger.info("Exiting trigger_archive_att_check()");
-
-    }
-
-    // =========================================================
-    /**
-     * Execute command "StopArchiveConf" on device. This command is invoked when
-     * stopping the archiving of a group of attributes.
-     * 
-     * @param argin
-     *            The group of attributes
-     */
-    // =========================================================
-    public void stop_archive_conf(final String[] argin) throws DevFailed {
-        logger.info("Entering stop_archive_conf()");
-
-        final Collection<AttributeLightMode> myConf = ArchivingManagerApiRef.stoppingVector(argin);
-        for (AttributeLightMode attrMode : myConf) {
-            stop_archive_att(attrMode.toArray());
-        }
-
-        logger.info("Exiting stop_archive_conf()");
-
-    }
-
-    // =========================================================
-    /**
-     * Execute command "StopArchiveAtt" on device. This command need an
-     * AttributeLightMode type object. An AttributeLightMode type object
-     * encapsulate all the informations needed to found the Collector in charge
-     * of the archiving of the specified attribute The informations needed are
-     * the type, the format, the writable property and the archiving mode
-     * 
-     * @param argin
-     *            the attribute on witch archiving must be stopped
-     */
-    // =========================================================
-    public void stop_archive_att(final String[] argin) throws DevFailed {
-        TangoStateUtils.isAllowed(this);
-        TangoStateUtils.setRunning(this);
-        logger.debug("stop_archive_att - in");
-        try {
-            final String attributeName = argin[0];
-            // final AttributeLightMode attributeLightMode =
-            // AttributeLightMode.creationWithFullInformation(argin);
-            logger.info("stopping attribute: " + attributeName);
-            if (koAttributes.contains(attributeName.toLowerCase())
-                    || okAttributes.contains(attributeName.toLowerCase())) {
-                // stop only if attribute is managed by this archiver
-                dbProxy.updateModeRecord(attributeName);
-                final TdbCollector tdbCollector = collectorFactory.get(attributeName);
-                if (tdbCollector != null) {
-                    tdbCollector.removeSource(attributeName, false);
-                }
-                koAttributes.remove(attributeName.toLowerCase());
-                okAttributes.remove(attributeName.toLowerCase());
-            } else {
-                DevFailedUtils.throwDevFailed(attributeName + " is not archived by this device");
-            }
-        } catch (final ArchivingException e) {
-            logger.error("stop error", e);
-            e.printStackTrace();
-            throw e.toTangoException();
-        } finally {
-            computeLoads();
-            TangoStateUtils.updateState(this, koAttributes, okAttributes);
-            logger.debug("stop_archive_att - out");
-        }
-
-        logger.info("Exiting stop_archive_att()");
-    }
-
-    // =========================================================
-    /**
-     * Execute command "ExportData2Db" on device. This command need an
-     * AttributeLightMode type object. An AttributeLightMode type object
-     * encapsulate all the informations needed to found the Collector in charge
-     * of the archiving of the specified attribute The informations needed are
-     * the type, the format, the writable property and the archiving mode
-     * 
-     * @param argin
-     *            the attribute from witch data are expected.
-     */
-    // =========================================================
-    public String export_data2_db(final String[] argin) throws DevFailed {
-        // System.out.println("TdbArchiver/export_data2_db/START");
-        logger.info("Entering export_data2_db()");
-        /*
-         * for ( int i = 0 ; i < argin.length ; i ++ ) { System.out.println (
-         * "export_data2_db/i|"+i+"|argin[i]|"+argin[i]+"|" ); }
-         */
-        // ---Add your Own code to control device here ---
-        final AttributeLightMode attributeLightMode = AttributeLightMode.creationWithFullInformation(argin);
-        String tableName = "";
-
-        try {
-            final TdbCollector collector = collectorFactory.get(attributeLightMode);
-            if (collector != null) {
-                tableName = collector.exportFile2Db(attributeLightMode.getAttributeCompleteName());
-            } else {
-                final String msg = "TdbArchiver/export_data2_db/getAttribute_complete_name|"
-                        + attributeLightMode.getAttributeCompleteName() + "| The collector is missing!";
-                logger.error(msg);
-
-                final String message = "Attempt to get a missing collector!";
-                final String reason = "Missing collector for attribute: "
-                        + attributeLightMode.getAttributeCompleteName();
-                final String desc = "Failed while executing TdbArchiver.export_data2_db";
-                throw new ArchivingException(message, reason, ErrSeverity.PANIC, desc, "");
-            }
-        } catch (final ArchivingException e) {
-            e.printStackTrace();
-            logger.error(e.toString());
-            Util.out2.println(e.toString());
-            throw e.toTangoException();
-        } catch (final IOException e) {
-            e.printStackTrace();
-            Except.throw_exception("IOException", e.getLocalizedMessage(), "export_data2_db");
-        }
-        logger.info("Exiting export_data2_db()");
-
-        return tableName;
-    }
-
-    // =========================================================
-    /**
-     * Execute command "StateDetailed" on device. This command returns a
-     * detailed state of the device.
-     * 
-     * @return The detailed state
-     */
-    // =========================================================
-    public String state_detailed() throws DevFailed {
-        String argout = new String();
-        logger.info("Entering state_detailed()");
-
-        // ---Add your Own code to control device here ---
-        final StringBuilder stringBuffer = new StringBuilder();
-        stringBuffer.append(TangoStateUtils.statusToString(koAttributes, okAttributes));
-        stringBuffer.append(collectorFactory.factoryAssessment());
-        argout = stringBuffer.toString();
-        logger.info("Exiting state_detailed()");
-        return argout;
-    }
-
-    // =========================================================
-    /**
-     * main part for the device server class
-     */
-    // =========================================================
-    public static void main(final String[] argv) {
-        try {
-            final Util tg = Util.init(argv, ConfigConst.TDB_CLASS_DEVICE);
-            tg.server_init();
-            System.out.println("Ready to accept request");
-            tg.server_run();
-        } catch (final OutOfMemoryError ex) {
-            System.err.println("Can't allocate memory !!!!");
-            System.err.println("Exiting");
-        } catch (final UserException ex) {
-            Except.print_exception(ex);
-            System.err.println("Received a CORBA user exception");
-            System.err.println("Exiting");
-        } catch (final SystemException ex) {
-            Except.print_exception(ex);
-            System.err.println("Received a CORBA system exception");
-            System.err.println("Exiting");
-        }
-
-        System.exit(-1);
-    }
-
-    public short retryForKOAttributes() throws DevFailed {
-        logger.debug("retryForKOAttributes");
-        reconnectDatabaseIfNecessary();
-        TangoStateUtils.isAllowed(this);
-        return retry_for_attributes(koAttributes.toArray(new String[koAttributes.size()]));
-    }
-
-    // ========================================================
-    /**
-     * Execute command "RetryForAttribute" on device. Tries to start archiving
-     * for a given attribute, specified by its complete name.
-     * 
-     * @param attributeToRetry
-     *            The complete name of the attribute
-     * @return A return code, can be either: 10 (the archiver isn't in charge of
-     *         the specified attribute) 20 (the retry succeeded) or 30 (the
-     *         retry failed)
-     * @throws DevFailed
-     */
-    // =========================================================
-    public short retry_for_attribute(final String attributeToRetry) throws DevFailed {
-        short result;
-        reconnectDatabaseIfNecessary();
-        TangoStateUtils.isAllowed(this);
-        if ((attributeToRetry == null) || attributeToRetry.isEmpty() || (dbProxy == null)) {
-            result = NA;
-        } else {
-            try {
-                final Collection<AttributeLightMode> myCurrentTasks = dbProxy.getArchiverCurrentTasks(device_name);
-
-                final ArchivingMessConfig archivingMessConfig = ArchivingMessConfig.basicObjectCreation();
-
-                boolean configIsNotEmpty = false;
-                for (final AttributeLightMode attributeLightMode : myCurrentTasks) {
-                    final String attrName = attributeLightMode.getAttributeCompleteName();
-                    if (attrName.equalsIgnoreCase(attributeToRetry)) {
-                        archivingMessConfig.add(attributeLightMode);
-                        configIsNotEmpty = true;
-                        break;
-                    }
-                }
-
-                if (configIsNotEmpty) {
-                    logRetry(archivingMessConfig, "retry_for_attribute");
-
-                    final boolean forceThreadedMode = true;
-                    startArchiving(archivingMessConfig, forceThreadedMode, false);
-
-                    return SUCCEEDED;
-                } else {
-                    result = NA;
-                }
-            } catch (final DevFailed devFailed) {
-                final String message = DBTools.getCompleteMessage(devFailed);
-                logger.error(message);
-
-                result = FAILED;
-            } catch (final Throwable t) {
-                final DevFailed devFailed = new DevFailed();
-                devFailed.initCause(t);
-                final String message = DBTools.getCompleteMessage(devFailed);
-                logger.error(message);
-
-                result = FAILED;
-            }
-        }
-        return result;
-    }
-
-    // =========================================================
-    /**
-     * Execute command "RetryForAttributes" on device. Tries to start archiving
-     * for a given list of attributes, specified by their complete names.
-     * 
-     * @param attributesToRetry
-     *            The complete names of the attributes
-     * @return A return code, can be either: 10 (the archiver isn't in charge of
-     *         any of the specified attributes) 20 (the retry succeeded) or 30
-     *         (the retry failed)
-     * @throws DevFailed
-     */
-    // =========================================================
-    public short retry_for_attributes(final String[] attributesToRetry) throws DevFailed {
-        reconnectDatabaseIfNecessary();
-        TangoStateUtils.isAllowed(this);
-        short result;
-        if ((attributesToRetry == null) || (attributesToRetry.length == 0) || (dbProxy == null)) {
-            result = NA;
-        } else {
-            try {
-                final Collection<AttributeLightMode> myCurrentTasks = dbProxy.getArchiverCurrentTasks(device_name);
-                final Map<String, AttributeLightMode> modes = new HashMap<String, AttributeLightMode>(
-                        myCurrentTasks.size());
-                for (final AttributeLightMode attributeLightMode : myCurrentTasks) {
-                    final String attrName = attributeLightMode.getAttributeCompleteName();
-                    modes.put(attrName.toLowerCase().trim(), attributeLightMode);
-                }
-                boolean configIsNotEmpty = false;
-                final ArchivingMessConfig archivingMessConfig = ArchivingMessConfig.basicObjectCreation();
-                Collection<String> attributeNotRetried = new ArrayList<String>(attributesToRetry.length);
-                Collection<String> attributeRetried = new ArrayList<String>(attributesToRetry.length);
-                if (modes.isEmpty()) {
-                    for (final String currentName : attributesToRetry) {
-                        attributeNotRetried.add(currentName);
-                    }
-                } else {
-                    for (final String currentName : attributesToRetry) {
-                        final AttributeLightMode attributeLightMode = modes.get(currentName.toLowerCase().trim());
-                        if (attributeLightMode == null) {
-                            attributeNotRetried.add(currentName);
-                        } else {
-                            attributeRetried.add(currentName);
-                            archivingMessConfig.add(attributeLightMode);
-                            configIsNotEmpty = true;
-                        }
-                    }
-                }
-                StringBuilder builder = new StringBuilder("Retry asked for ");
-                builder.append(Arrays.toString(attributesToRetry));
-                if (configIsNotEmpty) {
-                    final boolean forceThreadedMode = true;
-                    builder.append("\n\t- Retry attributes ").append(attributeRetried);
-                    startArchiving(archivingMessConfig, forceThreadedMode, false);
-                    result = SUCCEEDED;
-                } else {
-                    result = NA;
-                }
-                if (!attributeNotRetried.isEmpty()) {
-                    builder.append("\n\t- Could not retry attributes ").append(attributeNotRetried);
-                }
-                attributeRetried.clear();
-                attributeNotRetried.clear();
-                logger.debug(builder.toString());
-            } catch (final DevFailed devFailed) {
-                final String message = DBTools.getCompleteMessage(devFailed);
-                logger.error(message);
-                logger.error("Failed during retry_for_attributes ( " + Arrays.toString(attributesToRetry) + " ):");
-                result = FAILED;
-            } catch (final Throwable t) {
-                final DevFailed devFailed = new DevFailed();
-                devFailed.initCause(t);
-                devFailed.setStackTrace(t.getStackTrace());
-                final String message = DBTools.getCompleteMessage(devFailed);
-                logger.error(message);
-                logger.error("Failed during retry_for_attributes ( " + Arrays.toString(attributesToRetry) + " ):");
-                result = FAILED;
-            }
-        }
-        return result;
-    }
-
-    private void logRetry(final ArchivingMessConfig archivingMessConfig, final String methodName) {
-        final String retryContent = archivingMessConfig.toString();
-        final String openingLine = methodName + " - retry for the following attributes";
-        logger.debug(openingLine);
-        logger.debug(retryContent);
-    }
-
-    private void computeLoads() {
-        final int[] loads = collectorFactory.factoryLoadAssessment();
-
-        attr_scalar_charge_read = loads[0];
-        attr_spectrum_charge_read = loads[1];
-        attr_image_charge_read = loads[2];
-    }
-
-    @Override
-    public void delete_device() throws DevFailed {
-        // Except.throw_exception("not supported", "please, restart device",
-        // "delete_device");
-    }
-
-}
-
-// --------------------------------------------------------------------------
-/*
- * end of $Source:
- * /cvsroot/tango-cs/tango/jserver/archiving/TdbArchiver/TdbArchiver.java,v $
+// +============================================================================
+// $Source: /cvsroot/tango-cs/tango/jserver/archiving/TdbArchiver/TdbArchiver.java,v $
+//
+// project :     Tango Device Server
+//
+// Description: java source code for the TdbArchiver class and its commands.
+//              This class is derived from DeviceImpl class.
+//              It represents the CORBA servant obbject which
+//              will be accessed from the network. All commands which
+//              can be executed on the TdbArchiver are implemented
+//              in this file.
+//
+// $Author: pierrejoseph $
+//
+// $Revision: 1.85 $
+//
+// $Log: TdbArchiver.java,v $
+// Revision 1.85  2007/08/27 14:14:35  pierrejoseph
+// Traces addition : the logger object is stored in the TdbCollectorFactory
+//
+// Revision 1.84  2007/06/15 14:27:41  pierrejoseph
+// add traces in trigger to locate the collector freezing
+//
+// Revision 1.83  2007/06/04 11:51:24  pierrejoseph
+// logger info addition in trigger_archive_conf
+//
+// Revision 1.82  2007/06/04 10:36:53  pierrejoseph
+// logger info addition
+//
+// Revision 1.81  2007/05/25 12:06:54  pierrejoseph
+// system.out suppressions
+// update trigger_archive_conf if the insertModeRecord raised an exception (aligned on Hdb behaviour)
+//
+// Revision 1.80  2007/05/11 13:58:55  pierrejoseph
+// Attribute addition : release version
+//
+// Revision 1.79  2007/05/10 16:23:45  chinkumo
+// Archiving Version 1.2.0  for Tango 5.5.8
+//
+// Revision 1.78  2007/04/24 14:29:28  ounsy
+// added a log in the case of unexpected ClassCast exception on the event's value
+//
+// Revision 1.77  2007/04/05 10:06:03  chinkumo
+// New Release 5.5.7
+//
+// Revision 1.76  2007/03/27 09:17:52  ounsy
+// move the AMT updating upwards in stop_archive_att so that the archiving can be stopped even if no collector was created (as can happen for reserved attributes of formerly-dedicated archivers).
+//
+// Revision 1.75  2007/03/05 16:25:19  ounsy
+// non-static DataBase
+//
+// Revision 1.74  2007/02/27 15:32:21  ounsy
+// added a bit of test code in read_attr
+//
+// Revision 1.73  2007/02/26 16:14:24  ounsy
+// archiving devices now inherits just from DeviceImpl instead of
+// DeviceImplWithShutdownRunnable (they're nonlonger unexported onn shutdown)
+//
+// Revision 1.72  2007/02/26 08:31:47  chinkumo
+// For Tango 5.5.6
+//
+// Revision 1.71  2007/02/19 13:01:45  pierrejoseph
+// Add a trace in case of insertion error in amt table.
+//
+// Revision 1.70  2007/02/19 09:06:26  chinkumo
+// Release 19 - 02 - 2007 for Tango 5.5.6
+//
+// Revision 1.69  2007/02/01 13:52:41  pierrejoseph
+// minor changes
+//
+// Revision 1.68  2007/01/11 07:36:07  chinkumo
+// Release / 2007-01-11
+//
+// Revision 1.67  2007/01/09 16:44:57  ounsy
+// commands that lock the device into the RUNNING state now set it back to ON even if they encountered exceptions. in this case an entry is logged into the archiver's diary.
+//
+// Revision 1.66  2007/01/09 15:16:04  ounsy
+// put the Giacomo version back for XDBCollectorFactory.removeAllForAttribute
+//
+// Revision 1.65  2007/01/05 12:56:35  pierrejoseph
+// Modification of the ArchivingMessConfig object creation and the trigger_archive_conf method argin has lost its first value.
+//
+// Revision 1.64  2007/01/04 08:48:02  chinkumo
+// Production of the dated version 2007-01-04
+//
+// Revision 1.63  2006/12/08 07:45:13  chinkumo
+// date of the version : 2006-12-08
+//
+// Revision 1.62  2006/11/24 14:54:16  ounsy
+// we re-use the old removeAllForAttribute
+//
+// Revision 1.61  2006/11/24 14:04:16  ounsy
+// the diary entry in case of missing collector is now done by he archiver
+//
+// Revision 1.60  2006/11/24 13:19:35  ounsy
+// TdbCollectorFactory.get(attrLightMode) has a new parameter "doCreateCollectorIfMissing". A missing collector will only be created if this is true, otherwise a message in logged into the archiver's diary and an exception launched
+//
+// Revision 1.59  2006/11/20 09:24:30  ounsy
+// minor changes
+//
+// Revision 1.58  2006/11/16 11:11:18  pierrejoseph
+// Version : 2006-11-16
+//
+// Revision 1.57  2006/11/15 15:48:38  ounsy
+// added the Giacomo correction of removeAllForAttribute
+//
+// Revision 1.56  2006/11/13 15:57:36  ounsy
+// all java devices now inherit from UnexportOnShutdownDeviceImpl instead of from DeviceImpl
+//
+// Revision 1.55  2006/10/19 12:22:52  ounsy
+// modified export_data2_db() to take a new parameter isAsynchronous= false
+//
+// Revision 1.52  2006/10/13 15:00:20  ounsy
+// release date updated
+//
+// Revision 1.51  2006/10/12 15:08:46  ounsy
+// removed a test on whether the archiver is "archiving/tdbarchiver/45" in trigger_archive_conf
+//
+// Revision 1.50  2006/10/11 08:44:15  ounsy
+// release date updated
+//
+// Revision 1.49  2006/10/11 08:31:50  ounsy
+// modified the trigger_archive_conf commands to accept the same parameters as the archiving manager
+//
+// Revision 1.48  2006/10/09 13:55:34  ounsy
+// removed logs
+//
+// Revision 1.47  2006/10/05 15:42:20  ounsy
+// added archivingMessConfig.filter in trigger_archive_conf
+//
+// Revision 1.46  2006/09/18 09:05:01  ounsy
+// minor chages
+//
+// Revision 1.45  2006/09/15 08:56:54  ounsy
+// release date updated
+//
+// Revision 1.44  2006/09/13 09:49:43  ounsy
+// corrected a bug in getDeviceproperty
+//
+// Revision 1.43  2006/09/12 13:01:42  ounsy
+// methods that put the archiver in the RUNNING state now do it from the start and only go to the ON state at the end of the method
+//
+// Revision 1.42  2006/09/08 14:17:45  ounsy
+// added missing descriptions of properties, removed obsolete properties,
+//
+// Revision 1.41  2006/08/29 15:15:12  ounsy
+// release date updated
+//
+// Revision 1.40  2006/08/10 09:28:28  ounsy
+// release date updated
+//
+// Revision 1.39  2006/08/08 12:22:39  ounsy
+// release date updated
+//
+// Revision 1.38  2006/07/31 08:01:23  ounsy
+// release date updated
+//
+// Revision 1.37  2006/07/31 08:00:55  ounsy
+// release date updated
+//
+// Revision 1.36  2006/07/28 13:50:40  ounsy
+// corrected the method name in logRetry
+//
+// Revision 1.35  2006/07/28 09:33:39  ounsy
+// added diary logging on retryForXXXmethods
+//
+// Revision 1.34  2006/07/26 08:44:19  ounsy
+// TdbCollectorFactory no more static
+//
+// Revision 1.33  2006/07/26 08:35:43  ounsy
+// initDevice synchronized
+//
+// Revision 1.32  2006/07/25 13:22:32  ounsy
+// added a "version" attribute
+//
+// Revision 1.31  2006/07/25 09:47:16  ounsy
+// changed the XXX_charge management
+//
+// Revision 1.30  2006/07/21 14:39:02  ounsy
+// minor changes
+//
+// Revision 1.29  2006/07/18 15:11:55  ounsy
+// added a diaryLogLevel property
+//
+// Revision 1.28  2006/07/18 08:02:33  ounsy
+// export_data2_db() now returns the table name
+//
+// Revision 1.27  2006/06/29 08:45:10  ounsy
+// added a hasDiary property (default false) that has to be set to true for the logging to do anything
+//
+// Revision 1.26  2006/06/27 08:35:05  ounsy
+// Corrected a grave bug in logging by removing the "synchronized" tag from the trace methods, that was causing deadlocks
+//
+// Revision 1.25  2006/06/16 09:25:32  ounsy
+// changed imports because of the diary package moving to the javaapi project
+//
+// Revision 1.24  2006/06/13 13:30:04  ounsy
+// minor changes
+//
+// Revision 1.23  2006/06/08 08:34:31  ounsy
+// added new diary logging system: the results of tmp file exports are logged in a text file (one per archiver and per day)
+//
+// Revision 1.22  2006/06/07 12:57:02  ounsy
+// minor changes
+//
+// Revision 1.21  2006/06/02 08:40:00  ounsy
+// now exends Warnable so that API classes can warn the required TdbArchiver device
+//
+// Revision 1.20  2006/05/30 12:37:00  ounsy
+// added a cleanOldFiles property
+//
+// Revision 1.19  2006/05/23 12:01:20  ounsy
+// +added a hasThreadedStartup which if true does the AMT inserts in a separate thread
+//
+// Revision 1.18  2006/04/11 09:12:55  ounsy
+// double archiving protection
+//
+// Revision 1.17  2006/03/29 10:20:51  ounsy
+// Added content to the error message:
+// each atribute with an invalid mode has a specific log
+//
+// Revision 1.16  2006/03/27 13:51:09  ounsy
+// catched the ArchivingException on checkMode so that if an attribute's mode
+// is invalid, the other attributes can still be archived
+//
+// Revision 1.15  2006/03/08 16:26:24  ounsy
+// added the global POGO class comments for the devices:
+// -HDBArchiver
+// -TDBArchiver
+// -ArchivingWatcher
+//
+// Revision 1.14  2006/03/08 14:36:21  ounsy
+// added pogo comments
+//
+// Revision 1.13  2006/02/24 12:08:39  ounsy
+// corrected a  bug where an incorrect Periodic mode wasn't reported
+//
+// Revision 1.12  2006/02/15 12:55:37  ounsy
+// added retry_for_attribute and retry_for_attributes commands
+//
+// Revision 1.11  2006/02/15 11:10:11  chinkumo
+// Javadoc comment update.
+//
+// Revision 1.10  2006/01/27 13:07:20  ounsy
+// organised imports
+//
+// Revision 1.9  2006/01/13 14:28:35  chinkumo
+// Changes made to avoid multi lines in AMT table when archivers are rebooted.
+//
+// Revision 1.8  2005/11/29 17:34:14  chinkumo
+// no message
+//
+// Revision 1.7.8.5  2005/11/29 16:15:11  chinkumo
+// Code reformated (pogo compatible)
+//
+// Revision 1.7.8.4  2005/11/15 13:45:39  chinkumo
+// ...
+//
+// Revision 1.7.8.3  2005/09/26 08:01:54  chinkumo
+// Minor changes !
+//
+// Revision 1.7.8.2  2005/09/16 08:08:42  chinkumo
+// Minor changes.
+//
+// Revision 1.7.8.1  2005/09/14 14:25:06  chinkumo
+// 'trigger_archive_conf' methods were changed to allow the management of ArchivingMessConfig objects.
+//
+// Revision 1.7  2005/06/24 12:06:38  chinkumo
+// Some constants were moved from fr.soleil.hdbtdbArchivingApi.ArchivingApi.ConfigConst to fr.soleil.hdbtdbArchivingApi.ArchivingTools.Tools.GlobalConst.
+
+// This change was reported here.
+//
+// Revision 1.6  2005/06/15 14:03:00  chinkumo
+// The device was regenerated in Tango V5.
+//
+// Revision 1.5  2005/06/14 10:39:09  chinkumo
+// Branch (tdbArchiver_1_0_1-branch_0)  and HEAD merged.
+//
+// Revision 1.4.6.3  2005/06/13 13:42:24  chinkumo
+// Changes made to improve the management of exceptions were reported here.
+//
+// Revision 1.4.6.2  2005/05/11 16:02:46  chinkumo
+// Minor changes made (some variables were renamed).
+//
+// Revision 1.4.6.1  2005/05/03 16:24:37  chinkumo
+// Some constants in the class 'fr.soleil.hdbtdbArchivingApi.ArchivingApi.ConfigConst' were renamed. Changes reported here.
+// Some unuse references removed.
+//
+// Revision 1.4  2005/02/04 17:10:41  chinkumo
+// The trouble with the grouped stopping strategy was fixed.
+//
+// Revision 1.3  2005/01/31 17:17:03  chinkumo
+// Minors change made into the set_status message of the method named 'stop_archive_att' (same message as on the historical side).
+//
+// Revision 1.2  2005/01/31 15:09:05  chinkumo
+// Changes made since the TdbProxy class was changed into the DbProxy class.
+//
+// Revision 1.1  2004/12/06 16:43:22  chinkumo
+// First commit (new architecture).
+//
+// Revision 1.6  2004/10/07 14:31:21  chinkumo
+// Since the facility of the archiver is taken into account when registrated into the AMT table, the ini_device() method was changed.
+//
+// Revision 1.5  2004/09/01 16:04:51  chinkumo
+// Minor changes were made.
+//
+// Revision 1.4  2004/08/16 16:31:31  chinkumo
+// Changes made to fit with the modification added to the file java/fr/soleil/TangoArchiving/HdbApi/HdbDataBase.java.
+// (The way to connect to the database)
+//
+// Revision 1.3  2004/07/23 14:30:04  chinkumo
+// Some javadoc comments changed.
+//
+// Revision 1.2  2004/07/22 15:36:15  chinkumo
+// Changes made
+// - to make the property 'DbHost' and 'DbName' be class property.
+// - to make the property 'DbUser', 'DbPassword', 'DsPath' and 'DbPath' be device property.
+//
+// - to enable device able restart jobs after a crash.
+//
+// - to take note of renamed classes.
+//
+// Revision 1.1  2004/07/12 12:43:42  chinkumo
+// First commit for this device.
+// (This device as been renamed from 'HdbFastArchiver' to 'TdbArchiver').
+//
+// Revision 1.14  2004/07/07 16:50:57  chinkumo
+// Initialization of default values in the get_device_property() method added again.
+// They were firstly removed because of a possible dbt side effect.
+// The property is invisible from Jive but seems to be be read from somewhere out of the dserver source code... (dbt ??)
+//
+// Revision 1.13  2004/07/07 12:10:56  ho
+// Remove the comment before dbPath and dsPath in order to have default values
+//
+// Revision 1.12  2004/07/02 15:42:11  chinkumo
+// Initialization of default values in the get_device_property() method removed.
+//
+// Revision 1.11  2004/07/02 15:14:30  chinkumo
+// No more used property data members removed
+//
+// Revision 1.10  2004/06/30 14:52:42  chinkumo
+// Changes made to destroy collectors that have empty attribute list to collect data from.
+//
+// Revision 1.9  2004/06/30 10:00:59  chinkumo
+// Status informations changed.
+//
+// Revision 1.8  2004/06/29 16:02:46  chinkumo
+// A command to force the export of data to the temporay database added.
+//
+// Revision 1.7  2004/06/25 08:01:46  ho
+// Add Data base information
+//
+// Revision 1.6  2004/06/18 14:03:26  chinkumo
+// Informations to enable the connection to the database are no more 'device properties'.
+// They are 'class properties'.
+// Thoses informations are : DbHost, DbName, DbUser, DbPassword.
+//
+// Revision 1.5  2004/06/17 07:51:00  chinkumo
+// DServer status's initialization added
+//
+// Revision 1.4  2004/06/14 15:23:29  chinkumo
+// Minors logging messages changes
+//
+// Revision 1.3  2004/06/14 12:33:37  chinkumo
+// A property named DbName has been defined to define the name of the database.
+//
+// Revision 1.2  2004/06/14 10:25:39  chinkumo
+// Names of properties updated.
+//
+// Revision 1.1  2004/06/11 14:13:42  chinkumo
+// The first team version.
+//
+//
+// copyleft :   European Synchrotron Radiation Facility
+//              BP 220, Grenoble 38043
+//              FRANCE
+//
+//-============================================================================
+//
+//          This file is generated by POGO
+//  (Program Obviously used to Generate tango Object)
+//
+//         (c) - Software Engineering Group - ESRF
+//=============================================================================
+
+package TdbArchiver;
+
+import java.io.IOException;
+import java.sql.Timestamp;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Collection;
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.Map;
+import java.util.Set;
+import java.util.concurrent.ConcurrentHashMap;
+import java.util.concurrent.Executors;
+
+import fr.soleil.database.connection.DataBaseParameters;
+import org.omg.CORBA.SystemException;
+import org.omg.CORBA.UserException;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.tango.utils.DevFailedUtils;
+
+import TdbArchiver.Collector.DbProxy;
+import TdbArchiver.Collector.TdbCollector;
+import TdbArchiver.Collector.TdbCollectorFactory;
+import fr.esrf.Tango.DevFailed;
+import fr.esrf.Tango.ErrSeverity;
+import fr.esrf.TangoApi.DbDatum;
+import fr.esrf.TangoApi.DbDevice;
+import fr.esrf.TangoDs.Attribute;
+import fr.esrf.TangoDs.DeviceClass;
+import fr.esrf.TangoDs.DeviceImpl;
+import fr.esrf.TangoDs.Except;
+import fr.esrf.TangoDs.TangoConst;
+import fr.esrf.TangoDs.Util;
+import fr.soleil.archiving.common.api.exception.ArchivingException;
+import fr.soleil.archiving.common.api.tools.GlobalConst;
+import fr.soleil.archiving.common.api.utils.LoggingUtils;
+import fr.soleil.archiving.common.api.utils.TangoStateUtils;
+import fr.soleil.archiving.hdbtdb.api.ConfigConst;
+import fr.soleil.archiving.hdbtdb.api.GetArchivingConf;
+import fr.soleil.archiving.hdbtdb.api.HdbTdbConnectionParameters;
+import fr.soleil.archiving.hdbtdb.api.management.database.tdb.data.export.TdbDataExport;
+import fr.soleil.archiving.hdbtdb.api.manager.ArchivingManagerApiRef;
+import fr.soleil.archiving.hdbtdb.api.tools.ArchivingMessConfig;
+import fr.soleil.archiving.hdbtdb.api.tools.AttributeLightMode;
+import fr.soleil.archiving.hdbtdb.api.tools.AttributeSupport;
+import fr.soleil.archiving.hdbtdb.api.tools.DBTools;
+import fr.soleil.archiving.hdbtdb.api.tools.mode.TdbSpec;
+
+/**
+ * Class Description: This device is in charge of archiving Tango attributes to
+ * the Temporary Database, as known as TDB. On startup, it looks up in database
+ * the attributes it is in charge of. A collector thread retrieves attribute
+ * values, with the associated timestamp. For each attribute, the values are
+ * then inserted into TDB every [base period], and if so required, when its
+ * value meets certain user-defined criterions. The typical TDB archiving is
+ * higher frequency than HDB archiving. Thus, records are not directly inserted
+ * into TDB. Instead, they are written to a temp file, which is periodically
+ * imported by TDB.
+ * 
+ * @author $Author: pierrejoseph $
+ * @version $Revision: 1.85 $
+ */
+
+// --------- Start of States Description ----------
+/*
+ * Device States Description: DevState.RUNNING : The device is not avalaible
+ * because it is executing a command DevState.ON : The device is ready to use
+ * DevState.INIT : The device has been initialized but not ready to use
+ * DevState.FAULT : The device has been initialized but the connection to the
+ * database crashed.
+ */
+// --------- End of States Description ----------
+
+public class TdbArchiver extends DeviceImpl implements TangoConst {
+    protected int state;
+    private DbProxy dbProxy;
+
+    // --------- Start of attributes data members ----------
+
+    protected int attr_scalar_charge_read;
+    protected int attr_spectrum_charge_read;
+    protected int attr_image_charge_read;
+
+    protected String m_version;
+
+    // --------- End of attributes data members ----------
+
+    // --------- Start of properties data members ----------
+
+    /**
+     * Path to the working directory. <br>
+     * This directory will be used to temporarily store data. <br>
+     * Data will finally be stored into the database. <br>
+     * <b>Default value : </b> C:\tango\TdbArchiver
+     */
+    protected String dsPath;
+    /**
+     * Path used by the database service to access temporary data through the
+     * network.<br>
+     * <p/>
+     * <b>Default value : </b> C:\tango\TdbArchiver
+     */
+    protected String dbPath;
+
+    /**
+     * Property used to describe the startup behaviour of the device. <br>
+     * If set to true, the inserts in AMT are done in another thread so that the
+     * device can be exported earlier. <br>
+     * If set to false, the inserts in AMT are done in the main thread
+     * sequentially.<br>
+     * <b>Default value : </b>false
+     */
+    protected boolean hasThreadedStartup;
+
+    /**
+     * Defines whether the archiver will log to a diary. <b>Default value :
+     * </b>false
+     */
+    protected boolean hasDiary;
+
+    /**
+     * The criticity threshold of the archiver's logging. Only messages with a
+     * criticity higher than this attribute will be logged to the diary.
+     * Possible values are:
+     * <UL>
+     * <LI>DEBUG
+     * <LI>INFO
+     * <LI>WARNING
+     * <LI>ERROR
+     * <LI>CRITIC
+     * </UL>
+     * <b>Default value : </b>DEBUG
+     */
+    protected String diaryLogLevel;
+
+    /**
+     * The path of the diary logs. Don't include a filename, diary files are
+     * named automatically. <b>Default value : </b> dsPath
+     */
+    protected String diaryPath;
+
+    /**
+     * Defines whether the archiver is a "dedicated archiver". A
+     * "dedicated archiver" is an archiver specialized in archiving a specific
+     * list of attributes, and none others. If the value is false, the related
+     * attribute "reservedAttributes" won't be used. <b>Default value :
+     * </b>false
+     */
+    protected boolean isDedicated;
+
+    /**
+     * The list of attributes that will always be archived on this archiver no
+     * matter the load-balancing situation. Be aware that: - this list will be
+     * ignored if the related attribute "isDedicated" is false or missing - one
+     * attribute shouldn't be on the reservedAttributes list of several
+     * archivers
+     */
+    protected String[] reservedAttributes;
+    private int attributePerFile = 0;
+    // --------- End of properties data members ----------
+
+    // Add your own data members here
+    protected TdbCollectorFactory collectorFactory;
+    public static final short NA = 10;
+    public static final short SUCCEEDED = 20;
+    public static final short FAILED = 30;
+
+    private final Set<String> koAttributes = Collections.newSetFromMap(new ConcurrentHashMap<String, Boolean>());
+    private final Set<String> okAttributes = Collections.newSetFromMap(new ConcurrentHashMap<String, Boolean>());
+    private Logger logger;
+
+    private boolean databaseConnectionFault = false;
+
+    // --------------------------------------
+
+    // =========================================================
+    /**
+     * Constructor for simulated Time Device Server.
+     * 
+     * @param cl
+     *            The DeviceClass object
+     * @param s
+     *            The Device name.
+     * @param version
+     *            The device version
+     */
+    // =========================================================
+    TdbArchiver(final DeviceClass cl, final String s, final String version) throws DevFailed {
+        super(cl, s);
+        m_version = version;
+        init_device();
+    }
+
+    // =========================================================
+    /**
+     * Constructor for simulated Time Device Server.
+     * 
+     * @param cl
+     *            The DeviceClass object
+     * @param s
+     *            The Device name.
+     * @param d
+     *            Device description.
+     * @param version
+     *            The device version
+     */
+    // =========================================================
+    TdbArchiver(final DeviceClass cl, final String s, final String d, final String version) throws DevFailed {
+        super(cl, s, d);
+        m_version = version;
+        init_device();
+    }
+
+    // =========================================================
+    /**
+     * Initialize the device.
+     */
+    // =========================================================
+    @Override
+    public void init_device() throws DevFailed {
+        System.out.println("-------------------------------------- init_device in");
+        // PROBLEM-310: read device properties before logging configuration
+        get_device_property();
+        try {
+            logger = LoggingUtils.configureLogging(device_name, hasDiary, diaryPath, diaryLogLevel);
+        } catch (final IOException e) {
+            logger = LoggerFactory.getLogger(device_name); // ensure logger is not null
+            TangoStateUtils.setFault(this, "logging configuration failed");
+        }
+        if (databaseConnectionFault) {
+            logger.error("The connection with the database hasn't been made previously, "
+                    + "so you'll need to restart the device to make the connection work correctly.");
+        } else {
+            logger.info("TdbArchiver() create " + device_name);
+
+            // stop archiving before doing anything else
+            if (collectorFactory != null) {
+                collectorFactory.clear();
+            }
+
+            attr_image_charge_read = 0;
+            attr_spectrum_charge_read = 0;
+            attr_scalar_charge_read = 0;
+            koAttributes.clear();
+            okAttributes.clear();
+
+            logger.info("dsPath = " + dsPath);
+            logger.info("dbPath = " + dbPath);
+            logger.info("hasThreadedStartup = " + hasThreadedStartup);
+            logger.info("hasDiary = " + hasDiary);
+            logger.info("diaryLogLevel = " + diaryLogLevel);
+            logger.info("diaryPath = " + diaryPath);
+            logger.info("isDedicated = " + isDedicated);
+            logger.info("reservedAttributes = " + traceStrings(reservedAttributes));
+
+            collectorFactory = new TdbCollectorFactory(logger, dsPath, dbPath);
+
+            connectDatabase();
+        }
+        System.out.println("------------------------------------- init_device out");
+    }
+
+    private void connectDatabase() {
+        try {
+            DbDevice device = get_db_device();
+            HdbTdbConnectionParameters.performTDBInit(device, true, true);
+
+            DataBaseParameters parameters = new DataBaseParameters();
+            parameters.setParametersFromTango(ConfigConst.TDB_CLASS_DEVICE);
+            dbProxy = new DbProxy(parameters);
+            Executors.newSingleThreadExecutor().submit(new InitDeviceTask());
+            databaseConnectionFault = false;
+        } catch (final ArchivingException e) {
+            TangoStateUtils.setFault(this, "Historical database connection failed: " + e);
+            logger.error("ERROR : Database unconnected !!");
+            databaseConnectionFault = true;
+        } catch (DevFailed devFailed) {
+            devFailed.printStackTrace();
+        }
+    }
+
+    private synchronized void reconnectDatabaseIfNecessary() {
+        if (dbProxy == null) {
+            connectDatabase();
+        }
+    }
+
+    private String traceStrings(final String[] reservedAttributes2) {
+        if (reservedAttributes2 == null || reservedAttributes2.length == 0) {
+            return "";
+        }
+
+        String ret = "";
+        for (int i = 0; i < reservedAttributes2.length; i++) {
+            ret += reservedAttributes2[i];
+            if (i < reservedAttributes2.length - 1) {
+                ret += ", ";
+            }
+        }
+        return ret;
+    }
+
+    private void startArchiving(final ArchivingMessConfig archivingMessConfig, final boolean forceThreadedMode,
+            final boolean updateAMTTable) throws DevFailed {
+        final StartArchivingRunnable startArchivingRunnable = new StartArchivingRunnable(archivingMessConfig,
+                updateAMTTable);
+        final Thread startArchivingThread = new Thread(startArchivingRunnable, "TDBStartArchivingThread");
+
+        logger.info("startArchiving/hasThreadedStartup/" + hasThreadedStartup);
+        if (hasThreadedStartup || forceThreadedMode) {
+            startArchivingThread.start();
+        } else {
+            startArchivingThread.run();
+        }
+    }
+
+    private void logArchivingError(DevFailed df, ArchivingMessConfig config) {
+        StringBuilder errorBuilder = new StringBuilder(getClass().getSimpleName());
+        errorBuilder.append(" failed to start archiving:");
+        String[] lines = config.toArray();
+        if (lines != null) {
+            for (String line : lines) {
+                if (line != null) {
+                    errorBuilder.append("\n").append(line);
+                }
+            }
+        }
+        errorBuilder.append("\n--> reason: ").append(DevFailedUtils.toString(df));
+        logger.error(errorBuilder.toString());
+    }
+
+    private class InitDeviceTask implements Runnable {
+        @Override
+        public void run() {
+            Collection<AttributeLightMode> myCurrentTasks = null;
+            if (dbProxy != null) {
+                try {
+                    myCurrentTasks = dbProxy.getArchiverCurrentTasks(device_name);
+                } catch (final ArchivingException e) {
+                    logger.error("cannot getArchiverCurrentTasks " + e);
+                    TangoStateUtils.setFault(TdbArchiver.this, e.getMessage());
+                }
+            }
+            final ArchivingMessConfig archivingMessConfig = ArchivingMessConfig.basicObjectCreation();
+            try {
+                if (myCurrentTasks != null && myCurrentTasks.size() > 0) {
+                    for (final AttributeLightMode attributeLightMode : myCurrentTasks) {
+                        archivingMessConfig.add(attributeLightMode);
+                    }
+                    triggerArchiving(archivingMessConfig.toArray(), false);
+                }
+            } catch (final DevFailed devFailed) {
+                logArchivingError(devFailed, archivingMessConfig);
+            } finally {
+                TangoStateUtils.updateState(TdbArchiver.this, koAttributes, okAttributes);
+            }
+        }
+    }
+
+    private class StartArchivingRunnable implements Runnable {
+        private final ArchivingMessConfig archivingMessConfig;
+        private final boolean updateAMTTable;
+
+        public StartArchivingRunnable(final ArchivingMessConfig archivingMessConfig, final boolean updateAMTTable) {
+            this.archivingMessConfig = archivingMessConfig;
+            this.updateAMTTable = updateAMTTable;
+        }
+
+        @Override
+        public void run() {
+            try {
+                triggerArchiving(archivingMessConfig.toArray(), updateAMTTable);
+            } catch (final DevFailed devFailed) {
+                logArchivingError(devFailed, archivingMessConfig);
+            } finally {
+                TangoStateUtils.updateState(TdbArchiver.this, koAttributes, okAttributes);
+            }
+        }
+    }
+
+    // ===================================================================
+    /**
+     * Read the device properties from database.
+     */
+    // ===================================================================
+    public void get_device_property() throws DevFailed {
+        // Initialize your default values here.
+        // ------------------------------------------
+        dsPath = "C:\\tango\\TdbArchiver";
+        dbPath = "C:\\tango\\TdbArchiver";
+        // cleaner = false;
+        hasThreadedStartup = false;
+        attributePerFile = 0;
+        /*
+         * cleanOldFiles = false; hasTriggeredExport = false;
+         */
+        hasDiary = false;
+        diaryLogLevel = "DEBUG";
+        diaryPath = null;
+        isDedicated = false;
+        reservedAttributes = null;
+
+        // Read device properties from database.(Automatic code generation)
+        // -------------------------------------------------------------
+        if (Util._UseDb == false) {
+            return;
+        }
+        final String[] propnames = { "DsPath", "DbPath",
+                // "Cleaner",
+                "HasThreadedStartup",
+                // "CleanOldFiles",
+                // "HasNewExport",
+                "HasDiary", "DiaryLogLevel", "DiaryPath", "IsDedicated", "ReservedAttributes", "AttributePerFile" };
+
+        // Call database and extract values
+        // --------------------------------------------
+        final DbDatum[] dev_prop = get_db_device().get_property(propnames);
+        final TdbArchiverClass ds_class = (TdbArchiverClass) get_device_class();
+        int i = -1;
+
+        // Extract DsPath value
+        if (dev_prop[++i].is_empty() == false) {
+            dsPath = dev_prop[i].extractString();
+        } else {
+            // Try to get value from class property
+            final DbDatum cl_prop = ds_class.get_class_property(dev_prop[i].name);
+            if (cl_prop.is_empty() == false) {
+                dsPath = cl_prop.extractString();
+            }
+        }
+
+        // Extract DbPath value
+        if (dev_prop[++i].is_empty() == false) {
+            dbPath = dev_prop[i].extractString();
+        } else {
+            // Try to get value from class property
+            final DbDatum cl_prop = ds_class.get_class_property(dev_prop[i].name);
+            if (cl_prop.is_empty() == false) {
+                dbPath = cl_prop.extractString();
+            }
+        }
+
+        // Extract HasThreadedStartup value
+        if (dev_prop[++i].is_empty() == false) {
+            hasThreadedStartup = dev_prop[i].extractBoolean();
+        } else {
+            // Try to get value from class property
+            final DbDatum cl_prop = ds_class.get_class_property(dev_prop[i].name);
+            if (cl_prop.is_empty() == false) {
+                hasThreadedStartup = cl_prop.extractBoolean();
+            }
+        }
+
+        // Extract hasDiary value
+        if (dev_prop[++i].is_empty() == false) {
+            hasDiary = dev_prop[i].extractBoolean();
+        } else {
+            // Try to get value from class property
+            final DbDatum cl_prop = ds_class.get_class_property(dev_prop[i].name);
+            if (cl_prop.is_empty() == false) {
+                hasDiary = cl_prop.extractBoolean();
+            }
+        }
+
+        // Extract DiaryLogLevel value
+        if (dev_prop[++i].is_empty() == false) {
+            diaryLogLevel = dev_prop[i].extractString();
+        } else {
+            // Try to get value from class property
+            final DbDatum cl_prop = ds_class.get_class_property(dev_prop[i].name);
+            if (cl_prop.is_empty() == false) {
+                diaryLogLevel = cl_prop.extractString();
+            }
+        }
+
+        // Extract DiaryPath value
+        if (dev_prop[++i].is_empty() == false) {
+            diaryPath = dev_prop[i].extractString();
+        } else {
+            // Try to get value from class property
+            final DbDatum cl_prop = ds_class.get_class_property(dev_prop[i].name);
+            if (cl_prop.is_empty() == false) {
+                diaryPath = cl_prop.extractString();
+            }
+        }
+        if (diaryPath == null || diaryPath.equals("")) {
+            diaryPath = dsPath;
+        }
+
+        // Extract IsDedicated value
+        if (dev_prop[++i].is_empty() == false) {
+            isDedicated = dev_prop[i].extractBoolean();
+        } else {
+            // Try to get value from class property
+            final DbDatum cl_prop = ds_class.get_class_property(dev_prop[i].name);
+            if (cl_prop.is_empty() == false) {
+                isDedicated = cl_prop.extractBoolean();
+            }
+        }
+
+        // Extract ReservedAttributes value
+        if (dev_prop[++i].is_empty() == false) {
+            reservedAttributes = dev_prop[i].extractStringArray();
+        } else {
+            // Try to get value from class property
+            final DbDatum cl_prop = ds_class.get_class_property(dev_prop[i].name);
+            if (cl_prop.is_empty() == false) {
+                reservedAttributes = cl_prop.extractStringArray();
+            }
+        }
+        // AttributePerFile
+        if (dev_prop[++i].is_empty() == false) {
+            attributePerFile = dev_prop[i].extractLong();
+        } else {
+            // Try to get value from class property
+            final DbDatum cl_prop = ds_class.get_class_property(dev_prop[i].name);
+            if (cl_prop.is_empty() == false) {
+                attributePerFile = cl_prop.extractLong();
+            }
+        }
+        // End of Automatic code generation
+        // -------------------------------------------------------------
+
+    }
+
+    // =========================================================
+    /**
+     * Method always executed before command execution.
+     */
+    // =========================================================
+    @Override
+    public void always_executed_hook() {
+    }
+
+    public String[] getKOAttributes() {
+        return koAttributes.toArray(new String[koAttributes.size()]);
+    }
+
+    public String getErrorMessageForAttribute(String attributeName) {
+        final TdbCollector tdbCollector = collectorFactory.quickGet(attributeName);
+        String result;
+        if (tdbCollector == null) {
+            StringBuilder builder = new StringBuilder("No TdbCollector found for attribute '");
+            builder.append(attributeName).append("' - Reason: ");
+            result = "No TdbCollector found for attribute '" + attributeName + "'";
+            try {
+                if (dbProxy != null) {
+                    final Collection<AttributeLightMode> myCurrentTasks = dbProxy.getArchiverCurrentTasks(device_name);
+                    boolean done = false;
+                    for (final AttributeLightMode attributeLightMode : myCurrentTasks) {
+                        final String attrName = attributeLightMode.getAttributeCompleteName();
+                        if (attrName.equalsIgnoreCase(attributeName)) {
+                            done = true;
+                            String message = collectorFactory.getLastError(attributeLightMode);
+                            if ((message == null) || (message.trim().isEmpty())) {
+                                builder.append(" no valid reason found");
+                            } else {
+                                builder.append(message);
+                            }
+                            break;
+                        }
+                    }
+                    if (!done) {
+                        builder.append(" this attribute does not seem to be managed by this archiver");
+                    }
+                }
+            } catch (Exception e) {
+                builder.append(" Could not recover attribute archiving configuration: ").append(e.getMessage());
+            }
+            result = builder.toString();
+        } else {
+            result = tdbCollector.getErrorMessage(attributeName);
+        }
+        if (result == null) {
+            result = "";
+        }
+        return result;
+    }
+
+    // ===================================================================
+    /**
+     * Method called by the read_attributes CORBA operation to set internal
+     * attribute value.
+     * 
+     * @param attr
+     *            reference to the Attribute object
+     */
+    // ===================================================================
+    @Override
+    public void read_attr(final Attribute attr) throws DevFailed {
+        final String attr_name = attr.get_name();
+
+        // Switch on attribute name
+        // ---------------------------------
+        if (attr_name == "scalar_charge") {
+            attr.set_value(attr_scalar_charge_read);
+        } else if (attr_name == "spectrum_charge") {
+            attr.set_value(attr_spectrum_charge_read);
+        } else if (attr_name == "image_charge") {
+            attr.set_value(attr_image_charge_read);
+        } else if (attr_name == "version") {
+            attr.set_value(m_version);
+        }
+    }
+
+    // =========================================================
+    /**
+     * Execute command "TriggerArchiveConf" on device. This command is invoked
+     * when the archiving (intermediate archiving) of a group of attributes is
+     * triggered. The group of attributes is therefore encapsulated in an
+     * ArchivingMessConfig type object. The use of this command suppose that the
+     * database is ready to host those attributes's values. That means
+     * registrations were made, the associated tables built, ...
+     * 
+     * @param argin
+     *            The group of attributes to archive
+     * @see ArchivingMessConfig
+     * @see AttributeLightMode
+     */
+    // =========================================================
+    public void trigger_archive_conf(final String[] argin) throws DevFailed {
+
+        TangoStateUtils.isAllowed(this);
+        try {
+            triggerArchiving(argin, true);
+        } finally {
+            TangoStateUtils.updateState(this, koAttributes, okAttributes);
+        }
+    }
+
+    private void triggerArchiving(final String[] argin, final boolean updateAMTTable) throws DevFailed {
+        TangoStateUtils.setRunning(this);
+        logger.debug("trigger_archive_conf - in");
+
+        final ArchivingException archivingException = new ArchivingException();
+        final ArchivingMessConfig archivingMessConfig = ArchivingMessConfig.creationWithFullInformation(argin);
+        archivingMessConfig.filter(isDedicated, reservedAttributes);
+
+        boolean hasToThrow = false;
+        final Set<String> attributes = archivingMessConfig.getAttributeListKeys();
+        for (final String attribute : attributes) {
+            final AttributeLightMode attributeLightMode = archivingMessConfig.getAttribute(attribute);
+            attributeLightMode.setTrigger_time(new Timestamp(System.currentTimeMillis()));
+            boolean att_support = false;
+            final String attCompleteName = attributeLightMode.getAttributeCompleteName();
+            logger.info("managing {}", attCompleteName);
+            try {
+                att_support = AttributeSupport.checkAttributeSupport(attCompleteName, attributeLightMode.getDataType(),
+                        attributeLightMode.getDataFormat(), attributeLightMode.getWritable());
+
+                if (att_support) {
+                    attributeLightMode.getMode().checkMode(false, attCompleteName);
+                    if (attributeLightMode.getMode().getTdbSpec() != null) {
+                        attributeLightMode.getMode().getTdbSpec().setExportPeriod(getExportPeriod());
+                    } else {
+                        attributeLightMode.getMode().setTdbSpec(new TdbSpec(getExportPeriod(), 0));
+                    }
+                    attributeLightMode.setDevice_in_charge(device_name);
+                    // stop current data collection
+                    collectorFactory.remove(attCompleteName);
+                    if (dbProxy != null) {
+                        // start a new data collection
+                        final TdbCollector m_collector = collectorFactory.get(attributeLightMode);
+                        if (m_collector == null) {
+                            logger.debug("Entering addSource " + attCompleteName);
+                            collectorFactory.createCollectorAndAddSource(attributeLightMode, dbProxy, attributePerFile);
+                        } else {
+                            logger.debug("addSource " + attCompleteName);
+                            m_collector.addSource(attributeLightMode, attributePerFile);
+                        }
+
+                        // update AMT table in db with new configuration
+                        if (updateAMTTable) {
+                            if (dbProxy.isArchived(attCompleteName, device_name)) {
+                                dbProxy.updateModeRecord(attCompleteName);
+                            }
+                            dbProxy.insertModeRecord(attributeLightMode);
+                        }
+                    }
+                }
+                okAttributes.add(attCompleteName.toLowerCase());
+                koAttributes.remove(attCompleteName.toLowerCase());
+                logger.info("OK: " + attCompleteName);
+            } catch (final ArchivingException e) {
+                try {
+                    collectorFactory.remove(attCompleteName);
+                } catch (final ArchivingException e1) {
+                }
+                e.printStackTrace();
+                final String message = GlobalConst.ARCHIVING_ERROR_PREFIX + " : ";
+                archivingException.addStack(message, e);
+                hasToThrow = true;
+                logger.error("start failed ", e);
+                String name = attCompleteName.toLowerCase();
+                koAttributes.add(name);
+                okAttributes.remove(name);
+                collectorFactory.registerError(attCompleteName, e);
+                logger.error("KO: " + attCompleteName);
+            } catch (final Exception e) {
+                try {
+                    collectorFactory.remove(attCompleteName);
+                } catch (final ArchivingException e1) {
+                }
+                e.printStackTrace();
+                String name = attCompleteName.toLowerCase();
+                koAttributes.add(name);
+                okAttributes.remove(name);
+                collectorFactory.registerError(attCompleteName, e);
+                logger.error("KO " + attCompleteName + " unexpected " + e);
+            }
+        }
+
+        computeLoads();
+
+        if (hasToThrow) {
+            logger.error("trigger_archive_conf ERROR - out");
+            throw archivingException.toTangoException();
+        }
+
+        logger.debug("trigger_archive_conf - out");
+    }
+
+    /**
+     * 
+     * @return the export period from the TdbArchiver Class property
+     */
+    private long getExportPeriod() {
+        try {
+            return GetArchivingConf.readLongInDB(ConfigConst.TDB_CLASS_DEVICE, TdbDataExport.EXPORT_PERIOD_PROPERTY,
+                    TdbDataExport.DEFAULT_EXPORT_PERIOD_VALUE);
+        } catch (final ArchivingException e) {
+            e.printStackTrace();
+        }
+        return TdbDataExport.DEFAULT_EXPORT_PERIOD_VALUE;
+    }
+
+    // =========================================================
+    /**
+     * Execute command "TriggerArchiveAtt" on device. This command is invoked
+     * when the archiving (intermediate archiving) of an attribute is triggered.
+     * The attribute to archive is therefore encapsulated in a
+     * fr.soleil.hdbtdbArchivingApi.ArchivingTools.Tools.AttributeLight type
+     * object. The use of this command suppose that the TDB database is ready to
+     * host that attribute's values. That means the registration was made, the
+     * associated table built, ...
+     * 
+     * @param argin
+     *            The attribute to archive
+     * @see ArchivingMessConfig
+     * @see AttributeLightMode
+     * @deprecated use trigger_archive_conf(String[] argin) instead
+     */
+    // =========================================================
+    @Deprecated
+    public void trigger_archive_att(final String[] argin) throws DevFailed {
+    }
+
+    // =========================================================
+    /**
+     * Execute command "TriggerArchiveAttCheck" on device. This command is
+     * invoked when the archiving (intermediate archiving) of an attribute is
+     * triggered. Before archiving, this command checks that TDB database is
+     * ready to host the given attribute values. If not registrations is done
+     * and the associated table is built.
+     * 
+     * @param argin
+     *            The name of the attribute to archive
+     * @deprecated use trigger_archive_conf(String[] argin) instead
+     */
+    // =========================================================
+    @Deprecated
+    public void trigger_archive_att_check(final String argin) throws DevFailed {
+
+        logger.info("Entering trigger_archive_att_check()");
+        logger.info("Exiting trigger_archive_att_check()");
+
+    }
+
+    // =========================================================
+    /**
+     * Execute command "StopArchiveConf" on device. This command is invoked when
+     * stopping the archiving of a group of attributes.
+     * 
+     * @param argin
+     *            The group of attributes
+     */
+    // =========================================================
+    public void stop_archive_conf(final String[] argin) throws DevFailed {
+        logger.info("Entering stop_archive_conf()");
+
+        final Collection<AttributeLightMode> myConf = ArchivingManagerApiRef.stoppingVector(argin);
+        for (AttributeLightMode attrMode : myConf) {
+            stop_archive_att(attrMode.toArray());
+        }
+
+        logger.info("Exiting stop_archive_conf()");
+
+    }
+
+    // =========================================================
+    /**
+     * Execute command "StopArchiveAtt" on device. This command need an
+     * AttributeLightMode type object. An AttributeLightMode type object
+     * encapsulate all the informations needed to found the Collector in charge
+     * of the archiving of the specified attribute The informations needed are
+     * the type, the format, the writable property and the archiving mode
+     * 
+     * @param argin
+     *            the attribute on witch archiving must be stopped
+     */
+    // =========================================================
+    public void stop_archive_att(final String[] argin) throws DevFailed {
+        TangoStateUtils.isAllowed(this);
+        TangoStateUtils.setRunning(this);
+        logger.debug("stop_archive_att - in");
+        try {
+            final String attributeName = argin[0];
+            // final AttributeLightMode attributeLightMode =
+            // AttributeLightMode.creationWithFullInformation(argin);
+            logger.info("stopping attribute: " + attributeName);
+            if (koAttributes.contains(attributeName.toLowerCase())
+                    || okAttributes.contains(attributeName.toLowerCase())) {
+                // stop only if attribute is managed by this archiver
+                dbProxy.updateModeRecord(attributeName);
+                final TdbCollector tdbCollector = collectorFactory.get(attributeName);
+                if (tdbCollector != null) {
+                    tdbCollector.removeSource(attributeName, false);
+                }
+                koAttributes.remove(attributeName.toLowerCase());
+                okAttributes.remove(attributeName.toLowerCase());
+            } else {
+                DevFailedUtils.throwDevFailed(attributeName + " is not archived by this device");
+            }
+        } catch (final ArchivingException e) {
+            logger.error("stop error", e);
+            e.printStackTrace();
+            throw e.toTangoException();
+        } finally {
+            computeLoads();
+            TangoStateUtils.updateState(this, koAttributes, okAttributes);
+            logger.debug("stop_archive_att - out");
+        }
+
+        logger.info("Exiting stop_archive_att()");
+    }
+
+    // =========================================================
+    /**
+     * Execute command "ExportData2Db" on device. This command need an
+     * AttributeLightMode type object. An AttributeLightMode type object
+     * encapsulate all the informations needed to found the Collector in charge
+     * of the archiving of the specified attribute The informations needed are
+     * the type, the format, the writable property and the archiving mode
+     * 
+     * @param argin
+     *            the attribute from witch data are expected.
+     */
+    // =========================================================
+    public String export_data2_db(final String[] argin) throws DevFailed {
+        // System.out.println("TdbArchiver/export_data2_db/START");
+        logger.info("Entering export_data2_db()");
+        /*
+         * for ( int i = 0 ; i < argin.length ; i ++ ) { System.out.println (
+         * "export_data2_db/i|"+i+"|argin[i]|"+argin[i]+"|" ); }
+         */
+        // ---Add your Own code to control device here ---
+        final AttributeLightMode attributeLightMode = AttributeLightMode.creationWithFullInformation(argin);
+        String tableName = "";
+
+        try {
+            final TdbCollector collector = collectorFactory.get(attributeLightMode);
+            if (collector != null) {
+                tableName = collector.exportFile2Db(attributeLightMode.getAttributeCompleteName());
+            } else {
+                final String msg = "TdbArchiver/export_data2_db/getAttribute_complete_name|"
+                        + attributeLightMode.getAttributeCompleteName() + "| The collector is missing!";
+                logger.error(msg);
+
+                final String message = "Attempt to get a missing collector!";
+                final String reason = "Missing collector for attribute: "
+                        + attributeLightMode.getAttributeCompleteName();
+                final String desc = "Failed while executing TdbArchiver.export_data2_db";
+                throw new ArchivingException(message, reason, ErrSeverity.PANIC, desc, "");
+            }
+        } catch (final ArchivingException e) {
+            e.printStackTrace();
+            logger.error(e.toString());
+            Util.out2.println(e.toString());
+            throw e.toTangoException();
+        } catch (final IOException e) {
+            e.printStackTrace();
+            Except.throw_exception("IOException", e.getLocalizedMessage(), "export_data2_db");
+        }
+        logger.info("Exiting export_data2_db()");
+
+        return tableName;
+    }
+
+    // =========================================================
+    /**
+     * Execute command "StateDetailed" on device. This command returns a
+     * detailed state of the device.
+     * 
+     * @return The detailed state
+     */
+    // =========================================================
+    public String state_detailed() throws DevFailed {
+        String argout = new String();
+        logger.info("Entering state_detailed()");
+
+        // ---Add your Own code to control device here ---
+        final StringBuilder stringBuffer = new StringBuilder();
+        stringBuffer.append(TangoStateUtils.statusToString(koAttributes, okAttributes));
+        stringBuffer.append(collectorFactory.factoryAssessment());
+        argout = stringBuffer.toString();
+        logger.info("Exiting state_detailed()");
+        return argout;
+    }
+
+    // =========================================================
+    /**
+     * main part for the device server class
+     */
+    // =========================================================
+    public static void main(final String[] argv) {
+        try {
+            final Util tg = Util.init(argv, ConfigConst.TDB_CLASS_DEVICE);
+            tg.server_init();
+            System.out.println("Ready to accept request");
+            tg.server_run();
+        } catch (final OutOfMemoryError ex) {
+            System.err.println("Can't allocate memory !!!!");
+            System.err.println("Exiting");
+        } catch (final UserException ex) {
+            Except.print_exception(ex);
+            System.err.println("Received a CORBA user exception");
+            System.err.println("Exiting");
+        } catch (final SystemException ex) {
+            Except.print_exception(ex);
+            System.err.println("Received a CORBA system exception");
+            System.err.println("Exiting");
+        }
+
+        System.exit(-1);
+    }
+
+    public short retryForKOAttributes() throws DevFailed {
+        logger.debug("retryForKOAttributes");
+        reconnectDatabaseIfNecessary();
+        TangoStateUtils.isAllowed(this);
+        return retry_for_attributes(koAttributes.toArray(new String[koAttributes.size()]));
+    }
+
+    // ========================================================
+    /**
+     * Execute command "RetryForAttribute" on device. Tries to start archiving
+     * for a given attribute, specified by its complete name.
+     * 
+     * @param attributeToRetry
+     *            The complete name of the attribute
+     * @return A return code, can be either: 10 (the archiver isn't in charge of
+     *         the specified attribute) 20 (the retry succeeded) or 30 (the
+     *         retry failed)
+     * @throws DevFailed
+     */
+    // =========================================================
+    public short retry_for_attribute(final String attributeToRetry) throws DevFailed {
+        short result;
+        reconnectDatabaseIfNecessary();
+        TangoStateUtils.isAllowed(this);
+        if ((attributeToRetry == null) || attributeToRetry.isEmpty() || (dbProxy == null)) {
+            result = NA;
+        } else {
+            try {
+                final Collection<AttributeLightMode> myCurrentTasks = dbProxy.getArchiverCurrentTasks(device_name);
+
+                final ArchivingMessConfig archivingMessConfig = ArchivingMessConfig.basicObjectCreation();
+
+                boolean configIsNotEmpty = false;
+                for (final AttributeLightMode attributeLightMode : myCurrentTasks) {
+                    final String attrName = attributeLightMode.getAttributeCompleteName();
+                    if (attrName.equalsIgnoreCase(attributeToRetry)) {
+                        archivingMessConfig.add(attributeLightMode);
+                        configIsNotEmpty = true;
+                        break;
+                    }
+                }
+
+                if (configIsNotEmpty) {
+                    logRetry(archivingMessConfig, "retry_for_attribute");
+
+                    final boolean forceThreadedMode = true;
+                    startArchiving(archivingMessConfig, forceThreadedMode, false);
+
+                    return SUCCEEDED;
+                } else {
+                    result = NA;
+                }
+            } catch (final DevFailed devFailed) {
+                final String message = DBTools.getCompleteMessage(devFailed);
+                logger.error(message);
+
+                result = FAILED;
+            } catch (final Throwable t) {
+                final DevFailed devFailed = new DevFailed();
+                devFailed.initCause(t);
+                final String message = DBTools.getCompleteMessage(devFailed);
+                logger.error(message);
+
+                result = FAILED;
+            }
+        }
+        return result;
+    }
+
+    // =========================================================
+    /**
+     * Execute command "RetryForAttributes" on device. Tries to start archiving
+     * for a given list of attributes, specified by their complete names.
+     * 
+     * @param attributesToRetry
+     *            The complete names of the attributes
+     * @return A return code, can be either: 10 (the archiver isn't in charge of
+     *         any of the specified attributes) 20 (the retry succeeded) or 30
+     *         (the retry failed)
+     * @throws DevFailed
+     */
+    // =========================================================
+    public short retry_for_attributes(final String[] attributesToRetry) throws DevFailed {
+        reconnectDatabaseIfNecessary();
+        TangoStateUtils.isAllowed(this);
+        short result;
+        if ((attributesToRetry == null) || (attributesToRetry.length == 0) || (dbProxy == null)) {
+            result = NA;
+        } else {
+            try {
+                final Collection<AttributeLightMode> myCurrentTasks = dbProxy.getArchiverCurrentTasks(device_name);
+                final Map<String, AttributeLightMode> modes = new HashMap<String, AttributeLightMode>(
+                        myCurrentTasks.size());
+                for (final AttributeLightMode attributeLightMode : myCurrentTasks) {
+                    final String attrName = attributeLightMode.getAttributeCompleteName();
+                    modes.put(attrName.toLowerCase().trim(), attributeLightMode);
+                }
+                boolean configIsNotEmpty = false;
+                final ArchivingMessConfig archivingMessConfig = ArchivingMessConfig.basicObjectCreation();
+                Collection<String> attributeNotRetried = new ArrayList<String>(attributesToRetry.length);
+                Collection<String> attributeRetried = new ArrayList<String>(attributesToRetry.length);
+                if (modes.isEmpty()) {
+                    for (final String currentName : attributesToRetry) {
+                        attributeNotRetried.add(currentName);
+                    }
+                } else {
+                    for (final String currentName : attributesToRetry) {
+                        final AttributeLightMode attributeLightMode = modes.get(currentName.toLowerCase().trim());
+                        if (attributeLightMode == null) {
+                            attributeNotRetried.add(currentName);
+                        } else {
+                            attributeRetried.add(currentName);
+                            archivingMessConfig.add(attributeLightMode);
+                            configIsNotEmpty = true;
+                        }
+                    }
+                }
+                StringBuilder builder = new StringBuilder("Retry asked for ");
+                builder.append(Arrays.toString(attributesToRetry));
+                if (configIsNotEmpty) {
+                    final boolean forceThreadedMode = true;
+                    builder.append("\n\t- Retry attributes ").append(attributeRetried);
+                    startArchiving(archivingMessConfig, forceThreadedMode, false);
+                    result = SUCCEEDED;
+                } else {
+                    result = NA;
+                }
+                if (!attributeNotRetried.isEmpty()) {
+                    builder.append("\n\t- Could not retry attributes ").append(attributeNotRetried);
+                }
+                attributeRetried.clear();
+                attributeNotRetried.clear();
+                logger.debug(builder.toString());
+            } catch (final DevFailed devFailed) {
+                final String message = DBTools.getCompleteMessage(devFailed);
+                logger.error(message);
+                logger.error("Failed during retry_for_attributes ( " + Arrays.toString(attributesToRetry) + " ):");
+                result = FAILED;
+            } catch (final Throwable t) {
+                final DevFailed devFailed = new DevFailed();
+                devFailed.initCause(t);
+                devFailed.setStackTrace(t.getStackTrace());
+                final String message = DBTools.getCompleteMessage(devFailed);
+                logger.error(message);
+                logger.error("Failed during retry_for_attributes ( " + Arrays.toString(attributesToRetry) + " ):");
+                result = FAILED;
+            }
+        }
+        return result;
+    }
+
+    private void logRetry(final ArchivingMessConfig archivingMessConfig, final String methodName) {
+        final String retryContent = archivingMessConfig.toString();
+        final String openingLine = methodName + " - retry for the following attributes";
+        logger.debug(openingLine);
+        logger.debug(retryContent);
+    }
+
+    private void computeLoads() {
+        final int[] loads = collectorFactory.factoryLoadAssessment();
+
+        attr_scalar_charge_read = loads[0];
+        attr_spectrum_charge_read = loads[1];
+        attr_image_charge_read = loads[2];
+    }
+
+    @Override
+    public void delete_device() throws DevFailed {
+        // Except.throw_exception("not supported", "please, restart device",
+        // "delete_device");
+    }
+
+}
+
+// --------------------------------------------------------------------------
+/*
+ * end of $Source:
+ * /cvsroot/tango-cs/tango/jserver/archiving/TdbArchiver/TdbArchiver.java,v $
  */
\ No newline at end of file
diff --git a/src/main/java/TdbArchiver/TdbArchiverClass.java b/tdbarchiver/src/main/java/TdbArchiver/TdbArchiverClass.java
similarity index 97%
rename from src/main/java/TdbArchiver/TdbArchiverClass.java
rename to tdbarchiver/src/main/java/TdbArchiver/TdbArchiverClass.java
index 43a2ff61d347daeea5fc2681e7d9f38461b89d9f..985d586824b6adcc2b5505752111e65a0b04cdf0 100644
--- a/src/main/java/TdbArchiver/TdbArchiverClass.java
+++ b/tdbarchiver/src/main/java/TdbArchiver/TdbArchiverClass.java
@@ -1,322 +1,322 @@
-// +======================================================================
-// $Source: /cvsroot/tango-cs/tango/jserver/archiving/TdbArchiver/TdbArchiverClass.java,v $
-//
-// Project:   	Tango Device Server
-//
-// Description:	java source code for the TdbArchiver class .
-//              This class is a singleton class and implements everything
-//              which exists only once for all the  TdbArchiver object
-//              It inherits from the DeviceClass class.
-//
-// $Author: ounsy $
-//
-// $Revision: 1.10 $
-//
-// $Log: TdbArchiverClass.java,v $
-// Revision 1.10  2006/07/25 13:22:32  ounsy
-// added a "version" attribute
-//
-// Revision 1.9  2006/03/08 14:36:21  ounsy
-// added pogo comments
-//
-// Revision 1.8  2006/02/15 12:56:18  ounsy
-// added retry_for_attribute and retry_for_attributes commands
-//
-// Revision 1.7  2006/02/15 11:10:12  chinkumo
-// Javadoc comment update.
-//
-// Revision 1.6  2006/01/27 13:07:20  ounsy
-// organised imports
-//
-// Revision 1.5  2005/11/29 17:34:14  chinkumo
-// no message
-//
-// Revision 1.4.10.3  2005/11/29 16:15:11  chinkumo
-// Code reformated (pogo compatible)
-//
-// Revision 1.4.10.2  2005/11/15 13:45:39  chinkumo
-// ...
-//
-// Revision 1.4.10.1  2005/09/26 08:01:54  chinkumo
-// Minor changes !
-//
-// Revision 1.4  2005/06/15 14:03:00  chinkumo
-// The device was regenerated in Tango V5.
-//
-//
-// copyleft :    European Synchrotron Radiation Facility
-//               BP 220, Grenoble 38043
-//               FRANCE
-//
-//-======================================================================
-//
-//  		This file is generated by POGO
-//	(Program Obviously used to Generate tango Object)
-//
-//         (c) - Software Engineering Group - ESRF
-//=============================================================================
-
-package TdbArchiver;
-
-import java.util.ResourceBundle;
-import java.util.Vector;
-
-import fr.esrf.Tango.AttrWriteType;
-import fr.esrf.Tango.DevFailed;
-import fr.esrf.Tango.DispLevel;
-import fr.esrf.TangoApi.DbDatum;
-import fr.esrf.TangoDs.Attr;
-import fr.esrf.TangoDs.DeviceClass;
-import fr.esrf.TangoDs.DeviceImpl;
-import fr.esrf.TangoDs.TangoConst;
-import fr.esrf.TangoDs.TemplCommandOut;
-import fr.esrf.TangoDs.Util;
-
-public class TdbArchiverClass extends DeviceClass implements TangoConst {
-    /**
-     * TdbArchiverClass class instance (it is a singleton).
-     */
-    private static TdbArchiverClass _instance = null;
-
-    // /**
-    // * Class properties array.
-    // */
-    // private final DbDatum[] cl_prop = null;
-
-    // --------- Start of properties data members ----------
-
-    /**
-     * Computer identifier on wich is settled the database TDB. The identifier
-     * can be the computer name or its IP address. <br>
-     * <b>Default value : </b> localhost
-     */
-    protected String dbHost;
-    /**
-     * Database name.<br>
-     * <b>Default value : </b> tdb
-     */
-    protected String dbName;
-    /**
-     * true if the ORACLE RAC connection is activated. This information is
-     * appended to all device's (or attributes) name. false otherwise.<br>
-     * <b>Default value : </b> false
-     */
-    protected boolean racConnection;
-
-    // --------- End of properties data members ----------
-
-    // ===================================================================
-    //
-    // method : instance()
-    //
-    // description : static method to retrieve the TdbArchiverClass object
-    // once it has been initialised
-    //
-    // ===================================================================
-    public static TdbArchiverClass instance() {
-        if (_instance == null) {
-            System.err.println("TdbArchiverClass is not initialised !!!");
-            System.err.println("Exiting");
-            System.exit(-1);
-        }
-        return _instance;
-    }
-
-    // ===================================================================
-    //
-    // method : Init()
-    //
-    // description : static method to create/retrieve the TdbArchiverClass
-    // object. This method is the only one which enables a
-    // user to create the object
-    //
-    // in : - class_name : The class name
-    //
-    // ===================================================================
-    public static synchronized TdbArchiverClass init(final String class_name) throws DevFailed {
-        if (_instance == null) {
-            _instance = new TdbArchiverClass(class_name);
-        }
-        return _instance;
-    }
-
-    // ===================================================================
-    //
-    // method : TdbArchiverClass()
-    //
-    // description : constructor for the TdbArchiverClass class
-    //
-    // argument : in : - name : The class name
-    //
-    // ===================================================================
-    protected TdbArchiverClass(final String name) throws DevFailed {
-        super(name);
-
-        Util.out2.println("Entering TdbArchiverClass constructor");
-        // write_class_property();
-        get_class_property();
-
-        Util.out2.println("Leaving TdbArchiverClass constructor");
-    }
-
-    // ===================================================================
-    //
-    // method : command_factory()
-    //
-    // description : Create the command object(s) and store them in the
-    // command list
-    // ===================================================================
-    @SuppressWarnings("unchecked")
-    @Override
-    public void command_factory() {
-        command_list
-                .addElement(new RetryForAttributesCmd(
-                        "RetryForAttributes",
-                        Tango_DEVVAR_STRINGARRAY,
-                        Tango_DEV_SHORT,
-                        "The complete names of the attributes",
-                        "A return code, can be either: 10 (the archiver isn't in charge of any of the specified attributes) 20 (the retry succeeded) or 30 (the retry failed)",
-                        DispLevel.OPERATOR));
-
-        command_list
-                .addElement(new RetryForAttributeCmd(
-                        "RetryForAttribute",
-                        Tango_DEV_STRING,
-                        Tango_DEV_SHORT,
-                        "The complete name of the attribute",
-                        "A return code, can be either: 10 (the archiver isn't in charge of the specified attribute) 20 (the retry succeeded) or 30 (the retry failed)",
-                        DispLevel.OPERATOR));
-
-        command_list.addElement(new TriggerArchiveConfCmd("TriggerArchiveConf", Tango_DEVVAR_STRINGARRAY,
-                Tango_DEV_VOID, "The group of attributes to archive", "", DispLevel.OPERATOR));
-        command_list.addElement(new TriggerArchiveAttCmd("TriggerArchiveAtt", Tango_DEVVAR_STRINGARRAY, Tango_DEV_VOID,
-                "The attribute to archive", "", DispLevel.OPERATOR));
-        command_list.addElement(new TriggerArchiveAttCheckCmd("TriggerArchiveAttCheck", Tango_DEV_STRING,
-                Tango_DEV_VOID, "The name of the attribute to archive", "", DispLevel.OPERATOR));
-        command_list.addElement(new StopArchiveConfCmd("StopArchiveConf", Tango_DEVVAR_STRINGARRAY, Tango_DEV_VOID,
-                "The group of attributes", "", DispLevel.OPERATOR));
-        command_list.addElement(new StopArchiveAttCmd("StopArchiveAtt", Tango_DEVVAR_STRINGARRAY, Tango_DEV_VOID,
-                "the attribute on witch archiving must be stopped", "", DispLevel.OPERATOR));
-        command_list.addElement(new ExportData2DbCmd("ExportData2Db", Tango_DEVVAR_STRINGARRAY, Tango_DEV_VOID,
-                "the attribute from witch  data are expected.", "", DispLevel.OPERATOR));
-        command_list.addElement(new StateDetailedClass("StateDetailed", Tango_DEV_VOID, Tango_DEV_STRING, "",
-                "The detailed state", DispLevel.EXPERT));
-        command_list.addElement(new TemplCommandOut("GetKOAttributes", "getKOAttributes"));
-        command_list.addElement(new TemplCommandOut("RetryForKOAttributes", "retryForKOAttributes"));
-        command_list.addElement(new GetErrorMessageForAttribute(GetErrorMessageForAttribute.class.getSimpleName(),
-                Tango_DEV_STRING, Tango_DEV_STRING, "The attribute name",
-                "The last error message obtained at attribute value insertion in database", DispLevel.OPERATOR));
-        // add polling if any
-        /*
-         * for (int i = 0; i < command_list.size(); i++) { Command cmd =
-         * (Command) command_list.elementAt(i); }
-         */
-    }
-
-    // ===================================================================
-    //
-    // method : device_factory()
-    //
-    // description : Create the device object(s) and store them in the
-    // device list
-    //
-    // argument : in : String[] devlist : The device name list
-    //
-    // ===================================================================
-    @SuppressWarnings("unchecked")
-    @Override
-    public void device_factory(final String[] devlist) throws DevFailed {
-        final String device_version = ResourceBundle.getBundle("application").getString("project.version");
-        for (int i = 0; i < devlist.length; i++) {
-            // Util.out4.println("Device name : " + devlist[ i ]);
-
-            // Create device and add it into the device list
-            // ----------------------------------------------
-            device_list.addElement(new TdbArchiver(this, devlist[i], device_version));
-
-            // Export device to the outside world
-            // ----------------------------------------------
-            if (Util._UseDb == true) {
-                export_device((DeviceImpl) device_list.elementAt(i));
-            } else {
-                export_device((DeviceImpl) device_list.elementAt(i), devlist[i]);
-            }
-        }
-    }
-
-    // =============================================================================
-    //
-    // Method: attribute_factory(Vector att_list)
-    //
-    // =============================================================================
-    @SuppressWarnings("unchecked")
-    @Override
-    public void attribute_factory(final Vector att_list) throws DevFailed {
-        // Attribute : scalar_charge
-        final Attr scalar_charge = new Attr("scalar_charge", Tango_DEV_LONG, AttrWriteType.READ);
-        att_list.addElement(scalar_charge);
-
-        // Attribute : spectrum_charge
-        final Attr spectrum_charge = new Attr("spectrum_charge", Tango_DEV_LONG, AttrWriteType.READ);
-        att_list.addElement(spectrum_charge);
-
-        // Attribute : image_charge
-        final Attr image_charge = new Attr("image_charge", Tango_DEV_LONG, AttrWriteType.READ);
-        att_list.addElement(image_charge);
-
-        // Attribute : version
-        final Attr version = new Attr("version", Tango_DEV_STRING, AttrWriteType.READ);
-        att_list.addElement(version);
-
-    }
-
-    // ===================================================================
-    /**
-     * Get the class property for specified name.
-     * 
-     * @param name
-     *            The property name.
-     * @throws DevFailed
-     */
-    // ===================================================================
-    public DbDatum get_class_property(final String name) throws DevFailed {
-        final DbDatum[] classProps = get_db_class().get_property(new String[] { name });
-        return classProps[0];
-    }
-
-    // ===================================================================
-    /**
-     * Read the class properties from database.
-     */
-    // ===================================================================
-    public void get_class_property() throws DevFailed {
-
-    }
-
-    // ===================================================================
-    /**
-     * Set class description as property in database
-     */
-    // ===================================================================
-    // private void write_class_property() throws DevFailed {
-    // First time, check if database used
-    // --------------------------------------------
-    // if (Util._UseDb == false) {
-    // return;
-    // }
-
-    // Prepeare DbDatum
-    // --------------------------------------------
-    // final DbDatum[] data = new DbDatum[2];
-    // data[0] = new DbDatum("ProjectTitle");
-    // data[0].insert("Tango Device Server");
-    //
-    // data[1] = new DbDatum("Description");
-    // data[1].insert("Tis project defines the Tango DServer in charge of the intermediate archiving service.");
-
-    // Call database and and values
-    // --------------------------------------------
-    // get_db_class().put_property(data);
-    // }
-
-}
+// +======================================================================
+// $Source: /cvsroot/tango-cs/tango/jserver/archiving/TdbArchiver/TdbArchiverClass.java,v $
+//
+// Project:   	Tango Device Server
+//
+// Description:	java source code for the TdbArchiver class .
+//              This class is a singleton class and implements everything
+//              which exists only once for all the  TdbArchiver object
+//              It inherits from the DeviceClass class.
+//
+// $Author: ounsy $
+//
+// $Revision: 1.10 $
+//
+// $Log: TdbArchiverClass.java,v $
+// Revision 1.10  2006/07/25 13:22:32  ounsy
+// added a "version" attribute
+//
+// Revision 1.9  2006/03/08 14:36:21  ounsy
+// added pogo comments
+//
+// Revision 1.8  2006/02/15 12:56:18  ounsy
+// added retry_for_attribute and retry_for_attributes commands
+//
+// Revision 1.7  2006/02/15 11:10:12  chinkumo
+// Javadoc comment update.
+//
+// Revision 1.6  2006/01/27 13:07:20  ounsy
+// organised imports
+//
+// Revision 1.5  2005/11/29 17:34:14  chinkumo
+// no message
+//
+// Revision 1.4.10.3  2005/11/29 16:15:11  chinkumo
+// Code reformated (pogo compatible)
+//
+// Revision 1.4.10.2  2005/11/15 13:45:39  chinkumo
+// ...
+//
+// Revision 1.4.10.1  2005/09/26 08:01:54  chinkumo
+// Minor changes !
+//
+// Revision 1.4  2005/06/15 14:03:00  chinkumo
+// The device was regenerated in Tango V5.
+//
+//
+// copyleft :    European Synchrotron Radiation Facility
+//               BP 220, Grenoble 38043
+//               FRANCE
+//
+//-======================================================================
+//
+//  		This file is generated by POGO
+//	(Program Obviously used to Generate tango Object)
+//
+//         (c) - Software Engineering Group - ESRF
+//=============================================================================
+
+package TdbArchiver;
+
+import java.util.ResourceBundle;
+import java.util.Vector;
+
+import fr.esrf.Tango.AttrWriteType;
+import fr.esrf.Tango.DevFailed;
+import fr.esrf.Tango.DispLevel;
+import fr.esrf.TangoApi.DbDatum;
+import fr.esrf.TangoDs.Attr;
+import fr.esrf.TangoDs.DeviceClass;
+import fr.esrf.TangoDs.DeviceImpl;
+import fr.esrf.TangoDs.TangoConst;
+import fr.esrf.TangoDs.TemplCommandOut;
+import fr.esrf.TangoDs.Util;
+
+public class TdbArchiverClass extends DeviceClass implements TangoConst {
+    /**
+     * TdbArchiverClass class instance (it is a singleton).
+     */
+    private static TdbArchiverClass _instance = null;
+
+    // /**
+    // * Class properties array.
+    // */
+    // private final DbDatum[] cl_prop = null;
+
+    // --------- Start of properties data members ----------
+
+    /**
+     * Computer identifier on wich is settled the database TDB. The identifier
+     * can be the computer name or its IP address. <br>
+     * <b>Default value : </b> localhost
+     */
+    protected String dbHost;
+    /**
+     * Database name.<br>
+     * <b>Default value : </b> tdb
+     */
+    protected String dbName;
+    /**
+     * true if the ORACLE RAC connection is activated. This information is
+     * appended to all device's (or attributes) name. false otherwise.<br>
+     * <b>Default value : </b> false
+     */
+    protected boolean racConnection;
+
+    // --------- End of properties data members ----------
+
+    // ===================================================================
+    //
+    // method : instance()
+    //
+    // description : static method to retrieve the TdbArchiverClass object
+    // once it has been initialised
+    //
+    // ===================================================================
+    public static TdbArchiverClass instance() {
+        if (_instance == null) {
+            System.err.println("TdbArchiverClass is not initialised !!!");
+            System.err.println("Exiting");
+            System.exit(-1);
+        }
+        return _instance;
+    }
+
+    // ===================================================================
+    //
+    // method : Init()
+    //
+    // description : static method to create/retrieve the TdbArchiverClass
+    // object. This method is the only one which enables a
+    // user to create the object
+    //
+    // in : - class_name : The class name
+    //
+    // ===================================================================
+    public static synchronized TdbArchiverClass init(final String class_name) throws DevFailed {
+        if (_instance == null) {
+            _instance = new TdbArchiverClass(class_name);
+        }
+        return _instance;
+    }
+
+    // ===================================================================
+    //
+    // method : TdbArchiverClass()
+    //
+    // description : constructor for the TdbArchiverClass class
+    //
+    // argument : in : - name : The class name
+    //
+    // ===================================================================
+    protected TdbArchiverClass(final String name) throws DevFailed {
+        super(name);
+
+        Util.out2.println("Entering TdbArchiverClass constructor");
+        // write_class_property();
+        get_class_property();
+
+        Util.out2.println("Leaving TdbArchiverClass constructor");
+    }
+
+    // ===================================================================
+    //
+    // method : command_factory()
+    //
+    // description : Create the command object(s) and store them in the
+    // command list
+    // ===================================================================
+    @SuppressWarnings("unchecked")
+    @Override
+    public void command_factory() {
+        command_list
+                .addElement(new RetryForAttributesCmd(
+                        "RetryForAttributes",
+                        Tango_DEVVAR_STRINGARRAY,
+                        Tango_DEV_SHORT,
+                        "The complete names of the attributes",
+                        "A return code, can be either: 10 (the archiver isn't in charge of any of the specified attributes) 20 (the retry succeeded) or 30 (the retry failed)",
+                        DispLevel.OPERATOR));
+
+        command_list
+                .addElement(new RetryForAttributeCmd(
+                        "RetryForAttribute",
+                        Tango_DEV_STRING,
+                        Tango_DEV_SHORT,
+                        "The complete name of the attribute",
+                        "A return code, can be either: 10 (the archiver isn't in charge of the specified attribute) 20 (the retry succeeded) or 30 (the retry failed)",
+                        DispLevel.OPERATOR));
+
+        command_list.addElement(new TriggerArchiveConfCmd("TriggerArchiveConf", Tango_DEVVAR_STRINGARRAY,
+                Tango_DEV_VOID, "The group of attributes to archive", "", DispLevel.OPERATOR));
+        command_list.addElement(new TriggerArchiveAttCmd("TriggerArchiveAtt", Tango_DEVVAR_STRINGARRAY, Tango_DEV_VOID,
+                "The attribute to archive", "", DispLevel.OPERATOR));
+        command_list.addElement(new TriggerArchiveAttCheckCmd("TriggerArchiveAttCheck", Tango_DEV_STRING,
+                Tango_DEV_VOID, "The name of the attribute to archive", "", DispLevel.OPERATOR));
+        command_list.addElement(new StopArchiveConfCmd("StopArchiveConf", Tango_DEVVAR_STRINGARRAY, Tango_DEV_VOID,
+                "The group of attributes", "", DispLevel.OPERATOR));
+        command_list.addElement(new StopArchiveAttCmd("StopArchiveAtt", Tango_DEVVAR_STRINGARRAY, Tango_DEV_VOID,
+                "the attribute on witch archiving must be stopped", "", DispLevel.OPERATOR));
+        command_list.addElement(new ExportData2DbCmd("ExportData2Db", Tango_DEVVAR_STRINGARRAY, Tango_DEV_VOID,
+                "the attribute from witch  data are expected.", "", DispLevel.OPERATOR));
+        command_list.addElement(new StateDetailedClass("StateDetailed", Tango_DEV_VOID, Tango_DEV_STRING, "",
+                "The detailed state", DispLevel.EXPERT));
+        command_list.addElement(new TemplCommandOut("GetKOAttributes", "getKOAttributes"));
+        command_list.addElement(new TemplCommandOut("RetryForKOAttributes", "retryForKOAttributes"));
+        command_list.addElement(new GetErrorMessageForAttribute(GetErrorMessageForAttribute.class.getSimpleName(),
+                Tango_DEV_STRING, Tango_DEV_STRING, "The attribute name",
+                "The last error message obtained at attribute value insertion in database", DispLevel.OPERATOR));
+        // add polling if any
+        /*
+         * for (int i = 0; i < command_list.size(); i++) { Command cmd =
+         * (Command) command_list.elementAt(i); }
+         */
+    }
+
+    // ===================================================================
+    //
+    // method : device_factory()
+    //
+    // description : Create the device object(s) and store them in the
+    // device list
+    //
+    // argument : in : String[] devlist : The device name list
+    //
+    // ===================================================================
+    @SuppressWarnings("unchecked")
+    @Override
+    public void device_factory(final String[] devlist) throws DevFailed {
+        final String device_version = ResourceBundle.getBundle("application").getString("project.version");
+        for (int i = 0; i < devlist.length; i++) {
+            // Util.out4.println("Device name : " + devlist[ i ]);
+
+            // Create device and add it into the device list
+            // ----------------------------------------------
+            device_list.addElement(new TdbArchiver(this, devlist[i], device_version));
+
+            // Export device to the outside world
+            // ----------------------------------------------
+            if (Util._UseDb == true) {
+                export_device((DeviceImpl) device_list.elementAt(i));
+            } else {
+                export_device((DeviceImpl) device_list.elementAt(i), devlist[i]);
+            }
+        }
+    }
+
+    // =============================================================================
+    //
+    // Method: attribute_factory(Vector att_list)
+    //
+    // =============================================================================
+    @SuppressWarnings("unchecked")
+    @Override
+    public void attribute_factory(final Vector att_list) throws DevFailed {
+        // Attribute : scalar_charge
+        final Attr scalar_charge = new Attr("scalar_charge", Tango_DEV_LONG, AttrWriteType.READ);
+        att_list.addElement(scalar_charge);
+
+        // Attribute : spectrum_charge
+        final Attr spectrum_charge = new Attr("spectrum_charge", Tango_DEV_LONG, AttrWriteType.READ);
+        att_list.addElement(spectrum_charge);
+
+        // Attribute : image_charge
+        final Attr image_charge = new Attr("image_charge", Tango_DEV_LONG, AttrWriteType.READ);
+        att_list.addElement(image_charge);
+
+        // Attribute : version
+        final Attr version = new Attr("version", Tango_DEV_STRING, AttrWriteType.READ);
+        att_list.addElement(version);
+
+    }
+
+    // ===================================================================
+    /**
+     * Get the class property for specified name.
+     * 
+     * @param name
+     *            The property name.
+     * @throws DevFailed
+     */
+    // ===================================================================
+    public DbDatum get_class_property(final String name) throws DevFailed {
+        final DbDatum[] classProps = get_db_class().get_property(new String[] { name });
+        return classProps[0];
+    }
+
+    // ===================================================================
+    /**
+     * Read the class properties from database.
+     */
+    // ===================================================================
+    public void get_class_property() throws DevFailed {
+
+    }
+
+    // ===================================================================
+    /**
+     * Set class description as property in database
+     */
+    // ===================================================================
+    // private void write_class_property() throws DevFailed {
+    // First time, check if database used
+    // --------------------------------------------
+    // if (Util._UseDb == false) {
+    // return;
+    // }
+
+    // Prepeare DbDatum
+    // --------------------------------------------
+    // final DbDatum[] data = new DbDatum[2];
+    // data[0] = new DbDatum("ProjectTitle");
+    // data[0].insert("Tango Device Server");
+    //
+    // data[1] = new DbDatum("Description");
+    // data[1].insert("Tis project defines the Tango DServer in charge of the intermediate archiving service.");
+
+    // Call database and and values
+    // --------------------------------------------
+    // get_db_class().put_property(data);
+    // }
+
+}
diff --git a/src/main/java/TdbArchiver/TdbCleaner.java b/tdbarchiver/src/main/java/TdbArchiver/TdbCleaner.java
similarity index 93%
rename from src/main/java/TdbArchiver/TdbCleaner.java
rename to tdbarchiver/src/main/java/TdbArchiver/TdbCleaner.java
index a9f816a1f90865f94e6517d39089e3b81e221ded..820e63787185cdc31c5eae2dbc9295a17352b3e9 100644
--- a/src/main/java/TdbArchiver/TdbCleaner.java
+++ b/tdbarchiver/src/main/java/TdbArchiver/TdbCleaner.java
@@ -1,176 +1,177 @@
-package TdbArchiver;
-
-import java.util.StringTokenizer;
-
-import org.tango.utils.DevFailedUtils;
-
-import fr.esrf.Tango.DevFailed;
-import fr.soleil.archiving.common.api.ConnectionFactory;
-import fr.soleil.archiving.common.api.exception.ArchivingException;
-import fr.soleil.archiving.hdbtdb.api.ConfigConst;
-import fr.soleil.archiving.hdbtdb.api.DataBaseManager;
-import fr.soleil.archiving.hdbtdb.api.GetArchivingConf;
-import fr.soleil.archiving.hdbtdb.api.TDBDataBaseManager;
-import fr.soleil.archiving.hdbtdb.api.management.modes.TdbMode;
-import fr.soleil.archiving.hdbtdb.api.manager.ArchivingManagerApiRefFactory;
-import fr.soleil.archiving.hdbtdb.api.manager.IArchivingManagerApiRef;
-
-public class TdbCleaner {
-    private final String tdbUser;
-    private final String tdbPwd;
-    // private int keepingPeriod;
-
-    private DataBaseManager dataBaseApi;
-    private IArchivingManagerApiRef manager;
-
-    private static final short FAIL = 1;
-    private static final short SUCCESS = 2;
-    private static final short NOTHING_TO_DO = 3;
-
-    private static final short MINUTES = 1;
-    private static final short HOURS = 2;
-    private static final short DAYS = 3;
-
-    public TdbCleaner(String[] args) {
-        this.tdbUser = args[0];
-        this.tdbPwd = args[1];
-        // this.keepingPeriod = Integer.parseInt(args [ 2 ]);
-    }
-
-    /**
-     * @param args
-     * @throws ArchivingException
-     */
-    public static void main(String[] args) throws ArchivingException {
-        if (args == null || args.length != 2) {
-            end(FAIL, "Bad arguments. Usage: java TdbCleaner tdbUser tdbPwd");// keepingPeriod"
-                                                                              // );
-        }
-
-        TdbCleaner tdbCleaner = new TdbCleaner(args);
-        tdbCleaner.verify();
-        tdbCleaner.process();
-    }
-
-    private void verify() {
-        try {
-            this.manager = ArchivingManagerApiRefFactory.getInstance(false, ConnectionFactory.connectThroughTango(
-                    getClass().getSimpleName(), ConfigConst.TDB_CLASS_DEVICE, null, null, null, tdbUser, tdbPwd, null,
-                    null, null, false, true));
-            this.manager.archivingConfigureWithoutArchiverListInit();
-            this.dataBaseApi = this.manager.getDataBase();
-        } catch (ArchivingException e) {
-            e.printStackTrace();
-            end(FAIL, "TdbCleaner/verify/can't connect to the TDB database");
-        } catch (DevFailed e) {
-            System.err.println(DevFailedUtils.toString(e));
-            e.printStackTrace();
-            end(FAIL, "TdbCleaner/verify/can't connect to the TDB database");
-        }
-    }
-
-    private void process() throws ArchivingException {
-        // long time = (long)(this.keepingPeriod) * 3600 * 1000;
-
-        String[] attributeList = null;
-        try {
-            attributeList = ((TdbMode) this.dataBaseApi.getMode()).getArchivedAtt();
-        } catch (Exception e) {
-            e.printStackTrace();
-            end(FAIL, "TdbCleaner/process/can't load the list of attributes");
-        }
-
-        if (attributeList == null || attributeList.length == 0) {
-            end(NOTHING_TO_DO, "TdbCleaner/process/no attributes to clean");
-        }
-        /*
-         * for ( int i = 0 ; i < attributeList.length ; i ++ ) {
-         * System.out.println("TdbCleaner/next attribute|"+attributeList[i]); }
-         */
-
-        try {
-            long time = computeRetentionPeriod();
-            System.out.println("Retention = " + time);
-            ((TDBDataBaseManager) this.dataBaseApi).getTdbDeleteAttribute().deleteOldRecords(time, attributeList);
-        } catch (Exception e) {
-            e.printStackTrace();
-            end(FAIL, "TdbCleaner/process/can't delete the old records");
-        }
-
-    }
-
-    private static void end(int code, String message) {
-        System.out.println(message);
-        switch (code) {
-            case FAIL:
-                System.exit(1);
-                break;
-
-            case SUCCESS:
-            case NOTHING_TO_DO:
-                System.exit(0);
-                break;
-
-            default:
-                System.out.println("Incorrect exit code");
-                System.exit(1);
-        }
-    }
-
-    /**
-     * Compute the retention period : the default value is 3 days.
-     * 
-     * @return the retention period
-     */
-    protected long computeRetentionPeriod() {
-        short timeUnity = DAYS;
-        int timePeriod = 3;
-        boolean useDefault = false;
-
-        try {
-            // Read the retention period property
-            String retentionValue = GetArchivingConf.readStringInDB(ConfigConst.TDB_CLASS_DEVICE, "RetentionPeriod");
-
-            // Parse it
-            StringTokenizer st = new StringTokenizer(retentionValue, "/");
-            String type_s = st.nextToken();
-
-            if (type_s != "") {
-                if ("hours".equals(type_s.trim())) {
-                    timeUnity = HOURS;
-                } else if ("minutes".equals(type_s.trim())) {
-                    timeUnity = MINUTES;
-                } else
-                    timeUnity = DAYS;
-
-                // time extraction
-                timePeriod = Integer.parseInt(st.nextToken());
-                if (timePeriod <= 0) {
-                    System.out.println("Invalid period : default value is used (3 days)");
-                    useDefault = true;
-                }
-            }
-        } catch (ArchivingException e) {
-            System.out.println("Properties is not used due to exception : default value is used (3 days)");
-            // Nothing to do use default value
-            useDefault = true;
-        } catch (Exception e) {
-            System.out.println("Exception raised " + e + " default value is used (3 days)");
-            useDefault = true;
-        }
-
-        if (useDefault) {
-            timeUnity = DAYS;
-            timePeriod = 3;
-        }
-
-        switch (timeUnity) {
-            case MINUTES:
-                return (long) (timePeriod) * (long) (60 * 1000);
-            case HOURS:
-                return (long) (timePeriod) * (long) (3600 * 1000);
-            default:
-                return (long) (timePeriod) * (long) (24 * 3600 * 1000);
-        }
-    }
-}
+package TdbArchiver;
+
+import java.util.StringTokenizer;
+
+import fr.soleil.database.connection.DataBaseParameters;
+import org.tango.utils.DevFailedUtils;
+
+import fr.esrf.Tango.DevFailed;
+import fr.soleil.archiving.common.api.ConnectionFactory;
+import fr.soleil.archiving.common.api.exception.ArchivingException;
+import fr.soleil.archiving.hdbtdb.api.ConfigConst;
+import fr.soleil.archiving.hdbtdb.api.DataBaseManager;
+import fr.soleil.archiving.hdbtdb.api.GetArchivingConf;
+import fr.soleil.archiving.hdbtdb.api.TDBDataBaseManager;
+import fr.soleil.archiving.hdbtdb.api.management.modes.TdbMode;
+import fr.soleil.archiving.hdbtdb.api.manager.ArchivingManagerApiRefFactory;
+import fr.soleil.archiving.hdbtdb.api.manager.IArchivingManagerApiRef;
+
+public class TdbCleaner {
+    private final String tdbUser;
+    private final String tdbPwd;
+    // private int keepingPeriod;
+
+    private DataBaseManager dataBaseApi;
+    private IArchivingManagerApiRef manager;
+
+    private static final short FAIL = 1;
+    private static final short SUCCESS = 2;
+    private static final short NOTHING_TO_DO = 3;
+
+    private static final short MINUTES = 1;
+    private static final short HOURS = 2;
+    private static final short DAYS = 3;
+
+    public TdbCleaner(String[] args) {
+        this.tdbUser = args[0];
+        this.tdbPwd = args[1];
+        // this.keepingPeriod = Integer.parseInt(args [ 2 ]);
+    }
+
+    /**
+     * @param args
+     * @throws ArchivingException
+     */
+    public static void main(String[] args) throws ArchivingException {
+        if (args == null || args.length != 2) {
+            end(FAIL, "Bad arguments. Usage: java TdbCleaner tdbUser tdbPwd");// keepingPeriod"
+                                                                              // );
+        }
+
+        TdbCleaner tdbCleaner = new TdbCleaner(args);
+        tdbCleaner.verify();
+        tdbCleaner.process();
+    }
+
+    private void verify() {
+        try {
+            DataBaseParameters parameters = new DataBaseParameters();
+            parameters.setParametersFromTango(ConfigConst.TDB_CLASS_DEVICE);
+            this.manager = ArchivingManagerApiRefFactory.getInstance(false, ConnectionFactory.connect(parameters));
+            this.manager.archivingConfigureWithoutArchiverListInit();
+            this.dataBaseApi = this.manager.getDataBase();
+        } catch (ArchivingException e) {
+            e.printStackTrace();
+            end(FAIL, "TdbCleaner/verify/can't connect to the TDB database");
+        } catch (DevFailed e) {
+            System.err.println(DevFailedUtils.toString(e));
+            e.printStackTrace();
+            end(FAIL, "TdbCleaner/verify/can't connect to the TDB database");
+        }
+    }
+
+    private void process() throws ArchivingException {
+        // long time = (long)(this.keepingPeriod) * 3600 * 1000;
+
+        String[] attributeList = null;
+        try {
+            attributeList = ((TdbMode) this.dataBaseApi.getMode()).getArchivedAtt();
+        } catch (Exception e) {
+            e.printStackTrace();
+            end(FAIL, "TdbCleaner/process/can't load the list of attributes");
+        }
+
+        if (attributeList == null || attributeList.length == 0) {
+            end(NOTHING_TO_DO, "TdbCleaner/process/no attributes to clean");
+        }
+        /*
+         * for ( int i = 0 ; i < attributeList.length ; i ++ ) {
+         * System.out.println("TdbCleaner/next attribute|"+attributeList[i]); }
+         */
+
+        try {
+            long time = computeRetentionPeriod();
+            System.out.println("Retention = " + time);
+            ((TDBDataBaseManager) this.dataBaseApi).getTdbDeleteAttribute().deleteOldRecords(time, attributeList);
+        } catch (Exception e) {
+            e.printStackTrace();
+            end(FAIL, "TdbCleaner/process/can't delete the old records");
+        }
+
+    }
+
+    private static void end(int code, String message) {
+        System.out.println(message);
+        switch (code) {
+            case FAIL:
+                System.exit(1);
+                break;
+
+            case SUCCESS:
+            case NOTHING_TO_DO:
+                System.exit(0);
+                break;
+
+            default:
+                System.out.println("Incorrect exit code");
+                System.exit(1);
+        }
+    }
+
+    /**
+     * Compute the retention period : the default value is 3 days.
+     * 
+     * @return the retention period
+     */
+    protected long computeRetentionPeriod() {
+        short timeUnity = DAYS;
+        int timePeriod = 3;
+        boolean useDefault = false;
+
+        try {
+            // Read the retention period property
+            String retentionValue = GetArchivingConf.readStringInDB(ConfigConst.TDB_CLASS_DEVICE, "RetentionPeriod");
+
+            // Parse it
+            StringTokenizer st = new StringTokenizer(retentionValue, "/");
+            String type_s = st.nextToken();
+
+            if (type_s != "") {
+                if ("hours".equals(type_s.trim())) {
+                    timeUnity = HOURS;
+                } else if ("minutes".equals(type_s.trim())) {
+                    timeUnity = MINUTES;
+                } else
+                    timeUnity = DAYS;
+
+                // time extraction
+                timePeriod = Integer.parseInt(st.nextToken());
+                if (timePeriod <= 0) {
+                    System.out.println("Invalid period : default value is used (3 days)");
+                    useDefault = true;
+                }
+            }
+        } catch (ArchivingException e) {
+            System.out.println("Properties is not used due to exception : default value is used (3 days)");
+            // Nothing to do use default value
+            useDefault = true;
+        } catch (Exception e) {
+            System.out.println("Exception raised " + e + " default value is used (3 days)");
+            useDefault = true;
+        }
+
+        if (useDefault) {
+            timeUnity = DAYS;
+            timePeriod = 3;
+        }
+
+        switch (timeUnity) {
+            case MINUTES:
+                return (long) (timePeriod) * (long) (60 * 1000);
+            case HOURS:
+                return (long) (timePeriod) * (long) (3600 * 1000);
+            default:
+                return (long) (timePeriod) * (long) (24 * 3600 * 1000);
+        }
+    }
+}
diff --git a/src/main/java/TdbArchiver/TriggerArchiveAttCheckCmd.java b/tdbarchiver/src/main/java/TdbArchiver/TriggerArchiveAttCheckCmd.java
similarity index 96%
rename from src/main/java/TdbArchiver/TriggerArchiveAttCheckCmd.java
rename to tdbarchiver/src/main/java/TdbArchiver/TriggerArchiveAttCheckCmd.java
index 852d5a1371dcea419527bff9256de5eb11294e75..255d92ea2f184d94849352d0514db59f0055e8fe 100644
--- a/src/main/java/TdbArchiver/TriggerArchiveAttCheckCmd.java
+++ b/tdbarchiver/src/main/java/TdbArchiver/TriggerArchiveAttCheckCmd.java
@@ -1,170 +1,170 @@
-// +======================================================================
-// $Source: /cvsroot/tango-cs/tango/jserver/archiving/TdbArchiver/TriggerArchiveAttCheckCmd.java,v $
-//
-// Project:      Tango Device Server
-//
-// Description:  Java source code for the command TemplateClass of the
-//               TdbArchiver class.
-//
-// $Author: chinkumo $
-//
-// $Revision: 1.5 $
-//
-// $Log: TriggerArchiveAttCheckCmd.java,v $
-// Revision 1.5  2006/02/15 11:10:12  chinkumo
-// Javadoc comment update.
-//
-// Revision 1.4  2005/11/29 17:34:14  chinkumo
-// no message
-//
-// Revision 1.3.10.3  2005/11/29 16:15:11  chinkumo
-// Code reformated (pogo compatible)
-//
-// Revision 1.3.10.2  2005/11/15 13:45:39  chinkumo
-// ...
-//
-// Revision 1.3.10.1  2005/09/26 08:01:54  chinkumo
-// Minor changes !
-//
-// Revision 1.3  2005/06/15 14:03:00  chinkumo
-// The device was regenerated in Tango V5.
-//
-//
-// copyleft :    European Synchrotron Radiation Facility
-//               BP 220, Grenoble 38043
-//               FRANCE
-//
-//-======================================================================
-//
-//  		This file is generated by POGO
-//	(Program Obviously used to Generate tango Object)
-//
-//         (c) - Software Engineering Group - ESRF
-//=============================================================================
-
-/**
- * @author $Author: chinkumo $
- * @version $Revision: 1.5 $
- */
-package TdbArchiver;
-
-import org.omg.CORBA.Any;
-
-import fr.esrf.Tango.DevFailed;
-import fr.esrf.Tango.DevState;
-import fr.esrf.Tango.DispLevel;
-import fr.esrf.TangoDs.Command;
-import fr.esrf.TangoDs.DeviceImpl;
-import fr.esrf.TangoDs.Except;
-import fr.esrf.TangoDs.TangoConst;
-import fr.esrf.TangoDs.Util;
-import fr.soleil.archiving.hdbtdb.api.ConfigConst;
-
-/**
- * Class Description: This command is invoked when the archiving (intermediate
- * archiving) of an attribute is triggered. Before archiving, this command
- * checks that TDB database is ready to host the given attribute values. If not
- * registrations is done and the associated table is built.
- */
-
-public class TriggerArchiveAttCheckCmd extends Command implements TangoConst {
-    // ===============================================================
-    /**
-     * Constructor for Command class TriggerArchiveAttCheckCmd
-     * 
-     * @param name
-     *            command name
-     * @param in
-     *            argin type
-     * @param out
-     *            argout type
-     */
-    // ===============================================================
-    public TriggerArchiveAttCheckCmd(String name, int in, int out) {
-        super(name, in, out);
-    }
-
-    // ===============================================================
-    /**
-     * Constructor for Command class TriggerArchiveAttCheckCmd
-     * 
-     * @param name
-     *            command name
-     * @param in
-     *            argin type
-     * @param in_comments
-     *            argin description
-     * @param out
-     *            argout type
-     * @param out_comments
-     *            argout description
-     */
-    // ===============================================================
-    public TriggerArchiveAttCheckCmd(String name, int in, int out, String in_comments, String out_comments) {
-        super(name, in, out, in_comments, out_comments);
-    }
-
-    // ===============================================================
-    /**
-     * Constructor for Command class TriggerArchiveAttCheckCmd
-     * 
-     * @param name
-     *            command name
-     * @param in
-     *            argin type
-     * @param in_comments
-     *            argin description
-     * @param out
-     *            argout type
-     * @param out_comments
-     *            argout description
-     * @param level
-     *            The command display type OPERATOR or EXPERT
-     */
-    // ===============================================================
-    public TriggerArchiveAttCheckCmd(String name, int in, int out, String in_comments, String out_comments,
-            DispLevel level) {
-        super(name, in, out, in_comments, out_comments, level);
-    }
-
-    // ===============================================================
-    /**
-     * return the result of the device's command.
-     */
-    // ===============================================================
-    @Override
-    public Any execute(DeviceImpl device, Any in_any) throws DevFailed {
-        Util.out2.println("TriggerArchiveAttCheckCmd.execute(): arrived");
-        if (!(device instanceof TdbArchiver)) {
-            Except.throw_exception("DEVICE_ERROR", "Device parameter is not instance of TdbArchiver",
-                    ConfigConst.TDB_CLASS_DEVICE);
-        }
-
-        String argin = extract_DevString(in_any);
-        ((TdbArchiver) (device)).trigger_archive_att_check(argin);
-        return insert();
-    }
-
-    // ===============================================================
-    /**
-     * Check if it is allowed to execute the command.
-     */
-    // ===============================================================
-    @Override
-    public boolean is_allowed(DeviceImpl device, Any data_in) {
-        if (device.get_state() == DevState.FAULT) {
-            // End of Generated Code
-
-            // Re-Start of Generated Code
-            return false;
-        }
-        return true;
-    }
-}
-
-// -----------------------------------------------------------------------------
-/*
- * end of $Source:
- * /cvsroot/tango-cs/tango/jserver/archiving/TdbArchiver/TriggerArchiveAttCheckCmd
- * .java,v $
- */
+// +======================================================================
+// $Source: /cvsroot/tango-cs/tango/jserver/archiving/TdbArchiver/TriggerArchiveAttCheckCmd.java,v $
+//
+// Project:      Tango Device Server
+//
+// Description:  Java source code for the command TemplateClass of the
+//               TdbArchiver class.
+//
+// $Author: chinkumo $
+//
+// $Revision: 1.5 $
+//
+// $Log: TriggerArchiveAttCheckCmd.java,v $
+// Revision 1.5  2006/02/15 11:10:12  chinkumo
+// Javadoc comment update.
+//
+// Revision 1.4  2005/11/29 17:34:14  chinkumo
+// no message
+//
+// Revision 1.3.10.3  2005/11/29 16:15:11  chinkumo
+// Code reformated (pogo compatible)
+//
+// Revision 1.3.10.2  2005/11/15 13:45:39  chinkumo
+// ...
+//
+// Revision 1.3.10.1  2005/09/26 08:01:54  chinkumo
+// Minor changes !
+//
+// Revision 1.3  2005/06/15 14:03:00  chinkumo
+// The device was regenerated in Tango V5.
+//
+//
+// copyleft :    European Synchrotron Radiation Facility
+//               BP 220, Grenoble 38043
+//               FRANCE
+//
+//-======================================================================
+//
+//  		This file is generated by POGO
+//	(Program Obviously used to Generate tango Object)
+//
+//         (c) - Software Engineering Group - ESRF
+//=============================================================================
+
+/**
+ * @author $Author: chinkumo $
+ * @version $Revision: 1.5 $
+ */
+package TdbArchiver;
+
+import org.omg.CORBA.Any;
+
+import fr.esrf.Tango.DevFailed;
+import fr.esrf.Tango.DevState;
+import fr.esrf.Tango.DispLevel;
+import fr.esrf.TangoDs.Command;
+import fr.esrf.TangoDs.DeviceImpl;
+import fr.esrf.TangoDs.Except;
+import fr.esrf.TangoDs.TangoConst;
+import fr.esrf.TangoDs.Util;
+import fr.soleil.archiving.hdbtdb.api.ConfigConst;
+
+/**
+ * Class Description: This command is invoked when the archiving (intermediate
+ * archiving) of an attribute is triggered. Before archiving, this command
+ * checks that TDB database is ready to host the given attribute values. If not
+ * registrations is done and the associated table is built.
+ */
+
+public class TriggerArchiveAttCheckCmd extends Command implements TangoConst {
+    // ===============================================================
+    /**
+     * Constructor for Command class TriggerArchiveAttCheckCmd
+     * 
+     * @param name
+     *            command name
+     * @param in
+     *            argin type
+     * @param out
+     *            argout type
+     */
+    // ===============================================================
+    public TriggerArchiveAttCheckCmd(String name, int in, int out) {
+        super(name, in, out);
+    }
+
+    // ===============================================================
+    /**
+     * Constructor for Command class TriggerArchiveAttCheckCmd
+     * 
+     * @param name
+     *            command name
+     * @param in
+     *            argin type
+     * @param in_comments
+     *            argin description
+     * @param out
+     *            argout type
+     * @param out_comments
+     *            argout description
+     */
+    // ===============================================================
+    public TriggerArchiveAttCheckCmd(String name, int in, int out, String in_comments, String out_comments) {
+        super(name, in, out, in_comments, out_comments);
+    }
+
+    // ===============================================================
+    /**
+     * Constructor for Command class TriggerArchiveAttCheckCmd
+     * 
+     * @param name
+     *            command name
+     * @param in
+     *            argin type
+     * @param in_comments
+     *            argin description
+     * @param out
+     *            argout type
+     * @param out_comments
+     *            argout description
+     * @param level
+     *            The command display type OPERATOR or EXPERT
+     */
+    // ===============================================================
+    public TriggerArchiveAttCheckCmd(String name, int in, int out, String in_comments, String out_comments,
+            DispLevel level) {
+        super(name, in, out, in_comments, out_comments, level);
+    }
+
+    // ===============================================================
+    /**
+     * return the result of the device's command.
+     */
+    // ===============================================================
+    @Override
+    public Any execute(DeviceImpl device, Any in_any) throws DevFailed {
+        Util.out2.println("TriggerArchiveAttCheckCmd.execute(): arrived");
+        if (!(device instanceof TdbArchiver)) {
+            Except.throw_exception("DEVICE_ERROR", "Device parameter is not instance of TdbArchiver",
+                    ConfigConst.TDB_CLASS_DEVICE);
+        }
+
+        String argin = extract_DevString(in_any);
+        ((TdbArchiver) (device)).trigger_archive_att_check(argin);
+        return insert();
+    }
+
+    // ===============================================================
+    /**
+     * Check if it is allowed to execute the command.
+     */
+    // ===============================================================
+    @Override
+    public boolean is_allowed(DeviceImpl device, Any data_in) {
+        if (device.get_state() == DevState.FAULT) {
+            // End of Generated Code
+
+            // Re-Start of Generated Code
+            return false;
+        }
+        return true;
+    }
+}
+
+// -----------------------------------------------------------------------------
+/*
+ * end of $Source:
+ * /cvsroot/tango-cs/tango/jserver/archiving/TdbArchiver/TriggerArchiveAttCheckCmd
+ * .java,v $
+ */
diff --git a/src/main/java/TdbArchiver/TriggerArchiveAttCmd.java b/tdbarchiver/src/main/java/TdbArchiver/TriggerArchiveAttCmd.java
similarity index 97%
rename from src/main/java/TdbArchiver/TriggerArchiveAttCmd.java
rename to tdbarchiver/src/main/java/TdbArchiver/TriggerArchiveAttCmd.java
index b1ea965d3cc611c5ce6a0dbe953e2d658dd7cc61..d9478e3e0b3b3ed2d94f3659e9e4d20d0cf5acd0 100644
--- a/src/main/java/TdbArchiver/TriggerArchiveAttCmd.java
+++ b/tdbarchiver/src/main/java/TdbArchiver/TriggerArchiveAttCmd.java
@@ -1,173 +1,173 @@
-// +======================================================================
-// $Source: /cvsroot/tango-cs/tango/jserver/archiving/TdbArchiver/TriggerArchiveAttCmd.java,v $
-//
-// Project:      Tango Device Server
-//
-// Description:  Java source code for the command TemplateClass of the
-//               TdbArchiver class.
-//
-// $Author: chinkumo $
-//
-// $Revision: 1.5 $
-//
-// $Log: TriggerArchiveAttCmd.java,v $
-// Revision 1.5  2006/02/15 11:10:12  chinkumo
-// Javadoc comment update.
-//
-// Revision 1.4  2005/11/29 17:34:14  chinkumo
-// no message
-//
-// Revision 1.3.10.3  2005/11/29 16:15:11  chinkumo
-// Code reformated (pogo compatible)
-//
-// Revision 1.3.10.2  2005/11/15 13:45:39  chinkumo
-// ...
-//
-// Revision 1.3.10.1  2005/09/26 08:01:54  chinkumo
-// Minor changes !
-//
-// Revision 1.3  2005/06/15 14:03:00  chinkumo
-// The device was regenerated in Tango V5.
-//
-//
-// copyleft :    European Synchrotron Radiation Facility
-//               BP 220, Grenoble 38043
-//               FRANCE
-//
-//-======================================================================
-//
-//  		This file is generated by POGO
-//	(Program Obviously used to Generate tango Object)
-//
-//         (c) - Software Engineering Group - ESRF
-//=============================================================================
-
-/**
- * @author $Author: chinkumo $
- * @version $Revision: 1.5 $
- */
-package TdbArchiver;
-
-import org.omg.CORBA.Any;
-
-import fr.esrf.Tango.DevFailed;
-import fr.esrf.Tango.DevState;
-import fr.esrf.Tango.DispLevel;
-import fr.esrf.TangoDs.Command;
-import fr.esrf.TangoDs.DeviceImpl;
-import fr.esrf.TangoDs.Except;
-import fr.esrf.TangoDs.TangoConst;
-import fr.esrf.TangoDs.Util;
-import fr.soleil.archiving.hdbtdb.api.ConfigConst;
-import fr.soleil.archiving.hdbtdb.api.ConfigConst;
-
-/**
- * Class Description: This command is invoked when the archiving (intermediate
- * archiving) of an attribute is triggered. The attribute to archive is
- * therefore encapsulated in a
- * fr.soleil.hdbtdbArchivingApi.ArchivingTools.Tools.AttributeLight type object.
- * The use of this command suppose that the TDB database is ready to host that
- * attribute's values. That means the registration was made, the associated
- * table built, ...
- */
-
-public class TriggerArchiveAttCmd extends Command implements TangoConst {
-    // ===============================================================
-    /**
-     * Constructor for Command class TriggerArchiveAttCmd
-     * 
-     * @param name
-     *            command name
-     * @param in
-     *            argin type
-     * @param out
-     *            argout type
-     */
-    // ===============================================================
-    public TriggerArchiveAttCmd(String name, int in, int out) {
-        super(name, in, out);
-    }
-
-    // ===============================================================
-    /**
-     * Constructor for Command class TriggerArchiveAttCmd
-     * 
-     * @param name
-     *            command name
-     * @param in
-     *            argin type
-     * @param in_comments
-     *            argin description
-     * @param out
-     *            argout type
-     * @param out_comments
-     *            argout description
-     */
-    // ===============================================================
-    public TriggerArchiveAttCmd(String name, int in, int out, String in_comments, String out_comments) {
-        super(name, in, out, in_comments, out_comments);
-    }
-
-    // ===============================================================
-    /**
-     * Constructor for Command class TriggerArchiveAttCmd
-     * 
-     * @param name
-     *            command name
-     * @param in
-     *            argin type
-     * @param in_comments
-     *            argin description
-     * @param out
-     *            argout type
-     * @param out_comments
-     *            argout description
-     * @param level
-     *            The command display type OPERATOR or EXPERT
-     */
-    // ===============================================================
-    public TriggerArchiveAttCmd(String name, int in, int out, String in_comments, String out_comments, DispLevel level) {
-        super(name, in, out, in_comments, out_comments, level);
-    }
-
-    // ===============================================================
-    /**
-     * return the result of the device's command.
-     */
-    // ===============================================================
-    @Override
-    public Any execute(DeviceImpl device, Any in_any) throws DevFailed {
-        Util.out2.println("TriggerArchiveAttCmd.execute(): arrived");
-        if (!(device instanceof TdbArchiver)) {
-            Except.throw_exception("DEVICE_ERROR", "Device parameter is not instance of TdbArchiver",
-                    ConfigConst.TDB_CLASS_DEVICE);
-        }
-
-        String[] argin = extract_DevVarStringArray(in_any);
-        ((TdbArchiver) (device)).trigger_archive_att(argin);
-        return insert();
-    }
-
-    // ===============================================================
-    /**
-     * Check if it is allowed to execute the command.
-     */
-    // ===============================================================
-    @Override
-    public boolean is_allowed(DeviceImpl device, Any data_in) {
-        if (device.get_state() == DevState.FAULT) {
-            // End of Generated Code
-
-            // Re-Start of Generated Code
-            return false;
-        }
-        return true;
-    }
-}
-
-// -----------------------------------------------------------------------------
-/*
- * end of $Source:
- * /cvsroot/tango-cs/tango/jserver/archiving/TdbArchiver/TriggerArchiveAttCmd
- * .java,v $
- */
+// +======================================================================
+// $Source: /cvsroot/tango-cs/tango/jserver/archiving/TdbArchiver/TriggerArchiveAttCmd.java,v $
+//
+// Project:      Tango Device Server
+//
+// Description:  Java source code for the command TemplateClass of the
+//               TdbArchiver class.
+//
+// $Author: chinkumo $
+//
+// $Revision: 1.5 $
+//
+// $Log: TriggerArchiveAttCmd.java,v $
+// Revision 1.5  2006/02/15 11:10:12  chinkumo
+// Javadoc comment update.
+//
+// Revision 1.4  2005/11/29 17:34:14  chinkumo
+// no message
+//
+// Revision 1.3.10.3  2005/11/29 16:15:11  chinkumo
+// Code reformated (pogo compatible)
+//
+// Revision 1.3.10.2  2005/11/15 13:45:39  chinkumo
+// ...
+//
+// Revision 1.3.10.1  2005/09/26 08:01:54  chinkumo
+// Minor changes !
+//
+// Revision 1.3  2005/06/15 14:03:00  chinkumo
+// The device was regenerated in Tango V5.
+//
+//
+// copyleft :    European Synchrotron Radiation Facility
+//               BP 220, Grenoble 38043
+//               FRANCE
+//
+//-======================================================================
+//
+//  		This file is generated by POGO
+//	(Program Obviously used to Generate tango Object)
+//
+//         (c) - Software Engineering Group - ESRF
+//=============================================================================
+
+/**
+ * @author $Author: chinkumo $
+ * @version $Revision: 1.5 $
+ */
+package TdbArchiver;
+
+import org.omg.CORBA.Any;
+
+import fr.esrf.Tango.DevFailed;
+import fr.esrf.Tango.DevState;
+import fr.esrf.Tango.DispLevel;
+import fr.esrf.TangoDs.Command;
+import fr.esrf.TangoDs.DeviceImpl;
+import fr.esrf.TangoDs.Except;
+import fr.esrf.TangoDs.TangoConst;
+import fr.esrf.TangoDs.Util;
+import fr.soleil.archiving.hdbtdb.api.ConfigConst;
+import fr.soleil.archiving.hdbtdb.api.ConfigConst;
+
+/**
+ * Class Description: This command is invoked when the archiving (intermediate
+ * archiving) of an attribute is triggered. The attribute to archive is
+ * therefore encapsulated in a
+ * fr.soleil.hdbtdbArchivingApi.ArchivingTools.Tools.AttributeLight type object.
+ * The use of this command suppose that the TDB database is ready to host that
+ * attribute's values. That means the registration was made, the associated
+ * table built, ...
+ */
+
+public class TriggerArchiveAttCmd extends Command implements TangoConst {
+    // ===============================================================
+    /**
+     * Constructor for Command class TriggerArchiveAttCmd
+     * 
+     * @param name
+     *            command name
+     * @param in
+     *            argin type
+     * @param out
+     *            argout type
+     */
+    // ===============================================================
+    public TriggerArchiveAttCmd(String name, int in, int out) {
+        super(name, in, out);
+    }
+
+    // ===============================================================
+    /**
+     * Constructor for Command class TriggerArchiveAttCmd
+     * 
+     * @param name
+     *            command name
+     * @param in
+     *            argin type
+     * @param in_comments
+     *            argin description
+     * @param out
+     *            argout type
+     * @param out_comments
+     *            argout description
+     */
+    // ===============================================================
+    public TriggerArchiveAttCmd(String name, int in, int out, String in_comments, String out_comments) {
+        super(name, in, out, in_comments, out_comments);
+    }
+
+    // ===============================================================
+    /**
+     * Constructor for Command class TriggerArchiveAttCmd
+     * 
+     * @param name
+     *            command name
+     * @param in
+     *            argin type
+     * @param in_comments
+     *            argin description
+     * @param out
+     *            argout type
+     * @param out_comments
+     *            argout description
+     * @param level
+     *            The command display type OPERATOR or EXPERT
+     */
+    // ===============================================================
+    public TriggerArchiveAttCmd(String name, int in, int out, String in_comments, String out_comments, DispLevel level) {
+        super(name, in, out, in_comments, out_comments, level);
+    }
+
+    // ===============================================================
+    /**
+     * return the result of the device's command.
+     */
+    // ===============================================================
+    @Override
+    public Any execute(DeviceImpl device, Any in_any) throws DevFailed {
+        Util.out2.println("TriggerArchiveAttCmd.execute(): arrived");
+        if (!(device instanceof TdbArchiver)) {
+            Except.throw_exception("DEVICE_ERROR", "Device parameter is not instance of TdbArchiver",
+                    ConfigConst.TDB_CLASS_DEVICE);
+        }
+
+        String[] argin = extract_DevVarStringArray(in_any);
+        ((TdbArchiver) (device)).trigger_archive_att(argin);
+        return insert();
+    }
+
+    // ===============================================================
+    /**
+     * Check if it is allowed to execute the command.
+     */
+    // ===============================================================
+    @Override
+    public boolean is_allowed(DeviceImpl device, Any data_in) {
+        if (device.get_state() == DevState.FAULT) {
+            // End of Generated Code
+
+            // Re-Start of Generated Code
+            return false;
+        }
+        return true;
+    }
+}
+
+// -----------------------------------------------------------------------------
+/*
+ * end of $Source:
+ * /cvsroot/tango-cs/tango/jserver/archiving/TdbArchiver/TriggerArchiveAttCmd
+ * .java,v $
+ */
diff --git a/src/main/java/TdbArchiver/TriggerArchiveConfCmd.java b/tdbarchiver/src/main/java/TdbArchiver/TriggerArchiveConfCmd.java
similarity index 97%
rename from src/main/java/TdbArchiver/TriggerArchiveConfCmd.java
rename to tdbarchiver/src/main/java/TdbArchiver/TriggerArchiveConfCmd.java
index 3aaaa2ce5b0925ed253fc1335111ef1863d3a533..f1f6874e27787ac5aaad051705174e81aca5de9e 100644
--- a/src/main/java/TdbArchiver/TriggerArchiveConfCmd.java
+++ b/tdbarchiver/src/main/java/TdbArchiver/TriggerArchiveConfCmd.java
@@ -1,170 +1,170 @@
-// +======================================================================
-// $Source: /cvsroot/tango-cs/tango/jserver/archiving/TdbArchiver/TriggerArchiveConfCmd.java,v $
-//
-// Project:      Tango Device Server
-//
-// Description:  Java source code for the command TemplateClass of the
-//               TdbArchiver class.
-//
-// $Author: chinkumo $
-//
-// $Revision: 1.5 $
-//
-// $Log: TriggerArchiveConfCmd.java,v $
-// Revision 1.5  2006/02/15 11:10:12  chinkumo
-// Javadoc comment update.
-//
-// Revision 1.4  2005/11/29 17:34:14  chinkumo
-// no message
-//
-// Revision 1.3.10.3  2005/11/29 16:15:11  chinkumo
-// Code reformated (pogo compatible)
-//
-// Revision 1.3.10.2  2005/11/15 13:45:39  chinkumo
-// ...
-//
-// Revision 1.3.10.1  2005/09/26 08:01:54  chinkumo
-// Minor changes !
-//
-// Revision 1.3  2005/06/15 14:03:00  chinkumo
-// The device was regenerated in Tango V5.
-//
-//
-// copyleft :    European Synchrotron Radiation Facility
-//               BP 220, Grenoble 38043
-//               FRANCE
-//
-//-======================================================================
-//
-//  		This file is generated by POGO
-//	(Program Obviously used to Generate tango Object)
-//
-//         (c) - Software Engineering Group - ESRF
-//=============================================================================
-
-/**
- * @author $Author: chinkumo $
- * @version $Revision: 1.5 $
- */
-package TdbArchiver;
-
-import org.omg.CORBA.Any;
-
-import fr.esrf.Tango.DevFailed;
-import fr.esrf.Tango.DevState;
-import fr.esrf.Tango.DispLevel;
-import fr.esrf.TangoDs.Command;
-import fr.esrf.TangoDs.DeviceImpl;
-import fr.esrf.TangoDs.Except;
-import fr.esrf.TangoDs.TangoConst;
-import fr.esrf.TangoDs.Util;
-import fr.soleil.archiving.hdbtdb.api.ConfigConst;
-
-/**
- * Class Description: This command is invoked when the archiving (intermediate
- * archiving) of a group of attributes is triggered. The group of attributes is
- * therefore encapsulated in an ArchivingConfig type object. The use of this
- * command suppose that the TDB database is ready to host those attributes's
- * values. That means registrations were made, the associated tables built, ...
- */
-
-public class TriggerArchiveConfCmd extends Command implements TangoConst {
-    // ===============================================================
-    /**
-     * Constructor for Command class TriggerArchiveConfCmd
-     * 
-     * @param name
-     *            command name
-     * @param in
-     *            argin type
-     * @param out
-     *            argout type
-     */
-    // ===============================================================
-    public TriggerArchiveConfCmd(String name, int in, int out) {
-        super(name, in, out);
-    }
-
-    // ===============================================================
-    /**
-     * Constructor for Command class TriggerArchiveConfCmd
-     * 
-     * @param name
-     *            command name
-     * @param in
-     *            argin type
-     * @param in_comments
-     *            argin description
-     * @param out
-     *            argout type
-     * @param out_comments
-     *            argout description
-     */
-    // ===============================================================
-    public TriggerArchiveConfCmd(String name, int in, int out, String in_comments, String out_comments) {
-        super(name, in, out, in_comments, out_comments);
-    }
-
-    // ===============================================================
-    /**
-     * Constructor for Command class TriggerArchiveConfCmd
-     * 
-     * @param name
-     *            command name
-     * @param in
-     *            argin type
-     * @param in_comments
-     *            argin description
-     * @param out
-     *            argout type
-     * @param out_comments
-     *            argout description
-     * @param level
-     *            The command display type OPERATOR or EXPERT
-     */
-    // ===============================================================
-    public TriggerArchiveConfCmd(String name, int in, int out, String in_comments, String out_comments, DispLevel level) {
-        super(name, in, out, in_comments, out_comments, level);
-    }
-
-    // ===============================================================
-    /**
-     * return the result of the device's command.
-     */
-    // ===============================================================
-    @Override
-    public Any execute(DeviceImpl device, Any in_any) throws DevFailed {
-        Util.out2.println("TriggerArchiveConfCmd.execute(): arrived");
-        if (!(device instanceof TdbArchiver)) {
-            Except.throw_exception("DEVICE_ERROR", "Device parameter is not instance of TdbArchiver",
-                    ConfigConst.TDB_CLASS_DEVICE);
-        }
-
-        String[] argin = extract_DevVarStringArray(in_any);
-        ((TdbArchiver) (device)).trigger_archive_conf(argin);
-        return insert();
-    }
-
-    // ===============================================================
-    /**
-     * Check if it is allowed to execute the command.
-     */
-    // ===============================================================
-    @Override
-    public boolean is_allowed(DeviceImpl device, Any data_in) {
-        if (device.get_state() == DevState.FAULT) {
-            // End of Generated Code
-
-            // Re-Start of Generated Code
-            return false;
-        }
-        return true;
-    }
-}
-
-// -----------------------------------------------------------------------------
-/*
- * end of $Source:
- * /cvsroot/tango-cs/tango/jserver/archiving/TdbArchiver/TriggerArchiveConfCmd
- * .java,v $
- */
+// +======================================================================
+// $Source: /cvsroot/tango-cs/tango/jserver/archiving/TdbArchiver/TriggerArchiveConfCmd.java,v $
+//
+// Project:      Tango Device Server
+//
+// Description:  Java source code for the command TemplateClass of the
+//               TdbArchiver class.
+//
+// $Author: chinkumo $
+//
+// $Revision: 1.5 $
+//
+// $Log: TriggerArchiveConfCmd.java,v $
+// Revision 1.5  2006/02/15 11:10:12  chinkumo
+// Javadoc comment update.
+//
+// Revision 1.4  2005/11/29 17:34:14  chinkumo
+// no message
+//
+// Revision 1.3.10.3  2005/11/29 16:15:11  chinkumo
+// Code reformated (pogo compatible)
+//
+// Revision 1.3.10.2  2005/11/15 13:45:39  chinkumo
+// ...
+//
+// Revision 1.3.10.1  2005/09/26 08:01:54  chinkumo
+// Minor changes !
+//
+// Revision 1.3  2005/06/15 14:03:00  chinkumo
+// The device was regenerated in Tango V5.
+//
+//
+// copyleft :    European Synchrotron Radiation Facility
+//               BP 220, Grenoble 38043
+//               FRANCE
+//
+//-======================================================================
+//
+//  		This file is generated by POGO
+//	(Program Obviously used to Generate tango Object)
+//
+//         (c) - Software Engineering Group - ESRF
+//=============================================================================
+
+/**
+ * @author $Author: chinkumo $
+ * @version $Revision: 1.5 $
+ */
+package TdbArchiver;
+
+import org.omg.CORBA.Any;
+
+import fr.esrf.Tango.DevFailed;
+import fr.esrf.Tango.DevState;
+import fr.esrf.Tango.DispLevel;
+import fr.esrf.TangoDs.Command;
+import fr.esrf.TangoDs.DeviceImpl;
+import fr.esrf.TangoDs.Except;
+import fr.esrf.TangoDs.TangoConst;
+import fr.esrf.TangoDs.Util;
+import fr.soleil.archiving.hdbtdb.api.ConfigConst;
+
+/**
+ * Class Description: This command is invoked when the archiving (intermediate
+ * archiving) of a group of attributes is triggered. The group of attributes is
+ * therefore encapsulated in an ArchivingConfig type object. The use of this
+ * command suppose that the TDB database is ready to host those attributes's
+ * values. That means registrations were made, the associated tables built, ...
+ */
+
+public class TriggerArchiveConfCmd extends Command implements TangoConst {
+    // ===============================================================
+    /**
+     * Constructor for Command class TriggerArchiveConfCmd
+     * 
+     * @param name
+     *            command name
+     * @param in
+     *            argin type
+     * @param out
+     *            argout type
+     */
+    // ===============================================================
+    public TriggerArchiveConfCmd(String name, int in, int out) {
+        super(name, in, out);
+    }
+
+    // ===============================================================
+    /**
+     * Constructor for Command class TriggerArchiveConfCmd
+     * 
+     * @param name
+     *            command name
+     * @param in
+     *            argin type
+     * @param in_comments
+     *            argin description
+     * @param out
+     *            argout type
+     * @param out_comments
+     *            argout description
+     */
+    // ===============================================================
+    public TriggerArchiveConfCmd(String name, int in, int out, String in_comments, String out_comments) {
+        super(name, in, out, in_comments, out_comments);
+    }
+
+    // ===============================================================
+    /**
+     * Constructor for Command class TriggerArchiveConfCmd
+     * 
+     * @param name
+     *            command name
+     * @param in
+     *            argin type
+     * @param in_comments
+     *            argin description
+     * @param out
+     *            argout type
+     * @param out_comments
+     *            argout description
+     * @param level
+     *            The command display type OPERATOR or EXPERT
+     */
+    // ===============================================================
+    public TriggerArchiveConfCmd(String name, int in, int out, String in_comments, String out_comments, DispLevel level) {
+        super(name, in, out, in_comments, out_comments, level);
+    }
+
+    // ===============================================================
+    /**
+     * return the result of the device's command.
+     */
+    // ===============================================================
+    @Override
+    public Any execute(DeviceImpl device, Any in_any) throws DevFailed {
+        Util.out2.println("TriggerArchiveConfCmd.execute(): arrived");
+        if (!(device instanceof TdbArchiver)) {
+            Except.throw_exception("DEVICE_ERROR", "Device parameter is not instance of TdbArchiver",
+                    ConfigConst.TDB_CLASS_DEVICE);
+        }
+
+        String[] argin = extract_DevVarStringArray(in_any);
+        ((TdbArchiver) (device)).trigger_archive_conf(argin);
+        return insert();
+    }
+
+    // ===============================================================
+    /**
+     * Check if it is allowed to execute the command.
+     */
+    // ===============================================================
+    @Override
+    public boolean is_allowed(DeviceImpl device, Any data_in) {
+        if (device.get_state() == DevState.FAULT) {
+            // End of Generated Code
+
+            // Re-Start of Generated Code
+            return false;
+        }
+        return true;
+    }
+}
+
+// -----------------------------------------------------------------------------
+/*
+ * end of $Source:
+ * /cvsroot/tango-cs/tango/jserver/archiving/TdbArchiver/TriggerArchiveConfCmd
+ * .java,v $
+ */
diff --git a/tdbarchiver/src/resources/application.properties b/tdbarchiver/src/resources/application.properties
new file mode 100644
index 0000000000000000000000000000000000000000..256553fd996bcf6edfc00d2799b25e9767957e5d
--- /dev/null
+++ b/tdbarchiver/src/resources/application.properties
@@ -0,0 +1,5 @@
+#application properties
+project.name=${project.name}
+project.version=${project.version}
+build.date=${buildNumber}
+
diff --git a/tdbextractor/pom.xml b/tdbextractor/pom.xml
new file mode 100644
index 0000000000000000000000000000000000000000..f3202450cf695598048e876eb00aebea7d067f9b
--- /dev/null
+++ b/tdbextractor/pom.xml
@@ -0,0 +1,57 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"
+  xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+  <modelVersion>4.0.0</modelVersion>
+
+  <parent>
+    <groupId>fr.soleil.deviceservers</groupId>
+    <artifactId>historicalarchivingservers</artifactId>
+    <version>2.6.1</version>
+  </parent>
+
+  <groupId>fr.soleil.deviceservers</groupId>
+  <artifactId>tdbextractor</artifactId>
+
+  <developers>
+    <developer>
+      <id>girardot</id>
+      <name>Raphaël GIRARDOT</name>
+      <email>raphael.girardot@synchrotron-soleil.fr</email>
+      <organization>Synchrotron Soleil</organization>
+      <organizationUrl>http://www.synchrotron-soleil.fr</organizationUrl>
+      <roles>
+        <role>Java Developer</role>
+      </roles>
+      <timezone>1</timezone>
+    </developer>
+  </developers>
+  <build>
+    <plugins>
+      <plugin>
+        <groupId>fr.soleil.maven.plugins</groupId>
+        <artifactId>maven-script-plugin</artifactId>
+        <executions>
+          <execution>
+            <id>install</id>
+            <phase>install</phase>
+            <goals>
+              <goal>generate</goal>
+            </goals>
+          </execution>
+        </executions>
+      </plugin>
+    </plugins>
+  </build>
+
+  <dependencies>
+    <dependency>
+      <artifactId>log4j</artifactId>
+      <groupId>log4j</groupId>
+    </dependency>
+  </dependencies>
+
+  <properties>
+    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
+  </properties>
+
+</project>
diff --git a/src/main/java/TdbExtractor/ExtractBetweenDatesClass.java b/tdbextractor/src/main/java/TdbExtractor/ExtractBetweenDatesClass.java
similarity index 100%
rename from src/main/java/TdbExtractor/ExtractBetweenDatesClass.java
rename to tdbextractor/src/main/java/TdbExtractor/ExtractBetweenDatesClass.java
diff --git a/src/main/java/TdbExtractor/GetArchivingModeClass.java b/tdbextractor/src/main/java/TdbExtractor/GetArchivingModeClass.java
similarity index 94%
rename from src/main/java/TdbExtractor/GetArchivingModeClass.java
rename to tdbextractor/src/main/java/TdbExtractor/GetArchivingModeClass.java
index eb692fc73673319e71175b7bc19df5fbbfa0459f..3b754671d089c138a96ca5494e269aeeee5af816 100644
--- a/src/main/java/TdbExtractor/GetArchivingModeClass.java
+++ b/tdbextractor/src/main/java/TdbExtractor/GetArchivingModeClass.java
@@ -1,161 +1,161 @@
-//+======================================================================
-// $Source$
-//
-// Project:      Tango Device Server
-//
-// Description:  Java source code for the command TemplateClass of the
-//               TdbExtractor class.
-//
-// $Author$
-//
-// $Revision$
-//
-// $Log$
-// Revision 1.3  2010/11/22 08:09:15  abeilleg
-// remove critical of findbugs
-//
-// Revision 1.2  2009/12/17 12:47:15  pierrejoseph
-// CheckStyle:  Organize imports / Format
-//
-// Revision 1.1  2008/02/28 15:37:15  pierrejoseph
-// TdbExtractor has been forgotten
-//
-// Revision 1.3  2005/11/29 16:13:31  chinkumo
-// Code reformated (pogo compatible)
-//
-// Revision 1.2  2005/11/15 13:45:16  chinkumo
-// ...
-//
-// Revision 1.1  2005/09/09 10:03:41  chinkumo
-// First commit !
-// (Dynamic attribut release)
-//
-//
-// copyleft :    European Synchrotron Radiation Facility
-//               BP 220, Grenoble 38043
-//               FRANCE
-//
-//-======================================================================
-//
-//  		This file is generated by POGO
-//	(Program Obviously used to Generate tango Object)
-//
-//         (c) - Software Engineering Group - ESRF
-//=============================================================================
-
-/**
- * @author	$Author$
- * @version	$Revision$
- */
-package TdbExtractor;
-
-import org.omg.CORBA.Any;
-
-import fr.esrf.Tango.DevFailed;
-import fr.esrf.Tango.DispLevel;
-import fr.esrf.TangoDs.Command;
-import fr.esrf.TangoDs.DeviceImpl;
-import fr.esrf.TangoDs.Except;
-import fr.esrf.TangoDs.TangoConst;
-import fr.esrf.TangoDs.Util;
-
-/**
- * Class Description: Gets the archiving mode used for the specified attribute.
- */
-
-public class GetArchivingModeClass extends Command implements TangoConst {
-	// ===============================================================
-	/**
-	 * Constructor for Command class GetArchivingModeClass
-	 * 
-	 * @param name
-	 *            command name
-	 * @param in
-	 *            argin type
-	 * @param out
-	 *            argout type
-	 */
-	// ===============================================================
-	public GetArchivingModeClass(final String name, final int in, final int out) {
-		super(name, in, out);
-	}
-
-	// ===============================================================
-	/**
-	 * Constructor for Command class GetArchivingModeClass
-	 * 
-	 * @param name
-	 *            command name
-	 * @param in
-	 *            argin type
-	 * @param in_comments
-	 *            argin description
-	 * @param out
-	 *            argout type
-	 * @param out_comments
-	 *            argout description
-	 */
-	// ===============================================================
-	public GetArchivingModeClass(final String name, final int in, final int out, final String in_comments, final String out_comments) {
-		super(name, in, out, in_comments, out_comments);
-	}
-
-	// ===============================================================
-	/**
-	 * Constructor for Command class GetArchivingModeClass
-	 * 
-	 * @param name
-	 *            command name
-	 * @param in
-	 *            argin type
-	 * @param in_comments
-	 *            argin description
-	 * @param out
-	 *            argout type
-	 * @param out_comments
-	 *            argout description
-	 * @param level
-	 *            The command display type OPERATOR or EXPERT
-	 */
-	// ===============================================================
-	public GetArchivingModeClass(final String name, final int in, final int out, final String in_comments, final String out_comments, final DispLevel level) {
-		super(name, in, out, in_comments, out_comments, level);
-	}
-
-	// ===============================================================
-	/**
-	 * return the result of the device's command.
-	 */
-	// ===============================================================
-	@Override
-	public Any execute(final DeviceImpl device, final Any in_any) throws DevFailed {
-		Util.out2.println("GetArchivingModeClass.execute(): arrived");
-		final String argin = extract_DevString(in_any);
-
-		if (!(device instanceof TdbExtractor)) {
-			Except.throw_exception("DEVICE_ERROR", "Device parameter is not instance of TdbExtractor", "TdbExtractor");
-		}
-
-		return insert(((TdbExtractor) device).get_archiving_mode(argin));
-	}
-
-	// ===============================================================
-	/**
-	 * Check if it is allowed to execute the command.
-	 */
-	// ===============================================================
-	@Override
-	public boolean is_allowed(final DeviceImpl device, final Any data_in) {
-		// End of Generated Code
-
-		// Re-Start of Generated Code
-		return true;
-	}
-}
-
-// -----------------------------------------------------------------------------
-/*
- * end of $Source:
- * /cvsroot/tango-cs/archiving/server/hdbtdbArchivingServers/src/
- * main/java/TdbExtractor/GetArchivingModeClass.java,v $
- */
+//+======================================================================
+// $Source$
+//
+// Project:      Tango Device Server
+//
+// Description:  Java source code for the command TemplateClass of the
+//               TdbExtractor class.
+//
+// $Author: gramer $
+//
+// $Revision: 15443 $
+//
+// $Log$
+// Revision 1.3  2010/11/22 08:09:15  abeilleg
+// remove critical of findbugs
+//
+// Revision 1.2  2009/12/17 12:47:15  pierrejoseph
+// CheckStyle:  Organize imports / Format
+//
+// Revision 1.1  2008/02/28 15:37:15  pierrejoseph
+// TdbExtractor has been forgotten
+//
+// Revision 1.3  2005/11/29 16:13:31  chinkumo
+// Code reformated (pogo compatible)
+//
+// Revision 1.2  2005/11/15 13:45:16  chinkumo
+// ...
+//
+// Revision 1.1  2005/09/09 10:03:41  chinkumo
+// First commit !
+// (Dynamic attribut release)
+//
+//
+// copyleft :    European Synchrotron Radiation Facility
+//               BP 220, Grenoble 38043
+//               FRANCE
+//
+//-======================================================================
+//
+//  		This file is generated by POGO
+//	(Program Obviously used to Generate tango Object)
+//
+//         (c) - Software Engineering Group - ESRF
+//=============================================================================
+
+/**
+ * @author	$Author: gramer $
+ * @version	$Revision: 15443 $
+ */
+package TdbExtractor;
+
+import org.omg.CORBA.Any;
+
+import fr.esrf.Tango.DevFailed;
+import fr.esrf.Tango.DispLevel;
+import fr.esrf.TangoDs.Command;
+import fr.esrf.TangoDs.DeviceImpl;
+import fr.esrf.TangoDs.Except;
+import fr.esrf.TangoDs.TangoConst;
+import fr.esrf.TangoDs.Util;
+
+/**
+ * Class Description: Gets the archiving mode used for the specified attribute.
+ */
+
+public class GetArchivingModeClass extends Command implements TangoConst {
+	// ===============================================================
+	/**
+	 * Constructor for Command class GetArchivingModeClass
+	 * 
+	 * @param name
+	 *            command name
+	 * @param in
+	 *            argin type
+	 * @param out
+	 *            argout type
+	 */
+	// ===============================================================
+	public GetArchivingModeClass(final String name, final int in, final int out) {
+		super(name, in, out);
+	}
+
+	// ===============================================================
+	/**
+	 * Constructor for Command class GetArchivingModeClass
+	 * 
+	 * @param name
+	 *            command name
+	 * @param in
+	 *            argin type
+	 * @param in_comments
+	 *            argin description
+	 * @param out
+	 *            argout type
+	 * @param out_comments
+	 *            argout description
+	 */
+	// ===============================================================
+	public GetArchivingModeClass(final String name, final int in, final int out, final String in_comments, final String out_comments) {
+		super(name, in, out, in_comments, out_comments);
+	}
+
+	// ===============================================================
+	/**
+	 * Constructor for Command class GetArchivingModeClass
+	 * 
+	 * @param name
+	 *            command name
+	 * @param in
+	 *            argin type
+	 * @param in_comments
+	 *            argin description
+	 * @param out
+	 *            argout type
+	 * @param out_comments
+	 *            argout description
+	 * @param level
+	 *            The command display type OPERATOR or EXPERT
+	 */
+	// ===============================================================
+	public GetArchivingModeClass(final String name, final int in, final int out, final String in_comments, final String out_comments, final DispLevel level) {
+		super(name, in, out, in_comments, out_comments, level);
+	}
+
+	// ===============================================================
+	/**
+	 * return the result of the device's command.
+	 */
+	// ===============================================================
+	@Override
+	public Any execute(final DeviceImpl device, final Any in_any) throws DevFailed {
+		Util.out2.println("GetArchivingModeClass.execute(): arrived");
+		final String argin = extract_DevString(in_any);
+
+		if (!(device instanceof TdbExtractor)) {
+			Except.throw_exception("DEVICE_ERROR", "Device parameter is not instance of TdbExtractor", "TdbExtractor");
+		}
+
+		return insert(((TdbExtractor) device).get_archiving_mode(argin));
+	}
+
+	// ===============================================================
+	/**
+	 * Check if it is allowed to execute the command.
+	 */
+	// ===============================================================
+	@Override
+	public boolean is_allowed(final DeviceImpl device, final Any data_in) {
+		// End of Generated Code
+
+		// Re-Start of Generated Code
+		return true;
+	}
+}
+
+// -----------------------------------------------------------------------------
+/*
+ * end of $Source:
+ * /cvsroot/tango-cs/archiving/server/hdbtdbArchivingServers/src/
+ * main/java/TdbExtractor/GetArchivingModeClass.java,v $
+ */
diff --git a/src/main/java/TdbExtractor/GetAttCountAllClass.java b/tdbextractor/src/main/java/TdbExtractor/GetAttCountAllClass.java
similarity index 94%
rename from src/main/java/TdbExtractor/GetAttCountAllClass.java
rename to tdbextractor/src/main/java/TdbExtractor/GetAttCountAllClass.java
index be93d32a3829b22812d4a3fb457c63210164200b..eee0a744f3a056b74ba26d494c3759d3a9238f1e 100644
--- a/src/main/java/TdbExtractor/GetAttCountAllClass.java
+++ b/tdbextractor/src/main/java/TdbExtractor/GetAttCountAllClass.java
@@ -1,163 +1,163 @@
-//+======================================================================
-// $Source$
-//
-// Project:      Tango Device Server
-//
-// Description:  Java source code for the command TemplateClass of the
-//               TdbExtractor class.
-//
-// $Author$
-//
-// $Revision$
-//
-// $Log$
-// Revision 1.3  2010/11/22 08:09:15  abeilleg
-// remove critical of findbugs
-//
-// Revision 1.2  2009/12/17 12:47:15  pierrejoseph
-// CheckStyle:  Organize imports / Format
-//
-// Revision 1.1  2008/02/28 15:37:14  pierrejoseph
-// TdbExtractor has been forgotten
-//
-// Revision 1.4  2006/02/15 11:12:20  chinkumo
-// Javadoc comments updated.
-//
-// Revision 1.3  2005/11/29 16:13:31  chinkumo
-// Code reformated (pogo compatible)
-//
-// Revision 1.2  2005/11/15 13:45:16  chinkumo
-// ...
-//
-// Revision 1.1  2005/09/09 10:03:41  chinkumo
-// First commit !
-// (Dynamic attribut release)
-//
-//
-// copyleft :    European Synchrotron Radiation Facility
-//               BP 220, Grenoble 38043
-//               FRANCE
-//
-//-======================================================================
-//
-//  		This file is generated by POGO
-//	(Program Obviously used to Generate tango Object)
-//
-//         (c) - Software Engineering Group - ESRF
-//=============================================================================
-
-/**
- * @author	$Author$
- * @version	$Revision$
- */
-package TdbExtractor;
-
-import org.omg.CORBA.Any;
-
-import fr.esrf.Tango.DevFailed;
-import fr.esrf.Tango.DispLevel;
-import fr.esrf.TangoDs.Command;
-import fr.esrf.TangoDs.DeviceImpl;
-import fr.esrf.TangoDs.Except;
-import fr.esrf.TangoDs.TangoConst;
-import fr.esrf.TangoDs.Util;
-
-/**
- * Class Description: Gets the total number of attributes defined in TDB.
- */
-
-public class GetAttCountAllClass extends Command implements TangoConst {
-	// ===============================================================
-	/**
-	 * Constructor for Command class GetAttCountAllClass
-	 * 
-	 * @param name
-	 *            command name
-	 * @param in
-	 *            argin type
-	 * @param out
-	 *            argout type
-	 */
-	// ===============================================================
-	public GetAttCountAllClass(final String name, final int in, final int out) {
-		super(name, in, out);
-	}
-
-	// ===============================================================
-	/**
-	 * Constructor for Command class GetAttCountAllClass
-	 * 
-	 * @param name
-	 *            command name
-	 * @param in
-	 *            argin type
-	 * @param in_comments
-	 *            argin description
-	 * @param out
-	 *            argout type
-	 * @param out_comments
-	 *            argout description
-	 */
-	// ===============================================================
-	public GetAttCountAllClass(final String name, final int in, final int out, final String in_comments, final String out_comments) {
-		super(name, in, out, in_comments, out_comments);
-	}
-
-	// ===============================================================
-	/**
-	 * Constructor for Command class GetAttCountAllClass
-	 * 
-	 * @param name
-	 *            command name
-	 * @param in
-	 *            argin type
-	 * @param in_comments
-	 *            argin description
-	 * @param out
-	 *            argout type
-	 * @param out_comments
-	 *            argout description
-	 * @param level
-	 *            The command display type OPERATOR or EXPERT
-	 */
-	// ===============================================================
-	public GetAttCountAllClass(final String name, final int in, final int out, final String in_comments, final String out_comments, final DispLevel level) {
-		super(name, in, out, in_comments, out_comments, level);
-	}
-
-	// ===============================================================
-	/**
-	 * return the result of the device's command.
-	 */
-	// ===============================================================
-	@Override
-	public Any execute(final DeviceImpl device, final Any in_any) throws DevFailed {
-		Util.out2.println("GetAttCountAllClass.execute(): arrived");
-
-		if (!(device instanceof TdbExtractor)) {
-			Except.throw_exception("DEVICE_ERROR", "Device parameter is not instance of TdbExtractor", "TdbExtractor");
-		}
-
-		return insert(((TdbExtractor) device).get_att_count_all());
-	}
-
-	// ===============================================================
-	/**
-	 * Check if it is allowed to execute the command.
-	 */
-	// ===============================================================
-	@Override
-	public boolean is_allowed(final DeviceImpl device, final Any data_in) {
-		// End of Generated Code
-
-		// Re-Start of Generated Code
-		return true;
-	}
-}
-
-// -----------------------------------------------------------------------------
-/*
- * end of $Source:
- * /cvsroot/tango-cs/archiving/server/hdbtdbArchivingServers/src/
- * main/java/TdbExtractor/GetAttCountAllClass.java,v $
- */
+//+======================================================================
+// $Source$
+//
+// Project:      Tango Device Server
+//
+// Description:  Java source code for the command TemplateClass of the
+//               TdbExtractor class.
+//
+// $Author: gramer $
+//
+// $Revision: 15443 $
+//
+// $Log$
+// Revision 1.3  2010/11/22 08:09:15  abeilleg
+// remove critical of findbugs
+//
+// Revision 1.2  2009/12/17 12:47:15  pierrejoseph
+// CheckStyle:  Organize imports / Format
+//
+// Revision 1.1  2008/02/28 15:37:14  pierrejoseph
+// TdbExtractor has been forgotten
+//
+// Revision 1.4  2006/02/15 11:12:20  chinkumo
+// Javadoc comments updated.
+//
+// Revision 1.3  2005/11/29 16:13:31  chinkumo
+// Code reformated (pogo compatible)
+//
+// Revision 1.2  2005/11/15 13:45:16  chinkumo
+// ...
+//
+// Revision 1.1  2005/09/09 10:03:41  chinkumo
+// First commit !
+// (Dynamic attribut release)
+//
+//
+// copyleft :    European Synchrotron Radiation Facility
+//               BP 220, Grenoble 38043
+//               FRANCE
+//
+//-======================================================================
+//
+//  		This file is generated by POGO
+//	(Program Obviously used to Generate tango Object)
+//
+//         (c) - Software Engineering Group - ESRF
+//=============================================================================
+
+/**
+ * @author	$Author: gramer $
+ * @version	$Revision: 15443 $
+ */
+package TdbExtractor;
+
+import org.omg.CORBA.Any;
+
+import fr.esrf.Tango.DevFailed;
+import fr.esrf.Tango.DispLevel;
+import fr.esrf.TangoDs.Command;
+import fr.esrf.TangoDs.DeviceImpl;
+import fr.esrf.TangoDs.Except;
+import fr.esrf.TangoDs.TangoConst;
+import fr.esrf.TangoDs.Util;
+
+/**
+ * Class Description: Gets the total number of attributes defined in TDB.
+ */
+
+public class GetAttCountAllClass extends Command implements TangoConst {
+	// ===============================================================
+	/**
+	 * Constructor for Command class GetAttCountAllClass
+	 * 
+	 * @param name
+	 *            command name
+	 * @param in
+	 *            argin type
+	 * @param out
+	 *            argout type
+	 */
+	// ===============================================================
+	public GetAttCountAllClass(final String name, final int in, final int out) {
+		super(name, in, out);
+	}
+
+	// ===============================================================
+	/**
+	 * Constructor for Command class GetAttCountAllClass
+	 * 
+	 * @param name
+	 *            command name
+	 * @param in
+	 *            argin type
+	 * @param in_comments
+	 *            argin description
+	 * @param out
+	 *            argout type
+	 * @param out_comments
+	 *            argout description
+	 */
+	// ===============================================================
+	public GetAttCountAllClass(final String name, final int in, final int out, final String in_comments, final String out_comments) {
+		super(name, in, out, in_comments, out_comments);
+	}
+
+	// ===============================================================
+	/**
+	 * Constructor for Command class GetAttCountAllClass
+	 * 
+	 * @param name
+	 *            command name
+	 * @param in
+	 *            argin type
+	 * @param in_comments
+	 *            argin description
+	 * @param out
+	 *            argout type
+	 * @param out_comments
+	 *            argout description
+	 * @param level
+	 *            The command display type OPERATOR or EXPERT
+	 */
+	// ===============================================================
+	public GetAttCountAllClass(final String name, final int in, final int out, final String in_comments, final String out_comments, final DispLevel level) {
+		super(name, in, out, in_comments, out_comments, level);
+	}
+
+	// ===============================================================
+	/**
+	 * return the result of the device's command.
+	 */
+	// ===============================================================
+	@Override
+	public Any execute(final DeviceImpl device, final Any in_any) throws DevFailed {
+		Util.out2.println("GetAttCountAllClass.execute(): arrived");
+
+		if (!(device instanceof TdbExtractor)) {
+			Except.throw_exception("DEVICE_ERROR", "Device parameter is not instance of TdbExtractor", "TdbExtractor");
+		}
+
+		return insert(((TdbExtractor) device).get_att_count_all());
+	}
+
+	// ===============================================================
+	/**
+	 * Check if it is allowed to execute the command.
+	 */
+	// ===============================================================
+	@Override
+	public boolean is_allowed(final DeviceImpl device, final Any data_in) {
+		// End of Generated Code
+
+		// Re-Start of Generated Code
+		return true;
+	}
+}
+
+// -----------------------------------------------------------------------------
+/*
+ * end of $Source:
+ * /cvsroot/tango-cs/archiving/server/hdbtdbArchivingServers/src/
+ * main/java/TdbExtractor/GetAttCountAllClass.java,v $
+ */
diff --git a/src/main/java/TdbExtractor/GetAttCountFilterFormatClass.java b/tdbextractor/src/main/java/TdbExtractor/GetAttCountFilterFormatClass.java
similarity index 94%
rename from src/main/java/TdbExtractor/GetAttCountFilterFormatClass.java
rename to tdbextractor/src/main/java/TdbExtractor/GetAttCountFilterFormatClass.java
index d3b6ed4ed1d1b8867ef6738922a206baab378dfc..2d02152e3598c0a45d9eeec75769883fd46fc069 100644
--- a/src/main/java/TdbExtractor/GetAttCountFilterFormatClass.java
+++ b/tdbextractor/src/main/java/TdbExtractor/GetAttCountFilterFormatClass.java
@@ -1,165 +1,165 @@
-//+======================================================================
-// $Source$
-//
-// Project:      Tango Device Server
-//
-// Description:  Java source code for the command TemplateClass of the
-//               TdbExtractor class.
-//
-// $Author$
-//
-// $Revision$
-//
-// $Log$
-// Revision 1.3  2010/11/22 08:09:14  abeilleg
-// remove critical of findbugs
-//
-// Revision 1.2  2009/12/17 12:47:15  pierrejoseph
-// CheckStyle:  Organize imports / Format
-//
-// Revision 1.1  2008/02/28 15:37:13  pierrejoseph
-// TdbExtractor has been forgotten
-//
-// Revision 1.4  2006/02/15 11:12:20  chinkumo
-// Javadoc comments updated.
-//
-// Revision 1.3  2005/11/29 16:13:31  chinkumo
-// Code reformated (pogo compatible)
-//
-// Revision 1.2  2005/11/15 13:45:16  chinkumo
-// ...
-//
-// Revision 1.1  2005/09/09 10:03:41  chinkumo
-// First commit !
-// (Dynamic attribut release)
-//
-//
-// copyleft :    European Synchrotron Radiation Facility
-//               BP 220, Grenoble 38043
-//               FRANCE
-//
-//-======================================================================
-//
-//  		This file is generated by POGO
-//	(Program Obviously used to Generate tango Object)
-//
-//         (c) - Software Engineering Group - ESRF
-//=============================================================================
-
-/**
- * @author	$Author$
- * @version	$Revision$
- */
-package TdbExtractor;
-
-import org.omg.CORBA.Any;
-
-import fr.esrf.Tango.DevFailed;
-import fr.esrf.Tango.DispLevel;
-import fr.esrf.TangoDs.Command;
-import fr.esrf.TangoDs.DeviceImpl;
-import fr.esrf.TangoDs.Except;
-import fr.esrf.TangoDs.TangoConst;
-import fr.esrf.TangoDs.Util;
-
-/**
- * Class Description: Gets the total number of attributes defined in TDB with
- * the given format.
- */
-
-public class GetAttCountFilterFormatClass extends Command implements TangoConst {
-	// ===============================================================
-	/**
-	 * Constructor for Command class GetAttCountFilterFormatClass
-	 * 
-	 * @param name
-	 *            command name
-	 * @param in
-	 *            argin type
-	 * @param out
-	 *            argout type
-	 */
-	// ===============================================================
-	public GetAttCountFilterFormatClass(final String name, final int in, final int out) {
-		super(name, in, out);
-	}
-
-	// ===============================================================
-	/**
-	 * Constructor for Command class GetAttCountFilterFormatClass
-	 * 
-	 * @param name
-	 *            command name
-	 * @param in
-	 *            argin type
-	 * @param in_comments
-	 *            argin description
-	 * @param out
-	 *            argout type
-	 * @param out_comments
-	 *            argout description
-	 */
-	// ===============================================================
-	public GetAttCountFilterFormatClass(final String name, final int in, final int out, final String in_comments, final String out_comments) {
-		super(name, in, out, in_comments, out_comments);
-	}
-
-	// ===============================================================
-	/**
-	 * Constructor for Command class GetAttCountFilterFormatClass
-	 * 
-	 * @param name
-	 *            command name
-	 * @param in
-	 *            argin type
-	 * @param in_comments
-	 *            argin description
-	 * @param out
-	 *            argout type
-	 * @param out_comments
-	 *            argout description
-	 * @param level
-	 *            The command display type OPERATOR or EXPERT
-	 */
-	// ===============================================================
-	public GetAttCountFilterFormatClass(final String name, final int in, final int out, final String in_comments, final String out_comments, final DispLevel level) {
-		super(name, in, out, in_comments, out_comments, level);
-	}
-
-	// ===============================================================
-	/**
-	 * return the result of the device's command.
-	 */
-	// ===============================================================
-	@Override
-	public Any execute(final DeviceImpl device, final Any in_any) throws DevFailed {
-		Util.out2.println("GetAttCountFilterFormatClass.execute(): arrived");
-		final short argin = extract_DevShort(in_any);
-
-		if (!(device instanceof TdbExtractor)) {
-			Except.throw_exception("DEVICE_ERROR", "Device parameter is not instance of TdbExtractor", "TdbExtractor");
-		}
-
-		return insert(((TdbExtractor) device).get_att_count_filter_format(argin));
-	}
-
-	// ===============================================================
-	/**
-	 * Check if it is allowed to execute the command.
-	 */
-	// ===============================================================
-	@Override
-	public boolean is_allowed(final DeviceImpl device, final Any data_in) {
-		// End of Generated Code
-
-		// Re-Start of Generated Code
-		return true;
-	}
-}
-
-// -----------------------------------------------------------------------------
-/*
- * end of $Source:
- * /cvsroot/tango-cs/archiving/server/hdbtdbArchivingServers/src/
- * main/java/TdbExtractor/GetAttCountFilterFormatClass.java,v $
- */
+//+======================================================================
+// $Source$
+//
+// Project:      Tango Device Server
+//
+// Description:  Java source code for the command TemplateClass of the
+//               TdbExtractor class.
+//
+// $Author: gramer $
+//
+// $Revision: 15443 $
+//
+// $Log$
+// Revision 1.3  2010/11/22 08:09:14  abeilleg
+// remove critical of findbugs
+//
+// Revision 1.2  2009/12/17 12:47:15  pierrejoseph
+// CheckStyle:  Organize imports / Format
+//
+// Revision 1.1  2008/02/28 15:37:13  pierrejoseph
+// TdbExtractor has been forgotten
+//
+// Revision 1.4  2006/02/15 11:12:20  chinkumo
+// Javadoc comments updated.
+//
+// Revision 1.3  2005/11/29 16:13:31  chinkumo
+// Code reformated (pogo compatible)
+//
+// Revision 1.2  2005/11/15 13:45:16  chinkumo
+// ...
+//
+// Revision 1.1  2005/09/09 10:03:41  chinkumo
+// First commit !
+// (Dynamic attribut release)
+//
+//
+// copyleft :    European Synchrotron Radiation Facility
+//               BP 220, Grenoble 38043
+//               FRANCE
+//
+//-======================================================================
+//
+//  		This file is generated by POGO
+//	(Program Obviously used to Generate tango Object)
+//
+//         (c) - Software Engineering Group - ESRF
+//=============================================================================
+
+/**
+ * @author	$Author: gramer $
+ * @version	$Revision: 15443 $
+ */
+package TdbExtractor;
+
+import org.omg.CORBA.Any;
+
+import fr.esrf.Tango.DevFailed;
+import fr.esrf.Tango.DispLevel;
+import fr.esrf.TangoDs.Command;
+import fr.esrf.TangoDs.DeviceImpl;
+import fr.esrf.TangoDs.Except;
+import fr.esrf.TangoDs.TangoConst;
+import fr.esrf.TangoDs.Util;
+
+/**
+ * Class Description: Gets the total number of attributes defined in TDB with
+ * the given format.
+ */
+
+public class GetAttCountFilterFormatClass extends Command implements TangoConst {
+	// ===============================================================
+	/**
+	 * Constructor for Command class GetAttCountFilterFormatClass
+	 * 
+	 * @param name
+	 *            command name
+	 * @param in
+	 *            argin type
+	 * @param out
+	 *            argout type
+	 */
+	// ===============================================================
+	public GetAttCountFilterFormatClass(final String name, final int in, final int out) {
+		super(name, in, out);
+	}
+
+	// ===============================================================
+	/**
+	 * Constructor for Command class GetAttCountFilterFormatClass
+	 * 
+	 * @param name
+	 *            command name
+	 * @param in
+	 *            argin type
+	 * @param in_comments
+	 *            argin description
+	 * @param out
+	 *            argout type
+	 * @param out_comments
+	 *            argout description
+	 */
+	// ===============================================================
+	public GetAttCountFilterFormatClass(final String name, final int in, final int out, final String in_comments, final String out_comments) {
+		super(name, in, out, in_comments, out_comments);
+	}
+
+	// ===============================================================
+	/**
+	 * Constructor for Command class GetAttCountFilterFormatClass
+	 * 
+	 * @param name
+	 *            command name
+	 * @param in
+	 *            argin type
+	 * @param in_comments
+	 *            argin description
+	 * @param out
+	 *            argout type
+	 * @param out_comments
+	 *            argout description
+	 * @param level
+	 *            The command display type OPERATOR or EXPERT
+	 */
+	// ===============================================================
+	public GetAttCountFilterFormatClass(final String name, final int in, final int out, final String in_comments, final String out_comments, final DispLevel level) {
+		super(name, in, out, in_comments, out_comments, level);
+	}
+
+	// ===============================================================
+	/**
+	 * return the result of the device's command.
+	 */
+	// ===============================================================
+	@Override
+	public Any execute(final DeviceImpl device, final Any in_any) throws DevFailed {
+		Util.out2.println("GetAttCountFilterFormatClass.execute(): arrived");
+		final short argin = extract_DevShort(in_any);
+
+		if (!(device instanceof TdbExtractor)) {
+			Except.throw_exception("DEVICE_ERROR", "Device parameter is not instance of TdbExtractor", "TdbExtractor");
+		}
+
+		return insert(((TdbExtractor) device).get_att_count_filter_format(argin));
+	}
+
+	// ===============================================================
+	/**
+	 * Check if it is allowed to execute the command.
+	 */
+	// ===============================================================
+	@Override
+	public boolean is_allowed(final DeviceImpl device, final Any data_in) {
+		// End of Generated Code
+
+		// Re-Start of Generated Code
+		return true;
+	}
+}
+
+// -----------------------------------------------------------------------------
+/*
+ * end of $Source:
+ * /cvsroot/tango-cs/archiving/server/hdbtdbArchivingServers/src/
+ * main/java/TdbExtractor/GetAttCountFilterFormatClass.java,v $
+ */
diff --git a/src/main/java/TdbExtractor/GetAttCountFilterTypeClass.java b/tdbextractor/src/main/java/TdbExtractor/GetAttCountFilterTypeClass.java
similarity index 94%
rename from src/main/java/TdbExtractor/GetAttCountFilterTypeClass.java
rename to tdbextractor/src/main/java/TdbExtractor/GetAttCountFilterTypeClass.java
index d029031361ea1ffef9b93b4599a04136ebb28264..8b06b2c9251c785d4dd032939bc1c7e7af6ca10b 100644
--- a/src/main/java/TdbExtractor/GetAttCountFilterTypeClass.java
+++ b/tdbextractor/src/main/java/TdbExtractor/GetAttCountFilterTypeClass.java
@@ -1,165 +1,165 @@
-//+======================================================================
-// $Source$
-//
-// Project:      Tango Device Server
-//
-// Description:  Java source code for the command TemplateClass of the
-//               TdbExtractor class.
-//
-// $Author$
-//
-// $Revision$
-//
-// $Log$
-// Revision 1.3  2010/11/22 08:09:15  abeilleg
-// remove critical of findbugs
-//
-// Revision 1.2  2009/12/17 12:47:15  pierrejoseph
-// CheckStyle:  Organize imports / Format
-//
-// Revision 1.1  2008/02/28 15:37:14  pierrejoseph
-// TdbExtractor has been forgotten
-//
-// Revision 1.4  2006/02/15 11:12:20  chinkumo
-// Javadoc comments updated.
-//
-// Revision 1.3  2005/11/29 16:13:31  chinkumo
-// Code reformated (pogo compatible)
-//
-// Revision 1.2  2005/11/15 13:45:16  chinkumo
-// ...
-//
-// Revision 1.1  2005/09/09 10:03:41  chinkumo
-// First commit !
-// (Dynamic attribut release)
-//
-//
-// copyleft :    European Synchrotron Radiation Facility
-//               BP 220, Grenoble 38043
-//               FRANCE
-//
-//-======================================================================
-//
-//  		This file is generated by POGO
-//	(Program Obviously used to Generate tango Object)
-//
-//         (c) - Software Engineering Group - ESRF
-//=============================================================================
-
-/**
- * @author	$Author$
- * @version	$Revision$
- */
-package TdbExtractor;
-
-import org.omg.CORBA.Any;
-
-import fr.esrf.Tango.DevFailed;
-import fr.esrf.Tango.DispLevel;
-import fr.esrf.TangoDs.Command;
-import fr.esrf.TangoDs.DeviceImpl;
-import fr.esrf.TangoDs.Except;
-import fr.esrf.TangoDs.TangoConst;
-import fr.esrf.TangoDs.Util;
-
-/**
- * Class Description: Gets the total number of attributes defined in TDB with
- * the given type.
- */
-
-public class GetAttCountFilterTypeClass extends Command implements TangoConst {
-	// ===============================================================
-	/**
-	 * Constructor for Command class GetAttCountFilterTypeClass
-	 * 
-	 * @param name
-	 *            command name
-	 * @param in
-	 *            argin type
-	 * @param out
-	 *            argout type
-	 */
-	// ===============================================================
-	public GetAttCountFilterTypeClass(final String name, final int in, final int out) {
-		super(name, in, out);
-	}
-
-	// ===============================================================
-	/**
-	 * Constructor for Command class GetAttCountFilterTypeClass
-	 * 
-	 * @param name
-	 *            command name
-	 * @param in
-	 *            argin type
-	 * @param in_comments
-	 *            argin description
-	 * @param out
-	 *            argout type
-	 * @param out_comments
-	 *            argout description
-	 */
-	// ===============================================================
-	public GetAttCountFilterTypeClass(final String name, final int in, final int out, final String in_comments, final String out_comments) {
-		super(name, in, out, in_comments, out_comments);
-	}
-
-	// ===============================================================
-	/**
-	 * Constructor for Command class GetAttCountFilterTypeClass
-	 * 
-	 * @param name
-	 *            command name
-	 * @param in
-	 *            argin type
-	 * @param in_comments
-	 *            argin description
-	 * @param out
-	 *            argout type
-	 * @param out_comments
-	 *            argout description
-	 * @param level
-	 *            The command display type OPERATOR or EXPERT
-	 */
-	// ===============================================================
-	public GetAttCountFilterTypeClass(final String name, final int in, final int out, final String in_comments, final String out_comments, final DispLevel level) {
-		super(name, in, out, in_comments, out_comments, level);
-	}
-
-	// ===============================================================
-	/**
-	 * return the result of the device's command.
-	 */
-	// ===============================================================
-	@Override
-	public Any execute(final DeviceImpl device, final Any in_any) throws DevFailed {
-		Util.out2.println("GetAttCountFilterTypeClass.execute(): arrived");
-		final short argin = extract_DevShort(in_any);
-
-		if (!(device instanceof TdbExtractor)) {
-			Except.throw_exception("DEVICE_ERROR", "Device parameter is not instance of TdbExtractor", "TdbExtractor");
-		}
-
-		return insert(((TdbExtractor) device).get_att_count_filter_type(argin));
-	}
-
-	// ===============================================================
-	/**
-	 * Check if it is allowed to execute the command.
-	 */
-	// ===============================================================
-	@Override
-	public boolean is_allowed(final DeviceImpl device, final Any data_in) {
-		// End of Generated Code
-
-		// Re-Start of Generated Code
-		return true;
-	}
-}
-
-// -----------------------------------------------------------------------------
-/*
- * end of $Source:
- * /cvsroot/tango-cs/archiving/server/hdbtdbArchivingServers/src/
- * main/java/TdbExtractor/GetAttCountFilterTypeClass.java,v $
- */
+//+======================================================================
+// $Source$
+//
+// Project:      Tango Device Server
+//
+// Description:  Java source code for the command TemplateClass of the
+//               TdbExtractor class.
+//
+// $Author: gramer $
+//
+// $Revision: 15443 $
+//
+// $Log$
+// Revision 1.3  2010/11/22 08:09:15  abeilleg
+// remove critical of findbugs
+//
+// Revision 1.2  2009/12/17 12:47:15  pierrejoseph
+// CheckStyle:  Organize imports / Format
+//
+// Revision 1.1  2008/02/28 15:37:14  pierrejoseph
+// TdbExtractor has been forgotten
+//
+// Revision 1.4  2006/02/15 11:12:20  chinkumo
+// Javadoc comments updated.
+//
+// Revision 1.3  2005/11/29 16:13:31  chinkumo
+// Code reformated (pogo compatible)
+//
+// Revision 1.2  2005/11/15 13:45:16  chinkumo
+// ...
+//
+// Revision 1.1  2005/09/09 10:03:41  chinkumo
+// First commit !
+// (Dynamic attribut release)
+//
+//
+// copyleft :    European Synchrotron Radiation Facility
+//               BP 220, Grenoble 38043
+//               FRANCE
+//
+//-======================================================================
+//
+//  		This file is generated by POGO
+//	(Program Obviously used to Generate tango Object)
+//
+//         (c) - Software Engineering Group - ESRF
+//=============================================================================
+
+/**
+ * @author	$Author: gramer $
+ * @version	$Revision: 15443 $
+ */
+package TdbExtractor;
+
+import org.omg.CORBA.Any;
+
+import fr.esrf.Tango.DevFailed;
+import fr.esrf.Tango.DispLevel;
+import fr.esrf.TangoDs.Command;
+import fr.esrf.TangoDs.DeviceImpl;
+import fr.esrf.TangoDs.Except;
+import fr.esrf.TangoDs.TangoConst;
+import fr.esrf.TangoDs.Util;
+
+/**
+ * Class Description: Gets the total number of attributes defined in TDB with
+ * the given type.
+ */
+
+public class GetAttCountFilterTypeClass extends Command implements TangoConst {
+	// ===============================================================
+	/**
+	 * Constructor for Command class GetAttCountFilterTypeClass
+	 * 
+	 * @param name
+	 *            command name
+	 * @param in
+	 *            argin type
+	 * @param out
+	 *            argout type
+	 */
+	// ===============================================================
+	public GetAttCountFilterTypeClass(final String name, final int in, final int out) {
+		super(name, in, out);
+	}
+
+	// ===============================================================
+	/**
+	 * Constructor for Command class GetAttCountFilterTypeClass
+	 * 
+	 * @param name
+	 *            command name
+	 * @param in
+	 *            argin type
+	 * @param in_comments
+	 *            argin description
+	 * @param out
+	 *            argout type
+	 * @param out_comments
+	 *            argout description
+	 */
+	// ===============================================================
+	public GetAttCountFilterTypeClass(final String name, final int in, final int out, final String in_comments, final String out_comments) {
+		super(name, in, out, in_comments, out_comments);
+	}
+
+	// ===============================================================
+	/**
+	 * Constructor for Command class GetAttCountFilterTypeClass
+	 * 
+	 * @param name
+	 *            command name
+	 * @param in
+	 *            argin type
+	 * @param in_comments
+	 *            argin description
+	 * @param out
+	 *            argout type
+	 * @param out_comments
+	 *            argout description
+	 * @param level
+	 *            The command display type OPERATOR or EXPERT
+	 */
+	// ===============================================================
+	public GetAttCountFilterTypeClass(final String name, final int in, final int out, final String in_comments, final String out_comments, final DispLevel level) {
+		super(name, in, out, in_comments, out_comments, level);
+	}
+
+	// ===============================================================
+	/**
+	 * return the result of the device's command.
+	 */
+	// ===============================================================
+	@Override
+	public Any execute(final DeviceImpl device, final Any in_any) throws DevFailed {
+		Util.out2.println("GetAttCountFilterTypeClass.execute(): arrived");
+		final short argin = extract_DevShort(in_any);
+
+		if (!(device instanceof TdbExtractor)) {
+			Except.throw_exception("DEVICE_ERROR", "Device parameter is not instance of TdbExtractor", "TdbExtractor");
+		}
+
+		return insert(((TdbExtractor) device).get_att_count_filter_type(argin));
+	}
+
+	// ===============================================================
+	/**
+	 * Check if it is allowed to execute the command.
+	 */
+	// ===============================================================
+	@Override
+	public boolean is_allowed(final DeviceImpl device, final Any data_in) {
+		// End of Generated Code
+
+		// Re-Start of Generated Code
+		return true;
+	}
+}
+
+// -----------------------------------------------------------------------------
+/*
+ * end of $Source:
+ * /cvsroot/tango-cs/archiving/server/hdbtdbArchivingServers/src/
+ * main/java/TdbExtractor/GetAttCountFilterTypeClass.java,v $
+ */
diff --git a/src/main/java/TdbExtractor/GetAttDataAvgBetweenDatesClass.java b/tdbextractor/src/main/java/TdbExtractor/GetAttDataAvgBetweenDatesClass.java
similarity index 94%
rename from src/main/java/TdbExtractor/GetAttDataAvgBetweenDatesClass.java
rename to tdbextractor/src/main/java/TdbExtractor/GetAttDataAvgBetweenDatesClass.java
index 6de80bbe988da99d56986bb7a6262c8c2512ce2a..3b3999912a6f4d0c544e5b236e475e9726a71628 100644
--- a/src/main/java/TdbExtractor/GetAttDataAvgBetweenDatesClass.java
+++ b/tdbextractor/src/main/java/TdbExtractor/GetAttDataAvgBetweenDatesClass.java
@@ -1,162 +1,162 @@
-//+======================================================================
-// $Source$
-//
-// Project:      Tango Device Server
-//
-// Description:  Java source code for the command TemplateClass of the
-//               TdbExtractor class.
-//
-// $Author$
-//
-// $Revision$
-//
-// $Log$
-// Revision 1.3  2010/11/22 08:09:15  abeilleg
-// remove critical of findbugs
-//
-// Revision 1.2  2009/12/17 12:47:15  pierrejoseph
-// CheckStyle:  Organize imports / Format
-//
-// Revision 1.1  2008/02/28 15:37:15  pierrejoseph
-// TdbExtractor has been forgotten
-//
-// Revision 1.3  2005/11/29 16:13:31  chinkumo
-// Code reformated (pogo compatible)
-//
-// Revision 1.2  2005/11/15 13:45:16  chinkumo
-// ...
-//
-// Revision 1.1  2005/09/09 10:03:41  chinkumo
-// First commit !
-// (Dynamic attribut release)
-//
-//
-// copyleft :    European Synchrotron Radiation Facility
-//               BP 220, Grenoble 38043
-//               FRANCE
-//
-//-======================================================================
-//
-//  		This file is generated by POGO
-//	(Program Obviously used to Generate tango Object)
-//
-//         (c) - Software Engineering Group - ESRF
-//=============================================================================
-
-/**
- * @author	$Author$
- * @version	$Revision$
- */
-package TdbExtractor;
-
-import org.omg.CORBA.Any;
-
-import fr.esrf.Tango.DevFailed;
-import fr.esrf.Tango.DispLevel;
-import fr.esrf.TangoDs.Command;
-import fr.esrf.TangoDs.DeviceImpl;
-import fr.esrf.TangoDs.Except;
-import fr.esrf.TangoDs.TangoConst;
-import fr.esrf.TangoDs.Util;
-
-/**
- * Class Description: Returns the average value generated by the given attribute
- * and between the two given dates.
- */
-
-public class GetAttDataAvgBetweenDatesClass extends Command implements TangoConst {
-	// ===============================================================
-	/**
-	 * Constructor for Command class GetAttDataAvgBetweenDatesClass
-	 * 
-	 * @param name
-	 *            command name
-	 * @param in
-	 *            argin type
-	 * @param out
-	 *            argout type
-	 */
-	// ===============================================================
-	public GetAttDataAvgBetweenDatesClass(final String name, final int in, final int out) {
-		super(name, in, out);
-	}
-
-	// ===============================================================
-	/**
-	 * Constructor for Command class GetAttDataAvgBetweenDatesClass
-	 * 
-	 * @param name
-	 *            command name
-	 * @param in
-	 *            argin type
-	 * @param in_comments
-	 *            argin description
-	 * @param out
-	 *            argout type
-	 * @param out_comments
-	 *            argout description
-	 */
-	// ===============================================================
-	public GetAttDataAvgBetweenDatesClass(final String name, final int in, final int out, final String in_comments, final String out_comments) {
-		super(name, in, out, in_comments, out_comments);
-	}
-
-	// ===============================================================
-	/**
-	 * Constructor for Command class GetAttDataAvgBetweenDatesClass
-	 * 
-	 * @param name
-	 *            command name
-	 * @param in
-	 *            argin type
-	 * @param in_comments
-	 *            argin description
-	 * @param out
-	 *            argout type
-	 * @param out_comments
-	 *            argout description
-	 * @param level
-	 *            The command display type OPERATOR or EXPERT
-	 */
-	// ===============================================================
-	public GetAttDataAvgBetweenDatesClass(final String name, final int in, final int out, final String in_comments, final String out_comments, final DispLevel level) {
-		super(name, in, out, in_comments, out_comments, level);
-	}
-
-	// ===============================================================
-	/**
-	 * return the result of the device's command.
-	 */
-	// ===============================================================
-	@Override
-	public Any execute(final DeviceImpl device, final Any in_any) throws DevFailed {
-		Util.out2.println("GetAttDataAvgBetweenDatesClass.execute(): arrived");
-		final String[] argin = extract_DevVarStringArray(in_any);
-
-		if (!(device instanceof TdbExtractor)) {
-			Except.throw_exception("DEVICE_ERROR", "Device parameter is not instance of TdbExtractor", "TdbExtractor");
-		}
-
-		return insert(((TdbExtractor) device).get_att_data_avg_between_dates(argin));
-	}
-
-	// ===============================================================
-	/**
-	 * Check if it is allowed to execute the command.
-	 */
-	// ===============================================================
-	@Override
-	public boolean is_allowed(final DeviceImpl device, final Any data_in) {
-		// End of Generated Code
-
-		// Re-Start of Generated Code
-		return true;
-	}
-}
-
-// -----------------------------------------------------------------------------
-/*
- * end of $Source:
- * /cvsroot/tango-cs/archiving/server/hdbtdbArchivingServers/src/
- * main/java/TdbExtractor/GetAttDataAvgBetweenDatesClass.java,v $
- */
+//+======================================================================
+// $Source$
+//
+// Project:      Tango Device Server
+//
+// Description:  Java source code for the command TemplateClass of the
+//               TdbExtractor class.
+//
+// $Author: gramer $
+//
+// $Revision: 15443 $
+//
+// $Log$
+// Revision 1.3  2010/11/22 08:09:15  abeilleg
+// remove critical of findbugs
+//
+// Revision 1.2  2009/12/17 12:47:15  pierrejoseph
+// CheckStyle:  Organize imports / Format
+//
+// Revision 1.1  2008/02/28 15:37:15  pierrejoseph
+// TdbExtractor has been forgotten
+//
+// Revision 1.3  2005/11/29 16:13:31  chinkumo
+// Code reformated (pogo compatible)
+//
+// Revision 1.2  2005/11/15 13:45:16  chinkumo
+// ...
+//
+// Revision 1.1  2005/09/09 10:03:41  chinkumo
+// First commit !
+// (Dynamic attribut release)
+//
+//
+// copyleft :    European Synchrotron Radiation Facility
+//               BP 220, Grenoble 38043
+//               FRANCE
+//
+//-======================================================================
+//
+//  		This file is generated by POGO
+//	(Program Obviously used to Generate tango Object)
+//
+//         (c) - Software Engineering Group - ESRF
+//=============================================================================
+
+/**
+ * @author	$Author: gramer $
+ * @version	$Revision: 15443 $
+ */
+package TdbExtractor;
+
+import org.omg.CORBA.Any;
+
+import fr.esrf.Tango.DevFailed;
+import fr.esrf.Tango.DispLevel;
+import fr.esrf.TangoDs.Command;
+import fr.esrf.TangoDs.DeviceImpl;
+import fr.esrf.TangoDs.Except;
+import fr.esrf.TangoDs.TangoConst;
+import fr.esrf.TangoDs.Util;
+
+/**
+ * Class Description: Returns the average value generated by the given attribute
+ * and between the two given dates.
+ */
+
+public class GetAttDataAvgBetweenDatesClass extends Command implements TangoConst {
+	// ===============================================================
+	/**
+	 * Constructor for Command class GetAttDataAvgBetweenDatesClass
+	 * 
+	 * @param name
+	 *            command name
+	 * @param in
+	 *            argin type
+	 * @param out
+	 *            argout type
+	 */
+	// ===============================================================
+	public GetAttDataAvgBetweenDatesClass(final String name, final int in, final int out) {
+		super(name, in, out);
+	}
+
+	// ===============================================================
+	/**
+	 * Constructor for Command class GetAttDataAvgBetweenDatesClass
+	 * 
+	 * @param name
+	 *            command name
+	 * @param in
+	 *            argin type
+	 * @param in_comments
+	 *            argin description
+	 * @param out
+	 *            argout type
+	 * @param out_comments
+	 *            argout description
+	 */
+	// ===============================================================
+	public GetAttDataAvgBetweenDatesClass(final String name, final int in, final int out, final String in_comments, final String out_comments) {
+		super(name, in, out, in_comments, out_comments);
+	}
+
+	// ===============================================================
+	/**
+	 * Constructor for Command class GetAttDataAvgBetweenDatesClass
+	 * 
+	 * @param name
+	 *            command name
+	 * @param in
+	 *            argin type
+	 * @param in_comments
+	 *            argin description
+	 * @param out
+	 *            argout type
+	 * @param out_comments
+	 *            argout description
+	 * @param level
+	 *            The command display type OPERATOR or EXPERT
+	 */
+	// ===============================================================
+	public GetAttDataAvgBetweenDatesClass(final String name, final int in, final int out, final String in_comments, final String out_comments, final DispLevel level) {
+		super(name, in, out, in_comments, out_comments, level);
+	}
+
+	// ===============================================================
+	/**
+	 * return the result of the device's command.
+	 */
+	// ===============================================================
+	@Override
+	public Any execute(final DeviceImpl device, final Any in_any) throws DevFailed {
+		Util.out2.println("GetAttDataAvgBetweenDatesClass.execute(): arrived");
+		final String[] argin = extract_DevVarStringArray(in_any);
+
+		if (!(device instanceof TdbExtractor)) {
+			Except.throw_exception("DEVICE_ERROR", "Device parameter is not instance of TdbExtractor", "TdbExtractor");
+		}
+
+		return insert(((TdbExtractor) device).get_att_data_avg_between_dates(argin));
+	}
+
+	// ===============================================================
+	/**
+	 * Check if it is allowed to execute the command.
+	 */
+	// ===============================================================
+	@Override
+	public boolean is_allowed(final DeviceImpl device, final Any data_in) {
+		// End of Generated Code
+
+		// Re-Start of Generated Code
+		return true;
+	}
+}
+
+// -----------------------------------------------------------------------------
+/*
+ * end of $Source:
+ * /cvsroot/tango-cs/archiving/server/hdbtdbArchivingServers/src/
+ * main/java/TdbExtractor/GetAttDataAvgBetweenDatesClass.java,v $
+ */
diff --git a/src/main/java/TdbExtractor/GetAttDataAvgClass.java b/tdbextractor/src/main/java/TdbExtractor/GetAttDataAvgClass.java
similarity index 94%
rename from src/main/java/TdbExtractor/GetAttDataAvgClass.java
rename to tdbextractor/src/main/java/TdbExtractor/GetAttDataAvgClass.java
index 080c20db279eb2f09988614d06089c6c221eb711..980b6c2dbf2293667c62c93dbcc5cf7ded481b27 100644
--- a/src/main/java/TdbExtractor/GetAttDataAvgClass.java
+++ b/tdbextractor/src/main/java/TdbExtractor/GetAttDataAvgClass.java
@@ -1,162 +1,162 @@
-//+======================================================================
-// $Source$
-//
-// Project:      Tango Device Server
-//
-// Description:  Java source code for the command TemplateClass of the
-//               TdbExtractor class.
-//
-// $Author$
-//
-// $Revision$
-//
-// $Log$
-// Revision 1.3  2010/11/22 08:09:15  abeilleg
-// remove critical of findbugs
-//
-// Revision 1.2  2009/12/17 12:47:15  pierrejoseph
-// CheckStyle:  Organize imports / Format
-//
-// Revision 1.1  2008/02/28 15:37:13  pierrejoseph
-// TdbExtractor has been forgotten
-//
-// Revision 1.3  2005/11/29 16:13:31  chinkumo
-// Code reformated (pogo compatible)
-//
-// Revision 1.2  2005/11/15 13:45:16  chinkumo
-// ...
-//
-// Revision 1.1  2005/09/09 10:03:41  chinkumo
-// First commit !
-// (Dynamic attribut release)
-//
-//
-// copyleft :    European Synchrotron Radiation Facility
-//               BP 220, Grenoble 38043
-//               FRANCE
-//
-//-======================================================================
-//
-//  		This file is generated by POGO
-//	(Program Obviously used to Generate tango Object)
-//
-//         (c) - Software Engineering Group - ESRF
-//=============================================================================
-
-/**
- * @author	$Author$
- * @version	$Revision$
- */
-package TdbExtractor;
-
-import org.omg.CORBA.Any;
-
-import fr.esrf.Tango.DevFailed;
-import fr.esrf.Tango.DispLevel;
-import fr.esrf.TangoDs.Command;
-import fr.esrf.TangoDs.DeviceImpl;
-import fr.esrf.TangoDs.Except;
-import fr.esrf.TangoDs.TangoConst;
-import fr.esrf.TangoDs.Util;
-
-/**
- * Class Description: Returns the average value generated by the given
- * attribute.
- */
-
-public class GetAttDataAvgClass extends Command implements TangoConst {
-	// ===============================================================
-	/**
-	 * Constructor for Command class GetAttDataAvgClass
-	 * 
-	 * @param name
-	 *            command name
-	 * @param in
-	 *            argin type
-	 * @param out
-	 *            argout type
-	 */
-	// ===============================================================
-	public GetAttDataAvgClass(final String name, final int in, final int out) {
-		super(name, in, out);
-	}
-
-	// ===============================================================
-	/**
-	 * Constructor for Command class GetAttDataAvgClass
-	 * 
-	 * @param name
-	 *            command name
-	 * @param in
-	 *            argin type
-	 * @param in_comments
-	 *            argin description
-	 * @param out
-	 *            argout type
-	 * @param out_comments
-	 *            argout description
-	 */
-	// ===============================================================
-	public GetAttDataAvgClass(final String name, final int in, final int out, final String in_comments, final String out_comments) {
-		super(name, in, out, in_comments, out_comments);
-	}
-
-	// ===============================================================
-	/**
-	 * Constructor for Command class GetAttDataAvgClass
-	 * 
-	 * @param name
-	 *            command name
-	 * @param in
-	 *            argin type
-	 * @param in_comments
-	 *            argin description
-	 * @param out
-	 *            argout type
-	 * @param out_comments
-	 *            argout description
-	 * @param level
-	 *            The command display type OPERATOR or EXPERT
-	 */
-	// ===============================================================
-	public GetAttDataAvgClass(final String name, final int in, final int out, final String in_comments, final String out_comments, final DispLevel level) {
-		super(name, in, out, in_comments, out_comments, level);
-	}
-
-	// ===============================================================
-	/**
-	 * return the result of the device's command.
-	 */
-	// ===============================================================
-	@Override
-	public Any execute(final DeviceImpl device, final Any in_any) throws DevFailed {
-		Util.out2.println("GetAttDataAvgClass.execute(): arrived");
-		final String argin = extract_DevString(in_any);
-
-		if (!(device instanceof TdbExtractor)) {
-			Except.throw_exception("DEVICE_ERROR", "Device parameter is not instance of TdbExtractor", "TdbExtractor");
-		}
-
-		return insert(((TdbExtractor) device).get_att_data_avg(argin));
-	}
-
-	// ===============================================================
-	/**
-	 * Check if it is allowed to execute the command.
-	 */
-	// ===============================================================
-	@Override
-	public boolean is_allowed(final DeviceImpl device, final Any data_in) {
-		// End of Generated Code
-
-		// Re-Start of Generated Code
-		return true;
-	}
-}
-
-// -----------------------------------------------------------------------------
-/*
- * end of $Source:
- * /cvsroot/tango-cs/archiving/server/hdbtdbArchivingServers/src/
- * main/java/TdbExtractor/GetAttDataAvgClass.java,v $
- */
+//+======================================================================
+// $Source$
+//
+// Project:      Tango Device Server
+//
+// Description:  Java source code for the command TemplateClass of the
+//               TdbExtractor class.
+//
+// $Author: gramer $
+//
+// $Revision: 15443 $
+//
+// $Log$
+// Revision 1.3  2010/11/22 08:09:15  abeilleg
+// remove critical of findbugs
+//
+// Revision 1.2  2009/12/17 12:47:15  pierrejoseph
+// CheckStyle:  Organize imports / Format
+//
+// Revision 1.1  2008/02/28 15:37:13  pierrejoseph
+// TdbExtractor has been forgotten
+//
+// Revision 1.3  2005/11/29 16:13:31  chinkumo
+// Code reformated (pogo compatible)
+//
+// Revision 1.2  2005/11/15 13:45:16  chinkumo
+// ...
+//
+// Revision 1.1  2005/09/09 10:03:41  chinkumo
+// First commit !
+// (Dynamic attribut release)
+//
+//
+// copyleft :    European Synchrotron Radiation Facility
+//               BP 220, Grenoble 38043
+//               FRANCE
+//
+//-======================================================================
+//
+//  		This file is generated by POGO
+//	(Program Obviously used to Generate tango Object)
+//
+//         (c) - Software Engineering Group - ESRF
+//=============================================================================
+
+/**
+ * @author	$Author: gramer $
+ * @version	$Revision: 15443 $
+ */
+package TdbExtractor;
+
+import org.omg.CORBA.Any;
+
+import fr.esrf.Tango.DevFailed;
+import fr.esrf.Tango.DispLevel;
+import fr.esrf.TangoDs.Command;
+import fr.esrf.TangoDs.DeviceImpl;
+import fr.esrf.TangoDs.Except;
+import fr.esrf.TangoDs.TangoConst;
+import fr.esrf.TangoDs.Util;
+
+/**
+ * Class Description: Returns the average value generated by the given
+ * attribute.
+ */
+
+public class GetAttDataAvgClass extends Command implements TangoConst {
+	// ===============================================================
+	/**
+	 * Constructor for Command class GetAttDataAvgClass
+	 * 
+	 * @param name
+	 *            command name
+	 * @param in
+	 *            argin type
+	 * @param out
+	 *            argout type
+	 */
+	// ===============================================================
+	public GetAttDataAvgClass(final String name, final int in, final int out) {
+		super(name, in, out);
+	}
+
+	// ===============================================================
+	/**
+	 * Constructor for Command class GetAttDataAvgClass
+	 * 
+	 * @param name
+	 *            command name
+	 * @param in
+	 *            argin type
+	 * @param in_comments
+	 *            argin description
+	 * @param out
+	 *            argout type
+	 * @param out_comments
+	 *            argout description
+	 */
+	// ===============================================================
+	public GetAttDataAvgClass(final String name, final int in, final int out, final String in_comments, final String out_comments) {
+		super(name, in, out, in_comments, out_comments);
+	}
+
+	// ===============================================================
+	/**
+	 * Constructor for Command class GetAttDataAvgClass
+	 * 
+	 * @param name
+	 *            command name
+	 * @param in
+	 *            argin type
+	 * @param in_comments
+	 *            argin description
+	 * @param out
+	 *            argout type
+	 * @param out_comments
+	 *            argout description
+	 * @param level
+	 *            The command display type OPERATOR or EXPERT
+	 */
+	// ===============================================================
+	public GetAttDataAvgClass(final String name, final int in, final int out, final String in_comments, final String out_comments, final DispLevel level) {
+		super(name, in, out, in_comments, out_comments, level);
+	}
+
+	// ===============================================================
+	/**
+	 * return the result of the device's command.
+	 */
+	// ===============================================================
+	@Override
+	public Any execute(final DeviceImpl device, final Any in_any) throws DevFailed {
+		Util.out2.println("GetAttDataAvgClass.execute(): arrived");
+		final String argin = extract_DevString(in_any);
+
+		if (!(device instanceof TdbExtractor)) {
+			Except.throw_exception("DEVICE_ERROR", "Device parameter is not instance of TdbExtractor", "TdbExtractor");
+		}
+
+		return insert(((TdbExtractor) device).get_att_data_avg(argin));
+	}
+
+	// ===============================================================
+	/**
+	 * Check if it is allowed to execute the command.
+	 */
+	// ===============================================================
+	@Override
+	public boolean is_allowed(final DeviceImpl device, final Any data_in) {
+		// End of Generated Code
+
+		// Re-Start of Generated Code
+		return true;
+	}
+}
+
+// -----------------------------------------------------------------------------
+/*
+ * end of $Source:
+ * /cvsroot/tango-cs/archiving/server/hdbtdbArchivingServers/src/
+ * main/java/TdbExtractor/GetAttDataAvgClass.java,v $
+ */
diff --git a/src/main/java/TdbExtractor/GetAttDataBetweenDatesClass.java b/tdbextractor/src/main/java/TdbExtractor/GetAttDataBetweenDatesClass.java
similarity index 94%
rename from src/main/java/TdbExtractor/GetAttDataBetweenDatesClass.java
rename to tdbextractor/src/main/java/TdbExtractor/GetAttDataBetweenDatesClass.java
index 92ef52560152dc94c5799ef14f96893fea3d1779..4784ae87f7df5d533b1ed98950240659c3e5bfac 100644
--- a/src/main/java/TdbExtractor/GetAttDataBetweenDatesClass.java
+++ b/tdbextractor/src/main/java/TdbExtractor/GetAttDataBetweenDatesClass.java
@@ -1,163 +1,163 @@
-//+======================================================================
-// $Source$
-//
-// Project:      Tango Device Server
-//
-// Description:  Java source code for the command TemplateClass of the
-//               TdbExtractor class.
-//
-// $Author$
-//
-// $Revision$
-//
-// $Log$
-// Revision 1.3  2010/11/22 08:09:15  abeilleg
-// remove critical of findbugs
-//
-// Revision 1.2  2009/12/17 12:47:15  pierrejoseph
-// CheckStyle:  Organize imports / Format
-//
-// Revision 1.1  2008/02/28 15:37:14  pierrejoseph
-// TdbExtractor has been forgotten
-//
-// Revision 1.3  2005/11/29 16:13:31  chinkumo
-// Code reformated (pogo compatible)
-//
-// Revision 1.2  2005/11/15 13:45:16  chinkumo
-// ...
-//
-// Revision 1.1  2005/09/09 10:03:41  chinkumo
-// First commit !
-// (Dynamic attribut release)
-//
-//
-// copyleft :    European Synchrotron Radiation Facility
-//               BP 220, Grenoble 38043
-//               FRANCE
-//
-//-======================================================================
-//
-//  		This file is generated by POGO
-//	(Program Obviously used to Generate tango Object)
-//
-//         (c) - Software Engineering Group - ESRF
-//=============================================================================
-
-/**
- * @author	$Author$
- * @version	$Revision$
- */
-package TdbExtractor;
-
-import org.omg.CORBA.Any;
-
-import fr.esrf.Tango.DevFailed;
-import fr.esrf.Tango.DispLevel;
-import fr.esrf.TangoDs.Command;
-import fr.esrf.TangoDs.DeviceImpl;
-import fr.esrf.TangoDs.Except;
-import fr.esrf.TangoDs.TangoConst;
-import fr.esrf.TangoDs.Util;
-
-/**
- * Class Description: Retrieves data beetwen two dates, for a given scalar
- * attribute. Create a dynamic attribute, retrieve data from database and
- * prepare result for attribute_history call.
- */
-
-public class GetAttDataBetweenDatesClass extends Command implements TangoConst {
-	// ===============================================================
-	/**
-	 * Constructor for Command class GetAttDataBetweenDatesClass
-	 * 
-	 * @param name
-	 *            command name
-	 * @param in
-	 *            argin type
-	 * @param out
-	 *            argout type
-	 */
-	// ===============================================================
-	public GetAttDataBetweenDatesClass(final String name, final int in, final int out) {
-		super(name, in, out);
-	}
-
-	// ===============================================================
-	/**
-	 * Constructor for Command class GetAttDataBetweenDatesClass
-	 * 
-	 * @param name
-	 *            command name
-	 * @param in
-	 *            argin type
-	 * @param in_comments
-	 *            argin description
-	 * @param out
-	 *            argout type
-	 * @param out_comments
-	 *            argout description
-	 */
-	// ===============================================================
-	public GetAttDataBetweenDatesClass(final String name, final int in, final int out, final String in_comments, final String out_comments) {
-		super(name, in, out, in_comments, out_comments);
-	}
-
-	// ===============================================================
-	/**
-	 * Constructor for Command class GetAttDataBetweenDatesClass
-	 * 
-	 * @param name
-	 *            command name
-	 * @param in
-	 *            argin type
-	 * @param in_comments
-	 *            argin description
-	 * @param out
-	 *            argout type
-	 * @param out_comments
-	 *            argout description
-	 * @param level
-	 *            The command display type OPERATOR or EXPERT
-	 */
-	// ===============================================================
-	public GetAttDataBetweenDatesClass(final String name, final int in, final int out, final String in_comments, final String out_comments, final DispLevel level) {
-		super(name, in, out, in_comments, out_comments, level);
-	}
-
-	// ===============================================================
-	/**
-	 * return the result of the device's command.
-	 */
-	// ===============================================================
-	@Override
-	public Any execute(final DeviceImpl device, final Any in_any) throws DevFailed {
-		Util.out2.println("GetAttDataBetweenDatesClass.execute(): arrived");
-		final String[] argin = extract_DevVarStringArray(in_any);
-
-		if (!(device instanceof TdbExtractor)) {
-			Except.throw_exception("DEVICE_ERROR", "Device parameter is not instance of TdbExtractor", "TdbExtractor");
-		}
-
-		return insert(((TdbExtractor) device).get_att_data_between_dates(argin));
-	}
-
-	// ===============================================================
-	/**
-	 * Check if it is allowed to execute the command.
-	 */
-	// ===============================================================
-	@Override
-	public boolean is_allowed(final DeviceImpl device, final Any data_in) {
-		// End of Generated Code
-
-		// Re-Start of Generated Code
-		return true;
-	}
-}
-
-// -----------------------------------------------------------------------------
-/*
- * end of $Source:
- * /cvsroot/tango-cs/archiving/server/hdbtdbArchivingServers/src/
- * main/java/TdbExtractor/GetAttDataBetweenDatesClass.java,v $
- */
+//+======================================================================
+// $Source$
+//
+// Project:      Tango Device Server
+//
+// Description:  Java source code for the command TemplateClass of the
+//               TdbExtractor class.
+//
+// $Author: gramer $
+//
+// $Revision: 15443 $
+//
+// $Log$
+// Revision 1.3  2010/11/22 08:09:15  abeilleg
+// remove critical of findbugs
+//
+// Revision 1.2  2009/12/17 12:47:15  pierrejoseph
+// CheckStyle:  Organize imports / Format
+//
+// Revision 1.1  2008/02/28 15:37:14  pierrejoseph
+// TdbExtractor has been forgotten
+//
+// Revision 1.3  2005/11/29 16:13:31  chinkumo
+// Code reformated (pogo compatible)
+//
+// Revision 1.2  2005/11/15 13:45:16  chinkumo
+// ...
+//
+// Revision 1.1  2005/09/09 10:03:41  chinkumo
+// First commit !
+// (Dynamic attribut release)
+//
+//
+// copyleft :    European Synchrotron Radiation Facility
+//               BP 220, Grenoble 38043
+//               FRANCE
+//
+//-======================================================================
+//
+//  		This file is generated by POGO
+//	(Program Obviously used to Generate tango Object)
+//
+//         (c) - Software Engineering Group - ESRF
+//=============================================================================
+
+/**
+ * @author	$Author: gramer $
+ * @version	$Revision: 15443 $
+ */
+package TdbExtractor;
+
+import org.omg.CORBA.Any;
+
+import fr.esrf.Tango.DevFailed;
+import fr.esrf.Tango.DispLevel;
+import fr.esrf.TangoDs.Command;
+import fr.esrf.TangoDs.DeviceImpl;
+import fr.esrf.TangoDs.Except;
+import fr.esrf.TangoDs.TangoConst;
+import fr.esrf.TangoDs.Util;
+
+/**
+ * Class Description: Retrieves data beetwen two dates, for a given scalar
+ * attribute. Create a dynamic attribute, retrieve data from database and
+ * prepare result for attribute_history call.
+ */
+
+public class GetAttDataBetweenDatesClass extends Command implements TangoConst {
+	// ===============================================================
+	/**
+	 * Constructor for Command class GetAttDataBetweenDatesClass
+	 * 
+	 * @param name
+	 *            command name
+	 * @param in
+	 *            argin type
+	 * @param out
+	 *            argout type
+	 */
+	// ===============================================================
+	public GetAttDataBetweenDatesClass(final String name, final int in, final int out) {
+		super(name, in, out);
+	}
+
+	// ===============================================================
+	/**
+	 * Constructor for Command class GetAttDataBetweenDatesClass
+	 * 
+	 * @param name
+	 *            command name
+	 * @param in
+	 *            argin type
+	 * @param in_comments
+	 *            argin description
+	 * @param out
+	 *            argout type
+	 * @param out_comments
+	 *            argout description
+	 */
+	// ===============================================================
+	public GetAttDataBetweenDatesClass(final String name, final int in, final int out, final String in_comments, final String out_comments) {
+		super(name, in, out, in_comments, out_comments);
+	}
+
+	// ===============================================================
+	/**
+	 * Constructor for Command class GetAttDataBetweenDatesClass
+	 * 
+	 * @param name
+	 *            command name
+	 * @param in
+	 *            argin type
+	 * @param in_comments
+	 *            argin description
+	 * @param out
+	 *            argout type
+	 * @param out_comments
+	 *            argout description
+	 * @param level
+	 *            The command display type OPERATOR or EXPERT
+	 */
+	// ===============================================================
+	public GetAttDataBetweenDatesClass(final String name, final int in, final int out, final String in_comments, final String out_comments, final DispLevel level) {
+		super(name, in, out, in_comments, out_comments, level);
+	}
+
+	// ===============================================================
+	/**
+	 * return the result of the device's command.
+	 */
+	// ===============================================================
+	@Override
+	public Any execute(final DeviceImpl device, final Any in_any) throws DevFailed {
+		Util.out2.println("GetAttDataBetweenDatesClass.execute(): arrived");
+		final String[] argin = extract_DevVarStringArray(in_any);
+
+		if (!(device instanceof TdbExtractor)) {
+			Except.throw_exception("DEVICE_ERROR", "Device parameter is not instance of TdbExtractor", "TdbExtractor");
+		}
+
+		return insert(((TdbExtractor) device).get_att_data_between_dates(argin));
+	}
+
+	// ===============================================================
+	/**
+	 * Check if it is allowed to execute the command.
+	 */
+	// ===============================================================
+	@Override
+	public boolean is_allowed(final DeviceImpl device, final Any data_in) {
+		// End of Generated Code
+
+		// Re-Start of Generated Code
+		return true;
+	}
+}
+
+// -----------------------------------------------------------------------------
+/*
+ * end of $Source:
+ * /cvsroot/tango-cs/archiving/server/hdbtdbArchivingServers/src/
+ * main/java/TdbExtractor/GetAttDataBetweenDatesClass.java,v $
+ */
diff --git a/src/main/java/TdbExtractor/GetAttDataBetweenDatesCountClass.java b/tdbextractor/src/main/java/TdbExtractor/GetAttDataBetweenDatesCountClass.java
similarity index 94%
rename from src/main/java/TdbExtractor/GetAttDataBetweenDatesCountClass.java
rename to tdbextractor/src/main/java/TdbExtractor/GetAttDataBetweenDatesCountClass.java
index 8b87de293c80fa540cc45b88e0497100d9bc0dbf..f134febe02b76881e418312ff20b44454b8ed3bd 100644
--- a/src/main/java/TdbExtractor/GetAttDataBetweenDatesCountClass.java
+++ b/tdbextractor/src/main/java/TdbExtractor/GetAttDataBetweenDatesCountClass.java
@@ -1,162 +1,162 @@
-//+======================================================================
-// $Source$
-//
-// Project:      Tango Device Server
-//
-// Description:  Java source code for the command TemplateClass of the
-//               TdbExtractor class.
-//
-// $Author$
-//
-// $Revision$
-//
-// $Log$
-// Revision 1.3  2010/11/22 08:09:15  abeilleg
-// remove critical of findbugs
-//
-// Revision 1.2  2009/12/17 12:47:15  pierrejoseph
-// CheckStyle:  Organize imports / Format
-//
-// Revision 1.1  2008/02/28 15:37:14  pierrejoseph
-// TdbExtractor has been forgotten
-//
-// Revision 1.3  2005/11/29 16:13:31  chinkumo
-// Code reformated (pogo compatible)
-//
-// Revision 1.2  2005/11/15 13:45:16  chinkumo
-// ...
-//
-// Revision 1.1  2005/09/09 10:03:41  chinkumo
-// First commit !
-// (Dynamic attribut release)
-//
-//
-// copyleft :    European Synchrotron Radiation Facility
-//               BP 220, Grenoble 38043
-//               FRANCE
-//
-//-======================================================================
-//
-//  		This file is generated by POGO
-//	(Program Obviously used to Generate tango Object)
-//
-//         (c) - Software Engineering Group - ESRF
-//=============================================================================
-
-/**
- * @author	$Author$
- * @version	$Revision$
- */
-package TdbExtractor;
-
-import org.omg.CORBA.Any;
-
-import fr.esrf.Tango.DevFailed;
-import fr.esrf.Tango.DispLevel;
-import fr.esrf.TangoDs.Command;
-import fr.esrf.TangoDs.DeviceImpl;
-import fr.esrf.TangoDs.Except;
-import fr.esrf.TangoDs.TangoConst;
-import fr.esrf.TangoDs.Util;
-
-/**
- * Class Description: Returns the number of data beetwen two dates and, for a
- * given scalar attribute.
- */
-
-public class GetAttDataBetweenDatesCountClass extends Command implements TangoConst {
-	// ===============================================================
-	/**
-	 * Constructor for Command class GetAttDataBetweenDatesCountClass
-	 * 
-	 * @param name
-	 *            command name
-	 * @param in
-	 *            argin type
-	 * @param out
-	 *            argout type
-	 */
-	// ===============================================================
-	public GetAttDataBetweenDatesCountClass(final String name, final int in, final int out) {
-		super(name, in, out);
-	}
-
-	// ===============================================================
-	/**
-	 * Constructor for Command class GetAttDataBetweenDatesCountClass
-	 * 
-	 * @param name
-	 *            command name
-	 * @param in
-	 *            argin type
-	 * @param in_comments
-	 *            argin description
-	 * @param out
-	 *            argout type
-	 * @param out_comments
-	 *            argout description
-	 */
-	// ===============================================================
-	public GetAttDataBetweenDatesCountClass(final String name, final int in, final int out, final String in_comments, final String out_comments) {
-		super(name, in, out, in_comments, out_comments);
-	}
-
-	// ===============================================================
-	/**
-	 * Constructor for Command class GetAttDataBetweenDatesCountClass
-	 * 
-	 * @param name
-	 *            command name
-	 * @param in
-	 *            argin type
-	 * @param in_comments
-	 *            argin description
-	 * @param out
-	 *            argout type
-	 * @param out_comments
-	 *            argout description
-	 * @param level
-	 *            The command display type OPERATOR or EXPERT
-	 */
-	// ===============================================================
-	public GetAttDataBetweenDatesCountClass(final String name, final int in, final int out, final String in_comments, final String out_comments, final DispLevel level) {
-		super(name, in, out, in_comments, out_comments, level);
-	}
-
-	// ===============================================================
-	/**
-	 * return the result of the device's command.
-	 */
-	// ===============================================================
-	@Override
-	public Any execute(final DeviceImpl device, final Any in_any) throws DevFailed {
-		Util.out2.println("GetAttDataBetweenDatesCountClass.execute(): arrived");
-		final String[] argin = extract_DevVarStringArray(in_any);
-
-		if (!(device instanceof TdbExtractor)) {
-			Except.throw_exception("DEVICE_ERROR", "Device parameter is not instance of TdbExtractor", "TdbExtractor");
-		}
-
-		return insert(((TdbExtractor) device).get_att_data_between_dates_count(argin));
-	}
-
-	// ===============================================================
-	/**
-	 * Check if it is allowed to execute the command.
-	 */
-	// ===============================================================
-	@Override
-	public boolean is_allowed(final DeviceImpl device, final Any data_in) {
-		// End of Generated Code
-
-		// Re-Start of Generated Code
-		return true;
-	}
-}
-
-// -----------------------------------------------------------------------------
-/*
- * end of $Source:
- * /cvsroot/tango-cs/archiving/server/hdbtdbArchivingServers/src/
- * main/java/TdbExtractor/GetAttDataBetweenDatesCountClass.java,v $
- */
+//+======================================================================
+// $Source$
+//
+// Project:      Tango Device Server
+//
+// Description:  Java source code for the command TemplateClass of the
+//               TdbExtractor class.
+//
+// $Author: gramer $
+//
+// $Revision: 15443 $
+//
+// $Log$
+// Revision 1.3  2010/11/22 08:09:15  abeilleg
+// remove critical of findbugs
+//
+// Revision 1.2  2009/12/17 12:47:15  pierrejoseph
+// CheckStyle:  Organize imports / Format
+//
+// Revision 1.1  2008/02/28 15:37:14  pierrejoseph
+// TdbExtractor has been forgotten
+//
+// Revision 1.3  2005/11/29 16:13:31  chinkumo
+// Code reformated (pogo compatible)
+//
+// Revision 1.2  2005/11/15 13:45:16  chinkumo
+// ...
+//
+// Revision 1.1  2005/09/09 10:03:41  chinkumo
+// First commit !
+// (Dynamic attribut release)
+//
+//
+// copyleft :    European Synchrotron Radiation Facility
+//               BP 220, Grenoble 38043
+//               FRANCE
+//
+//-======================================================================
+//
+//  		This file is generated by POGO
+//	(Program Obviously used to Generate tango Object)
+//
+//         (c) - Software Engineering Group - ESRF
+//=============================================================================
+
+/**
+ * @author	$Author: gramer $
+ * @version	$Revision: 15443 $
+ */
+package TdbExtractor;
+
+import org.omg.CORBA.Any;
+
+import fr.esrf.Tango.DevFailed;
+import fr.esrf.Tango.DispLevel;
+import fr.esrf.TangoDs.Command;
+import fr.esrf.TangoDs.DeviceImpl;
+import fr.esrf.TangoDs.Except;
+import fr.esrf.TangoDs.TangoConst;
+import fr.esrf.TangoDs.Util;
+
+/**
+ * Class Description: Returns the number of data beetwen two dates and, for a
+ * given scalar attribute.
+ */
+
+public class GetAttDataBetweenDatesCountClass extends Command implements TangoConst {
+	// ===============================================================
+	/**
+	 * Constructor for Command class GetAttDataBetweenDatesCountClass
+	 * 
+	 * @param name
+	 *            command name
+	 * @param in
+	 *            argin type
+	 * @param out
+	 *            argout type
+	 */
+	// ===============================================================
+	public GetAttDataBetweenDatesCountClass(final String name, final int in, final int out) {
+		super(name, in, out);
+	}
+
+	// ===============================================================
+	/**
+	 * Constructor for Command class GetAttDataBetweenDatesCountClass
+	 * 
+	 * @param name
+	 *            command name
+	 * @param in
+	 *            argin type
+	 * @param in_comments
+	 *            argin description
+	 * @param out
+	 *            argout type
+	 * @param out_comments
+	 *            argout description
+	 */
+	// ===============================================================
+	public GetAttDataBetweenDatesCountClass(final String name, final int in, final int out, final String in_comments, final String out_comments) {
+		super(name, in, out, in_comments, out_comments);
+	}
+
+	// ===============================================================
+	/**
+	 * Constructor for Command class GetAttDataBetweenDatesCountClass
+	 * 
+	 * @param name
+	 *            command name
+	 * @param in
+	 *            argin type
+	 * @param in_comments
+	 *            argin description
+	 * @param out
+	 *            argout type
+	 * @param out_comments
+	 *            argout description
+	 * @param level
+	 *            The command display type OPERATOR or EXPERT
+	 */
+	// ===============================================================
+	public GetAttDataBetweenDatesCountClass(final String name, final int in, final int out, final String in_comments, final String out_comments, final DispLevel level) {
+		super(name, in, out, in_comments, out_comments, level);
+	}
+
+	// ===============================================================
+	/**
+	 * return the result of the device's command.
+	 */
+	// ===============================================================
+	@Override
+	public Any execute(final DeviceImpl device, final Any in_any) throws DevFailed {
+		Util.out2.println("GetAttDataBetweenDatesCountClass.execute(): arrived");
+		final String[] argin = extract_DevVarStringArray(in_any);
+
+		if (!(device instanceof TdbExtractor)) {
+			Except.throw_exception("DEVICE_ERROR", "Device parameter is not instance of TdbExtractor", "TdbExtractor");
+		}
+
+		return insert(((TdbExtractor) device).get_att_data_between_dates_count(argin));
+	}
+
+	// ===============================================================
+	/**
+	 * Check if it is allowed to execute the command.
+	 */
+	// ===============================================================
+	@Override
+	public boolean is_allowed(final DeviceImpl device, final Any data_in) {
+		// End of Generated Code
+
+		// Re-Start of Generated Code
+		return true;
+	}
+}
+
+// -----------------------------------------------------------------------------
+/*
+ * end of $Source:
+ * /cvsroot/tango-cs/archiving/server/hdbtdbArchivingServers/src/
+ * main/java/TdbExtractor/GetAttDataBetweenDatesCountClass.java,v $
+ */
diff --git a/src/main/java/TdbExtractor/GetAttDataBetweenDatesSamplingClass.java b/tdbextractor/src/main/java/TdbExtractor/GetAttDataBetweenDatesSamplingClass.java
similarity index 95%
rename from src/main/java/TdbExtractor/GetAttDataBetweenDatesSamplingClass.java
rename to tdbextractor/src/main/java/TdbExtractor/GetAttDataBetweenDatesSamplingClass.java
index ae36e3140677b934078d0d3be0454e4c07331544..aea59d2e3e9ee3bc08511e358cc258aa69472899 100644
--- a/src/main/java/TdbExtractor/GetAttDataBetweenDatesSamplingClass.java
+++ b/tdbextractor/src/main/java/TdbExtractor/GetAttDataBetweenDatesSamplingClass.java
@@ -1,117 +1,117 @@
-/**
- * @author  $Author$
- * @version $Revision$
- */
-package TdbExtractor;
-
-import org.omg.CORBA.Any;
-
-import fr.esrf.Tango.DevFailed;
-import fr.esrf.Tango.DispLevel;
-import fr.esrf.TangoDs.Command;
-import fr.esrf.TangoDs.DeviceImpl;
-import fr.esrf.TangoDs.Except;
-import fr.esrf.TangoDs.TangoConst;
-import fr.esrf.TangoDs.Util;
-
-/**
- * Class Description: Retrieves data beetwen two dates, for a given scalar
- * attribute. Create a dynamic attribute, retrieve data from database and
- * prepare result for attribute_history call.
- */
-
-public class GetAttDataBetweenDatesSamplingClass extends Command implements TangoConst {
-	// ===============================================================
-	/**
-	 * Constructor for Command class GetAttDataBetweenDatesClass
-	 * 
-	 * @param name
-	 *            command name
-	 * @param in
-	 *            argin type
-	 * @param out
-	 *            argout type
-	 */
-	// ===============================================================
-	public GetAttDataBetweenDatesSamplingClass(final String name, final int in, final int out) {
-		super(name, in, out);
-	}
-
-	// ===============================================================
-	/**
-	 * Constructor for Command class GetAttDataBetweenDatesClass
-	 * 
-	 * @param name
-	 *            command name
-	 * @param in
-	 *            argin type
-	 * @param in_comments
-	 *            argin description
-	 * @param out
-	 *            argout type
-	 * @param out_comments
-	 *            argout description
-	 */
-	// ===============================================================
-	public GetAttDataBetweenDatesSamplingClass(final String name, final int in, final int out, final String in_comments, final String out_comments) {
-		super(name, in, out, in_comments, out_comments);
-	}
-
-	// ===============================================================
-	/**
-	 * Constructor for Command class GetAttDataBetweenDatesClass
-	 * 
-	 * @param name
-	 *            command name
-	 * @param in
-	 *            argin type
-	 * @param in_comments
-	 *            argin description
-	 * @param out
-	 *            argout type
-	 * @param out_comments
-	 *            argout description
-	 * @param level
-	 *            The command display type OPERATOR or EXPERT
-	 */
-	// ===============================================================
-	public GetAttDataBetweenDatesSamplingClass(final String name, final int in, final int out, final String in_comments, final String out_comments, final DispLevel level) {
-		super(name, in, out, in_comments, out_comments, level);
-	}
-
-	// ===============================================================
-	/**
-	 * return the result of the device's command.
-	 */
-	// ===============================================================
-	@Override
-	public Any execute(final DeviceImpl device, final Any in_any) throws DevFailed {
-		Util.out2.println("GetAttDataBetweenDatesSamplingClass.execute(): arrived");
-		final String[] argin = extract_DevVarStringArray(in_any);
-		if (!(device instanceof TdbExtractor)) {
-			Except.throw_exception("DEVICE_ERROR", "Device parameter is not instance of TdbExtractor", "TdbExtractor");
-		}
-
-		return insert(((TdbExtractor) device).get_att_data_between_dates_sampling(argin));
-	}
-
-	// ===============================================================
-	/**
-	 * Check if it is allowed to execute the command.
-	 */
-	// ===============================================================
-	@Override
-	public boolean is_allowed(final DeviceImpl device, final Any data_in) {
-		// End of Generated Code
-
-		// Re-Start of Generated Code
-		return true;
-	}
-}
-
-// -----------------------------------------------------------------------------
-/*
- * end of $Source:
- * /cvsroot/tango-cs/archiving/server/hdbtdbArchivingServers/src/
- * main/java/TdbExtractor/GetAttDataBetweenDatesSamplingClass.java,v $
- */
+/**
+ * @author  $Author: gramer $
+ * @version $Revision: 15443 $
+ */
+package TdbExtractor;
+
+import org.omg.CORBA.Any;
+
+import fr.esrf.Tango.DevFailed;
+import fr.esrf.Tango.DispLevel;
+import fr.esrf.TangoDs.Command;
+import fr.esrf.TangoDs.DeviceImpl;
+import fr.esrf.TangoDs.Except;
+import fr.esrf.TangoDs.TangoConst;
+import fr.esrf.TangoDs.Util;
+
+/**
+ * Class Description: Retrieves data beetwen two dates, for a given scalar
+ * attribute. Create a dynamic attribute, retrieve data from database and
+ * prepare result for attribute_history call.
+ */
+
+public class GetAttDataBetweenDatesSamplingClass extends Command implements TangoConst {
+	// ===============================================================
+	/**
+	 * Constructor for Command class GetAttDataBetweenDatesClass
+	 * 
+	 * @param name
+	 *            command name
+	 * @param in
+	 *            argin type
+	 * @param out
+	 *            argout type
+	 */
+	// ===============================================================
+	public GetAttDataBetweenDatesSamplingClass(final String name, final int in, final int out) {
+		super(name, in, out);
+	}
+
+	// ===============================================================
+	/**
+	 * Constructor for Command class GetAttDataBetweenDatesClass
+	 * 
+	 * @param name
+	 *            command name
+	 * @param in
+	 *            argin type
+	 * @param in_comments
+	 *            argin description
+	 * @param out
+	 *            argout type
+	 * @param out_comments
+	 *            argout description
+	 */
+	// ===============================================================
+	public GetAttDataBetweenDatesSamplingClass(final String name, final int in, final int out, final String in_comments, final String out_comments) {
+		super(name, in, out, in_comments, out_comments);
+	}
+
+	// ===============================================================
+	/**
+	 * Constructor for Command class GetAttDataBetweenDatesClass
+	 * 
+	 * @param name
+	 *            command name
+	 * @param in
+	 *            argin type
+	 * @param in_comments
+	 *            argin description
+	 * @param out
+	 *            argout type
+	 * @param out_comments
+	 *            argout description
+	 * @param level
+	 *            The command display type OPERATOR or EXPERT
+	 */
+	// ===============================================================
+	public GetAttDataBetweenDatesSamplingClass(final String name, final int in, final int out, final String in_comments, final String out_comments, final DispLevel level) {
+		super(name, in, out, in_comments, out_comments, level);
+	}
+
+	// ===============================================================
+	/**
+	 * return the result of the device's command.
+	 */
+	// ===============================================================
+	@Override
+	public Any execute(final DeviceImpl device, final Any in_any) throws DevFailed {
+		Util.out2.println("GetAttDataBetweenDatesSamplingClass.execute(): arrived");
+		final String[] argin = extract_DevVarStringArray(in_any);
+		if (!(device instanceof TdbExtractor)) {
+			Except.throw_exception("DEVICE_ERROR", "Device parameter is not instance of TdbExtractor", "TdbExtractor");
+		}
+
+		return insert(((TdbExtractor) device).get_att_data_between_dates_sampling(argin));
+	}
+
+	// ===============================================================
+	/**
+	 * Check if it is allowed to execute the command.
+	 */
+	// ===============================================================
+	@Override
+	public boolean is_allowed(final DeviceImpl device, final Any data_in) {
+		// End of Generated Code
+
+		// Re-Start of Generated Code
+		return true;
+	}
+}
+
+// -----------------------------------------------------------------------------
+/*
+ * end of $Source:
+ * /cvsroot/tango-cs/archiving/server/hdbtdbArchivingServers/src/
+ * main/java/TdbExtractor/GetAttDataBetweenDatesSamplingClass.java,v $
+ */
diff --git a/src/main/java/TdbExtractor/GetAttDataClass.java b/tdbextractor/src/main/java/TdbExtractor/GetAttDataClass.java
similarity index 94%
rename from src/main/java/TdbExtractor/GetAttDataClass.java
rename to tdbextractor/src/main/java/TdbExtractor/GetAttDataClass.java
index 70b13a3f12263402ac0a824c35c1c44e92b857e5..e60c62839d3251e9e8caa6c2b5f3d2bfe822ca7d 100644
--- a/src/main/java/TdbExtractor/GetAttDataClass.java
+++ b/tdbextractor/src/main/java/TdbExtractor/GetAttDataClass.java
@@ -1,164 +1,164 @@
-//+======================================================================
-// $Source$
-//
-// Project:      Tango Device Server
-//
-// Description:  Java source code for the command TemplateClass of the
-//               TdbExtractor class.
-//
-// $Author$
-//
-// $Revision$
-//
-// $Log$
-// Revision 1.3  2010/11/22 08:09:14  abeilleg
-// remove critical of findbugs
-//
-// Revision 1.2  2009/12/17 12:47:15  pierrejoseph
-// CheckStyle:  Organize imports / Format
-//
-// Revision 1.1  2008/02/28 15:37:14  pierrejoseph
-// TdbExtractor has been forgotten
-//
-// Revision 1.3  2005/11/29 16:13:31  chinkumo
-// Code reformated (pogo compatible)
-//
-// Revision 1.2  2005/11/15 13:45:16  chinkumo
-// ...
-//
-// Revision 1.1  2005/09/09 10:03:41  chinkumo
-// First commit !
-// (Dynamic attribut release)
-//
-//
-// copyleft :    European Synchrotron Radiation Facility
-//               BP 220, Grenoble 38043
-//               FRANCE
-//
-//-======================================================================
-//
-//  		This file is generated by POGO
-//	(Program Obviously used to Generate tango Object)
-//
-//         (c) - Software Engineering Group - ESRF
-//=============================================================================
-
-/**
- * @author	$Author$
- * @version	$Revision$
- */
-package TdbExtractor;
-
-import org.omg.CORBA.Any;
-
-import fr.esrf.Tango.DevFailed;
-import fr.esrf.Tango.DispLevel;
-import fr.esrf.TangoDs.Command;
-import fr.esrf.TangoDs.DeviceImpl;
-import fr.esrf.TangoDs.Except;
-import fr.esrf.TangoDs.TangoConst;
-import fr.esrf.TangoDs.Util;
-
-/**
- * Class Description: Gets all the data archieved for an attribute. Create a
- * dynamic attribute, retrieve data from database and prepare result for
- * attribute_history call.
- */
-
-public class GetAttDataClass extends Command implements TangoConst {
-	// ===============================================================
-	/**
-	 * Constructor for Command class GetAttDataClass
-	 * 
-	 * @param name
-	 *            command name
-	 * @param in
-	 *            argin type
-	 * @param out
-	 *            argout type
-	 */
-	// ===============================================================
-	public GetAttDataClass(final String name, final int in, final int out) {
-		super(name, in, out);
-	}
-
-	// ===============================================================
-	/**
-	 * Constructor for Command class GetAttDataClass
-	 * 
-	 * @param name
-	 *            command name
-	 * @param in
-	 *            argin type
-	 * @param in_comments
-	 *            argin description
-	 * @param out
-	 *            argout type
-	 * @param out_comments
-	 *            argout description
-	 */
-	// ===============================================================
-	public GetAttDataClass(final String name, final int in, final int out, final String in_comments, final String out_comments) {
-		super(name, in, out, in_comments, out_comments);
-	}
-
-	// ===============================================================
-	/**
-	 * Constructor for Command class GetAttDataClass
-	 * 
-	 * @param name
-	 *            command name
-	 * @param in
-	 *            argin type
-	 * @param in_comments
-	 *            argin description
-	 * @param out
-	 *            argout type
-	 * @param out_comments
-	 *            argout description
-	 * @param level
-	 *            The command display type OPERATOR or EXPERT
-	 */
-	// ===============================================================
-	public GetAttDataClass(final String name, final int in, final int out, final String in_comments, final String out_comments, final DispLevel level) {
-		super(name, in, out, in_comments, out_comments, level);
-	}
-
-	// ===============================================================
-	/**
-	 * return the result of the device's command.
-	 */
-	// ===============================================================
-	@Override
-	public Any execute(final DeviceImpl device, final Any in_any) throws DevFailed {
-		Util.out2.println("GetAttDataClass.execute(): arrived");
-		final String argin = extract_DevString(in_any);
-
-		if (!(device instanceof TdbExtractor)) {
-			Except.throw_exception("DEVICE_ERROR", "Device parameter is not instance of TdbExtractor", "TdbExtractor");
-		}
-
-		return insert(((TdbExtractor) device).get_att_data(argin));
-
-	}
-
-	// ===============================================================
-	/**
-	 * Check if it is allowed to execute the command.
-	 */
-	// ===============================================================
-	@Override
-	public boolean is_allowed(final DeviceImpl device, final Any data_in) {
-		// End of Generated Code
-
-		// Re-Start of Generated Code
-		return true;
-	}
-}
-
-// -----------------------------------------------------------------------------
-/*
- * end of $Source:
- * /cvsroot/tango-cs/archiving/server/hdbtdbArchivingServers/src/
- * main/java/TdbExtractor/GetAttDataClass.java,v $
- */
+//+======================================================================
+// $Source$
+//
+// Project:      Tango Device Server
+//
+// Description:  Java source code for the command TemplateClass of the
+//               TdbExtractor class.
+//
+// $Author: gramer $
+//
+// $Revision: 15443 $
+//
+// $Log$
+// Revision 1.3  2010/11/22 08:09:14  abeilleg
+// remove critical of findbugs
+//
+// Revision 1.2  2009/12/17 12:47:15  pierrejoseph
+// CheckStyle:  Organize imports / Format
+//
+// Revision 1.1  2008/02/28 15:37:14  pierrejoseph
+// TdbExtractor has been forgotten
+//
+// Revision 1.3  2005/11/29 16:13:31  chinkumo
+// Code reformated (pogo compatible)
+//
+// Revision 1.2  2005/11/15 13:45:16  chinkumo
+// ...
+//
+// Revision 1.1  2005/09/09 10:03:41  chinkumo
+// First commit !
+// (Dynamic attribut release)
+//
+//
+// copyleft :    European Synchrotron Radiation Facility
+//               BP 220, Grenoble 38043
+//               FRANCE
+//
+//-======================================================================
+//
+//  		This file is generated by POGO
+//	(Program Obviously used to Generate tango Object)
+//
+//         (c) - Software Engineering Group - ESRF
+//=============================================================================
+
+/**
+ * @author	$Author: gramer $
+ * @version	$Revision: 15443 $
+ */
+package TdbExtractor;
+
+import org.omg.CORBA.Any;
+
+import fr.esrf.Tango.DevFailed;
+import fr.esrf.Tango.DispLevel;
+import fr.esrf.TangoDs.Command;
+import fr.esrf.TangoDs.DeviceImpl;
+import fr.esrf.TangoDs.Except;
+import fr.esrf.TangoDs.TangoConst;
+import fr.esrf.TangoDs.Util;
+
+/**
+ * Class Description: Gets all the data archieved for an attribute. Create a
+ * dynamic attribute, retrieve data from database and prepare result for
+ * attribute_history call.
+ */
+
+public class GetAttDataClass extends Command implements TangoConst {
+	// ===============================================================
+	/**
+	 * Constructor for Command class GetAttDataClass
+	 * 
+	 * @param name
+	 *            command name
+	 * @param in
+	 *            argin type
+	 * @param out
+	 *            argout type
+	 */
+	// ===============================================================
+	public GetAttDataClass(final String name, final int in, final int out) {
+		super(name, in, out);
+	}
+
+	// ===============================================================
+	/**
+	 * Constructor for Command class GetAttDataClass
+	 * 
+	 * @param name
+	 *            command name
+	 * @param in
+	 *            argin type
+	 * @param in_comments
+	 *            argin description
+	 * @param out
+	 *            argout type
+	 * @param out_comments
+	 *            argout description
+	 */
+	// ===============================================================
+	public GetAttDataClass(final String name, final int in, final int out, final String in_comments, final String out_comments) {
+		super(name, in, out, in_comments, out_comments);
+	}
+
+	// ===============================================================
+	/**
+	 * Constructor for Command class GetAttDataClass
+	 * 
+	 * @param name
+	 *            command name
+	 * @param in
+	 *            argin type
+	 * @param in_comments
+	 *            argin description
+	 * @param out
+	 *            argout type
+	 * @param out_comments
+	 *            argout description
+	 * @param level
+	 *            The command display type OPERATOR or EXPERT
+	 */
+	// ===============================================================
+	public GetAttDataClass(final String name, final int in, final int out, final String in_comments, final String out_comments, final DispLevel level) {
+		super(name, in, out, in_comments, out_comments, level);
+	}
+
+	// ===============================================================
+	/**
+	 * return the result of the device's command.
+	 */
+	// ===============================================================
+	@Override
+	public Any execute(final DeviceImpl device, final Any in_any) throws DevFailed {
+		Util.out2.println("GetAttDataClass.execute(): arrived");
+		final String argin = extract_DevString(in_any);
+
+		if (!(device instanceof TdbExtractor)) {
+			Except.throw_exception("DEVICE_ERROR", "Device parameter is not instance of TdbExtractor", "TdbExtractor");
+		}
+
+		return insert(((TdbExtractor) device).get_att_data(argin));
+
+	}
+
+	// ===============================================================
+	/**
+	 * Check if it is allowed to execute the command.
+	 */
+	// ===============================================================
+	@Override
+	public boolean is_allowed(final DeviceImpl device, final Any data_in) {
+		// End of Generated Code
+
+		// Re-Start of Generated Code
+		return true;
+	}
+}
+
+// -----------------------------------------------------------------------------
+/*
+ * end of $Source:
+ * /cvsroot/tango-cs/archiving/server/hdbtdbArchivingServers/src/
+ * main/java/TdbExtractor/GetAttDataClass.java,v $
+ */
diff --git a/src/main/java/TdbExtractor/GetAttDataCountClass.java b/tdbextractor/src/main/java/TdbExtractor/GetAttDataCountClass.java
similarity index 94%
rename from src/main/java/TdbExtractor/GetAttDataCountClass.java
rename to tdbextractor/src/main/java/TdbExtractor/GetAttDataCountClass.java
index b4bc48eb2ec6418c55d9bbb85f7cca9cc3491162..1cd1aac2731b037b00ce25ad79520bcfaa9d9d62 100644
--- a/src/main/java/TdbExtractor/GetAttDataCountClass.java
+++ b/tdbextractor/src/main/java/TdbExtractor/GetAttDataCountClass.java
@@ -1,160 +1,160 @@
-//+======================================================================
-// $Source$
-//
-// Project:      Tango Device Server
-//
-// Description:  Java source code for the command TemplateClass of the
-//               TdbExtractor class.
-//
-// $Author$
-//
-// $Revision$
-//
-// $Log$
-// Revision 1.3  2010/11/22 08:09:15  abeilleg
-// remove critical of findbugs
-//
-// Revision 1.2  2009/12/17 12:47:15  pierrejoseph
-// CheckStyle:  Organize imports / Format
-//
-// Revision 1.1  2008/02/28 15:37:15  pierrejoseph
-// TdbExtractor has been forgotten
-//
-// Revision 1.3  2005/11/29 16:13:31  chinkumo
-// Code reformated (pogo compatible)
-//
-// Revision 1.2  2005/11/15 13:45:16  chinkumo
-// ...
-//
-// Revision 1.1  2005/09/09 10:03:41  chinkumo
-// First commit !
-// (Dynamic attribut release)
-//
-//
-// copyleft :    European Synchrotron Radiation Facility
-//               BP 220, Grenoble 38043
-//               FRANCE
-//
-//-======================================================================
-//
-//  		This file is generated by POGO
-//	(Program Obviously used to Generate tango Object)
-//
-//         (c) - Software Engineering Group - ESRF
-//=============================================================================
-
-/**
- * @author	$Author$
- * @version	$Revision$
- */
-package TdbExtractor;
-
-import org.omg.CORBA.Any;
-
-import fr.esrf.Tango.DevFailed;
-import fr.esrf.Tango.DispLevel;
-import fr.esrf.TangoDs.Command;
-import fr.esrf.TangoDs.DeviceImpl;
-import fr.esrf.TangoDs.Except;
-import fr.esrf.TangoDs.TangoConst;
-import fr.esrf.TangoDs.Util;
-
-/**
- * Class Description: Returns the number of the data archieved for an attribute.
- */
-
-public class GetAttDataCountClass extends Command implements TangoConst {
-	// ===============================================================
-	/**
-	 * Constructor for Command class GetAttDataCountClass
-	 * 
-	 * @param name
-	 *            command name
-	 * @param in
-	 *            argin type
-	 * @param out
-	 *            argout type
-	 */
-	// ===============================================================
-	public GetAttDataCountClass(final String name, final int in, final int out) {
-		super(name, in, out);
-	}
-
-	// ===============================================================
-	/**
-	 * Constructor for Command class GetAttDataCountClass
-	 * 
-	 * @param name
-	 *            command name
-	 * @param in
-	 *            argin type
-	 * @param in_comments
-	 *            argin description
-	 * @param out
-	 *            argout type
-	 * @param out_comments
-	 *            argout description
-	 */
-	// ===============================================================
-	public GetAttDataCountClass(final String name, final int in, final int out, final String in_comments, final String out_comments) {
-		super(name, in, out, in_comments, out_comments);
-	}
-
-	// ===============================================================
-	/**
-	 * Constructor for Command class GetAttDataCountClass
-	 * 
-	 * @param name
-	 *            command name
-	 * @param in
-	 *            argin type
-	 * @param in_comments
-	 *            argin description
-	 * @param out
-	 *            argout type
-	 * @param out_comments
-	 *            argout description
-	 * @param level
-	 *            The command display type OPERATOR or EXPERT
-	 */
-	// ===============================================================
-	public GetAttDataCountClass(final String name, final int in, final int out, final String in_comments, final String out_comments, final DispLevel level) {
-		super(name, in, out, in_comments, out_comments, level);
-	}
-
-	// ===============================================================
-	/**
-	 * return the result of the device's command.
-	 */
-	// ===============================================================
-	@Override
-	public Any execute(final DeviceImpl device, final Any in_any) throws DevFailed {
-		Util.out2.println("GetAttDataCountClass.execute(): arrived");
-		final String argin = extract_DevString(in_any);
-		if (!(device instanceof TdbExtractor)) {
-			Except.throw_exception("DEVICE_ERROR", "Device parameter is not instance of TdbExtractor", "TdbExtractor");
-		}
-
-		return insert(((TdbExtractor) device).get_att_data_count(argin));
-	}
-
-	// ===============================================================
-	/**
-	 * Check if it is allowed to execute the command.
-	 */
-	// ===============================================================
-	@Override
-	public boolean is_allowed(final DeviceImpl device, final Any data_in) {
-		// End of Generated Code
-
-		// Re-Start of Generated Code
-		return true;
-	}
-}
-
-// -----------------------------------------------------------------------------
-/*
- * end of $Source:
- * /cvsroot/tango-cs/archiving/server/hdbtdbArchivingServers/src/
- * main/java/TdbExtractor/GetAttDataCountClass.java,v $
- */
+//+======================================================================
+// $Source$
+//
+// Project:      Tango Device Server
+//
+// Description:  Java source code for the command TemplateClass of the
+//               TdbExtractor class.
+//
+// $Author: gramer $
+//
+// $Revision: 15443 $
+//
+// $Log$
+// Revision 1.3  2010/11/22 08:09:15  abeilleg
+// remove critical of findbugs
+//
+// Revision 1.2  2009/12/17 12:47:15  pierrejoseph
+// CheckStyle:  Organize imports / Format
+//
+// Revision 1.1  2008/02/28 15:37:15  pierrejoseph
+// TdbExtractor has been forgotten
+//
+// Revision 1.3  2005/11/29 16:13:31  chinkumo
+// Code reformated (pogo compatible)
+//
+// Revision 1.2  2005/11/15 13:45:16  chinkumo
+// ...
+//
+// Revision 1.1  2005/09/09 10:03:41  chinkumo
+// First commit !
+// (Dynamic attribut release)
+//
+//
+// copyleft :    European Synchrotron Radiation Facility
+//               BP 220, Grenoble 38043
+//               FRANCE
+//
+//-======================================================================
+//
+//  		This file is generated by POGO
+//	(Program Obviously used to Generate tango Object)
+//
+//         (c) - Software Engineering Group - ESRF
+//=============================================================================
+
+/**
+ * @author	$Author: gramer $
+ * @version	$Revision: 15443 $
+ */
+package TdbExtractor;
+
+import org.omg.CORBA.Any;
+
+import fr.esrf.Tango.DevFailed;
+import fr.esrf.Tango.DispLevel;
+import fr.esrf.TangoDs.Command;
+import fr.esrf.TangoDs.DeviceImpl;
+import fr.esrf.TangoDs.Except;
+import fr.esrf.TangoDs.TangoConst;
+import fr.esrf.TangoDs.Util;
+
+/**
+ * Class Description: Returns the number of the data archieved for an attribute.
+ */
+
+public class GetAttDataCountClass extends Command implements TangoConst {
+	// ===============================================================
+	/**
+	 * Constructor for Command class GetAttDataCountClass
+	 * 
+	 * @param name
+	 *            command name
+	 * @param in
+	 *            argin type
+	 * @param out
+	 *            argout type
+	 */
+	// ===============================================================
+	public GetAttDataCountClass(final String name, final int in, final int out) {
+		super(name, in, out);
+	}
+
+	// ===============================================================
+	/**
+	 * Constructor for Command class GetAttDataCountClass
+	 * 
+	 * @param name
+	 *            command name
+	 * @param in
+	 *            argin type
+	 * @param in_comments
+	 *            argin description
+	 * @param out
+	 *            argout type
+	 * @param out_comments
+	 *            argout description
+	 */
+	// ===============================================================
+	public GetAttDataCountClass(final String name, final int in, final int out, final String in_comments, final String out_comments) {
+		super(name, in, out, in_comments, out_comments);
+	}
+
+	// ===============================================================
+	/**
+	 * Constructor for Command class GetAttDataCountClass
+	 * 
+	 * @param name
+	 *            command name
+	 * @param in
+	 *            argin type
+	 * @param in_comments
+	 *            argin description
+	 * @param out
+	 *            argout type
+	 * @param out_comments
+	 *            argout description
+	 * @param level
+	 *            The command display type OPERATOR or EXPERT
+	 */
+	// ===============================================================
+	public GetAttDataCountClass(final String name, final int in, final int out, final String in_comments, final String out_comments, final DispLevel level) {
+		super(name, in, out, in_comments, out_comments, level);
+	}
+
+	// ===============================================================
+	/**
+	 * return the result of the device's command.
+	 */
+	// ===============================================================
+	@Override
+	public Any execute(final DeviceImpl device, final Any in_any) throws DevFailed {
+		Util.out2.println("GetAttDataCountClass.execute(): arrived");
+		final String argin = extract_DevString(in_any);
+		if (!(device instanceof TdbExtractor)) {
+			Except.throw_exception("DEVICE_ERROR", "Device parameter is not instance of TdbExtractor", "TdbExtractor");
+		}
+
+		return insert(((TdbExtractor) device).get_att_data_count(argin));
+	}
+
+	// ===============================================================
+	/**
+	 * Check if it is allowed to execute the command.
+	 */
+	// ===============================================================
+	@Override
+	public boolean is_allowed(final DeviceImpl device, final Any data_in) {
+		// End of Generated Code
+
+		// Re-Start of Generated Code
+		return true;
+	}
+}
+
+// -----------------------------------------------------------------------------
+/*
+ * end of $Source:
+ * /cvsroot/tango-cs/archiving/server/hdbtdbArchivingServers/src/
+ * main/java/TdbExtractor/GetAttDataCountClass.java,v $
+ */
diff --git a/src/main/java/TdbExtractor/GetAttDataInfOrSupThanBetweenDatesClass.java b/tdbextractor/src/main/java/TdbExtractor/GetAttDataInfOrSupThanBetweenDatesClass.java
similarity index 95%
rename from src/main/java/TdbExtractor/GetAttDataInfOrSupThanBetweenDatesClass.java
rename to tdbextractor/src/main/java/TdbExtractor/GetAttDataInfOrSupThanBetweenDatesClass.java
index 328129fdce5c856e192b8b8bc83fb50222c7f318..6d297913b519152cead9d3ca0e7c6e599ba827eb 100644
--- a/src/main/java/TdbExtractor/GetAttDataInfOrSupThanBetweenDatesClass.java
+++ b/tdbextractor/src/main/java/TdbExtractor/GetAttDataInfOrSupThanBetweenDatesClass.java
@@ -1,163 +1,163 @@
-//+======================================================================
-// $Source$
-//
-// Project:      Tango Device Server
-//
-// Description:  Java source code for the command TemplateClass of the
-//               TdbExtractor class.
-//
-// $Author$
-//
-// $Revision$
-//
-// $Log$
-// Revision 1.3  2010/11/22 08:09:15  abeilleg
-// remove critical of findbugs
-//
-// Revision 1.2  2009/12/17 12:47:15  pierrejoseph
-// CheckStyle:  Organize imports / Format
-//
-// Revision 1.1  2008/02/28 15:37:15  pierrejoseph
-// TdbExtractor has been forgotten
-//
-// Revision 1.3  2005/11/29 16:13:31  chinkumo
-// Code reformated (pogo compatible)
-//
-// Revision 1.2  2005/11/15 13:45:16  chinkumo
-// ...
-//
-// Revision 1.1  2005/09/09 10:03:41  chinkumo
-// First commit !
-// (Dynamic attribut release)
-//
-//
-// copyleft :    European Synchrotron Radiation Facility
-//               BP 220, Grenoble 38043
-//               FRANCE
-//
-//-======================================================================
-//
-//  		This file is generated by POGO
-//	(Program Obviously used to Generate tango Object)
-//
-//         (c) - Software Engineering Group - ESRF
-//=============================================================================
-
-/**
- * @author	$Author$
- * @version	$Revision$
- */
-package TdbExtractor;
-
-import org.omg.CORBA.Any;
-
-import fr.esrf.Tango.DevFailed;
-import fr.esrf.Tango.DispLevel;
-import fr.esrf.TangoDs.Command;
-import fr.esrf.TangoDs.DeviceImpl;
-import fr.esrf.TangoDs.Except;
-import fr.esrf.TangoDs.TangoConst;
-import fr.esrf.TangoDs.Util;
-
-/**
- * Class Description: Retrieves data beetwen two dates (date_1 & date_2) - Data
- * are lower than the given value x OR higher than the given value y. Create a
- * dynamic attribute, retrieve the corresponding data from database and prepare
- * result for attribute_history call.
- */
-
-public class GetAttDataInfOrSupThanBetweenDatesClass extends Command implements TangoConst {
-	// ===============================================================
-	/**
-	 * Constructor for Command class GetAttDataInfOrSupThanBetweenDatesClass
-	 * 
-	 * @param name
-	 *            command name
-	 * @param in
-	 *            argin type
-	 * @param out
-	 *            argout type
-	 */
-	// ===============================================================
-	public GetAttDataInfOrSupThanBetweenDatesClass(final String name, final int in, final int out) {
-		super(name, in, out);
-	}
-
-	// ===============================================================
-	/**
-	 * Constructor for Command class GetAttDataInfOrSupThanBetweenDatesClass
-	 * 
-	 * @param name
-	 *            command name
-	 * @param in
-	 *            argin type
-	 * @param in_comments
-	 *            argin description
-	 * @param out
-	 *            argout type
-	 * @param out_comments
-	 *            argout description
-	 */
-	// ===============================================================
-	public GetAttDataInfOrSupThanBetweenDatesClass(final String name, final int in, final int out, final String in_comments, final String out_comments) {
-		super(name, in, out, in_comments, out_comments);
-	}
-
-	// ===============================================================
-	/**
-	 * Constructor for Command class GetAttDataInfOrSupThanBetweenDatesClass
-	 * 
-	 * @param name
-	 *            command name
-	 * @param in
-	 *            argin type
-	 * @param in_comments
-	 *            argin description
-	 * @param out
-	 *            argout type
-	 * @param out_comments
-	 *            argout description
-	 * @param level
-	 *            The command display type OPERATOR or EXPERT
-	 */
-	// ===============================================================
-	public GetAttDataInfOrSupThanBetweenDatesClass(final String name, final int in, final int out, final String in_comments, final String out_comments, final DispLevel level) {
-		super(name, in, out, in_comments, out_comments, level);
-	}
-
-	// ===============================================================
-	/**
-	 * return the result of the device's command.
-	 */
-	// ===============================================================
-	@Override
-	public Any execute(final DeviceImpl device, final Any in_any) throws DevFailed {
-		Util.out2.println("GetAttDataInfOrSupThanBetweenDatesClass.execute(): arrived");
-		final String[] argin = extract_DevVarStringArray(in_any);
-		if (!(device instanceof TdbExtractor)) {
-			Except.throw_exception("DEVICE_ERROR", "Device parameter is not instance of TdbExtractor", "TdbExtractor");
-		}
-
-		return insert(((TdbExtractor) device).get_att_data_inf_or_sup_than_between_dates(argin));
-	}
-
-	// ===============================================================
-	/**
-	 * Check if it is allowed to execute the command.
-	 */
-	// ===============================================================
-	@Override
-	public boolean is_allowed(final DeviceImpl device, final Any data_in) {
-		// End of Generated Code
-
-		// Re-Start of Generated Code
-		return true;
-	}
-}
-
-// -----------------------------------------------------------------------------
-/*
- * end of $Source:
- * /cvsroot/tango-cs/archiving/server/hdbtdbArchivingServers/src/
- * main/java/TdbExtractor/GetAttDataInfOrSupThanBetweenDatesClass.java,v $
- */
+//+======================================================================
+// $Source$
+//
+// Project:      Tango Device Server
+//
+// Description:  Java source code for the command TemplateClass of the
+//               TdbExtractor class.
+//
+// $Author: gramer $
+//
+// $Revision: 15443 $
+//
+// $Log$
+// Revision 1.3  2010/11/22 08:09:15  abeilleg
+// remove critical of findbugs
+//
+// Revision 1.2  2009/12/17 12:47:15  pierrejoseph
+// CheckStyle:  Organize imports / Format
+//
+// Revision 1.1  2008/02/28 15:37:15  pierrejoseph
+// TdbExtractor has been forgotten
+//
+// Revision 1.3  2005/11/29 16:13:31  chinkumo
+// Code reformated (pogo compatible)
+//
+// Revision 1.2  2005/11/15 13:45:16  chinkumo
+// ...
+//
+// Revision 1.1  2005/09/09 10:03:41  chinkumo
+// First commit !
+// (Dynamic attribut release)
+//
+//
+// copyleft :    European Synchrotron Radiation Facility
+//               BP 220, Grenoble 38043
+//               FRANCE
+//
+//-======================================================================
+//
+//  		This file is generated by POGO
+//	(Program Obviously used to Generate tango Object)
+//
+//         (c) - Software Engineering Group - ESRF
+//=============================================================================
+
+/**
+ * @author	$Author: gramer $
+ * @version	$Revision: 15443 $
+ */
+package TdbExtractor;
+
+import org.omg.CORBA.Any;
+
+import fr.esrf.Tango.DevFailed;
+import fr.esrf.Tango.DispLevel;
+import fr.esrf.TangoDs.Command;
+import fr.esrf.TangoDs.DeviceImpl;
+import fr.esrf.TangoDs.Except;
+import fr.esrf.TangoDs.TangoConst;
+import fr.esrf.TangoDs.Util;
+
+/**
+ * Class Description: Retrieves data beetwen two dates (date_1 & date_2) - Data
+ * are lower than the given value x OR higher than the given value y. Create a
+ * dynamic attribute, retrieve the corresponding data from database and prepare
+ * result for attribute_history call.
+ */
+
+public class GetAttDataInfOrSupThanBetweenDatesClass extends Command implements TangoConst {
+	// ===============================================================
+	/**
+	 * Constructor for Command class GetAttDataInfOrSupThanBetweenDatesClass
+	 * 
+	 * @param name
+	 *            command name
+	 * @param in
+	 *            argin type
+	 * @param out
+	 *            argout type
+	 */
+	// ===============================================================
+	public GetAttDataInfOrSupThanBetweenDatesClass(final String name, final int in, final int out) {
+		super(name, in, out);
+	}
+
+	// ===============================================================
+	/**
+	 * Constructor for Command class GetAttDataInfOrSupThanBetweenDatesClass
+	 * 
+	 * @param name
+	 *            command name
+	 * @param in
+	 *            argin type
+	 * @param in_comments
+	 *            argin description
+	 * @param out
+	 *            argout type
+	 * @param out_comments
+	 *            argout description
+	 */
+	// ===============================================================
+	public GetAttDataInfOrSupThanBetweenDatesClass(final String name, final int in, final int out, final String in_comments, final String out_comments) {
+		super(name, in, out, in_comments, out_comments);
+	}
+
+	// ===============================================================
+	/**
+	 * Constructor for Command class GetAttDataInfOrSupThanBetweenDatesClass
+	 * 
+	 * @param name
+	 *            command name
+	 * @param in
+	 *            argin type
+	 * @param in_comments
+	 *            argin description
+	 * @param out
+	 *            argout type
+	 * @param out_comments
+	 *            argout description
+	 * @param level
+	 *            The command display type OPERATOR or EXPERT
+	 */
+	// ===============================================================
+	public GetAttDataInfOrSupThanBetweenDatesClass(final String name, final int in, final int out, final String in_comments, final String out_comments, final DispLevel level) {
+		super(name, in, out, in_comments, out_comments, level);
+	}
+
+	// ===============================================================
+	/**
+	 * return the result of the device's command.
+	 */
+	// ===============================================================
+	@Override
+	public Any execute(final DeviceImpl device, final Any in_any) throws DevFailed {
+		Util.out2.println("GetAttDataInfOrSupThanBetweenDatesClass.execute(): arrived");
+		final String[] argin = extract_DevVarStringArray(in_any);
+		if (!(device instanceof TdbExtractor)) {
+			Except.throw_exception("DEVICE_ERROR", "Device parameter is not instance of TdbExtractor", "TdbExtractor");
+		}
+
+		return insert(((TdbExtractor) device).get_att_data_inf_or_sup_than_between_dates(argin));
+	}
+
+	// ===============================================================
+	/**
+	 * Check if it is allowed to execute the command.
+	 */
+	// ===============================================================
+	@Override
+	public boolean is_allowed(final DeviceImpl device, final Any data_in) {
+		// End of Generated Code
+
+		// Re-Start of Generated Code
+		return true;
+	}
+}
+
+// -----------------------------------------------------------------------------
+/*
+ * end of $Source:
+ * /cvsroot/tango-cs/archiving/server/hdbtdbArchivingServers/src/
+ * main/java/TdbExtractor/GetAttDataInfOrSupThanBetweenDatesClass.java,v $
+ */
diff --git a/src/main/java/TdbExtractor/GetAttDataInfOrSupThanBetweenDatesCountClass.java b/tdbextractor/src/main/java/TdbExtractor/GetAttDataInfOrSupThanBetweenDatesCountClass.java
similarity index 94%
rename from src/main/java/TdbExtractor/GetAttDataInfOrSupThanBetweenDatesCountClass.java
rename to tdbextractor/src/main/java/TdbExtractor/GetAttDataInfOrSupThanBetweenDatesCountClass.java
index be052dbb8ffbf01d342fbd93e55b832351a69d1f..cb5095f3266524b0367e28be6f32303001164ae6 100644
--- a/src/main/java/TdbExtractor/GetAttDataInfOrSupThanBetweenDatesCountClass.java
+++ b/tdbextractor/src/main/java/TdbExtractor/GetAttDataInfOrSupThanBetweenDatesCountClass.java
@@ -1,165 +1,165 @@
-//+======================================================================
-// $Source$
-//
-// Project:      Tango Device Server
-//
-// Description:  Java source code for the command TemplateClass of the
-//               TdbExtractor class.
-//
-// $Author$
-//
-// $Revision$
-//
-// $Log$
-// Revision 1.3  2010/11/22 08:09:15  abeilleg
-// remove critical of findbugs
-//
-// Revision 1.2  2009/12/17 12:47:15  pierrejoseph
-// CheckStyle:  Organize imports / Format
-//
-// Revision 1.1  2008/02/28 15:37:14  pierrejoseph
-// TdbExtractor has been forgotten
-//
-// Revision 1.3  2005/11/29 16:13:31  chinkumo
-// Code reformated (pogo compatible)
-//
-// Revision 1.2  2005/11/15 13:45:16  chinkumo
-// ...
-//
-// Revision 1.1  2005/09/09 10:03:41  chinkumo
-// First commit !
-// (Dynamic attribut release)
-//
-//
-// copyleft :    European Synchrotron Radiation Facility
-//               BP 220, Grenoble 38043
-//               FRANCE
-//
-//-======================================================================
-//
-//  		This file is generated by POGO
-//	(Program Obviously used to Generate tango Object)
-//
-//         (c) - Software Engineering Group - ESRF
-//=============================================================================
-
-/**
- * @author	$Author$
- * @version	$Revision$
- */
-package TdbExtractor;
-
-import org.omg.CORBA.Any;
-
-import fr.esrf.Tango.DevFailed;
-import fr.esrf.Tango.DispLevel;
-import fr.esrf.TangoDs.Command;
-import fr.esrf.TangoDs.DeviceImpl;
-import fr.esrf.TangoDs.Except;
-import fr.esrf.TangoDs.TangoConst;
-import fr.esrf.TangoDs.Util;
-
-/**
- * Class Description: Returns the number of data beetwen two dates (date_1 &
- * date_2). Data are lower than the given value x OR higher than the given value
- * y.
- */
-
-public class GetAttDataInfOrSupThanBetweenDatesCountClass extends Command implements TangoConst {
-	// ===============================================================
-	/**
-	 * Constructor for Command class
-	 * GetAttDataInfOrSupThanBetweenDatesCountClass
-	 * 
-	 * @param name
-	 *            command name
-	 * @param in
-	 *            argin type
-	 * @param out
-	 *            argout type
-	 */
-	// ===============================================================
-	public GetAttDataInfOrSupThanBetweenDatesCountClass(final String name, final int in, final int out) {
-		super(name, in, out);
-	}
-
-	// ===============================================================
-	/**
-	 * Constructor for Command class
-	 * GetAttDataInfOrSupThanBetweenDatesCountClass
-	 * 
-	 * @param name
-	 *            command name
-	 * @param in
-	 *            argin type
-	 * @param in_comments
-	 *            argin description
-	 * @param out
-	 *            argout type
-	 * @param out_comments
-	 *            argout description
-	 */
-	// ===============================================================
-	public GetAttDataInfOrSupThanBetweenDatesCountClass(final String name, final int in, final int out, final String in_comments, final String out_comments) {
-		super(name, in, out, in_comments, out_comments);
-	}
-
-	// ===============================================================
-	/**
-	 * Constructor for Command class
-	 * GetAttDataInfOrSupThanBetweenDatesCountClass
-	 * 
-	 * @param name
-	 *            command name
-	 * @param in
-	 *            argin type
-	 * @param in_comments
-	 *            argin description
-	 * @param out
-	 *            argout type
-	 * @param out_comments
-	 *            argout description
-	 * @param level
-	 *            The command display type OPERATOR or EXPERT
-	 */
-	// ===============================================================
-	public GetAttDataInfOrSupThanBetweenDatesCountClass(final String name, final int in, final int out, final String in_comments, final String out_comments, final DispLevel level) {
-		super(name, in, out, in_comments, out_comments, level);
-	}
-
-	// ===============================================================
-	/**
-	 * return the result of the device's command.
-	 */
-	// ===============================================================
-	@Override
-	public Any execute(final DeviceImpl device, final Any in_any) throws DevFailed {
-		Util.out2.println("GetAttDataInfOrSupThanBetweenDatesCountClass.execute(): arrived");
-		final String[] argin = extract_DevVarStringArray(in_any);
-		if (!(device instanceof TdbExtractor)) {
-			Except.throw_exception("DEVICE_ERROR", "Device parameter is not instance of TdbExtractor", "TdbExtractor");
-		}
-
-		return insert(((TdbExtractor) device).get_att_data_inf_or_sup_than_between_dates_count(argin));
-	}
-
-	// ===============================================================
-	/**
-	 * Check if it is allowed to execute the command.
-	 */
-	// ===============================================================
-	@Override
-	public boolean is_allowed(final DeviceImpl device, final Any data_in) {
-		// End of Generated Code
-
-		// Re-Start of Generated Code
-		return true;
-	}
-}
-
-// -----------------------------------------------------------------------------
-/*
- * end of $Source:
- * /cvsroot/tango-cs/archiving/server/hdbtdbArchivingServers/src/
- * main/java/TdbExtractor/GetAttDataInfOrSupThanBetweenDatesCountClass.java,v $
- */
+//+======================================================================
+// $Source$
+//
+// Project:      Tango Device Server
+//
+// Description:  Java source code for the command TemplateClass of the
+//               TdbExtractor class.
+//
+// $Author: gramer $
+//
+// $Revision: 15443 $
+//
+// $Log$
+// Revision 1.3  2010/11/22 08:09:15  abeilleg
+// remove critical of findbugs
+//
+// Revision 1.2  2009/12/17 12:47:15  pierrejoseph
+// CheckStyle:  Organize imports / Format
+//
+// Revision 1.1  2008/02/28 15:37:14  pierrejoseph
+// TdbExtractor has been forgotten
+//
+// Revision 1.3  2005/11/29 16:13:31  chinkumo
+// Code reformated (pogo compatible)
+//
+// Revision 1.2  2005/11/15 13:45:16  chinkumo
+// ...
+//
+// Revision 1.1  2005/09/09 10:03:41  chinkumo
+// First commit !
+// (Dynamic attribut release)
+//
+//
+// copyleft :    European Synchrotron Radiation Facility
+//               BP 220, Grenoble 38043
+//               FRANCE
+//
+//-======================================================================
+//
+//  		This file is generated by POGO
+//	(Program Obviously used to Generate tango Object)
+//
+//         (c) - Software Engineering Group - ESRF
+//=============================================================================
+
+/**
+ * @author	$Author: gramer $
+ * @version	$Revision: 15443 $
+ */
+package TdbExtractor;
+
+import org.omg.CORBA.Any;
+
+import fr.esrf.Tango.DevFailed;
+import fr.esrf.Tango.DispLevel;
+import fr.esrf.TangoDs.Command;
+import fr.esrf.TangoDs.DeviceImpl;
+import fr.esrf.TangoDs.Except;
+import fr.esrf.TangoDs.TangoConst;
+import fr.esrf.TangoDs.Util;
+
+/**
+ * Class Description: Returns the number of data beetwen two dates (date_1 &
+ * date_2). Data are lower than the given value x OR higher than the given value
+ * y.
+ */
+
+public class GetAttDataInfOrSupThanBetweenDatesCountClass extends Command implements TangoConst {
+	// ===============================================================
+	/**
+	 * Constructor for Command class
+	 * GetAttDataInfOrSupThanBetweenDatesCountClass
+	 * 
+	 * @param name
+	 *            command name
+	 * @param in
+	 *            argin type
+	 * @param out
+	 *            argout type
+	 */
+	// ===============================================================
+	public GetAttDataInfOrSupThanBetweenDatesCountClass(final String name, final int in, final int out) {
+		super(name, in, out);
+	}
+
+	// ===============================================================
+	/**
+	 * Constructor for Command class
+	 * GetAttDataInfOrSupThanBetweenDatesCountClass
+	 * 
+	 * @param name
+	 *            command name
+	 * @param in
+	 *            argin type
+	 * @param in_comments
+	 *            argin description
+	 * @param out
+	 *            argout type
+	 * @param out_comments
+	 *            argout description
+	 */
+	// ===============================================================
+	public GetAttDataInfOrSupThanBetweenDatesCountClass(final String name, final int in, final int out, final String in_comments, final String out_comments) {
+		super(name, in, out, in_comments, out_comments);
+	}
+
+	// ===============================================================
+	/**
+	 * Constructor for Command class
+	 * GetAttDataInfOrSupThanBetweenDatesCountClass
+	 * 
+	 * @param name
+	 *            command name
+	 * @param in
+	 *            argin type
+	 * @param in_comments
+	 *            argin description
+	 * @param out
+	 *            argout type
+	 * @param out_comments
+	 *            argout description
+	 * @param level
+	 *            The command display type OPERATOR or EXPERT
+	 */
+	// ===============================================================
+	public GetAttDataInfOrSupThanBetweenDatesCountClass(final String name, final int in, final int out, final String in_comments, final String out_comments, final DispLevel level) {
+		super(name, in, out, in_comments, out_comments, level);
+	}
+
+	// ===============================================================
+	/**
+	 * return the result of the device's command.
+	 */
+	// ===============================================================
+	@Override
+	public Any execute(final DeviceImpl device, final Any in_any) throws DevFailed {
+		Util.out2.println("GetAttDataInfOrSupThanBetweenDatesCountClass.execute(): arrived");
+		final String[] argin = extract_DevVarStringArray(in_any);
+		if (!(device instanceof TdbExtractor)) {
+			Except.throw_exception("DEVICE_ERROR", "Device parameter is not instance of TdbExtractor", "TdbExtractor");
+		}
+
+		return insert(((TdbExtractor) device).get_att_data_inf_or_sup_than_between_dates_count(argin));
+	}
+
+	// ===============================================================
+	/**
+	 * Check if it is allowed to execute the command.
+	 */
+	// ===============================================================
+	@Override
+	public boolean is_allowed(final DeviceImpl device, final Any data_in) {
+		// End of Generated Code
+
+		// Re-Start of Generated Code
+		return true;
+	}
+}
+
+// -----------------------------------------------------------------------------
+/*
+ * end of $Source:
+ * /cvsroot/tango-cs/archiving/server/hdbtdbArchivingServers/src/
+ * main/java/TdbExtractor/GetAttDataInfOrSupThanBetweenDatesCountClass.java,v $
+ */
diff --git a/src/main/java/TdbExtractor/GetAttDataInfOrSupThanClass.java b/tdbextractor/src/main/java/TdbExtractor/GetAttDataInfOrSupThanClass.java
similarity index 94%
rename from src/main/java/TdbExtractor/GetAttDataInfOrSupThanClass.java
rename to tdbextractor/src/main/java/TdbExtractor/GetAttDataInfOrSupThanClass.java
index 68f365da80c98cf3378819fcd5976270bca960bd..08774d013abe9eddaba55fd426b81bbda35a1d48 100644
--- a/src/main/java/TdbExtractor/GetAttDataInfOrSupThanClass.java
+++ b/tdbextractor/src/main/java/TdbExtractor/GetAttDataInfOrSupThanClass.java
@@ -1,164 +1,164 @@
-//+======================================================================
-// $Source$
-//
-// Project:      Tango Device Server
-//
-// Description:  Java source code for the command TemplateClass of the
-//               TdbExtractor class.
-//
-// $Author$
-//
-// $Revision$
-//
-// $Log$
-// Revision 1.3  2010/11/22 08:09:15  abeilleg
-// remove critical of findbugs
-//
-// Revision 1.2  2009/12/17 12:47:15  pierrejoseph
-// CheckStyle:  Organize imports / Format
-//
-// Revision 1.1  2008/02/28 15:37:14  pierrejoseph
-// TdbExtractor has been forgotten
-//
-// Revision 1.3  2005/11/29 16:13:31  chinkumo
-// Code reformated (pogo compatible)
-//
-// Revision 1.2  2005/11/15 13:45:16  chinkumo
-// ...
-//
-// Revision 1.1  2005/09/09 10:03:41  chinkumo
-// First commit !
-// (Dynamic attribut release)
-//
-//
-// copyleft :    European Synchrotron Radiation Facility
-//               BP 220, Grenoble 38043
-//               FRANCE
-//
-//-======================================================================
-//
-//  		This file is generated by POGO
-//	(Program Obviously used to Generate tango Object)
-//
-//         (c) - Software Engineering Group - ESRF
-//=============================================================================
-
-/**
- * @author	$Author$
- * @version	$Revision$
- */
-package TdbExtractor;
-
-import org.omg.CORBA.Any;
-
-import fr.esrf.Tango.DevFailed;
-import fr.esrf.Tango.DispLevel;
-import fr.esrf.TangoDs.Command;
-import fr.esrf.TangoDs.DeviceImpl;
-import fr.esrf.TangoDs.Except;
-import fr.esrf.TangoDs.TangoConst;
-import fr.esrf.TangoDs.Util;
-
-/**
- * Class Description: Retrieves all data that are lower than the given value x
- * OR higher than the given value y. Create a dynamic attribute, retrieve the
- * corresponding data from database and prepare result for attribute_history
- * call.
- */
-
-public class GetAttDataInfOrSupThanClass extends Command implements TangoConst {
-	// ===============================================================
-	/**
-	 * Constructor for Command class GetAttDataInfOrSupThanClass
-	 * 
-	 * @param name
-	 *            command name
-	 * @param in
-	 *            argin type
-	 * @param out
-	 *            argout type
-	 */
-	// ===============================================================
-	public GetAttDataInfOrSupThanClass(final String name, final int in, final int out) {
-		super(name, in, out);
-	}
-
-	// ===============================================================
-	/**
-	 * Constructor for Command class GetAttDataInfOrSupThanClass
-	 * 
-	 * @param name
-	 *            command name
-	 * @param in
-	 *            argin type
-	 * @param in_comments
-	 *            argin description
-	 * @param out
-	 *            argout type
-	 * @param out_comments
-	 *            argout description
-	 */
-	// ===============================================================
-	public GetAttDataInfOrSupThanClass(final String name, final int in, final int out, final String in_comments, final String out_comments) {
-		super(name, in, out, in_comments, out_comments);
-	}
-
-	// ===============================================================
-	/**
-	 * Constructor for Command class GetAttDataInfOrSupThanClass
-	 * 
-	 * @param name
-	 *            command name
-	 * @param in
-	 *            argin type
-	 * @param in_comments
-	 *            argin description
-	 * @param out
-	 *            argout type
-	 * @param out_comments
-	 *            argout description
-	 * @param level
-	 *            The command display type OPERATOR or EXPERT
-	 */
-	// ===============================================================
-	public GetAttDataInfOrSupThanClass(final String name, final int in, final int out, final String in_comments, final String out_comments, final DispLevel level) {
-		super(name, in, out, in_comments, out_comments, level);
-	}
-
-	// ===============================================================
-	/**
-	 * return the result of the device's command.
-	 */
-	// ===============================================================
-	@Override
-	public Any execute(final DeviceImpl device, final Any in_any) throws DevFailed {
-		Util.out2.println("GetAttDataInfOrSupThanClass.execute(): arrived");
-		final String[] argin = extract_DevVarStringArray(in_any);
-
-		if (!(device instanceof TdbExtractor)) {
-			Except.throw_exception("DEVICE_ERROR", "Device parameter is not instance of TdbExtractor", "TdbExtractor");
-		}
-
-		return insert(((TdbExtractor) device).get_att_data_inf_or_sup_than(argin));
-	}
-
-	// ===============================================================
-	/**
-	 * Check if it is allowed to execute the command.
-	 */
-	// ===============================================================
-	@Override
-	public boolean is_allowed(final DeviceImpl device, final Any data_in) {
-		// End of Generated Code
-
-		// Re-Start of Generated Code
-		return true;
-	}
-}
-
-// -----------------------------------------------------------------------------
-/*
- * end of $Source:
- * /cvsroot/tango-cs/archiving/server/hdbtdbArchivingServers/src/
- * main/java/TdbExtractor/GetAttDataInfOrSupThanClass.java,v $
- */
+//+======================================================================
+// $Source$
+//
+// Project:      Tango Device Server
+//
+// Description:  Java source code for the command TemplateClass of the
+//               TdbExtractor class.
+//
+// $Author: gramer $
+//
+// $Revision: 15443 $
+//
+// $Log$
+// Revision 1.3  2010/11/22 08:09:15  abeilleg
+// remove critical of findbugs
+//
+// Revision 1.2  2009/12/17 12:47:15  pierrejoseph
+// CheckStyle:  Organize imports / Format
+//
+// Revision 1.1  2008/02/28 15:37:14  pierrejoseph
+// TdbExtractor has been forgotten
+//
+// Revision 1.3  2005/11/29 16:13:31  chinkumo
+// Code reformated (pogo compatible)
+//
+// Revision 1.2  2005/11/15 13:45:16  chinkumo
+// ...
+//
+// Revision 1.1  2005/09/09 10:03:41  chinkumo
+// First commit !
+// (Dynamic attribut release)
+//
+//
+// copyleft :    European Synchrotron Radiation Facility
+//               BP 220, Grenoble 38043
+//               FRANCE
+//
+//-======================================================================
+//
+//  		This file is generated by POGO
+//	(Program Obviously used to Generate tango Object)
+//
+//         (c) - Software Engineering Group - ESRF
+//=============================================================================
+
+/**
+ * @author	$Author: gramer $
+ * @version	$Revision: 15443 $
+ */
+package TdbExtractor;
+
+import org.omg.CORBA.Any;
+
+import fr.esrf.Tango.DevFailed;
+import fr.esrf.Tango.DispLevel;
+import fr.esrf.TangoDs.Command;
+import fr.esrf.TangoDs.DeviceImpl;
+import fr.esrf.TangoDs.Except;
+import fr.esrf.TangoDs.TangoConst;
+import fr.esrf.TangoDs.Util;
+
+/**
+ * Class Description: Retrieves all data that are lower than the given value x
+ * OR higher than the given value y. Create a dynamic attribute, retrieve the
+ * corresponding data from database and prepare result for attribute_history
+ * call.
+ */
+
+public class GetAttDataInfOrSupThanClass extends Command implements TangoConst {
+	// ===============================================================
+	/**
+	 * Constructor for Command class GetAttDataInfOrSupThanClass
+	 * 
+	 * @param name
+	 *            command name
+	 * @param in
+	 *            argin type
+	 * @param out
+	 *            argout type
+	 */
+	// ===============================================================
+	public GetAttDataInfOrSupThanClass(final String name, final int in, final int out) {
+		super(name, in, out);
+	}
+
+	// ===============================================================
+	/**
+	 * Constructor for Command class GetAttDataInfOrSupThanClass
+	 * 
+	 * @param name
+	 *            command name
+	 * @param in
+	 *            argin type
+	 * @param in_comments
+	 *            argin description
+	 * @param out
+	 *            argout type
+	 * @param out_comments
+	 *            argout description
+	 */
+	// ===============================================================
+	public GetAttDataInfOrSupThanClass(final String name, final int in, final int out, final String in_comments, final String out_comments) {
+		super(name, in, out, in_comments, out_comments);
+	}
+
+	// ===============================================================
+	/**
+	 * Constructor for Command class GetAttDataInfOrSupThanClass
+	 * 
+	 * @param name
+	 *            command name
+	 * @param in
+	 *            argin type
+	 * @param in_comments
+	 *            argin description
+	 * @param out
+	 *            argout type
+	 * @param out_comments
+	 *            argout description
+	 * @param level
+	 *            The command display type OPERATOR or EXPERT
+	 */
+	// ===============================================================
+	public GetAttDataInfOrSupThanClass(final String name, final int in, final int out, final String in_comments, final String out_comments, final DispLevel level) {
+		super(name, in, out, in_comments, out_comments, level);
+	}
+
+	// ===============================================================
+	/**
+	 * return the result of the device's command.
+	 */
+	// ===============================================================
+	@Override
+	public Any execute(final DeviceImpl device, final Any in_any) throws DevFailed {
+		Util.out2.println("GetAttDataInfOrSupThanClass.execute(): arrived");
+		final String[] argin = extract_DevVarStringArray(in_any);
+
+		if (!(device instanceof TdbExtractor)) {
+			Except.throw_exception("DEVICE_ERROR", "Device parameter is not instance of TdbExtractor", "TdbExtractor");
+		}
+
+		return insert(((TdbExtractor) device).get_att_data_inf_or_sup_than(argin));
+	}
+
+	// ===============================================================
+	/**
+	 * Check if it is allowed to execute the command.
+	 */
+	// ===============================================================
+	@Override
+	public boolean is_allowed(final DeviceImpl device, final Any data_in) {
+		// End of Generated Code
+
+		// Re-Start of Generated Code
+		return true;
+	}
+}
+
+// -----------------------------------------------------------------------------
+/*
+ * end of $Source:
+ * /cvsroot/tango-cs/archiving/server/hdbtdbArchivingServers/src/
+ * main/java/TdbExtractor/GetAttDataInfOrSupThanClass.java,v $
+ */
diff --git a/src/main/java/TdbExtractor/GetAttDataInfOrSupThanCountClass.java b/tdbextractor/src/main/java/TdbExtractor/GetAttDataInfOrSupThanCountClass.java
similarity index 94%
rename from src/main/java/TdbExtractor/GetAttDataInfOrSupThanCountClass.java
rename to tdbextractor/src/main/java/TdbExtractor/GetAttDataInfOrSupThanCountClass.java
index 6c50d5a931e313458edc33fd0468767761094202..995ca7d92277eed67b6029a0fa69f3b6f1569423 100644
--- a/src/main/java/TdbExtractor/GetAttDataInfOrSupThanCountClass.java
+++ b/tdbextractor/src/main/java/TdbExtractor/GetAttDataInfOrSupThanCountClass.java
@@ -1,162 +1,162 @@
-//+======================================================================
-// $Source$
-//
-// Project:      Tango Device Server
-//
-// Description:  Java source code for the command TemplateClass of the
-//               TdbExtractor class.
-//
-// $Author$
-//
-// $Revision$
-//
-// $Log$
-// Revision 1.3  2010/11/22 08:09:14  abeilleg
-// remove critical of findbugs
-//
-// Revision 1.2  2009/12/17 12:47:15  pierrejoseph
-// CheckStyle:  Organize imports / Format
-//
-// Revision 1.1  2008/02/28 15:37:15  pierrejoseph
-// TdbExtractor has been forgotten
-//
-// Revision 1.3  2005/11/29 16:13:31  chinkumo
-// Code reformated (pogo compatible)
-//
-// Revision 1.2  2005/11/15 13:45:16  chinkumo
-// ...
-//
-// Revision 1.1  2005/09/09 10:03:41  chinkumo
-// First commit !
-// (Dynamic attribut release)
-//
-//
-// copyleft :    European Synchrotron Radiation Facility
-//               BP 220, Grenoble 38043
-//               FRANCE
-//
-//-======================================================================
-//
-//  		This file is generated by POGO
-//	(Program Obviously used to Generate tango Object)
-//
-//         (c) - Software Engineering Group - ESRF
-//=============================================================================
-
-/**
- * @author	$Author$
- * @version	$Revision$
- */
-package TdbExtractor;
-
-import org.omg.CORBA.Any;
-
-import fr.esrf.Tango.DevFailed;
-import fr.esrf.Tango.DispLevel;
-import fr.esrf.TangoDs.Command;
-import fr.esrf.TangoDs.DeviceImpl;
-import fr.esrf.TangoDs.Except;
-import fr.esrf.TangoDs.TangoConst;
-import fr.esrf.TangoDs.Util;
-
-/**
- * Class Description: Returns the number of data lower than the given value x OR
- * higher than the given value y.
- */
-
-public class GetAttDataInfOrSupThanCountClass extends Command implements TangoConst {
-	// ===============================================================
-	/**
-	 * Constructor for Command class GetAttDataInfOrSupThanCountClass
-	 * 
-	 * @param name
-	 *            command name
-	 * @param in
-	 *            argin type
-	 * @param out
-	 *            argout type
-	 */
-	// ===============================================================
-	public GetAttDataInfOrSupThanCountClass(final String name, final int in, final int out) {
-		super(name, in, out);
-	}
-
-	// ===============================================================
-	/**
-	 * Constructor for Command class GetAttDataInfOrSupThanCountClass
-	 * 
-	 * @param name
-	 *            command name
-	 * @param in
-	 *            argin type
-	 * @param in_comments
-	 *            argin description
-	 * @param out
-	 *            argout type
-	 * @param out_comments
-	 *            argout description
-	 */
-	// ===============================================================
-	public GetAttDataInfOrSupThanCountClass(final String name, final int in, final int out, final String in_comments, final String out_comments) {
-		super(name, in, out, in_comments, out_comments);
-	}
-
-	// ===============================================================
-	/**
-	 * Constructor for Command class GetAttDataInfOrSupThanCountClass
-	 * 
-	 * @param name
-	 *            command name
-	 * @param in
-	 *            argin type
-	 * @param in_comments
-	 *            argin description
-	 * @param out
-	 *            argout type
-	 * @param out_comments
-	 *            argout description
-	 * @param level
-	 *            The command display type OPERATOR or EXPERT
-	 */
-	// ===============================================================
-	public GetAttDataInfOrSupThanCountClass(final String name, final int in, final int out, final String in_comments, final String out_comments, final DispLevel level) {
-		super(name, in, out, in_comments, out_comments, level);
-	}
-
-	// ===============================================================
-	/**
-	 * return the result of the device's command.
-	 */
-	// ===============================================================
-	@Override
-	public Any execute(final DeviceImpl device, final Any in_any) throws DevFailed {
-		Util.out2.println("GetAttDataInfOrSupThanCountClass.execute(): arrived");
-		final String[] argin = extract_DevVarStringArray(in_any);
-
-		if (!(device instanceof TdbExtractor)) {
-			Except.throw_exception("DEVICE_ERROR", "Device parameter is not instance of TdbExtractor", "TdbExtractor");
-		}
-
-		return insert(((TdbExtractor) device).get_att_data_inf_or_sup_than_count(argin));
-	}
-
-	// ===============================================================
-	/**
-	 * Check if it is allowed to execute the command.
-	 */
-	// ===============================================================
-	@Override
-	public boolean is_allowed(final DeviceImpl device, final Any data_in) {
-		// End of Generated Code
-
-		// Re-Start of Generated Code
-		return true;
-	}
-}
-
-// -----------------------------------------------------------------------------
-/*
- * end of $Source:
- * /cvsroot/tango-cs/archiving/server/hdbtdbArchivingServers/src/
- * main/java/TdbExtractor/GetAttDataInfOrSupThanCountClass.java,v $
- */
+//+======================================================================
+// $Source$
+//
+// Project:      Tango Device Server
+//
+// Description:  Java source code for the command TemplateClass of the
+//               TdbExtractor class.
+//
+// $Author: gramer $
+//
+// $Revision: 15443 $
+//
+// $Log$
+// Revision 1.3  2010/11/22 08:09:14  abeilleg
+// remove critical of findbugs
+//
+// Revision 1.2  2009/12/17 12:47:15  pierrejoseph
+// CheckStyle:  Organize imports / Format
+//
+// Revision 1.1  2008/02/28 15:37:15  pierrejoseph
+// TdbExtractor has been forgotten
+//
+// Revision 1.3  2005/11/29 16:13:31  chinkumo
+// Code reformated (pogo compatible)
+//
+// Revision 1.2  2005/11/15 13:45:16  chinkumo
+// ...
+//
+// Revision 1.1  2005/09/09 10:03:41  chinkumo
+// First commit !
+// (Dynamic attribut release)
+//
+//
+// copyleft :    European Synchrotron Radiation Facility
+//               BP 220, Grenoble 38043
+//               FRANCE
+//
+//-======================================================================
+//
+//  		This file is generated by POGO
+//	(Program Obviously used to Generate tango Object)
+//
+//         (c) - Software Engineering Group - ESRF
+//=============================================================================
+
+/**
+ * @author	$Author: gramer $
+ * @version	$Revision: 15443 $
+ */
+package TdbExtractor;
+
+import org.omg.CORBA.Any;
+
+import fr.esrf.Tango.DevFailed;
+import fr.esrf.Tango.DispLevel;
+import fr.esrf.TangoDs.Command;
+import fr.esrf.TangoDs.DeviceImpl;
+import fr.esrf.TangoDs.Except;
+import fr.esrf.TangoDs.TangoConst;
+import fr.esrf.TangoDs.Util;
+
+/**
+ * Class Description: Returns the number of data lower than the given value x OR
+ * higher than the given value y.
+ */
+
+public class GetAttDataInfOrSupThanCountClass extends Command implements TangoConst {
+	// ===============================================================
+	/**
+	 * Constructor for Command class GetAttDataInfOrSupThanCountClass
+	 * 
+	 * @param name
+	 *            command name
+	 * @param in
+	 *            argin type
+	 * @param out
+	 *            argout type
+	 */
+	// ===============================================================
+	public GetAttDataInfOrSupThanCountClass(final String name, final int in, final int out) {
+		super(name, in, out);
+	}
+
+	// ===============================================================
+	/**
+	 * Constructor for Command class GetAttDataInfOrSupThanCountClass
+	 * 
+	 * @param name
+	 *            command name
+	 * @param in
+	 *            argin type
+	 * @param in_comments
+	 *            argin description
+	 * @param out
+	 *            argout type
+	 * @param out_comments
+	 *            argout description
+	 */
+	// ===============================================================
+	public GetAttDataInfOrSupThanCountClass(final String name, final int in, final int out, final String in_comments, final String out_comments) {
+		super(name, in, out, in_comments, out_comments);
+	}
+
+	// ===============================================================
+	/**
+	 * Constructor for Command class GetAttDataInfOrSupThanCountClass
+	 * 
+	 * @param name
+	 *            command name
+	 * @param in
+	 *            argin type
+	 * @param in_comments
+	 *            argin description
+	 * @param out
+	 *            argout type
+	 * @param out_comments
+	 *            argout description
+	 * @param level
+	 *            The command display type OPERATOR or EXPERT
+	 */
+	// ===============================================================
+	public GetAttDataInfOrSupThanCountClass(final String name, final int in, final int out, final String in_comments, final String out_comments, final DispLevel level) {
+		super(name, in, out, in_comments, out_comments, level);
+	}
+
+	// ===============================================================
+	/**
+	 * return the result of the device's command.
+	 */
+	// ===============================================================
+	@Override
+	public Any execute(final DeviceImpl device, final Any in_any) throws DevFailed {
+		Util.out2.println("GetAttDataInfOrSupThanCountClass.execute(): arrived");
+		final String[] argin = extract_DevVarStringArray(in_any);
+
+		if (!(device instanceof TdbExtractor)) {
+			Except.throw_exception("DEVICE_ERROR", "Device parameter is not instance of TdbExtractor", "TdbExtractor");
+		}
+
+		return insert(((TdbExtractor) device).get_att_data_inf_or_sup_than_count(argin));
+	}
+
+	// ===============================================================
+	/**
+	 * Check if it is allowed to execute the command.
+	 */
+	// ===============================================================
+	@Override
+	public boolean is_allowed(final DeviceImpl device, final Any data_in) {
+		// End of Generated Code
+
+		// Re-Start of Generated Code
+		return true;
+	}
+}
+
+// -----------------------------------------------------------------------------
+/*
+ * end of $Source:
+ * /cvsroot/tango-cs/archiving/server/hdbtdbArchivingServers/src/
+ * main/java/TdbExtractor/GetAttDataInfOrSupThanCountClass.java,v $
+ */
diff --git a/src/main/java/TdbExtractor/GetAttDataInfThanBetweenDatesClass.java b/tdbextractor/src/main/java/TdbExtractor/GetAttDataInfThanBetweenDatesClass.java
similarity index 94%
rename from src/main/java/TdbExtractor/GetAttDataInfThanBetweenDatesClass.java
rename to tdbextractor/src/main/java/TdbExtractor/GetAttDataInfThanBetweenDatesClass.java
index c636cf1ac89b8fbad860a03a83afabf150ed8441..b29f928498f8c55b5ada38fdab8af52c4dcfe477 100644
--- a/src/main/java/TdbExtractor/GetAttDataInfThanBetweenDatesClass.java
+++ b/tdbextractor/src/main/java/TdbExtractor/GetAttDataInfThanBetweenDatesClass.java
@@ -1,164 +1,164 @@
-//+======================================================================
-// $Source$
-//
-// Project:      Tango Device Server
-//
-// Description:  Java source code for the command TemplateClass of the
-//               TdbExtractor class.
-//
-// $Author$
-//
-// $Revision$
-//
-// $Log$
-// Revision 1.3  2010/11/22 08:09:15  abeilleg
-// remove critical of findbugs
-//
-// Revision 1.2  2009/12/17 12:47:15  pierrejoseph
-// CheckStyle:  Organize imports / Format
-//
-// Revision 1.1  2008/02/28 15:37:14  pierrejoseph
-// TdbExtractor has been forgotten
-//
-// Revision 1.3  2005/11/29 16:13:31  chinkumo
-// Code reformated (pogo compatible)
-//
-// Revision 1.2  2005/11/15 13:45:16  chinkumo
-// ...
-//
-// Revision 1.1  2005/09/09 10:03:41  chinkumo
-// First commit !
-// (Dynamic attribut release)
-//
-//
-// copyleft :    European Synchrotron Radiation Facility
-//               BP 220, Grenoble 38043
-//               FRANCE
-//
-//-======================================================================
-//
-//  		This file is generated by POGO
-//	(Program Obviously used to Generate tango Object)
-//
-//         (c) - Software Engineering Group - ESRF
-//=============================================================================
-
-/**
- * @author	$Author$
- * @version	$Revision$
- */
-package TdbExtractor;
-
-import org.omg.CORBA.Any;
-
-import fr.esrf.Tango.DevFailed;
-import fr.esrf.Tango.DispLevel;
-import fr.esrf.TangoDs.Command;
-import fr.esrf.TangoDs.DeviceImpl;
-import fr.esrf.TangoDs.Except;
-import fr.esrf.TangoDs.TangoConst;
-import fr.esrf.TangoDs.Util;
-
-/**
- * Class Description: Retrieves data beetwen two dates (date_1 & date_2) - Data
- * are lower than the given value x. Create a dynamic attribute, retrieve the
- * corresponding data from database and prepare result for attribute_history
- * call.
- */
-
-public class GetAttDataInfThanBetweenDatesClass extends Command implements TangoConst {
-	// ===============================================================
-	/**
-	 * Constructor for Command class GetAttDataInfThanBetweenDatesClass
-	 * 
-	 * @param name
-	 *            command name
-	 * @param in
-	 *            argin type
-	 * @param out
-	 *            argout type
-	 */
-	// ===============================================================
-	public GetAttDataInfThanBetweenDatesClass(final String name, final int in, final int out) {
-		super(name, in, out);
-	}
-
-	// ===============================================================
-	/**
-	 * Constructor for Command class GetAttDataInfThanBetweenDatesClass
-	 * 
-	 * @param name
-	 *            command name
-	 * @param in
-	 *            argin type
-	 * @param in_comments
-	 *            argin description
-	 * @param out
-	 *            argout type
-	 * @param out_comments
-	 *            argout description
-	 */
-	// ===============================================================
-	public GetAttDataInfThanBetweenDatesClass(final String name, final int in, final int out, final String in_comments, final String out_comments) {
-		super(name, in, out, in_comments, out_comments);
-	}
-
-	// ===============================================================
-	/**
-	 * Constructor for Command class GetAttDataInfThanBetweenDatesClass
-	 * 
-	 * @param name
-	 *            command name
-	 * @param in
-	 *            argin type
-	 * @param in_comments
-	 *            argin description
-	 * @param out
-	 *            argout type
-	 * @param out_comments
-	 *            argout description
-	 * @param level
-	 *            The command display type OPERATOR or EXPERT
-	 */
-	// ===============================================================
-	public GetAttDataInfThanBetweenDatesClass(final String name, final int in, final int out, final String in_comments, final String out_comments, final DispLevel level) {
-		super(name, in, out, in_comments, out_comments, level);
-	}
-
-	// ===============================================================
-	/**
-	 * return the result of the device's command.
-	 */
-	// ===============================================================
-	@Override
-	public Any execute(final DeviceImpl device, final Any in_any) throws DevFailed {
-		Util.out2.println("GetAttDataInfThanBetweenDatesClass.execute(): arrived");
-		final String[] argin = extract_DevVarStringArray(in_any);
-
-		if (!(device instanceof TdbExtractor)) {
-			Except.throw_exception("DEVICE_ERROR", "Device parameter is not instance of TdbExtractor", "TdbExtractor");
-		}
-
-		return insert(((TdbExtractor) device).get_att_data_inf_than_between_dates(argin));
-	}
-
-	// ===============================================================
-	/**
-	 * Check if it is allowed to execute the command.
-	 */
-	// ===============================================================
-	@Override
-	public boolean is_allowed(final DeviceImpl device, final Any data_in) {
-		// End of Generated Code
-
-		// Re-Start of Generated Code
-		return true;
-	}
-}
-
-// -----------------------------------------------------------------------------
-/*
- * end of $Source:
- * /cvsroot/tango-cs/archiving/server/hdbtdbArchivingServers/src/
- * main/java/TdbExtractor/GetAttDataInfThanBetweenDatesClass.java,v $
- */
+//+======================================================================
+// $Source$
+//
+// Project:      Tango Device Server
+//
+// Description:  Java source code for the command TemplateClass of the
+//               TdbExtractor class.
+//
+// $Author: gramer $
+//
+// $Revision: 15443 $
+//
+// $Log$
+// Revision 1.3  2010/11/22 08:09:15  abeilleg
+// remove critical of findbugs
+//
+// Revision 1.2  2009/12/17 12:47:15  pierrejoseph
+// CheckStyle:  Organize imports / Format
+//
+// Revision 1.1  2008/02/28 15:37:14  pierrejoseph
+// TdbExtractor has been forgotten
+//
+// Revision 1.3  2005/11/29 16:13:31  chinkumo
+// Code reformated (pogo compatible)
+//
+// Revision 1.2  2005/11/15 13:45:16  chinkumo
+// ...
+//
+// Revision 1.1  2005/09/09 10:03:41  chinkumo
+// First commit !
+// (Dynamic attribut release)
+//
+//
+// copyleft :    European Synchrotron Radiation Facility
+//               BP 220, Grenoble 38043
+//               FRANCE
+//
+//-======================================================================
+//
+//  		This file is generated by POGO
+//	(Program Obviously used to Generate tango Object)
+//
+//         (c) - Software Engineering Group - ESRF
+//=============================================================================
+
+/**
+ * @author	$Author: gramer $
+ * @version	$Revision: 15443 $
+ */
+package TdbExtractor;
+
+import org.omg.CORBA.Any;
+
+import fr.esrf.Tango.DevFailed;
+import fr.esrf.Tango.DispLevel;
+import fr.esrf.TangoDs.Command;
+import fr.esrf.TangoDs.DeviceImpl;
+import fr.esrf.TangoDs.Except;
+import fr.esrf.TangoDs.TangoConst;
+import fr.esrf.TangoDs.Util;
+
+/**
+ * Class Description: Retrieves data beetwen two dates (date_1 & date_2) - Data
+ * are lower than the given value x. Create a dynamic attribute, retrieve the
+ * corresponding data from database and prepare result for attribute_history
+ * call.
+ */
+
+public class GetAttDataInfThanBetweenDatesClass extends Command implements TangoConst {
+	// ===============================================================
+	/**
+	 * Constructor for Command class GetAttDataInfThanBetweenDatesClass
+	 * 
+	 * @param name
+	 *            command name
+	 * @param in
+	 *            argin type
+	 * @param out
+	 *            argout type
+	 */
+	// ===============================================================
+	public GetAttDataInfThanBetweenDatesClass(final String name, final int in, final int out) {
+		super(name, in, out);
+	}
+
+	// ===============================================================
+	/**
+	 * Constructor for Command class GetAttDataInfThanBetweenDatesClass
+	 * 
+	 * @param name
+	 *            command name
+	 * @param in
+	 *            argin type
+	 * @param in_comments
+	 *            argin description
+	 * @param out
+	 *            argout type
+	 * @param out_comments
+	 *            argout description
+	 */
+	// ===============================================================
+	public GetAttDataInfThanBetweenDatesClass(final String name, final int in, final int out, final String in_comments, final String out_comments) {
+		super(name, in, out, in_comments, out_comments);
+	}
+
+	// ===============================================================
+	/**
+	 * Constructor for Command class GetAttDataInfThanBetweenDatesClass
+	 * 
+	 * @param name
+	 *            command name
+	 * @param in
+	 *            argin type
+	 * @param in_comments
+	 *            argin description
+	 * @param out
+	 *            argout type
+	 * @param out_comments
+	 *            argout description
+	 * @param level
+	 *            The command display type OPERATOR or EXPERT
+	 */
+	// ===============================================================
+	public GetAttDataInfThanBetweenDatesClass(final String name, final int in, final int out, final String in_comments, final String out_comments, final DispLevel level) {
+		super(name, in, out, in_comments, out_comments, level);
+	}
+
+	// ===============================================================
+	/**
+	 * return the result of the device's command.
+	 */
+	// ===============================================================
+	@Override
+	public Any execute(final DeviceImpl device, final Any in_any) throws DevFailed {
+		Util.out2.println("GetAttDataInfThanBetweenDatesClass.execute(): arrived");
+		final String[] argin = extract_DevVarStringArray(in_any);
+
+		if (!(device instanceof TdbExtractor)) {
+			Except.throw_exception("DEVICE_ERROR", "Device parameter is not instance of TdbExtractor", "TdbExtractor");
+		}
+
+		return insert(((TdbExtractor) device).get_att_data_inf_than_between_dates(argin));
+	}
+
+	// ===============================================================
+	/**
+	 * Check if it is allowed to execute the command.
+	 */
+	// ===============================================================
+	@Override
+	public boolean is_allowed(final DeviceImpl device, final Any data_in) {
+		// End of Generated Code
+
+		// Re-Start of Generated Code
+		return true;
+	}
+}
+
+// -----------------------------------------------------------------------------
+/*
+ * end of $Source:
+ * /cvsroot/tango-cs/archiving/server/hdbtdbArchivingServers/src/
+ * main/java/TdbExtractor/GetAttDataInfThanBetweenDatesClass.java,v $
+ */
diff --git a/src/main/java/TdbExtractor/GetAttDataInfThanBetweenDatesCountClass.java b/tdbextractor/src/main/java/TdbExtractor/GetAttDataInfThanBetweenDatesCountClass.java
similarity index 94%
rename from src/main/java/TdbExtractor/GetAttDataInfThanBetweenDatesCountClass.java
rename to tdbextractor/src/main/java/TdbExtractor/GetAttDataInfThanBetweenDatesCountClass.java
index b4497757423fd697ff87ee00f0b0227830623543..27e7a6292594ae7ed3c7a6e67c2d3befc852d98e 100644
--- a/src/main/java/TdbExtractor/GetAttDataInfThanBetweenDatesCountClass.java
+++ b/tdbextractor/src/main/java/TdbExtractor/GetAttDataInfThanBetweenDatesCountClass.java
@@ -1,162 +1,162 @@
-//+======================================================================
-// $Source$
-//
-// Project:      Tango Device Server
-//
-// Description:  Java source code for the command TemplateClass of the
-//               TdbExtractor class.
-//
-// $Author$
-//
-// $Revision$
-//
-// $Log$
-// Revision 1.3  2010/11/22 08:09:14  abeilleg
-// remove critical of findbugs
-//
-// Revision 1.2  2009/12/17 12:47:15  pierrejoseph
-// CheckStyle:  Organize imports / Format
-//
-// Revision 1.1  2008/02/28 15:37:14  pierrejoseph
-// TdbExtractor has been forgotten
-//
-// Revision 1.3  2005/11/29 16:13:31  chinkumo
-// Code reformated (pogo compatible)
-//
-// Revision 1.2  2005/11/15 13:45:16  chinkumo
-// ...
-//
-// Revision 1.1  2005/09/09 10:03:41  chinkumo
-// First commit !
-// (Dynamic attribut release)
-//
-//
-// copyleft :    European Synchrotron Radiation Facility
-//               BP 220, Grenoble 38043
-//               FRANCE
-//
-//-======================================================================
-//
-//  		This file is generated by POGO
-//	(Program Obviously used to Generate tango Object)
-//
-//         (c) - Software Engineering Group - ESRF
-//=============================================================================
-
-/**
- * @author	$Author$
- * @version	$Revision$
- */
-package TdbExtractor;
-
-import org.omg.CORBA.Any;
-
-import fr.esrf.Tango.DevFailed;
-import fr.esrf.Tango.DispLevel;
-import fr.esrf.TangoDs.Command;
-import fr.esrf.TangoDs.DeviceImpl;
-import fr.esrf.TangoDs.Except;
-import fr.esrf.TangoDs.TangoConst;
-import fr.esrf.TangoDs.Util;
-
-/**
- * Class Description: Returns the number data lower than the given value x, and
- * beetwen two dates (date_1 & date_2).
- */
-
-public class GetAttDataInfThanBetweenDatesCountClass extends Command implements TangoConst {
-	// ===============================================================
-	/**
-	 * Constructor for Command class GetAttDataInfThanBetweenDatesCountClass
-	 * 
-	 * @param name
-	 *            command name
-	 * @param in
-	 *            argin type
-	 * @param out
-	 *            argout type
-	 */
-	// ===============================================================
-	public GetAttDataInfThanBetweenDatesCountClass(final String name, final int in, final int out) {
-		super(name, in, out);
-	}
-
-	// ===============================================================
-	/**
-	 * Constructor for Command class GetAttDataInfThanBetweenDatesCountClass
-	 * 
-	 * @param name
-	 *            command name
-	 * @param in
-	 *            argin type
-	 * @param in_comments
-	 *            argin description
-	 * @param out
-	 *            argout type
-	 * @param out_comments
-	 *            argout description
-	 */
-	// ===============================================================
-	public GetAttDataInfThanBetweenDatesCountClass(final String name, final int in, final int out, final String in_comments, final String out_comments) {
-		super(name, in, out, in_comments, out_comments);
-	}
-
-	// ===============================================================
-	/**
-	 * Constructor for Command class GetAttDataInfThanBetweenDatesCountClass
-	 * 
-	 * @param name
-	 *            command name
-	 * @param in
-	 *            argin type
-	 * @param in_comments
-	 *            argin description
-	 * @param out
-	 *            argout type
-	 * @param out_comments
-	 *            argout description
-	 * @param level
-	 *            The command display type OPERATOR or EXPERT
-	 */
-	// ===============================================================
-	public GetAttDataInfThanBetweenDatesCountClass(final String name, final int in, final int out, final String in_comments, final String out_comments, final DispLevel level) {
-		super(name, in, out, in_comments, out_comments, level);
-	}
-
-	// ===============================================================
-	/**
-	 * return the result of the device's command.
-	 */
-	// ===============================================================
-	@Override
-	public Any execute(final DeviceImpl device, final Any in_any) throws DevFailed {
-		Util.out2.println("GetAttDataInfThanBetweenDatesCountClass.execute(): arrived");
-		final String[] argin = extract_DevVarStringArray(in_any);
-
-		if (!(device instanceof TdbExtractor)) {
-			Except.throw_exception("DEVICE_ERROR", "Device parameter is not instance of TdbExtractor", "TdbExtractor");
-		}
-
-		return insert(((TdbExtractor) device).get_att_data_inf_than_between_dates_count(argin));
-	}
-
-	// ===============================================================
-	/**
-	 * Check if it is allowed to execute the command.
-	 */
-	// ===============================================================
-	@Override
-	public boolean is_allowed(final DeviceImpl device, final Any data_in) {
-		// End of Generated Code
-
-		// Re-Start of Generated Code
-		return true;
-	}
-}
-
-// -----------------------------------------------------------------------------
-/*
- * end of $Source:
- * /cvsroot/tango-cs/archiving/server/hdbtdbArchivingServers/src/
- * main/java/TdbExtractor/GetAttDataInfThanBetweenDatesCountClass.java,v $
- */
+//+======================================================================
+// $Source$
+//
+// Project:      Tango Device Server
+//
+// Description:  Java source code for the command TemplateClass of the
+//               TdbExtractor class.
+//
+// $Author: gramer $
+//
+// $Revision: 15443 $
+//
+// $Log$
+// Revision 1.3  2010/11/22 08:09:14  abeilleg
+// remove critical of findbugs
+//
+// Revision 1.2  2009/12/17 12:47:15  pierrejoseph
+// CheckStyle:  Organize imports / Format
+//
+// Revision 1.1  2008/02/28 15:37:14  pierrejoseph
+// TdbExtractor has been forgotten
+//
+// Revision 1.3  2005/11/29 16:13:31  chinkumo
+// Code reformated (pogo compatible)
+//
+// Revision 1.2  2005/11/15 13:45:16  chinkumo
+// ...
+//
+// Revision 1.1  2005/09/09 10:03:41  chinkumo
+// First commit !
+// (Dynamic attribut release)
+//
+//
+// copyleft :    European Synchrotron Radiation Facility
+//               BP 220, Grenoble 38043
+//               FRANCE
+//
+//-======================================================================
+//
+//  		This file is generated by POGO
+//	(Program Obviously used to Generate tango Object)
+//
+//         (c) - Software Engineering Group - ESRF
+//=============================================================================
+
+/**
+ * @author	$Author: gramer $
+ * @version	$Revision: 15443 $
+ */
+package TdbExtractor;
+
+import org.omg.CORBA.Any;
+
+import fr.esrf.Tango.DevFailed;
+import fr.esrf.Tango.DispLevel;
+import fr.esrf.TangoDs.Command;
+import fr.esrf.TangoDs.DeviceImpl;
+import fr.esrf.TangoDs.Except;
+import fr.esrf.TangoDs.TangoConst;
+import fr.esrf.TangoDs.Util;
+
+/**
+ * Class Description: Returns the number data lower than the given value x, and
+ * beetwen two dates (date_1 & date_2).
+ */
+
+public class GetAttDataInfThanBetweenDatesCountClass extends Command implements TangoConst {
+	// ===============================================================
+	/**
+	 * Constructor for Command class GetAttDataInfThanBetweenDatesCountClass
+	 * 
+	 * @param name
+	 *            command name
+	 * @param in
+	 *            argin type
+	 * @param out
+	 *            argout type
+	 */
+	// ===============================================================
+	public GetAttDataInfThanBetweenDatesCountClass(final String name, final int in, final int out) {
+		super(name, in, out);
+	}
+
+	// ===============================================================
+	/**
+	 * Constructor for Command class GetAttDataInfThanBetweenDatesCountClass
+	 * 
+	 * @param name
+	 *            command name
+	 * @param in
+	 *            argin type
+	 * @param in_comments
+	 *            argin description
+	 * @param out
+	 *            argout type
+	 * @param out_comments
+	 *            argout description
+	 */
+	// ===============================================================
+	public GetAttDataInfThanBetweenDatesCountClass(final String name, final int in, final int out, final String in_comments, final String out_comments) {
+		super(name, in, out, in_comments, out_comments);
+	}
+
+	// ===============================================================
+	/**
+	 * Constructor for Command class GetAttDataInfThanBetweenDatesCountClass
+	 * 
+	 * @param name
+	 *            command name
+	 * @param in
+	 *            argin type
+	 * @param in_comments
+	 *            argin description
+	 * @param out
+	 *            argout type
+	 * @param out_comments
+	 *            argout description
+	 * @param level
+	 *            The command display type OPERATOR or EXPERT
+	 */
+	// ===============================================================
+	public GetAttDataInfThanBetweenDatesCountClass(final String name, final int in, final int out, final String in_comments, final String out_comments, final DispLevel level) {
+		super(name, in, out, in_comments, out_comments, level);
+	}
+
+	// ===============================================================
+	/**
+	 * return the result of the device's command.
+	 */
+	// ===============================================================
+	@Override
+	public Any execute(final DeviceImpl device, final Any in_any) throws DevFailed {
+		Util.out2.println("GetAttDataInfThanBetweenDatesCountClass.execute(): arrived");
+		final String[] argin = extract_DevVarStringArray(in_any);
+
+		if (!(device instanceof TdbExtractor)) {
+			Except.throw_exception("DEVICE_ERROR", "Device parameter is not instance of TdbExtractor", "TdbExtractor");
+		}
+
+		return insert(((TdbExtractor) device).get_att_data_inf_than_between_dates_count(argin));
+	}
+
+	// ===============================================================
+	/**
+	 * Check if it is allowed to execute the command.
+	 */
+	// ===============================================================
+	@Override
+	public boolean is_allowed(final DeviceImpl device, final Any data_in) {
+		// End of Generated Code
+
+		// Re-Start of Generated Code
+		return true;
+	}
+}
+
+// -----------------------------------------------------------------------------
+/*
+ * end of $Source:
+ * /cvsroot/tango-cs/archiving/server/hdbtdbArchivingServers/src/
+ * main/java/TdbExtractor/GetAttDataInfThanBetweenDatesCountClass.java,v $
+ */
diff --git a/src/main/java/TdbExtractor/GetAttDataInfThanClass.java b/tdbextractor/src/main/java/TdbExtractor/GetAttDataInfThanClass.java
similarity index 94%
rename from src/main/java/TdbExtractor/GetAttDataInfThanClass.java
rename to tdbextractor/src/main/java/TdbExtractor/GetAttDataInfThanClass.java
index ad42c7a91caddeb8041c8d280923e4c82dc9edac..ea5c2ab92068c1db52ac9a330e9f1141d0320503 100644
--- a/src/main/java/TdbExtractor/GetAttDataInfThanClass.java
+++ b/tdbextractor/src/main/java/TdbExtractor/GetAttDataInfThanClass.java
@@ -1,163 +1,163 @@
-//+======================================================================
-// $Source$
-//
-// Project:      Tango Device Server
-//
-// Description:  Java source code for the command TemplateClass of the
-//               TdbExtractor class.
-//
-// $Author$
-//
-// $Revision$
-//
-// $Log$
-// Revision 1.3  2010/11/22 08:09:15  abeilleg
-// remove critical of findbugs
-//
-// Revision 1.2  2009/12/17 12:47:15  pierrejoseph
-// CheckStyle:  Organize imports / Format
-//
-// Revision 1.1  2008/02/28 15:37:15  pierrejoseph
-// TdbExtractor has been forgotten
-//
-// Revision 1.3  2005/11/29 16:13:31  chinkumo
-// Code reformated (pogo compatible)
-//
-// Revision 1.2  2005/11/15 13:45:16  chinkumo
-// ...
-//
-// Revision 1.1  2005/09/09 10:03:41  chinkumo
-// First commit !
-// (Dynamic attribut release)
-//
-//
-// copyleft :    European Synchrotron Radiation Facility
-//               BP 220, Grenoble 38043
-//               FRANCE
-//
-//-======================================================================
-//
-//  		This file is generated by POGO
-//	(Program Obviously used to Generate tango Object)
-//
-//         (c) - Software Engineering Group - ESRF
-//=============================================================================
-
-/**
- * @author	$Author$
- * @version	$Revision$
- */
-package TdbExtractor;
-
-import org.omg.CORBA.Any;
-
-import fr.esrf.Tango.DevFailed;
-import fr.esrf.Tango.DispLevel;
-import fr.esrf.TangoDs.Command;
-import fr.esrf.TangoDs.DeviceImpl;
-import fr.esrf.TangoDs.Except;
-import fr.esrf.TangoDs.TangoConst;
-import fr.esrf.TangoDs.Util;
-
-/**
- * Class Description: Retrieves all the data that are lower than the given value
- * x. Create a dynamic attribute, retrieve the corresponding data from database
- * and prepare result for attribute_history call.
- */
-
-public class GetAttDataInfThanClass extends Command implements TangoConst {
-	// ===============================================================
-	/**
-	 * Constructor for Command class GetAttDataInfThanClass
-	 * 
-	 * @param name
-	 *            command name
-	 * @param in
-	 *            argin type
-	 * @param out
-	 *            argout type
-	 */
-	// ===============================================================
-	public GetAttDataInfThanClass(final String name, final int in, final int out) {
-		super(name, in, out);
-	}
-
-	// ===============================================================
-	/**
-	 * Constructor for Command class GetAttDataInfThanClass
-	 * 
-	 * @param name
-	 *            command name
-	 * @param in
-	 *            argin type
-	 * @param in_comments
-	 *            argin description
-	 * @param out
-	 *            argout type
-	 * @param out_comments
-	 *            argout description
-	 */
-	// ===============================================================
-	public GetAttDataInfThanClass(final String name, final int in, final int out, final String in_comments, final String out_comments) {
-		super(name, in, out, in_comments, out_comments);
-	}
-
-	// ===============================================================
-	/**
-	 * Constructor for Command class GetAttDataInfThanClass
-	 * 
-	 * @param name
-	 *            command name
-	 * @param in
-	 *            argin type
-	 * @param in_comments
-	 *            argin description
-	 * @param out
-	 *            argout type
-	 * @param out_comments
-	 *            argout description
-	 * @param level
-	 *            The command display type OPERATOR or EXPERT
-	 */
-	// ===============================================================
-	public GetAttDataInfThanClass(final String name, final int in, final int out, final String in_comments, final String out_comments, final DispLevel level) {
-		super(name, in, out, in_comments, out_comments, level);
-	}
-
-	// ===============================================================
-	/**
-	 * return the result of the device's command.
-	 */
-	// ===============================================================
-	@Override
-	public Any execute(final DeviceImpl device, final Any in_any) throws DevFailed {
-		Util.out2.println("GetAttDataInfThanClass.execute(): arrived");
-		final String[] argin = extract_DevVarStringArray(in_any);
-
-		if (!(device instanceof TdbExtractor)) {
-			Except.throw_exception("DEVICE_ERROR", "Device parameter is not instance of TdbExtractor", "TdbExtractor");
-		}
-
-		return insert(((TdbExtractor) device).get_att_data_inf_than(argin));
-	}
-
-	// ===============================================================
-	/**
-	 * Check if it is allowed to execute the command.
-	 */
-	// ===============================================================
-	@Override
-	public boolean is_allowed(final DeviceImpl device, final Any data_in) {
-		// End of Generated Code
-
-		// Re-Start of Generated Code
-		return true;
-	}
-}
-
-// -----------------------------------------------------------------------------
-/*
- * end of $Source:
- * /cvsroot/tango-cs/archiving/server/hdbtdbArchivingServers/src/
- * main/java/TdbExtractor/GetAttDataInfThanClass.java,v $
- */
+//+======================================================================
+// $Source$
+//
+// Project:      Tango Device Server
+//
+// Description:  Java source code for the command TemplateClass of the
+//               TdbExtractor class.
+//
+// $Author: gramer $
+//
+// $Revision: 15443 $
+//
+// $Log$
+// Revision 1.3  2010/11/22 08:09:15  abeilleg
+// remove critical of findbugs
+//
+// Revision 1.2  2009/12/17 12:47:15  pierrejoseph
+// CheckStyle:  Organize imports / Format
+//
+// Revision 1.1  2008/02/28 15:37:15  pierrejoseph
+// TdbExtractor has been forgotten
+//
+// Revision 1.3  2005/11/29 16:13:31  chinkumo
+// Code reformated (pogo compatible)
+//
+// Revision 1.2  2005/11/15 13:45:16  chinkumo
+// ...
+//
+// Revision 1.1  2005/09/09 10:03:41  chinkumo
+// First commit !
+// (Dynamic attribut release)
+//
+//
+// copyleft :    European Synchrotron Radiation Facility
+//               BP 220, Grenoble 38043
+//               FRANCE
+//
+//-======================================================================
+//
+//  		This file is generated by POGO
+//	(Program Obviously used to Generate tango Object)
+//
+//         (c) - Software Engineering Group - ESRF
+//=============================================================================
+
+/**
+ * @author	$Author: gramer $
+ * @version	$Revision: 15443 $
+ */
+package TdbExtractor;
+
+import org.omg.CORBA.Any;
+
+import fr.esrf.Tango.DevFailed;
+import fr.esrf.Tango.DispLevel;
+import fr.esrf.TangoDs.Command;
+import fr.esrf.TangoDs.DeviceImpl;
+import fr.esrf.TangoDs.Except;
+import fr.esrf.TangoDs.TangoConst;
+import fr.esrf.TangoDs.Util;
+
+/**
+ * Class Description: Retrieves all the data that are lower than the given value
+ * x. Create a dynamic attribute, retrieve the corresponding data from database
+ * and prepare result for attribute_history call.
+ */
+
+public class GetAttDataInfThanClass extends Command implements TangoConst {
+	// ===============================================================
+	/**
+	 * Constructor for Command class GetAttDataInfThanClass
+	 * 
+	 * @param name
+	 *            command name
+	 * @param in
+	 *            argin type
+	 * @param out
+	 *            argout type
+	 */
+	// ===============================================================
+	public GetAttDataInfThanClass(final String name, final int in, final int out) {
+		super(name, in, out);
+	}
+
+	// ===============================================================
+	/**
+	 * Constructor for Command class GetAttDataInfThanClass
+	 * 
+	 * @param name
+	 *            command name
+	 * @param in
+	 *            argin type
+	 * @param in_comments
+	 *            argin description
+	 * @param out
+	 *            argout type
+	 * @param out_comments
+	 *            argout description
+	 */
+	// ===============================================================
+	public GetAttDataInfThanClass(final String name, final int in, final int out, final String in_comments, final String out_comments) {
+		super(name, in, out, in_comments, out_comments);
+	}
+
+	// ===============================================================
+	/**
+	 * Constructor for Command class GetAttDataInfThanClass
+	 * 
+	 * @param name
+	 *            command name
+	 * @param in
+	 *            argin type
+	 * @param in_comments
+	 *            argin description
+	 * @param out
+	 *            argout type
+	 * @param out_comments
+	 *            argout description
+	 * @param level
+	 *            The command display type OPERATOR or EXPERT
+	 */
+	// ===============================================================
+	public GetAttDataInfThanClass(final String name, final int in, final int out, final String in_comments, final String out_comments, final DispLevel level) {
+		super(name, in, out, in_comments, out_comments, level);
+	}
+
+	// ===============================================================
+	/**
+	 * return the result of the device's command.
+	 */
+	// ===============================================================
+	@Override
+	public Any execute(final DeviceImpl device, final Any in_any) throws DevFailed {
+		Util.out2.println("GetAttDataInfThanClass.execute(): arrived");
+		final String[] argin = extract_DevVarStringArray(in_any);
+
+		if (!(device instanceof TdbExtractor)) {
+			Except.throw_exception("DEVICE_ERROR", "Device parameter is not instance of TdbExtractor", "TdbExtractor");
+		}
+
+		return insert(((TdbExtractor) device).get_att_data_inf_than(argin));
+	}
+
+	// ===============================================================
+	/**
+	 * Check if it is allowed to execute the command.
+	 */
+	// ===============================================================
+	@Override
+	public boolean is_allowed(final DeviceImpl device, final Any data_in) {
+		// End of Generated Code
+
+		// Re-Start of Generated Code
+		return true;
+	}
+}
+
+// -----------------------------------------------------------------------------
+/*
+ * end of $Source:
+ * /cvsroot/tango-cs/archiving/server/hdbtdbArchivingServers/src/
+ * main/java/TdbExtractor/GetAttDataInfThanClass.java,v $
+ */
diff --git a/src/main/java/TdbExtractor/GetAttDataInfThanCountClass.java b/tdbextractor/src/main/java/TdbExtractor/GetAttDataInfThanCountClass.java
similarity index 94%
rename from src/main/java/TdbExtractor/GetAttDataInfThanCountClass.java
rename to tdbextractor/src/main/java/TdbExtractor/GetAttDataInfThanCountClass.java
index 182f759f419e98c0c16806f5edc61bd7b2db2fac..96b35afc019785663bf9acdfefbe17816a4c1785 100644
--- a/src/main/java/TdbExtractor/GetAttDataInfThanCountClass.java
+++ b/tdbextractor/src/main/java/TdbExtractor/GetAttDataInfThanCountClass.java
@@ -1,161 +1,161 @@
-//+======================================================================
-// $Source$
-//
-// Project:      Tango Device Server
-//
-// Description:  Java source code for the command TemplateClass of the
-//               TdbExtractor class.
-//
-// $Author$
-//
-// $Revision$
-//
-// $Log$
-// Revision 1.3  2010/11/22 08:09:15  abeilleg
-// remove critical of findbugs
-//
-// Revision 1.2  2009/12/17 12:47:15  pierrejoseph
-// CheckStyle:  Organize imports / Format
-//
-// Revision 1.1  2008/02/28 15:37:14  pierrejoseph
-// TdbExtractor has been forgotten
-//
-// Revision 1.3  2005/11/29 16:13:31  chinkumo
-// Code reformated (pogo compatible)
-//
-// Revision 1.2  2005/11/15 13:45:16  chinkumo
-// ...
-//
-// Revision 1.1  2005/09/09 10:03:41  chinkumo
-// First commit !
-// (Dynamic attribut release)
-//
-//
-// copyleft :    European Synchrotron Radiation Facility
-//               BP 220, Grenoble 38043
-//               FRANCE
-//
-//-======================================================================
-//
-//  		This file is generated by POGO
-//	(Program Obviously used to Generate tango Object)
-//
-//         (c) - Software Engineering Group - ESRF
-//=============================================================================
-
-/**
- * @author	$Author$
- * @version	$Revision$
- */
-package TdbExtractor;
-
-import org.omg.CORBA.Any;
-
-import fr.esrf.Tango.DevFailed;
-import fr.esrf.Tango.DispLevel;
-import fr.esrf.TangoDs.Command;
-import fr.esrf.TangoDs.DeviceImpl;
-import fr.esrf.TangoDs.Except;
-import fr.esrf.TangoDs.TangoConst;
-import fr.esrf.TangoDs.Util;
-
-/**
- * Class Description: Returns the number of data lower than the given value.
- */
-
-public class GetAttDataInfThanCountClass extends Command implements TangoConst {
-	// ===============================================================
-	/**
-	 * Constructor for Command class GetAttDataInfThanCountClass
-	 * 
-	 * @param name
-	 *            command name
-	 * @param in
-	 *            argin type
-	 * @param out
-	 *            argout type
-	 */
-	// ===============================================================
-	public GetAttDataInfThanCountClass(final String name, final int in, final int out) {
-		super(name, in, out);
-	}
-
-	// ===============================================================
-	/**
-	 * Constructor for Command class GetAttDataInfThanCountClass
-	 * 
-	 * @param name
-	 *            command name
-	 * @param in
-	 *            argin type
-	 * @param in_comments
-	 *            argin description
-	 * @param out
-	 *            argout type
-	 * @param out_comments
-	 *            argout description
-	 */
-	// ===============================================================
-	public GetAttDataInfThanCountClass(final String name, final int in, final int out, final String in_comments, final String out_comments) {
-		super(name, in, out, in_comments, out_comments);
-	}
-
-	// ===============================================================
-	/**
-	 * Constructor for Command class GetAttDataInfThanCountClass
-	 * 
-	 * @param name
-	 *            command name
-	 * @param in
-	 *            argin type
-	 * @param in_comments
-	 *            argin description
-	 * @param out
-	 *            argout type
-	 * @param out_comments
-	 *            argout description
-	 * @param level
-	 *            The command display type OPERATOR or EXPERT
-	 */
-	// ===============================================================
-	public GetAttDataInfThanCountClass(final String name, final int in, final int out, final String in_comments, final String out_comments, final DispLevel level) {
-		super(name, in, out, in_comments, out_comments, level);
-	}
-
-	// ===============================================================
-	/**
-	 * return the result of the device's command.
-	 */
-	// ===============================================================
-	@Override
-	public Any execute(final DeviceImpl device, final Any in_any) throws DevFailed {
-		Util.out2.println("GetAttDataInfThanCountClass.execute(): arrived");
-		final String[] argin = extract_DevVarStringArray(in_any);
-
-		if (!(device instanceof TdbExtractor)) {
-			Except.throw_exception("DEVICE_ERROR", "Device parameter is not instance of TdbExtractor", "TdbExtractor");
-		}
-
-		return insert(((TdbExtractor) device).get_att_data_inf_than_count(argin));
-	}
-
-	// ===============================================================
-	/**
-	 * Check if it is allowed to execute the command.
-	 */
-	// ===============================================================
-	@Override
-	public boolean is_allowed(final DeviceImpl device, final Any data_in) {
-		// End of Generated Code
-
-		// Re-Start of Generated Code
-		return true;
-	}
-}
-
-// -----------------------------------------------------------------------------
-/*
- * end of $Source:
- * /cvsroot/tango-cs/archiving/server/hdbtdbArchivingServers/src/
- * main/java/TdbExtractor/GetAttDataInfThanCountClass.java,v $
- */
+//+======================================================================
+// $Source$
+//
+// Project:      Tango Device Server
+//
+// Description:  Java source code for the command TemplateClass of the
+//               TdbExtractor class.
+//
+// $Author: gramer $
+//
+// $Revision: 15443 $
+//
+// $Log$
+// Revision 1.3  2010/11/22 08:09:15  abeilleg
+// remove critical of findbugs
+//
+// Revision 1.2  2009/12/17 12:47:15  pierrejoseph
+// CheckStyle:  Organize imports / Format
+//
+// Revision 1.1  2008/02/28 15:37:14  pierrejoseph
+// TdbExtractor has been forgotten
+//
+// Revision 1.3  2005/11/29 16:13:31  chinkumo
+// Code reformated (pogo compatible)
+//
+// Revision 1.2  2005/11/15 13:45:16  chinkumo
+// ...
+//
+// Revision 1.1  2005/09/09 10:03:41  chinkumo
+// First commit !
+// (Dynamic attribut release)
+//
+//
+// copyleft :    European Synchrotron Radiation Facility
+//               BP 220, Grenoble 38043
+//               FRANCE
+//
+//-======================================================================
+//
+//  		This file is generated by POGO
+//	(Program Obviously used to Generate tango Object)
+//
+//         (c) - Software Engineering Group - ESRF
+//=============================================================================
+
+/**
+ * @author	$Author: gramer $
+ * @version	$Revision: 15443 $
+ */
+package TdbExtractor;
+
+import org.omg.CORBA.Any;
+
+import fr.esrf.Tango.DevFailed;
+import fr.esrf.Tango.DispLevel;
+import fr.esrf.TangoDs.Command;
+import fr.esrf.TangoDs.DeviceImpl;
+import fr.esrf.TangoDs.Except;
+import fr.esrf.TangoDs.TangoConst;
+import fr.esrf.TangoDs.Util;
+
+/**
+ * Class Description: Returns the number of data lower than the given value.
+ */
+
+public class GetAttDataInfThanCountClass extends Command implements TangoConst {
+	// ===============================================================
+	/**
+	 * Constructor for Command class GetAttDataInfThanCountClass
+	 * 
+	 * @param name
+	 *            command name
+	 * @param in
+	 *            argin type
+	 * @param out
+	 *            argout type
+	 */
+	// ===============================================================
+	public GetAttDataInfThanCountClass(final String name, final int in, final int out) {
+		super(name, in, out);
+	}
+
+	// ===============================================================
+	/**
+	 * Constructor for Command class GetAttDataInfThanCountClass
+	 * 
+	 * @param name
+	 *            command name
+	 * @param in
+	 *            argin type
+	 * @param in_comments
+	 *            argin description
+	 * @param out
+	 *            argout type
+	 * @param out_comments
+	 *            argout description
+	 */
+	// ===============================================================
+	public GetAttDataInfThanCountClass(final String name, final int in, final int out, final String in_comments, final String out_comments) {
+		super(name, in, out, in_comments, out_comments);
+	}
+
+	// ===============================================================
+	/**
+	 * Constructor for Command class GetAttDataInfThanCountClass
+	 * 
+	 * @param name
+	 *            command name
+	 * @param in
+	 *            argin type
+	 * @param in_comments
+	 *            argin description
+	 * @param out
+	 *            argout type
+	 * @param out_comments
+	 *            argout description
+	 * @param level
+	 *            The command display type OPERATOR or EXPERT
+	 */
+	// ===============================================================
+	public GetAttDataInfThanCountClass(final String name, final int in, final int out, final String in_comments, final String out_comments, final DispLevel level) {
+		super(name, in, out, in_comments, out_comments, level);
+	}
+
+	// ===============================================================
+	/**
+	 * return the result of the device's command.
+	 */
+	// ===============================================================
+	@Override
+	public Any execute(final DeviceImpl device, final Any in_any) throws DevFailed {
+		Util.out2.println("GetAttDataInfThanCountClass.execute(): arrived");
+		final String[] argin = extract_DevVarStringArray(in_any);
+
+		if (!(device instanceof TdbExtractor)) {
+			Except.throw_exception("DEVICE_ERROR", "Device parameter is not instance of TdbExtractor", "TdbExtractor");
+		}
+
+		return insert(((TdbExtractor) device).get_att_data_inf_than_count(argin));
+	}
+
+	// ===============================================================
+	/**
+	 * Check if it is allowed to execute the command.
+	 */
+	// ===============================================================
+	@Override
+	public boolean is_allowed(final DeviceImpl device, final Any data_in) {
+		// End of Generated Code
+
+		// Re-Start of Generated Code
+		return true;
+	}
+}
+
+// -----------------------------------------------------------------------------
+/*
+ * end of $Source:
+ * /cvsroot/tango-cs/archiving/server/hdbtdbArchivingServers/src/
+ * main/java/TdbExtractor/GetAttDataInfThanCountClass.java,v $
+ */
diff --git a/src/main/java/TdbExtractor/GetAttDataLastNClass.java b/tdbextractor/src/main/java/TdbExtractor/GetAttDataLastNClass.java
similarity index 94%
rename from src/main/java/TdbExtractor/GetAttDataLastNClass.java
rename to tdbextractor/src/main/java/TdbExtractor/GetAttDataLastNClass.java
index 482a8152e506ed3369dd54e5bab074215f8d279b..e692e318724f3eacf19516f53c9db86e138949af 100644
--- a/src/main/java/TdbExtractor/GetAttDataLastNClass.java
+++ b/tdbextractor/src/main/java/TdbExtractor/GetAttDataLastNClass.java
@@ -1,163 +1,163 @@
-//+======================================================================
-// $Source$
-//
-// Project:      Tango Device Server
-//
-// Description:  Java source code for the command TemplateClass of the
-//               TdbExtractor class.
-//
-// $Author$
-//
-// $Revision$
-//
-// $Log$
-// Revision 1.3  2010/11/22 08:09:15  abeilleg
-// remove critical of findbugs
-//
-// Revision 1.2  2009/12/17 12:47:15  pierrejoseph
-// CheckStyle:  Organize imports / Format
-//
-// Revision 1.1  2008/02/28 15:37:14  pierrejoseph
-// TdbExtractor has been forgotten
-//
-// Revision 1.3  2005/11/29 16:13:31  chinkumo
-// Code reformated (pogo compatible)
-//
-// Revision 1.2  2005/11/15 13:45:16  chinkumo
-// ...
-//
-// Revision 1.1  2005/09/09 10:03:41  chinkumo
-// First commit !
-// (Dynamic attribut release)
-//
-//
-// copyleft :    European Synchrotron Radiation Facility
-//               BP 220, Grenoble 38043
-//               FRANCE
-//
-//-======================================================================
-//
-//  		This file is generated by POGO
-//	(Program Obviously used to Generate tango Object)
-//
-//         (c) - Software Engineering Group - ESRF
-//=============================================================================
-
-/**
- * @author	$Author$
- * @version	$Revision$
- */
-package TdbExtractor;
-
-import org.omg.CORBA.Any;
-
-import fr.esrf.Tango.DevFailed;
-import fr.esrf.Tango.DispLevel;
-import fr.esrf.TangoDs.Command;
-import fr.esrf.TangoDs.DeviceImpl;
-import fr.esrf.TangoDs.Except;
-import fr.esrf.TangoDs.TangoConst;
-import fr.esrf.TangoDs.Util;
-
-/**
- * Class Description: Retrieves the last n archived data, for a given scalar
- * attribute. Create a dynamic attribute, retrieve the corresponding data from
- * database and prepare result for attribute_history call.
- */
-
-public class GetAttDataLastNClass extends Command implements TangoConst {
-	// ===============================================================
-	/**
-	 * Constructor for Command class GetAttDataLastNClass
-	 * 
-	 * @param name
-	 *            command name
-	 * @param in
-	 *            argin type
-	 * @param out
-	 *            argout type
-	 */
-	// ===============================================================
-	public GetAttDataLastNClass(final String name, final int in, final int out) {
-		super(name, in, out);
-	}
-
-	// ===============================================================
-	/**
-	 * Constructor for Command class GetAttDataLastNClass
-	 * 
-	 * @param name
-	 *            command name
-	 * @param in
-	 *            argin type
-	 * @param in_comments
-	 *            argin description
-	 * @param out
-	 *            argout type
-	 * @param out_comments
-	 *            argout description
-	 */
-	// ===============================================================
-	public GetAttDataLastNClass(final String name, final int in, final int out, final String in_comments, final String out_comments) {
-		super(name, in, out, in_comments, out_comments);
-	}
-
-	// ===============================================================
-	/**
-	 * Constructor for Command class GetAttDataLastNClass
-	 * 
-	 * @param name
-	 *            command name
-	 * @param in
-	 *            argin type
-	 * @param in_comments
-	 *            argin description
-	 * @param out
-	 *            argout type
-	 * @param out_comments
-	 *            argout description
-	 * @param level
-	 *            The command display type OPERATOR or EXPERT
-	 */
-	// ===============================================================
-	public GetAttDataLastNClass(final String name, final int in, final int out, final String in_comments, final String out_comments, final DispLevel level) {
-		super(name, in, out, in_comments, out_comments, level);
-	}
-
-	// ===============================================================
-	/**
-	 * return the result of the device's command.
-	 */
-	// ===============================================================
-	@Override
-	public Any execute(final DeviceImpl device, final Any in_any) throws DevFailed {
-		Util.out2.println("GetAttDataLastNClass.execute(): arrived");
-		final String[] argin = extract_DevVarStringArray(in_any);
-
-		if (!(device instanceof TdbExtractor)) {
-			Except.throw_exception("DEVICE_ERROR", "Device parameter is not instance of TdbExtractor", "TdbExtractor");
-		}
-
-		return insert(((TdbExtractor) device).get_att_data_last_n(argin));
-	}
-
-	// ===============================================================
-	/**
-	 * Check if it is allowed to execute the command.
-	 */
-	// ===============================================================
-	@Override
-	public boolean is_allowed(final DeviceImpl device, final Any data_in) {
-		// End of Generated Code
-
-		// Re-Start of Generated Code
-		return true;
-	}
-}
-
-// -----------------------------------------------------------------------------
-/*
- * end of $Source:
- * /cvsroot/tango-cs/archiving/server/hdbtdbArchivingServers/src/
- * main/java/TdbExtractor/GetAttDataLastNClass.java,v $
- */
+//+======================================================================
+// $Source$
+//
+// Project:      Tango Device Server
+//
+// Description:  Java source code for the command TemplateClass of the
+//               TdbExtractor class.
+//
+// $Author: gramer $
+//
+// $Revision: 15443 $
+//
+// $Log$
+// Revision 1.3  2010/11/22 08:09:15  abeilleg
+// remove critical of findbugs
+//
+// Revision 1.2  2009/12/17 12:47:15  pierrejoseph
+// CheckStyle:  Organize imports / Format
+//
+// Revision 1.1  2008/02/28 15:37:14  pierrejoseph
+// TdbExtractor has been forgotten
+//
+// Revision 1.3  2005/11/29 16:13:31  chinkumo
+// Code reformated (pogo compatible)
+//
+// Revision 1.2  2005/11/15 13:45:16  chinkumo
+// ...
+//
+// Revision 1.1  2005/09/09 10:03:41  chinkumo
+// First commit !
+// (Dynamic attribut release)
+//
+//
+// copyleft :    European Synchrotron Radiation Facility
+//               BP 220, Grenoble 38043
+//               FRANCE
+//
+//-======================================================================
+//
+//  		This file is generated by POGO
+//	(Program Obviously used to Generate tango Object)
+//
+//         (c) - Software Engineering Group - ESRF
+//=============================================================================
+
+/**
+ * @author	$Author: gramer $
+ * @version	$Revision: 15443 $
+ */
+package TdbExtractor;
+
+import org.omg.CORBA.Any;
+
+import fr.esrf.Tango.DevFailed;
+import fr.esrf.Tango.DispLevel;
+import fr.esrf.TangoDs.Command;
+import fr.esrf.TangoDs.DeviceImpl;
+import fr.esrf.TangoDs.Except;
+import fr.esrf.TangoDs.TangoConst;
+import fr.esrf.TangoDs.Util;
+
+/**
+ * Class Description: Retrieves the last n archived data, for a given scalar
+ * attribute. Create a dynamic attribute, retrieve the corresponding data from
+ * database and prepare result for attribute_history call.
+ */
+
+public class GetAttDataLastNClass extends Command implements TangoConst {
+	// ===============================================================
+	/**
+	 * Constructor for Command class GetAttDataLastNClass
+	 * 
+	 * @param name
+	 *            command name
+	 * @param in
+	 *            argin type
+	 * @param out
+	 *            argout type
+	 */
+	// ===============================================================
+	public GetAttDataLastNClass(final String name, final int in, final int out) {
+		super(name, in, out);
+	}
+
+	// ===============================================================
+	/**
+	 * Constructor for Command class GetAttDataLastNClass
+	 * 
+	 * @param name
+	 *            command name
+	 * @param in
+	 *            argin type
+	 * @param in_comments
+	 *            argin description
+	 * @param out
+	 *            argout type
+	 * @param out_comments
+	 *            argout description
+	 */
+	// ===============================================================
+	public GetAttDataLastNClass(final String name, final int in, final int out, final String in_comments, final String out_comments) {
+		super(name, in, out, in_comments, out_comments);
+	}
+
+	// ===============================================================
+	/**
+	 * Constructor for Command class GetAttDataLastNClass
+	 * 
+	 * @param name
+	 *            command name
+	 * @param in
+	 *            argin type
+	 * @param in_comments
+	 *            argin description
+	 * @param out
+	 *            argout type
+	 * @param out_comments
+	 *            argout description
+	 * @param level
+	 *            The command display type OPERATOR or EXPERT
+	 */
+	// ===============================================================
+	public GetAttDataLastNClass(final String name, final int in, final int out, final String in_comments, final String out_comments, final DispLevel level) {
+		super(name, in, out, in_comments, out_comments, level);
+	}
+
+	// ===============================================================
+	/**
+	 * return the result of the device's command.
+	 */
+	// ===============================================================
+	@Override
+	public Any execute(final DeviceImpl device, final Any in_any) throws DevFailed {
+		Util.out2.println("GetAttDataLastNClass.execute(): arrived");
+		final String[] argin = extract_DevVarStringArray(in_any);
+
+		if (!(device instanceof TdbExtractor)) {
+			Except.throw_exception("DEVICE_ERROR", "Device parameter is not instance of TdbExtractor", "TdbExtractor");
+		}
+
+		return insert(((TdbExtractor) device).get_att_data_last_n(argin));
+	}
+
+	// ===============================================================
+	/**
+	 * Check if it is allowed to execute the command.
+	 */
+	// ===============================================================
+	@Override
+	public boolean is_allowed(final DeviceImpl device, final Any data_in) {
+		// End of Generated Code
+
+		// Re-Start of Generated Code
+		return true;
+	}
+}
+
+// -----------------------------------------------------------------------------
+/*
+ * end of $Source:
+ * /cvsroot/tango-cs/archiving/server/hdbtdbArchivingServers/src/
+ * main/java/TdbExtractor/GetAttDataLastNClass.java,v $
+ */
diff --git a/src/main/java/TdbExtractor/GetAttDataMaxBetweenDatesClass.java b/tdbextractor/src/main/java/TdbExtractor/GetAttDataMaxBetweenDatesClass.java
similarity index 94%
rename from src/main/java/TdbExtractor/GetAttDataMaxBetweenDatesClass.java
rename to tdbextractor/src/main/java/TdbExtractor/GetAttDataMaxBetweenDatesClass.java
index 8fb24debd219083f5ec22c3e63c8450207c155f9..bfcfe4ca990f51515513f61d88c9cb2cf0ab8921 100644
--- a/src/main/java/TdbExtractor/GetAttDataMaxBetweenDatesClass.java
+++ b/tdbextractor/src/main/java/TdbExtractor/GetAttDataMaxBetweenDatesClass.java
@@ -1,161 +1,161 @@
-//+======================================================================
-// $Source$
-//
-// Project:      Tango Device Server
-//
-// Description:  Java source code for the command TemplateClass of the
-//               TdbExtractor class.
-//
-// $Author$
-//
-// $Revision$
-//
-// $Log$
-// Revision 1.3  2010/11/22 08:09:15  abeilleg
-// remove critical of findbugs
-//
-// Revision 1.2  2009/12/17 12:47:15  pierrejoseph
-// CheckStyle:  Organize imports / Format
-//
-// Revision 1.1  2008/02/28 15:37:14  pierrejoseph
-// TdbExtractor has been forgotten
-//
-// Revision 1.3  2005/11/29 16:13:31  chinkumo
-// Code reformated (pogo compatible)
-//
-// Revision 1.2  2005/11/15 13:45:16  chinkumo
-// ...
-//
-// Revision 1.1  2005/09/09 10:03:41  chinkumo
-// First commit !
-// (Dynamic attribut release)
-//
-//
-// copyleft :    European Synchrotron Radiation Facility
-//               BP 220, Grenoble 38043
-//               FRANCE
-//
-//-======================================================================
-//
-//  		This file is generated by POGO
-//	(Program Obviously used to Generate tango Object)
-//
-//         (c) - Software Engineering Group - ESRF
-//=============================================================================
-
-/**
- * @author	$Author$
- * @version	$Revision$
- */
-package TdbExtractor;
-
-import org.omg.CORBA.Any;
-
-import fr.esrf.Tango.DevFailed;
-import fr.esrf.Tango.DispLevel;
-import fr.esrf.TangoDs.Command;
-import fr.esrf.TangoDs.DeviceImpl;
-import fr.esrf.TangoDs.Except;
-import fr.esrf.TangoDs.TangoConst;
-import fr.esrf.TangoDs.Util;
-
-/**
- * Class Description: Returns the biggest value generated between the two given
- * dates.
- */
-
-public class GetAttDataMaxBetweenDatesClass extends Command implements TangoConst {
-	// ===============================================================
-	/**
-	 * Constructor for Command class GetAttDataMaxBetweenDatesClass
-	 * 
-	 * @param name
-	 *            command name
-	 * @param in
-	 *            argin type
-	 * @param out
-	 *            argout type
-	 */
-	// ===============================================================
-	public GetAttDataMaxBetweenDatesClass(final String name, final int in, final int out) {
-		super(name, in, out);
-	}
-
-	// ===============================================================
-	/**
-	 * Constructor for Command class GetAttDataMaxBetweenDatesClass
-	 * 
-	 * @param name
-	 *            command name
-	 * @param in
-	 *            argin type
-	 * @param in_comments
-	 *            argin description
-	 * @param out
-	 *            argout type
-	 * @param out_comments
-	 *            argout description
-	 */
-	// ===============================================================
-	public GetAttDataMaxBetweenDatesClass(final String name, final int in, final int out, final String in_comments, final String out_comments) {
-		super(name, in, out, in_comments, out_comments);
-	}
-
-	// ===============================================================
-	/**
-	 * Constructor for Command class GetAttDataMaxBetweenDatesClass
-	 * 
-	 * @param name
-	 *            command name
-	 * @param in
-	 *            argin type
-	 * @param in_comments
-	 *            argin description
-	 * @param out
-	 *            argout type
-	 * @param out_comments
-	 *            argout description
-	 * @param level
-	 *            The command display type OPERATOR or EXPERT
-	 */
-	// ===============================================================
-	public GetAttDataMaxBetweenDatesClass(final String name, final int in, final int out, final String in_comments, final String out_comments, final DispLevel level) {
-		super(name, in, out, in_comments, out_comments, level);
-	}
-
-	// ===============================================================
-	/**
-	 * return the result of the device's command.
-	 */
-	// ===============================================================
-	@Override
-	public Any execute(final DeviceImpl device, final Any in_any) throws DevFailed {
-		Util.out2.println("GetAttDataMaxBetweenDatesClass.execute(): arrived");
-		final String[] argin = extract_DevVarStringArray(in_any);
-		if (!(device instanceof TdbExtractor)) {
-			Except.throw_exception("DEVICE_ERROR", "Device parameter is not instance of TdbExtractor", "TdbExtractor");
-		}
-
-		return insert(((TdbExtractor) device).get_att_data_max_between_dates(argin));
-	}
-
-	// ===============================================================
-	/**
-	 * Check if it is allowed to execute the command.
-	 */
-	// ===============================================================
-	@Override
-	public boolean is_allowed(final DeviceImpl device, final Any data_in) {
-		// End of Generated Code
-
-		// Re-Start of Generated Code
-		return true;
-	}
-}
-
-// -----------------------------------------------------------------------------
-/*
- * end of $Source:
- * /cvsroot/tango-cs/archiving/server/hdbtdbArchivingServers/src/
- * main/java/TdbExtractor/GetAttDataMaxBetweenDatesClass.java,v $
- */
+//+======================================================================
+// $Source$
+//
+// Project:      Tango Device Server
+//
+// Description:  Java source code for the command TemplateClass of the
+//               TdbExtractor class.
+//
+// $Author: gramer $
+//
+// $Revision: 15443 $
+//
+// $Log$
+// Revision 1.3  2010/11/22 08:09:15  abeilleg
+// remove critical of findbugs
+//
+// Revision 1.2  2009/12/17 12:47:15  pierrejoseph
+// CheckStyle:  Organize imports / Format
+//
+// Revision 1.1  2008/02/28 15:37:14  pierrejoseph
+// TdbExtractor has been forgotten
+//
+// Revision 1.3  2005/11/29 16:13:31  chinkumo
+// Code reformated (pogo compatible)
+//
+// Revision 1.2  2005/11/15 13:45:16  chinkumo
+// ...
+//
+// Revision 1.1  2005/09/09 10:03:41  chinkumo
+// First commit !
+// (Dynamic attribut release)
+//
+//
+// copyleft :    European Synchrotron Radiation Facility
+//               BP 220, Grenoble 38043
+//               FRANCE
+//
+//-======================================================================
+//
+//  		This file is generated by POGO
+//	(Program Obviously used to Generate tango Object)
+//
+//         (c) - Software Engineering Group - ESRF
+//=============================================================================
+
+/**
+ * @author	$Author: gramer $
+ * @version	$Revision: 15443 $
+ */
+package TdbExtractor;
+
+import org.omg.CORBA.Any;
+
+import fr.esrf.Tango.DevFailed;
+import fr.esrf.Tango.DispLevel;
+import fr.esrf.TangoDs.Command;
+import fr.esrf.TangoDs.DeviceImpl;
+import fr.esrf.TangoDs.Except;
+import fr.esrf.TangoDs.TangoConst;
+import fr.esrf.TangoDs.Util;
+
+/**
+ * Class Description: Returns the biggest value generated between the two given
+ * dates.
+ */
+
+public class GetAttDataMaxBetweenDatesClass extends Command implements TangoConst {
+	// ===============================================================
+	/**
+	 * Constructor for Command class GetAttDataMaxBetweenDatesClass
+	 * 
+	 * @param name
+	 *            command name
+	 * @param in
+	 *            argin type
+	 * @param out
+	 *            argout type
+	 */
+	// ===============================================================
+	public GetAttDataMaxBetweenDatesClass(final String name, final int in, final int out) {
+		super(name, in, out);
+	}
+
+	// ===============================================================
+	/**
+	 * Constructor for Command class GetAttDataMaxBetweenDatesClass
+	 * 
+	 * @param name
+	 *            command name
+	 * @param in
+	 *            argin type
+	 * @param in_comments
+	 *            argin description
+	 * @param out
+	 *            argout type
+	 * @param out_comments
+	 *            argout description
+	 */
+	// ===============================================================
+	public GetAttDataMaxBetweenDatesClass(final String name, final int in, final int out, final String in_comments, final String out_comments) {
+		super(name, in, out, in_comments, out_comments);
+	}
+
+	// ===============================================================
+	/**
+	 * Constructor for Command class GetAttDataMaxBetweenDatesClass
+	 * 
+	 * @param name
+	 *            command name
+	 * @param in
+	 *            argin type
+	 * @param in_comments
+	 *            argin description
+	 * @param out
+	 *            argout type
+	 * @param out_comments
+	 *            argout description
+	 * @param level
+	 *            The command display type OPERATOR or EXPERT
+	 */
+	// ===============================================================
+	public GetAttDataMaxBetweenDatesClass(final String name, final int in, final int out, final String in_comments, final String out_comments, final DispLevel level) {
+		super(name, in, out, in_comments, out_comments, level);
+	}
+
+	// ===============================================================
+	/**
+	 * return the result of the device's command.
+	 */
+	// ===============================================================
+	@Override
+	public Any execute(final DeviceImpl device, final Any in_any) throws DevFailed {
+		Util.out2.println("GetAttDataMaxBetweenDatesClass.execute(): arrived");
+		final String[] argin = extract_DevVarStringArray(in_any);
+		if (!(device instanceof TdbExtractor)) {
+			Except.throw_exception("DEVICE_ERROR", "Device parameter is not instance of TdbExtractor", "TdbExtractor");
+		}
+
+		return insert(((TdbExtractor) device).get_att_data_max_between_dates(argin));
+	}
+
+	// ===============================================================
+	/**
+	 * Check if it is allowed to execute the command.
+	 */
+	// ===============================================================
+	@Override
+	public boolean is_allowed(final DeviceImpl device, final Any data_in) {
+		// End of Generated Code
+
+		// Re-Start of Generated Code
+		return true;
+	}
+}
+
+// -----------------------------------------------------------------------------
+/*
+ * end of $Source:
+ * /cvsroot/tango-cs/archiving/server/hdbtdbArchivingServers/src/
+ * main/java/TdbExtractor/GetAttDataMaxBetweenDatesClass.java,v $
+ */
diff --git a/src/main/java/TdbExtractor/GetAttDataMaxClass.java b/tdbextractor/src/main/java/TdbExtractor/GetAttDataMaxClass.java
similarity index 94%
rename from src/main/java/TdbExtractor/GetAttDataMaxClass.java
rename to tdbextractor/src/main/java/TdbExtractor/GetAttDataMaxClass.java
index 67aef3fb31b8d0827136e7c9fc2349f5beb7f67f..11dbb17b53bb6fefda955dc9a44905ec4acb97fb 100644
--- a/src/main/java/TdbExtractor/GetAttDataMaxClass.java
+++ b/tdbextractor/src/main/java/TdbExtractor/GetAttDataMaxClass.java
@@ -1,161 +1,161 @@
-//+======================================================================
-// $Source$
-//
-// Project:      Tango Device Server
-//
-// Description:  Java source code for the command TemplateClass of the
-//               TdbExtractor class.
-//
-// $Author$
-//
-// $Revision$
-//
-// $Log$
-// Revision 1.3  2010/11/22 08:09:15  abeilleg
-// remove critical of findbugs
-//
-// Revision 1.2  2009/12/17 12:47:15  pierrejoseph
-// CheckStyle:  Organize imports / Format
-//
-// Revision 1.1  2008/02/28 15:37:15  pierrejoseph
-// TdbExtractor has been forgotten
-//
-// Revision 1.3  2005/11/29 16:13:31  chinkumo
-// Code reformated (pogo compatible)
-//
-// Revision 1.2  2005/11/15 13:45:16  chinkumo
-// ...
-//
-// Revision 1.1  2005/09/09 10:03:41  chinkumo
-// First commit !
-// (Dynamic attribut release)
-//
-//
-// copyleft :    European Synchrotron Radiation Facility
-//               BP 220, Grenoble 38043
-//               FRANCE
-//
-//-======================================================================
-//
-//  		This file is generated by POGO
-//	(Program Obviously used to Generate tango Object)
-//
-//         (c) - Software Engineering Group - ESRF
-//=============================================================================
-
-/**
- * @author	$Author$
- * @version	$Revision$
- */
-package TdbExtractor;
-
-import org.omg.CORBA.Any;
-
-import fr.esrf.Tango.DevFailed;
-import fr.esrf.Tango.DispLevel;
-import fr.esrf.TangoDs.Command;
-import fr.esrf.TangoDs.DeviceImpl;
-import fr.esrf.TangoDs.Except;
-import fr.esrf.TangoDs.TangoConst;
-import fr.esrf.TangoDs.Util;
-
-/**
- * Class Description: Returns the biggest value generated by the attribute.
- */
-
-public class GetAttDataMaxClass extends Command implements TangoConst {
-	// ===============================================================
-	/**
-	 * Constructor for Command class GetAttDataMaxClass
-	 * 
-	 * @param name
-	 *            command name
-	 * @param in
-	 *            argin type
-	 * @param out
-	 *            argout type
-	 */
-	// ===============================================================
-	public GetAttDataMaxClass(final String name, final int in, final int out) {
-		super(name, in, out);
-	}
-
-	// ===============================================================
-	/**
-	 * Constructor for Command class GetAttDataMaxClass
-	 * 
-	 * @param name
-	 *            command name
-	 * @param in
-	 *            argin type
-	 * @param in_comments
-	 *            argin description
-	 * @param out
-	 *            argout type
-	 * @param out_comments
-	 *            argout description
-	 */
-	// ===============================================================
-	public GetAttDataMaxClass(final String name, final int in, final int out, final String in_comments, final String out_comments) {
-		super(name, in, out, in_comments, out_comments);
-	}
-
-	// ===============================================================
-	/**
-	 * Constructor for Command class GetAttDataMaxClass
-	 * 
-	 * @param name
-	 *            command name
-	 * @param in
-	 *            argin type
-	 * @param in_comments
-	 *            argin description
-	 * @param out
-	 *            argout type
-	 * @param out_comments
-	 *            argout description
-	 * @param level
-	 *            The command display type OPERATOR or EXPERT
-	 */
-	// ===============================================================
-	public GetAttDataMaxClass(final String name, final int in, final int out, final String in_comments, final String out_comments, final DispLevel level) {
-		super(name, in, out, in_comments, out_comments, level);
-	}
-
-	// ===============================================================
-	/**
-	 * return the result of the device's command.
-	 */
-	// ===============================================================
-	@Override
-	public Any execute(final DeviceImpl device, final Any in_any) throws DevFailed {
-		Util.out2.println("GetAttDataMaxClass.execute(): arrived");
-		final String argin = extract_DevString(in_any);
-
-		if (!(device instanceof TdbExtractor)) {
-			Except.throw_exception("DEVICE_ERROR", "Device parameter is not instance of TdbExtractor", "TdbExtractor");
-		}
-
-		return insert(((TdbExtractor) device).get_att_data_max(argin));
-	}
-
-	// ===============================================================
-	/**
-	 * Check if it is allowed to execute the command.
-	 */
-	// ===============================================================
-	@Override
-	public boolean is_allowed(final DeviceImpl device, final Any data_in) {
-		// End of Generated Code
-
-		// Re-Start of Generated Code
-		return true;
-	}
-}
-
-// -----------------------------------------------------------------------------
-/*
- * end of $Source:
- * /cvsroot/tango-cs/archiving/server/hdbtdbArchivingServers/src/
- * main/java/TdbExtractor/GetAttDataMaxClass.java,v $
- */
+//+======================================================================
+// $Source$
+//
+// Project:      Tango Device Server
+//
+// Description:  Java source code for the command TemplateClass of the
+//               TdbExtractor class.
+//
+// $Author: gramer $
+//
+// $Revision: 15443 $
+//
+// $Log$
+// Revision 1.3  2010/11/22 08:09:15  abeilleg
+// remove critical of findbugs
+//
+// Revision 1.2  2009/12/17 12:47:15  pierrejoseph
+// CheckStyle:  Organize imports / Format
+//
+// Revision 1.1  2008/02/28 15:37:15  pierrejoseph
+// TdbExtractor has been forgotten
+//
+// Revision 1.3  2005/11/29 16:13:31  chinkumo
+// Code reformated (pogo compatible)
+//
+// Revision 1.2  2005/11/15 13:45:16  chinkumo
+// ...
+//
+// Revision 1.1  2005/09/09 10:03:41  chinkumo
+// First commit !
+// (Dynamic attribut release)
+//
+//
+// copyleft :    European Synchrotron Radiation Facility
+//               BP 220, Grenoble 38043
+//               FRANCE
+//
+//-======================================================================
+//
+//  		This file is generated by POGO
+//	(Program Obviously used to Generate tango Object)
+//
+//         (c) - Software Engineering Group - ESRF
+//=============================================================================
+
+/**
+ * @author	$Author: gramer $
+ * @version	$Revision: 15443 $
+ */
+package TdbExtractor;
+
+import org.omg.CORBA.Any;
+
+import fr.esrf.Tango.DevFailed;
+import fr.esrf.Tango.DispLevel;
+import fr.esrf.TangoDs.Command;
+import fr.esrf.TangoDs.DeviceImpl;
+import fr.esrf.TangoDs.Except;
+import fr.esrf.TangoDs.TangoConst;
+import fr.esrf.TangoDs.Util;
+
+/**
+ * Class Description: Returns the biggest value generated by the attribute.
+ */
+
+public class GetAttDataMaxClass extends Command implements TangoConst {
+	// ===============================================================
+	/**
+	 * Constructor for Command class GetAttDataMaxClass
+	 * 
+	 * @param name
+	 *            command name
+	 * @param in
+	 *            argin type
+	 * @param out
+	 *            argout type
+	 */
+	// ===============================================================
+	public GetAttDataMaxClass(final String name, final int in, final int out) {
+		super(name, in, out);
+	}
+
+	// ===============================================================
+	/**
+	 * Constructor for Command class GetAttDataMaxClass
+	 * 
+	 * @param name
+	 *            command name
+	 * @param in
+	 *            argin type
+	 * @param in_comments
+	 *            argin description
+	 * @param out
+	 *            argout type
+	 * @param out_comments
+	 *            argout description
+	 */
+	// ===============================================================
+	public GetAttDataMaxClass(final String name, final int in, final int out, final String in_comments, final String out_comments) {
+		super(name, in, out, in_comments, out_comments);
+	}
+
+	// ===============================================================
+	/**
+	 * Constructor for Command class GetAttDataMaxClass
+	 * 
+	 * @param name
+	 *            command name
+	 * @param in
+	 *            argin type
+	 * @param in_comments
+	 *            argin description
+	 * @param out
+	 *            argout type
+	 * @param out_comments
+	 *            argout description
+	 * @param level
+	 *            The command display type OPERATOR or EXPERT
+	 */
+	// ===============================================================
+	public GetAttDataMaxClass(final String name, final int in, final int out, final String in_comments, final String out_comments, final DispLevel level) {
+		super(name, in, out, in_comments, out_comments, level);
+	}
+
+	// ===============================================================
+	/**
+	 * return the result of the device's command.
+	 */
+	// ===============================================================
+	@Override
+	public Any execute(final DeviceImpl device, final Any in_any) throws DevFailed {
+		Util.out2.println("GetAttDataMaxClass.execute(): arrived");
+		final String argin = extract_DevString(in_any);
+
+		if (!(device instanceof TdbExtractor)) {
+			Except.throw_exception("DEVICE_ERROR", "Device parameter is not instance of TdbExtractor", "TdbExtractor");
+		}
+
+		return insert(((TdbExtractor) device).get_att_data_max(argin));
+	}
+
+	// ===============================================================
+	/**
+	 * Check if it is allowed to execute the command.
+	 */
+	// ===============================================================
+	@Override
+	public boolean is_allowed(final DeviceImpl device, final Any data_in) {
+		// End of Generated Code
+
+		// Re-Start of Generated Code
+		return true;
+	}
+}
+
+// -----------------------------------------------------------------------------
+/*
+ * end of $Source:
+ * /cvsroot/tango-cs/archiving/server/hdbtdbArchivingServers/src/
+ * main/java/TdbExtractor/GetAttDataMaxClass.java,v $
+ */
diff --git a/src/main/java/TdbExtractor/GetAttDataMinBetweenDatesClass.java b/tdbextractor/src/main/java/TdbExtractor/GetAttDataMinBetweenDatesClass.java
similarity index 94%
rename from src/main/java/TdbExtractor/GetAttDataMinBetweenDatesClass.java
rename to tdbextractor/src/main/java/TdbExtractor/GetAttDataMinBetweenDatesClass.java
index afd0c73f884f283c9e2b5e38683a6497ca14eb4a..c595bbc196d9fbaf3c2a463b57d1fbafb8ef853f 100644
--- a/src/main/java/TdbExtractor/GetAttDataMinBetweenDatesClass.java
+++ b/tdbextractor/src/main/java/TdbExtractor/GetAttDataMinBetweenDatesClass.java
@@ -1,161 +1,161 @@
-//+======================================================================
-// $Source$
-//
-// Project:      Tango Device Server
-//
-// Description:  Java source code for the command TemplateClass of the
-//               TdbExtractor class.
-//
-// $Author$
-//
-// $Revision$
-//
-// $Log$
-// Revision 1.3  2010/11/22 08:09:14  abeilleg
-// remove critical of findbugs
-//
-// Revision 1.2  2009/12/17 12:47:15  pierrejoseph
-// CheckStyle:  Organize imports / Format
-//
-// Revision 1.1  2008/02/28 15:37:14  pierrejoseph
-// TdbExtractor has been forgotten
-//
-// Revision 1.3  2005/11/29 16:13:31  chinkumo
-// Code reformated (pogo compatible)
-//
-// Revision 1.2  2005/11/15 13:45:16  chinkumo
-// ...
-//
-// Revision 1.1  2005/09/09 10:03:41  chinkumo
-// First commit !
-// (Dynamic attribut release)
-//
-//
-// copyleft :    European Synchrotron Radiation Facility
-//               BP 220, Grenoble 38043
-//               FRANCE
-//
-//-======================================================================
-//
-//  		This file is generated by POGO
-//	(Program Obviously used to Generate tango Object)
-//
-//         (c) - Software Engineering Group - ESRF
-//=============================================================================
-
-/**
- * @author	$Author$
- * @version	$Revision$
- */
-package TdbExtractor;
-
-import org.omg.CORBA.Any;
-
-import fr.esrf.Tango.DevFailed;
-import fr.esrf.Tango.DispLevel;
-import fr.esrf.TangoDs.Command;
-import fr.esrf.TangoDs.DeviceImpl;
-import fr.esrf.TangoDs.Except;
-import fr.esrf.TangoDs.TangoConst;
-import fr.esrf.TangoDs.Util;
-
-/**
- * Class Description: Returns the smallest scalar value generated by the given
- * attribute and between two given dates
- */
-
-public class GetAttDataMinBetweenDatesClass extends Command implements TangoConst {
-	// ===============================================================
-	/**
-	 * Constructor for Command class GetAttDataMinBetweenDatesClass
-	 * 
-	 * @param name
-	 *            command name
-	 * @param in
-	 *            argin type
-	 * @param out
-	 *            argout type
-	 */
-	// ===============================================================
-	public GetAttDataMinBetweenDatesClass(final String name, final int in, final int out) {
-		super(name, in, out);
-	}
-
-	// ===============================================================
-	/**
-	 * Constructor for Command class GetAttDataMinBetweenDatesClass
-	 * 
-	 * @param name
-	 *            command name
-	 * @param in
-	 *            argin type
-	 * @param in_comments
-	 *            argin description
-	 * @param out
-	 *            argout type
-	 * @param out_comments
-	 *            argout description
-	 */
-	// ===============================================================
-	public GetAttDataMinBetweenDatesClass(final String name, final int in, final int out, final String in_comments, final String out_comments) {
-		super(name, in, out, in_comments, out_comments);
-	}
-
-	// ===============================================================
-	/**
-	 * Constructor for Command class GetAttDataMinBetweenDatesClass
-	 * 
-	 * @param name
-	 *            command name
-	 * @param in
-	 *            argin type
-	 * @param in_comments
-	 *            argin description
-	 * @param out
-	 *            argout type
-	 * @param out_comments
-	 *            argout description
-	 * @param level
-	 *            The command display type OPERATOR or EXPERT
-	 */
-	// ===============================================================
-	public GetAttDataMinBetweenDatesClass(final String name, final int in, final int out, final String in_comments, final String out_comments, final DispLevel level) {
-		super(name, in, out, in_comments, out_comments, level);
-	}
-
-	// ===============================================================
-	/**
-	 * return the result of the device's command.
-	 */
-	// ===============================================================
-	@Override
-	public Any execute(final DeviceImpl device, final Any in_any) throws DevFailed {
-		Util.out2.println("GetAttDataMinBetweenDatesClass.execute(): arrived");
-		final String[] argin = extract_DevVarStringArray(in_any);
-		if (!(device instanceof TdbExtractor)) {
-			Except.throw_exception("DEVICE_ERROR", "Device parameter is not instance of TdbExtractor", "TdbExtractor");
-		}
-
-		return insert(((TdbExtractor) device).get_att_data_min_between_dates(argin));
-	}
-
-	// ===============================================================
-	/**
-	 * Check if it is allowed to execute the command.
-	 */
-	// ===============================================================
-	@Override
-	public boolean is_allowed(final DeviceImpl device, final Any data_in) {
-		// End of Generated Code
-
-		// Re-Start of Generated Code
-		return true;
-	}
-}
-
-// -----------------------------------------------------------------------------
-/*
- * end of $Source:
- * /cvsroot/tango-cs/archiving/server/hdbtdbArchivingServers/src/
- * main/java/TdbExtractor/GetAttDataMinBetweenDatesClass.java,v $
- */
+//+======================================================================
+// $Source$
+//
+// Project:      Tango Device Server
+//
+// Description:  Java source code for the command TemplateClass of the
+//               TdbExtractor class.
+//
+// $Author: gramer $
+//
+// $Revision: 15443 $
+//
+// $Log$
+// Revision 1.3  2010/11/22 08:09:14  abeilleg
+// remove critical of findbugs
+//
+// Revision 1.2  2009/12/17 12:47:15  pierrejoseph
+// CheckStyle:  Organize imports / Format
+//
+// Revision 1.1  2008/02/28 15:37:14  pierrejoseph
+// TdbExtractor has been forgotten
+//
+// Revision 1.3  2005/11/29 16:13:31  chinkumo
+// Code reformated (pogo compatible)
+//
+// Revision 1.2  2005/11/15 13:45:16  chinkumo
+// ...
+//
+// Revision 1.1  2005/09/09 10:03:41  chinkumo
+// First commit !
+// (Dynamic attribut release)
+//
+//
+// copyleft :    European Synchrotron Radiation Facility
+//               BP 220, Grenoble 38043
+//               FRANCE
+//
+//-======================================================================
+//
+//  		This file is generated by POGO
+//	(Program Obviously used to Generate tango Object)
+//
+//         (c) - Software Engineering Group - ESRF
+//=============================================================================
+
+/**
+ * @author	$Author: gramer $
+ * @version	$Revision: 15443 $
+ */
+package TdbExtractor;
+
+import org.omg.CORBA.Any;
+
+import fr.esrf.Tango.DevFailed;
+import fr.esrf.Tango.DispLevel;
+import fr.esrf.TangoDs.Command;
+import fr.esrf.TangoDs.DeviceImpl;
+import fr.esrf.TangoDs.Except;
+import fr.esrf.TangoDs.TangoConst;
+import fr.esrf.TangoDs.Util;
+
+/**
+ * Class Description: Returns the smallest scalar value generated by the given
+ * attribute and between two given dates
+ */
+
+public class GetAttDataMinBetweenDatesClass extends Command implements TangoConst {
+	// ===============================================================
+	/**
+	 * Constructor for Command class GetAttDataMinBetweenDatesClass
+	 * 
+	 * @param name
+	 *            command name
+	 * @param in
+	 *            argin type
+	 * @param out
+	 *            argout type
+	 */
+	// ===============================================================
+	public GetAttDataMinBetweenDatesClass(final String name, final int in, final int out) {
+		super(name, in, out);
+	}
+
+	// ===============================================================
+	/**
+	 * Constructor for Command class GetAttDataMinBetweenDatesClass
+	 * 
+	 * @param name
+	 *            command name
+	 * @param in
+	 *            argin type
+	 * @param in_comments
+	 *            argin description
+	 * @param out
+	 *            argout type
+	 * @param out_comments
+	 *            argout description
+	 */
+	// ===============================================================
+	public GetAttDataMinBetweenDatesClass(final String name, final int in, final int out, final String in_comments, final String out_comments) {
+		super(name, in, out, in_comments, out_comments);
+	}
+
+	// ===============================================================
+	/**
+	 * Constructor for Command class GetAttDataMinBetweenDatesClass
+	 * 
+	 * @param name
+	 *            command name
+	 * @param in
+	 *            argin type
+	 * @param in_comments
+	 *            argin description
+	 * @param out
+	 *            argout type
+	 * @param out_comments
+	 *            argout description
+	 * @param level
+	 *            The command display type OPERATOR or EXPERT
+	 */
+	// ===============================================================
+	public GetAttDataMinBetweenDatesClass(final String name, final int in, final int out, final String in_comments, final String out_comments, final DispLevel level) {
+		super(name, in, out, in_comments, out_comments, level);
+	}
+
+	// ===============================================================
+	/**
+	 * return the result of the device's command.
+	 */
+	// ===============================================================
+	@Override
+	public Any execute(final DeviceImpl device, final Any in_any) throws DevFailed {
+		Util.out2.println("GetAttDataMinBetweenDatesClass.execute(): arrived");
+		final String[] argin = extract_DevVarStringArray(in_any);
+		if (!(device instanceof TdbExtractor)) {
+			Except.throw_exception("DEVICE_ERROR", "Device parameter is not instance of TdbExtractor", "TdbExtractor");
+		}
+
+		return insert(((TdbExtractor) device).get_att_data_min_between_dates(argin));
+	}
+
+	// ===============================================================
+	/**
+	 * Check if it is allowed to execute the command.
+	 */
+	// ===============================================================
+	@Override
+	public boolean is_allowed(final DeviceImpl device, final Any data_in) {
+		// End of Generated Code
+
+		// Re-Start of Generated Code
+		return true;
+	}
+}
+
+// -----------------------------------------------------------------------------
+/*
+ * end of $Source:
+ * /cvsroot/tango-cs/archiving/server/hdbtdbArchivingServers/src/
+ * main/java/TdbExtractor/GetAttDataMinBetweenDatesClass.java,v $
+ */
diff --git a/src/main/java/TdbExtractor/GetAttDataMinClass.java b/tdbextractor/src/main/java/TdbExtractor/GetAttDataMinClass.java
similarity index 94%
rename from src/main/java/TdbExtractor/GetAttDataMinClass.java
rename to tdbextractor/src/main/java/TdbExtractor/GetAttDataMinClass.java
index 7c0fa066a1cd7c792ac488ade51e896ab576265d..e1fa2ec29cf0885f6adb9edafc5769f5fd7b4a9c 100644
--- a/src/main/java/TdbExtractor/GetAttDataMinClass.java
+++ b/tdbextractor/src/main/java/TdbExtractor/GetAttDataMinClass.java
@@ -1,162 +1,162 @@
-//+======================================================================
-// $Source$
-//
-// Project:      Tango Device Server
-//
-// Description:  Java source code for the command TemplateClass of the
-//               TdbExtractor class.
-//
-// $Author$
-//
-// $Revision$
-//
-// $Log$
-// Revision 1.3  2010/11/22 08:09:14  abeilleg
-// remove critical of findbugs
-//
-// Revision 1.2  2009/12/17 12:47:15  pierrejoseph
-// CheckStyle:  Organize imports / Format
-//
-// Revision 1.1  2008/02/28 15:37:14  pierrejoseph
-// TdbExtractor has been forgotten
-//
-// Revision 1.3  2005/11/29 16:13:31  chinkumo
-// Code reformated (pogo compatible)
-//
-// Revision 1.2  2005/11/15 13:45:16  chinkumo
-// ...
-//
-// Revision 1.1  2005/09/09 10:03:41  chinkumo
-// First commit !
-// (Dynamic attribut release)
-//
-//
-// copyleft :    European Synchrotron Radiation Facility
-//               BP 220, Grenoble 38043
-//               FRANCE
-//
-//-======================================================================
-//
-//  		This file is generated by POGO
-//	(Program Obviously used to Generate tango Object)
-//
-//         (c) - Software Engineering Group - ESRF
-//=============================================================================
-
-/**
- * @author	$Author$
- * @version	$Revision$
- */
-package TdbExtractor;
-
-import org.omg.CORBA.Any;
-
-import fr.esrf.Tango.DevFailed;
-import fr.esrf.Tango.DispLevel;
-import fr.esrf.TangoDs.Command;
-import fr.esrf.TangoDs.DeviceImpl;
-import fr.esrf.TangoDs.Except;
-import fr.esrf.TangoDs.TangoConst;
-import fr.esrf.TangoDs.Util;
-
-/**
- * Class Description: Returns the smallest scalar value generated by the
- * attribute.
- */
-
-public class GetAttDataMinClass extends Command implements TangoConst {
-	// ===============================================================
-	/**
-	 * Constructor for Command class GetAttDataMinClass
-	 * 
-	 * @param name
-	 *            command name
-	 * @param in
-	 *            argin type
-	 * @param out
-	 *            argout type
-	 */
-	// ===============================================================
-	public GetAttDataMinClass(final String name, final int in, final int out) {
-		super(name, in, out);
-	}
-
-	// ===============================================================
-	/**
-	 * Constructor for Command class GetAttDataMinClass
-	 * 
-	 * @param name
-	 *            command name
-	 * @param in
-	 *            argin type
-	 * @param in_comments
-	 *            argin description
-	 * @param out
-	 *            argout type
-	 * @param out_comments
-	 *            argout description
-	 */
-	// ===============================================================
-	public GetAttDataMinClass(final String name, final int in, final int out, final String in_comments, final String out_comments) {
-		super(name, in, out, in_comments, out_comments);
-	}
-
-	// ===============================================================
-	/**
-	 * Constructor for Command class GetAttDataMinClass
-	 * 
-	 * @param name
-	 *            command name
-	 * @param in
-	 *            argin type
-	 * @param in_comments
-	 *            argin description
-	 * @param out
-	 *            argout type
-	 * @param out_comments
-	 *            argout description
-	 * @param level
-	 *            The command display type OPERATOR or EXPERT
-	 */
-	// ===============================================================
-	public GetAttDataMinClass(final String name, final int in, final int out, final String in_comments, final String out_comments, final DispLevel level) {
-		super(name, in, out, in_comments, out_comments, level);
-	}
-
-	// ===============================================================
-	/**
-	 * return the result of the device's command.
-	 */
-	// ===============================================================
-	@Override
-	public Any execute(final DeviceImpl device, final Any in_any) throws DevFailed {
-		Util.out2.println("GetAttDataMinClass.execute(): arrived");
-		final String argin = extract_DevString(in_any);
-
-		if (!(device instanceof TdbExtractor)) {
-			Except.throw_exception("DEVICE_ERROR", "Device parameter is not instance of TdbExtractor", "TdbExtractor");
-		}
-
-		return insert(((TdbExtractor) device).get_att_data_min(argin));
-	}
-
-	// ===============================================================
-	/**
-	 * Check if it is allowed to execute the command.
-	 */
-	// ===============================================================
-	@Override
-	public boolean is_allowed(final DeviceImpl device, final Any data_in) {
-		// End of Generated Code
-
-		// Re-Start of Generated Code
-		return true;
-	}
-}
-
-// -----------------------------------------------------------------------------
-/*
- * end of $Source:
- * /cvsroot/tango-cs/archiving/server/hdbtdbArchivingServers/src/
- * main/java/TdbExtractor/GetAttDataMinClass.java,v $
- */
+//+======================================================================
+// $Source$
+//
+// Project:      Tango Device Server
+//
+// Description:  Java source code for the command TemplateClass of the
+//               TdbExtractor class.
+//
+// $Author: gramer $
+//
+// $Revision: 15443 $
+//
+// $Log$
+// Revision 1.3  2010/11/22 08:09:14  abeilleg
+// remove critical of findbugs
+//
+// Revision 1.2  2009/12/17 12:47:15  pierrejoseph
+// CheckStyle:  Organize imports / Format
+//
+// Revision 1.1  2008/02/28 15:37:14  pierrejoseph
+// TdbExtractor has been forgotten
+//
+// Revision 1.3  2005/11/29 16:13:31  chinkumo
+// Code reformated (pogo compatible)
+//
+// Revision 1.2  2005/11/15 13:45:16  chinkumo
+// ...
+//
+// Revision 1.1  2005/09/09 10:03:41  chinkumo
+// First commit !
+// (Dynamic attribut release)
+//
+//
+// copyleft :    European Synchrotron Radiation Facility
+//               BP 220, Grenoble 38043
+//               FRANCE
+//
+//-======================================================================
+//
+//  		This file is generated by POGO
+//	(Program Obviously used to Generate tango Object)
+//
+//         (c) - Software Engineering Group - ESRF
+//=============================================================================
+
+/**
+ * @author	$Author: gramer $
+ * @version	$Revision: 15443 $
+ */
+package TdbExtractor;
+
+import org.omg.CORBA.Any;
+
+import fr.esrf.Tango.DevFailed;
+import fr.esrf.Tango.DispLevel;
+import fr.esrf.TangoDs.Command;
+import fr.esrf.TangoDs.DeviceImpl;
+import fr.esrf.TangoDs.Except;
+import fr.esrf.TangoDs.TangoConst;
+import fr.esrf.TangoDs.Util;
+
+/**
+ * Class Description: Returns the smallest scalar value generated by the
+ * attribute.
+ */
+
+public class GetAttDataMinClass extends Command implements TangoConst {
+	// ===============================================================
+	/**
+	 * Constructor for Command class GetAttDataMinClass
+	 * 
+	 * @param name
+	 *            command name
+	 * @param in
+	 *            argin type
+	 * @param out
+	 *            argout type
+	 */
+	// ===============================================================
+	public GetAttDataMinClass(final String name, final int in, final int out) {
+		super(name, in, out);
+	}
+
+	// ===============================================================
+	/**
+	 * Constructor for Command class GetAttDataMinClass
+	 * 
+	 * @param name
+	 *            command name
+	 * @param in
+	 *            argin type
+	 * @param in_comments
+	 *            argin description
+	 * @param out
+	 *            argout type
+	 * @param out_comments
+	 *            argout description
+	 */
+	// ===============================================================
+	public GetAttDataMinClass(final String name, final int in, final int out, final String in_comments, final String out_comments) {
+		super(name, in, out, in_comments, out_comments);
+	}
+
+	// ===============================================================
+	/**
+	 * Constructor for Command class GetAttDataMinClass
+	 * 
+	 * @param name
+	 *            command name
+	 * @param in
+	 *            argin type
+	 * @param in_comments
+	 *            argin description
+	 * @param out
+	 *            argout type
+	 * @param out_comments
+	 *            argout description
+	 * @param level
+	 *            The command display type OPERATOR or EXPERT
+	 */
+	// ===============================================================
+	public GetAttDataMinClass(final String name, final int in, final int out, final String in_comments, final String out_comments, final DispLevel level) {
+		super(name, in, out, in_comments, out_comments, level);
+	}
+
+	// ===============================================================
+	/**
+	 * return the result of the device's command.
+	 */
+	// ===============================================================
+	@Override
+	public Any execute(final DeviceImpl device, final Any in_any) throws DevFailed {
+		Util.out2.println("GetAttDataMinClass.execute(): arrived");
+		final String argin = extract_DevString(in_any);
+
+		if (!(device instanceof TdbExtractor)) {
+			Except.throw_exception("DEVICE_ERROR", "Device parameter is not instance of TdbExtractor", "TdbExtractor");
+		}
+
+		return insert(((TdbExtractor) device).get_att_data_min(argin));
+	}
+
+	// ===============================================================
+	/**
+	 * Check if it is allowed to execute the command.
+	 */
+	// ===============================================================
+	@Override
+	public boolean is_allowed(final DeviceImpl device, final Any data_in) {
+		// End of Generated Code
+
+		// Re-Start of Generated Code
+		return true;
+	}
+}
+
+// -----------------------------------------------------------------------------
+/*
+ * end of $Source:
+ * /cvsroot/tango-cs/archiving/server/hdbtdbArchivingServers/src/
+ * main/java/TdbExtractor/GetAttDataMinClass.java,v $
+ */
diff --git a/src/main/java/TdbExtractor/GetAttDataSupAndInfThanBetweenDatesClass.java b/tdbextractor/src/main/java/TdbExtractor/GetAttDataSupAndInfThanBetweenDatesClass.java
similarity index 95%
rename from src/main/java/TdbExtractor/GetAttDataSupAndInfThanBetweenDatesClass.java
rename to tdbextractor/src/main/java/TdbExtractor/GetAttDataSupAndInfThanBetweenDatesClass.java
index 1ebbd33a64ef640e346ad2a0ce3a1b661623f933..b6a24a6b642ce9b1a6a4642739308b77f0406bcf 100644
--- a/src/main/java/TdbExtractor/GetAttDataSupAndInfThanBetweenDatesClass.java
+++ b/tdbextractor/src/main/java/TdbExtractor/GetAttDataSupAndInfThanBetweenDatesClass.java
@@ -1,164 +1,164 @@
-//+======================================================================
-// $Source$
-//
-// Project:      Tango Device Server
-//
-// Description:  Java source code for the command TemplateClass of the
-//               TdbExtractor class.
-//
-// $Author$
-//
-// $Revision$
-//
-// $Log$
-// Revision 1.3  2010/11/22 08:09:15  abeilleg
-// remove critical of findbugs
-//
-// Revision 1.2  2009/12/17 12:47:15  pierrejoseph
-// CheckStyle:  Organize imports / Format
-//
-// Revision 1.1  2008/02/28 15:37:13  pierrejoseph
-// TdbExtractor has been forgotten
-//
-// Revision 1.3  2005/11/29 16:13:31  chinkumo
-// Code reformated (pogo compatible)
-//
-// Revision 1.2  2005/11/15 13:45:16  chinkumo
-// ...
-//
-// Revision 1.1  2005/09/09 10:03:41  chinkumo
-// First commit !
-// (Dynamic attribut release)
-//
-//
-// copyleft :    European Synchrotron Radiation Facility
-//               BP 220, Grenoble 38043
-//               FRANCE
-//
-//-======================================================================
-//
-//  		This file is generated by POGO
-//	(Program Obviously used to Generate tango Object)
-//
-//         (c) - Software Engineering Group - ESRF
-//=============================================================================
-
-/**
- * @author	$Author$
- * @version	$Revision$
- */
-package TdbExtractor;
-
-import org.omg.CORBA.Any;
-
-import fr.esrf.Tango.DevFailed;
-import fr.esrf.Tango.DispLevel;
-import fr.esrf.TangoDs.Command;
-import fr.esrf.TangoDs.DeviceImpl;
-import fr.esrf.TangoDs.Except;
-import fr.esrf.TangoDs.TangoConst;
-import fr.esrf.TangoDs.Util;
-
-/**
- * Class Description: Retrieves data beetwen two dates (date_1 & date_2) - Data
- * are higher than the given value x AND lower than the given value y. Create a
- * dynamic attribute, retrieve the corresponding data from database and prepare
- * result for attribute_history call.
- */
-
-public class GetAttDataSupAndInfThanBetweenDatesClass extends Command implements TangoConst {
-	// ===============================================================
-	/**
-	 * Constructor for Command class GetAttDataSupAndInfThanBetweenDatesClass
-	 * 
-	 * @param name
-	 *            command name
-	 * @param in
-	 *            argin type
-	 * @param out
-	 *            argout type
-	 */
-	// ===============================================================
-	public GetAttDataSupAndInfThanBetweenDatesClass(final String name, final int in, final int out) {
-		super(name, in, out);
-	}
-
-	// ===============================================================
-	/**
-	 * Constructor for Command class GetAttDataSupAndInfThanBetweenDatesClass
-	 * 
-	 * @param name
-	 *            command name
-	 * @param in
-	 *            argin type
-	 * @param in_comments
-	 *            argin description
-	 * @param out
-	 *            argout type
-	 * @param out_comments
-	 *            argout description
-	 */
-	// ===============================================================
-	public GetAttDataSupAndInfThanBetweenDatesClass(final String name, final int in, final int out, final String in_comments, final String out_comments) {
-		super(name, in, out, in_comments, out_comments);
-	}
-
-	// ===============================================================
-	/**
-	 * Constructor for Command class GetAttDataSupAndInfThanBetweenDatesClass
-	 * 
-	 * @param name
-	 *            command name
-	 * @param in
-	 *            argin type
-	 * @param in_comments
-	 *            argin description
-	 * @param out
-	 *            argout type
-	 * @param out_comments
-	 *            argout description
-	 * @param level
-	 *            The command display type OPERATOR or EXPERT
-	 */
-	// ===============================================================
-	public GetAttDataSupAndInfThanBetweenDatesClass(final String name, final int in, final int out, final String in_comments, final String out_comments, final DispLevel level) {
-		super(name, in, out, in_comments, out_comments, level);
-	}
-
-	// ===============================================================
-	/**
-	 * return the result of the device's command.
-	 */
-	// ===============================================================
-	@Override
-	public Any execute(final DeviceImpl device, final Any in_any) throws DevFailed {
-		Util.out2.println("GetAttDataSupAndInfThanBetweenDatesClass.execute(): arrived");
-		final String[] argin = extract_DevVarStringArray(in_any);
-
-		if (!(device instanceof TdbExtractor)) {
-			Except.throw_exception("DEVICE_ERROR", "Device parameter is not instance of TdbExtractor", "TdbExtractor");
-		}
-
-		return insert(((TdbExtractor) device).get_att_data_sup_and_inf_than_between_dates(argin));
-	}
-
-	// ===============================================================
-	/**
-	 * Check if it is allowed to execute the command.
-	 */
-	// ===============================================================
-	@Override
-	public boolean is_allowed(final DeviceImpl device, final Any data_in) {
-		// End of Generated Code
-
-		// Re-Start of Generated Code
-		return true;
-	}
-}
-
-// -----------------------------------------------------------------------------
-/*
- * end of $Source:
- * /cvsroot/tango-cs/archiving/server/hdbtdbArchivingServers/src/
- * main/java/TdbExtractor/GetAttDataSupAndInfThanBetweenDatesClass.java,v $
- */
+//+======================================================================
+// $Source$
+//
+// Project:      Tango Device Server
+//
+// Description:  Java source code for the command TemplateClass of the
+//               TdbExtractor class.
+//
+// $Author: gramer $
+//
+// $Revision: 15443 $
+//
+// $Log$
+// Revision 1.3  2010/11/22 08:09:15  abeilleg
+// remove critical of findbugs
+//
+// Revision 1.2  2009/12/17 12:47:15  pierrejoseph
+// CheckStyle:  Organize imports / Format
+//
+// Revision 1.1  2008/02/28 15:37:13  pierrejoseph
+// TdbExtractor has been forgotten
+//
+// Revision 1.3  2005/11/29 16:13:31  chinkumo
+// Code reformated (pogo compatible)
+//
+// Revision 1.2  2005/11/15 13:45:16  chinkumo
+// ...
+//
+// Revision 1.1  2005/09/09 10:03:41  chinkumo
+// First commit !
+// (Dynamic attribut release)
+//
+//
+// copyleft :    European Synchrotron Radiation Facility
+//               BP 220, Grenoble 38043
+//               FRANCE
+//
+//-======================================================================
+//
+//  		This file is generated by POGO
+//	(Program Obviously used to Generate tango Object)
+//
+//         (c) - Software Engineering Group - ESRF
+//=============================================================================
+
+/**
+ * @author	$Author: gramer $
+ * @version	$Revision: 15443 $
+ */
+package TdbExtractor;
+
+import org.omg.CORBA.Any;
+
+import fr.esrf.Tango.DevFailed;
+import fr.esrf.Tango.DispLevel;
+import fr.esrf.TangoDs.Command;
+import fr.esrf.TangoDs.DeviceImpl;
+import fr.esrf.TangoDs.Except;
+import fr.esrf.TangoDs.TangoConst;
+import fr.esrf.TangoDs.Util;
+
+/**
+ * Class Description: Retrieves data beetwen two dates (date_1 & date_2) - Data
+ * are higher than the given value x AND lower than the given value y. Create a
+ * dynamic attribute, retrieve the corresponding data from database and prepare
+ * result for attribute_history call.
+ */
+
+public class GetAttDataSupAndInfThanBetweenDatesClass extends Command implements TangoConst {
+	// ===============================================================
+	/**
+	 * Constructor for Command class GetAttDataSupAndInfThanBetweenDatesClass
+	 * 
+	 * @param name
+	 *            command name
+	 * @param in
+	 *            argin type
+	 * @param out
+	 *            argout type
+	 */
+	// ===============================================================
+	public GetAttDataSupAndInfThanBetweenDatesClass(final String name, final int in, final int out) {
+		super(name, in, out);
+	}
+
+	// ===============================================================
+	/**
+	 * Constructor for Command class GetAttDataSupAndInfThanBetweenDatesClass
+	 * 
+	 * @param name
+	 *            command name
+	 * @param in
+	 *            argin type
+	 * @param in_comments
+	 *            argin description
+	 * @param out
+	 *            argout type
+	 * @param out_comments
+	 *            argout description
+	 */
+	// ===============================================================
+	public GetAttDataSupAndInfThanBetweenDatesClass(final String name, final int in, final int out, final String in_comments, final String out_comments) {
+		super(name, in, out, in_comments, out_comments);
+	}
+
+	// ===============================================================
+	/**
+	 * Constructor for Command class GetAttDataSupAndInfThanBetweenDatesClass
+	 * 
+	 * @param name
+	 *            command name
+	 * @param in
+	 *            argin type
+	 * @param in_comments
+	 *            argin description
+	 * @param out
+	 *            argout type
+	 * @param out_comments
+	 *            argout description
+	 * @param level
+	 *            The command display type OPERATOR or EXPERT
+	 */
+	// ===============================================================
+	public GetAttDataSupAndInfThanBetweenDatesClass(final String name, final int in, final int out, final String in_comments, final String out_comments, final DispLevel level) {
+		super(name, in, out, in_comments, out_comments, level);
+	}
+
+	// ===============================================================
+	/**
+	 * return the result of the device's command.
+	 */
+	// ===============================================================
+	@Override
+	public Any execute(final DeviceImpl device, final Any in_any) throws DevFailed {
+		Util.out2.println("GetAttDataSupAndInfThanBetweenDatesClass.execute(): arrived");
+		final String[] argin = extract_DevVarStringArray(in_any);
+
+		if (!(device instanceof TdbExtractor)) {
+			Except.throw_exception("DEVICE_ERROR", "Device parameter is not instance of TdbExtractor", "TdbExtractor");
+		}
+
+		return insert(((TdbExtractor) device).get_att_data_sup_and_inf_than_between_dates(argin));
+	}
+
+	// ===============================================================
+	/**
+	 * Check if it is allowed to execute the command.
+	 */
+	// ===============================================================
+	@Override
+	public boolean is_allowed(final DeviceImpl device, final Any data_in) {
+		// End of Generated Code
+
+		// Re-Start of Generated Code
+		return true;
+	}
+}
+
+// -----------------------------------------------------------------------------
+/*
+ * end of $Source:
+ * /cvsroot/tango-cs/archiving/server/hdbtdbArchivingServers/src/
+ * main/java/TdbExtractor/GetAttDataSupAndInfThanBetweenDatesClass.java,v $
+ */
diff --git a/src/main/java/TdbExtractor/GetAttDataSupAndInfThanBetweenDatesCountClass.java b/tdbextractor/src/main/java/TdbExtractor/GetAttDataSupAndInfThanBetweenDatesCountClass.java
similarity index 94%
rename from src/main/java/TdbExtractor/GetAttDataSupAndInfThanBetweenDatesCountClass.java
rename to tdbextractor/src/main/java/TdbExtractor/GetAttDataSupAndInfThanBetweenDatesCountClass.java
index 54e71c264dd68e2f03a30a8dcb19b5580cbadc24..96e15ff2aea6c05c4a305fea7274b2a069cf28d1 100644
--- a/src/main/java/TdbExtractor/GetAttDataSupAndInfThanBetweenDatesCountClass.java
+++ b/tdbextractor/src/main/java/TdbExtractor/GetAttDataSupAndInfThanBetweenDatesCountClass.java
@@ -1,165 +1,165 @@
-//+======================================================================
-// $Source$
-//
-// Project:      Tango Device Server
-//
-// Description:  Java source code for the command TemplateClass of the
-//               TdbExtractor class.
-//
-// $Author$
-//
-// $Revision$
-//
-// $Log$
-// Revision 1.3  2010/11/22 08:09:14  abeilleg
-// remove critical of findbugs
-//
-// Revision 1.2  2009/12/17 12:47:15  pierrejoseph
-// CheckStyle:  Organize imports / Format
-//
-// Revision 1.1  2008/02/28 15:37:14  pierrejoseph
-// TdbExtractor has been forgotten
-//
-// Revision 1.3  2005/11/29 16:13:31  chinkumo
-// Code reformated (pogo compatible)
-//
-// Revision 1.2  2005/11/15 13:45:16  chinkumo
-// ...
-//
-// Revision 1.1  2005/09/09 10:03:41  chinkumo
-// First commit !
-// (Dynamic attribut release)
-//
-//
-// copyleft :    European Synchrotron Radiation Facility
-//               BP 220, Grenoble 38043
-//               FRANCE
-//
-//-======================================================================
-//
-//  		This file is generated by POGO
-//	(Program Obviously used to Generate tango Object)
-//
-//         (c) - Software Engineering Group - ESRF
-//=============================================================================
-
-/**
- * @author	$Author$
- * @version	$Revision$
- */
-package TdbExtractor;
-
-import org.omg.CORBA.Any;
-
-import fr.esrf.Tango.DevFailed;
-import fr.esrf.Tango.DispLevel;
-import fr.esrf.TangoDs.Command;
-import fr.esrf.TangoDs.DeviceImpl;
-import fr.esrf.TangoDs.Except;
-import fr.esrf.TangoDs.TangoConst;
-import fr.esrf.TangoDs.Util;
-
-/**
- * Class Description: Returns the number of data higher than the given value x,
- * (AND) lower than the given value y, and beetwen two dates (date_1 & date_2).
- */
-
-public class GetAttDataSupAndInfThanBetweenDatesCountClass extends Command implements TangoConst {
-	// ===============================================================
-	/**
-	 * Constructor for Command class
-	 * GetAttDataSupAndInfThanBetweenDatesCountClass
-	 * 
-	 * @param name
-	 *            command name
-	 * @param in
-	 *            argin type
-	 * @param out
-	 *            argout type
-	 */
-	// ===============================================================
-	public GetAttDataSupAndInfThanBetweenDatesCountClass(final String name, final int in, final int out) {
-		super(name, in, out);
-	}
-
-	// ===============================================================
-	/**
-	 * Constructor for Command class
-	 * GetAttDataSupAndInfThanBetweenDatesCountClass
-	 * 
-	 * @param name
-	 *            command name
-	 * @param in
-	 *            argin type
-	 * @param in_comments
-	 *            argin description
-	 * @param out
-	 *            argout type
-	 * @param out_comments
-	 *            argout description
-	 */
-	// ===============================================================
-	public GetAttDataSupAndInfThanBetweenDatesCountClass(final String name, final int in, final int out, final String in_comments, final String out_comments) {
-		super(name, in, out, in_comments, out_comments);
-	}
-
-	// ===============================================================
-	/**
-	 * Constructor for Command class
-	 * GetAttDataSupAndInfThanBetweenDatesCountClass
-	 * 
-	 * @param name
-	 *            command name
-	 * @param in
-	 *            argin type
-	 * @param in_comments
-	 *            argin description
-	 * @param out
-	 *            argout type
-	 * @param out_comments
-	 *            argout description
-	 * @param level
-	 *            The command display type OPERATOR or EXPERT
-	 */
-	// ===============================================================
-	public GetAttDataSupAndInfThanBetweenDatesCountClass(final String name, final int in, final int out, final String in_comments, final String out_comments, final DispLevel level) {
-		super(name, in, out, in_comments, out_comments, level);
-	}
-
-	// ===============================================================
-	/**
-	 * return the result of the device's command.
-	 */
-	// ===============================================================
-	@Override
-	public Any execute(final DeviceImpl device, final Any in_any) throws DevFailed {
-		Util.out2.println("GetAttDataSupAndInfThanBetweenDatesCountClass.execute(): arrived");
-		final String[] argin = extract_DevVarStringArray(in_any);
-
-		if (!(device instanceof TdbExtractor)) {
-			Except.throw_exception("DEVICE_ERROR", "Device parameter is not instance of TdbExtractor", "TdbExtractor");
-		}
-
-		return insert(((TdbExtractor) device).get_att_data_sup_and_inf_than_between_dates_count(argin));
-	}
-
-	// ===============================================================
-	/**
-	 * Check if it is allowed to execute the command.
-	 */
-	// ===============================================================
-	@Override
-	public boolean is_allowed(final DeviceImpl device, final Any data_in) {
-		// End of Generated Code
-
-		// Re-Start of Generated Code
-		return true;
-	}
-}
-
-// -----------------------------------------------------------------------------
-/*
- * end of $Source:
- * /cvsroot/tango-cs/archiving/server/hdbtdbArchivingServers/src/
- * main/java/TdbExtractor/GetAttDataSupAndInfThanBetweenDatesCountClass.java,v $
- */
+//+======================================================================
+// $Source$
+//
+// Project:      Tango Device Server
+//
+// Description:  Java source code for the command TemplateClass of the
+//               TdbExtractor class.
+//
+// $Author: gramer $
+//
+// $Revision: 15443 $
+//
+// $Log$
+// Revision 1.3  2010/11/22 08:09:14  abeilleg
+// remove critical of findbugs
+//
+// Revision 1.2  2009/12/17 12:47:15  pierrejoseph
+// CheckStyle:  Organize imports / Format
+//
+// Revision 1.1  2008/02/28 15:37:14  pierrejoseph
+// TdbExtractor has been forgotten
+//
+// Revision 1.3  2005/11/29 16:13:31  chinkumo
+// Code reformated (pogo compatible)
+//
+// Revision 1.2  2005/11/15 13:45:16  chinkumo
+// ...
+//
+// Revision 1.1  2005/09/09 10:03:41  chinkumo
+// First commit !
+// (Dynamic attribut release)
+//
+//
+// copyleft :    European Synchrotron Radiation Facility
+//               BP 220, Grenoble 38043
+//               FRANCE
+//
+//-======================================================================
+//
+//  		This file is generated by POGO
+//	(Program Obviously used to Generate tango Object)
+//
+//         (c) - Software Engineering Group - ESRF
+//=============================================================================
+
+/**
+ * @author	$Author: gramer $
+ * @version	$Revision: 15443 $
+ */
+package TdbExtractor;
+
+import org.omg.CORBA.Any;
+
+import fr.esrf.Tango.DevFailed;
+import fr.esrf.Tango.DispLevel;
+import fr.esrf.TangoDs.Command;
+import fr.esrf.TangoDs.DeviceImpl;
+import fr.esrf.TangoDs.Except;
+import fr.esrf.TangoDs.TangoConst;
+import fr.esrf.TangoDs.Util;
+
+/**
+ * Class Description: Returns the number of data higher than the given value x,
+ * (AND) lower than the given value y, and beetwen two dates (date_1 & date_2).
+ */
+
+public class GetAttDataSupAndInfThanBetweenDatesCountClass extends Command implements TangoConst {
+	// ===============================================================
+	/**
+	 * Constructor for Command class
+	 * GetAttDataSupAndInfThanBetweenDatesCountClass
+	 * 
+	 * @param name
+	 *            command name
+	 * @param in
+	 *            argin type
+	 * @param out
+	 *            argout type
+	 */
+	// ===============================================================
+	public GetAttDataSupAndInfThanBetweenDatesCountClass(final String name, final int in, final int out) {
+		super(name, in, out);
+	}
+
+	// ===============================================================
+	/**
+	 * Constructor for Command class
+	 * GetAttDataSupAndInfThanBetweenDatesCountClass
+	 * 
+	 * @param name
+	 *            command name
+	 * @param in
+	 *            argin type
+	 * @param in_comments
+	 *            argin description
+	 * @param out
+	 *            argout type
+	 * @param out_comments
+	 *            argout description
+	 */
+	// ===============================================================
+	public GetAttDataSupAndInfThanBetweenDatesCountClass(final String name, final int in, final int out, final String in_comments, final String out_comments) {
+		super(name, in, out, in_comments, out_comments);
+	}
+
+	// ===============================================================
+	/**
+	 * Constructor for Command class
+	 * GetAttDataSupAndInfThanBetweenDatesCountClass
+	 * 
+	 * @param name
+	 *            command name
+	 * @param in
+	 *            argin type
+	 * @param in_comments
+	 *            argin description
+	 * @param out
+	 *            argout type
+	 * @param out_comments
+	 *            argout description
+	 * @param level
+	 *            The command display type OPERATOR or EXPERT
+	 */
+	// ===============================================================
+	public GetAttDataSupAndInfThanBetweenDatesCountClass(final String name, final int in, final int out, final String in_comments, final String out_comments, final DispLevel level) {
+		super(name, in, out, in_comments, out_comments, level);
+	}
+
+	// ===============================================================
+	/**
+	 * return the result of the device's command.
+	 */
+	// ===============================================================
+	@Override
+	public Any execute(final DeviceImpl device, final Any in_any) throws DevFailed {
+		Util.out2.println("GetAttDataSupAndInfThanBetweenDatesCountClass.execute(): arrived");
+		final String[] argin = extract_DevVarStringArray(in_any);
+
+		if (!(device instanceof TdbExtractor)) {
+			Except.throw_exception("DEVICE_ERROR", "Device parameter is not instance of TdbExtractor", "TdbExtractor");
+		}
+
+		return insert(((TdbExtractor) device).get_att_data_sup_and_inf_than_between_dates_count(argin));
+	}
+
+	// ===============================================================
+	/**
+	 * Check if it is allowed to execute the command.
+	 */
+	// ===============================================================
+	@Override
+	public boolean is_allowed(final DeviceImpl device, final Any data_in) {
+		// End of Generated Code
+
+		// Re-Start of Generated Code
+		return true;
+	}
+}
+
+// -----------------------------------------------------------------------------
+/*
+ * end of $Source:
+ * /cvsroot/tango-cs/archiving/server/hdbtdbArchivingServers/src/
+ * main/java/TdbExtractor/GetAttDataSupAndInfThanBetweenDatesCountClass.java,v $
+ */
diff --git a/src/main/java/TdbExtractor/GetAttDataSupAndInfThanClass.java b/tdbextractor/src/main/java/TdbExtractor/GetAttDataSupAndInfThanClass.java
similarity index 94%
rename from src/main/java/TdbExtractor/GetAttDataSupAndInfThanClass.java
rename to tdbextractor/src/main/java/TdbExtractor/GetAttDataSupAndInfThanClass.java
index 62ba260c8eb568f3ba6a02052c26432395117b7b..03a1e9a47c5090c2ca2b46914f24005b2cafec22 100644
--- a/src/main/java/TdbExtractor/GetAttDataSupAndInfThanClass.java
+++ b/tdbextractor/src/main/java/TdbExtractor/GetAttDataSupAndInfThanClass.java
@@ -1,164 +1,164 @@
-//+======================================================================
-// $Source$
-//
-// Project:      Tango Device Server
-//
-// Description:  Java source code for the command TemplateClass of the
-//               TdbExtractor class.
-//
-// $Author$
-//
-// $Revision$
-//
-// $Log$
-// Revision 1.3  2010/11/22 08:09:14  abeilleg
-// remove critical of findbugs
-//
-// Revision 1.2  2009/12/17 12:47:15  pierrejoseph
-// CheckStyle:  Organize imports / Format
-//
-// Revision 1.1  2008/02/28 15:37:15  pierrejoseph
-// TdbExtractor has been forgotten
-//
-// Revision 1.3  2005/11/29 16:13:31  chinkumo
-// Code reformated (pogo compatible)
-//
-// Revision 1.2  2005/11/15 13:45:16  chinkumo
-// ...
-//
-// Revision 1.1  2005/09/09 10:03:41  chinkumo
-// First commit !
-// (Dynamic attribut release)
-//
-//
-// copyleft :    European Synchrotron Radiation Facility
-//               BP 220, Grenoble 38043
-//               FRANCE
-//
-//-======================================================================
-//
-//  		This file is generated by POGO
-//	(Program Obviously used to Generate tango Object)
-//
-//         (c) - Software Engineering Group - ESRF
-//=============================================================================
-
-/**
- * @author	$Author$
- * @version	$Revision$
- */
-package TdbExtractor;
-
-import org.omg.CORBA.Any;
-
-import fr.esrf.Tango.DevFailed;
-import fr.esrf.Tango.DispLevel;
-import fr.esrf.TangoDs.Command;
-import fr.esrf.TangoDs.DeviceImpl;
-import fr.esrf.TangoDs.Except;
-import fr.esrf.TangoDs.TangoConst;
-import fr.esrf.TangoDs.Util;
-
-/**
- * Class Description: Retrieves all data that are higher than the given value x
- * AND lower than the given value y. Create a dynamic attribute, retrieve the
- * corresponding data from database and prepare result for attribute_history
- * call.
- */
-
-public class GetAttDataSupAndInfThanClass extends Command implements TangoConst {
-	// ===============================================================
-	/**
-	 * Constructor for Command class GetAttDataSupAndInfThanClass
-	 * 
-	 * @param name
-	 *            command name
-	 * @param in
-	 *            argin type
-	 * @param out
-	 *            argout type
-	 */
-	// ===============================================================
-	public GetAttDataSupAndInfThanClass(final String name, final int in, final int out) {
-		super(name, in, out);
-	}
-
-	// ===============================================================
-	/**
-	 * Constructor for Command class GetAttDataSupAndInfThanClass
-	 * 
-	 * @param name
-	 *            command name
-	 * @param in
-	 *            argin type
-	 * @param in_comments
-	 *            argin description
-	 * @param out
-	 *            argout type
-	 * @param out_comments
-	 *            argout description
-	 */
-	// ===============================================================
-	public GetAttDataSupAndInfThanClass(final String name, final int in, final int out, final String in_comments, final String out_comments) {
-		super(name, in, out, in_comments, out_comments);
-	}
-
-	// ===============================================================
-	/**
-	 * Constructor for Command class GetAttDataSupAndInfThanClass
-	 * 
-	 * @param name
-	 *            command name
-	 * @param in
-	 *            argin type
-	 * @param in_comments
-	 *            argin description
-	 * @param out
-	 *            argout type
-	 * @param out_comments
-	 *            argout description
-	 * @param level
-	 *            The command display type OPERATOR or EXPERT
-	 */
-	// ===============================================================
-	public GetAttDataSupAndInfThanClass(final String name, final int in, final int out, final String in_comments, final String out_comments, final DispLevel level) {
-		super(name, in, out, in_comments, out_comments, level);
-	}
-
-	// ===============================================================
-	/**
-	 * return the result of the device's command.
-	 */
-	// ===============================================================
-	@Override
-	public Any execute(final DeviceImpl device, final Any in_any) throws DevFailed {
-		Util.out2.println("GetAttDataSupAndInfThanClass.execute(): arrived");
-		final String[] argin = extract_DevVarStringArray(in_any);
-
-		if (!(device instanceof TdbExtractor)) {
-			Except.throw_exception("DEVICE_ERROR", "Device parameter is not instance of TdbExtractor", "TdbExtractor");
-		}
-
-		return insert(((TdbExtractor) device).get_att_data_sup_and_inf_than(argin));
-	}
-
-	// ===============================================================
-	/**
-	 * Check if it is allowed to execute the command.
-	 */
-	// ===============================================================
-	@Override
-	public boolean is_allowed(final DeviceImpl device, final Any data_in) {
-		// End of Generated Code
-
-		// Re-Start of Generated Code
-		return true;
-	}
-}
-
-// -----------------------------------------------------------------------------
-/*
- * end of $Source:
- * /cvsroot/tango-cs/archiving/server/hdbtdbArchivingServers/src/
- * main/java/TdbExtractor/GetAttDataSupAndInfThanClass.java,v $
- */
+//+======================================================================
+// $Source$
+//
+// Project:      Tango Device Server
+//
+// Description:  Java source code for the command TemplateClass of the
+//               TdbExtractor class.
+//
+// $Author: gramer $
+//
+// $Revision: 15443 $
+//
+// $Log$
+// Revision 1.3  2010/11/22 08:09:14  abeilleg
+// remove critical of findbugs
+//
+// Revision 1.2  2009/12/17 12:47:15  pierrejoseph
+// CheckStyle:  Organize imports / Format
+//
+// Revision 1.1  2008/02/28 15:37:15  pierrejoseph
+// TdbExtractor has been forgotten
+//
+// Revision 1.3  2005/11/29 16:13:31  chinkumo
+// Code reformated (pogo compatible)
+//
+// Revision 1.2  2005/11/15 13:45:16  chinkumo
+// ...
+//
+// Revision 1.1  2005/09/09 10:03:41  chinkumo
+// First commit !
+// (Dynamic attribut release)
+//
+//
+// copyleft :    European Synchrotron Radiation Facility
+//               BP 220, Grenoble 38043
+//               FRANCE
+//
+//-======================================================================
+//
+//  		This file is generated by POGO
+//	(Program Obviously used to Generate tango Object)
+//
+//         (c) - Software Engineering Group - ESRF
+//=============================================================================
+
+/**
+ * @author	$Author: gramer $
+ * @version	$Revision: 15443 $
+ */
+package TdbExtractor;
+
+import org.omg.CORBA.Any;
+
+import fr.esrf.Tango.DevFailed;
+import fr.esrf.Tango.DispLevel;
+import fr.esrf.TangoDs.Command;
+import fr.esrf.TangoDs.DeviceImpl;
+import fr.esrf.TangoDs.Except;
+import fr.esrf.TangoDs.TangoConst;
+import fr.esrf.TangoDs.Util;
+
+/**
+ * Class Description: Retrieves all data that are higher than the given value x
+ * AND lower than the given value y. Create a dynamic attribute, retrieve the
+ * corresponding data from database and prepare result for attribute_history
+ * call.
+ */
+
+public class GetAttDataSupAndInfThanClass extends Command implements TangoConst {
+	// ===============================================================
+	/**
+	 * Constructor for Command class GetAttDataSupAndInfThanClass
+	 * 
+	 * @param name
+	 *            command name
+	 * @param in
+	 *            argin type
+	 * @param out
+	 *            argout type
+	 */
+	// ===============================================================
+	public GetAttDataSupAndInfThanClass(final String name, final int in, final int out) {
+		super(name, in, out);
+	}
+
+	// ===============================================================
+	/**
+	 * Constructor for Command class GetAttDataSupAndInfThanClass
+	 * 
+	 * @param name
+	 *            command name
+	 * @param in
+	 *            argin type
+	 * @param in_comments
+	 *            argin description
+	 * @param out
+	 *            argout type
+	 * @param out_comments
+	 *            argout description
+	 */
+	// ===============================================================
+	public GetAttDataSupAndInfThanClass(final String name, final int in, final int out, final String in_comments, final String out_comments) {
+		super(name, in, out, in_comments, out_comments);
+	}
+
+	// ===============================================================
+	/**
+	 * Constructor for Command class GetAttDataSupAndInfThanClass
+	 * 
+	 * @param name
+	 *            command name
+	 * @param in
+	 *            argin type
+	 * @param in_comments
+	 *            argin description
+	 * @param out
+	 *            argout type
+	 * @param out_comments
+	 *            argout description
+	 * @param level
+	 *            The command display type OPERATOR or EXPERT
+	 */
+	// ===============================================================
+	public GetAttDataSupAndInfThanClass(final String name, final int in, final int out, final String in_comments, final String out_comments, final DispLevel level) {
+		super(name, in, out, in_comments, out_comments, level);
+	}
+
+	// ===============================================================
+	/**
+	 * return the result of the device's command.
+	 */
+	// ===============================================================
+	@Override
+	public Any execute(final DeviceImpl device, final Any in_any) throws DevFailed {
+		Util.out2.println("GetAttDataSupAndInfThanClass.execute(): arrived");
+		final String[] argin = extract_DevVarStringArray(in_any);
+
+		if (!(device instanceof TdbExtractor)) {
+			Except.throw_exception("DEVICE_ERROR", "Device parameter is not instance of TdbExtractor", "TdbExtractor");
+		}
+
+		return insert(((TdbExtractor) device).get_att_data_sup_and_inf_than(argin));
+	}
+
+	// ===============================================================
+	/**
+	 * Check if it is allowed to execute the command.
+	 */
+	// ===============================================================
+	@Override
+	public boolean is_allowed(final DeviceImpl device, final Any data_in) {
+		// End of Generated Code
+
+		// Re-Start of Generated Code
+		return true;
+	}
+}
+
+// -----------------------------------------------------------------------------
+/*
+ * end of $Source:
+ * /cvsroot/tango-cs/archiving/server/hdbtdbArchivingServers/src/
+ * main/java/TdbExtractor/GetAttDataSupAndInfThanClass.java,v $
+ */
diff --git a/src/main/java/TdbExtractor/GetAttDataSupAndInfThanCountClass.java b/tdbextractor/src/main/java/TdbExtractor/GetAttDataSupAndInfThanCountClass.java
similarity index 94%
rename from src/main/java/TdbExtractor/GetAttDataSupAndInfThanCountClass.java
rename to tdbextractor/src/main/java/TdbExtractor/GetAttDataSupAndInfThanCountClass.java
index 5003c4abc80d3b087df859fcc9692772d16dc45a..7faa434d1945f55e1bb28744425008606611fad3 100644
--- a/src/main/java/TdbExtractor/GetAttDataSupAndInfThanCountClass.java
+++ b/tdbextractor/src/main/java/TdbExtractor/GetAttDataSupAndInfThanCountClass.java
@@ -1,162 +1,162 @@
-//+======================================================================
-// $Source$
-//
-// Project:      Tango Device Server
-//
-// Description:  Java source code for the command TemplateClass of the
-//               TdbExtractor class.
-//
-// $Author$
-//
-// $Revision$
-//
-// $Log$
-// Revision 1.3  2010/11/22 08:09:14  abeilleg
-// remove critical of findbugs
-//
-// Revision 1.2  2009/12/17 12:47:15  pierrejoseph
-// CheckStyle:  Organize imports / Format
-//
-// Revision 1.1  2008/02/28 15:37:13  pierrejoseph
-// TdbExtractor has been forgotten
-//
-// Revision 1.3  2005/11/29 16:13:31  chinkumo
-// Code reformated (pogo compatible)
-//
-// Revision 1.2  2005/11/15 13:45:16  chinkumo
-// ...
-//
-// Revision 1.1  2005/09/09 10:03:41  chinkumo
-// First commit !
-// (Dynamic attribut release)
-//
-//
-// copyleft :    European Synchrotron Radiation Facility
-//               BP 220, Grenoble 38043
-//               FRANCE
-//
-//-======================================================================
-//
-//  		This file is generated by POGO
-//	(Program Obviously used to Generate tango Object)
-//
-//         (c) - Software Engineering Group - ESRF
-//=============================================================================
-
-/**
- * @author	$Author$
- * @version	$Revision$
- */
-package TdbExtractor;
-
-import org.omg.CORBA.Any;
-
-import fr.esrf.Tango.DevFailed;
-import fr.esrf.Tango.DispLevel;
-import fr.esrf.TangoDs.Command;
-import fr.esrf.TangoDs.DeviceImpl;
-import fr.esrf.TangoDs.Except;
-import fr.esrf.TangoDs.TangoConst;
-import fr.esrf.TangoDs.Util;
-
-/**
- * Class Description: Returns data that are highter than the given value x AND
- * lower than the given value y.
- */
-
-public class GetAttDataSupAndInfThanCountClass extends Command implements TangoConst {
-	// ===============================================================
-	/**
-	 * Constructor for Command class GetAttDataSupAndInfThanCountClass
-	 * 
-	 * @param name
-	 *            command name
-	 * @param in
-	 *            argin type
-	 * @param out
-	 *            argout type
-	 */
-	// ===============================================================
-	public GetAttDataSupAndInfThanCountClass(final String name, final int in, final int out) {
-		super(name, in, out);
-	}
-
-	// ===============================================================
-	/**
-	 * Constructor for Command class GetAttDataSupAndInfThanCountClass
-	 * 
-	 * @param name
-	 *            command name
-	 * @param in
-	 *            argin type
-	 * @param in_comments
-	 *            argin description
-	 * @param out
-	 *            argout type
-	 * @param out_comments
-	 *            argout description
-	 */
-	// ===============================================================
-	public GetAttDataSupAndInfThanCountClass(final String name, final int in, final int out, final String in_comments, final String out_comments) {
-		super(name, in, out, in_comments, out_comments);
-	}
-
-	// ===============================================================
-	/**
-	 * Constructor for Command class GetAttDataSupAndInfThanCountClass
-	 * 
-	 * @param name
-	 *            command name
-	 * @param in
-	 *            argin type
-	 * @param in_comments
-	 *            argin description
-	 * @param out
-	 *            argout type
-	 * @param out_comments
-	 *            argout description
-	 * @param level
-	 *            The command display type OPERATOR or EXPERT
-	 */
-	// ===============================================================
-	public GetAttDataSupAndInfThanCountClass(final String name, final int in, final int out, final String in_comments, final String out_comments, final DispLevel level) {
-		super(name, in, out, in_comments, out_comments, level);
-	}
-
-	// ===============================================================
-	/**
-	 * return the result of the device's command.
-	 */
-	// ===============================================================
-	@Override
-	public Any execute(final DeviceImpl device, final Any in_any) throws DevFailed {
-		Util.out2.println("GetAttDataSupAndInfThanCountClass.execute(): arrived");
-		final String[] argin = extract_DevVarStringArray(in_any);
-
-		if (!(device instanceof TdbExtractor)) {
-			Except.throw_exception("DEVICE_ERROR", "Device parameter is not instance of TdbExtractor", "TdbExtractor");
-		}
-
-		return insert(((TdbExtractor) device).get_att_data_sup_and_inf_than_count(argin));
-	}
-
-	// ===============================================================
-	/**
-	 * Check if it is allowed to execute the command.
-	 */
-	// ===============================================================
-	@Override
-	public boolean is_allowed(final DeviceImpl device, final Any data_in) {
-		// End of Generated Code
-
-		// Re-Start of Generated Code
-		return true;
-	}
-}
-
-// -----------------------------------------------------------------------------
-/*
- * end of $Source:
- * /cvsroot/tango-cs/archiving/server/hdbtdbArchivingServers/src/
- * main/java/TdbExtractor/GetAttDataSupAndInfThanCountClass.java,v $
- */
+//+======================================================================
+// $Source$
+//
+// Project:      Tango Device Server
+//
+// Description:  Java source code for the command TemplateClass of the
+//               TdbExtractor class.
+//
+// $Author: gramer $
+//
+// $Revision: 15443 $
+//
+// $Log$
+// Revision 1.3  2010/11/22 08:09:14  abeilleg
+// remove critical of findbugs
+//
+// Revision 1.2  2009/12/17 12:47:15  pierrejoseph
+// CheckStyle:  Organize imports / Format
+//
+// Revision 1.1  2008/02/28 15:37:13  pierrejoseph
+// TdbExtractor has been forgotten
+//
+// Revision 1.3  2005/11/29 16:13:31  chinkumo
+// Code reformated (pogo compatible)
+//
+// Revision 1.2  2005/11/15 13:45:16  chinkumo
+// ...
+//
+// Revision 1.1  2005/09/09 10:03:41  chinkumo
+// First commit !
+// (Dynamic attribut release)
+//
+//
+// copyleft :    European Synchrotron Radiation Facility
+//               BP 220, Grenoble 38043
+//               FRANCE
+//
+//-======================================================================
+//
+//  		This file is generated by POGO
+//	(Program Obviously used to Generate tango Object)
+//
+//         (c) - Software Engineering Group - ESRF
+//=============================================================================
+
+/**
+ * @author	$Author: gramer $
+ * @version	$Revision: 15443 $
+ */
+package TdbExtractor;
+
+import org.omg.CORBA.Any;
+
+import fr.esrf.Tango.DevFailed;
+import fr.esrf.Tango.DispLevel;
+import fr.esrf.TangoDs.Command;
+import fr.esrf.TangoDs.DeviceImpl;
+import fr.esrf.TangoDs.Except;
+import fr.esrf.TangoDs.TangoConst;
+import fr.esrf.TangoDs.Util;
+
+/**
+ * Class Description: Returns data that are highter than the given value x AND
+ * lower than the given value y.
+ */
+
+public class GetAttDataSupAndInfThanCountClass extends Command implements TangoConst {
+	// ===============================================================
+	/**
+	 * Constructor for Command class GetAttDataSupAndInfThanCountClass
+	 * 
+	 * @param name
+	 *            command name
+	 * @param in
+	 *            argin type
+	 * @param out
+	 *            argout type
+	 */
+	// ===============================================================
+	public GetAttDataSupAndInfThanCountClass(final String name, final int in, final int out) {
+		super(name, in, out);
+	}
+
+	// ===============================================================
+	/**
+	 * Constructor for Command class GetAttDataSupAndInfThanCountClass
+	 * 
+	 * @param name
+	 *            command name
+	 * @param in
+	 *            argin type
+	 * @param in_comments
+	 *            argin description
+	 * @param out
+	 *            argout type
+	 * @param out_comments
+	 *            argout description
+	 */
+	// ===============================================================
+	public GetAttDataSupAndInfThanCountClass(final String name, final int in, final int out, final String in_comments, final String out_comments) {
+		super(name, in, out, in_comments, out_comments);
+	}
+
+	// ===============================================================
+	/**
+	 * Constructor for Command class GetAttDataSupAndInfThanCountClass
+	 * 
+	 * @param name
+	 *            command name
+	 * @param in
+	 *            argin type
+	 * @param in_comments
+	 *            argin description
+	 * @param out
+	 *            argout type
+	 * @param out_comments
+	 *            argout description
+	 * @param level
+	 *            The command display type OPERATOR or EXPERT
+	 */
+	// ===============================================================
+	public GetAttDataSupAndInfThanCountClass(final String name, final int in, final int out, final String in_comments, final String out_comments, final DispLevel level) {
+		super(name, in, out, in_comments, out_comments, level);
+	}
+
+	// ===============================================================
+	/**
+	 * return the result of the device's command.
+	 */
+	// ===============================================================
+	@Override
+	public Any execute(final DeviceImpl device, final Any in_any) throws DevFailed {
+		Util.out2.println("GetAttDataSupAndInfThanCountClass.execute(): arrived");
+		final String[] argin = extract_DevVarStringArray(in_any);
+
+		if (!(device instanceof TdbExtractor)) {
+			Except.throw_exception("DEVICE_ERROR", "Device parameter is not instance of TdbExtractor", "TdbExtractor");
+		}
+
+		return insert(((TdbExtractor) device).get_att_data_sup_and_inf_than_count(argin));
+	}
+
+	// ===============================================================
+	/**
+	 * Check if it is allowed to execute the command.
+	 */
+	// ===============================================================
+	@Override
+	public boolean is_allowed(final DeviceImpl device, final Any data_in) {
+		// End of Generated Code
+
+		// Re-Start of Generated Code
+		return true;
+	}
+}
+
+// -----------------------------------------------------------------------------
+/*
+ * end of $Source:
+ * /cvsroot/tango-cs/archiving/server/hdbtdbArchivingServers/src/
+ * main/java/TdbExtractor/GetAttDataSupAndInfThanCountClass.java,v $
+ */
diff --git a/src/main/java/TdbExtractor/GetAttDataSupThanBetweenDatesClass.java b/tdbextractor/src/main/java/TdbExtractor/GetAttDataSupThanBetweenDatesClass.java
similarity index 94%
rename from src/main/java/TdbExtractor/GetAttDataSupThanBetweenDatesClass.java
rename to tdbextractor/src/main/java/TdbExtractor/GetAttDataSupThanBetweenDatesClass.java
index 4ede8c75b34af662cf2d7a7c3fb431db8befc1da..3a23da323716a59159867bdaf6b411add795bb48 100644
--- a/src/main/java/TdbExtractor/GetAttDataSupThanBetweenDatesClass.java
+++ b/tdbextractor/src/main/java/TdbExtractor/GetAttDataSupThanBetweenDatesClass.java
@@ -1,164 +1,164 @@
-//+======================================================================
-// $Source$
-//
-// Project:      Tango Device Server
-//
-// Description:  Java source code for the command TemplateClass of the
-//               TdbExtractor class.
-//
-// $Author$
-//
-// $Revision$
-//
-// $Log$
-// Revision 1.3  2010/11/22 08:09:14  abeilleg
-// remove critical of findbugs
-//
-// Revision 1.2  2009/12/17 12:47:15  pierrejoseph
-// CheckStyle:  Organize imports / Format
-//
-// Revision 1.1  2008/02/28 15:37:14  pierrejoseph
-// TdbExtractor has been forgotten
-//
-// Revision 1.3  2005/11/29 16:13:31  chinkumo
-// Code reformated (pogo compatible)
-//
-// Revision 1.2  2005/11/15 13:45:16  chinkumo
-// ...
-//
-// Revision 1.1  2005/09/09 10:03:41  chinkumo
-// First commit !
-// (Dynamic attribut release)
-//
-//
-// copyleft :    European Synchrotron Radiation Facility
-//               BP 220, Grenoble 38043
-//               FRANCE
-//
-//-======================================================================
-//
-//  		This file is generated by POGO
-//	(Program Obviously used to Generate tango Object)
-//
-//         (c) - Software Engineering Group - ESRF
-//=============================================================================
-
-/**
- * @author	$Author$
- * @version	$Revision$
- */
-package TdbExtractor;
-
-import org.omg.CORBA.Any;
-
-import fr.esrf.Tango.DevFailed;
-import fr.esrf.Tango.DispLevel;
-import fr.esrf.TangoDs.Command;
-import fr.esrf.TangoDs.DeviceImpl;
-import fr.esrf.TangoDs.Except;
-import fr.esrf.TangoDs.TangoConst;
-import fr.esrf.TangoDs.Util;
-
-/**
- * Class Description: Retrieves data beetwen two dates (date_1 & date_2) - Data
- * are higher than the given value x. Create a dynamic attribute, retrieve the
- * corresponding data from database and prepare result for attribute_history
- * call.
- */
-
-public class GetAttDataSupThanBetweenDatesClass extends Command implements TangoConst {
-	// ===============================================================
-	/**
-	 * Constructor for Command class GetAttDataSupThanBetweenDatesClass
-	 * 
-	 * @param name
-	 *            command name
-	 * @param in
-	 *            argin type
-	 * @param out
-	 *            argout type
-	 */
-	// ===============================================================
-	public GetAttDataSupThanBetweenDatesClass(final String name, final int in, final int out) {
-		super(name, in, out);
-	}
-
-	// ===============================================================
-	/**
-	 * Constructor for Command class GetAttDataSupThanBetweenDatesClass
-	 * 
-	 * @param name
-	 *            command name
-	 * @param in
-	 *            argin type
-	 * @param in_comments
-	 *            argin description
-	 * @param out
-	 *            argout type
-	 * @param out_comments
-	 *            argout description
-	 */
-	// ===============================================================
-	public GetAttDataSupThanBetweenDatesClass(final String name, final int in, final int out, final String in_comments, final String out_comments) {
-		super(name, in, out, in_comments, out_comments);
-	}
-
-	// ===============================================================
-	/**
-	 * Constructor for Command class GetAttDataSupThanBetweenDatesClass
-	 * 
-	 * @param name
-	 *            command name
-	 * @param in
-	 *            argin type
-	 * @param in_comments
-	 *            argin description
-	 * @param out
-	 *            argout type
-	 * @param out_comments
-	 *            argout description
-	 * @param level
-	 *            The command display type OPERATOR or EXPERT
-	 */
-	// ===============================================================
-	public GetAttDataSupThanBetweenDatesClass(final String name, final int in, final int out, final String in_comments, final String out_comments, final DispLevel level) {
-		super(name, in, out, in_comments, out_comments, level);
-	}
-
-	// ===============================================================
-	/**
-	 * return the result of the device's command.
-	 */
-	// ===============================================================
-	@Override
-	public Any execute(final DeviceImpl device, final Any in_any) throws DevFailed {
-		Util.out2.println("GetAttDataSupThanBetweenDatesClass.execute(): arrived");
-		final String[] argin = extract_DevVarStringArray(in_any);
-
-		if (!(device instanceof TdbExtractor)) {
-			Except.throw_exception("DEVICE_ERROR", "Device parameter is not instance of TdbExtractor", "TdbExtractor");
-		}
-
-		return insert(((TdbExtractor) device).get_att_data_sup_than_between_dates(argin));
-	}
-
-	// ===============================================================
-	/**
-	 * Check if it is allowed to execute the command.
-	 */
-	// ===============================================================
-	@Override
-	public boolean is_allowed(final DeviceImpl device, final Any data_in) {
-		// End of Generated Code
-
-		// Re-Start of Generated Code
-		return true;
-	}
-}
-
-// -----------------------------------------------------------------------------
-/*
- * end of $Source:
- * /cvsroot/tango-cs/archiving/server/hdbtdbArchivingServers/src/
- * main/java/TdbExtractor/GetAttDataSupThanBetweenDatesClass.java,v $
- */
+//+======================================================================
+// $Source$
+//
+// Project:      Tango Device Server
+//
+// Description:  Java source code for the command TemplateClass of the
+//               TdbExtractor class.
+//
+// $Author: gramer $
+//
+// $Revision: 15443 $
+//
+// $Log$
+// Revision 1.3  2010/11/22 08:09:14  abeilleg
+// remove critical of findbugs
+//
+// Revision 1.2  2009/12/17 12:47:15  pierrejoseph
+// CheckStyle:  Organize imports / Format
+//
+// Revision 1.1  2008/02/28 15:37:14  pierrejoseph
+// TdbExtractor has been forgotten
+//
+// Revision 1.3  2005/11/29 16:13:31  chinkumo
+// Code reformated (pogo compatible)
+//
+// Revision 1.2  2005/11/15 13:45:16  chinkumo
+// ...
+//
+// Revision 1.1  2005/09/09 10:03:41  chinkumo
+// First commit !
+// (Dynamic attribut release)
+//
+//
+// copyleft :    European Synchrotron Radiation Facility
+//               BP 220, Grenoble 38043
+//               FRANCE
+//
+//-======================================================================
+//
+//  		This file is generated by POGO
+//	(Program Obviously used to Generate tango Object)
+//
+//         (c) - Software Engineering Group - ESRF
+//=============================================================================
+
+/**
+ * @author	$Author: gramer $
+ * @version	$Revision: 15443 $
+ */
+package TdbExtractor;
+
+import org.omg.CORBA.Any;
+
+import fr.esrf.Tango.DevFailed;
+import fr.esrf.Tango.DispLevel;
+import fr.esrf.TangoDs.Command;
+import fr.esrf.TangoDs.DeviceImpl;
+import fr.esrf.TangoDs.Except;
+import fr.esrf.TangoDs.TangoConst;
+import fr.esrf.TangoDs.Util;
+
+/**
+ * Class Description: Retrieves data beetwen two dates (date_1 & date_2) - Data
+ * are higher than the given value x. Create a dynamic attribute, retrieve the
+ * corresponding data from database and prepare result for attribute_history
+ * call.
+ */
+
+public class GetAttDataSupThanBetweenDatesClass extends Command implements TangoConst {
+	// ===============================================================
+	/**
+	 * Constructor for Command class GetAttDataSupThanBetweenDatesClass
+	 * 
+	 * @param name
+	 *            command name
+	 * @param in
+	 *            argin type
+	 * @param out
+	 *            argout type
+	 */
+	// ===============================================================
+	public GetAttDataSupThanBetweenDatesClass(final String name, final int in, final int out) {
+		super(name, in, out);
+	}
+
+	// ===============================================================
+	/**
+	 * Constructor for Command class GetAttDataSupThanBetweenDatesClass
+	 * 
+	 * @param name
+	 *            command name
+	 * @param in
+	 *            argin type
+	 * @param in_comments
+	 *            argin description
+	 * @param out
+	 *            argout type
+	 * @param out_comments
+	 *            argout description
+	 */
+	// ===============================================================
+	public GetAttDataSupThanBetweenDatesClass(final String name, final int in, final int out, final String in_comments, final String out_comments) {
+		super(name, in, out, in_comments, out_comments);
+	}
+
+	// ===============================================================
+	/**
+	 * Constructor for Command class GetAttDataSupThanBetweenDatesClass
+	 * 
+	 * @param name
+	 *            command name
+	 * @param in
+	 *            argin type
+	 * @param in_comments
+	 *            argin description
+	 * @param out
+	 *            argout type
+	 * @param out_comments
+	 *            argout description
+	 * @param level
+	 *            The command display type OPERATOR or EXPERT
+	 */
+	// ===============================================================
+	public GetAttDataSupThanBetweenDatesClass(final String name, final int in, final int out, final String in_comments, final String out_comments, final DispLevel level) {
+		super(name, in, out, in_comments, out_comments, level);
+	}
+
+	// ===============================================================
+	/**
+	 * return the result of the device's command.
+	 */
+	// ===============================================================
+	@Override
+	public Any execute(final DeviceImpl device, final Any in_any) throws DevFailed {
+		Util.out2.println("GetAttDataSupThanBetweenDatesClass.execute(): arrived");
+		final String[] argin = extract_DevVarStringArray(in_any);
+
+		if (!(device instanceof TdbExtractor)) {
+			Except.throw_exception("DEVICE_ERROR", "Device parameter is not instance of TdbExtractor", "TdbExtractor");
+		}
+
+		return insert(((TdbExtractor) device).get_att_data_sup_than_between_dates(argin));
+	}
+
+	// ===============================================================
+	/**
+	 * Check if it is allowed to execute the command.
+	 */
+	// ===============================================================
+	@Override
+	public boolean is_allowed(final DeviceImpl device, final Any data_in) {
+		// End of Generated Code
+
+		// Re-Start of Generated Code
+		return true;
+	}
+}
+
+// -----------------------------------------------------------------------------
+/*
+ * end of $Source:
+ * /cvsroot/tango-cs/archiving/server/hdbtdbArchivingServers/src/
+ * main/java/TdbExtractor/GetAttDataSupThanBetweenDatesClass.java,v $
+ */
diff --git a/src/main/java/TdbExtractor/GetAttDataSupThanBetweenDatesCountClass.java b/tdbextractor/src/main/java/TdbExtractor/GetAttDataSupThanBetweenDatesCountClass.java
similarity index 94%
rename from src/main/java/TdbExtractor/GetAttDataSupThanBetweenDatesCountClass.java
rename to tdbextractor/src/main/java/TdbExtractor/GetAttDataSupThanBetweenDatesCountClass.java
index a7bbf42d4e233abc428570363afe5aba7d7b16a5..3facea72e914739b2b3c3ebec9854219a7e52d8c 100644
--- a/src/main/java/TdbExtractor/GetAttDataSupThanBetweenDatesCountClass.java
+++ b/tdbextractor/src/main/java/TdbExtractor/GetAttDataSupThanBetweenDatesCountClass.java
@@ -1,162 +1,162 @@
-//+======================================================================
-// $Source$
-//
-// Project:      Tango Device Server
-//
-// Description:  Java source code for the command TemplateClass of the
-//               TdbExtractor class.
-//
-// $Author$
-//
-// $Revision$
-//
-// $Log$
-// Revision 1.3  2010/11/22 08:09:15  abeilleg
-// remove critical of findbugs
-//
-// Revision 1.2  2009/12/17 12:47:15  pierrejoseph
-// CheckStyle:  Organize imports / Format
-//
-// Revision 1.1  2008/02/28 15:37:14  pierrejoseph
-// TdbExtractor has been forgotten
-//
-// Revision 1.3  2005/11/29 16:13:31  chinkumo
-// Code reformated (pogo compatible)
-//
-// Revision 1.2  2005/11/15 13:45:16  chinkumo
-// ...
-//
-// Revision 1.1  2005/09/09 10:03:41  chinkumo
-// First commit !
-// (Dynamic attribut release)
-//
-//
-// copyleft :    European Synchrotron Radiation Facility
-//               BP 220, Grenoble 38043
-//               FRANCE
-//
-//-======================================================================
-//
-//  		This file is generated by POGO
-//	(Program Obviously used to Generate tango Object)
-//
-//         (c) - Software Engineering Group - ESRF
-//=============================================================================
-
-/**
- * @author	$Author$
- * @version	$Revision$
- */
-package TdbExtractor;
-
-import org.omg.CORBA.Any;
-
-import fr.esrf.Tango.DevFailed;
-import fr.esrf.Tango.DispLevel;
-import fr.esrf.TangoDs.Command;
-import fr.esrf.TangoDs.DeviceImpl;
-import fr.esrf.TangoDs.Except;
-import fr.esrf.TangoDs.TangoConst;
-import fr.esrf.TangoDs.Util;
-
-/**
- * Class Description: Returns the number of data higher than the given value y,
- * and beetwen two dates (date_1 & date_2).
- */
-
-public class GetAttDataSupThanBetweenDatesCountClass extends Command implements TangoConst {
-	// ===============================================================
-	/**
-	 * Constructor for Command class GetAttDataSupThanBetweenDatesCountClass
-	 * 
-	 * @param name
-	 *            command name
-	 * @param in
-	 *            argin type
-	 * @param out
-	 *            argout type
-	 */
-	// ===============================================================
-	public GetAttDataSupThanBetweenDatesCountClass(final String name, final int in, final int out) {
-		super(name, in, out);
-	}
-
-	// ===============================================================
-	/**
-	 * Constructor for Command class GetAttDataSupThanBetweenDatesCountClass
-	 * 
-	 * @param name
-	 *            command name
-	 * @param in
-	 *            argin type
-	 * @param in_comments
-	 *            argin description
-	 * @param out
-	 *            argout type
-	 * @param out_comments
-	 *            argout description
-	 */
-	// ===============================================================
-	public GetAttDataSupThanBetweenDatesCountClass(final String name, final int in, final int out, final String in_comments, final String out_comments) {
-		super(name, in, out, in_comments, out_comments);
-	}
-
-	// ===============================================================
-	/**
-	 * Constructor for Command class GetAttDataSupThanBetweenDatesCountClass
-	 * 
-	 * @param name
-	 *            command name
-	 * @param in
-	 *            argin type
-	 * @param in_comments
-	 *            argin description
-	 * @param out
-	 *            argout type
-	 * @param out_comments
-	 *            argout description
-	 * @param level
-	 *            The command display type OPERATOR or EXPERT
-	 */
-	// ===============================================================
-	public GetAttDataSupThanBetweenDatesCountClass(final String name, final int in, final int out, final String in_comments, final String out_comments, final DispLevel level) {
-		super(name, in, out, in_comments, out_comments, level);
-	}
-
-	// ===============================================================
-	/**
-	 * return the result of the device's command.
-	 */
-	// ===============================================================
-	@Override
-	public Any execute(final DeviceImpl device, final Any in_any) throws DevFailed {
-		Util.out2.println("GetAttDataSupThanBetweenDatesCountClass.execute(): arrived");
-		final String[] argin = extract_DevVarStringArray(in_any);
-
-		if (!(device instanceof TdbExtractor)) {
-			Except.throw_exception("DEVICE_ERROR", "Device parameter is not instance of TdbExtractor", "TdbExtractor");
-		}
-
-		return insert(((TdbExtractor) device).get_att_data_sup_than_between_dates_count(argin));
-	}
-
-	// ===============================================================
-	/**
-	 * Check if it is allowed to execute the command.
-	 */
-	// ===============================================================
-	@Override
-	public boolean is_allowed(final DeviceImpl device, final Any data_in) {
-		// End of Generated Code
-
-		// Re-Start of Generated Code
-		return true;
-	}
-}
-
-// -----------------------------------------------------------------------------
-/*
- * end of $Source:
- * /cvsroot/tango-cs/archiving/server/hdbtdbArchivingServers/src/
- * main/java/TdbExtractor/GetAttDataSupThanBetweenDatesCountClass.java,v $
- */
+//+======================================================================
+// $Source$
+//
+// Project:      Tango Device Server
+//
+// Description:  Java source code for the command TemplateClass of the
+//               TdbExtractor class.
+//
+// $Author: gramer $
+//
+// $Revision: 15443 $
+//
+// $Log$
+// Revision 1.3  2010/11/22 08:09:15  abeilleg
+// remove critical of findbugs
+//
+// Revision 1.2  2009/12/17 12:47:15  pierrejoseph
+// CheckStyle:  Organize imports / Format
+//
+// Revision 1.1  2008/02/28 15:37:14  pierrejoseph
+// TdbExtractor has been forgotten
+//
+// Revision 1.3  2005/11/29 16:13:31  chinkumo
+// Code reformated (pogo compatible)
+//
+// Revision 1.2  2005/11/15 13:45:16  chinkumo
+// ...
+//
+// Revision 1.1  2005/09/09 10:03:41  chinkumo
+// First commit !
+// (Dynamic attribut release)
+//
+//
+// copyleft :    European Synchrotron Radiation Facility
+//               BP 220, Grenoble 38043
+//               FRANCE
+//
+//-======================================================================
+//
+//  		This file is generated by POGO
+//	(Program Obviously used to Generate tango Object)
+//
+//         (c) - Software Engineering Group - ESRF
+//=============================================================================
+
+/**
+ * @author	$Author: gramer $
+ * @version	$Revision: 15443 $
+ */
+package TdbExtractor;
+
+import org.omg.CORBA.Any;
+
+import fr.esrf.Tango.DevFailed;
+import fr.esrf.Tango.DispLevel;
+import fr.esrf.TangoDs.Command;
+import fr.esrf.TangoDs.DeviceImpl;
+import fr.esrf.TangoDs.Except;
+import fr.esrf.TangoDs.TangoConst;
+import fr.esrf.TangoDs.Util;
+
+/**
+ * Class Description: Returns the number of data higher than the given value y,
+ * and beetwen two dates (date_1 & date_2).
+ */
+
+public class GetAttDataSupThanBetweenDatesCountClass extends Command implements TangoConst {
+	// ===============================================================
+	/**
+	 * Constructor for Command class GetAttDataSupThanBetweenDatesCountClass
+	 * 
+	 * @param name
+	 *            command name
+	 * @param in
+	 *            argin type
+	 * @param out
+	 *            argout type
+	 */
+	// ===============================================================
+	public GetAttDataSupThanBetweenDatesCountClass(final String name, final int in, final int out) {
+		super(name, in, out);
+	}
+
+	// ===============================================================
+	/**
+	 * Constructor for Command class GetAttDataSupThanBetweenDatesCountClass
+	 * 
+	 * @param name
+	 *            command name
+	 * @param in
+	 *            argin type
+	 * @param in_comments
+	 *            argin description
+	 * @param out
+	 *            argout type
+	 * @param out_comments
+	 *            argout description
+	 */
+	// ===============================================================
+	public GetAttDataSupThanBetweenDatesCountClass(final String name, final int in, final int out, final String in_comments, final String out_comments) {
+		super(name, in, out, in_comments, out_comments);
+	}
+
+	// ===============================================================
+	/**
+	 * Constructor for Command class GetAttDataSupThanBetweenDatesCountClass
+	 * 
+	 * @param name
+	 *            command name
+	 * @param in
+	 *            argin type
+	 * @param in_comments
+	 *            argin description
+	 * @param out
+	 *            argout type
+	 * @param out_comments
+	 *            argout description
+	 * @param level
+	 *            The command display type OPERATOR or EXPERT
+	 */
+	// ===============================================================
+	public GetAttDataSupThanBetweenDatesCountClass(final String name, final int in, final int out, final String in_comments, final String out_comments, final DispLevel level) {
+		super(name, in, out, in_comments, out_comments, level);
+	}
+
+	// ===============================================================
+	/**
+	 * return the result of the device's command.
+	 */
+	// ===============================================================
+	@Override
+	public Any execute(final DeviceImpl device, final Any in_any) throws DevFailed {
+		Util.out2.println("GetAttDataSupThanBetweenDatesCountClass.execute(): arrived");
+		final String[] argin = extract_DevVarStringArray(in_any);
+
+		if (!(device instanceof TdbExtractor)) {
+			Except.throw_exception("DEVICE_ERROR", "Device parameter is not instance of TdbExtractor", "TdbExtractor");
+		}
+
+		return insert(((TdbExtractor) device).get_att_data_sup_than_between_dates_count(argin));
+	}
+
+	// ===============================================================
+	/**
+	 * Check if it is allowed to execute the command.
+	 */
+	// ===============================================================
+	@Override
+	public boolean is_allowed(final DeviceImpl device, final Any data_in) {
+		// End of Generated Code
+
+		// Re-Start of Generated Code
+		return true;
+	}
+}
+
+// -----------------------------------------------------------------------------
+/*
+ * end of $Source:
+ * /cvsroot/tango-cs/archiving/server/hdbtdbArchivingServers/src/
+ * main/java/TdbExtractor/GetAttDataSupThanBetweenDatesCountClass.java,v $
+ */
diff --git a/src/main/java/TdbExtractor/GetAttDataSupThanClass.java b/tdbextractor/src/main/java/TdbExtractor/GetAttDataSupThanClass.java
similarity index 94%
rename from src/main/java/TdbExtractor/GetAttDataSupThanClass.java
rename to tdbextractor/src/main/java/TdbExtractor/GetAttDataSupThanClass.java
index ef71cc7579d196276d1b79d047b42962dc5968df..59b8fe2841809ff5527a4fb473ad8d650a66bbe1 100644
--- a/src/main/java/TdbExtractor/GetAttDataSupThanClass.java
+++ b/tdbextractor/src/main/java/TdbExtractor/GetAttDataSupThanClass.java
@@ -1,163 +1,163 @@
-//+======================================================================
-// $Source$
-//
-// Project:      Tango Device Server
-//
-// Description:  Java source code for the command TemplateClass of the
-//               TdbExtractor class.
-//
-// $Author$
-//
-// $Revision$
-//
-// $Log$
-// Revision 1.3  2010/11/22 08:09:15  abeilleg
-// remove critical of findbugs
-//
-// Revision 1.2  2009/12/17 12:47:15  pierrejoseph
-// CheckStyle:  Organize imports / Format
-//
-// Revision 1.1  2008/02/28 15:37:14  pierrejoseph
-// TdbExtractor has been forgotten
-//
-// Revision 1.3  2005/11/29 16:13:31  chinkumo
-// Code reformated (pogo compatible)
-//
-// Revision 1.2  2005/11/15 13:45:16  chinkumo
-// ...
-//
-// Revision 1.1  2005/09/09 10:03:41  chinkumo
-// First commit !
-// (Dynamic attribut release)
-//
-//
-// copyleft :    European Synchrotron Radiation Facility
-//               BP 220, Grenoble 38043
-//               FRANCE
-//
-//-======================================================================
-//
-//  		This file is generated by POGO
-//	(Program Obviously used to Generate tango Object)
-//
-//         (c) - Software Engineering Group - ESRF
-//=============================================================================
-
-/**
- * @author	$Author$
- * @version	$Revision$
- */
-package TdbExtractor;
-
-import org.omg.CORBA.Any;
-
-import fr.esrf.Tango.DevFailed;
-import fr.esrf.Tango.DispLevel;
-import fr.esrf.TangoDs.Command;
-import fr.esrf.TangoDs.DeviceImpl;
-import fr.esrf.TangoDs.Except;
-import fr.esrf.TangoDs.TangoConst;
-import fr.esrf.TangoDs.Util;
-
-/**
- * Class Description: Retrieves all the data that are higher than the given
- * value x. Create a dynamic attribute, retrieve the corresponding data from
- * database and prepare result for attribute_history call.
- */
-
-public class GetAttDataSupThanClass extends Command implements TangoConst {
-	// ===============================================================
-	/**
-	 * Constructor for Command class GetAttDataSupThanClass
-	 * 
-	 * @param name
-	 *            command name
-	 * @param in
-	 *            argin type
-	 * @param out
-	 *            argout type
-	 */
-	// ===============================================================
-	public GetAttDataSupThanClass(final String name, final int in, final int out) {
-		super(name, in, out);
-	}
-
-	// ===============================================================
-	/**
-	 * Constructor for Command class GetAttDataSupThanClass
-	 * 
-	 * @param name
-	 *            command name
-	 * @param in
-	 *            argin type
-	 * @param in_comments
-	 *            argin description
-	 * @param out
-	 *            argout type
-	 * @param out_comments
-	 *            argout description
-	 */
-	// ===============================================================
-	public GetAttDataSupThanClass(final String name, final int in, final int out, final String in_comments, final String out_comments) {
-		super(name, in, out, in_comments, out_comments);
-	}
-
-	// ===============================================================
-	/**
-	 * Constructor for Command class GetAttDataSupThanClass
-	 * 
-	 * @param name
-	 *            command name
-	 * @param in
-	 *            argin type
-	 * @param in_comments
-	 *            argin description
-	 * @param out
-	 *            argout type
-	 * @param out_comments
-	 *            argout description
-	 * @param level
-	 *            The command display type OPERATOR or EXPERT
-	 */
-	// ===============================================================
-	public GetAttDataSupThanClass(final String name, final int in, final int out, final String in_comments, final String out_comments, final DispLevel level) {
-		super(name, in, out, in_comments, out_comments, level);
-	}
-
-	// ===============================================================
-	/**
-	 * return the result of the device's command.
-	 */
-	// ===============================================================
-	@Override
-	public Any execute(final DeviceImpl device, final Any in_any) throws DevFailed {
-		Util.out2.println("GetAttDataSupThanClass.execute(): arrived");
-		final String[] argin = extract_DevVarStringArray(in_any);
-
-		if (!(device instanceof TdbExtractor)) {
-			Except.throw_exception("DEVICE_ERROR", "Device parameter is not instance of TdbExtractor", "TdbExtractor");
-		}
-
-		return insert(((TdbExtractor) device).get_att_data_sup_than(argin));
-	}
-
-	// ===============================================================
-	/**
-	 * Check if it is allowed to execute the command.
-	 */
-	// ===============================================================
-	@Override
-	public boolean is_allowed(final DeviceImpl device, final Any data_in) {
-		// End of Generated Code
-
-		// Re-Start of Generated Code
-		return true;
-	}
-}
-
-// -----------------------------------------------------------------------------
-/*
- * end of $Source:
- * /cvsroot/tango-cs/archiving/server/hdbtdbArchivingServers/src/
- * main/java/TdbExtractor/GetAttDataSupThanClass.java,v $
- */
+//+======================================================================
+// $Source$
+//
+// Project:      Tango Device Server
+//
+// Description:  Java source code for the command TemplateClass of the
+//               TdbExtractor class.
+//
+// $Author: gramer $
+//
+// $Revision: 15443 $
+//
+// $Log$
+// Revision 1.3  2010/11/22 08:09:15  abeilleg
+// remove critical of findbugs
+//
+// Revision 1.2  2009/12/17 12:47:15  pierrejoseph
+// CheckStyle:  Organize imports / Format
+//
+// Revision 1.1  2008/02/28 15:37:14  pierrejoseph
+// TdbExtractor has been forgotten
+//
+// Revision 1.3  2005/11/29 16:13:31  chinkumo
+// Code reformated (pogo compatible)
+//
+// Revision 1.2  2005/11/15 13:45:16  chinkumo
+// ...
+//
+// Revision 1.1  2005/09/09 10:03:41  chinkumo
+// First commit !
+// (Dynamic attribut release)
+//
+//
+// copyleft :    European Synchrotron Radiation Facility
+//               BP 220, Grenoble 38043
+//               FRANCE
+//
+//-======================================================================
+//
+//  		This file is generated by POGO
+//	(Program Obviously used to Generate tango Object)
+//
+//         (c) - Software Engineering Group - ESRF
+//=============================================================================
+
+/**
+ * @author	$Author: gramer $
+ * @version	$Revision: 15443 $
+ */
+package TdbExtractor;
+
+import org.omg.CORBA.Any;
+
+import fr.esrf.Tango.DevFailed;
+import fr.esrf.Tango.DispLevel;
+import fr.esrf.TangoDs.Command;
+import fr.esrf.TangoDs.DeviceImpl;
+import fr.esrf.TangoDs.Except;
+import fr.esrf.TangoDs.TangoConst;
+import fr.esrf.TangoDs.Util;
+
+/**
+ * Class Description: Retrieves all the data that are higher than the given
+ * value x. Create a dynamic attribute, retrieve the corresponding data from
+ * database and prepare result for attribute_history call.
+ */
+
+public class GetAttDataSupThanClass extends Command implements TangoConst {
+	// ===============================================================
+	/**
+	 * Constructor for Command class GetAttDataSupThanClass
+	 * 
+	 * @param name
+	 *            command name
+	 * @param in
+	 *            argin type
+	 * @param out
+	 *            argout type
+	 */
+	// ===============================================================
+	public GetAttDataSupThanClass(final String name, final int in, final int out) {
+		super(name, in, out);
+	}
+
+	// ===============================================================
+	/**
+	 * Constructor for Command class GetAttDataSupThanClass
+	 * 
+	 * @param name
+	 *            command name
+	 * @param in
+	 *            argin type
+	 * @param in_comments
+	 *            argin description
+	 * @param out
+	 *            argout type
+	 * @param out_comments
+	 *            argout description
+	 */
+	// ===============================================================
+	public GetAttDataSupThanClass(final String name, final int in, final int out, final String in_comments, final String out_comments) {
+		super(name, in, out, in_comments, out_comments);
+	}
+
+	// ===============================================================
+	/**
+	 * Constructor for Command class GetAttDataSupThanClass
+	 * 
+	 * @param name
+	 *            command name
+	 * @param in
+	 *            argin type
+	 * @param in_comments
+	 *            argin description
+	 * @param out
+	 *            argout type
+	 * @param out_comments
+	 *            argout description
+	 * @param level
+	 *            The command display type OPERATOR or EXPERT
+	 */
+	// ===============================================================
+	public GetAttDataSupThanClass(final String name, final int in, final int out, final String in_comments, final String out_comments, final DispLevel level) {
+		super(name, in, out, in_comments, out_comments, level);
+	}
+
+	// ===============================================================
+	/**
+	 * return the result of the device's command.
+	 */
+	// ===============================================================
+	@Override
+	public Any execute(final DeviceImpl device, final Any in_any) throws DevFailed {
+		Util.out2.println("GetAttDataSupThanClass.execute(): arrived");
+		final String[] argin = extract_DevVarStringArray(in_any);
+
+		if (!(device instanceof TdbExtractor)) {
+			Except.throw_exception("DEVICE_ERROR", "Device parameter is not instance of TdbExtractor", "TdbExtractor");
+		}
+
+		return insert(((TdbExtractor) device).get_att_data_sup_than(argin));
+	}
+
+	// ===============================================================
+	/**
+	 * Check if it is allowed to execute the command.
+	 */
+	// ===============================================================
+	@Override
+	public boolean is_allowed(final DeviceImpl device, final Any data_in) {
+		// End of Generated Code
+
+		// Re-Start of Generated Code
+		return true;
+	}
+}
+
+// -----------------------------------------------------------------------------
+/*
+ * end of $Source:
+ * /cvsroot/tango-cs/archiving/server/hdbtdbArchivingServers/src/
+ * main/java/TdbExtractor/GetAttDataSupThanClass.java,v $
+ */
diff --git a/src/main/java/TdbExtractor/GetAttDataSupThanCountClass.java b/tdbextractor/src/main/java/TdbExtractor/GetAttDataSupThanCountClass.java
similarity index 94%
rename from src/main/java/TdbExtractor/GetAttDataSupThanCountClass.java
rename to tdbextractor/src/main/java/TdbExtractor/GetAttDataSupThanCountClass.java
index ba6b6e2982568ede5bb432d9afeed831bc6c9422..7948edf542aaa889f670cf6afcba3407e50afe12 100644
--- a/src/main/java/TdbExtractor/GetAttDataSupThanCountClass.java
+++ b/tdbextractor/src/main/java/TdbExtractor/GetAttDataSupThanCountClass.java
@@ -1,161 +1,161 @@
-//+======================================================================
-// $Source$
-//
-// Project:      Tango Device Server
-//
-// Description:  Java source code for the command TemplateClass of the
-//               TdbExtractor class.
-//
-// $Author$
-//
-// $Revision$
-//
-// $Log$
-// Revision 1.3  2010/11/22 08:09:15  abeilleg
-// remove critical of findbugs
-//
-// Revision 1.2  2009/12/17 12:47:15  pierrejoseph
-// CheckStyle:  Organize imports / Format
-//
-// Revision 1.1  2008/02/28 15:37:14  pierrejoseph
-// TdbExtractor has been forgotten
-//
-// Revision 1.3  2005/11/29 16:13:31  chinkumo
-// Code reformated (pogo compatible)
-//
-// Revision 1.2  2005/11/15 13:45:16  chinkumo
-// ...
-//
-// Revision 1.1  2005/09/09 10:03:41  chinkumo
-// First commit !
-// (Dynamic attribut release)
-//
-//
-// copyleft :    European Synchrotron Radiation Facility
-//               BP 220, Grenoble 38043
-//               FRANCE
-//
-//-======================================================================
-//
-//  		This file is generated by POGO
-//	(Program Obviously used to Generate tango Object)
-//
-//         (c) - Software Engineering Group - ESRF
-//=============================================================================
-
-/**
- * @author	$Author$
- * @version	$Revision$
- */
-package TdbExtractor;
-
-import org.omg.CORBA.Any;
-
-import fr.esrf.Tango.DevFailed;
-import fr.esrf.Tango.DispLevel;
-import fr.esrf.TangoDs.Command;
-import fr.esrf.TangoDs.DeviceImpl;
-import fr.esrf.TangoDs.Except;
-import fr.esrf.TangoDs.TangoConst;
-import fr.esrf.TangoDs.Util;
-
-/**
- * Class Description: Returns the number of data higher than the given value.
- */
-
-public class GetAttDataSupThanCountClass extends Command implements TangoConst {
-	// ===============================================================
-	/**
-	 * Constructor for Command class GetAttDataSupThanCountClass
-	 * 
-	 * @param name
-	 *            command name
-	 * @param in
-	 *            argin type
-	 * @param out
-	 *            argout type
-	 */
-	// ===============================================================
-	public GetAttDataSupThanCountClass(final String name, final int in, final int out) {
-		super(name, in, out);
-	}
-
-	// ===============================================================
-	/**
-	 * Constructor for Command class GetAttDataSupThanCountClass
-	 * 
-	 * @param name
-	 *            command name
-	 * @param in
-	 *            argin type
-	 * @param in_comments
-	 *            argin description
-	 * @param out
-	 *            argout type
-	 * @param out_comments
-	 *            argout description
-	 */
-	// ===============================================================
-	public GetAttDataSupThanCountClass(final String name, final int in, final int out, final String in_comments, final String out_comments) {
-		super(name, in, out, in_comments, out_comments);
-	}
-
-	// ===============================================================
-	/**
-	 * Constructor for Command class GetAttDataSupThanCountClass
-	 * 
-	 * @param name
-	 *            command name
-	 * @param in
-	 *            argin type
-	 * @param in_comments
-	 *            argin description
-	 * @param out
-	 *            argout type
-	 * @param out_comments
-	 *            argout description
-	 * @param level
-	 *            The command display type OPERATOR or EXPERT
-	 */
-	// ===============================================================
-	public GetAttDataSupThanCountClass(final String name, final int in, final int out, final String in_comments, final String out_comments, final DispLevel level) {
-		super(name, in, out, in_comments, out_comments, level);
-	}
-
-	// ===============================================================
-	/**
-	 * return the result of the device's command.
-	 */
-	// ===============================================================
-	@Override
-	public Any execute(final DeviceImpl device, final Any in_any) throws DevFailed {
-		Util.out2.println("GetAttDataSupThanCountClass.execute(): arrived");
-		final String[] argin = extract_DevVarStringArray(in_any);
-
-		if (!(device instanceof TdbExtractor)) {
-			Except.throw_exception("DEVICE_ERROR", "Device parameter is not instance of TdbExtractor", "TdbExtractor");
-		}
-
-		return insert(((TdbExtractor) device).get_att_data_sup_than_count(argin));
-	}
-
-	// ===============================================================
-	/**
-	 * Check if it is allowed to execute the command.
-	 */
-	// ===============================================================
-	@Override
-	public boolean is_allowed(final DeviceImpl device, final Any data_in) {
-		// End of Generated Code
-
-		// Re-Start of Generated Code
-		return true;
-	}
-}
-
-// -----------------------------------------------------------------------------
-/*
- * end of $Source:
- * /cvsroot/tango-cs/archiving/server/hdbtdbArchivingServers/src/
- * main/java/TdbExtractor/GetAttDataSupThanCountClass.java,v $
- */
+//+======================================================================
+// $Source$
+//
+// Project:      Tango Device Server
+//
+// Description:  Java source code for the command TemplateClass of the
+//               TdbExtractor class.
+//
+// $Author: gramer $
+//
+// $Revision: 15443 $
+//
+// $Log$
+// Revision 1.3  2010/11/22 08:09:15  abeilleg
+// remove critical of findbugs
+//
+// Revision 1.2  2009/12/17 12:47:15  pierrejoseph
+// CheckStyle:  Organize imports / Format
+//
+// Revision 1.1  2008/02/28 15:37:14  pierrejoseph
+// TdbExtractor has been forgotten
+//
+// Revision 1.3  2005/11/29 16:13:31  chinkumo
+// Code reformated (pogo compatible)
+//
+// Revision 1.2  2005/11/15 13:45:16  chinkumo
+// ...
+//
+// Revision 1.1  2005/09/09 10:03:41  chinkumo
+// First commit !
+// (Dynamic attribut release)
+//
+//
+// copyleft :    European Synchrotron Radiation Facility
+//               BP 220, Grenoble 38043
+//               FRANCE
+//
+//-======================================================================
+//
+//  		This file is generated by POGO
+//	(Program Obviously used to Generate tango Object)
+//
+//         (c) - Software Engineering Group - ESRF
+//=============================================================================
+
+/**
+ * @author	$Author: gramer $
+ * @version	$Revision: 15443 $
+ */
+package TdbExtractor;
+
+import org.omg.CORBA.Any;
+
+import fr.esrf.Tango.DevFailed;
+import fr.esrf.Tango.DispLevel;
+import fr.esrf.TangoDs.Command;
+import fr.esrf.TangoDs.DeviceImpl;
+import fr.esrf.TangoDs.Except;
+import fr.esrf.TangoDs.TangoConst;
+import fr.esrf.TangoDs.Util;
+
+/**
+ * Class Description: Returns the number of data higher than the given value.
+ */
+
+public class GetAttDataSupThanCountClass extends Command implements TangoConst {
+	// ===============================================================
+	/**
+	 * Constructor for Command class GetAttDataSupThanCountClass
+	 * 
+	 * @param name
+	 *            command name
+	 * @param in
+	 *            argin type
+	 * @param out
+	 *            argout type
+	 */
+	// ===============================================================
+	public GetAttDataSupThanCountClass(final String name, final int in, final int out) {
+		super(name, in, out);
+	}
+
+	// ===============================================================
+	/**
+	 * Constructor for Command class GetAttDataSupThanCountClass
+	 * 
+	 * @param name
+	 *            command name
+	 * @param in
+	 *            argin type
+	 * @param in_comments
+	 *            argin description
+	 * @param out
+	 *            argout type
+	 * @param out_comments
+	 *            argout description
+	 */
+	// ===============================================================
+	public GetAttDataSupThanCountClass(final String name, final int in, final int out, final String in_comments, final String out_comments) {
+		super(name, in, out, in_comments, out_comments);
+	}
+
+	// ===============================================================
+	/**
+	 * Constructor for Command class GetAttDataSupThanCountClass
+	 * 
+	 * @param name
+	 *            command name
+	 * @param in
+	 *            argin type
+	 * @param in_comments
+	 *            argin description
+	 * @param out
+	 *            argout type
+	 * @param out_comments
+	 *            argout description
+	 * @param level
+	 *            The command display type OPERATOR or EXPERT
+	 */
+	// ===============================================================
+	public GetAttDataSupThanCountClass(final String name, final int in, final int out, final String in_comments, final String out_comments, final DispLevel level) {
+		super(name, in, out, in_comments, out_comments, level);
+	}
+
+	// ===============================================================
+	/**
+	 * return the result of the device's command.
+	 */
+	// ===============================================================
+	@Override
+	public Any execute(final DeviceImpl device, final Any in_any) throws DevFailed {
+		Util.out2.println("GetAttDataSupThanCountClass.execute(): arrived");
+		final String[] argin = extract_DevVarStringArray(in_any);
+
+		if (!(device instanceof TdbExtractor)) {
+			Except.throw_exception("DEVICE_ERROR", "Device parameter is not instance of TdbExtractor", "TdbExtractor");
+		}
+
+		return insert(((TdbExtractor) device).get_att_data_sup_than_count(argin));
+	}
+
+	// ===============================================================
+	/**
+	 * Check if it is allowed to execute the command.
+	 */
+	// ===============================================================
+	@Override
+	public boolean is_allowed(final DeviceImpl device, final Any data_in) {
+		// End of Generated Code
+
+		// Re-Start of Generated Code
+		return true;
+	}
+}
+
+// -----------------------------------------------------------------------------
+/*
+ * end of $Source:
+ * /cvsroot/tango-cs/archiving/server/hdbtdbArchivingServers/src/
+ * main/java/TdbExtractor/GetAttDataSupThanCountClass.java,v $
+ */
diff --git a/src/main/java/TdbExtractor/GetAttDefinitionDataClass.java b/tdbextractor/src/main/java/TdbExtractor/GetAttDefinitionDataClass.java
similarity index 94%
rename from src/main/java/TdbExtractor/GetAttDefinitionDataClass.java
rename to tdbextractor/src/main/java/TdbExtractor/GetAttDefinitionDataClass.java
index 766a47228b5576f59f26dca1cfc6cdf97f75a73b..91226049dec37bfe6951e4d1eb780fd5997a68cd 100644
--- a/src/main/java/TdbExtractor/GetAttDefinitionDataClass.java
+++ b/tdbextractor/src/main/java/TdbExtractor/GetAttDefinitionDataClass.java
@@ -1,157 +1,157 @@
-//+======================================================================
-// $Source$
-//
-// Project:      Tango Device Server
-//
-// Description:  Java source code for the command TemplateClass of the
-//               TdbExtractor class.
-//
-// $Author$
-//
-// $Revision$
-//
-// $Log$
-// Revision 1.3  2010/11/22 08:09:14  abeilleg
-// remove critical of findbugs
-//
-// Revision 1.2  2009/12/17 12:47:15  pierrejoseph
-// CheckStyle:  Organize imports / Format
-//
-// Revision 1.1  2008/02/28 15:37:14  pierrejoseph
-// TdbExtractor has been forgotten
-//
-// Revision 1.3  2005/11/29 16:13:31  chinkumo
-// Code reformated (pogo compatible)
-//
-// Revision 1.2  2005/11/15 13:45:16  chinkumo
-// ...
-//
-// Revision 1.1  2005/09/09 10:03:41  chinkumo
-// First commit !
-// (Dynamic attribut release)
-//
-//
-// copyleft :    European Synchrotron Radiation Facility
-//               BP 220, Grenoble 38043
-//               FRANCE
-//
-//-======================================================================
-//
-//  		This file is generated by POGO
-//	(Program Obviously used to Generate tango Object)
-//
-//         (c) - Software Engineering Group - ESRF
-//=============================================================================
-
-/**
- * @author	$Author$
- * @version	$Revision$
- */
-package TdbExtractor;
-
-import org.omg.CORBA.Any;
-
-import fr.esrf.Tango.DevFailed;
-import fr.esrf.Tango.DispLevel;
-import fr.esrf.TangoDs.Command;
-import fr.esrf.TangoDs.DeviceImpl;
-import fr.esrf.TangoDs.TangoConst;
-import fr.esrf.TangoDs.Util;
-
-/**
- * Class Description: Returns an array containing the differents definition
- * informations for the given attribute.
- */
-
-public class GetAttDefinitionDataClass extends Command implements TangoConst {
-	// ===============================================================
-	/**
-	 * Constructor for Command class GetAttDefinitionDataClass
-	 * 
-	 * @param name
-	 *            command name
-	 * @param in
-	 *            argin type
-	 * @param out
-	 *            argout type
-	 */
-	// ===============================================================
-	public GetAttDefinitionDataClass(final String name, final int in, final int out) {
-		super(name, in, out);
-	}
-
-	// ===============================================================
-	/**
-	 * Constructor for Command class GetAttDefinitionDataClass
-	 * 
-	 * @param name
-	 *            command name
-	 * @param in
-	 *            argin type
-	 * @param in_comments
-	 *            argin description
-	 * @param out
-	 *            argout type
-	 * @param out_comments
-	 *            argout description
-	 */
-	// ===============================================================
-	public GetAttDefinitionDataClass(final String name, final int in, final int out, final String in_comments, final String out_comments) {
-		super(name, in, out, in_comments, out_comments);
-	}
-
-	// ===============================================================
-	/**
-	 * Constructor for Command class GetAttDefinitionDataClass
-	 * 
-	 * @param name
-	 *            command name
-	 * @param in
-	 *            argin type
-	 * @param in_comments
-	 *            argin description
-	 * @param out
-	 *            argout type
-	 * @param out_comments
-	 *            argout description
-	 * @param level
-	 *            The command display type OPERATOR or EXPERT
-	 */
-	// ===============================================================
-	public GetAttDefinitionDataClass(final String name, final int in, final int out, final String in_comments, final String out_comments, final DispLevel level) {
-		super(name, in, out, in_comments, out_comments, level);
-	}
-
-	// ===============================================================
-	/**
-	 * return the result of the device's command.
-	 */
-	// ===============================================================
-	@Override
-	public Any execute(final DeviceImpl device, final Any in_any) throws DevFailed {
-		Util.out2.println("GetAttDefinitionDataClass.execute(): arrived");
-		final String argin = extract_DevString(in_any);
-
-		return insert(((TdbExtractor) device).get_att_definition_data(argin));
-	}
-
-	// ===============================================================
-	/**
-	 * Check if it is allowed to execute the command.
-	 */
-	// ===============================================================
-	@Override
-	public boolean is_allowed(final DeviceImpl device, final Any data_in) {
-		// End of Generated Code
-
-		// Re-Start of Generated Code
-		return true;
-	}
-}
-
-// -----------------------------------------------------------------------------
-/*
- * end of $Source:
- * /cvsroot/tango-cs/archiving/server/hdbtdbArchivingServers/src/
- * main/java/TdbExtractor/GetAttDefinitionDataClass.java,v $
- */
+//+======================================================================
+// $Source$
+//
+// Project:      Tango Device Server
+//
+// Description:  Java source code for the command TemplateClass of the
+//               TdbExtractor class.
+//
+// $Author: gramer $
+//
+// $Revision: 15443 $
+//
+// $Log$
+// Revision 1.3  2010/11/22 08:09:14  abeilleg
+// remove critical of findbugs
+//
+// Revision 1.2  2009/12/17 12:47:15  pierrejoseph
+// CheckStyle:  Organize imports / Format
+//
+// Revision 1.1  2008/02/28 15:37:14  pierrejoseph
+// TdbExtractor has been forgotten
+//
+// Revision 1.3  2005/11/29 16:13:31  chinkumo
+// Code reformated (pogo compatible)
+//
+// Revision 1.2  2005/11/15 13:45:16  chinkumo
+// ...
+//
+// Revision 1.1  2005/09/09 10:03:41  chinkumo
+// First commit !
+// (Dynamic attribut release)
+//
+//
+// copyleft :    European Synchrotron Radiation Facility
+//               BP 220, Grenoble 38043
+//               FRANCE
+//
+//-======================================================================
+//
+//  		This file is generated by POGO
+//	(Program Obviously used to Generate tango Object)
+//
+//         (c) - Software Engineering Group - ESRF
+//=============================================================================
+
+/**
+ * @author	$Author: gramer $
+ * @version	$Revision: 15443 $
+ */
+package TdbExtractor;
+
+import org.omg.CORBA.Any;
+
+import fr.esrf.Tango.DevFailed;
+import fr.esrf.Tango.DispLevel;
+import fr.esrf.TangoDs.Command;
+import fr.esrf.TangoDs.DeviceImpl;
+import fr.esrf.TangoDs.TangoConst;
+import fr.esrf.TangoDs.Util;
+
+/**
+ * Class Description: Returns an array containing the differents definition
+ * informations for the given attribute.
+ */
+
+public class GetAttDefinitionDataClass extends Command implements TangoConst {
+	// ===============================================================
+	/**
+	 * Constructor for Command class GetAttDefinitionDataClass
+	 * 
+	 * @param name
+	 *            command name
+	 * @param in
+	 *            argin type
+	 * @param out
+	 *            argout type
+	 */
+	// ===============================================================
+	public GetAttDefinitionDataClass(final String name, final int in, final int out) {
+		super(name, in, out);
+	}
+
+	// ===============================================================
+	/**
+	 * Constructor for Command class GetAttDefinitionDataClass
+	 * 
+	 * @param name
+	 *            command name
+	 * @param in
+	 *            argin type
+	 * @param in_comments
+	 *            argin description
+	 * @param out
+	 *            argout type
+	 * @param out_comments
+	 *            argout description
+	 */
+	// ===============================================================
+	public GetAttDefinitionDataClass(final String name, final int in, final int out, final String in_comments, final String out_comments) {
+		super(name, in, out, in_comments, out_comments);
+	}
+
+	// ===============================================================
+	/**
+	 * Constructor for Command class GetAttDefinitionDataClass
+	 * 
+	 * @param name
+	 *            command name
+	 * @param in
+	 *            argin type
+	 * @param in_comments
+	 *            argin description
+	 * @param out
+	 *            argout type
+	 * @param out_comments
+	 *            argout description
+	 * @param level
+	 *            The command display type OPERATOR or EXPERT
+	 */
+	// ===============================================================
+	public GetAttDefinitionDataClass(final String name, final int in, final int out, final String in_comments, final String out_comments, final DispLevel level) {
+		super(name, in, out, in_comments, out_comments, level);
+	}
+
+	// ===============================================================
+	/**
+	 * return the result of the device's command.
+	 */
+	// ===============================================================
+	@Override
+	public Any execute(final DeviceImpl device, final Any in_any) throws DevFailed {
+		Util.out2.println("GetAttDefinitionDataClass.execute(): arrived");
+		final String argin = extract_DevString(in_any);
+
+		return insert(((TdbExtractor) device).get_att_definition_data(argin));
+	}
+
+	// ===============================================================
+	/**
+	 * Check if it is allowed to execute the command.
+	 */
+	// ===============================================================
+	@Override
+	public boolean is_allowed(final DeviceImpl device, final Any data_in) {
+		// End of Generated Code
+
+		// Re-Start of Generated Code
+		return true;
+	}
+}
+
+// -----------------------------------------------------------------------------
+/*
+ * end of $Source:
+ * /cvsroot/tango-cs/archiving/server/hdbtdbArchivingServers/src/
+ * main/java/TdbExtractor/GetAttDefinitionDataClass.java,v $
+ */
diff --git a/src/main/java/TdbExtractor/GetAttFullNameClass.java b/tdbextractor/src/main/java/TdbExtractor/GetAttFullNameClass.java
similarity index 96%
rename from src/main/java/TdbExtractor/GetAttFullNameClass.java
rename to tdbextractor/src/main/java/TdbExtractor/GetAttFullNameClass.java
index 6987bc1785024516da1fd9454f284c20c6c3a567..1b5f2394c0948cbc969ad553cd1c4888197ee0cc 100644
--- a/src/main/java/TdbExtractor/GetAttFullNameClass.java
+++ b/tdbextractor/src/main/java/TdbExtractor/GetAttFullNameClass.java
@@ -1,101 +1,101 @@
-/**
- * @author $Author: awo
- */
-package TdbExtractor;
-
-import org.omg.CORBA.Any;
-
-import fr.esrf.Tango.DevFailed;
-import fr.esrf.Tango.DevState;
-import fr.esrf.Tango.DispLevel;
-import fr.esrf.TangoDs.Command;
-import fr.esrf.TangoDs.DeviceImpl;
-import fr.esrf.TangoDs.Except;
-import fr.esrf.TangoDs.TangoConst;
-import fr.esrf.TangoDs.Util;
-
-public class GetAttFullNameClass extends Command implements TangoConst {
-
-    /**
-     * Constructor for Command class GetAttFullName
-     * 
-     * @param name
-     *            command name
-     * @param in
-     *            argin type
-     * @param out
-     *            argout type
-     */
-    public GetAttFullNameClass(final String name, final int in, final int out) {
-        super(name, in, out);
-    }
-
-    /**
-     * Constructor for Command class GetAttFullName
-     * 
-     * @param name
-     *            command name
-     * @param in
-     *            argin type
-     * @param in_comments
-     *            argin description
-     * @param out
-     *            argout type
-     * @param out_comments
-     *            argout description
-     */
-    public GetAttFullNameClass(final String name, final int in, final int out, final String in_comments,
-            final String out_comments) {
-        super(name, in, out, in_comments, out_comments);
-    }
-
-    /**
-     * Constructor for Command class GetAttFullName
-     * 
-     * @param name
-     *            command name
-     * @param in
-     *            argin type
-     * @param in_comments
-     *            argin description
-     * @param out
-     *            argout type
-     * @param out_comments
-     *            argout description
-     * @param level
-     *            The command display type OPERATOR or EXPERT
-     */
-    public GetAttFullNameClass(final String name, final int in, final int out, final String in_comments,
-            final String out_comments, final DispLevel level) {
-        super(name, in, out, in_comments, out_comments, level);
-    }
-
-    /**
-     * return the result of the device's command.
-     */
-    @Override
-    public Any execute(final DeviceImpl device, final Any in_any) throws DevFailed {
-        Util.out2.println("GetAttFullName.execute(): arrived");
-        final int argin = extract_DevLong(in_any);
-
-        if (!(device instanceof TdbExtractor)) {
-            Except.throw_exception("DEVICE_ERROR", "Device parameter is not instance of TdbExtractor", "TdbExtractor");
-        }
-
-        return insert(((TdbExtractor) device).get_att_full_name(argin));
-    }
-
-    /**
-     * Check if it is allowed to execute the command.
-     */
-    @Override
-    public boolean is_allowed(final DeviceImpl device, final Any data_in) {
-        if (device.get_state() == DevState.OFF || device.get_state() == DevState.INIT) {
-            // End of Generated Code
-
-            // Re-Start of Generated Code
-            return false;
-        }
-        return true;
-    }
-}
+/**
+ * @author $Author: awo
+ */
+package TdbExtractor;
+
+import org.omg.CORBA.Any;
+
+import fr.esrf.Tango.DevFailed;
+import fr.esrf.Tango.DevState;
+import fr.esrf.Tango.DispLevel;
+import fr.esrf.TangoDs.Command;
+import fr.esrf.TangoDs.DeviceImpl;
+import fr.esrf.TangoDs.Except;
+import fr.esrf.TangoDs.TangoConst;
+import fr.esrf.TangoDs.Util;
+
+public class GetAttFullNameClass extends Command implements TangoConst {
+
+    /**
+     * Constructor for Command class GetAttFullName
+     * 
+     * @param name
+     *            command name
+     * @param in
+     *            argin type
+     * @param out
+     *            argout type
+     */
+    public GetAttFullNameClass(final String name, final int in, final int out) {
+        super(name, in, out);
+    }
+
+    /**
+     * Constructor for Command class GetAttFullName
+     * 
+     * @param name
+     *            command name
+     * @param in
+     *            argin type
+     * @param in_comments
+     *            argin description
+     * @param out
+     *            argout type
+     * @param out_comments
+     *            argout description
+     */
+    public GetAttFullNameClass(final String name, final int in, final int out, final String in_comments,
+            final String out_comments) {
+        super(name, in, out, in_comments, out_comments);
+    }
+
+    /**
+     * Constructor for Command class GetAttFullName
+     * 
+     * @param name
+     *            command name
+     * @param in
+     *            argin type
+     * @param in_comments
+     *            argin description
+     * @param out
+     *            argout type
+     * @param out_comments
+     *            argout description
+     * @param level
+     *            The command display type OPERATOR or EXPERT
+     */
+    public GetAttFullNameClass(final String name, final int in, final int out, final String in_comments,
+            final String out_comments, final DispLevel level) {
+        super(name, in, out, in_comments, out_comments, level);
+    }
+
+    /**
+     * return the result of the device's command.
+     */
+    @Override
+    public Any execute(final DeviceImpl device, final Any in_any) throws DevFailed {
+        Util.out2.println("GetAttFullName.execute(): arrived");
+        final int argin = extract_DevLong(in_any);
+
+        if (!(device instanceof TdbExtractor)) {
+            Except.throw_exception("DEVICE_ERROR", "Device parameter is not instance of TdbExtractor", "TdbExtractor");
+        }
+
+        return insert(((TdbExtractor) device).get_att_full_name(argin));
+    }
+
+    /**
+     * Check if it is allowed to execute the command.
+     */
+    @Override
+    public boolean is_allowed(final DeviceImpl device, final Any data_in) {
+        if (device.get_state() == DevState.OFF || device.get_state() == DevState.INIT) {
+            // End of Generated Code
+
+            // Re-Start of Generated Code
+            return false;
+        }
+        return true;
+    }
+}
diff --git a/src/main/java/TdbExtractor/GetAttIdClass.java b/tdbextractor/src/main/java/TdbExtractor/GetAttIdClass.java
similarity index 94%
rename from src/main/java/TdbExtractor/GetAttIdClass.java
rename to tdbextractor/src/main/java/TdbExtractor/GetAttIdClass.java
index 0a3c02e6771a83cb319a8c6e1842f417b4ca4437..2b43e402caaaf0dee63517c6bc70de430f16713a 100644
--- a/src/main/java/TdbExtractor/GetAttIdClass.java
+++ b/tdbextractor/src/main/java/TdbExtractor/GetAttIdClass.java
@@ -1,164 +1,164 @@
-//+======================================================================
-// $Source$
-//
-// Project:      Tango Device Server
-//
-// Description:  Java source code for the command TemplateClass of the
-//               TdbExtractor class.
-//
-// $Author$
-//
-// $Revision$
-//
-// $Log$
-// Revision 1.3  2010/11/22 08:09:14  abeilleg
-// remove critical of findbugs
-//
-// Revision 1.2  2009/12/17 12:47:15  pierrejoseph
-// CheckStyle:  Organize imports / Format
-//
-// Revision 1.1  2008/02/28 15:37:14  pierrejoseph
-// TdbExtractor has been forgotten
-//
-// Revision 1.4  2006/02/15 11:12:20  chinkumo
-// Javadoc comments updated.
-//
-// Revision 1.3  2005/11/29 16:13:31  chinkumo
-// Code reformated (pogo compatible)
-//
-// Revision 1.2  2005/11/15 13:45:16  chinkumo
-// ...
-//
-// Revision 1.1  2005/09/09 10:03:41  chinkumo
-// First commit !
-// (Dynamic attribut release)
-//
-//
-// copyleft :    European Synchrotron Radiation Facility
-//               BP 220, Grenoble 38043
-//               FRANCE
-//
-//-======================================================================
-//
-//  		This file is generated by POGO
-//	(Program Obviously used to Generate tango Object)
-//
-//         (c) - Software Engineering Group - ESRF
-//=============================================================================
-
-/**
- * @author	$Author$
- * @version	$Revision$
- */
-package TdbExtractor;
-
-import org.omg.CORBA.Any;
-
-import fr.esrf.Tango.DevFailed;
-import fr.esrf.Tango.DispLevel;
-import fr.esrf.TangoDs.Command;
-import fr.esrf.TangoDs.DeviceImpl;
-import fr.esrf.TangoDs.Except;
-import fr.esrf.TangoDs.TangoConst;
-import fr.esrf.TangoDs.Util;
-
-/**
- * Class Description: Gets for a specified attribute its ID as defined in TDB
- */
-
-public class GetAttIdClass extends Command implements TangoConst {
-	// ===============================================================
-	/**
-	 * Constructor for Command class GetAttIdClass
-	 * 
-	 * @param name
-	 *            command name
-	 * @param in
-	 *            argin type
-	 * @param out
-	 *            argout type
-	 */
-	// ===============================================================
-	public GetAttIdClass(final String name, final int in, final int out) {
-		super(name, in, out);
-	}
-
-	// ===============================================================
-	/**
-	 * Constructor for Command class GetAttIdClass
-	 * 
-	 * @param name
-	 *            command name
-	 * @param in
-	 *            argin type
-	 * @param in_comments
-	 *            argin description
-	 * @param out
-	 *            argout type
-	 * @param out_comments
-	 *            argout description
-	 */
-	// ===============================================================
-	public GetAttIdClass(final String name, final int in, final int out, final String in_comments, final String out_comments) {
-		super(name, in, out, in_comments, out_comments);
-	}
-
-	// ===============================================================
-	/**
-	 * Constructor for Command class GetAttIdClass
-	 * 
-	 * @param name
-	 *            command name
-	 * @param in
-	 *            argin type
-	 * @param in_comments
-	 *            argin description
-	 * @param out
-	 *            argout type
-	 * @param out_comments
-	 *            argout description
-	 * @param level
-	 *            The command display type OPERATOR or EXPERT
-	 */
-	// ===============================================================
-	public GetAttIdClass(final String name, final int in, final int out, final String in_comments, final String out_comments, final DispLevel level) {
-		super(name, in, out, in_comments, out_comments, level);
-	}
-
-	// ===============================================================
-	/**
-	 * return the result of the device's command.
-	 */
-	// ===============================================================
-	@Override
-	public Any execute(final DeviceImpl device, final Any in_any) throws DevFailed {
-		Util.out2.println("GetAttIdClass.execute(): arrived");
-		final String argin = extract_DevString(in_any);
-
-		if (!(device instanceof TdbExtractor)) {
-			Except.throw_exception("DEVICE_ERROR", "Device parameter is not instance of TdbExtractor", "TdbExtractor");
-		}
-
-		return insert(((TdbExtractor) device).get_att_id(argin));
-	}
-
-	// ===============================================================
-	/**
-	 * Check if it is allowed to execute the command.
-	 */
-	// ===============================================================
-	@Override
-	public boolean is_allowed(final DeviceImpl device, final Any data_in) {
-		// End of Generated Code
-
-		// Re-Start of Generated Code
-		return true;
-	}
-}
-
-// -----------------------------------------------------------------------------
-/*
- * end of $Source:
- * /cvsroot/tango-cs/archiving/server/hdbtdbArchivingServers/src/
- * main/java/TdbExtractor/GetAttIdClass.java,v $
- */
+//+======================================================================
+// $Source$
+//
+// Project:      Tango Device Server
+//
+// Description:  Java source code for the command TemplateClass of the
+//               TdbExtractor class.
+//
+// $Author: gramer $
+//
+// $Revision: 15443 $
+//
+// $Log$
+// Revision 1.3  2010/11/22 08:09:14  abeilleg
+// remove critical of findbugs
+//
+// Revision 1.2  2009/12/17 12:47:15  pierrejoseph
+// CheckStyle:  Organize imports / Format
+//
+// Revision 1.1  2008/02/28 15:37:14  pierrejoseph
+// TdbExtractor has been forgotten
+//
+// Revision 1.4  2006/02/15 11:12:20  chinkumo
+// Javadoc comments updated.
+//
+// Revision 1.3  2005/11/29 16:13:31  chinkumo
+// Code reformated (pogo compatible)
+//
+// Revision 1.2  2005/11/15 13:45:16  chinkumo
+// ...
+//
+// Revision 1.1  2005/09/09 10:03:41  chinkumo
+// First commit !
+// (Dynamic attribut release)
+//
+//
+// copyleft :    European Synchrotron Radiation Facility
+//               BP 220, Grenoble 38043
+//               FRANCE
+//
+//-======================================================================
+//
+//  		This file is generated by POGO
+//	(Program Obviously used to Generate tango Object)
+//
+//         (c) - Software Engineering Group - ESRF
+//=============================================================================
+
+/**
+ * @author	$Author: gramer $
+ * @version	$Revision: 15443 $
+ */
+package TdbExtractor;
+
+import org.omg.CORBA.Any;
+
+import fr.esrf.Tango.DevFailed;
+import fr.esrf.Tango.DispLevel;
+import fr.esrf.TangoDs.Command;
+import fr.esrf.TangoDs.DeviceImpl;
+import fr.esrf.TangoDs.Except;
+import fr.esrf.TangoDs.TangoConst;
+import fr.esrf.TangoDs.Util;
+
+/**
+ * Class Description: Gets for a specified attribute its ID as defined in TDB
+ */
+
+public class GetAttIdClass extends Command implements TangoConst {
+	// ===============================================================
+	/**
+	 * Constructor for Command class GetAttIdClass
+	 * 
+	 * @param name
+	 *            command name
+	 * @param in
+	 *            argin type
+	 * @param out
+	 *            argout type
+	 */
+	// ===============================================================
+	public GetAttIdClass(final String name, final int in, final int out) {
+		super(name, in, out);
+	}
+
+	// ===============================================================
+	/**
+	 * Constructor for Command class GetAttIdClass
+	 * 
+	 * @param name
+	 *            command name
+	 * @param in
+	 *            argin type
+	 * @param in_comments
+	 *            argin description
+	 * @param out
+	 *            argout type
+	 * @param out_comments
+	 *            argout description
+	 */
+	// ===============================================================
+	public GetAttIdClass(final String name, final int in, final int out, final String in_comments, final String out_comments) {
+		super(name, in, out, in_comments, out_comments);
+	}
+
+	// ===============================================================
+	/**
+	 * Constructor for Command class GetAttIdClass
+	 * 
+	 * @param name
+	 *            command name
+	 * @param in
+	 *            argin type
+	 * @param in_comments
+	 *            argin description
+	 * @param out
+	 *            argout type
+	 * @param out_comments
+	 *            argout description
+	 * @param level
+	 *            The command display type OPERATOR or EXPERT
+	 */
+	// ===============================================================
+	public GetAttIdClass(final String name, final int in, final int out, final String in_comments, final String out_comments, final DispLevel level) {
+		super(name, in, out, in_comments, out_comments, level);
+	}
+
+	// ===============================================================
+	/**
+	 * return the result of the device's command.
+	 */
+	// ===============================================================
+	@Override
+	public Any execute(final DeviceImpl device, final Any in_any) throws DevFailed {
+		Util.out2.println("GetAttIdClass.execute(): arrived");
+		final String argin = extract_DevString(in_any);
+
+		if (!(device instanceof TdbExtractor)) {
+			Except.throw_exception("DEVICE_ERROR", "Device parameter is not instance of TdbExtractor", "TdbExtractor");
+		}
+
+		return insert(((TdbExtractor) device).get_att_id(argin));
+	}
+
+	// ===============================================================
+	/**
+	 * Check if it is allowed to execute the command.
+	 */
+	// ===============================================================
+	@Override
+	public boolean is_allowed(final DeviceImpl device, final Any data_in) {
+		// End of Generated Code
+
+		// Re-Start of Generated Code
+		return true;
+	}
+}
+
+// -----------------------------------------------------------------------------
+/*
+ * end of $Source:
+ * /cvsroot/tango-cs/archiving/server/hdbtdbArchivingServers/src/
+ * main/java/TdbExtractor/GetAttIdClass.java,v $
+ */
diff --git a/src/main/java/TdbExtractor/GetAttNameAllClass.java b/tdbextractor/src/main/java/TdbExtractor/GetAttNameAllClass.java
similarity index 94%
rename from src/main/java/TdbExtractor/GetAttNameAllClass.java
rename to tdbextractor/src/main/java/TdbExtractor/GetAttNameAllClass.java
index 0b8cc42d87f938c89621ddd19d388384781b7ebf..4fe94cacf462fedd5f3246c21428208b24a7bcf0 100644
--- a/src/main/java/TdbExtractor/GetAttNameAllClass.java
+++ b/tdbextractor/src/main/java/TdbExtractor/GetAttNameAllClass.java
@@ -1,163 +1,163 @@
-//+======================================================================
-// $Source$
-//
-// Project:      Tango Device Server
-//
-// Description:  Java source code for the command TemplateClass of the
-//               TdbExtractor class.
-//
-// $Author$
-//
-// $Revision$
-//
-// $Log$
-// Revision 1.3  2010/11/22 08:09:15  abeilleg
-// remove critical of findbugs
-//
-// Revision 1.2  2009/12/17 12:47:15  pierrejoseph
-// CheckStyle:  Organize imports / Format
-//
-// Revision 1.1  2008/02/28 15:37:14  pierrejoseph
-// TdbExtractor has been forgotten
-//
-// Revision 1.4  2006/02/15 11:12:20  chinkumo
-// Javadoc comments updated.
-//
-// Revision 1.3  2005/11/29 16:13:31  chinkumo
-// Code reformated (pogo compatible)
-//
-// Revision 1.2  2005/11/15 13:45:16  chinkumo
-// ...
-//
-// Revision 1.1  2005/09/09 10:03:41  chinkumo
-// First commit !
-// (Dynamic attribut release)
-//
-//
-// copyleft :    European Synchrotron Radiation Facility
-//               BP 220, Grenoble 38043
-//               FRANCE
-//
-//-======================================================================
-//
-//  		This file is generated by POGO
-//	(Program Obviously used to Generate tango Object)
-//
-//         (c) - Software Engineering Group - ESRF
-//=============================================================================
-
-/**
- * @author	$Author$
- * @version	$Revision$
- */
-package TdbExtractor;
-
-import org.omg.CORBA.Any;
-
-import fr.esrf.Tango.DevFailed;
-import fr.esrf.Tango.DispLevel;
-import fr.esrf.TangoDs.Command;
-import fr.esrf.TangoDs.DeviceImpl;
-import fr.esrf.TangoDs.Except;
-import fr.esrf.TangoDs.TangoConst;
-import fr.esrf.TangoDs.Util;
-
-/**
- * Class Description: Gets whole list of the attributes registered in TDB
- */
-
-public class GetAttNameAllClass extends Command implements TangoConst {
-	// ===============================================================
-	/**
-	 * Constructor for Command class GetAttNameAllClass
-	 * 
-	 * @param name
-	 *            command name
-	 * @param in
-	 *            argin type
-	 * @param out
-	 *            argout type
-	 */
-	// ===============================================================
-	public GetAttNameAllClass(final String name, final int in, final int out) {
-		super(name, in, out);
-	}
-
-	// ===============================================================
-	/**
-	 * Constructor for Command class GetAttNameAllClass
-	 * 
-	 * @param name
-	 *            command name
-	 * @param in
-	 *            argin type
-	 * @param in_comments
-	 *            argin description
-	 * @param out
-	 *            argout type
-	 * @param out_comments
-	 *            argout description
-	 */
-	// ===============================================================
-	public GetAttNameAllClass(final String name, final int in, final int out, final String in_comments, final String out_comments) {
-		super(name, in, out, in_comments, out_comments);
-	}
-
-	// ===============================================================
-	/**
-	 * Constructor for Command class GetAttNameAllClass
-	 * 
-	 * @param name
-	 *            command name
-	 * @param in
-	 *            argin type
-	 * @param in_comments
-	 *            argin description
-	 * @param out
-	 *            argout type
-	 * @param out_comments
-	 *            argout description
-	 * @param level
-	 *            The command display type OPERATOR or EXPERT
-	 */
-	// ===============================================================
-	public GetAttNameAllClass(final String name, final int in, final int out, final String in_comments, final String out_comments, final DispLevel level) {
-		super(name, in, out, in_comments, out_comments, level);
-	}
-
-	// ===============================================================
-	/**
-	 * return the result of the device's command.
-	 */
-	// ===============================================================
-	@Override
-	public Any execute(final DeviceImpl device, final Any in_any) throws DevFailed {
-		Util.out2.println("GetAttNameAllClass.execute(): arrived");
-
-		if (!(device instanceof TdbExtractor)) {
-			Except.throw_exception("DEVICE_ERROR", "Device parameter is not instance of TdbExtractor", "TdbExtractor");
-		}
-
-		return insert(((TdbExtractor) device).get_att_name_all());
-	}
-
-	// ===============================================================
-	/**
-	 * Check if it is allowed to execute the command.
-	 */
-	// ===============================================================
-	@Override
-	public boolean is_allowed(final DeviceImpl device, final Any data_in) {
-		// End of Generated Code
-
-		// Re-Start of Generated Code
-		return true;
-	}
-}
-
-// -----------------------------------------------------------------------------
-/*
- * end of $Source:
- * /cvsroot/tango-cs/archiving/server/hdbtdbArchivingServers/src/
- * main/java/TdbExtractor/GetAttNameAllClass.java,v $
- */
+//+======================================================================
+// $Source$
+//
+// Project:      Tango Device Server
+//
+// Description:  Java source code for the command TemplateClass of the
+//               TdbExtractor class.
+//
+// $Author: gramer $
+//
+// $Revision: 15443 $
+//
+// $Log$
+// Revision 1.3  2010/11/22 08:09:15  abeilleg
+// remove critical of findbugs
+//
+// Revision 1.2  2009/12/17 12:47:15  pierrejoseph
+// CheckStyle:  Organize imports / Format
+//
+// Revision 1.1  2008/02/28 15:37:14  pierrejoseph
+// TdbExtractor has been forgotten
+//
+// Revision 1.4  2006/02/15 11:12:20  chinkumo
+// Javadoc comments updated.
+//
+// Revision 1.3  2005/11/29 16:13:31  chinkumo
+// Code reformated (pogo compatible)
+//
+// Revision 1.2  2005/11/15 13:45:16  chinkumo
+// ...
+//
+// Revision 1.1  2005/09/09 10:03:41  chinkumo
+// First commit !
+// (Dynamic attribut release)
+//
+//
+// copyleft :    European Synchrotron Radiation Facility
+//               BP 220, Grenoble 38043
+//               FRANCE
+//
+//-======================================================================
+//
+//  		This file is generated by POGO
+//	(Program Obviously used to Generate tango Object)
+//
+//         (c) - Software Engineering Group - ESRF
+//=============================================================================
+
+/**
+ * @author	$Author: gramer $
+ * @version	$Revision: 15443 $
+ */
+package TdbExtractor;
+
+import org.omg.CORBA.Any;
+
+import fr.esrf.Tango.DevFailed;
+import fr.esrf.Tango.DispLevel;
+import fr.esrf.TangoDs.Command;
+import fr.esrf.TangoDs.DeviceImpl;
+import fr.esrf.TangoDs.Except;
+import fr.esrf.TangoDs.TangoConst;
+import fr.esrf.TangoDs.Util;
+
+/**
+ * Class Description: Gets whole list of the attributes registered in TDB
+ */
+
+public class GetAttNameAllClass extends Command implements TangoConst {
+	// ===============================================================
+	/**
+	 * Constructor for Command class GetAttNameAllClass
+	 * 
+	 * @param name
+	 *            command name
+	 * @param in
+	 *            argin type
+	 * @param out
+	 *            argout type
+	 */
+	// ===============================================================
+	public GetAttNameAllClass(final String name, final int in, final int out) {
+		super(name, in, out);
+	}
+
+	// ===============================================================
+	/**
+	 * Constructor for Command class GetAttNameAllClass
+	 * 
+	 * @param name
+	 *            command name
+	 * @param in
+	 *            argin type
+	 * @param in_comments
+	 *            argin description
+	 * @param out
+	 *            argout type
+	 * @param out_comments
+	 *            argout description
+	 */
+	// ===============================================================
+	public GetAttNameAllClass(final String name, final int in, final int out, final String in_comments, final String out_comments) {
+		super(name, in, out, in_comments, out_comments);
+	}
+
+	// ===============================================================
+	/**
+	 * Constructor for Command class GetAttNameAllClass
+	 * 
+	 * @param name
+	 *            command name
+	 * @param in
+	 *            argin type
+	 * @param in_comments
+	 *            argin description
+	 * @param out
+	 *            argout type
+	 * @param out_comments
+	 *            argout description
+	 * @param level
+	 *            The command display type OPERATOR or EXPERT
+	 */
+	// ===============================================================
+	public GetAttNameAllClass(final String name, final int in, final int out, final String in_comments, final String out_comments, final DispLevel level) {
+		super(name, in, out, in_comments, out_comments, level);
+	}
+
+	// ===============================================================
+	/**
+	 * return the result of the device's command.
+	 */
+	// ===============================================================
+	@Override
+	public Any execute(final DeviceImpl device, final Any in_any) throws DevFailed {
+		Util.out2.println("GetAttNameAllClass.execute(): arrived");
+
+		if (!(device instanceof TdbExtractor)) {
+			Except.throw_exception("DEVICE_ERROR", "Device parameter is not instance of TdbExtractor", "TdbExtractor");
+		}
+
+		return insert(((TdbExtractor) device).get_att_name_all());
+	}
+
+	// ===============================================================
+	/**
+	 * Check if it is allowed to execute the command.
+	 */
+	// ===============================================================
+	@Override
+	public boolean is_allowed(final DeviceImpl device, final Any data_in) {
+		// End of Generated Code
+
+		// Re-Start of Generated Code
+		return true;
+	}
+}
+
+// -----------------------------------------------------------------------------
+/*
+ * end of $Source:
+ * /cvsroot/tango-cs/archiving/server/hdbtdbArchivingServers/src/
+ * main/java/TdbExtractor/GetAttNameAllClass.java,v $
+ */
diff --git a/src/main/java/TdbExtractor/GetAttNameFacilityClass.java b/tdbextractor/src/main/java/TdbExtractor/GetAttNameFacilityClass.java
similarity index 94%
rename from src/main/java/TdbExtractor/GetAttNameFacilityClass.java
rename to tdbextractor/src/main/java/TdbExtractor/GetAttNameFacilityClass.java
index bf2ac0392941001a3daff21fd8771cba91565075..78a3c0f7a3aef32f34928eb8043369c2a38a24ae 100644
--- a/src/main/java/TdbExtractor/GetAttNameFacilityClass.java
+++ b/tdbextractor/src/main/java/TdbExtractor/GetAttNameFacilityClass.java
@@ -1,164 +1,164 @@
-//+======================================================================
-// $Source$
-//
-// Project:      Tango Device Server
-//
-// Description:  Java source code for the command TemplateClass of the
-//               TdbExtractor class.
-//
-// $Author$
-//
-// $Revision$
-//
-// $Log$
-// Revision 1.3  2010/11/22 08:09:14  abeilleg
-// remove critical of findbugs
-//
-// Revision 1.2  2009/12/17 12:47:15  pierrejoseph
-// CheckStyle:  Organize imports / Format
-//
-// Revision 1.1  2008/02/28 15:37:14  pierrejoseph
-// TdbExtractor has been forgotten
-//
-// Revision 1.4  2006/02/15 11:12:20  chinkumo
-// Javadoc comments updated.
-//
-// Revision 1.3  2005/11/29 16:13:31  chinkumo
-// Code reformated (pogo compatible)
-//
-// Revision 1.2  2005/11/15 13:45:16  chinkumo
-// ...
-//
-// Revision 1.1  2005/09/09 10:03:41  chinkumo
-// First commit !
-// (Dynamic attribut release)
-//
-//
-// copyleft :    European Synchrotron Radiation Facility
-//               BP 220, Grenoble 38043
-//               FRANCE
-//
-//-======================================================================
-//
-//  		This file is generated by POGO
-//	(Program Obviously used to Generate tango Object)
-//
-//         (c) - Software Engineering Group - ESRF
-//=============================================================================
-
-/**
- * @author	$Author$
- * @version	$Revision$
- */
-package TdbExtractor;
-
-import org.omg.CORBA.Any;
-
-import fr.esrf.Tango.DevFailed;
-import fr.esrf.Tango.DispLevel;
-import fr.esrf.TangoDs.Command;
-import fr.esrf.TangoDs.DeviceImpl;
-import fr.esrf.TangoDs.Except;
-import fr.esrf.TangoDs.TangoConst;
-import fr.esrf.TangoDs.Util;
-
-/**
- * Class Description: Gets whole list of the attributes registered in TDB and
- * that belong to the current facility.
- */
-
-public class GetAttNameFacilityClass extends Command implements TangoConst {
-	// ===============================================================
-	/**
-	 * Constructor for Command class GetAttNameFacilityClass
-	 * 
-	 * @param name
-	 *            command name
-	 * @param in
-	 *            argin type
-	 * @param out
-	 *            argout type
-	 */
-	// ===============================================================
-	public GetAttNameFacilityClass(final String name, final int in, final int out) {
-		super(name, in, out);
-	}
-
-	// ===============================================================
-	/**
-	 * Constructor for Command class GetAttNameFacilityClass
-	 * 
-	 * @param name
-	 *            command name
-	 * @param in
-	 *            argin type
-	 * @param in_comments
-	 *            argin description
-	 * @param out
-	 *            argout type
-	 * @param out_comments
-	 *            argout description
-	 */
-	// ===============================================================
-	public GetAttNameFacilityClass(final String name, final int in, final int out, final String in_comments, final String out_comments) {
-		super(name, in, out, in_comments, out_comments);
-	}
-
-	// ===============================================================
-	/**
-	 * Constructor for Command class GetAttNameFacilityClass
-	 * 
-	 * @param name
-	 *            command name
-	 * @param in
-	 *            argin type
-	 * @param in_comments
-	 *            argin description
-	 * @param out
-	 *            argout type
-	 * @param out_comments
-	 *            argout description
-	 * @param level
-	 *            The command display type OPERATOR or EXPERT
-	 */
-	// ===============================================================
-	public GetAttNameFacilityClass(final String name, final int in, final int out, final String in_comments, final String out_comments, final DispLevel level) {
-		super(name, in, out, in_comments, out_comments, level);
-	}
-
-	// ===============================================================
-	/**
-	 * return the result of the device's command.
-	 */
-	// ===============================================================
-	@Override
-	public Any execute(final DeviceImpl device, final Any in_any) throws DevFailed {
-		Util.out2.println("GetAttNameFacilityClass.execute(): arrived");
-
-		if (!(device instanceof TdbExtractor)) {
-			Except.throw_exception("DEVICE_ERROR", "Device parameter is not instance of TdbExtractor", "TdbExtractor");
-		}
-
-		return insert(((TdbExtractor) device).get_att_name_facility());
-	}
-
-	// ===============================================================
-	/**
-	 * Check if it is allowed to execute the command.
-	 */
-	// ===============================================================
-	@Override
-	public boolean is_allowed(final DeviceImpl device, final Any data_in) {
-		// End of Generated Code
-
-		// Re-Start of Generated Code
-		return true;
-	}
-}
-
-// -----------------------------------------------------------------------------
-/*
- * end of $Source:
- * /cvsroot/tango-cs/archiving/server/hdbtdbArchivingServers/src/
- * main/java/TdbExtractor/GetAttNameFacilityClass.java,v $
- */
+//+======================================================================
+// $Source$
+//
+// Project:      Tango Device Server
+//
+// Description:  Java source code for the command TemplateClass of the
+//               TdbExtractor class.
+//
+// $Author: gramer $
+//
+// $Revision: 15443 $
+//
+// $Log$
+// Revision 1.3  2010/11/22 08:09:14  abeilleg
+// remove critical of findbugs
+//
+// Revision 1.2  2009/12/17 12:47:15  pierrejoseph
+// CheckStyle:  Organize imports / Format
+//
+// Revision 1.1  2008/02/28 15:37:14  pierrejoseph
+// TdbExtractor has been forgotten
+//
+// Revision 1.4  2006/02/15 11:12:20  chinkumo
+// Javadoc comments updated.
+//
+// Revision 1.3  2005/11/29 16:13:31  chinkumo
+// Code reformated (pogo compatible)
+//
+// Revision 1.2  2005/11/15 13:45:16  chinkumo
+// ...
+//
+// Revision 1.1  2005/09/09 10:03:41  chinkumo
+// First commit !
+// (Dynamic attribut release)
+//
+//
+// copyleft :    European Synchrotron Radiation Facility
+//               BP 220, Grenoble 38043
+//               FRANCE
+//
+//-======================================================================
+//
+//  		This file is generated by POGO
+//	(Program Obviously used to Generate tango Object)
+//
+//         (c) - Software Engineering Group - ESRF
+//=============================================================================
+
+/**
+ * @author	$Author: gramer $
+ * @version	$Revision: 15443 $
+ */
+package TdbExtractor;
+
+import org.omg.CORBA.Any;
+
+import fr.esrf.Tango.DevFailed;
+import fr.esrf.Tango.DispLevel;
+import fr.esrf.TangoDs.Command;
+import fr.esrf.TangoDs.DeviceImpl;
+import fr.esrf.TangoDs.Except;
+import fr.esrf.TangoDs.TangoConst;
+import fr.esrf.TangoDs.Util;
+
+/**
+ * Class Description: Gets whole list of the attributes registered in TDB and
+ * that belong to the current facility.
+ */
+
+public class GetAttNameFacilityClass extends Command implements TangoConst {
+	// ===============================================================
+	/**
+	 * Constructor for Command class GetAttNameFacilityClass
+	 * 
+	 * @param name
+	 *            command name
+	 * @param in
+	 *            argin type
+	 * @param out
+	 *            argout type
+	 */
+	// ===============================================================
+	public GetAttNameFacilityClass(final String name, final int in, final int out) {
+		super(name, in, out);
+	}
+
+	// ===============================================================
+	/**
+	 * Constructor for Command class GetAttNameFacilityClass
+	 * 
+	 * @param name
+	 *            command name
+	 * @param in
+	 *            argin type
+	 * @param in_comments
+	 *            argin description
+	 * @param out
+	 *            argout type
+	 * @param out_comments
+	 *            argout description
+	 */
+	// ===============================================================
+	public GetAttNameFacilityClass(final String name, final int in, final int out, final String in_comments, final String out_comments) {
+		super(name, in, out, in_comments, out_comments);
+	}
+
+	// ===============================================================
+	/**
+	 * Constructor for Command class GetAttNameFacilityClass
+	 * 
+	 * @param name
+	 *            command name
+	 * @param in
+	 *            argin type
+	 * @param in_comments
+	 *            argin description
+	 * @param out
+	 *            argout type
+	 * @param out_comments
+	 *            argout description
+	 * @param level
+	 *            The command display type OPERATOR or EXPERT
+	 */
+	// ===============================================================
+	public GetAttNameFacilityClass(final String name, final int in, final int out, final String in_comments, final String out_comments, final DispLevel level) {
+		super(name, in, out, in_comments, out_comments, level);
+	}
+
+	// ===============================================================
+	/**
+	 * return the result of the device's command.
+	 */
+	// ===============================================================
+	@Override
+	public Any execute(final DeviceImpl device, final Any in_any) throws DevFailed {
+		Util.out2.println("GetAttNameFacilityClass.execute(): arrived");
+
+		if (!(device instanceof TdbExtractor)) {
+			Except.throw_exception("DEVICE_ERROR", "Device parameter is not instance of TdbExtractor", "TdbExtractor");
+		}
+
+		return insert(((TdbExtractor) device).get_att_name_facility());
+	}
+
+	// ===============================================================
+	/**
+	 * Check if it is allowed to execute the command.
+	 */
+	// ===============================================================
+	@Override
+	public boolean is_allowed(final DeviceImpl device, final Any data_in) {
+		// End of Generated Code
+
+		// Re-Start of Generated Code
+		return true;
+	}
+}
+
+// -----------------------------------------------------------------------------
+/*
+ * end of $Source:
+ * /cvsroot/tango-cs/archiving/server/hdbtdbArchivingServers/src/
+ * main/java/TdbExtractor/GetAttNameFacilityClass.java,v $
+ */
diff --git a/src/main/java/TdbExtractor/GetAttNameFilterFormatClass.java b/tdbextractor/src/main/java/TdbExtractor/GetAttNameFilterFormatClass.java
similarity index 94%
rename from src/main/java/TdbExtractor/GetAttNameFilterFormatClass.java
rename to tdbextractor/src/main/java/TdbExtractor/GetAttNameFilterFormatClass.java
index ae5790f50784b6b77a5c70af177a13cf0c3c1cc1..0e2d853a8ec9a4a0015e61810cadc87b2fd1d64f 100644
--- a/src/main/java/TdbExtractor/GetAttNameFilterFormatClass.java
+++ b/tdbextractor/src/main/java/TdbExtractor/GetAttNameFilterFormatClass.java
@@ -1,165 +1,165 @@
-//+======================================================================
-// $Source$
-//
-// Project:      Tango Device Server
-//
-// Description:  Java source code for the command TemplateClass of the
-//               TdbExtractor class.
-//
-// $Author$
-//
-// $Revision$
-//
-// $Log$
-// Revision 1.3  2010/11/22 08:09:15  abeilleg
-// remove critical of findbugs
-//
-// Revision 1.2  2009/12/17 12:47:15  pierrejoseph
-// CheckStyle:  Organize imports / Format
-//
-// Revision 1.1  2008/02/28 15:37:14  pierrejoseph
-// TdbExtractor has been forgotten
-//
-// Revision 1.4  2006/02/15 11:12:20  chinkumo
-// Javadoc comments updated.
-//
-// Revision 1.3  2005/11/29 16:13:31  chinkumo
-// Code reformated (pogo compatible)
-//
-// Revision 1.2  2005/11/15 13:45:16  chinkumo
-// ...
-//
-// Revision 1.1  2005/09/09 10:03:41  chinkumo
-// First commit !
-// (Dynamic attribut release)
-//
-//
-// copyleft :    European Synchrotron Radiation Facility
-//               BP 220, Grenoble 38043
-//               FRANCE
-//
-//-======================================================================
-//
-//  		This file is generated by POGO
-//	(Program Obviously used to Generate tango Object)
-//
-//         (c) - Software Engineering Group - ESRF
-//=============================================================================
-
-/**
- * @author	$Author$
- * @version	$Revision$
- */
-package TdbExtractor;
-
-import org.omg.CORBA.Any;
-
-import fr.esrf.Tango.DevFailed;
-import fr.esrf.Tango.DispLevel;
-import fr.esrf.TangoDs.Command;
-import fr.esrf.TangoDs.DeviceImpl;
-import fr.esrf.TangoDs.Except;
-import fr.esrf.TangoDs.TangoConst;
-import fr.esrf.TangoDs.Util;
-
-/**
- * Class Description: Gets the list of <I>TDB</I> registered attributes for the
- * given format
- */
-
-public class GetAttNameFilterFormatClass extends Command implements TangoConst {
-	// ===============================================================
-	/**
-	 * Constructor for Command class GetAttNameFilterFormatClass
-	 * 
-	 * @param name
-	 *            command name
-	 * @param in
-	 *            argin type
-	 * @param out
-	 *            argout type
-	 */
-	// ===============================================================
-	public GetAttNameFilterFormatClass(final String name, final int in, final int out) {
-		super(name, in, out);
-	}
-
-	// ===============================================================
-	/**
-	 * Constructor for Command class GetAttNameFilterFormatClass
-	 * 
-	 * @param name
-	 *            command name
-	 * @param in
-	 *            argin type
-	 * @param in_comments
-	 *            argin description
-	 * @param out
-	 *            argout type
-	 * @param out_comments
-	 *            argout description
-	 */
-	// ===============================================================
-	public GetAttNameFilterFormatClass(final String name, final int in, final int out, final String in_comments, final String out_comments) {
-		super(name, in, out, in_comments, out_comments);
-	}
-
-	// ===============================================================
-	/**
-	 * Constructor for Command class GetAttNameFilterFormatClass
-	 * 
-	 * @param name
-	 *            command name
-	 * @param in
-	 *            argin type
-	 * @param in_comments
-	 *            argin description
-	 * @param out
-	 *            argout type
-	 * @param out_comments
-	 *            argout description
-	 * @param level
-	 *            The command display type OPERATOR or EXPERT
-	 */
-	// ===============================================================
-	public GetAttNameFilterFormatClass(final String name, final int in, final int out, final String in_comments, final String out_comments, final DispLevel level) {
-		super(name, in, out, in_comments, out_comments, level);
-	}
-
-	// ===============================================================
-	/**
-	 * return the result of the device's command.
-	 */
-	// ===============================================================
-	@Override
-	public Any execute(final DeviceImpl device, final Any in_any) throws DevFailed {
-		Util.out2.println("GetAttNameFilterFormatClass.execute(): arrived");
-		final short argin = extract_DevShort(in_any);
-
-		if (!(device instanceof TdbExtractor)) {
-			Except.throw_exception("DEVICE_ERROR", "Device parameter is not instance of TdbExtractor", "TdbExtractor");
-		}
-
-		return insert(((TdbExtractor) device).get_att_name_filter_format(argin));
-	}
-
-	// ===============================================================
-	/**
-	 * Check if it is allowed to execute the command.
-	 */
-	// ===============================================================
-	@Override
-	public boolean is_allowed(final DeviceImpl device, final Any data_in) {
-		// End of Generated Code
-
-		// Re-Start of Generated Code
-		return true;
-	}
-}
-
-// -----------------------------------------------------------------------------
-/*
- * end of $Source:
- * /cvsroot/tango-cs/archiving/server/hdbtdbArchivingServers/src/
- * main/java/TdbExtractor/GetAttNameFilterFormatClass.java,v $
- */
+//+======================================================================
+// $Source$
+//
+// Project:      Tango Device Server
+//
+// Description:  Java source code for the command TemplateClass of the
+//               TdbExtractor class.
+//
+// $Author: gramer $
+//
+// $Revision: 15443 $
+//
+// $Log$
+// Revision 1.3  2010/11/22 08:09:15  abeilleg
+// remove critical of findbugs
+//
+// Revision 1.2  2009/12/17 12:47:15  pierrejoseph
+// CheckStyle:  Organize imports / Format
+//
+// Revision 1.1  2008/02/28 15:37:14  pierrejoseph
+// TdbExtractor has been forgotten
+//
+// Revision 1.4  2006/02/15 11:12:20  chinkumo
+// Javadoc comments updated.
+//
+// Revision 1.3  2005/11/29 16:13:31  chinkumo
+// Code reformated (pogo compatible)
+//
+// Revision 1.2  2005/11/15 13:45:16  chinkumo
+// ...
+//
+// Revision 1.1  2005/09/09 10:03:41  chinkumo
+// First commit !
+// (Dynamic attribut release)
+//
+//
+// copyleft :    European Synchrotron Radiation Facility
+//               BP 220, Grenoble 38043
+//               FRANCE
+//
+//-======================================================================
+//
+//  		This file is generated by POGO
+//	(Program Obviously used to Generate tango Object)
+//
+//         (c) - Software Engineering Group - ESRF
+//=============================================================================
+
+/**
+ * @author	$Author: gramer $
+ * @version	$Revision: 15443 $
+ */
+package TdbExtractor;
+
+import org.omg.CORBA.Any;
+
+import fr.esrf.Tango.DevFailed;
+import fr.esrf.Tango.DispLevel;
+import fr.esrf.TangoDs.Command;
+import fr.esrf.TangoDs.DeviceImpl;
+import fr.esrf.TangoDs.Except;
+import fr.esrf.TangoDs.TangoConst;
+import fr.esrf.TangoDs.Util;
+
+/**
+ * Class Description: Gets the list of <I>TDB</I> registered attributes for the
+ * given format
+ */
+
+public class GetAttNameFilterFormatClass extends Command implements TangoConst {
+	// ===============================================================
+	/**
+	 * Constructor for Command class GetAttNameFilterFormatClass
+	 * 
+	 * @param name
+	 *            command name
+	 * @param in
+	 *            argin type
+	 * @param out
+	 *            argout type
+	 */
+	// ===============================================================
+	public GetAttNameFilterFormatClass(final String name, final int in, final int out) {
+		super(name, in, out);
+	}
+
+	// ===============================================================
+	/**
+	 * Constructor for Command class GetAttNameFilterFormatClass
+	 * 
+	 * @param name
+	 *            command name
+	 * @param in
+	 *            argin type
+	 * @param in_comments
+	 *            argin description
+	 * @param out
+	 *            argout type
+	 * @param out_comments
+	 *            argout description
+	 */
+	// ===============================================================
+	public GetAttNameFilterFormatClass(final String name, final int in, final int out, final String in_comments, final String out_comments) {
+		super(name, in, out, in_comments, out_comments);
+	}
+
+	// ===============================================================
+	/**
+	 * Constructor for Command class GetAttNameFilterFormatClass
+	 * 
+	 * @param name
+	 *            command name
+	 * @param in
+	 *            argin type
+	 * @param in_comments
+	 *            argin description
+	 * @param out
+	 *            argout type
+	 * @param out_comments
+	 *            argout description
+	 * @param level
+	 *            The command display type OPERATOR or EXPERT
+	 */
+	// ===============================================================
+	public GetAttNameFilterFormatClass(final String name, final int in, final int out, final String in_comments, final String out_comments, final DispLevel level) {
+		super(name, in, out, in_comments, out_comments, level);
+	}
+
+	// ===============================================================
+	/**
+	 * return the result of the device's command.
+	 */
+	// ===============================================================
+	@Override
+	public Any execute(final DeviceImpl device, final Any in_any) throws DevFailed {
+		Util.out2.println("GetAttNameFilterFormatClass.execute(): arrived");
+		final short argin = extract_DevShort(in_any);
+
+		if (!(device instanceof TdbExtractor)) {
+			Except.throw_exception("DEVICE_ERROR", "Device parameter is not instance of TdbExtractor", "TdbExtractor");
+		}
+
+		return insert(((TdbExtractor) device).get_att_name_filter_format(argin));
+	}
+
+	// ===============================================================
+	/**
+	 * Check if it is allowed to execute the command.
+	 */
+	// ===============================================================
+	@Override
+	public boolean is_allowed(final DeviceImpl device, final Any data_in) {
+		// End of Generated Code
+
+		// Re-Start of Generated Code
+		return true;
+	}
+}
+
+// -----------------------------------------------------------------------------
+/*
+ * end of $Source:
+ * /cvsroot/tango-cs/archiving/server/hdbtdbArchivingServers/src/
+ * main/java/TdbExtractor/GetAttNameFilterFormatClass.java,v $
+ */
diff --git a/src/main/java/TdbExtractor/GetAttNameFilterTypeClass.java b/tdbextractor/src/main/java/TdbExtractor/GetAttNameFilterTypeClass.java
similarity index 94%
rename from src/main/java/TdbExtractor/GetAttNameFilterTypeClass.java
rename to tdbextractor/src/main/java/TdbExtractor/GetAttNameFilterTypeClass.java
index d821e18c7caeaba3b50ef8ea32c114488e0ac0e1..5732b93dcd08c13e1b84d7170140e3a56c9050ab 100644
--- a/src/main/java/TdbExtractor/GetAttNameFilterTypeClass.java
+++ b/tdbextractor/src/main/java/TdbExtractor/GetAttNameFilterTypeClass.java
@@ -1,165 +1,165 @@
-//+======================================================================
-// $Source$
-//
-// Project:      Tango Device Server
-//
-// Description:  Java source code for the command TemplateClass of the
-//               TdbExtractor class.
-//
-// $Author$
-//
-// $Revision$
-//
-// $Log$
-// Revision 1.3  2010/11/22 08:09:14  abeilleg
-// remove critical of findbugs
-//
-// Revision 1.2  2009/12/17 12:47:15  pierrejoseph
-// CheckStyle:  Organize imports / Format
-//
-// Revision 1.1  2008/02/28 15:37:14  pierrejoseph
-// TdbExtractor has been forgotten
-//
-// Revision 1.4  2006/02/15 11:12:20  chinkumo
-// Javadoc comments updated.
-//
-// Revision 1.3  2005/11/29 16:13:31  chinkumo
-// Code reformated (pogo compatible)
-//
-// Revision 1.2  2005/11/15 13:45:16  chinkumo
-// ...
-//
-// Revision 1.1  2005/09/09 10:03:41  chinkumo
-// First commit !
-// (Dynamic attribut release)
-//
-//
-// copyleft :    European Synchrotron Radiation Facility
-//               BP 220, Grenoble 38043
-//               FRANCE
-//
-//-======================================================================
-//
-//  		This file is generated by POGO
-//	(Program Obviously used to Generate tango Object)
-//
-//         (c) - Software Engineering Group - ESRF
-//=============================================================================
-
-/**
- * @author	$Author$
- * @version	$Revision$
- */
-package TdbExtractor;
-
-import org.omg.CORBA.Any;
-
-import fr.esrf.Tango.DevFailed;
-import fr.esrf.Tango.DispLevel;
-import fr.esrf.TangoDs.Command;
-import fr.esrf.TangoDs.DeviceImpl;
-import fr.esrf.TangoDs.Except;
-import fr.esrf.TangoDs.TangoConst;
-import fr.esrf.TangoDs.Util;
-
-/**
- * Class Description: Gets the list of <I>TDB</I> registered attributes for the
- * given type.
- */
-
-public class GetAttNameFilterTypeClass extends Command implements TangoConst {
-	// ===============================================================
-	/**
-	 * Constructor for Command class GetAttNameFilterTypeClass
-	 * 
-	 * @param name
-	 *            command name
-	 * @param in
-	 *            argin type
-	 * @param out
-	 *            argout type
-	 */
-	// ===============================================================
-	public GetAttNameFilterTypeClass(final String name, final int in, final int out) {
-		super(name, in, out);
-	}
-
-	// ===============================================================
-	/**
-	 * Constructor for Command class GetAttNameFilterTypeClass
-	 * 
-	 * @param name
-	 *            command name
-	 * @param in
-	 *            argin type
-	 * @param in_comments
-	 *            argin description
-	 * @param out
-	 *            argout type
-	 * @param out_comments
-	 *            argout description
-	 */
-	// ===============================================================
-	public GetAttNameFilterTypeClass(final String name, final int in, final int out, final String in_comments, final String out_comments) {
-		super(name, in, out, in_comments, out_comments);
-	}
-
-	// ===============================================================
-	/**
-	 * Constructor for Command class GetAttNameFilterTypeClass
-	 * 
-	 * @param name
-	 *            command name
-	 * @param in
-	 *            argin type
-	 * @param in_comments
-	 *            argin description
-	 * @param out
-	 *            argout type
-	 * @param out_comments
-	 *            argout description
-	 * @param level
-	 *            The command display type OPERATOR or EXPERT
-	 */
-	// ===============================================================
-	public GetAttNameFilterTypeClass(final String name, final int in, final int out, final String in_comments, final String out_comments, final DispLevel level) {
-		super(name, in, out, in_comments, out_comments, level);
-	}
-
-	// ===============================================================
-	/**
-	 * return the result of the device's command.
-	 */
-	// ===============================================================
-	@Override
-	public Any execute(final DeviceImpl device, final Any in_any) throws DevFailed {
-		Util.out2.println("GetAttNameFilterTypeClass.execute(): arrived");
-		final short argin = extract_DevShort(in_any);
-
-		if (!(device instanceof TdbExtractor)) {
-			Except.throw_exception("DEVICE_ERROR", "Device parameter is not instance of TdbExtractor", "TdbExtractor");
-		}
-
-		return insert(((TdbExtractor) device).get_att_name_filter_type(argin));
-	}
-
-	// ===============================================================
-	/**
-	 * Check if it is allowed to execute the command.
-	 */
-	// ===============================================================
-	@Override
-	public boolean is_allowed(final DeviceImpl device, final Any data_in) {
-		// End of Generated Code
-
-		// Re-Start of Generated Code
-		return true;
-	}
-}
-
-// -----------------------------------------------------------------------------
-/*
- * end of $Source:
- * /cvsroot/tango-cs/archiving/server/hdbtdbArchivingServers/src/
- * main/java/TdbExtractor/GetAttNameFilterTypeClass.java,v $
- */
+//+======================================================================
+// $Source$
+//
+// Project:      Tango Device Server
+//
+// Description:  Java source code for the command TemplateClass of the
+//               TdbExtractor class.
+//
+// $Author: gramer $
+//
+// $Revision: 15443 $
+//
+// $Log$
+// Revision 1.3  2010/11/22 08:09:14  abeilleg
+// remove critical of findbugs
+//
+// Revision 1.2  2009/12/17 12:47:15  pierrejoseph
+// CheckStyle:  Organize imports / Format
+//
+// Revision 1.1  2008/02/28 15:37:14  pierrejoseph
+// TdbExtractor has been forgotten
+//
+// Revision 1.4  2006/02/15 11:12:20  chinkumo
+// Javadoc comments updated.
+//
+// Revision 1.3  2005/11/29 16:13:31  chinkumo
+// Code reformated (pogo compatible)
+//
+// Revision 1.2  2005/11/15 13:45:16  chinkumo
+// ...
+//
+// Revision 1.1  2005/09/09 10:03:41  chinkumo
+// First commit !
+// (Dynamic attribut release)
+//
+//
+// copyleft :    European Synchrotron Radiation Facility
+//               BP 220, Grenoble 38043
+//               FRANCE
+//
+//-======================================================================
+//
+//  		This file is generated by POGO
+//	(Program Obviously used to Generate tango Object)
+//
+//         (c) - Software Engineering Group - ESRF
+//=============================================================================
+
+/**
+ * @author	$Author: gramer $
+ * @version	$Revision: 15443 $
+ */
+package TdbExtractor;
+
+import org.omg.CORBA.Any;
+
+import fr.esrf.Tango.DevFailed;
+import fr.esrf.Tango.DispLevel;
+import fr.esrf.TangoDs.Command;
+import fr.esrf.TangoDs.DeviceImpl;
+import fr.esrf.TangoDs.Except;
+import fr.esrf.TangoDs.TangoConst;
+import fr.esrf.TangoDs.Util;
+
+/**
+ * Class Description: Gets the list of <I>TDB</I> registered attributes for the
+ * given type.
+ */
+
+public class GetAttNameFilterTypeClass extends Command implements TangoConst {
+	// ===============================================================
+	/**
+	 * Constructor for Command class GetAttNameFilterTypeClass
+	 * 
+	 * @param name
+	 *            command name
+	 * @param in
+	 *            argin type
+	 * @param out
+	 *            argout type
+	 */
+	// ===============================================================
+	public GetAttNameFilterTypeClass(final String name, final int in, final int out) {
+		super(name, in, out);
+	}
+
+	// ===============================================================
+	/**
+	 * Constructor for Command class GetAttNameFilterTypeClass
+	 * 
+	 * @param name
+	 *            command name
+	 * @param in
+	 *            argin type
+	 * @param in_comments
+	 *            argin description
+	 * @param out
+	 *            argout type
+	 * @param out_comments
+	 *            argout description
+	 */
+	// ===============================================================
+	public GetAttNameFilterTypeClass(final String name, final int in, final int out, final String in_comments, final String out_comments) {
+		super(name, in, out, in_comments, out_comments);
+	}
+
+	// ===============================================================
+	/**
+	 * Constructor for Command class GetAttNameFilterTypeClass
+	 * 
+	 * @param name
+	 *            command name
+	 * @param in
+	 *            argin type
+	 * @param in_comments
+	 *            argin description
+	 * @param out
+	 *            argout type
+	 * @param out_comments
+	 *            argout description
+	 * @param level
+	 *            The command display type OPERATOR or EXPERT
+	 */
+	// ===============================================================
+	public GetAttNameFilterTypeClass(final String name, final int in, final int out, final String in_comments, final String out_comments, final DispLevel level) {
+		super(name, in, out, in_comments, out_comments, level);
+	}
+
+	// ===============================================================
+	/**
+	 * return the result of the device's command.
+	 */
+	// ===============================================================
+	@Override
+	public Any execute(final DeviceImpl device, final Any in_any) throws DevFailed {
+		Util.out2.println("GetAttNameFilterTypeClass.execute(): arrived");
+		final short argin = extract_DevShort(in_any);
+
+		if (!(device instanceof TdbExtractor)) {
+			Except.throw_exception("DEVICE_ERROR", "Device parameter is not instance of TdbExtractor", "TdbExtractor");
+		}
+
+		return insert(((TdbExtractor) device).get_att_name_filter_type(argin));
+	}
+
+	// ===============================================================
+	/**
+	 * Check if it is allowed to execute the command.
+	 */
+	// ===============================================================
+	@Override
+	public boolean is_allowed(final DeviceImpl device, final Any data_in) {
+		// End of Generated Code
+
+		// Re-Start of Generated Code
+		return true;
+	}
+}
+
+// -----------------------------------------------------------------------------
+/*
+ * end of $Source:
+ * /cvsroot/tango-cs/archiving/server/hdbtdbArchivingServers/src/
+ * main/java/TdbExtractor/GetAttNameFilterTypeClass.java,v $
+ */
diff --git a/src/main/java/TdbExtractor/GetAttPropertiesDataClass.java b/tdbextractor/src/main/java/TdbExtractor/GetAttPropertiesDataClass.java
similarity index 94%
rename from src/main/java/TdbExtractor/GetAttPropertiesDataClass.java
rename to tdbextractor/src/main/java/TdbExtractor/GetAttPropertiesDataClass.java
index e639121257a2719fab9656a3ec21fbc3970c0153..ea74bcf20620a7a0f16a96e312e097030487e4af 100644
--- a/src/main/java/TdbExtractor/GetAttPropertiesDataClass.java
+++ b/tdbextractor/src/main/java/TdbExtractor/GetAttPropertiesDataClass.java
@@ -1,162 +1,162 @@
-//+======================================================================
-// $Source$
-//
-// Project:      Tango Device Server
-//
-// Description:  Java source code for the command TemplateClass of the
-//               TdbExtractor class.
-//
-// $Author$
-//
-// $Revision$
-//
-// $Log$
-// Revision 1.3  2010/11/22 08:09:15  abeilleg
-// remove critical of findbugs
-//
-// Revision 1.2  2009/12/17 12:47:15  pierrejoseph
-// CheckStyle:  Organize imports / Format
-//
-// Revision 1.1  2008/02/28 15:37:14  pierrejoseph
-// TdbExtractor has been forgotten
-//
-// Revision 1.3  2005/11/29 16:13:31  chinkumo
-// Code reformated (pogo compatible)
-//
-// Revision 1.2  2005/11/15 13:45:16  chinkumo
-// ...
-//
-// Revision 1.1  2005/09/09 10:03:41  chinkumo
-// First commit !
-// (Dynamic attribut release)
-//
-//
-// copyleft :    European Synchrotron Radiation Facility
-//               BP 220, Grenoble 38043
-//               FRANCE
-//
-//-======================================================================
-//
-//  		This file is generated by POGO
-//	(Program Obviously used to Generate tango Object)
-//
-//         (c) - Software Engineering Group - ESRF
-//=============================================================================
-
-/**
- * @author	$Author$
- * @version	$Revision$
- */
-package TdbExtractor;
-
-import org.omg.CORBA.Any;
-
-import fr.esrf.Tango.DevFailed;
-import fr.esrf.Tango.DispLevel;
-import fr.esrf.TangoDs.Command;
-import fr.esrf.TangoDs.DeviceImpl;
-import fr.esrf.TangoDs.Except;
-import fr.esrf.TangoDs.TangoConst;
-import fr.esrf.TangoDs.Util;
-
-/**
- * Class Description: Gets the differents properties informations for the given
- * attribute
- */
-
-public class GetAttPropertiesDataClass extends Command implements TangoConst {
-	// ===============================================================
-	/**
-	 * Constructor for Command class GetAttPropertiesDataClass
-	 * 
-	 * @param name
-	 *            command name
-	 * @param in
-	 *            argin type
-	 * @param out
-	 *            argout type
-	 */
-	// ===============================================================
-	public GetAttPropertiesDataClass(final String name, final int in, final int out) {
-		super(name, in, out);
-	}
-
-	// ===============================================================
-	/**
-	 * Constructor for Command class GetAttPropertiesDataClass
-	 * 
-	 * @param name
-	 *            command name
-	 * @param in
-	 *            argin type
-	 * @param in_comments
-	 *            argin description
-	 * @param out
-	 *            argout type
-	 * @param out_comments
-	 *            argout description
-	 */
-	// ===============================================================
-	public GetAttPropertiesDataClass(final String name, final int in, final int out, final String in_comments, final String out_comments) {
-		super(name, in, out, in_comments, out_comments);
-	}
-
-	// ===============================================================
-	/**
-	 * Constructor for Command class GetAttPropertiesDataClass
-	 * 
-	 * @param name
-	 *            command name
-	 * @param in
-	 *            argin type
-	 * @param in_comments
-	 *            argin description
-	 * @param out
-	 *            argout type
-	 * @param out_comments
-	 *            argout description
-	 * @param level
-	 *            The command display type OPERATOR or EXPERT
-	 */
-	// ===============================================================
-	public GetAttPropertiesDataClass(final String name, final int in, final int out, final String in_comments, final String out_comments, final DispLevel level) {
-		super(name, in, out, in_comments, out_comments, level);
-	}
-
-	// ===============================================================
-	/**
-	 * return the result of the device's command.
-	 */
-	// ===============================================================
-	@Override
-	public Any execute(final DeviceImpl device, final Any in_any) throws DevFailed {
-		Util.out2.println("GetAttPropertiesDataClass.execute(): arrived");
-		final String argin = extract_DevString(in_any);
-
-		if (!(device instanceof TdbExtractor)) {
-			Except.throw_exception("DEVICE_ERROR", "Device parameter is not instance of TdbExtractor", "TdbExtractor");
-		}
-
-		return insert(((TdbExtractor) device).get_att_properties_data(argin));
-	}
-
-	// ===============================================================
-	/**
-	 * Check if it is allowed to execute the command.
-	 */
-	// ===============================================================
-	@Override
-	public boolean is_allowed(final DeviceImpl device, final Any data_in) {
-		// End of Generated Code
-
-		// Re-Start of Generated Code
-		return true;
-	}
-}
-
-// -----------------------------------------------------------------------------
-/*
- * end of $Source:
- * /cvsroot/tango-cs/archiving/server/hdbtdbArchivingServers/src/
- * main/java/TdbExtractor/GetAttPropertiesDataClass.java,v $
- */
+//+======================================================================
+// $Source$
+//
+// Project:      Tango Device Server
+//
+// Description:  Java source code for the command TemplateClass of the
+//               TdbExtractor class.
+//
+// $Author: gramer $
+//
+// $Revision: 15443 $
+//
+// $Log$
+// Revision 1.3  2010/11/22 08:09:15  abeilleg
+// remove critical of findbugs
+//
+// Revision 1.2  2009/12/17 12:47:15  pierrejoseph
+// CheckStyle:  Organize imports / Format
+//
+// Revision 1.1  2008/02/28 15:37:14  pierrejoseph
+// TdbExtractor has been forgotten
+//
+// Revision 1.3  2005/11/29 16:13:31  chinkumo
+// Code reformated (pogo compatible)
+//
+// Revision 1.2  2005/11/15 13:45:16  chinkumo
+// ...
+//
+// Revision 1.1  2005/09/09 10:03:41  chinkumo
+// First commit !
+// (Dynamic attribut release)
+//
+//
+// copyleft :    European Synchrotron Radiation Facility
+//               BP 220, Grenoble 38043
+//               FRANCE
+//
+//-======================================================================
+//
+//  		This file is generated by POGO
+//	(Program Obviously used to Generate tango Object)
+//
+//         (c) - Software Engineering Group - ESRF
+//=============================================================================
+
+/**
+ * @author	$Author: gramer $
+ * @version	$Revision: 15443 $
+ */
+package TdbExtractor;
+
+import org.omg.CORBA.Any;
+
+import fr.esrf.Tango.DevFailed;
+import fr.esrf.Tango.DispLevel;
+import fr.esrf.TangoDs.Command;
+import fr.esrf.TangoDs.DeviceImpl;
+import fr.esrf.TangoDs.Except;
+import fr.esrf.TangoDs.TangoConst;
+import fr.esrf.TangoDs.Util;
+
+/**
+ * Class Description: Gets the differents properties informations for the given
+ * attribute
+ */
+
+public class GetAttPropertiesDataClass extends Command implements TangoConst {
+	// ===============================================================
+	/**
+	 * Constructor for Command class GetAttPropertiesDataClass
+	 * 
+	 * @param name
+	 *            command name
+	 * @param in
+	 *            argin type
+	 * @param out
+	 *            argout type
+	 */
+	// ===============================================================
+	public GetAttPropertiesDataClass(final String name, final int in, final int out) {
+		super(name, in, out);
+	}
+
+	// ===============================================================
+	/**
+	 * Constructor for Command class GetAttPropertiesDataClass
+	 * 
+	 * @param name
+	 *            command name
+	 * @param in
+	 *            argin type
+	 * @param in_comments
+	 *            argin description
+	 * @param out
+	 *            argout type
+	 * @param out_comments
+	 *            argout description
+	 */
+	// ===============================================================
+	public GetAttPropertiesDataClass(final String name, final int in, final int out, final String in_comments, final String out_comments) {
+		super(name, in, out, in_comments, out_comments);
+	}
+
+	// ===============================================================
+	/**
+	 * Constructor for Command class GetAttPropertiesDataClass
+	 * 
+	 * @param name
+	 *            command name
+	 * @param in
+	 *            argin type
+	 * @param in_comments
+	 *            argin description
+	 * @param out
+	 *            argout type
+	 * @param out_comments
+	 *            argout description
+	 * @param level
+	 *            The command display type OPERATOR or EXPERT
+	 */
+	// ===============================================================
+	public GetAttPropertiesDataClass(final String name, final int in, final int out, final String in_comments, final String out_comments, final DispLevel level) {
+		super(name, in, out, in_comments, out_comments, level);
+	}
+
+	// ===============================================================
+	/**
+	 * return the result of the device's command.
+	 */
+	// ===============================================================
+	@Override
+	public Any execute(final DeviceImpl device, final Any in_any) throws DevFailed {
+		Util.out2.println("GetAttPropertiesDataClass.execute(): arrived");
+		final String argin = extract_DevString(in_any);
+
+		if (!(device instanceof TdbExtractor)) {
+			Except.throw_exception("DEVICE_ERROR", "Device parameter is not instance of TdbExtractor", "TdbExtractor");
+		}
+
+		return insert(((TdbExtractor) device).get_att_properties_data(argin));
+	}
+
+	// ===============================================================
+	/**
+	 * Check if it is allowed to execute the command.
+	 */
+	// ===============================================================
+	@Override
+	public boolean is_allowed(final DeviceImpl device, final Any data_in) {
+		// End of Generated Code
+
+		// Re-Start of Generated Code
+		return true;
+	}
+}
+
+// -----------------------------------------------------------------------------
+/*
+ * end of $Source:
+ * /cvsroot/tango-cs/archiving/server/hdbtdbArchivingServers/src/
+ * main/java/TdbExtractor/GetAttPropertiesDataClass.java,v $
+ */
diff --git a/src/main/java/TdbExtractor/GetAttributesByDomainFamilyMembersCountClass.java b/tdbextractor/src/main/java/TdbExtractor/GetAttributesByDomainFamilyMembersCountClass.java
similarity index 94%
rename from src/main/java/TdbExtractor/GetAttributesByDomainFamilyMembersCountClass.java
rename to tdbextractor/src/main/java/TdbExtractor/GetAttributesByDomainFamilyMembersCountClass.java
index 0a9c2a1c5fa7ed3adac8ab99f9a0288b618f148f..674c2b5020c9f7e85ab20e3b5525f0305aaf761f 100644
--- a/src/main/java/TdbExtractor/GetAttributesByDomainFamilyMembersCountClass.java
+++ b/tdbextractor/src/main/java/TdbExtractor/GetAttributesByDomainFamilyMembersCountClass.java
@@ -1,165 +1,165 @@
-//+======================================================================
-// $Source$
-//
-// Project:      Tango Device Server
-//
-// Description:  Java source code for the command TemplateClass of the
-//               TdbExtractor class.
-//
-// $Author$
-//
-// $Revision$
-//
-// $Log$
-// Revision 1.3  2010/11/22 08:09:15  abeilleg
-// remove critical of findbugs
-//
-// Revision 1.2  2009/12/17 12:47:15  pierrejoseph
-// CheckStyle:  Organize imports / Format
-//
-// Revision 1.1  2008/02/28 15:37:15  pierrejoseph
-// TdbExtractor has been forgotten
-//
-// Revision 1.3  2005/11/29 16:13:31  chinkumo
-// Code reformated (pogo compatible)
-//
-// Revision 1.2  2005/11/15 13:45:16  chinkumo
-// ...
-//
-// Revision 1.1  2005/09/09 10:03:41  chinkumo
-// First commit !
-// (Dynamic attribut release)
-//
-//
-// copyleft :    European Synchrotron Radiation Facility
-//               BP 220, Grenoble 38043
-//               FRANCE
-//
-//-======================================================================
-//
-//  		This file is generated by POGO
-//	(Program Obviously used to Generate tango Object)
-//
-//         (c) - Software Engineering Group - ESRF
-//=============================================================================
-
-/**
- * @author	$Author$
- * @version	$Revision$
- */
-package TdbExtractor;
-
-import org.omg.CORBA.Any;
-
-import fr.esrf.Tango.DevFailed;
-import fr.esrf.Tango.DispLevel;
-import fr.esrf.TangoDs.Command;
-import fr.esrf.TangoDs.DeviceImpl;
-import fr.esrf.TangoDs.Except;
-import fr.esrf.TangoDs.TangoConst;
-import fr.esrf.TangoDs.Util;
-
-/**
- * Class Description: Returns the number of registered the attributes for a
- * given domain, family, member.
- */
-
-public class GetAttributesByDomainFamilyMembersCountClass extends Command implements TangoConst {
-	// ===============================================================
-	/**
-	 * Constructor for Command class
-	 * GetAttributesByDomainFamilyMembersCountClass
-	 * 
-	 * @param name
-	 *            command name
-	 * @param in
-	 *            argin type
-	 * @param out
-	 *            argout type
-	 */
-	// ===============================================================
-	public GetAttributesByDomainFamilyMembersCountClass(final String name, final int in, final int out) {
-		super(name, in, out);
-	}
-
-	// ===============================================================
-	/**
-	 * Constructor for Command class
-	 * GetAttributesByDomainFamilyMembersCountClass
-	 * 
-	 * @param name
-	 *            command name
-	 * @param in
-	 *            argin type
-	 * @param in_comments
-	 *            argin description
-	 * @param out
-	 *            argout type
-	 * @param out_comments
-	 *            argout description
-	 */
-	// ===============================================================
-	public GetAttributesByDomainFamilyMembersCountClass(final String name, final int in, final int out, final String in_comments, final String out_comments) {
-		super(name, in, out, in_comments, out_comments);
-	}
-
-	// ===============================================================
-	/**
-	 * Constructor for Command class
-	 * GetAttributesByDomainFamilyMembersCountClass
-	 * 
-	 * @param name
-	 *            command name
-	 * @param in
-	 *            argin type
-	 * @param in_comments
-	 *            argin description
-	 * @param out
-	 *            argout type
-	 * @param out_comments
-	 *            argout description
-	 * @param level
-	 *            The command display type OPERATOR or EXPERT
-	 */
-	// ===============================================================
-	public GetAttributesByDomainFamilyMembersCountClass(final String name, final int in, final int out, final String in_comments, final String out_comments, final DispLevel level) {
-		super(name, in, out, in_comments, out_comments, level);
-	}
-
-	// ===============================================================
-	/**
-	 * return the result of the device's command.
-	 */
-	// ===============================================================
-	@Override
-	public Any execute(final DeviceImpl device, final Any in_any) throws DevFailed {
-		Util.out2.println("GetAttributesByDomainFamilyMembersCountClass.execute(): arrived");
-		final String[] argin = extract_DevVarStringArray(in_any);
-
-		if (!(device instanceof TdbExtractor)) {
-			Except.throw_exception("DEVICE_ERROR", "Device parameter is not instance of TdbExtractor", "TdbExtractor");
-		}
-
-		return insert(((TdbExtractor) device).get_attributes_by_domain_family_members_count(argin));
-	}
-
-	// ===============================================================
-	/**
-	 * Check if it is allowed to execute the command.
-	 */
-	// ===============================================================
-	@Override
-	public boolean is_allowed(final DeviceImpl device, final Any data_in) {
-		// End of Generated Code
-
-		// Re-Start of Generated Code
-		return true;
-	}
-}
-
-// -----------------------------------------------------------------------------
-/*
- * end of $Source:
- * /cvsroot/tango-cs/archiving/server/hdbtdbArchivingServers/src/
- * main/java/TdbExtractor/GetAttributesByDomainFamilyMembersCountClass.java,v $
- */
+//+======================================================================
+// $Source$
+//
+// Project:      Tango Device Server
+//
+// Description:  Java source code for the command TemplateClass of the
+//               TdbExtractor class.
+//
+// $Author: gramer $
+//
+// $Revision: 15443 $
+//
+// $Log$
+// Revision 1.3  2010/11/22 08:09:15  abeilleg
+// remove critical of findbugs
+//
+// Revision 1.2  2009/12/17 12:47:15  pierrejoseph
+// CheckStyle:  Organize imports / Format
+//
+// Revision 1.1  2008/02/28 15:37:15  pierrejoseph
+// TdbExtractor has been forgotten
+//
+// Revision 1.3  2005/11/29 16:13:31  chinkumo
+// Code reformated (pogo compatible)
+//
+// Revision 1.2  2005/11/15 13:45:16  chinkumo
+// ...
+//
+// Revision 1.1  2005/09/09 10:03:41  chinkumo
+// First commit !
+// (Dynamic attribut release)
+//
+//
+// copyleft :    European Synchrotron Radiation Facility
+//               BP 220, Grenoble 38043
+//               FRANCE
+//
+//-======================================================================
+//
+//  		This file is generated by POGO
+//	(Program Obviously used to Generate tango Object)
+//
+//         (c) - Software Engineering Group - ESRF
+//=============================================================================
+
+/**
+ * @author	$Author: gramer $
+ * @version	$Revision: 15443 $
+ */
+package TdbExtractor;
+
+import org.omg.CORBA.Any;
+
+import fr.esrf.Tango.DevFailed;
+import fr.esrf.Tango.DispLevel;
+import fr.esrf.TangoDs.Command;
+import fr.esrf.TangoDs.DeviceImpl;
+import fr.esrf.TangoDs.Except;
+import fr.esrf.TangoDs.TangoConst;
+import fr.esrf.TangoDs.Util;
+
+/**
+ * Class Description: Returns the number of registered the attributes for a
+ * given domain, family, member.
+ */
+
+public class GetAttributesByDomainFamilyMembersCountClass extends Command implements TangoConst {
+	// ===============================================================
+	/**
+	 * Constructor for Command class
+	 * GetAttributesByDomainFamilyMembersCountClass
+	 * 
+	 * @param name
+	 *            command name
+	 * @param in
+	 *            argin type
+	 * @param out
+	 *            argout type
+	 */
+	// ===============================================================
+	public GetAttributesByDomainFamilyMembersCountClass(final String name, final int in, final int out) {
+		super(name, in, out);
+	}
+
+	// ===============================================================
+	/**
+	 * Constructor for Command class
+	 * GetAttributesByDomainFamilyMembersCountClass
+	 * 
+	 * @param name
+	 *            command name
+	 * @param in
+	 *            argin type
+	 * @param in_comments
+	 *            argin description
+	 * @param out
+	 *            argout type
+	 * @param out_comments
+	 *            argout description
+	 */
+	// ===============================================================
+	public GetAttributesByDomainFamilyMembersCountClass(final String name, final int in, final int out, final String in_comments, final String out_comments) {
+		super(name, in, out, in_comments, out_comments);
+	}
+
+	// ===============================================================
+	/**
+	 * Constructor for Command class
+	 * GetAttributesByDomainFamilyMembersCountClass
+	 * 
+	 * @param name
+	 *            command name
+	 * @param in
+	 *            argin type
+	 * @param in_comments
+	 *            argin description
+	 * @param out
+	 *            argout type
+	 * @param out_comments
+	 *            argout description
+	 * @param level
+	 *            The command display type OPERATOR or EXPERT
+	 */
+	// ===============================================================
+	public GetAttributesByDomainFamilyMembersCountClass(final String name, final int in, final int out, final String in_comments, final String out_comments, final DispLevel level) {
+		super(name, in, out, in_comments, out_comments, level);
+	}
+
+	// ===============================================================
+	/**
+	 * return the result of the device's command.
+	 */
+	// ===============================================================
+	@Override
+	public Any execute(final DeviceImpl device, final Any in_any) throws DevFailed {
+		Util.out2.println("GetAttributesByDomainFamilyMembersCountClass.execute(): arrived");
+		final String[] argin = extract_DevVarStringArray(in_any);
+
+		if (!(device instanceof TdbExtractor)) {
+			Except.throw_exception("DEVICE_ERROR", "Device parameter is not instance of TdbExtractor", "TdbExtractor");
+		}
+
+		return insert(((TdbExtractor) device).get_attributes_by_domain_family_members_count(argin));
+	}
+
+	// ===============================================================
+	/**
+	 * Check if it is allowed to execute the command.
+	 */
+	// ===============================================================
+	@Override
+	public boolean is_allowed(final DeviceImpl device, final Any data_in) {
+		// End of Generated Code
+
+		// Re-Start of Generated Code
+		return true;
+	}
+}
+
+// -----------------------------------------------------------------------------
+/*
+ * end of $Source:
+ * /cvsroot/tango-cs/archiving/server/hdbtdbArchivingServers/src/
+ * main/java/TdbExtractor/GetAttributesByDomainFamilyMembersCountClass.java,v $
+ */
diff --git a/src/main/java/TdbExtractor/GetConnectionStateClass.java b/tdbextractor/src/main/java/TdbExtractor/GetConnectionStateClass.java
similarity index 94%
rename from src/main/java/TdbExtractor/GetConnectionStateClass.java
rename to tdbextractor/src/main/java/TdbExtractor/GetConnectionStateClass.java
index 1e63b9088eed97dc443f40253ec991cf5342359d..341f1d520ffb4ac15683e92f38e16fede345bc1b 100644
--- a/src/main/java/TdbExtractor/GetConnectionStateClass.java
+++ b/tdbextractor/src/main/java/TdbExtractor/GetConnectionStateClass.java
@@ -1,161 +1,161 @@
-//+======================================================================
-// $Source$
-//
-// Project:      Tango Device Server
-//
-// Description:  Java source code for the command TemplateClass of the
-//               TdbExtractor class.
-//
-// $Author$
-//
-// $Revision$
-//
-// $Log$
-// Revision 1.3  2010/11/22 08:09:15  abeilleg
-// remove critical of findbugs
-//
-// Revision 1.2  2009/12/17 12:47:15  pierrejoseph
-// CheckStyle:  Organize imports / Format
-//
-// Revision 1.1  2008/02/28 15:37:13  pierrejoseph
-// TdbExtractor has been forgotten
-//
-// Revision 1.3  2005/11/29 16:13:31  chinkumo
-// Code reformated (pogo compatible)
-//
-// Revision 1.2  2005/11/15 13:45:16  chinkumo
-// ...
-//
-// Revision 1.1  2005/09/09 10:03:41  chinkumo
-// First commit !
-// (Dynamic attribut release)
-//
-//
-// copyleft :    European Synchrotron Radiation Facility
-//               BP 220, Grenoble 38043
-//               FRANCE
-//
-//-======================================================================
-//
-//  		This file is generated by POGO
-//	(Program Obviously used to Generate tango Object)
-//
-//         (c) - Software Engineering Group - ESRF
-//=============================================================================
-
-/**
- * @author	$Author$
- * @version	$Revision$
- */
-package TdbExtractor;
-
-import org.omg.CORBA.Any;
-
-import fr.esrf.Tango.DevFailed;
-import fr.esrf.Tango.DispLevel;
-import fr.esrf.TangoDs.Command;
-import fr.esrf.TangoDs.DeviceImpl;
-import fr.esrf.TangoDs.Except;
-import fr.esrf.TangoDs.TangoConst;
-import fr.esrf.TangoDs.Util;
-
-/**
- * Class Description: Cheks if the connection to the historical database is
- * alive.
- */
-
-public class GetConnectionStateClass extends Command implements TangoConst {
-	// ===============================================================
-	/**
-	 * Constructor for Command class GetConnectionStateClass
-	 * 
-	 * @param name
-	 *            command name
-	 * @param in
-	 *            argin type
-	 * @param out
-	 *            argout type
-	 */
-	// ===============================================================
-	public GetConnectionStateClass(final String name, final int in, final int out) {
-		super(name, in, out);
-	}
-
-	// ===============================================================
-	/**
-	 * Constructor for Command class GetConnectionStateClass
-	 * 
-	 * @param name
-	 *            command name
-	 * @param in
-	 *            argin type
-	 * @param in_comments
-	 *            argin description
-	 * @param out
-	 *            argout type
-	 * @param out_comments
-	 *            argout description
-	 */
-	// ===============================================================
-	public GetConnectionStateClass(final String name, final int in, final int out, final String in_comments, final String out_comments) {
-		super(name, in, out, in_comments, out_comments);
-	}
-
-	// ===============================================================
-	/**
-	 * Constructor for Command class GetConnectionStateClass
-	 * 
-	 * @param name
-	 *            command name
-	 * @param in
-	 *            argin type
-	 * @param in_comments
-	 *            argin description
-	 * @param out
-	 *            argout type
-	 * @param out_comments
-	 *            argout description
-	 * @param level
-	 *            The command display type OPERATOR or EXPERT
-	 */
-	// ===============================================================
-	public GetConnectionStateClass(final String name, final int in, final int out, final String in_comments, final String out_comments, final DispLevel level) {
-		super(name, in, out, in_comments, out_comments, level);
-	}
-
-	// ===============================================================
-	/**
-	 * return the result of the device's command.
-	 */
-	// ===============================================================
-	@Override
-	public Any execute(final DeviceImpl device, final Any in_any) throws DevFailed {
-		Util.out2.println("GetConnectionStateClass.execute(): arrived");
-
-		if (!(device instanceof TdbExtractor)) {
-			Except.throw_exception("DEVICE_ERROR", "Device parameter is not instance of TdbExtractor", "TdbExtractor");
-		}
-
-		return insert(((TdbExtractor) device).get_connection_state());
-	}
-
-	// ===============================================================
-	/**
-	 * Check if it is allowed to execute the command.
-	 */
-	// ===============================================================
-	@Override
-	public boolean is_allowed(final DeviceImpl device, final Any data_in) {
-		// End of Generated Code
-
-		// Re-Start of Generated Code
-		return true;
-	}
-}
-
-// -----------------------------------------------------------------------------
-/*
- * end of $Source:
- * /cvsroot/tango-cs/archiving/server/hdbtdbArchivingServers/src/
- * main/java/TdbExtractor/GetConnectionStateClass.java,v $
- */
+//+======================================================================
+// $Source$
+//
+// Project:      Tango Device Server
+//
+// Description:  Java source code for the command TemplateClass of the
+//               TdbExtractor class.
+//
+// $Author: gramer $
+//
+// $Revision: 15443 $
+//
+// $Log$
+// Revision 1.3  2010/11/22 08:09:15  abeilleg
+// remove critical of findbugs
+//
+// Revision 1.2  2009/12/17 12:47:15  pierrejoseph
+// CheckStyle:  Organize imports / Format
+//
+// Revision 1.1  2008/02/28 15:37:13  pierrejoseph
+// TdbExtractor has been forgotten
+//
+// Revision 1.3  2005/11/29 16:13:31  chinkumo
+// Code reformated (pogo compatible)
+//
+// Revision 1.2  2005/11/15 13:45:16  chinkumo
+// ...
+//
+// Revision 1.1  2005/09/09 10:03:41  chinkumo
+// First commit !
+// (Dynamic attribut release)
+//
+//
+// copyleft :    European Synchrotron Radiation Facility
+//               BP 220, Grenoble 38043
+//               FRANCE
+//
+//-======================================================================
+//
+//  		This file is generated by POGO
+//	(Program Obviously used to Generate tango Object)
+//
+//         (c) - Software Engineering Group - ESRF
+//=============================================================================
+
+/**
+ * @author	$Author: gramer $
+ * @version	$Revision: 15443 $
+ */
+package TdbExtractor;
+
+import org.omg.CORBA.Any;
+
+import fr.esrf.Tango.DevFailed;
+import fr.esrf.Tango.DispLevel;
+import fr.esrf.TangoDs.Command;
+import fr.esrf.TangoDs.DeviceImpl;
+import fr.esrf.TangoDs.Except;
+import fr.esrf.TangoDs.TangoConst;
+import fr.esrf.TangoDs.Util;
+
+/**
+ * Class Description: Cheks if the connection to the historical database is
+ * alive.
+ */
+
+public class GetConnectionStateClass extends Command implements TangoConst {
+	// ===============================================================
+	/**
+	 * Constructor for Command class GetConnectionStateClass
+	 * 
+	 * @param name
+	 *            command name
+	 * @param in
+	 *            argin type
+	 * @param out
+	 *            argout type
+	 */
+	// ===============================================================
+	public GetConnectionStateClass(final String name, final int in, final int out) {
+		super(name, in, out);
+	}
+
+	// ===============================================================
+	/**
+	 * Constructor for Command class GetConnectionStateClass
+	 * 
+	 * @param name
+	 *            command name
+	 * @param in
+	 *            argin type
+	 * @param in_comments
+	 *            argin description
+	 * @param out
+	 *            argout type
+	 * @param out_comments
+	 *            argout description
+	 */
+	// ===============================================================
+	public GetConnectionStateClass(final String name, final int in, final int out, final String in_comments, final String out_comments) {
+		super(name, in, out, in_comments, out_comments);
+	}
+
+	// ===============================================================
+	/**
+	 * Constructor for Command class GetConnectionStateClass
+	 * 
+	 * @param name
+	 *            command name
+	 * @param in
+	 *            argin type
+	 * @param in_comments
+	 *            argin description
+	 * @param out
+	 *            argout type
+	 * @param out_comments
+	 *            argout description
+	 * @param level
+	 *            The command display type OPERATOR or EXPERT
+	 */
+	// ===============================================================
+	public GetConnectionStateClass(final String name, final int in, final int out, final String in_comments, final String out_comments, final DispLevel level) {
+		super(name, in, out, in_comments, out_comments, level);
+	}
+
+	// ===============================================================
+	/**
+	 * return the result of the device's command.
+	 */
+	// ===============================================================
+	@Override
+	public Any execute(final DeviceImpl device, final Any in_any) throws DevFailed {
+		Util.out2.println("GetConnectionStateClass.execute(): arrived");
+
+		if (!(device instanceof TdbExtractor)) {
+			Except.throw_exception("DEVICE_ERROR", "Device parameter is not instance of TdbExtractor", "TdbExtractor");
+		}
+
+		return insert(((TdbExtractor) device).get_connection_state());
+	}
+
+	// ===============================================================
+	/**
+	 * Check if it is allowed to execute the command.
+	 */
+	// ===============================================================
+	@Override
+	public boolean is_allowed(final DeviceImpl device, final Any data_in) {
+		// End of Generated Code
+
+		// Re-Start of Generated Code
+		return true;
+	}
+}
+
+// -----------------------------------------------------------------------------
+/*
+ * end of $Source:
+ * /cvsroot/tango-cs/archiving/server/hdbtdbArchivingServers/src/
+ * main/java/TdbExtractor/GetConnectionStateClass.java,v $
+ */
diff --git a/src/main/java/TdbExtractor/GetCurrentArchivedAttClass.java b/tdbextractor/src/main/java/TdbExtractor/GetCurrentArchivedAttClass.java
similarity index 94%
rename from src/main/java/TdbExtractor/GetCurrentArchivedAttClass.java
rename to tdbextractor/src/main/java/TdbExtractor/GetCurrentArchivedAttClass.java
index c92a5dfb76ee82d8164d30749e79643d2590b76e..1bdfb94a73a30ae88a91c76da27dec553cf2793a 100644
--- a/src/main/java/TdbExtractor/GetCurrentArchivedAttClass.java
+++ b/tdbextractor/src/main/java/TdbExtractor/GetCurrentArchivedAttClass.java
@@ -1,164 +1,164 @@
-//+======================================================================
-// $Source$
-//
-// Project:      Tango Device Server
-//
-// Description:  Java source code for the command TemplateClass of the
-//               TdbExtractor class.
-//
-// $Author$
-//
-// $Revision$
-//
-// $Log$
-// Revision 1.3  2010/11/22 08:09:15  abeilleg
-// remove critical of findbugs
-//
-// Revision 1.2  2009/12/17 12:47:15  pierrejoseph
-// CheckStyle:  Organize imports / Format
-//
-// Revision 1.1  2008/02/28 15:37:15  pierrejoseph
-// TdbExtractor has been forgotten
-//
-// Revision 1.4  2006/02/15 11:12:20  chinkumo
-// Javadoc comments updated.
-//
-// Revision 1.3  2005/11/29 16:13:31  chinkumo
-// Code reformated (pogo compatible)
-//
-// Revision 1.2  2005/11/15 13:45:16  chinkumo
-// ...
-//
-// Revision 1.1  2005/09/09 10:03:41  chinkumo
-// First commit !
-// (Dynamic attribut release)
-//
-//
-// copyleft :    European Synchrotron Radiation Facility
-//               BP 220, Grenoble 38043
-//               FRANCE
-//
-//-======================================================================
-//
-//  		This file is generated by POGO
-//	(Program Obviously used to Generate tango Object)
-//
-//         (c) - Software Engineering Group - ESRF
-//=============================================================================
-
-/**
- * @author	$Author$
- * @version	$Revision$
- */
-package TdbExtractor;
-
-import org.omg.CORBA.Any;
-
-import fr.esrf.Tango.DevFailed;
-import fr.esrf.Tango.DispLevel;
-import fr.esrf.TangoDs.Command;
-import fr.esrf.TangoDs.DeviceImpl;
-import fr.esrf.TangoDs.Except;
-import fr.esrf.TangoDs.TangoConst;
-import fr.esrf.TangoDs.Util;
-
-/**
- * Class Description: Gets the list of attributes that are being archived in
- * <I>TDB</I>
- */
-
-public class GetCurrentArchivedAttClass extends Command implements TangoConst {
-	// ===============================================================
-	/**
-	 * Constructor for Command class GetCurrentArchivedAttClass
-	 * 
-	 * @param name
-	 *            command name
-	 * @param in
-	 *            argin type
-	 * @param out
-	 *            argout type
-	 */
-	// ===============================================================
-	public GetCurrentArchivedAttClass(final String name, final int in, final int out) {
-		super(name, in, out);
-	}
-
-	// ===============================================================
-	/**
-	 * Constructor for Command class GetCurrentArchivedAttClass
-	 * 
-	 * @param name
-	 *            command name
-	 * @param in
-	 *            argin type
-	 * @param in_comments
-	 *            argin description
-	 * @param out
-	 *            argout type
-	 * @param out_comments
-	 *            argout description
-	 */
-	// ===============================================================
-	public GetCurrentArchivedAttClass(final String name, final int in, final int out, final String in_comments, final String out_comments) {
-		super(name, in, out, in_comments, out_comments);
-	}
-
-	// ===============================================================
-	/**
-	 * Constructor for Command class GetCurrentArchivedAttClass
-	 * 
-	 * @param name
-	 *            command name
-	 * @param in
-	 *            argin type
-	 * @param in_comments
-	 *            argin description
-	 * @param out
-	 *            argout type
-	 * @param out_comments
-	 *            argout description
-	 * @param level
-	 *            The command display type OPERATOR or EXPERT
-	 */
-	// ===============================================================
-	public GetCurrentArchivedAttClass(final String name, final int in, final int out, final String in_comments, final String out_comments, final DispLevel level) {
-		super(name, in, out, in_comments, out_comments, level);
-	}
-
-	// ===============================================================
-	/**
-	 * return the result of the device's command.
-	 */
-	// ===============================================================
-	@Override
-	public Any execute(final DeviceImpl device, final Any in_any) throws DevFailed {
-		Util.out2.println("GetCurrentArchivedAttClass.execute(): arrived");
-
-		if (!(device instanceof TdbExtractor)) {
-			Except.throw_exception("DEVICE_ERROR", "Device parameter is not instance of TdbExtractor", "TdbExtractor");
-		}
-
-		return insert(((TdbExtractor) device).get_current_archived_att());
-	}
-
-	// ===============================================================
-	/**
-	 * Check if it is allowed to execute the command.
-	 */
-	// ===============================================================
-	@Override
-	public boolean is_allowed(final DeviceImpl device, final Any data_in) {
-		// End of Generated Code
-
-		// Re-Start of Generated Code
-		return true;
-	}
-}
-
-// -----------------------------------------------------------------------------
-/*
- * end of $Source:
- * /cvsroot/tango-cs/archiving/server/hdbtdbArchivingServers/src/
- * main/java/TdbExtractor/GetCurrentArchivedAttClass.java,v $
- */
+//+======================================================================
+// $Source$
+//
+// Project:      Tango Device Server
+//
+// Description:  Java source code for the command TemplateClass of the
+//               TdbExtractor class.
+//
+// $Author: gramer $
+//
+// $Revision: 15443 $
+//
+// $Log$
+// Revision 1.3  2010/11/22 08:09:15  abeilleg
+// remove critical of findbugs
+//
+// Revision 1.2  2009/12/17 12:47:15  pierrejoseph
+// CheckStyle:  Organize imports / Format
+//
+// Revision 1.1  2008/02/28 15:37:15  pierrejoseph
+// TdbExtractor has been forgotten
+//
+// Revision 1.4  2006/02/15 11:12:20  chinkumo
+// Javadoc comments updated.
+//
+// Revision 1.3  2005/11/29 16:13:31  chinkumo
+// Code reformated (pogo compatible)
+//
+// Revision 1.2  2005/11/15 13:45:16  chinkumo
+// ...
+//
+// Revision 1.1  2005/09/09 10:03:41  chinkumo
+// First commit !
+// (Dynamic attribut release)
+//
+//
+// copyleft :    European Synchrotron Radiation Facility
+//               BP 220, Grenoble 38043
+//               FRANCE
+//
+//-======================================================================
+//
+//  		This file is generated by POGO
+//	(Program Obviously used to Generate tango Object)
+//
+//         (c) - Software Engineering Group - ESRF
+//=============================================================================
+
+/**
+ * @author	$Author: gramer $
+ * @version	$Revision: 15443 $
+ */
+package TdbExtractor;
+
+import org.omg.CORBA.Any;
+
+import fr.esrf.Tango.DevFailed;
+import fr.esrf.Tango.DispLevel;
+import fr.esrf.TangoDs.Command;
+import fr.esrf.TangoDs.DeviceImpl;
+import fr.esrf.TangoDs.Except;
+import fr.esrf.TangoDs.TangoConst;
+import fr.esrf.TangoDs.Util;
+
+/**
+ * Class Description: Gets the list of attributes that are being archived in
+ * <I>TDB</I>
+ */
+
+public class GetCurrentArchivedAttClass extends Command implements TangoConst {
+	// ===============================================================
+	/**
+	 * Constructor for Command class GetCurrentArchivedAttClass
+	 * 
+	 * @param name
+	 *            command name
+	 * @param in
+	 *            argin type
+	 * @param out
+	 *            argout type
+	 */
+	// ===============================================================
+	public GetCurrentArchivedAttClass(final String name, final int in, final int out) {
+		super(name, in, out);
+	}
+
+	// ===============================================================
+	/**
+	 * Constructor for Command class GetCurrentArchivedAttClass
+	 * 
+	 * @param name
+	 *            command name
+	 * @param in
+	 *            argin type
+	 * @param in_comments
+	 *            argin description
+	 * @param out
+	 *            argout type
+	 * @param out_comments
+	 *            argout description
+	 */
+	// ===============================================================
+	public GetCurrentArchivedAttClass(final String name, final int in, final int out, final String in_comments, final String out_comments) {
+		super(name, in, out, in_comments, out_comments);
+	}
+
+	// ===============================================================
+	/**
+	 * Constructor for Command class GetCurrentArchivedAttClass
+	 * 
+	 * @param name
+	 *            command name
+	 * @param in
+	 *            argin type
+	 * @param in_comments
+	 *            argin description
+	 * @param out
+	 *            argout type
+	 * @param out_comments
+	 *            argout description
+	 * @param level
+	 *            The command display type OPERATOR or EXPERT
+	 */
+	// ===============================================================
+	public GetCurrentArchivedAttClass(final String name, final int in, final int out, final String in_comments, final String out_comments, final DispLevel level) {
+		super(name, in, out, in_comments, out_comments, level);
+	}
+
+	// ===============================================================
+	/**
+	 * return the result of the device's command.
+	 */
+	// ===============================================================
+	@Override
+	public Any execute(final DeviceImpl device, final Any in_any) throws DevFailed {
+		Util.out2.println("GetCurrentArchivedAttClass.execute(): arrived");
+
+		if (!(device instanceof TdbExtractor)) {
+			Except.throw_exception("DEVICE_ERROR", "Device parameter is not instance of TdbExtractor", "TdbExtractor");
+		}
+
+		return insert(((TdbExtractor) device).get_current_archived_att());
+	}
+
+	// ===============================================================
+	/**
+	 * Check if it is allowed to execute the command.
+	 */
+	// ===============================================================
+	@Override
+	public boolean is_allowed(final DeviceImpl device, final Any data_in) {
+		// End of Generated Code
+
+		// Re-Start of Generated Code
+		return true;
+	}
+}
+
+// -----------------------------------------------------------------------------
+/*
+ * end of $Source:
+ * /cvsroot/tango-cs/archiving/server/hdbtdbArchivingServers/src/
+ * main/java/TdbExtractor/GetCurrentArchivedAttClass.java,v $
+ */
diff --git a/src/main/java/TdbExtractor/GetDomainsClass.java b/tdbextractor/src/main/java/TdbExtractor/GetDomainsClass.java
similarity index 94%
rename from src/main/java/TdbExtractor/GetDomainsClass.java
rename to tdbextractor/src/main/java/TdbExtractor/GetDomainsClass.java
index 037d00eba49af734edf3edd0f6029b0259458f1f..5c1a3625903b7b5a5f9a853d43ce98dad73cab8b 100644
--- a/src/main/java/TdbExtractor/GetDomainsClass.java
+++ b/tdbextractor/src/main/java/TdbExtractor/GetDomainsClass.java
@@ -1,159 +1,159 @@
-//+======================================================================
-// $Source$
-//
-// Project:      Tango Device Server
-//
-// Description:  Java source code for the command TemplateClass of the
-//               TdbExtractor class.
-//
-// $Author$
-//
-// $Revision$
-//
-// $Log$
-// Revision 1.3  2010/11/22 08:09:14  abeilleg
-// remove critical of findbugs
-//
-// Revision 1.2  2009/12/17 12:47:15  pierrejoseph
-// CheckStyle:  Organize imports / Format
-//
-// Revision 1.1  2008/02/28 15:37:14  pierrejoseph
-// TdbExtractor has been forgotten
-//
-// Revision 1.3  2005/11/29 16:13:31  chinkumo
-// Code reformated (pogo compatible)
-//
-// Revision 1.2  2005/11/15 13:45:16  chinkumo
-// ...
-//
-// Revision 1.1  2005/09/09 10:03:41  chinkumo
-// First commit !
-// (Dynamic attribut release)
-//
-//
-// copyleft :    European Synchrotron Radiation Facility
-//               BP 220, Grenoble 38043
-//               FRANCE
-//
-//-======================================================================
-//
-//  		This file is generated by POGO
-//	(Program Obviously used to Generate tango Object)
-//
-//         (c) - Software Engineering Group - ESRF
-//=============================================================================
-
-/**
- * @author	$Author$
- * @version	$Revision$
- */
-package TdbExtractor;
-
-import org.omg.CORBA.Any;
-
-import fr.esrf.Tango.DevFailed;
-import fr.esrf.Tango.DispLevel;
-import fr.esrf.TangoDs.Command;
-import fr.esrf.TangoDs.DeviceImpl;
-import fr.esrf.TangoDs.Except;
-import fr.esrf.TangoDs.TangoConst;
-import fr.esrf.TangoDs.Util;
-
-/**
- * Class Description: Gets all the registered domains.
- */
-
-public class GetDomainsClass extends Command implements TangoConst {
-	// ===============================================================
-	/**
-	 * Constructor for Command class GetDomainsClass
-	 * 
-	 * @param name
-	 *            command name
-	 * @param in
-	 *            argin type
-	 * @param out
-	 *            argout type
-	 */
-	// ===============================================================
-	public GetDomainsClass(final String name, final int in, final int out) {
-		super(name, in, out);
-	}
-
-	// ===============================================================
-	/**
-	 * Constructor for Command class GetDomainsClass
-	 * 
-	 * @param name
-	 *            command name
-	 * @param in
-	 *            argin type
-	 * @param in_comments
-	 *            argin description
-	 * @param out
-	 *            argout type
-	 * @param out_comments
-	 *            argout description
-	 */
-	// ===============================================================
-	public GetDomainsClass(final String name, final int in, final int out, final String in_comments, final String out_comments) {
-		super(name, in, out, in_comments, out_comments);
-	}
-
-	// ===============================================================
-	/**
-	 * Constructor for Command class GetDomainsClass
-	 * 
-	 * @param name
-	 *            command name
-	 * @param in
-	 *            argin type
-	 * @param in_comments
-	 *            argin description
-	 * @param out
-	 *            argout type
-	 * @param out_comments
-	 *            argout description
-	 * @param level
-	 *            The command display type OPERATOR or EXPERT
-	 */
-	// ===============================================================
-	public GetDomainsClass(final String name, final int in, final int out, final String in_comments, final String out_comments, final DispLevel level) {
-		super(name, in, out, in_comments, out_comments, level);
-	}
-
-	// ===============================================================
-	/**
-	 * return the result of the device's command.
-	 */
-	// ===============================================================
-	@Override
-	public Any execute(final DeviceImpl device, final Any in_any) throws DevFailed {
-		Util.out2.println("GetDomainsClass.execute(): arrived");
-		if (!(device instanceof TdbExtractor)) {
-			Except.throw_exception("DEVICE_ERROR", "Device parameter is not instance of TdbExtractor", "TdbExtractor");
-		}
-
-		return insert(((TdbExtractor) device).get_domains());
-	}
-
-	// ===============================================================
-	/**
-	 * Check if it is allowed to execute the command.
-	 */
-	// ===============================================================
-	@Override
-	public boolean is_allowed(final DeviceImpl device, final Any data_in) {
-		// End of Generated Code
-
-		// Re-Start of Generated Code
-		return true;
-	}
-}
-
-// -----------------------------------------------------------------------------
-/*
- * end of $Source:
- * /cvsroot/tango-cs/archiving/server/hdbtdbArchivingServers/src/
- * main/java/TdbExtractor/GetDomainsClass.java,v $
- */
+//+======================================================================
+// $Source$
+//
+// Project:      Tango Device Server
+//
+// Description:  Java source code for the command TemplateClass of the
+//               TdbExtractor class.
+//
+// $Author: gramer $
+//
+// $Revision: 15443 $
+//
+// $Log$
+// Revision 1.3  2010/11/22 08:09:14  abeilleg
+// remove critical of findbugs
+//
+// Revision 1.2  2009/12/17 12:47:15  pierrejoseph
+// CheckStyle:  Organize imports / Format
+//
+// Revision 1.1  2008/02/28 15:37:14  pierrejoseph
+// TdbExtractor has been forgotten
+//
+// Revision 1.3  2005/11/29 16:13:31  chinkumo
+// Code reformated (pogo compatible)
+//
+// Revision 1.2  2005/11/15 13:45:16  chinkumo
+// ...
+//
+// Revision 1.1  2005/09/09 10:03:41  chinkumo
+// First commit !
+// (Dynamic attribut release)
+//
+//
+// copyleft :    European Synchrotron Radiation Facility
+//               BP 220, Grenoble 38043
+//               FRANCE
+//
+//-======================================================================
+//
+//  		This file is generated by POGO
+//	(Program Obviously used to Generate tango Object)
+//
+//         (c) - Software Engineering Group - ESRF
+//=============================================================================
+
+/**
+ * @author	$Author: gramer $
+ * @version	$Revision: 15443 $
+ */
+package TdbExtractor;
+
+import org.omg.CORBA.Any;
+
+import fr.esrf.Tango.DevFailed;
+import fr.esrf.Tango.DispLevel;
+import fr.esrf.TangoDs.Command;
+import fr.esrf.TangoDs.DeviceImpl;
+import fr.esrf.TangoDs.Except;
+import fr.esrf.TangoDs.TangoConst;
+import fr.esrf.TangoDs.Util;
+
+/**
+ * Class Description: Gets all the registered domains.
+ */
+
+public class GetDomainsClass extends Command implements TangoConst {
+	// ===============================================================
+	/**
+	 * Constructor for Command class GetDomainsClass
+	 * 
+	 * @param name
+	 *            command name
+	 * @param in
+	 *            argin type
+	 * @param out
+	 *            argout type
+	 */
+	// ===============================================================
+	public GetDomainsClass(final String name, final int in, final int out) {
+		super(name, in, out);
+	}
+
+	// ===============================================================
+	/**
+	 * Constructor for Command class GetDomainsClass
+	 * 
+	 * @param name
+	 *            command name
+	 * @param in
+	 *            argin type
+	 * @param in_comments
+	 *            argin description
+	 * @param out
+	 *            argout type
+	 * @param out_comments
+	 *            argout description
+	 */
+	// ===============================================================
+	public GetDomainsClass(final String name, final int in, final int out, final String in_comments, final String out_comments) {
+		super(name, in, out, in_comments, out_comments);
+	}
+
+	// ===============================================================
+	/**
+	 * Constructor for Command class GetDomainsClass
+	 * 
+	 * @param name
+	 *            command name
+	 * @param in
+	 *            argin type
+	 * @param in_comments
+	 *            argin description
+	 * @param out
+	 *            argout type
+	 * @param out_comments
+	 *            argout description
+	 * @param level
+	 *            The command display type OPERATOR or EXPERT
+	 */
+	// ===============================================================
+	public GetDomainsClass(final String name, final int in, final int out, final String in_comments, final String out_comments, final DispLevel level) {
+		super(name, in, out, in_comments, out_comments, level);
+	}
+
+	// ===============================================================
+	/**
+	 * return the result of the device's command.
+	 */
+	// ===============================================================
+	@Override
+	public Any execute(final DeviceImpl device, final Any in_any) throws DevFailed {
+		Util.out2.println("GetDomainsClass.execute(): arrived");
+		if (!(device instanceof TdbExtractor)) {
+			Except.throw_exception("DEVICE_ERROR", "Device parameter is not instance of TdbExtractor", "TdbExtractor");
+		}
+
+		return insert(((TdbExtractor) device).get_domains());
+	}
+
+	// ===============================================================
+	/**
+	 * Check if it is allowed to execute the command.
+	 */
+	// ===============================================================
+	@Override
+	public boolean is_allowed(final DeviceImpl device, final Any data_in) {
+		// End of Generated Code
+
+		// Re-Start of Generated Code
+		return true;
+	}
+}
+
+// -----------------------------------------------------------------------------
+/*
+ * end of $Source:
+ * /cvsroot/tango-cs/archiving/server/hdbtdbArchivingServers/src/
+ * main/java/TdbExtractor/GetDomainsClass.java,v $
+ */
diff --git a/src/main/java/TdbExtractor/GetDomainsCountClass.java b/tdbextractor/src/main/java/TdbExtractor/GetDomainsCountClass.java
similarity index 94%
rename from src/main/java/TdbExtractor/GetDomainsCountClass.java
rename to tdbextractor/src/main/java/TdbExtractor/GetDomainsCountClass.java
index 1956df3c517192e4f43cb504283b26f5f8cd408e..714e00d010b97a8bb2fab7eb713881b0b40fbf8e 100644
--- a/src/main/java/TdbExtractor/GetDomainsCountClass.java
+++ b/tdbextractor/src/main/java/TdbExtractor/GetDomainsCountClass.java
@@ -1,160 +1,160 @@
-//+======================================================================
-// $Source$
-//
-// Project:      Tango Device Server
-//
-// Description:  Java source code for the command TemplateClass of the
-//               TdbExtractor class.
-//
-// $Author$
-//
-// $Revision$
-//
-// $Log$
-// Revision 1.3  2010/11/22 08:09:15  abeilleg
-// remove critical of findbugs
-//
-// Revision 1.2  2009/12/17 12:47:15  pierrejoseph
-// CheckStyle:  Organize imports / Format
-//
-// Revision 1.1  2008/02/28 15:37:14  pierrejoseph
-// TdbExtractor has been forgotten
-//
-// Revision 1.3  2005/11/29 16:13:31  chinkumo
-// Code reformated (pogo compatible)
-//
-// Revision 1.2  2005/11/15 13:45:16  chinkumo
-// ...
-//
-// Revision 1.1  2005/09/09 10:03:41  chinkumo
-// First commit !
-// (Dynamic attribut release)
-//
-//
-// copyleft :    European Synchrotron Radiation Facility
-//               BP 220, Grenoble 38043
-//               FRANCE
-//
-//-======================================================================
-//
-//  		This file is generated by POGO
-//	(Program Obviously used to Generate tango Object)
-//
-//         (c) - Software Engineering Group - ESRF
-//=============================================================================
-
-/**
- * @author	$Author$
- * @version	$Revision$
- */
-package TdbExtractor;
-
-import org.omg.CORBA.Any;
-
-import fr.esrf.Tango.DevFailed;
-import fr.esrf.Tango.DispLevel;
-import fr.esrf.TangoDs.Command;
-import fr.esrf.TangoDs.DeviceImpl;
-import fr.esrf.TangoDs.Except;
-import fr.esrf.TangoDs.TangoConst;
-import fr.esrf.TangoDs.Util;
-
-/**
- * Class Description: Returns the number of distinct registered domains.
- */
-
-public class GetDomainsCountClass extends Command implements TangoConst {
-	// ===============================================================
-	/**
-	 * Constructor for Command class GetDomainsCountClass
-	 * 
-	 * @param name
-	 *            command name
-	 * @param in
-	 *            argin type
-	 * @param out
-	 *            argout type
-	 */
-	// ===============================================================
-	public GetDomainsCountClass(final String name, final int in, final int out) {
-		super(name, in, out);
-	}
-
-	// ===============================================================
-	/**
-	 * Constructor for Command class GetDomainsCountClass
-	 * 
-	 * @param name
-	 *            command name
-	 * @param in
-	 *            argin type
-	 * @param in_comments
-	 *            argin description
-	 * @param out
-	 *            argout type
-	 * @param out_comments
-	 *            argout description
-	 */
-	// ===============================================================
-	public GetDomainsCountClass(final String name, final int in, final int out, final String in_comments, final String out_comments) {
-		super(name, in, out, in_comments, out_comments);
-	}
-
-	// ===============================================================
-	/**
-	 * Constructor for Command class GetDomainsCountClass
-	 * 
-	 * @param name
-	 *            command name
-	 * @param in
-	 *            argin type
-	 * @param in_comments
-	 *            argin description
-	 * @param out
-	 *            argout type
-	 * @param out_comments
-	 *            argout description
-	 * @param level
-	 *            The command display type OPERATOR or EXPERT
-	 */
-	// ===============================================================
-	public GetDomainsCountClass(final String name, final int in, final int out, final String in_comments, final String out_comments, final DispLevel level) {
-		super(name, in, out, in_comments, out_comments, level);
-	}
-
-	// ===============================================================
-	/**
-	 * return the result of the device's command.
-	 */
-	// ===============================================================
-	@Override
-	public Any execute(final DeviceImpl device, final Any in_any) throws DevFailed {
-		Util.out2.println("GetDomainsCountClass.execute(): arrived");
-
-		if (!(device instanceof TdbExtractor)) {
-			Except.throw_exception("DEVICE_ERROR", "Device parameter is not instance of TdbExtractor", "TdbExtractor");
-		}
-
-		return insert(((TdbExtractor) device).get_domains_count());
-	}
-
-	// ===============================================================
-	/**
-	 * Check if it is allowed to execute the command.
-	 */
-	// ===============================================================
-	@Override
-	public boolean is_allowed(final DeviceImpl device, final Any data_in) {
-		// End of Generated Code
-
-		// Re-Start of Generated Code
-		return true;
-	}
-}
-
-// -----------------------------------------------------------------------------
-/*
- * end of $Source:
- * /cvsroot/tango-cs/archiving/server/hdbtdbArchivingServers/src/
- * main/java/TdbExtractor/GetDomainsCountClass.java,v $
- */
+//+======================================================================
+// $Source$
+//
+// Project:      Tango Device Server
+//
+// Description:  Java source code for the command TemplateClass of the
+//               TdbExtractor class.
+//
+// $Author: gramer $
+//
+// $Revision: 15443 $
+//
+// $Log$
+// Revision 1.3  2010/11/22 08:09:15  abeilleg
+// remove critical of findbugs
+//
+// Revision 1.2  2009/12/17 12:47:15  pierrejoseph
+// CheckStyle:  Organize imports / Format
+//
+// Revision 1.1  2008/02/28 15:37:14  pierrejoseph
+// TdbExtractor has been forgotten
+//
+// Revision 1.3  2005/11/29 16:13:31  chinkumo
+// Code reformated (pogo compatible)
+//
+// Revision 1.2  2005/11/15 13:45:16  chinkumo
+// ...
+//
+// Revision 1.1  2005/09/09 10:03:41  chinkumo
+// First commit !
+// (Dynamic attribut release)
+//
+//
+// copyleft :    European Synchrotron Radiation Facility
+//               BP 220, Grenoble 38043
+//               FRANCE
+//
+//-======================================================================
+//
+//  		This file is generated by POGO
+//	(Program Obviously used to Generate tango Object)
+//
+//         (c) - Software Engineering Group - ESRF
+//=============================================================================
+
+/**
+ * @author	$Author: gramer $
+ * @version	$Revision: 15443 $
+ */
+package TdbExtractor;
+
+import org.omg.CORBA.Any;
+
+import fr.esrf.Tango.DevFailed;
+import fr.esrf.Tango.DispLevel;
+import fr.esrf.TangoDs.Command;
+import fr.esrf.TangoDs.DeviceImpl;
+import fr.esrf.TangoDs.Except;
+import fr.esrf.TangoDs.TangoConst;
+import fr.esrf.TangoDs.Util;
+
+/**
+ * Class Description: Returns the number of distinct registered domains.
+ */
+
+public class GetDomainsCountClass extends Command implements TangoConst {
+	// ===============================================================
+	/**
+	 * Constructor for Command class GetDomainsCountClass
+	 * 
+	 * @param name
+	 *            command name
+	 * @param in
+	 *            argin type
+	 * @param out
+	 *            argout type
+	 */
+	// ===============================================================
+	public GetDomainsCountClass(final String name, final int in, final int out) {
+		super(name, in, out);
+	}
+
+	// ===============================================================
+	/**
+	 * Constructor for Command class GetDomainsCountClass
+	 * 
+	 * @param name
+	 *            command name
+	 * @param in
+	 *            argin type
+	 * @param in_comments
+	 *            argin description
+	 * @param out
+	 *            argout type
+	 * @param out_comments
+	 *            argout description
+	 */
+	// ===============================================================
+	public GetDomainsCountClass(final String name, final int in, final int out, final String in_comments, final String out_comments) {
+		super(name, in, out, in_comments, out_comments);
+	}
+
+	// ===============================================================
+	/**
+	 * Constructor for Command class GetDomainsCountClass
+	 * 
+	 * @param name
+	 *            command name
+	 * @param in
+	 *            argin type
+	 * @param in_comments
+	 *            argin description
+	 * @param out
+	 *            argout type
+	 * @param out_comments
+	 *            argout description
+	 * @param level
+	 *            The command display type OPERATOR or EXPERT
+	 */
+	// ===============================================================
+	public GetDomainsCountClass(final String name, final int in, final int out, final String in_comments, final String out_comments, final DispLevel level) {
+		super(name, in, out, in_comments, out_comments, level);
+	}
+
+	// ===============================================================
+	/**
+	 * return the result of the device's command.
+	 */
+	// ===============================================================
+	@Override
+	public Any execute(final DeviceImpl device, final Any in_any) throws DevFailed {
+		Util.out2.println("GetDomainsCountClass.execute(): arrived");
+
+		if (!(device instanceof TdbExtractor)) {
+			Except.throw_exception("DEVICE_ERROR", "Device parameter is not instance of TdbExtractor", "TdbExtractor");
+		}
+
+		return insert(((TdbExtractor) device).get_domains_count());
+	}
+
+	// ===============================================================
+	/**
+	 * Check if it is allowed to execute the command.
+	 */
+	// ===============================================================
+	@Override
+	public boolean is_allowed(final DeviceImpl device, final Any data_in) {
+		// End of Generated Code
+
+		// Re-Start of Generated Code
+		return true;
+	}
+}
+
+// -----------------------------------------------------------------------------
+/*
+ * end of $Source:
+ * /cvsroot/tango-cs/archiving/server/hdbtdbArchivingServers/src/
+ * main/java/TdbExtractor/GetDomainsCountClass.java,v $
+ */
diff --git a/src/main/java/TdbExtractor/GetFamiliesByDomainClass.java b/tdbextractor/src/main/java/TdbExtractor/GetFamiliesByDomainClass.java
similarity index 94%
rename from src/main/java/TdbExtractor/GetFamiliesByDomainClass.java
rename to tdbextractor/src/main/java/TdbExtractor/GetFamiliesByDomainClass.java
index 20406ea04c9d77468be7563cae0f178e5aa2c687..272c21836faf22ff6e84bbc720cc8f3df7bf449b 100644
--- a/src/main/java/TdbExtractor/GetFamiliesByDomainClass.java
+++ b/tdbextractor/src/main/java/TdbExtractor/GetFamiliesByDomainClass.java
@@ -1,161 +1,161 @@
-//+======================================================================
-// $Source$
-//
-// Project:      Tango Device Server
-//
-// Description:  Java source code for the command TemplateClass of the
-//               TdbExtractor class.
-//
-// $Author$
-//
-// $Revision$
-//
-// $Log$
-// Revision 1.3  2010/11/22 08:09:15  abeilleg
-// remove critical of findbugs
-//
-// Revision 1.2  2009/12/17 12:47:15  pierrejoseph
-// CheckStyle:  Organize imports / Format
-//
-// Revision 1.1  2008/02/28 15:37:14  pierrejoseph
-// TdbExtractor has been forgotten
-//
-// Revision 1.3  2005/11/29 16:13:31  chinkumo
-// Code reformated (pogo compatible)
-//
-// Revision 1.2  2005/11/15 13:45:16  chinkumo
-// ...
-//
-// Revision 1.1  2005/09/09 10:03:41  chinkumo
-// First commit !
-// (Dynamic attribut release)
-//
-//
-// copyleft :    European Synchrotron Radiation Facility
-//               BP 220, Grenoble 38043
-//               FRANCE
-//
-//-======================================================================
-//
-//  		This file is generated by POGO
-//	(Program Obviously used to Generate tango Object)
-//
-//         (c) - Software Engineering Group - ESRF
-//=============================================================================
-
-/**
- * @author	$Author$
- * @version	$Revision$
- */
-package TdbExtractor;
-
-import org.omg.CORBA.Any;
-
-import fr.esrf.Tango.DevFailed;
-import fr.esrf.Tango.DispLevel;
-import fr.esrf.TangoDs.Command;
-import fr.esrf.TangoDs.DeviceImpl;
-import fr.esrf.TangoDs.Except;
-import fr.esrf.TangoDs.TangoConst;
-import fr.esrf.TangoDs.Util;
-
-/**
- * Class Description: Gets all the registered families for the given domain.
- */
-
-public class GetFamiliesByDomainClass extends Command implements TangoConst {
-	// ===============================================================
-	/**
-	 * Constructor for Command class GetFamiliesByDomainClass
-	 * 
-	 * @param name
-	 *            command name
-	 * @param in
-	 *            argin type
-	 * @param out
-	 *            argout type
-	 */
-	// ===============================================================
-	public GetFamiliesByDomainClass(final String name, final int in, final int out) {
-		super(name, in, out);
-	}
-
-	// ===============================================================
-	/**
-	 * Constructor for Command class GetFamiliesByDomainClass
-	 * 
-	 * @param name
-	 *            command name
-	 * @param in
-	 *            argin type
-	 * @param in_comments
-	 *            argin description
-	 * @param out
-	 *            argout type
-	 * @param out_comments
-	 *            argout description
-	 */
-	// ===============================================================
-	public GetFamiliesByDomainClass(final String name, final int in, final int out, final String in_comments, final String out_comments) {
-		super(name, in, out, in_comments, out_comments);
-	}
-
-	// ===============================================================
-	/**
-	 * Constructor for Command class GetFamiliesByDomainClass
-	 * 
-	 * @param name
-	 *            command name
-	 * @param in
-	 *            argin type
-	 * @param in_comments
-	 *            argin description
-	 * @param out
-	 *            argout type
-	 * @param out_comments
-	 *            argout description
-	 * @param level
-	 *            The command display type OPERATOR or EXPERT
-	 */
-	// ===============================================================
-	public GetFamiliesByDomainClass(final String name, final int in, final int out, final String in_comments, final String out_comments, final DispLevel level) {
-		super(name, in, out, in_comments, out_comments, level);
-	}
-
-	// ===============================================================
-	/**
-	 * return the result of the device's command.
-	 */
-	// ===============================================================
-	@Override
-	public Any execute(final DeviceImpl device, final Any in_any) throws DevFailed {
-		Util.out2.println("GetFamiliesByDomainClass.execute(): arrived");
-		final String argin = extract_DevString(in_any);
-
-		if (!(device instanceof TdbExtractor)) {
-			Except.throw_exception("DEVICE_ERROR", "Device parameter is not instance of TdbExtractor", "TdbExtractor");
-		}
-
-		return insert(((TdbExtractor) device).get_families_by_domain(argin));
-	}
-
-	// ===============================================================
-	/**
-	 * Check if it is allowed to execute the command.
-	 */
-	// ===============================================================
-	@Override
-	public boolean is_allowed(final DeviceImpl device, final Any data_in) {
-		// End of Generated Code
-
-		// Re-Start of Generated Code
-		return true;
-	}
-}
-
-// -----------------------------------------------------------------------------
-/*
- * end of $Source:
- * /cvsroot/tango-cs/archiving/server/hdbtdbArchivingServers/src/
- * main/java/TdbExtractor/GetFamiliesByDomainClass.java,v $
- */
+//+======================================================================
+// $Source$
+//
+// Project:      Tango Device Server
+//
+// Description:  Java source code for the command TemplateClass of the
+//               TdbExtractor class.
+//
+// $Author: gramer $
+//
+// $Revision: 15443 $
+//
+// $Log$
+// Revision 1.3  2010/11/22 08:09:15  abeilleg
+// remove critical of findbugs
+//
+// Revision 1.2  2009/12/17 12:47:15  pierrejoseph
+// CheckStyle:  Organize imports / Format
+//
+// Revision 1.1  2008/02/28 15:37:14  pierrejoseph
+// TdbExtractor has been forgotten
+//
+// Revision 1.3  2005/11/29 16:13:31  chinkumo
+// Code reformated (pogo compatible)
+//
+// Revision 1.2  2005/11/15 13:45:16  chinkumo
+// ...
+//
+// Revision 1.1  2005/09/09 10:03:41  chinkumo
+// First commit !
+// (Dynamic attribut release)
+//
+//
+// copyleft :    European Synchrotron Radiation Facility
+//               BP 220, Grenoble 38043
+//               FRANCE
+//
+//-======================================================================
+//
+//  		This file is generated by POGO
+//	(Program Obviously used to Generate tango Object)
+//
+//         (c) - Software Engineering Group - ESRF
+//=============================================================================
+
+/**
+ * @author	$Author: gramer $
+ * @version	$Revision: 15443 $
+ */
+package TdbExtractor;
+
+import org.omg.CORBA.Any;
+
+import fr.esrf.Tango.DevFailed;
+import fr.esrf.Tango.DispLevel;
+import fr.esrf.TangoDs.Command;
+import fr.esrf.TangoDs.DeviceImpl;
+import fr.esrf.TangoDs.Except;
+import fr.esrf.TangoDs.TangoConst;
+import fr.esrf.TangoDs.Util;
+
+/**
+ * Class Description: Gets all the registered families for the given domain.
+ */
+
+public class GetFamiliesByDomainClass extends Command implements TangoConst {
+	// ===============================================================
+	/**
+	 * Constructor for Command class GetFamiliesByDomainClass
+	 * 
+	 * @param name
+	 *            command name
+	 * @param in
+	 *            argin type
+	 * @param out
+	 *            argout type
+	 */
+	// ===============================================================
+	public GetFamiliesByDomainClass(final String name, final int in, final int out) {
+		super(name, in, out);
+	}
+
+	// ===============================================================
+	/**
+	 * Constructor for Command class GetFamiliesByDomainClass
+	 * 
+	 * @param name
+	 *            command name
+	 * @param in
+	 *            argin type
+	 * @param in_comments
+	 *            argin description
+	 * @param out
+	 *            argout type
+	 * @param out_comments
+	 *            argout description
+	 */
+	// ===============================================================
+	public GetFamiliesByDomainClass(final String name, final int in, final int out, final String in_comments, final String out_comments) {
+		super(name, in, out, in_comments, out_comments);
+	}
+
+	// ===============================================================
+	/**
+	 * Constructor for Command class GetFamiliesByDomainClass
+	 * 
+	 * @param name
+	 *            command name
+	 * @param in
+	 *            argin type
+	 * @param in_comments
+	 *            argin description
+	 * @param out
+	 *            argout type
+	 * @param out_comments
+	 *            argout description
+	 * @param level
+	 *            The command display type OPERATOR or EXPERT
+	 */
+	// ===============================================================
+	public GetFamiliesByDomainClass(final String name, final int in, final int out, final String in_comments, final String out_comments, final DispLevel level) {
+		super(name, in, out, in_comments, out_comments, level);
+	}
+
+	// ===============================================================
+	/**
+	 * return the result of the device's command.
+	 */
+	// ===============================================================
+	@Override
+	public Any execute(final DeviceImpl device, final Any in_any) throws DevFailed {
+		Util.out2.println("GetFamiliesByDomainClass.execute(): arrived");
+		final String argin = extract_DevString(in_any);
+
+		if (!(device instanceof TdbExtractor)) {
+			Except.throw_exception("DEVICE_ERROR", "Device parameter is not instance of TdbExtractor", "TdbExtractor");
+		}
+
+		return insert(((TdbExtractor) device).get_families_by_domain(argin));
+	}
+
+	// ===============================================================
+	/**
+	 * Check if it is allowed to execute the command.
+	 */
+	// ===============================================================
+	@Override
+	public boolean is_allowed(final DeviceImpl device, final Any data_in) {
+		// End of Generated Code
+
+		// Re-Start of Generated Code
+		return true;
+	}
+}
+
+// -----------------------------------------------------------------------------
+/*
+ * end of $Source:
+ * /cvsroot/tango-cs/archiving/server/hdbtdbArchivingServers/src/
+ * main/java/TdbExtractor/GetFamiliesByDomainClass.java,v $
+ */
diff --git a/src/main/java/TdbExtractor/GetFamiliesByDomainCountClass.java b/tdbextractor/src/main/java/TdbExtractor/GetFamiliesByDomainCountClass.java
similarity index 94%
rename from src/main/java/TdbExtractor/GetFamiliesByDomainCountClass.java
rename to tdbextractor/src/main/java/TdbExtractor/GetFamiliesByDomainCountClass.java
index 7b37ba6f78a62fa32b85f936a83efee3c34cff7b..dd1800945d299affe5d5d1af1362cf1ed4e0a58e 100644
--- a/src/main/java/TdbExtractor/GetFamiliesByDomainCountClass.java
+++ b/tdbextractor/src/main/java/TdbExtractor/GetFamiliesByDomainCountClass.java
@@ -1,162 +1,162 @@
-//+======================================================================
-// $Source$
-//
-// Project:      Tango Device Server
-//
-// Description:  Java source code for the command TemplateClass of the
-//               TdbExtractor class.
-//
-// $Author$
-//
-// $Revision$
-//
-// $Log$
-// Revision 1.3  2010/11/22 08:09:15  abeilleg
-// remove critical of findbugs
-//
-// Revision 1.2  2009/12/17 12:47:15  pierrejoseph
-// CheckStyle:  Organize imports / Format
-//
-// Revision 1.1  2008/02/28 15:37:14  pierrejoseph
-// TdbExtractor has been forgotten
-//
-// Revision 1.3  2005/11/29 16:13:31  chinkumo
-// Code reformated (pogo compatible)
-//
-// Revision 1.2  2005/11/15 13:45:16  chinkumo
-// ...
-//
-// Revision 1.1  2005/09/09 10:03:41  chinkumo
-// First commit !
-// (Dynamic attribut release)
-//
-//
-// copyleft :    European Synchrotron Radiation Facility
-//               BP 220, Grenoble 38043
-//               FRANCE
-//
-//-======================================================================
-//
-//  		This file is generated by POGO
-//	(Program Obviously used to Generate tango Object)
-//
-//         (c) - Software Engineering Group - ESRF
-//=============================================================================
-
-/**
- * @author	$Author$
- * @version	$Revision$
- */
-package TdbExtractor;
-
-import org.omg.CORBA.Any;
-
-import fr.esrf.Tango.DevFailed;
-import fr.esrf.Tango.DispLevel;
-import fr.esrf.TangoDs.Command;
-import fr.esrf.TangoDs.DeviceImpl;
-import fr.esrf.TangoDs.Except;
-import fr.esrf.TangoDs.TangoConst;
-import fr.esrf.TangoDs.Util;
-
-/**
- * Class Description: Returns the number of distinct registered families for a
- * given domain.
- */
-
-public class GetFamiliesByDomainCountClass extends Command implements TangoConst {
-	// ===============================================================
-	/**
-	 * Constructor for Command class GetFamiliesByDomainCountClass
-	 * 
-	 * @param name
-	 *            command name
-	 * @param in
-	 *            argin type
-	 * @param out
-	 *            argout type
-	 */
-	// ===============================================================
-	public GetFamiliesByDomainCountClass(final String name, final int in, final int out) {
-		super(name, in, out);
-	}
-
-	// ===============================================================
-	/**
-	 * Constructor for Command class GetFamiliesByDomainCountClass
-	 * 
-	 * @param name
-	 *            command name
-	 * @param in
-	 *            argin type
-	 * @param in_comments
-	 *            argin description
-	 * @param out
-	 *            argout type
-	 * @param out_comments
-	 *            argout description
-	 */
-	// ===============================================================
-	public GetFamiliesByDomainCountClass(final String name, final int in, final int out, final String in_comments, final String out_comments) {
-		super(name, in, out, in_comments, out_comments);
-	}
-
-	// ===============================================================
-	/**
-	 * Constructor for Command class GetFamiliesByDomainCountClass
-	 * 
-	 * @param name
-	 *            command name
-	 * @param in
-	 *            argin type
-	 * @param in_comments
-	 *            argin description
-	 * @param out
-	 *            argout type
-	 * @param out_comments
-	 *            argout description
-	 * @param level
-	 *            The command display type OPERATOR or EXPERT
-	 */
-	// ===============================================================
-	public GetFamiliesByDomainCountClass(final String name, final int in, final int out, final String in_comments, final String out_comments, final DispLevel level) {
-		super(name, in, out, in_comments, out_comments, level);
-	}
-
-	// ===============================================================
-	/**
-	 * return the result of the device's command.
-	 */
-	// ===============================================================
-	@Override
-	public Any execute(final DeviceImpl device, final Any in_any) throws DevFailed {
-		Util.out2.println("GetFamiliesByDomainCountClass.execute(): arrived");
-		final String argin = extract_DevString(in_any);
-
-		if (!(device instanceof TdbExtractor)) {
-			Except.throw_exception("DEVICE_ERROR", "Device parameter is not instance of TdbExtractor", "TdbExtractor");
-		}
-
-		return insert(((TdbExtractor) device).get_families_by_domain_count(argin));
-	}
-
-	// ===============================================================
-	/**
-	 * Check if it is allowed to execute the command.
-	 */
-	// ===============================================================
-	@Override
-	public boolean is_allowed(final DeviceImpl device, final Any data_in) {
-		// End of Generated Code
-
-		// Re-Start of Generated Code
-		return true;
-	}
-}
-
-// -----------------------------------------------------------------------------
-/*
- * end of $Source:
- * /cvsroot/tango-cs/archiving/server/hdbtdbArchivingServers/src/
- * main/java/TdbExtractor/GetFamiliesByDomainCountClass.java,v $
- */
+//+======================================================================
+// $Source$
+//
+// Project:      Tango Device Server
+//
+// Description:  Java source code for the command TemplateClass of the
+//               TdbExtractor class.
+//
+// $Author: gramer $
+//
+// $Revision: 15443 $
+//
+// $Log$
+// Revision 1.3  2010/11/22 08:09:15  abeilleg
+// remove critical of findbugs
+//
+// Revision 1.2  2009/12/17 12:47:15  pierrejoseph
+// CheckStyle:  Organize imports / Format
+//
+// Revision 1.1  2008/02/28 15:37:14  pierrejoseph
+// TdbExtractor has been forgotten
+//
+// Revision 1.3  2005/11/29 16:13:31  chinkumo
+// Code reformated (pogo compatible)
+//
+// Revision 1.2  2005/11/15 13:45:16  chinkumo
+// ...
+//
+// Revision 1.1  2005/09/09 10:03:41  chinkumo
+// First commit !
+// (Dynamic attribut release)
+//
+//
+// copyleft :    European Synchrotron Radiation Facility
+//               BP 220, Grenoble 38043
+//               FRANCE
+//
+//-======================================================================
+//
+//  		This file is generated by POGO
+//	(Program Obviously used to Generate tango Object)
+//
+//         (c) - Software Engineering Group - ESRF
+//=============================================================================
+
+/**
+ * @author	$Author: gramer $
+ * @version	$Revision: 15443 $
+ */
+package TdbExtractor;
+
+import org.omg.CORBA.Any;
+
+import fr.esrf.Tango.DevFailed;
+import fr.esrf.Tango.DispLevel;
+import fr.esrf.TangoDs.Command;
+import fr.esrf.TangoDs.DeviceImpl;
+import fr.esrf.TangoDs.Except;
+import fr.esrf.TangoDs.TangoConst;
+import fr.esrf.TangoDs.Util;
+
+/**
+ * Class Description: Returns the number of distinct registered families for a
+ * given domain.
+ */
+
+public class GetFamiliesByDomainCountClass extends Command implements TangoConst {
+	// ===============================================================
+	/**
+	 * Constructor for Command class GetFamiliesByDomainCountClass
+	 * 
+	 * @param name
+	 *            command name
+	 * @param in
+	 *            argin type
+	 * @param out
+	 *            argout type
+	 */
+	// ===============================================================
+	public GetFamiliesByDomainCountClass(final String name, final int in, final int out) {
+		super(name, in, out);
+	}
+
+	// ===============================================================
+	/**
+	 * Constructor for Command class GetFamiliesByDomainCountClass
+	 * 
+	 * @param name
+	 *            command name
+	 * @param in
+	 *            argin type
+	 * @param in_comments
+	 *            argin description
+	 * @param out
+	 *            argout type
+	 * @param out_comments
+	 *            argout description
+	 */
+	// ===============================================================
+	public GetFamiliesByDomainCountClass(final String name, final int in, final int out, final String in_comments, final String out_comments) {
+		super(name, in, out, in_comments, out_comments);
+	}
+
+	// ===============================================================
+	/**
+	 * Constructor for Command class GetFamiliesByDomainCountClass
+	 * 
+	 * @param name
+	 *            command name
+	 * @param in
+	 *            argin type
+	 * @param in_comments
+	 *            argin description
+	 * @param out
+	 *            argout type
+	 * @param out_comments
+	 *            argout description
+	 * @param level
+	 *            The command display type OPERATOR or EXPERT
+	 */
+	// ===============================================================
+	public GetFamiliesByDomainCountClass(final String name, final int in, final int out, final String in_comments, final String out_comments, final DispLevel level) {
+		super(name, in, out, in_comments, out_comments, level);
+	}
+
+	// ===============================================================
+	/**
+	 * return the result of the device's command.
+	 */
+	// ===============================================================
+	@Override
+	public Any execute(final DeviceImpl device, final Any in_any) throws DevFailed {
+		Util.out2.println("GetFamiliesByDomainCountClass.execute(): arrived");
+		final String argin = extract_DevString(in_any);
+
+		if (!(device instanceof TdbExtractor)) {
+			Except.throw_exception("DEVICE_ERROR", "Device parameter is not instance of TdbExtractor", "TdbExtractor");
+		}
+
+		return insert(((TdbExtractor) device).get_families_by_domain_count(argin));
+	}
+
+	// ===============================================================
+	/**
+	 * Check if it is allowed to execute the command.
+	 */
+	// ===============================================================
+	@Override
+	public boolean is_allowed(final DeviceImpl device, final Any data_in) {
+		// End of Generated Code
+
+		// Re-Start of Generated Code
+		return true;
+	}
+}
+
+// -----------------------------------------------------------------------------
+/*
+ * end of $Source:
+ * /cvsroot/tango-cs/archiving/server/hdbtdbArchivingServers/src/
+ * main/java/TdbExtractor/GetFamiliesByDomainCountClass.java,v $
+ */
diff --git a/src/main/java/TdbExtractor/GetFamiliesClass.java b/tdbextractor/src/main/java/TdbExtractor/GetFamiliesClass.java
similarity index 94%
rename from src/main/java/TdbExtractor/GetFamiliesClass.java
rename to tdbextractor/src/main/java/TdbExtractor/GetFamiliesClass.java
index 3cac25084d3f17a517db6f88487ae98638dccd0c..8cfd13294776b9c43fa44c9eabe2826d1a7a6f63 100644
--- a/src/main/java/TdbExtractor/GetFamiliesClass.java
+++ b/tdbextractor/src/main/java/TdbExtractor/GetFamiliesClass.java
@@ -1,160 +1,160 @@
-//+======================================================================
-// $Source$
-//
-// Project:      Tango Device Server
-//
-// Description:  Java source code for the command TemplateClass of the
-//               TdbExtractor class.
-//
-// $Author$
-//
-// $Revision$
-//
-// $Log$
-// Revision 1.3  2010/11/22 08:09:15  abeilleg
-// remove critical of findbugs
-//
-// Revision 1.2  2009/12/17 12:47:15  pierrejoseph
-// CheckStyle:  Organize imports / Format
-//
-// Revision 1.1  2008/02/28 15:37:15  pierrejoseph
-// TdbExtractor has been forgotten
-//
-// Revision 1.3  2005/11/29 16:13:31  chinkumo
-// Code reformated (pogo compatible)
-//
-// Revision 1.2  2005/11/15 13:45:16  chinkumo
-// ...
-//
-// Revision 1.1  2005/09/09 10:03:41  chinkumo
-// First commit !
-// (Dynamic attribut release)
-//
-//
-// copyleft :    European Synchrotron Radiation Facility
-//               BP 220, Grenoble 38043
-//               FRANCE
-//
-//-======================================================================
-//
-//  		This file is generated by POGO
-//	(Program Obviously used to Generate tango Object)
-//
-//         (c) - Software Engineering Group - ESRF
-//=============================================================================
-
-/**
- * @author	$Author$
- * @version	$Revision$
- */
-package TdbExtractor;
-
-import org.omg.CORBA.Any;
-
-import fr.esrf.Tango.DevFailed;
-import fr.esrf.Tango.DispLevel;
-import fr.esrf.TangoDs.Command;
-import fr.esrf.TangoDs.DeviceImpl;
-import fr.esrf.TangoDs.Except;
-import fr.esrf.TangoDs.TangoConst;
-import fr.esrf.TangoDs.Util;
-
-/**
- * Class Description: Gets all the registered families
- */
-
-public class GetFamiliesClass extends Command implements TangoConst {
-	// ===============================================================
-	/**
-	 * Constructor for Command class GetFamiliesClass
-	 * 
-	 * @param name
-	 *            command name
-	 * @param in
-	 *            argin type
-	 * @param out
-	 *            argout type
-	 */
-	// ===============================================================
-	public GetFamiliesClass(final String name, final int in, final int out) {
-		super(name, in, out);
-	}
-
-	// ===============================================================
-	/**
-	 * Constructor for Command class GetFamiliesClass
-	 * 
-	 * @param name
-	 *            command name
-	 * @param in
-	 *            argin type
-	 * @param in_comments
-	 *            argin description
-	 * @param out
-	 *            argout type
-	 * @param out_comments
-	 *            argout description
-	 */
-	// ===============================================================
-	public GetFamiliesClass(final String name, final int in, final int out, final String in_comments, final String out_comments) {
-		super(name, in, out, in_comments, out_comments);
-	}
-
-	// ===============================================================
-	/**
-	 * Constructor for Command class GetFamiliesClass
-	 * 
-	 * @param name
-	 *            command name
-	 * @param in
-	 *            argin type
-	 * @param in_comments
-	 *            argin description
-	 * @param out
-	 *            argout type
-	 * @param out_comments
-	 *            argout description
-	 * @param level
-	 *            The command display type OPERATOR or EXPERT
-	 */
-	// ===============================================================
-	public GetFamiliesClass(final String name, final int in, final int out, final String in_comments, final String out_comments, final DispLevel level) {
-		super(name, in, out, in_comments, out_comments, level);
-	}
-
-	// ===============================================================
-	/**
-	 * return the result of the device's command.
-	 */
-	// ===============================================================
-	@Override
-	public Any execute(final DeviceImpl device, final Any in_any) throws DevFailed {
-		Util.out2.println("GetFamiliesClass.execute(): arrived");
-
-		if (!(device instanceof TdbExtractor)) {
-			Except.throw_exception("DEVICE_ERROR", "Device parameter is not instance of TdbExtractor", "TdbExtractor");
-		}
-
-		return insert(((TdbExtractor) device).get_families());
-	}
-
-	// ===============================================================
-	/**
-	 * Check if it is allowed to execute the command.
-	 */
-	// ===============================================================
-	@Override
-	public boolean is_allowed(final DeviceImpl device, final Any data_in) {
-		// End of Generated Code
-
-		// Re-Start of Generated Code
-		return true;
-	}
-}
-
-// -----------------------------------------------------------------------------
-/*
- * end of $Source:
- * /cvsroot/tango-cs/archiving/server/hdbtdbArchivingServers/src/
- * main/java/TdbExtractor/GetFamiliesClass.java,v $
- */
+//+======================================================================
+// $Source$
+//
+// Project:      Tango Device Server
+//
+// Description:  Java source code for the command TemplateClass of the
+//               TdbExtractor class.
+//
+// $Author: gramer $
+//
+// $Revision: 15443 $
+//
+// $Log$
+// Revision 1.3  2010/11/22 08:09:15  abeilleg
+// remove critical of findbugs
+//
+// Revision 1.2  2009/12/17 12:47:15  pierrejoseph
+// CheckStyle:  Organize imports / Format
+//
+// Revision 1.1  2008/02/28 15:37:15  pierrejoseph
+// TdbExtractor has been forgotten
+//
+// Revision 1.3  2005/11/29 16:13:31  chinkumo
+// Code reformated (pogo compatible)
+//
+// Revision 1.2  2005/11/15 13:45:16  chinkumo
+// ...
+//
+// Revision 1.1  2005/09/09 10:03:41  chinkumo
+// First commit !
+// (Dynamic attribut release)
+//
+//
+// copyleft :    European Synchrotron Radiation Facility
+//               BP 220, Grenoble 38043
+//               FRANCE
+//
+//-======================================================================
+//
+//  		This file is generated by POGO
+//	(Program Obviously used to Generate tango Object)
+//
+//         (c) - Software Engineering Group - ESRF
+//=============================================================================
+
+/**
+ * @author	$Author: gramer $
+ * @version	$Revision: 15443 $
+ */
+package TdbExtractor;
+
+import org.omg.CORBA.Any;
+
+import fr.esrf.Tango.DevFailed;
+import fr.esrf.Tango.DispLevel;
+import fr.esrf.TangoDs.Command;
+import fr.esrf.TangoDs.DeviceImpl;
+import fr.esrf.TangoDs.Except;
+import fr.esrf.TangoDs.TangoConst;
+import fr.esrf.TangoDs.Util;
+
+/**
+ * Class Description: Gets all the registered families
+ */
+
+public class GetFamiliesClass extends Command implements TangoConst {
+	// ===============================================================
+	/**
+	 * Constructor for Command class GetFamiliesClass
+	 * 
+	 * @param name
+	 *            command name
+	 * @param in
+	 *            argin type
+	 * @param out
+	 *            argout type
+	 */
+	// ===============================================================
+	public GetFamiliesClass(final String name, final int in, final int out) {
+		super(name, in, out);
+	}
+
+	// ===============================================================
+	/**
+	 * Constructor for Command class GetFamiliesClass
+	 * 
+	 * @param name
+	 *            command name
+	 * @param in
+	 *            argin type
+	 * @param in_comments
+	 *            argin description
+	 * @param out
+	 *            argout type
+	 * @param out_comments
+	 *            argout description
+	 */
+	// ===============================================================
+	public GetFamiliesClass(final String name, final int in, final int out, final String in_comments, final String out_comments) {
+		super(name, in, out, in_comments, out_comments);
+	}
+
+	// ===============================================================
+	/**
+	 * Constructor for Command class GetFamiliesClass
+	 * 
+	 * @param name
+	 *            command name
+	 * @param in
+	 *            argin type
+	 * @param in_comments
+	 *            argin description
+	 * @param out
+	 *            argout type
+	 * @param out_comments
+	 *            argout description
+	 * @param level
+	 *            The command display type OPERATOR or EXPERT
+	 */
+	// ===============================================================
+	public GetFamiliesClass(final String name, final int in, final int out, final String in_comments, final String out_comments, final DispLevel level) {
+		super(name, in, out, in_comments, out_comments, level);
+	}
+
+	// ===============================================================
+	/**
+	 * return the result of the device's command.
+	 */
+	// ===============================================================
+	@Override
+	public Any execute(final DeviceImpl device, final Any in_any) throws DevFailed {
+		Util.out2.println("GetFamiliesClass.execute(): arrived");
+
+		if (!(device instanceof TdbExtractor)) {
+			Except.throw_exception("DEVICE_ERROR", "Device parameter is not instance of TdbExtractor", "TdbExtractor");
+		}
+
+		return insert(((TdbExtractor) device).get_families());
+	}
+
+	// ===============================================================
+	/**
+	 * Check if it is allowed to execute the command.
+	 */
+	// ===============================================================
+	@Override
+	public boolean is_allowed(final DeviceImpl device, final Any data_in) {
+		// End of Generated Code
+
+		// Re-Start of Generated Code
+		return true;
+	}
+}
+
+// -----------------------------------------------------------------------------
+/*
+ * end of $Source:
+ * /cvsroot/tango-cs/archiving/server/hdbtdbArchivingServers/src/
+ * main/java/TdbExtractor/GetFamiliesClass.java,v $
+ */
diff --git a/src/main/java/TdbExtractor/GetFamiliesCountClass.java b/tdbextractor/src/main/java/TdbExtractor/GetFamiliesCountClass.java
similarity index 94%
rename from src/main/java/TdbExtractor/GetFamiliesCountClass.java
rename to tdbextractor/src/main/java/TdbExtractor/GetFamiliesCountClass.java
index d9deeed92b454326952bacadbe6abf841936e97e..2e5b85acba471c09dad4809be8398fe748058c30 100644
--- a/src/main/java/TdbExtractor/GetFamiliesCountClass.java
+++ b/tdbextractor/src/main/java/TdbExtractor/GetFamiliesCountClass.java
@@ -1,160 +1,160 @@
-//+======================================================================
-// $Source$
-//
-// Project:      Tango Device Server
-//
-// Description:  Java source code for the command TemplateClass of the
-//               TdbExtractor class.
-//
-// $Author$
-//
-// $Revision$
-//
-// $Log$
-// Revision 1.3  2010/11/22 08:09:15  abeilleg
-// remove critical of findbugs
-//
-// Revision 1.2  2009/12/17 12:47:15  pierrejoseph
-// CheckStyle:  Organize imports / Format
-//
-// Revision 1.1  2008/02/28 15:37:14  pierrejoseph
-// TdbExtractor has been forgotten
-//
-// Revision 1.3  2005/11/29 16:13:31  chinkumo
-// Code reformated (pogo compatible)
-//
-// Revision 1.2  2005/11/15 13:45:16  chinkumo
-// ...
-//
-// Revision 1.1  2005/09/09 10:03:41  chinkumo
-// First commit !
-// (Dynamic attribut release)
-//
-//
-// copyleft :    European Synchrotron Radiation Facility
-//               BP 220, Grenoble 38043
-//               FRANCE
-//
-//-======================================================================
-//
-//  		This file is generated by POGO
-//	(Program Obviously used to Generate tango Object)
-//
-//         (c) - Software Engineering Group - ESRF
-//=============================================================================
-
-/**
- * @author	$Author$
- * @version	$Revision$
- */
-package TdbExtractor;
-
-import org.omg.CORBA.Any;
-
-import fr.esrf.Tango.DevFailed;
-import fr.esrf.Tango.DispLevel;
-import fr.esrf.TangoDs.Command;
-import fr.esrf.TangoDs.DeviceImpl;
-import fr.esrf.TangoDs.Except;
-import fr.esrf.TangoDs.TangoConst;
-import fr.esrf.TangoDs.Util;
-
-/**
- * Class Description: Returns the number of distinct registered families.
- */
-
-public class GetFamiliesCountClass extends Command implements TangoConst {
-	// ===============================================================
-	/**
-	 * Constructor for Command class GetFamiliesCountClass
-	 * 
-	 * @param name
-	 *            command name
-	 * @param in
-	 *            argin type
-	 * @param out
-	 *            argout type
-	 */
-	// ===============================================================
-	public GetFamiliesCountClass(final String name, final int in, final int out) {
-		super(name, in, out);
-	}
-
-	// ===============================================================
-	/**
-	 * Constructor for Command class GetFamiliesCountClass
-	 * 
-	 * @param name
-	 *            command name
-	 * @param in
-	 *            argin type
-	 * @param in_comments
-	 *            argin description
-	 * @param out
-	 *            argout type
-	 * @param out_comments
-	 *            argout description
-	 */
-	// ===============================================================
-	public GetFamiliesCountClass(final String name, final int in, final int out, final String in_comments, final String out_comments) {
-		super(name, in, out, in_comments, out_comments);
-	}
-
-	// ===============================================================
-	/**
-	 * Constructor for Command class GetFamiliesCountClass
-	 * 
-	 * @param name
-	 *            command name
-	 * @param in
-	 *            argin type
-	 * @param in_comments
-	 *            argin description
-	 * @param out
-	 *            argout type
-	 * @param out_comments
-	 *            argout description
-	 * @param level
-	 *            The command display type OPERATOR or EXPERT
-	 */
-	// ===============================================================
-	public GetFamiliesCountClass(final String name, final int in, final int out, final String in_comments, final String out_comments, final DispLevel level) {
-		super(name, in, out, in_comments, out_comments, level);
-	}
-
-	// ===============================================================
-	/**
-	 * return the result of the device's command.
-	 */
-	// ===============================================================
-	@Override
-	public Any execute(final DeviceImpl device, final Any in_any) throws DevFailed {
-		Util.out2.println("GetFamiliesCountClass.execute(): arrived");
-
-		if (!(device instanceof TdbExtractor)) {
-			Except.throw_exception("DEVICE_ERROR", "Device parameter is not instance of TdbExtractor", "TdbExtractor");
-		}
-
-		return insert(((TdbExtractor) device).get_families_count());
-	}
-
-	// ===============================================================
-	/**
-	 * Check if it is allowed to execute the command.
-	 */
-	// ===============================================================
-	@Override
-	public boolean is_allowed(final DeviceImpl device, final Any data_in) {
-		// End of Generated Code
-
-		// Re-Start of Generated Code
-		return true;
-	}
-}
-
-// -----------------------------------------------------------------------------
-/*
- * end of $Source:
- * /cvsroot/tango-cs/archiving/server/hdbtdbArchivingServers/src/
- * main/java/TdbExtractor/GetFamiliesCountClass.java,v $
- */
+//+======================================================================
+// $Source$
+//
+// Project:      Tango Device Server
+//
+// Description:  Java source code for the command TemplateClass of the
+//               TdbExtractor class.
+//
+// $Author: gramer $
+//
+// $Revision: 15443 $
+//
+// $Log$
+// Revision 1.3  2010/11/22 08:09:15  abeilleg
+// remove critical of findbugs
+//
+// Revision 1.2  2009/12/17 12:47:15  pierrejoseph
+// CheckStyle:  Organize imports / Format
+//
+// Revision 1.1  2008/02/28 15:37:14  pierrejoseph
+// TdbExtractor has been forgotten
+//
+// Revision 1.3  2005/11/29 16:13:31  chinkumo
+// Code reformated (pogo compatible)
+//
+// Revision 1.2  2005/11/15 13:45:16  chinkumo
+// ...
+//
+// Revision 1.1  2005/09/09 10:03:41  chinkumo
+// First commit !
+// (Dynamic attribut release)
+//
+//
+// copyleft :    European Synchrotron Radiation Facility
+//               BP 220, Grenoble 38043
+//               FRANCE
+//
+//-======================================================================
+//
+//  		This file is generated by POGO
+//	(Program Obviously used to Generate tango Object)
+//
+//         (c) - Software Engineering Group - ESRF
+//=============================================================================
+
+/**
+ * @author	$Author: gramer $
+ * @version	$Revision: 15443 $
+ */
+package TdbExtractor;
+
+import org.omg.CORBA.Any;
+
+import fr.esrf.Tango.DevFailed;
+import fr.esrf.Tango.DispLevel;
+import fr.esrf.TangoDs.Command;
+import fr.esrf.TangoDs.DeviceImpl;
+import fr.esrf.TangoDs.Except;
+import fr.esrf.TangoDs.TangoConst;
+import fr.esrf.TangoDs.Util;
+
+/**
+ * Class Description: Returns the number of distinct registered families.
+ */
+
+public class GetFamiliesCountClass extends Command implements TangoConst {
+	// ===============================================================
+	/**
+	 * Constructor for Command class GetFamiliesCountClass
+	 * 
+	 * @param name
+	 *            command name
+	 * @param in
+	 *            argin type
+	 * @param out
+	 *            argout type
+	 */
+	// ===============================================================
+	public GetFamiliesCountClass(final String name, final int in, final int out) {
+		super(name, in, out);
+	}
+
+	// ===============================================================
+	/**
+	 * Constructor for Command class GetFamiliesCountClass
+	 * 
+	 * @param name
+	 *            command name
+	 * @param in
+	 *            argin type
+	 * @param in_comments
+	 *            argin description
+	 * @param out
+	 *            argout type
+	 * @param out_comments
+	 *            argout description
+	 */
+	// ===============================================================
+	public GetFamiliesCountClass(final String name, final int in, final int out, final String in_comments, final String out_comments) {
+		super(name, in, out, in_comments, out_comments);
+	}
+
+	// ===============================================================
+	/**
+	 * Constructor for Command class GetFamiliesCountClass
+	 * 
+	 * @param name
+	 *            command name
+	 * @param in
+	 *            argin type
+	 * @param in_comments
+	 *            argin description
+	 * @param out
+	 *            argout type
+	 * @param out_comments
+	 *            argout description
+	 * @param level
+	 *            The command display type OPERATOR or EXPERT
+	 */
+	// ===============================================================
+	public GetFamiliesCountClass(final String name, final int in, final int out, final String in_comments, final String out_comments, final DispLevel level) {
+		super(name, in, out, in_comments, out_comments, level);
+	}
+
+	// ===============================================================
+	/**
+	 * return the result of the device's command.
+	 */
+	// ===============================================================
+	@Override
+	public Any execute(final DeviceImpl device, final Any in_any) throws DevFailed {
+		Util.out2.println("GetFamiliesCountClass.execute(): arrived");
+
+		if (!(device instanceof TdbExtractor)) {
+			Except.throw_exception("DEVICE_ERROR", "Device parameter is not instance of TdbExtractor", "TdbExtractor");
+		}
+
+		return insert(((TdbExtractor) device).get_families_count());
+	}
+
+	// ===============================================================
+	/**
+	 * Check if it is allowed to execute the command.
+	 */
+	// ===============================================================
+	@Override
+	public boolean is_allowed(final DeviceImpl device, final Any data_in) {
+		// End of Generated Code
+
+		// Re-Start of Generated Code
+		return true;
+	}
+}
+
+// -----------------------------------------------------------------------------
+/*
+ * end of $Source:
+ * /cvsroot/tango-cs/archiving/server/hdbtdbArchivingServers/src/
+ * main/java/TdbExtractor/GetFamiliesCountClass.java,v $
+ */
diff --git a/src/main/java/TdbExtractor/GetHostClass.java b/tdbextractor/src/main/java/TdbExtractor/GetHostClass.java
similarity index 94%
rename from src/main/java/TdbExtractor/GetHostClass.java
rename to tdbextractor/src/main/java/TdbExtractor/GetHostClass.java
index 78f3193b60e68e720eba4d83bb465ba1fec16ffa..9331249c341cc7704706fdc43993d385427b3c49 100644
--- a/src/main/java/TdbExtractor/GetHostClass.java
+++ b/tdbextractor/src/main/java/TdbExtractor/GetHostClass.java
@@ -1,162 +1,162 @@
-//+======================================================================
-// $Source$
-//
-// Project:      Tango Device Server
-//
-// Description:  Java source code for the command TemplateClass of the
-//               TdbExtractor class.
-//
-// $Author$
-//
-// $Revision$
-//
-// $Log$
-// Revision 1.4  2010/11/22 08:09:14  abeilleg
-// remove critical of findbugs
-//
-// Revision 1.3  2009/12/17 12:47:15  pierrejoseph
-// CheckStyle:  Organize imports / Format
-//
-// Revision 1.2  2009/06/12 15:00:39  soleilarc
-// Api: new architecture
-//
-// Revision 1.1  2008/02/28 15:37:14  pierrejoseph
-// TdbExtractor has been forgotten
-//
-// Revision 1.3  2005/11/29 16:13:31  chinkumo
-// Code reformated (pogo compatible)
-//
-// Revision 1.2  2005/11/15 13:45:16  chinkumo
-// ...
-//
-// Revision 1.1  2005/09/09 10:03:41  chinkumo
-// First commit !
-// (Dynamic attribut release)
-//
-//
-// copyleft :    European Synchrotron Radiation Facility
-//               BP 220, Grenoble 38043
-//               FRANCE
-//
-//-======================================================================
-//
-//  		This file is generated by POGO
-//	(Program Obviously used to Generate tango Object)
-//
-//         (c) - Software Engineering Group - ESRF
-//=============================================================================
-
-/**
- * @author	$Author$
- * @version	$Revision$
- */
-package TdbExtractor;
-
-import org.omg.CORBA.Any;
-
-import fr.esrf.Tango.DevFailed;
-import fr.esrf.Tango.DispLevel;
-import fr.esrf.TangoDs.Command;
-import fr.esrf.TangoDs.DeviceImpl;
-import fr.esrf.TangoDs.Except;
-import fr.esrf.TangoDs.TangoConst;
-import fr.esrf.TangoDs.Util;
-
-/**
- * Class Description: Returns the connected database host identifier.
- */
-
-public class GetHostClass extends Command implements TangoConst {
-	// ===============================================================
-	/**
-	 * Constructor for Command class GetHostClass
-	 * 
-	 * @param name
-	 *            command name
-	 * @param in
-	 *            argin type
-	 * @param out
-	 *            argout type
-	 */
-	// ===============================================================
-	public GetHostClass(final String name, final int in, final int out) {
-		super(name, in, out);
-	}
-
-	// ===============================================================
-	/**
-	 * Constructor for Command class GetHostClass
-	 * 
-	 * @param name
-	 *            command name
-	 * @param in
-	 *            argin type
-	 * @param in_comments
-	 *            argin description
-	 * @param out
-	 *            argout type
-	 * @param out_comments
-	 *            argout description
-	 */
-	// ===============================================================
-	public GetHostClass(final String name, final int in, final int out, final String in_comments, final String out_comments) {
-		super(name, in, out, in_comments, out_comments);
-	}
-
-	// ===============================================================
-	/**
-	 * Constructor for Command class GetHostClass
-	 * 
-	 * @param name
-	 *            command name
-	 * @param in
-	 *            argin type
-	 * @param in_comments
-	 *            argin description
-	 * @param out
-	 *            argout type
-	 * @param out_comments
-	 *            argout description
-	 * @param level
-	 *            The command display type OPERATOR or EXPERT
-	 */
-	// ===============================================================
-	public GetHostClass(final String name, final int in, final int out, final String in_comments, final String out_comments, final DispLevel level) {
-		super(name, in, out, in_comments, out_comments, level);
-	}
-
-	// ===============================================================
-	/**
-	 * return the result of the device's command.
-	 */
-	// ===============================================================
-	@Override
-	public Any execute(final DeviceImpl device, final Any in_any) throws DevFailed {
-		Util.out2.println("GetHostClass.execute(): arrived");
-		if (!(device instanceof TdbExtractor)) {
-			Except.throw_exception("DEVICE_ERROR", "Device parameter is not instance of TdbExtractor", "TdbExtractor");
-		}
-
-		return insert(((TdbExtractor) device).get_host());
-	}
-
-	// ===============================================================
-	/**
-	 * Check if it is allowed to execute the command.
-	 */
-	// ===============================================================
-	@Override
-	public boolean is_allowed(final DeviceImpl device, final Any data_in) {
-		// End of Generated Code
-
-		// Re-Start of Generated Code
-		return true;
-	}
-}
-
-// -----------------------------------------------------------------------------
-/*
- * end of $Source:
- * /cvsroot/tango-cs/archiving/server/hdbtdbArchivingServers/src/
- * main/java/TdbExtractor/GetHostClass.java,v $
- */
+//+======================================================================
+// $Source$
+//
+// Project:      Tango Device Server
+//
+// Description:  Java source code for the command TemplateClass of the
+//               TdbExtractor class.
+//
+// $Author: gramer $
+//
+// $Revision: 15443 $
+//
+// $Log$
+// Revision 1.4  2010/11/22 08:09:14  abeilleg
+// remove critical of findbugs
+//
+// Revision 1.3  2009/12/17 12:47:15  pierrejoseph
+// CheckStyle:  Organize imports / Format
+//
+// Revision 1.2  2009/06/12 15:00:39  soleilarc
+// Api: new architecture
+//
+// Revision 1.1  2008/02/28 15:37:14  pierrejoseph
+// TdbExtractor has been forgotten
+//
+// Revision 1.3  2005/11/29 16:13:31  chinkumo
+// Code reformated (pogo compatible)
+//
+// Revision 1.2  2005/11/15 13:45:16  chinkumo
+// ...
+//
+// Revision 1.1  2005/09/09 10:03:41  chinkumo
+// First commit !
+// (Dynamic attribut release)
+//
+//
+// copyleft :    European Synchrotron Radiation Facility
+//               BP 220, Grenoble 38043
+//               FRANCE
+//
+//-======================================================================
+//
+//  		This file is generated by POGO
+//	(Program Obviously used to Generate tango Object)
+//
+//         (c) - Software Engineering Group - ESRF
+//=============================================================================
+
+/**
+ * @author	$Author: gramer $
+ * @version	$Revision: 15443 $
+ */
+package TdbExtractor;
+
+import org.omg.CORBA.Any;
+
+import fr.esrf.Tango.DevFailed;
+import fr.esrf.Tango.DispLevel;
+import fr.esrf.TangoDs.Command;
+import fr.esrf.TangoDs.DeviceImpl;
+import fr.esrf.TangoDs.Except;
+import fr.esrf.TangoDs.TangoConst;
+import fr.esrf.TangoDs.Util;
+
+/**
+ * Class Description: Returns the connected database host identifier.
+ */
+
+public class GetHostClass extends Command implements TangoConst {
+	// ===============================================================
+	/**
+	 * Constructor for Command class GetHostClass
+	 * 
+	 * @param name
+	 *            command name
+	 * @param in
+	 *            argin type
+	 * @param out
+	 *            argout type
+	 */
+	// ===============================================================
+	public GetHostClass(final String name, final int in, final int out) {
+		super(name, in, out);
+	}
+
+	// ===============================================================
+	/**
+	 * Constructor for Command class GetHostClass
+	 * 
+	 * @param name
+	 *            command name
+	 * @param in
+	 *            argin type
+	 * @param in_comments
+	 *            argin description
+	 * @param out
+	 *            argout type
+	 * @param out_comments
+	 *            argout description
+	 */
+	// ===============================================================
+	public GetHostClass(final String name, final int in, final int out, final String in_comments, final String out_comments) {
+		super(name, in, out, in_comments, out_comments);
+	}
+
+	// ===============================================================
+	/**
+	 * Constructor for Command class GetHostClass
+	 * 
+	 * @param name
+	 *            command name
+	 * @param in
+	 *            argin type
+	 * @param in_comments
+	 *            argin description
+	 * @param out
+	 *            argout type
+	 * @param out_comments
+	 *            argout description
+	 * @param level
+	 *            The command display type OPERATOR or EXPERT
+	 */
+	// ===============================================================
+	public GetHostClass(final String name, final int in, final int out, final String in_comments, final String out_comments, final DispLevel level) {
+		super(name, in, out, in_comments, out_comments, level);
+	}
+
+	// ===============================================================
+	/**
+	 * return the result of the device's command.
+	 */
+	// ===============================================================
+	@Override
+	public Any execute(final DeviceImpl device, final Any in_any) throws DevFailed {
+		Util.out2.println("GetHostClass.execute(): arrived");
+		if (!(device instanceof TdbExtractor)) {
+			Except.throw_exception("DEVICE_ERROR", "Device parameter is not instance of TdbExtractor", "TdbExtractor");
+		}
+
+		return insert(((TdbExtractor) device).get_host());
+	}
+
+	// ===============================================================
+	/**
+	 * Check if it is allowed to execute the command.
+	 */
+	// ===============================================================
+	@Override
+	public boolean is_allowed(final DeviceImpl device, final Any data_in) {
+		// End of Generated Code
+
+		// Re-Start of Generated Code
+		return true;
+	}
+}
+
+// -----------------------------------------------------------------------------
+/*
+ * end of $Source:
+ * /cvsroot/tango-cs/archiving/server/hdbtdbArchivingServers/src/
+ * main/java/TdbExtractor/GetHostClass.java,v $
+ */
diff --git a/src/main/java/TdbExtractor/GetInfoClass.java b/tdbextractor/src/main/java/TdbExtractor/GetInfoClass.java
similarity index 94%
rename from src/main/java/TdbExtractor/GetInfoClass.java
rename to tdbextractor/src/main/java/TdbExtractor/GetInfoClass.java
index a3e9db55cd187caf61133621728d8bd2eaecb59d..6b09307f5d9bd47cf8318fd26b3cfe9eaedea61b 100644
--- a/src/main/java/TdbExtractor/GetInfoClass.java
+++ b/tdbextractor/src/main/java/TdbExtractor/GetInfoClass.java
@@ -1,161 +1,161 @@
-//+======================================================================
-// $Source$
-//
-// Project:      Tango Device Server
-//
-// Description:  Java source code for the command TemplateClass of the
-//               TdbExtractor class.
-//
-// $Author$
-//
-// $Revision$
-//
-// $Log$
-// Revision 1.3  2010/11/22 08:09:15  abeilleg
-// remove critical of findbugs
-//
-// Revision 1.2  2009/12/17 12:47:15  pierrejoseph
-// CheckStyle:  Organize imports / Format
-//
-// Revision 1.1  2008/02/28 15:37:15  pierrejoseph
-// TdbExtractor has been forgotten
-//
-// Revision 1.3  2005/11/29 16:13:31  chinkumo
-// Code reformated (pogo compatible)
-//
-// Revision 1.2  2005/11/15 13:45:16  chinkumo
-// ...
-//
-// Revision 1.1  2005/09/09 10:03:41  chinkumo
-// First commit !
-// (Dynamic attribut release)
-//
-//
-// copyleft :    European Synchrotron Radiation Facility
-//               BP 220, Grenoble 38043
-//               FRANCE
-//
-//-======================================================================
-//
-//  		This file is generated by POGO
-//	(Program Obviously used to Generate tango Object)
-//
-//         (c) - Software Engineering Group - ESRF
-//=============================================================================
-
-/**
- * @author	$Author$
- * @version	$Revision$
- */
-package TdbExtractor;
-
-import org.omg.CORBA.Any;
-
-import fr.esrf.Tango.DevFailed;
-import fr.esrf.Tango.DispLevel;
-import fr.esrf.TangoDs.Command;
-import fr.esrf.TangoDs.DeviceImpl;
-import fr.esrf.TangoDs.Except;
-import fr.esrf.TangoDs.TangoConst;
-import fr.esrf.TangoDs.Util;
-
-/**
- * Class Description: Returns misc informations about the database and a set of
- * parameters characterizing the connection.
- */
-
-public class GetInfoClass extends Command implements TangoConst {
-	// ===============================================================
-	/**
-	 * Constructor for Command class GetInfoClass
-	 * 
-	 * @param name
-	 *            command name
-	 * @param in
-	 *            argin type
-	 * @param out
-	 *            argout type
-	 */
-	// ===============================================================
-	public GetInfoClass(final String name, final int in, final int out) {
-		super(name, in, out);
-	}
-
-	// ===============================================================
-	/**
-	 * Constructor for Command class GetInfoClass
-	 * 
-	 * @param name
-	 *            command name
-	 * @param in
-	 *            argin type
-	 * @param in_comments
-	 *            argin description
-	 * @param out
-	 *            argout type
-	 * @param out_comments
-	 *            argout description
-	 */
-	// ===============================================================
-	public GetInfoClass(final String name, final int in, final int out, final String in_comments, final String out_comments) {
-		super(name, in, out, in_comments, out_comments);
-	}
-
-	// ===============================================================
-	/**
-	 * Constructor for Command class GetInfoClass
-	 * 
-	 * @param name
-	 *            command name
-	 * @param in
-	 *            argin type
-	 * @param in_comments
-	 *            argin description
-	 * @param out
-	 *            argout type
-	 * @param out_comments
-	 *            argout description
-	 * @param level
-	 *            The command display type OPERATOR or EXPERT
-	 */
-	// ===============================================================
-	public GetInfoClass(final String name, final int in, final int out, final String in_comments, final String out_comments, final DispLevel level) {
-		super(name, in, out, in_comments, out_comments, level);
-	}
-
-	// ===============================================================
-	/**
-	 * return the result of the device's command.
-	 */
-	// ===============================================================
-	@Override
-	public Any execute(final DeviceImpl device, final Any in_any) throws DevFailed {
-		Util.out2.println("GetInfoClass.execute(): arrived");
-
-		if (!(device instanceof TdbExtractor)) {
-			Except.throw_exception("DEVICE_ERROR", "Device parameter is not instance of TdbExtractor", "TdbExtractor");
-		}
-
-		return insert(((TdbExtractor) device).get_info());
-	}
-
-	// ===============================================================
-	/**
-	 * Check if it is allowed to execute the command.
-	 */
-	// ===============================================================
-	@Override
-	public boolean is_allowed(final DeviceImpl device, final Any data_in) {
-		// End of Generated Code
-
-		// Re-Start of Generated Code
-		return true;
-	}
-}
-
-// -----------------------------------------------------------------------------
-/*
- * end of $Source:
- * /cvsroot/tango-cs/archiving/server/hdbtdbArchivingServers/src/
- * main/java/TdbExtractor/GetInfoClass.java,v $
- */
+//+======================================================================
+// $Source$
+//
+// Project:      Tango Device Server
+//
+// Description:  Java source code for the command TemplateClass of the
+//               TdbExtractor class.
+//
+// $Author: gramer $
+//
+// $Revision: 15443 $
+//
+// $Log$
+// Revision 1.3  2010/11/22 08:09:15  abeilleg
+// remove critical of findbugs
+//
+// Revision 1.2  2009/12/17 12:47:15  pierrejoseph
+// CheckStyle:  Organize imports / Format
+//
+// Revision 1.1  2008/02/28 15:37:15  pierrejoseph
+// TdbExtractor has been forgotten
+//
+// Revision 1.3  2005/11/29 16:13:31  chinkumo
+// Code reformated (pogo compatible)
+//
+// Revision 1.2  2005/11/15 13:45:16  chinkumo
+// ...
+//
+// Revision 1.1  2005/09/09 10:03:41  chinkumo
+// First commit !
+// (Dynamic attribut release)
+//
+//
+// copyleft :    European Synchrotron Radiation Facility
+//               BP 220, Grenoble 38043
+//               FRANCE
+//
+//-======================================================================
+//
+//  		This file is generated by POGO
+//	(Program Obviously used to Generate tango Object)
+//
+//         (c) - Software Engineering Group - ESRF
+//=============================================================================
+
+/**
+ * @author	$Author: gramer $
+ * @version	$Revision: 15443 $
+ */
+package TdbExtractor;
+
+import org.omg.CORBA.Any;
+
+import fr.esrf.Tango.DevFailed;
+import fr.esrf.Tango.DispLevel;
+import fr.esrf.TangoDs.Command;
+import fr.esrf.TangoDs.DeviceImpl;
+import fr.esrf.TangoDs.Except;
+import fr.esrf.TangoDs.TangoConst;
+import fr.esrf.TangoDs.Util;
+
+/**
+ * Class Description: Returns misc informations about the database and a set of
+ * parameters characterizing the connection.
+ */
+
+public class GetInfoClass extends Command implements TangoConst {
+	// ===============================================================
+	/**
+	 * Constructor for Command class GetInfoClass
+	 * 
+	 * @param name
+	 *            command name
+	 * @param in
+	 *            argin type
+	 * @param out
+	 *            argout type
+	 */
+	// ===============================================================
+	public GetInfoClass(final String name, final int in, final int out) {
+		super(name, in, out);
+	}
+
+	// ===============================================================
+	/**
+	 * Constructor for Command class GetInfoClass
+	 * 
+	 * @param name
+	 *            command name
+	 * @param in
+	 *            argin type
+	 * @param in_comments
+	 *            argin description
+	 * @param out
+	 *            argout type
+	 * @param out_comments
+	 *            argout description
+	 */
+	// ===============================================================
+	public GetInfoClass(final String name, final int in, final int out, final String in_comments, final String out_comments) {
+		super(name, in, out, in_comments, out_comments);
+	}
+
+	// ===============================================================
+	/**
+	 * Constructor for Command class GetInfoClass
+	 * 
+	 * @param name
+	 *            command name
+	 * @param in
+	 *            argin type
+	 * @param in_comments
+	 *            argin description
+	 * @param out
+	 *            argout type
+	 * @param out_comments
+	 *            argout description
+	 * @param level
+	 *            The command display type OPERATOR or EXPERT
+	 */
+	// ===============================================================
+	public GetInfoClass(final String name, final int in, final int out, final String in_comments, final String out_comments, final DispLevel level) {
+		super(name, in, out, in_comments, out_comments, level);
+	}
+
+	// ===============================================================
+	/**
+	 * return the result of the device's command.
+	 */
+	// ===============================================================
+	@Override
+	public Any execute(final DeviceImpl device, final Any in_any) throws DevFailed {
+		Util.out2.println("GetInfoClass.execute(): arrived");
+
+		if (!(device instanceof TdbExtractor)) {
+			Except.throw_exception("DEVICE_ERROR", "Device parameter is not instance of TdbExtractor", "TdbExtractor");
+		}
+
+		return insert(((TdbExtractor) device).get_info());
+	}
+
+	// ===============================================================
+	/**
+	 * Check if it is allowed to execute the command.
+	 */
+	// ===============================================================
+	@Override
+	public boolean is_allowed(final DeviceImpl device, final Any data_in) {
+		// End of Generated Code
+
+		// Re-Start of Generated Code
+		return true;
+	}
+}
+
+// -----------------------------------------------------------------------------
+/*
+ * end of $Source:
+ * /cvsroot/tango-cs/archiving/server/hdbtdbArchivingServers/src/
+ * main/java/TdbExtractor/GetInfoClass.java,v $
+ */
diff --git a/src/main/java/TdbExtractor/GetMaxTimeClass.java b/tdbextractor/src/main/java/TdbExtractor/GetMaxTimeClass.java
similarity index 95%
rename from src/main/java/TdbExtractor/GetMaxTimeClass.java
rename to tdbextractor/src/main/java/TdbExtractor/GetMaxTimeClass.java
index ddf895479f2993851a1507feefb25ff2454acd59..9acf42cc7602a6c318116f96fffda7b86c36a281 100644
--- a/src/main/java/TdbExtractor/GetMaxTimeClass.java
+++ b/tdbextractor/src/main/java/TdbExtractor/GetMaxTimeClass.java
@@ -1,117 +1,117 @@
-/**
- * @author  $Author$
- * @version $Revision$
- */
-package TdbExtractor;
-
-import org.omg.CORBA.Any;
-
-import fr.esrf.Tango.DevFailed;
-import fr.esrf.Tango.DispLevel;
-import fr.esrf.TangoDs.Command;
-import fr.esrf.TangoDs.DeviceImpl;
-import fr.esrf.TangoDs.Except;
-import fr.esrf.TangoDs.TangoConst;
-import fr.esrf.TangoDs.Util;
-
-/**
- * Class Description: Returns "true" if the attribute of given name is currently
- * archived, "false" otherwise.
- */
-
-public class GetMaxTimeClass extends Command implements TangoConst {
-	// ===============================================================
-	/**
-	 * Constructor for Command class IsArchivedClass
-	 * 
-	 * @param name
-	 *            command name
-	 * @param in
-	 *            argin type
-	 * @param out
-	 *            argout type
-	 */
-	// ===============================================================
-	public GetMaxTimeClass(final String name, final int in, final int out) {
-		super(name, in, out);
-	}
-
-	// ===============================================================
-	/**
-	 * Constructor for Command class IsArchivedClass
-	 * 
-	 * @param name
-	 *            command name
-	 * @param in
-	 *            argin type
-	 * @param in_comments
-	 *            argin description
-	 * @param out
-	 *            argout type
-	 * @param out_comments
-	 *            argout description
-	 */
-	// ===============================================================
-	public GetMaxTimeClass(final String name, final int in, final int out, final String in_comments, final String out_comments) {
-		super(name, in, out, in_comments, out_comments);
-	}
-
-	// ===============================================================
-	/**
-	 * Constructor for Command class IsArchivedClass
-	 * 
-	 * @param name
-	 *            command name
-	 * @param in
-	 *            argin type
-	 * @param in_comments
-	 *            argin description
-	 * @param out
-	 *            argout type
-	 * @param out_comments
-	 *            argout description
-	 * @param level
-	 *            The command display type OPERATOR or EXPERT
-	 */
-	// ===============================================================
-	public GetMaxTimeClass(final String name, final int in, final int out, final String in_comments, final String out_comments, final DispLevel level) {
-		super(name, in, out, in_comments, out_comments, level);
-	}
-
-	// ===============================================================
-	/**
-	 * return the result of the device's command.
-	 */
-	// ===============================================================
-	@Override
-	public Any execute(final DeviceImpl device, final Any in_any) throws DevFailed {
-		Util.out2.println("GetMaxTimeClass.execute(): arrived");
-		final String argin = extract_DevString(in_any);
-
-		if (!(device instanceof TdbExtractor)) {
-			Except.throw_exception("DEVICE_ERROR", "Device parameter is not instance of TdbExtractor", "TdbExtractor");
-		}
-
-		return insert(((TdbExtractor) device).get_max_time(argin));
-	}
-
-	// ===============================================================
-	/**
-	 * Check if it is allowed to execute the command.
-	 */
-	// ===============================================================
-	@Override
-	public boolean is_allowed(final DeviceImpl device, final Any data_in) {
-		// End of Generated Code
-
-		// Re-Start of Generated Code
-		return true;
-	}
-}
-
-// -----------------------------------------------------------------------------
-/*
- * end of $Source:
- * /cvsroot/tango-cs/archiving/server/hdbtdbArchivingServers/src/
- * main/java/TdbExtractor/GetMaxTimeClass.java,v $
- */
+/**
+ * @author  $Author: gramer $
+ * @version $Revision: 15443 $
+ */
+package TdbExtractor;
+
+import org.omg.CORBA.Any;
+
+import fr.esrf.Tango.DevFailed;
+import fr.esrf.Tango.DispLevel;
+import fr.esrf.TangoDs.Command;
+import fr.esrf.TangoDs.DeviceImpl;
+import fr.esrf.TangoDs.Except;
+import fr.esrf.TangoDs.TangoConst;
+import fr.esrf.TangoDs.Util;
+
+/**
+ * Class Description: Returns "true" if the attribute of given name is currently
+ * archived, "false" otherwise.
+ */
+
+public class GetMaxTimeClass extends Command implements TangoConst {
+	// ===============================================================
+	/**
+	 * Constructor for Command class IsArchivedClass
+	 * 
+	 * @param name
+	 *            command name
+	 * @param in
+	 *            argin type
+	 * @param out
+	 *            argout type
+	 */
+	// ===============================================================
+	public GetMaxTimeClass(final String name, final int in, final int out) {
+		super(name, in, out);
+	}
+
+	// ===============================================================
+	/**
+	 * Constructor for Command class IsArchivedClass
+	 * 
+	 * @param name
+	 *            command name
+	 * @param in
+	 *            argin type
+	 * @param in_comments
+	 *            argin description
+	 * @param out
+	 *            argout type
+	 * @param out_comments
+	 *            argout description
+	 */
+	// ===============================================================
+	public GetMaxTimeClass(final String name, final int in, final int out, final String in_comments, final String out_comments) {
+		super(name, in, out, in_comments, out_comments);
+	}
+
+	// ===============================================================
+	/**
+	 * Constructor for Command class IsArchivedClass
+	 * 
+	 * @param name
+	 *            command name
+	 * @param in
+	 *            argin type
+	 * @param in_comments
+	 *            argin description
+	 * @param out
+	 *            argout type
+	 * @param out_comments
+	 *            argout description
+	 * @param level
+	 *            The command display type OPERATOR or EXPERT
+	 */
+	// ===============================================================
+	public GetMaxTimeClass(final String name, final int in, final int out, final String in_comments, final String out_comments, final DispLevel level) {
+		super(name, in, out, in_comments, out_comments, level);
+	}
+
+	// ===============================================================
+	/**
+	 * return the result of the device's command.
+	 */
+	// ===============================================================
+	@Override
+	public Any execute(final DeviceImpl device, final Any in_any) throws DevFailed {
+		Util.out2.println("GetMaxTimeClass.execute(): arrived");
+		final String argin = extract_DevString(in_any);
+
+		if (!(device instanceof TdbExtractor)) {
+			Except.throw_exception("DEVICE_ERROR", "Device parameter is not instance of TdbExtractor", "TdbExtractor");
+		}
+
+		return insert(((TdbExtractor) device).get_max_time(argin));
+	}
+
+	// ===============================================================
+	/**
+	 * Check if it is allowed to execute the command.
+	 */
+	// ===============================================================
+	@Override
+	public boolean is_allowed(final DeviceImpl device, final Any data_in) {
+		// End of Generated Code
+
+		// Re-Start of Generated Code
+		return true;
+	}
+}
+
+// -----------------------------------------------------------------------------
+/*
+ * end of $Source:
+ * /cvsroot/tango-cs/archiving/server/hdbtdbArchivingServers/src/
+ * main/java/TdbExtractor/GetMaxTimeClass.java,v $
+ */
diff --git a/src/main/java/TdbExtractor/GetMembersByDomainFamilyClass.java b/tdbextractor/src/main/java/TdbExtractor/GetMembersByDomainFamilyClass.java
similarity index 94%
rename from src/main/java/TdbExtractor/GetMembersByDomainFamilyClass.java
rename to tdbextractor/src/main/java/TdbExtractor/GetMembersByDomainFamilyClass.java
index c0dd4dc3ededc62767f0b54f5cd12e7e12ad6e50..b37ad32db50a5487bae1cb04874bd3ddb300255c 100644
--- a/src/main/java/TdbExtractor/GetMembersByDomainFamilyClass.java
+++ b/tdbextractor/src/main/java/TdbExtractor/GetMembersByDomainFamilyClass.java
@@ -1,162 +1,162 @@
-//+======================================================================
-// $Source$
-//
-// Project:      Tango Device Server
-//
-// Description:  Java source code for the command TemplateClass of the
-//               TdbExtractor class.
-//
-// $Author$
-//
-// $Revision$
-//
-// $Log$
-// Revision 1.3  2010/11/22 08:09:15  abeilleg
-// remove critical of findbugs
-//
-// Revision 1.2  2009/12/17 12:47:15  pierrejoseph
-// CheckStyle:  Organize imports / Format
-//
-// Revision 1.1  2008/02/28 15:37:15  pierrejoseph
-// TdbExtractor has been forgotten
-//
-// Revision 1.3  2005/11/29 16:13:31  chinkumo
-// Code reformated (pogo compatible)
-//
-// Revision 1.2  2005/11/15 13:45:16  chinkumo
-// ...
-//
-// Revision 1.1  2005/09/09 10:03:41  chinkumo
-// First commit !
-// (Dynamic attribut release)
-//
-//
-// copyleft :    European Synchrotron Radiation Facility
-//               BP 220, Grenoble 38043
-//               FRANCE
-//
-//-======================================================================
-//
-//  		This file is generated by POGO
-//	(Program Obviously used to Generate tango Object)
-//
-//         (c) - Software Engineering Group - ESRF
-//=============================================================================
-
-/**
- * @author	$Author$
- * @version	$Revision$
- */
-package TdbExtractor;
-
-import org.omg.CORBA.Any;
-
-import fr.esrf.Tango.DevFailed;
-import fr.esrf.Tango.DispLevel;
-import fr.esrf.TangoDs.Command;
-import fr.esrf.TangoDs.DeviceImpl;
-import fr.esrf.TangoDs.Except;
-import fr.esrf.TangoDs.TangoConst;
-import fr.esrf.TangoDs.Util;
-
-/**
- * Class Description: Gets all the registered members for the given domain and
- * family
- */
-
-public class GetMembersByDomainFamilyClass extends Command implements TangoConst {
-	// ===============================================================
-	/**
-	 * Constructor for Command class GetMembersByDomainFamilyClass
-	 * 
-	 * @param name
-	 *            command name
-	 * @param in
-	 *            argin type
-	 * @param out
-	 *            argout type
-	 */
-	// ===============================================================
-	public GetMembersByDomainFamilyClass(final String name, final int in, final int out) {
-		super(name, in, out);
-	}
-
-	// ===============================================================
-	/**
-	 * Constructor for Command class GetMembersByDomainFamilyClass
-	 * 
-	 * @param name
-	 *            command name
-	 * @param in
-	 *            argin type
-	 * @param in_comments
-	 *            argin description
-	 * @param out
-	 *            argout type
-	 * @param out_comments
-	 *            argout description
-	 */
-	// ===============================================================
-	public GetMembersByDomainFamilyClass(final String name, final int in, final int out, final String in_comments, final String out_comments) {
-		super(name, in, out, in_comments, out_comments);
-	}
-
-	// ===============================================================
-	/**
-	 * Constructor for Command class GetMembersByDomainFamilyClass
-	 * 
-	 * @param name
-	 *            command name
-	 * @param in
-	 *            argin type
-	 * @param in_comments
-	 *            argin description
-	 * @param out
-	 *            argout type
-	 * @param out_comments
-	 *            argout description
-	 * @param level
-	 *            The command display type OPERATOR or EXPERT
-	 */
-	// ===============================================================
-	public GetMembersByDomainFamilyClass(final String name, final int in, final int out, final String in_comments, final String out_comments, final DispLevel level) {
-		super(name, in, out, in_comments, out_comments, level);
-	}
-
-	// ===============================================================
-	/**
-	 * return the result of the device's command.
-	 */
-	// ===============================================================
-	@Override
-	public Any execute(final DeviceImpl device, final Any in_any) throws DevFailed {
-		Util.out2.println("GetMembersByDomainFamilyClass.execute(): arrived");
-		final String[] argin = extract_DevVarStringArray(in_any);
-
-		if (!(device instanceof TdbExtractor)) {
-			Except.throw_exception("DEVICE_ERROR", "Device parameter is not instance of TdbExtractor", "TdbExtractor");
-		}
-
-		return insert(((TdbExtractor) device).get_members_by_domain_family(argin));
-	}
-
-	// ===============================================================
-	/**
-	 * Check if it is allowed to execute the command.
-	 */
-	// ===============================================================
-	@Override
-	public boolean is_allowed(final DeviceImpl device, final Any data_in) {
-		// End of Generated Code
-
-		// Re-Start of Generated Code
-		return true;
-	}
-}
-
-// -----------------------------------------------------------------------------
-/*
- * end of $Source:
- * /cvsroot/tango-cs/archiving/server/hdbtdbArchivingServers/src/
- * main/java/TdbExtractor/GetMembersByDomainFamilyClass.java,v $
- */
+//+======================================================================
+// $Source$
+//
+// Project:      Tango Device Server
+//
+// Description:  Java source code for the command TemplateClass of the
+//               TdbExtractor class.
+//
+// $Author: gramer $
+//
+// $Revision: 15443 $
+//
+// $Log$
+// Revision 1.3  2010/11/22 08:09:15  abeilleg
+// remove critical of findbugs
+//
+// Revision 1.2  2009/12/17 12:47:15  pierrejoseph
+// CheckStyle:  Organize imports / Format
+//
+// Revision 1.1  2008/02/28 15:37:15  pierrejoseph
+// TdbExtractor has been forgotten
+//
+// Revision 1.3  2005/11/29 16:13:31  chinkumo
+// Code reformated (pogo compatible)
+//
+// Revision 1.2  2005/11/15 13:45:16  chinkumo
+// ...
+//
+// Revision 1.1  2005/09/09 10:03:41  chinkumo
+// First commit !
+// (Dynamic attribut release)
+//
+//
+// copyleft :    European Synchrotron Radiation Facility
+//               BP 220, Grenoble 38043
+//               FRANCE
+//
+//-======================================================================
+//
+//  		This file is generated by POGO
+//	(Program Obviously used to Generate tango Object)
+//
+//         (c) - Software Engineering Group - ESRF
+//=============================================================================
+
+/**
+ * @author	$Author: gramer $
+ * @version	$Revision: 15443 $
+ */
+package TdbExtractor;
+
+import org.omg.CORBA.Any;
+
+import fr.esrf.Tango.DevFailed;
+import fr.esrf.Tango.DispLevel;
+import fr.esrf.TangoDs.Command;
+import fr.esrf.TangoDs.DeviceImpl;
+import fr.esrf.TangoDs.Except;
+import fr.esrf.TangoDs.TangoConst;
+import fr.esrf.TangoDs.Util;
+
+/**
+ * Class Description: Gets all the registered members for the given domain and
+ * family
+ */
+
+public class GetMembersByDomainFamilyClass extends Command implements TangoConst {
+	// ===============================================================
+	/**
+	 * Constructor for Command class GetMembersByDomainFamilyClass
+	 * 
+	 * @param name
+	 *            command name
+	 * @param in
+	 *            argin type
+	 * @param out
+	 *            argout type
+	 */
+	// ===============================================================
+	public GetMembersByDomainFamilyClass(final String name, final int in, final int out) {
+		super(name, in, out);
+	}
+
+	// ===============================================================
+	/**
+	 * Constructor for Command class GetMembersByDomainFamilyClass
+	 * 
+	 * @param name
+	 *            command name
+	 * @param in
+	 *            argin type
+	 * @param in_comments
+	 *            argin description
+	 * @param out
+	 *            argout type
+	 * @param out_comments
+	 *            argout description
+	 */
+	// ===============================================================
+	public GetMembersByDomainFamilyClass(final String name, final int in, final int out, final String in_comments, final String out_comments) {
+		super(name, in, out, in_comments, out_comments);
+	}
+
+	// ===============================================================
+	/**
+	 * Constructor for Command class GetMembersByDomainFamilyClass
+	 * 
+	 * @param name
+	 *            command name
+	 * @param in
+	 *            argin type
+	 * @param in_comments
+	 *            argin description
+	 * @param out
+	 *            argout type
+	 * @param out_comments
+	 *            argout description
+	 * @param level
+	 *            The command display type OPERATOR or EXPERT
+	 */
+	// ===============================================================
+	public GetMembersByDomainFamilyClass(final String name, final int in, final int out, final String in_comments, final String out_comments, final DispLevel level) {
+		super(name, in, out, in_comments, out_comments, level);
+	}
+
+	// ===============================================================
+	/**
+	 * return the result of the device's command.
+	 */
+	// ===============================================================
+	@Override
+	public Any execute(final DeviceImpl device, final Any in_any) throws DevFailed {
+		Util.out2.println("GetMembersByDomainFamilyClass.execute(): arrived");
+		final String[] argin = extract_DevVarStringArray(in_any);
+
+		if (!(device instanceof TdbExtractor)) {
+			Except.throw_exception("DEVICE_ERROR", "Device parameter is not instance of TdbExtractor", "TdbExtractor");
+		}
+
+		return insert(((TdbExtractor) device).get_members_by_domain_family(argin));
+	}
+
+	// ===============================================================
+	/**
+	 * Check if it is allowed to execute the command.
+	 */
+	// ===============================================================
+	@Override
+	public boolean is_allowed(final DeviceImpl device, final Any data_in) {
+		// End of Generated Code
+
+		// Re-Start of Generated Code
+		return true;
+	}
+}
+
+// -----------------------------------------------------------------------------
+/*
+ * end of $Source:
+ * /cvsroot/tango-cs/archiving/server/hdbtdbArchivingServers/src/
+ * main/java/TdbExtractor/GetMembersByDomainFamilyClass.java,v $
+ */
diff --git a/src/main/java/TdbExtractor/GetMembersByDomainFamilyCountClass.java b/tdbextractor/src/main/java/TdbExtractor/GetMembersByDomainFamilyCountClass.java
similarity index 94%
rename from src/main/java/TdbExtractor/GetMembersByDomainFamilyCountClass.java
rename to tdbextractor/src/main/java/TdbExtractor/GetMembersByDomainFamilyCountClass.java
index 5563bc1a26f1808ca365c5d9c44d4302b762dbd8..e8c572904d9fee938bc2bc34cb1af3e4a689516f 100644
--- a/src/main/java/TdbExtractor/GetMembersByDomainFamilyCountClass.java
+++ b/tdbextractor/src/main/java/TdbExtractor/GetMembersByDomainFamilyCountClass.java
@@ -1,162 +1,162 @@
-//+======================================================================
-// $Source$
-//
-// Project:      Tango Device Server
-//
-// Description:  Java source code for the command TemplateClass of the
-//               TdbExtractor class.
-//
-// $Author$
-//
-// $Revision$
-//
-// $Log$
-// Revision 1.3  2010/11/22 08:09:15  abeilleg
-// remove critical of findbugs
-//
-// Revision 1.2  2009/12/17 12:47:15  pierrejoseph
-// CheckStyle:  Organize imports / Format
-//
-// Revision 1.1  2008/02/28 15:37:13  pierrejoseph
-// TdbExtractor has been forgotten
-//
-// Revision 1.3  2005/11/29 16:13:31  chinkumo
-// Code reformated (pogo compatible)
-//
-// Revision 1.2  2005/11/15 13:45:16  chinkumo
-// ...
-//
-// Revision 1.1  2005/09/09 10:03:41  chinkumo
-// First commit !
-// (Dynamic attribut release)
-//
-//
-// copyleft :    European Synchrotron Radiation Facility
-//               BP 220, Grenoble 38043
-//               FRANCE
-//
-//-======================================================================
-//
-//  		This file is generated by POGO
-//	(Program Obviously used to Generate tango Object)
-//
-//         (c) - Software Engineering Group - ESRF
-//=============================================================================
-
-/**
- * @author	$Author$
- * @version	$Revision$
- */
-package TdbExtractor;
-
-import org.omg.CORBA.Any;
-
-import fr.esrf.Tango.DevFailed;
-import fr.esrf.Tango.DispLevel;
-import fr.esrf.TangoDs.Command;
-import fr.esrf.TangoDs.DeviceImpl;
-import fr.esrf.TangoDs.Except;
-import fr.esrf.TangoDs.TangoConst;
-import fr.esrf.TangoDs.Util;
-
-/**
- * Class Description: Returns the number of distinct registered members for the
- * given domain and family.
- */
-
-public class GetMembersByDomainFamilyCountClass extends Command implements TangoConst {
-	// ===============================================================
-	/**
-	 * Constructor for Command class GetMembersByDomainFamilyCountClass
-	 * 
-	 * @param name
-	 *            command name
-	 * @param in
-	 *            argin type
-	 * @param out
-	 *            argout type
-	 */
-	// ===============================================================
-	public GetMembersByDomainFamilyCountClass(final String name, final int in, final int out) {
-		super(name, in, out);
-	}
-
-	// ===============================================================
-	/**
-	 * Constructor for Command class GetMembersByDomainFamilyCountClass
-	 * 
-	 * @param name
-	 *            command name
-	 * @param in
-	 *            argin type
-	 * @param in_comments
-	 *            argin description
-	 * @param out
-	 *            argout type
-	 * @param out_comments
-	 *            argout description
-	 */
-	// ===============================================================
-	public GetMembersByDomainFamilyCountClass(final String name, final int in, final int out, final String in_comments, final String out_comments) {
-		super(name, in, out, in_comments, out_comments);
-	}
-
-	// ===============================================================
-	/**
-	 * Constructor for Command class GetMembersByDomainFamilyCountClass
-	 * 
-	 * @param name
-	 *            command name
-	 * @param in
-	 *            argin type
-	 * @param in_comments
-	 *            argin description
-	 * @param out
-	 *            argout type
-	 * @param out_comments
-	 *            argout description
-	 * @param level
-	 *            The command display type OPERATOR or EXPERT
-	 */
-	// ===============================================================
-	public GetMembersByDomainFamilyCountClass(final String name, final int in, final int out, final String in_comments, final String out_comments, final DispLevel level) {
-		super(name, in, out, in_comments, out_comments, level);
-	}
-
-	// ===============================================================
-	/**
-	 * return the result of the device's command.
-	 */
-	// ===============================================================
-	@Override
-	public Any execute(final DeviceImpl device, final Any in_any) throws DevFailed {
-		Util.out2.println("GetMembersByDomainFamilyCountClass.execute(): arrived");
-		final String[] argin = extract_DevVarStringArray(in_any);
-
-		if (!(device instanceof TdbExtractor)) {
-			Except.throw_exception("DEVICE_ERROR", "Device parameter is not instance of TdbExtractor", "TdbExtractor");
-		}
-
-		return insert(((TdbExtractor) device).get_members_by_domain_family_count(argin));
-	}
-
-	// ===============================================================
-	/**
-	 * Check if it is allowed to execute the command.
-	 */
-	// ===============================================================
-	@Override
-	public boolean is_allowed(final DeviceImpl device, final Any data_in) {
-		// End of Generated Code
-
-		// Re-Start of Generated Code
-		return true;
-	}
-}
-
-// -----------------------------------------------------------------------------
-/*
- * end of $Source:
- * /cvsroot/tango-cs/archiving/server/hdbtdbArchivingServers/src/
- * main/java/TdbExtractor/GetMembersByDomainFamilyCountClass.java,v $
- */
+//+======================================================================
+// $Source$
+//
+// Project:      Tango Device Server
+//
+// Description:  Java source code for the command TemplateClass of the
+//               TdbExtractor class.
+//
+// $Author: gramer $
+//
+// $Revision: 15443 $
+//
+// $Log$
+// Revision 1.3  2010/11/22 08:09:15  abeilleg
+// remove critical of findbugs
+//
+// Revision 1.2  2009/12/17 12:47:15  pierrejoseph
+// CheckStyle:  Organize imports / Format
+//
+// Revision 1.1  2008/02/28 15:37:13  pierrejoseph
+// TdbExtractor has been forgotten
+//
+// Revision 1.3  2005/11/29 16:13:31  chinkumo
+// Code reformated (pogo compatible)
+//
+// Revision 1.2  2005/11/15 13:45:16  chinkumo
+// ...
+//
+// Revision 1.1  2005/09/09 10:03:41  chinkumo
+// First commit !
+// (Dynamic attribut release)
+//
+//
+// copyleft :    European Synchrotron Radiation Facility
+//               BP 220, Grenoble 38043
+//               FRANCE
+//
+//-======================================================================
+//
+//  		This file is generated by POGO
+//	(Program Obviously used to Generate tango Object)
+//
+//         (c) - Software Engineering Group - ESRF
+//=============================================================================
+
+/**
+ * @author	$Author: gramer $
+ * @version	$Revision: 15443 $
+ */
+package TdbExtractor;
+
+import org.omg.CORBA.Any;
+
+import fr.esrf.Tango.DevFailed;
+import fr.esrf.Tango.DispLevel;
+import fr.esrf.TangoDs.Command;
+import fr.esrf.TangoDs.DeviceImpl;
+import fr.esrf.TangoDs.Except;
+import fr.esrf.TangoDs.TangoConst;
+import fr.esrf.TangoDs.Util;
+
+/**
+ * Class Description: Returns the number of distinct registered members for the
+ * given domain and family.
+ */
+
+public class GetMembersByDomainFamilyCountClass extends Command implements TangoConst {
+	// ===============================================================
+	/**
+	 * Constructor for Command class GetMembersByDomainFamilyCountClass
+	 * 
+	 * @param name
+	 *            command name
+	 * @param in
+	 *            argin type
+	 * @param out
+	 *            argout type
+	 */
+	// ===============================================================
+	public GetMembersByDomainFamilyCountClass(final String name, final int in, final int out) {
+		super(name, in, out);
+	}
+
+	// ===============================================================
+	/**
+	 * Constructor for Command class GetMembersByDomainFamilyCountClass
+	 * 
+	 * @param name
+	 *            command name
+	 * @param in
+	 *            argin type
+	 * @param in_comments
+	 *            argin description
+	 * @param out
+	 *            argout type
+	 * @param out_comments
+	 *            argout description
+	 */
+	// ===============================================================
+	public GetMembersByDomainFamilyCountClass(final String name, final int in, final int out, final String in_comments, final String out_comments) {
+		super(name, in, out, in_comments, out_comments);
+	}
+
+	// ===============================================================
+	/**
+	 * Constructor for Command class GetMembersByDomainFamilyCountClass
+	 * 
+	 * @param name
+	 *            command name
+	 * @param in
+	 *            argin type
+	 * @param in_comments
+	 *            argin description
+	 * @param out
+	 *            argout type
+	 * @param out_comments
+	 *            argout description
+	 * @param level
+	 *            The command display type OPERATOR or EXPERT
+	 */
+	// ===============================================================
+	public GetMembersByDomainFamilyCountClass(final String name, final int in, final int out, final String in_comments, final String out_comments, final DispLevel level) {
+		super(name, in, out, in_comments, out_comments, level);
+	}
+
+	// ===============================================================
+	/**
+	 * return the result of the device's command.
+	 */
+	// ===============================================================
+	@Override
+	public Any execute(final DeviceImpl device, final Any in_any) throws DevFailed {
+		Util.out2.println("GetMembersByDomainFamilyCountClass.execute(): arrived");
+		final String[] argin = extract_DevVarStringArray(in_any);
+
+		if (!(device instanceof TdbExtractor)) {
+			Except.throw_exception("DEVICE_ERROR", "Device parameter is not instance of TdbExtractor", "TdbExtractor");
+		}
+
+		return insert(((TdbExtractor) device).get_members_by_domain_family_count(argin));
+	}
+
+	// ===============================================================
+	/**
+	 * Check if it is allowed to execute the command.
+	 */
+	// ===============================================================
+	@Override
+	public boolean is_allowed(final DeviceImpl device, final Any data_in) {
+		// End of Generated Code
+
+		// Re-Start of Generated Code
+		return true;
+	}
+}
+
+// -----------------------------------------------------------------------------
+/*
+ * end of $Source:
+ * /cvsroot/tango-cs/archiving/server/hdbtdbArchivingServers/src/
+ * main/java/TdbExtractor/GetMembersByDomainFamilyCountClass.java,v $
+ */
diff --git a/src/main/java/TdbExtractor/GetMembersClass.java b/tdbextractor/src/main/java/TdbExtractor/GetMembersClass.java
similarity index 94%
rename from src/main/java/TdbExtractor/GetMembersClass.java
rename to tdbextractor/src/main/java/TdbExtractor/GetMembersClass.java
index f1f7b2c486595529bb627b6b55384590b876a851..b8c7a710ca9e6ebee3b9e5bce17d34e535d23b2e 100644
--- a/src/main/java/TdbExtractor/GetMembersClass.java
+++ b/tdbextractor/src/main/java/TdbExtractor/GetMembersClass.java
@@ -1,160 +1,160 @@
-//+======================================================================
-// $Source$
-//
-// Project:      Tango Device Server
-//
-// Description:  Java source code for the command TemplateClass of the
-//               TdbExtractor class.
-//
-// $Author$
-//
-// $Revision$
-//
-// $Log$
-// Revision 1.3  2010/11/22 08:09:14  abeilleg
-// remove critical of findbugs
-//
-// Revision 1.2  2009/12/17 12:47:15  pierrejoseph
-// CheckStyle:  Organize imports / Format
-//
-// Revision 1.1  2008/02/28 15:37:14  pierrejoseph
-// TdbExtractor has been forgotten
-//
-// Revision 1.3  2005/11/29 16:13:31  chinkumo
-// Code reformated (pogo compatible)
-//
-// Revision 1.2  2005/11/15 13:45:16  chinkumo
-// ...
-//
-// Revision 1.1  2005/09/09 10:03:41  chinkumo
-// First commit !
-// (Dynamic attribut release)
-//
-//
-// copyleft :    European Synchrotron Radiation Facility
-//               BP 220, Grenoble 38043
-//               FRANCE
-//
-//-======================================================================
-//
-//  		This file is generated by POGO
-//	(Program Obviously used to Generate tango Object)
-//
-//         (c) - Software Engineering Group - ESRF
-//=============================================================================
-
-/**
- * @author	$Author$
- * @version	$Revision$
- */
-package TdbExtractor;
-
-import org.omg.CORBA.Any;
-
-import fr.esrf.Tango.DevFailed;
-import fr.esrf.Tango.DispLevel;
-import fr.esrf.TangoDs.Command;
-import fr.esrf.TangoDs.DeviceImpl;
-import fr.esrf.TangoDs.Except;
-import fr.esrf.TangoDs.TangoConst;
-import fr.esrf.TangoDs.Util;
-
-/**
- * Class Description: Gets all the registered members
- */
-
-public class GetMembersClass extends Command implements TangoConst {
-	// ===============================================================
-	/**
-	 * Constructor for Command class GetMembersClass
-	 * 
-	 * @param name
-	 *            command name
-	 * @param in
-	 *            argin type
-	 * @param out
-	 *            argout type
-	 */
-	// ===============================================================
-	public GetMembersClass(final String name, final int in, final int out) {
-		super(name, in, out);
-	}
-
-	// ===============================================================
-	/**
-	 * Constructor for Command class GetMembersClass
-	 * 
-	 * @param name
-	 *            command name
-	 * @param in
-	 *            argin type
-	 * @param in_comments
-	 *            argin description
-	 * @param out
-	 *            argout type
-	 * @param out_comments
-	 *            argout description
-	 */
-	// ===============================================================
-	public GetMembersClass(final String name, final int in, final int out, final String in_comments, final String out_comments) {
-		super(name, in, out, in_comments, out_comments);
-	}
-
-	// ===============================================================
-	/**
-	 * Constructor for Command class GetMembersClass
-	 * 
-	 * @param name
-	 *            command name
-	 * @param in
-	 *            argin type
-	 * @param in_comments
-	 *            argin description
-	 * @param out
-	 *            argout type
-	 * @param out_comments
-	 *            argout description
-	 * @param level
-	 *            The command display type OPERATOR or EXPERT
-	 */
-	// ===============================================================
-	public GetMembersClass(final String name, final int in, final int out, final String in_comments, final String out_comments, final DispLevel level) {
-		super(name, in, out, in_comments, out_comments, level);
-	}
-
-	// ===============================================================
-	/**
-	 * return the result of the device's command.
-	 */
-	// ===============================================================
-	@Override
-	public Any execute(final DeviceImpl device, final Any in_any) throws DevFailed {
-		Util.out2.println("GetMembersClass.execute(): arrived");
-
-		if (!(device instanceof TdbExtractor)) {
-			Except.throw_exception("DEVICE_ERROR", "Device parameter is not instance of TdbExtractor", "TdbExtractor");
-		}
-
-		return insert(((TdbExtractor) device).get_members());
-	}
-
-	// ===============================================================
-	/**
-	 * Check if it is allowed to execute the command.
-	 */
-	// ===============================================================
-	@Override
-	public boolean is_allowed(final DeviceImpl device, final Any data_in) {
-		// End of Generated Code
-
-		// Re-Start of Generated Code
-		return true;
-	}
-}
-
-// -----------------------------------------------------------------------------
-/*
- * end of $Source:
- * /cvsroot/tango-cs/archiving/server/hdbtdbArchivingServers/src/
- * main/java/TdbExtractor/GetMembersClass.java,v $
- */
+//+======================================================================
+// $Source$
+//
+// Project:      Tango Device Server
+//
+// Description:  Java source code for the command TemplateClass of the
+//               TdbExtractor class.
+//
+// $Author: gramer $
+//
+// $Revision: 15443 $
+//
+// $Log$
+// Revision 1.3  2010/11/22 08:09:14  abeilleg
+// remove critical of findbugs
+//
+// Revision 1.2  2009/12/17 12:47:15  pierrejoseph
+// CheckStyle:  Organize imports / Format
+//
+// Revision 1.1  2008/02/28 15:37:14  pierrejoseph
+// TdbExtractor has been forgotten
+//
+// Revision 1.3  2005/11/29 16:13:31  chinkumo
+// Code reformated (pogo compatible)
+//
+// Revision 1.2  2005/11/15 13:45:16  chinkumo
+// ...
+//
+// Revision 1.1  2005/09/09 10:03:41  chinkumo
+// First commit !
+// (Dynamic attribut release)
+//
+//
+// copyleft :    European Synchrotron Radiation Facility
+//               BP 220, Grenoble 38043
+//               FRANCE
+//
+//-======================================================================
+//
+//  		This file is generated by POGO
+//	(Program Obviously used to Generate tango Object)
+//
+//         (c) - Software Engineering Group - ESRF
+//=============================================================================
+
+/**
+ * @author	$Author: gramer $
+ * @version	$Revision: 15443 $
+ */
+package TdbExtractor;
+
+import org.omg.CORBA.Any;
+
+import fr.esrf.Tango.DevFailed;
+import fr.esrf.Tango.DispLevel;
+import fr.esrf.TangoDs.Command;
+import fr.esrf.TangoDs.DeviceImpl;
+import fr.esrf.TangoDs.Except;
+import fr.esrf.TangoDs.TangoConst;
+import fr.esrf.TangoDs.Util;
+
+/**
+ * Class Description: Gets all the registered members
+ */
+
+public class GetMembersClass extends Command implements TangoConst {
+	// ===============================================================
+	/**
+	 * Constructor for Command class GetMembersClass
+	 * 
+	 * @param name
+	 *            command name
+	 * @param in
+	 *            argin type
+	 * @param out
+	 *            argout type
+	 */
+	// ===============================================================
+	public GetMembersClass(final String name, final int in, final int out) {
+		super(name, in, out);
+	}
+
+	// ===============================================================
+	/**
+	 * Constructor for Command class GetMembersClass
+	 * 
+	 * @param name
+	 *            command name
+	 * @param in
+	 *            argin type
+	 * @param in_comments
+	 *            argin description
+	 * @param out
+	 *            argout type
+	 * @param out_comments
+	 *            argout description
+	 */
+	// ===============================================================
+	public GetMembersClass(final String name, final int in, final int out, final String in_comments, final String out_comments) {
+		super(name, in, out, in_comments, out_comments);
+	}
+
+	// ===============================================================
+	/**
+	 * Constructor for Command class GetMembersClass
+	 * 
+	 * @param name
+	 *            command name
+	 * @param in
+	 *            argin type
+	 * @param in_comments
+	 *            argin description
+	 * @param out
+	 *            argout type
+	 * @param out_comments
+	 *            argout description
+	 * @param level
+	 *            The command display type OPERATOR or EXPERT
+	 */
+	// ===============================================================
+	public GetMembersClass(final String name, final int in, final int out, final String in_comments, final String out_comments, final DispLevel level) {
+		super(name, in, out, in_comments, out_comments, level);
+	}
+
+	// ===============================================================
+	/**
+	 * return the result of the device's command.
+	 */
+	// ===============================================================
+	@Override
+	public Any execute(final DeviceImpl device, final Any in_any) throws DevFailed {
+		Util.out2.println("GetMembersClass.execute(): arrived");
+
+		if (!(device instanceof TdbExtractor)) {
+			Except.throw_exception("DEVICE_ERROR", "Device parameter is not instance of TdbExtractor", "TdbExtractor");
+		}
+
+		return insert(((TdbExtractor) device).get_members());
+	}
+
+	// ===============================================================
+	/**
+	 * Check if it is allowed to execute the command.
+	 */
+	// ===============================================================
+	@Override
+	public boolean is_allowed(final DeviceImpl device, final Any data_in) {
+		// End of Generated Code
+
+		// Re-Start of Generated Code
+		return true;
+	}
+}
+
+// -----------------------------------------------------------------------------
+/*
+ * end of $Source:
+ * /cvsroot/tango-cs/archiving/server/hdbtdbArchivingServers/src/
+ * main/java/TdbExtractor/GetMembersClass.java,v $
+ */
diff --git a/src/main/java/TdbExtractor/GetMembersCountClass.java b/tdbextractor/src/main/java/TdbExtractor/GetMembersCountClass.java
similarity index 94%
rename from src/main/java/TdbExtractor/GetMembersCountClass.java
rename to tdbextractor/src/main/java/TdbExtractor/GetMembersCountClass.java
index e5fdbc542b36641d81994c72e48ca1b14a57ffd4..6ce9597387c3c8c07b364c1197c183eab6e2a237 100644
--- a/src/main/java/TdbExtractor/GetMembersCountClass.java
+++ b/tdbextractor/src/main/java/TdbExtractor/GetMembersCountClass.java
@@ -1,160 +1,160 @@
-//+======================================================================
-// $Source$
-//
-// Project:      Tango Device Server
-//
-// Description:  Java source code for the command TemplateClass of the
-//               TdbExtractor class.
-//
-// $Author$
-//
-// $Revision$
-//
-// $Log$
-// Revision 1.3  2010/11/22 08:09:15  abeilleg
-// remove critical of findbugs
-//
-// Revision 1.2  2009/12/17 12:47:15  pierrejoseph
-// CheckStyle:  Organize imports / Format
-//
-// Revision 1.1  2008/02/28 15:37:14  pierrejoseph
-// TdbExtractor has been forgotten
-//
-// Revision 1.3  2005/11/29 16:13:31  chinkumo
-// Code reformated (pogo compatible)
-//
-// Revision 1.2  2005/11/15 13:45:16  chinkumo
-// ...
-//
-// Revision 1.1  2005/09/09 10:03:41  chinkumo
-// First commit !
-// (Dynamic attribut release)
-//
-//
-// copyleft :    European Synchrotron Radiation Facility
-//               BP 220, Grenoble 38043
-//               FRANCE
-//
-//-======================================================================
-//
-//  		This file is generated by POGO
-//	(Program Obviously used to Generate tango Object)
-//
-//         (c) - Software Engineering Group - ESRF
-//=============================================================================
-
-/**
- * @author	$Author$
- * @version	$Revision$
- */
-package TdbExtractor;
-
-import org.omg.CORBA.Any;
-
-import fr.esrf.Tango.DevFailed;
-import fr.esrf.Tango.DispLevel;
-import fr.esrf.TangoDs.Command;
-import fr.esrf.TangoDs.DeviceImpl;
-import fr.esrf.TangoDs.Except;
-import fr.esrf.TangoDs.TangoConst;
-import fr.esrf.TangoDs.Util;
-
-/**
- * Class Description: Returns the number of distinct members.
- */
-
-public class GetMembersCountClass extends Command implements TangoConst {
-	// ===============================================================
-	/**
-	 * Constructor for Command class GetMembersCountClass
-	 * 
-	 * @param name
-	 *            command name
-	 * @param in
-	 *            argin type
-	 * @param out
-	 *            argout type
-	 */
-	// ===============================================================
-	public GetMembersCountClass(final String name, final int in, final int out) {
-		super(name, in, out);
-	}
-
-	// ===============================================================
-	/**
-	 * Constructor for Command class GetMembersCountClass
-	 * 
-	 * @param name
-	 *            command name
-	 * @param in
-	 *            argin type
-	 * @param in_comments
-	 *            argin description
-	 * @param out
-	 *            argout type
-	 * @param out_comments
-	 *            argout description
-	 */
-	// ===============================================================
-	public GetMembersCountClass(final String name, final int in, final int out, final String in_comments, final String out_comments) {
-		super(name, in, out, in_comments, out_comments);
-	}
-
-	// ===============================================================
-	/**
-	 * Constructor for Command class GetMembersCountClass
-	 * 
-	 * @param name
-	 *            command name
-	 * @param in
-	 *            argin type
-	 * @param in_comments
-	 *            argin description
-	 * @param out
-	 *            argout type
-	 * @param out_comments
-	 *            argout description
-	 * @param level
-	 *            The command display type OPERATOR or EXPERT
-	 */
-	// ===============================================================
-	public GetMembersCountClass(final String name, final int in, final int out, final String in_comments, final String out_comments, final DispLevel level) {
-		super(name, in, out, in_comments, out_comments, level);
-	}
-
-	// ===============================================================
-	/**
-	 * return the result of the device's command.
-	 */
-	// ===============================================================
-	@Override
-	public Any execute(final DeviceImpl device, final Any in_any) throws DevFailed {
-		Util.out2.println("GetMembersCountClass.execute(): arrived");
-
-		if (!(device instanceof TdbExtractor)) {
-			Except.throw_exception("DEVICE_ERROR", "Device parameter is not instance of TdbExtractor", "TdbExtractor");
-		}
-
-		return insert(((TdbExtractor) device).get_members_count());
-	}
-
-	// ===============================================================
-	/**
-	 * Check if it is allowed to execute the command.
-	 */
-	// ===============================================================
-	@Override
-	public boolean is_allowed(final DeviceImpl device, final Any data_in) {
-		// End of Generated Code
-
-		// Re-Start of Generated Code
-		return true;
-	}
-}
-
-// -----------------------------------------------------------------------------
-/*
- * end of $Source:
- * /cvsroot/tango-cs/archiving/server/hdbtdbArchivingServers/src/
- * main/java/TdbExtractor/GetMembersCountClass.java,v $
- */
+//+======================================================================
+// $Source$
+//
+// Project:      Tango Device Server
+//
+// Description:  Java source code for the command TemplateClass of the
+//               TdbExtractor class.
+//
+// $Author: gramer $
+//
+// $Revision: 15443 $
+//
+// $Log$
+// Revision 1.3  2010/11/22 08:09:15  abeilleg
+// remove critical of findbugs
+//
+// Revision 1.2  2009/12/17 12:47:15  pierrejoseph
+// CheckStyle:  Organize imports / Format
+//
+// Revision 1.1  2008/02/28 15:37:14  pierrejoseph
+// TdbExtractor has been forgotten
+//
+// Revision 1.3  2005/11/29 16:13:31  chinkumo
+// Code reformated (pogo compatible)
+//
+// Revision 1.2  2005/11/15 13:45:16  chinkumo
+// ...
+//
+// Revision 1.1  2005/09/09 10:03:41  chinkumo
+// First commit !
+// (Dynamic attribut release)
+//
+//
+// copyleft :    European Synchrotron Radiation Facility
+//               BP 220, Grenoble 38043
+//               FRANCE
+//
+//-======================================================================
+//
+//  		This file is generated by POGO
+//	(Program Obviously used to Generate tango Object)
+//
+//         (c) - Software Engineering Group - ESRF
+//=============================================================================
+
+/**
+ * @author	$Author: gramer $
+ * @version	$Revision: 15443 $
+ */
+package TdbExtractor;
+
+import org.omg.CORBA.Any;
+
+import fr.esrf.Tango.DevFailed;
+import fr.esrf.Tango.DispLevel;
+import fr.esrf.TangoDs.Command;
+import fr.esrf.TangoDs.DeviceImpl;
+import fr.esrf.TangoDs.Except;
+import fr.esrf.TangoDs.TangoConst;
+import fr.esrf.TangoDs.Util;
+
+/**
+ * Class Description: Returns the number of distinct members.
+ */
+
+public class GetMembersCountClass extends Command implements TangoConst {
+	// ===============================================================
+	/**
+	 * Constructor for Command class GetMembersCountClass
+	 * 
+	 * @param name
+	 *            command name
+	 * @param in
+	 *            argin type
+	 * @param out
+	 *            argout type
+	 */
+	// ===============================================================
+	public GetMembersCountClass(final String name, final int in, final int out) {
+		super(name, in, out);
+	}
+
+	// ===============================================================
+	/**
+	 * Constructor for Command class GetMembersCountClass
+	 * 
+	 * @param name
+	 *            command name
+	 * @param in
+	 *            argin type
+	 * @param in_comments
+	 *            argin description
+	 * @param out
+	 *            argout type
+	 * @param out_comments
+	 *            argout description
+	 */
+	// ===============================================================
+	public GetMembersCountClass(final String name, final int in, final int out, final String in_comments, final String out_comments) {
+		super(name, in, out, in_comments, out_comments);
+	}
+
+	// ===============================================================
+	/**
+	 * Constructor for Command class GetMembersCountClass
+	 * 
+	 * @param name
+	 *            command name
+	 * @param in
+	 *            argin type
+	 * @param in_comments
+	 *            argin description
+	 * @param out
+	 *            argout type
+	 * @param out_comments
+	 *            argout description
+	 * @param level
+	 *            The command display type OPERATOR or EXPERT
+	 */
+	// ===============================================================
+	public GetMembersCountClass(final String name, final int in, final int out, final String in_comments, final String out_comments, final DispLevel level) {
+		super(name, in, out, in_comments, out_comments, level);
+	}
+
+	// ===============================================================
+	/**
+	 * return the result of the device's command.
+	 */
+	// ===============================================================
+	@Override
+	public Any execute(final DeviceImpl device, final Any in_any) throws DevFailed {
+		Util.out2.println("GetMembersCountClass.execute(): arrived");
+
+		if (!(device instanceof TdbExtractor)) {
+			Except.throw_exception("DEVICE_ERROR", "Device parameter is not instance of TdbExtractor", "TdbExtractor");
+		}
+
+		return insert(((TdbExtractor) device).get_members_count());
+	}
+
+	// ===============================================================
+	/**
+	 * Check if it is allowed to execute the command.
+	 */
+	// ===============================================================
+	@Override
+	public boolean is_allowed(final DeviceImpl device, final Any data_in) {
+		// End of Generated Code
+
+		// Re-Start of Generated Code
+		return true;
+	}
+}
+
+// -----------------------------------------------------------------------------
+/*
+ * end of $Source:
+ * /cvsroot/tango-cs/archiving/server/hdbtdbArchivingServers/src/
+ * main/java/TdbExtractor/GetMembersCountClass.java,v $
+ */
diff --git a/src/main/java/TdbExtractor/GetMinTimeClass.java b/tdbextractor/src/main/java/TdbExtractor/GetMinTimeClass.java
similarity index 95%
rename from src/main/java/TdbExtractor/GetMinTimeClass.java
rename to tdbextractor/src/main/java/TdbExtractor/GetMinTimeClass.java
index de76eaad69a28745ff941cc5563abdb163005cf3..a553bb7650964508643525e6d3448fe7256b1833 100644
--- a/src/main/java/TdbExtractor/GetMinTimeClass.java
+++ b/tdbextractor/src/main/java/TdbExtractor/GetMinTimeClass.java
@@ -1,117 +1,117 @@
-/**
- * @author  $Author$
- * @version $Revision$
- */
-package TdbExtractor;
-
-import org.omg.CORBA.Any;
-
-import fr.esrf.Tango.DevFailed;
-import fr.esrf.Tango.DispLevel;
-import fr.esrf.TangoDs.Command;
-import fr.esrf.TangoDs.DeviceImpl;
-import fr.esrf.TangoDs.Except;
-import fr.esrf.TangoDs.TangoConst;
-import fr.esrf.TangoDs.Util;
-
-/**
- * Class Description: Returns "true" if the attribute of given name is currently
- * archived, "false" otherwise.
- */
-
-public class GetMinTimeClass extends Command implements TangoConst {
-	// ===============================================================
-	/**
-	 * Constructor for Command class IsArchivedClass
-	 * 
-	 * @param name
-	 *            command name
-	 * @param in
-	 *            argin type
-	 * @param out
-	 *            argout type
-	 */
-	// ===============================================================
-	public GetMinTimeClass(final String name, final int in, final int out) {
-		super(name, in, out);
-	}
-
-	// ===============================================================
-	/**
-	 * Constructor for Command class IsArchivedClass
-	 * 
-	 * @param name
-	 *            command name
-	 * @param in
-	 *            argin type
-	 * @param in_comments
-	 *            argin description
-	 * @param out
-	 *            argout type
-	 * @param out_comments
-	 *            argout description
-	 */
-	// ===============================================================
-	public GetMinTimeClass(final String name, final int in, final int out, final String in_comments, final String out_comments) {
-		super(name, in, out, in_comments, out_comments);
-	}
-
-	// ===============================================================
-	/**
-	 * Constructor for Command class IsArchivedClass
-	 * 
-	 * @param name
-	 *            command name
-	 * @param in
-	 *            argin type
-	 * @param in_comments
-	 *            argin description
-	 * @param out
-	 *            argout type
-	 * @param out_comments
-	 *            argout description
-	 * @param level
-	 *            The command display type OPERATOR or EXPERT
-	 */
-	// ===============================================================
-	public GetMinTimeClass(final String name, final int in, final int out, final String in_comments, final String out_comments, final DispLevel level) {
-		super(name, in, out, in_comments, out_comments, level);
-	}
-
-	// ===============================================================
-	/**
-	 * return the result of the device's command.
-	 */
-	// ===============================================================
-	@Override
-	public Any execute(final DeviceImpl device, final Any in_any) throws DevFailed {
-		Util.out2.println("GetMinTimeClass.execute(): arrived");
-		final String argin = extract_DevString(in_any);
-
-		if (!(device instanceof TdbExtractor)) {
-			Except.throw_exception("DEVICE_ERROR", "Device parameter is not instance of TdbExtractor", "TdbExtractor");
-		}
-
-		return insert(((TdbExtractor) device).get_min_time(argin));
-	}
-
-	// ===============================================================
-	/**
-	 * Check if it is allowed to execute the command.
-	 */
-	// ===============================================================
-	@Override
-	public boolean is_allowed(final DeviceImpl device, final Any data_in) {
-		// End of Generated Code
-
-		// Re-Start of Generated Code
-		return true;
-	}
-}
-
-// -----------------------------------------------------------------------------
-/*
- * end of $Source:
- * /cvsroot/tango-cs/archiving/server/hdbtdbArchivingServers/src/
- * main/java/TdbExtractor/GetMinTimeClass.java,v $
- */
+/**
+ * @author  $Author: gramer $
+ * @version $Revision: 15443 $
+ */
+package TdbExtractor;
+
+import org.omg.CORBA.Any;
+
+import fr.esrf.Tango.DevFailed;
+import fr.esrf.Tango.DispLevel;
+import fr.esrf.TangoDs.Command;
+import fr.esrf.TangoDs.DeviceImpl;
+import fr.esrf.TangoDs.Except;
+import fr.esrf.TangoDs.TangoConst;
+import fr.esrf.TangoDs.Util;
+
+/**
+ * Class Description: Returns "true" if the attribute of given name is currently
+ * archived, "false" otherwise.
+ */
+
+public class GetMinTimeClass extends Command implements TangoConst {
+	// ===============================================================
+	/**
+	 * Constructor for Command class IsArchivedClass
+	 * 
+	 * @param name
+	 *            command name
+	 * @param in
+	 *            argin type
+	 * @param out
+	 *            argout type
+	 */
+	// ===============================================================
+	public GetMinTimeClass(final String name, final int in, final int out) {
+		super(name, in, out);
+	}
+
+	// ===============================================================
+	/**
+	 * Constructor for Command class IsArchivedClass
+	 * 
+	 * @param name
+	 *            command name
+	 * @param in
+	 *            argin type
+	 * @param in_comments
+	 *            argin description
+	 * @param out
+	 *            argout type
+	 * @param out_comments
+	 *            argout description
+	 */
+	// ===============================================================
+	public GetMinTimeClass(final String name, final int in, final int out, final String in_comments, final String out_comments) {
+		super(name, in, out, in_comments, out_comments);
+	}
+
+	// ===============================================================
+	/**
+	 * Constructor for Command class IsArchivedClass
+	 * 
+	 * @param name
+	 *            command name
+	 * @param in
+	 *            argin type
+	 * @param in_comments
+	 *            argin description
+	 * @param out
+	 *            argout type
+	 * @param out_comments
+	 *            argout description
+	 * @param level
+	 *            The command display type OPERATOR or EXPERT
+	 */
+	// ===============================================================
+	public GetMinTimeClass(final String name, final int in, final int out, final String in_comments, final String out_comments, final DispLevel level) {
+		super(name, in, out, in_comments, out_comments, level);
+	}
+
+	// ===============================================================
+	/**
+	 * return the result of the device's command.
+	 */
+	// ===============================================================
+	@Override
+	public Any execute(final DeviceImpl device, final Any in_any) throws DevFailed {
+		Util.out2.println("GetMinTimeClass.execute(): arrived");
+		final String argin = extract_DevString(in_any);
+
+		if (!(device instanceof TdbExtractor)) {
+			Except.throw_exception("DEVICE_ERROR", "Device parameter is not instance of TdbExtractor", "TdbExtractor");
+		}
+
+		return insert(((TdbExtractor) device).get_min_time(argin));
+	}
+
+	// ===============================================================
+	/**
+	 * Check if it is allowed to execute the command.
+	 */
+	// ===============================================================
+	@Override
+	public boolean is_allowed(final DeviceImpl device, final Any data_in) {
+		// End of Generated Code
+
+		// Re-Start of Generated Code
+		return true;
+	}
+}
+
+// -----------------------------------------------------------------------------
+/*
+ * end of $Source:
+ * /cvsroot/tango-cs/archiving/server/hdbtdbArchivingServers/src/
+ * main/java/TdbExtractor/GetMinTimeClass.java,v $
+ */
diff --git a/src/main/java/TdbExtractor/GetUserClass.java b/tdbextractor/src/main/java/TdbExtractor/GetUserClass.java
similarity index 94%
rename from src/main/java/TdbExtractor/GetUserClass.java
rename to tdbextractor/src/main/java/TdbExtractor/GetUserClass.java
index eab53d76ae64311d3a9a2a356ca833ce68efdde2..176a32400286c2c91acb309d87ea4cf59274bab5 100644
--- a/src/main/java/TdbExtractor/GetUserClass.java
+++ b/tdbextractor/src/main/java/TdbExtractor/GetUserClass.java
@@ -1,161 +1,161 @@
-// +======================================================================
-// $Source$
-//
-// Project:      Tango Device Server
-//
-// Description:  Java source code for the command TemplateClass of the
-//               TdbExtractor class.
-//
-// $Author$
-//
-// $Revision$
-//
-// $Log$
-// Revision 1.3  2009/12/17 12:47:15  pierrejoseph
-// CheckStyle:  Organize imports / Format
-//
-// Revision 1.2  2009/06/12 15:00:39  soleilarc
-// Api: new architecture
-//
-// Revision 1.1  2008/02/28 15:37:15  pierrejoseph
-// TdbExtractor has been forgotten
-//
-// Revision 1.3  2005/11/29 16:13:31  chinkumo
-// Code reformated (pogo compatible)
-//
-// Revision 1.2  2005/11/15 13:45:16  chinkumo
-// ...
-//
-// Revision 1.1  2005/09/09 10:03:41  chinkumo
-// First commit !
-// (Dynamic attribut release)
-//
-//
-// copyleft :    European Synchrotron Radiation Facility
-//               BP 220, Grenoble 38043
-//               FRANCE
-//
-//-======================================================================
-//
-//  		This file is generated by POGO
-//	(Program Obviously used to Generate tango Object)
-//
-//         (c) - Software Engineering Group - ESRF
-//=============================================================================
-
-/**
- * @author $Author$
- * @version $Revision$
- */
-package TdbExtractor;
-
-import org.omg.CORBA.Any;
-
-import fr.esrf.Tango.DevFailed;
-import fr.esrf.Tango.DispLevel;
-import fr.esrf.TangoDs.Command;
-import fr.esrf.TangoDs.DeviceImpl;
-import fr.esrf.TangoDs.TangoConst;
-import fr.esrf.TangoDs.Util;
-
-/**
- * Class Description: Gets the current user's name used for the connection.
- */
-
-public class GetUserClass extends Command implements TangoConst {
-    // ===============================================================
-    /**
-     * Constructor for Command class GetUserClass
-     * 
-     * @param name
-     *            command name
-     * @param in
-     *            argin type
-     * @param out
-     *            argout type
-     */
-    // ===============================================================
-    public GetUserClass(final String name, final int in, final int out) {
-        super(name, in, out);
-    }
-
-    // ===============================================================
-    /**
-     * Constructor for Command class GetUserClass
-     * 
-     * @param name
-     *            command name
-     * @param in
-     *            argin type
-     * @param in_comments
-     *            argin description
-     * @param out
-     *            argout type
-     * @param out_comments
-     *            argout description
-     */
-    // ===============================================================
-    public GetUserClass(final String name, final int in, final int out, final String in_comments,
-            final String out_comments) {
-        super(name, in, out, in_comments, out_comments);
-    }
-
-    // ===============================================================
-    /**
-     * Constructor for Command class GetUserClass
-     * 
-     * @param name
-     *            command name
-     * @param in
-     *            argin type
-     * @param in_comments
-     *            argin description
-     * @param out
-     *            argout type
-     * @param out_comments
-     *            argout description
-     * @param level
-     *            The command display type OPERATOR or EXPERT
-     */
-    // ===============================================================
-    public GetUserClass(final String name, final int in, final int out, final String in_comments,
-            final String out_comments, final DispLevel level) {
-        super(name, in, out, in_comments, out_comments, level);
-    }
-
-    // ===============================================================
-    /**
-     * return the result of the device's command.
-     */
-    // ===============================================================
-    @Override
-    public Any execute(final DeviceImpl device, final Any in_any) throws DevFailed {
-        Util.out2.println("GetUserClass.execute(): arrived");
-        Any result = null;
-        if (device instanceof TdbExtractor) {
-            result = insert(((TdbExtractor) device).get_user());
-        }
-        return result;
-    }
-
-    // ===============================================================
-    /**
-     * Check if it is allowed to execute the command.
-     */
-    // ===============================================================
-    @Override
-    public boolean is_allowed(final DeviceImpl device, final Any data_in) {
-        // End of Generated Code
-
-        // Re-Start of Generated Code
-        return true;
-    }
-
-}
-
-// -----------------------------------------------------------------------------
-/*
- * end of $Source:
- * /cvsroot/tango-cs/archiving/server/hdbtdbArchivingServers/src/
- * main/java/TdbExtractor/GetUserClass.java,v $
- */
+// +======================================================================
+// $Source$
+//
+// Project:      Tango Device Server
+//
+// Description:  Java source code for the command TemplateClass of the
+//               TdbExtractor class.
+//
+// $Author: candelrg $
+//
+// $Revision: 28754 $
+//
+// $Log$
+// Revision 1.3  2009/12/17 12:47:15  pierrejoseph
+// CheckStyle:  Organize imports / Format
+//
+// Revision 1.2  2009/06/12 15:00:39  soleilarc
+// Api: new architecture
+//
+// Revision 1.1  2008/02/28 15:37:15  pierrejoseph
+// TdbExtractor has been forgotten
+//
+// Revision 1.3  2005/11/29 16:13:31  chinkumo
+// Code reformated (pogo compatible)
+//
+// Revision 1.2  2005/11/15 13:45:16  chinkumo
+// ...
+//
+// Revision 1.1  2005/09/09 10:03:41  chinkumo
+// First commit !
+// (Dynamic attribut release)
+//
+//
+// copyleft :    European Synchrotron Radiation Facility
+//               BP 220, Grenoble 38043
+//               FRANCE
+//
+//-======================================================================
+//
+//  		This file is generated by POGO
+//	(Program Obviously used to Generate tango Object)
+//
+//         (c) - Software Engineering Group - ESRF
+//=============================================================================
+
+/**
+ * @author $Author: candelrg $
+ * @version $Revision: 28754 $
+ */
+package TdbExtractor;
+
+import org.omg.CORBA.Any;
+
+import fr.esrf.Tango.DevFailed;
+import fr.esrf.Tango.DispLevel;
+import fr.esrf.TangoDs.Command;
+import fr.esrf.TangoDs.DeviceImpl;
+import fr.esrf.TangoDs.TangoConst;
+import fr.esrf.TangoDs.Util;
+
+/**
+ * Class Description: Gets the current user's name used for the connection.
+ */
+
+public class GetUserClass extends Command implements TangoConst {
+    // ===============================================================
+    /**
+     * Constructor for Command class GetUserClass
+     * 
+     * @param name
+     *            command name
+     * @param in
+     *            argin type
+     * @param out
+     *            argout type
+     */
+    // ===============================================================
+    public GetUserClass(final String name, final int in, final int out) {
+        super(name, in, out);
+    }
+
+    // ===============================================================
+    /**
+     * Constructor for Command class GetUserClass
+     * 
+     * @param name
+     *            command name
+     * @param in
+     *            argin type
+     * @param in_comments
+     *            argin description
+     * @param out
+     *            argout type
+     * @param out_comments
+     *            argout description
+     */
+    // ===============================================================
+    public GetUserClass(final String name, final int in, final int out, final String in_comments,
+            final String out_comments) {
+        super(name, in, out, in_comments, out_comments);
+    }
+
+    // ===============================================================
+    /**
+     * Constructor for Command class GetUserClass
+     * 
+     * @param name
+     *            command name
+     * @param in
+     *            argin type
+     * @param in_comments
+     *            argin description
+     * @param out
+     *            argout type
+     * @param out_comments
+     *            argout description
+     * @param level
+     *            The command display type OPERATOR or EXPERT
+     */
+    // ===============================================================
+    public GetUserClass(final String name, final int in, final int out, final String in_comments,
+            final String out_comments, final DispLevel level) {
+        super(name, in, out, in_comments, out_comments, level);
+    }
+
+    // ===============================================================
+    /**
+     * return the result of the device's command.
+     */
+    // ===============================================================
+    @Override
+    public Any execute(final DeviceImpl device, final Any in_any) throws DevFailed {
+        Util.out2.println("GetUserClass.execute(): arrived");
+        Any result = null;
+        if (device instanceof TdbExtractor) {
+            result = insert(((TdbExtractor) device).get_user());
+        }
+        return result;
+    }
+
+    // ===============================================================
+    /**
+     * Check if it is allowed to execute the command.
+     */
+    // ===============================================================
+    @Override
+    public boolean is_allowed(final DeviceImpl device, final Any data_in) {
+        // End of Generated Code
+
+        // Re-Start of Generated Code
+        return true;
+    }
+
+}
+
+// -----------------------------------------------------------------------------
+/*
+ * end of $Source:
+ * /cvsroot/tango-cs/archiving/server/hdbtdbArchivingServers/src/
+ * main/java/TdbExtractor/GetUserClass.java,v $
+ */
diff --git a/src/main/java/TdbExtractor/IsArchivedClass.java b/tdbextractor/src/main/java/TdbExtractor/IsArchivedClass.java
similarity index 94%
rename from src/main/java/TdbExtractor/IsArchivedClass.java
rename to tdbextractor/src/main/java/TdbExtractor/IsArchivedClass.java
index fd08a4b8a6af78631b8d5b7aa6b7f3602ac7c751..ed7ef9c88d5f27f34d0be8d63aecbaf9c4bb68fa 100644
--- a/src/main/java/TdbExtractor/IsArchivedClass.java
+++ b/tdbextractor/src/main/java/TdbExtractor/IsArchivedClass.java
@@ -1,162 +1,162 @@
-//+======================================================================
-// $Source$
-//
-// Project:      Tango Device Server
-//
-// Description:  Java source code for the command TemplateClass of the
-//               TdbExtractor class.
-//
-// $Author$
-//
-// $Revision$
-//
-// $Log$
-// Revision 1.3  2010/11/22 08:09:15  abeilleg
-// remove critical of findbugs
-//
-// Revision 1.2  2009/12/17 12:47:15  pierrejoseph
-// CheckStyle:  Organize imports / Format
-//
-// Revision 1.1  2008/02/28 15:37:14  pierrejoseph
-// TdbExtractor has been forgotten
-//
-// Revision 1.3  2005/11/29 16:13:31  chinkumo
-// Code reformated (pogo compatible)
-//
-// Revision 1.2  2005/11/15 13:45:16  chinkumo
-// ...
-//
-// Revision 1.1  2005/09/09 10:03:41  chinkumo
-// First commit !
-// (Dynamic attribut release)
-//
-//
-// copyleft :    European Synchrotron Radiation Facility
-//               BP 220, Grenoble 38043
-//               FRANCE
-//
-//-======================================================================
-//
-//  		This file is generated by POGO
-//	(Program Obviously used to Generate tango Object)
-//
-//         (c) - Software Engineering Group - ESRF
-//=============================================================================
-
-/**
- * @author	$Author$
- * @version	$Revision$
- */
-package TdbExtractor;
-
-import org.omg.CORBA.Any;
-
-import fr.esrf.Tango.DevFailed;
-import fr.esrf.Tango.DispLevel;
-import fr.esrf.TangoDs.Command;
-import fr.esrf.TangoDs.DeviceImpl;
-import fr.esrf.TangoDs.Except;
-import fr.esrf.TangoDs.TangoConst;
-import fr.esrf.TangoDs.Util;
-
-/**
- * Class Description: Returns "true" if the attribute of given name is currently
- * archived, "false" otherwise.
- */
-
-public class IsArchivedClass extends Command implements TangoConst {
-	// ===============================================================
-	/**
-	 * Constructor for Command class IsArchivedClass
-	 * 
-	 * @param name
-	 *            command name
-	 * @param in
-	 *            argin type
-	 * @param out
-	 *            argout type
-	 */
-	// ===============================================================
-	public IsArchivedClass(final String name, final int in, final int out) {
-		super(name, in, out);
-	}
-
-	// ===============================================================
-	/**
-	 * Constructor for Command class IsArchivedClass
-	 * 
-	 * @param name
-	 *            command name
-	 * @param in
-	 *            argin type
-	 * @param in_comments
-	 *            argin description
-	 * @param out
-	 *            argout type
-	 * @param out_comments
-	 *            argout description
-	 */
-	// ===============================================================
-	public IsArchivedClass(final String name, final int in, final int out, final String in_comments, final String out_comments) {
-		super(name, in, out, in_comments, out_comments);
-	}
-
-	// ===============================================================
-	/**
-	 * Constructor for Command class IsArchivedClass
-	 * 
-	 * @param name
-	 *            command name
-	 * @param in
-	 *            argin type
-	 * @param in_comments
-	 *            argin description
-	 * @param out
-	 *            argout type
-	 * @param out_comments
-	 *            argout description
-	 * @param level
-	 *            The command display type OPERATOR or EXPERT
-	 */
-	// ===============================================================
-	public IsArchivedClass(final String name, final int in, final int out, final String in_comments, final String out_comments, final DispLevel level) {
-		super(name, in, out, in_comments, out_comments, level);
-	}
-
-	// ===============================================================
-	/**
-	 * return the result of the device's command.
-	 */
-	// ===============================================================
-	@Override
-	public Any execute(final DeviceImpl device, final Any in_any) throws DevFailed {
-		Util.out2.println("IsArchivedClass.execute(): arrived");
-		final String argin = extract_DevString(in_any);
-
-		if (!(device instanceof TdbExtractor)) {
-			Except.throw_exception("DEVICE_ERROR", "Device parameter is not instance of TdbExtractor", "TdbExtractor");
-		}
-
-		return insert(((TdbExtractor) device).is_archived(argin));
-	}
-
-	// ===============================================================
-	/**
-	 * Check if it is allowed to execute the command.
-	 */
-	// ===============================================================
-	@Override
-	public boolean is_allowed(final DeviceImpl device, final Any data_in) {
-		// End of Generated Code
-
-		// Re-Start of Generated Code
-		return true;
-	}
-}
-
-// -----------------------------------------------------------------------------
-/*
- * end of $Source:
- * /cvsroot/tango-cs/archiving/server/hdbtdbArchivingServers/src/
- * main/java/TdbExtractor/IsArchivedClass.java,v $
- */
+//+======================================================================
+// $Source$
+//
+// Project:      Tango Device Server
+//
+// Description:  Java source code for the command TemplateClass of the
+//               TdbExtractor class.
+//
+// $Author: gramer $
+//
+// $Revision: 15443 $
+//
+// $Log$
+// Revision 1.3  2010/11/22 08:09:15  abeilleg
+// remove critical of findbugs
+//
+// Revision 1.2  2009/12/17 12:47:15  pierrejoseph
+// CheckStyle:  Organize imports / Format
+//
+// Revision 1.1  2008/02/28 15:37:14  pierrejoseph
+// TdbExtractor has been forgotten
+//
+// Revision 1.3  2005/11/29 16:13:31  chinkumo
+// Code reformated (pogo compatible)
+//
+// Revision 1.2  2005/11/15 13:45:16  chinkumo
+// ...
+//
+// Revision 1.1  2005/09/09 10:03:41  chinkumo
+// First commit !
+// (Dynamic attribut release)
+//
+//
+// copyleft :    European Synchrotron Radiation Facility
+//               BP 220, Grenoble 38043
+//               FRANCE
+//
+//-======================================================================
+//
+//  		This file is generated by POGO
+//	(Program Obviously used to Generate tango Object)
+//
+//         (c) - Software Engineering Group - ESRF
+//=============================================================================
+
+/**
+ * @author	$Author: gramer $
+ * @version	$Revision: 15443 $
+ */
+package TdbExtractor;
+
+import org.omg.CORBA.Any;
+
+import fr.esrf.Tango.DevFailed;
+import fr.esrf.Tango.DispLevel;
+import fr.esrf.TangoDs.Command;
+import fr.esrf.TangoDs.DeviceImpl;
+import fr.esrf.TangoDs.Except;
+import fr.esrf.TangoDs.TangoConst;
+import fr.esrf.TangoDs.Util;
+
+/**
+ * Class Description: Returns "true" if the attribute of given name is currently
+ * archived, "false" otherwise.
+ */
+
+public class IsArchivedClass extends Command implements TangoConst {
+	// ===============================================================
+	/**
+	 * Constructor for Command class IsArchivedClass
+	 * 
+	 * @param name
+	 *            command name
+	 * @param in
+	 *            argin type
+	 * @param out
+	 *            argout type
+	 */
+	// ===============================================================
+	public IsArchivedClass(final String name, final int in, final int out) {
+		super(name, in, out);
+	}
+
+	// ===============================================================
+	/**
+	 * Constructor for Command class IsArchivedClass
+	 * 
+	 * @param name
+	 *            command name
+	 * @param in
+	 *            argin type
+	 * @param in_comments
+	 *            argin description
+	 * @param out
+	 *            argout type
+	 * @param out_comments
+	 *            argout description
+	 */
+	// ===============================================================
+	public IsArchivedClass(final String name, final int in, final int out, final String in_comments, final String out_comments) {
+		super(name, in, out, in_comments, out_comments);
+	}
+
+	// ===============================================================
+	/**
+	 * Constructor for Command class IsArchivedClass
+	 * 
+	 * @param name
+	 *            command name
+	 * @param in
+	 *            argin type
+	 * @param in_comments
+	 *            argin description
+	 * @param out
+	 *            argout type
+	 * @param out_comments
+	 *            argout description
+	 * @param level
+	 *            The command display type OPERATOR or EXPERT
+	 */
+	// ===============================================================
+	public IsArchivedClass(final String name, final int in, final int out, final String in_comments, final String out_comments, final DispLevel level) {
+		super(name, in, out, in_comments, out_comments, level);
+	}
+
+	// ===============================================================
+	/**
+	 * return the result of the device's command.
+	 */
+	// ===============================================================
+	@Override
+	public Any execute(final DeviceImpl device, final Any in_any) throws DevFailed {
+		Util.out2.println("IsArchivedClass.execute(): arrived");
+		final String argin = extract_DevString(in_any);
+
+		if (!(device instanceof TdbExtractor)) {
+			Except.throw_exception("DEVICE_ERROR", "Device parameter is not instance of TdbExtractor", "TdbExtractor");
+		}
+
+		return insert(((TdbExtractor) device).is_archived(argin));
+	}
+
+	// ===============================================================
+	/**
+	 * Check if it is allowed to execute the command.
+	 */
+	// ===============================================================
+	@Override
+	public boolean is_allowed(final DeviceImpl device, final Any data_in) {
+		// End of Generated Code
+
+		// Re-Start of Generated Code
+		return true;
+	}
+}
+
+// -----------------------------------------------------------------------------
+/*
+ * end of $Source:
+ * /cvsroot/tango-cs/archiving/server/hdbtdbArchivingServers/src/
+ * main/java/TdbExtractor/IsArchivedClass.java,v $
+ */
diff --git a/src/main/java/TdbExtractor/Proxy/DbProxy.java b/tdbextractor/src/main/java/TdbExtractor/Proxy/DbProxy.java
similarity index 79%
rename from src/main/java/TdbExtractor/Proxy/DbProxy.java
rename to tdbextractor/src/main/java/TdbExtractor/Proxy/DbProxy.java
index da1b700391ab0c2576e357c100994f72c61fbb38..6c8c7bc072cfe3881b2757cadcc19233d0c2390f 100644
--- a/src/main/java/TdbExtractor/Proxy/DbProxy.java
+++ b/tdbextractor/src/main/java/TdbExtractor/Proxy/DbProxy.java
@@ -1,100 +1,92 @@
-// +======================================================================
-// $Source$
-//
-// Project:      Tango Archiving Service
-//
-// Description:  Java source code for the class  DbProxy.
-//						(Chinkumo Jean) - 1 f�vr. 2005
-//
-// $Author$
-//
-// $Revision$
-//
-// $Log$
-// Revision 1.6  2010/08/04 07:31:26  pierrejoseph
-// ArchivingConfigure modification
-//
-// Revision 1.5  2009/12/17 12:47:16  pierrejoseph
-// CheckStyle:  Organize imports / Format
-//
-// Revision 1.4  2009/08/10 14:04:42  soleilarc
-// Oracle RAC connection
-//
-// Revision 1.3  2009/06/12 15:00:40  soleilarc
-// Api: new architecture
-//
-// Revision 1.1  2008/02/28 15:37:15  pierrejoseph
-// TdbExtractor has been forgotten
-//
-// Revision 1.5  2007/03/05 16:25:20  ounsy
-// non-static DataBase
-//
-// Revision 1.4  2007/02/01 13:50:18  pierrejoseph
-// ArchivingConfigureWithoutArchiverListInit instead of ArchivingConfigure
-//
-// Revision 1.3  2005/11/29 17:32:48  chinkumo
-// no message
-//
-// Revision 1.2.10.2  2005/11/29 16:13:31  chinkumo
-// Code reformated (pogo compatible)
-//
-// Revision 1.2.10.1  2005/11/15 13:45:16  chinkumo
-// ...
-//
-// Revision 1.2  2005/06/14 10:43:12  chinkumo
-// Branch (tdbExtractor_1_0_1-branch_0)  and HEAD merged.
-//
-// Revision 1.1.4.1  2005/06/13 13:28:02  chinkumo
-// Changes made to improve the management of exceptions were reported here.
-//
-// Revision 1.1  2005/02/01 12:39:40  chinkumo
-// This class replaces the TdbProxy class.
-//
-//
-// copyleft :	Synchrotron SOLEIL
-//					L'Orme des Merisiers
-//					Saint-Aubin - BP 48
-//					91192 GIF-sur-YVETTE CEDEX
-//
-//-======================================================================
-package TdbExtractor.Proxy;
-
-import org.tango.utils.DevFailedUtils;
-
-import fr.esrf.Tango.DevFailed;
-import fr.soleil.archiving.common.api.ConnectionFactory;
-import fr.soleil.archiving.common.api.exception.ArchivingException;
-import fr.soleil.archiving.hdbtdb.api.ConfigConst;
-import fr.soleil.archiving.hdbtdb.api.DataBaseManager;
-import fr.soleil.archiving.hdbtdb.api.manager.ArchivingManagerApiRefFactory;
-import fr.soleil.archiving.hdbtdb.api.manager.IArchivingManagerApiRef;
-
-public class DbProxy {
-    private IArchivingManagerApiRef manager;
-
-    public DbProxy(final String myDbHost, final String myDbName, final String mySchemaName, final String myDbUser,
-            final String myDbPassword, final boolean myRacConnection) {
-        try {
-            manager = ArchivingManagerApiRefFactory.getInstance(false, ConnectionFactory.connectThroughTango(
-                    "TdbExtractor", ConfigConst.TDB_CLASS_DEVICE, myDbHost, myDbName, mySchemaName, myDbUser,
-                    myDbPassword, null, null, myRacConnection, false, true));
-            manager.archivingConfigureWithoutArchiverListInit();
-        } catch (final ArchivingException e) {
-            System.err.println(e.toString());
-        } catch (DevFailed e) {
-            System.err.println(DevFailedUtils.toString(e));
-        }
-    }
-
-    public boolean is_db_connected() {
-        return manager.isDbConnected();
-    }
-
-    public DataBaseManager getDataBase() {
-        return manager.getDataBase();
-    }
-
-    public IArchivingManagerApiRef getManager() {
-        return manager;
-    }
-}
+// +======================================================================
+// $Source$
+//
+// Project:      Tango Archiving Service
+//
+// Description:  Java source code for the class  DbProxy.
+//						(Chinkumo Jean) - 1 f�vr. 2005
+//
+// $Author: candelrg $
+//
+// $Revision: 29416 $
+//
+// $Log$
+// Revision 1.6  2010/08/04 07:31:26  pierrejoseph
+// ArchivingConfigure modification
+//
+// Revision 1.5  2009/12/17 12:47:16  pierrejoseph
+// CheckStyle:  Organize imports / Format
+//
+// Revision 1.4  2009/08/10 14:04:42  soleilarc
+// Oracle RAC connection
+//
+// Revision 1.3  2009/06/12 15:00:40  soleilarc
+// Api: new architecture
+//
+// Revision 1.1  2008/02/28 15:37:15  pierrejoseph
+// TdbExtractor has been forgotten
+//
+// Revision 1.5  2007/03/05 16:25:20  ounsy
+// non-static DataBase
+//
+// Revision 1.4  2007/02/01 13:50:18  pierrejoseph
+// ArchivingConfigureWithoutArchiverListInit instead of ArchivingConfigure
+//
+// Revision 1.3  2005/11/29 17:32:48  chinkumo
+// no message
+//
+// Revision 1.2.10.2  2005/11/29 16:13:31  chinkumo
+// Code reformated (pogo compatible)
+//
+// Revision 1.2.10.1  2005/11/15 13:45:16  chinkumo
+// ...
+//
+// Revision 1.2  2005/06/14 10:43:12  chinkumo
+// Branch (tdbExtractor_1_0_1-branch_0)  and HEAD merged.
+//
+// Revision 1.1.4.1  2005/06/13 13:28:02  chinkumo
+// Changes made to improve the management of exceptions were reported here.
+//
+// Revision 1.1  2005/02/01 12:39:40  chinkumo
+// This class replaces the TdbProxy class.
+//
+//
+// copyleft :	Synchrotron SOLEIL
+//					L'Orme des Merisiers
+//					Saint-Aubin - BP 48
+//					91192 GIF-sur-YVETTE CEDEX
+//
+//-======================================================================
+package TdbExtractor.Proxy;
+
+import fr.soleil.database.connection.DataBaseParameters;
+import org.tango.utils.DevFailedUtils;
+
+import fr.esrf.Tango.DevFailed;
+import fr.soleil.archiving.common.api.ConnectionFactory;
+import fr.soleil.archiving.common.api.exception.ArchivingException;
+import fr.soleil.archiving.hdbtdb.api.ConfigConst;
+import fr.soleil.archiving.hdbtdb.api.DataBaseManager;
+import fr.soleil.archiving.hdbtdb.api.manager.ArchivingManagerApiRefFactory;
+import fr.soleil.archiving.hdbtdb.api.manager.IArchivingManagerApiRef;
+
+public class DbProxy {
+    private IArchivingManagerApiRef manager;
+
+    public DbProxy(DataBaseParameters params) throws ArchivingException {
+            manager = ArchivingManagerApiRefFactory.getInstance(false, ConnectionFactory.connect(params));
+            manager.archivingConfigureWithoutArchiverListInit();
+    }
+
+    public boolean is_db_connected() {
+        return manager.isDbConnected();
+    }
+
+    public DataBaseManager getDataBase() {
+        return manager.getDataBase();
+    }
+
+    public IArchivingManagerApiRef getManager() {
+        return manager;
+    }
+}
diff --git a/src/main/java/TdbExtractor/RemoveDynamicAttributeClass.java b/tdbextractor/src/main/java/TdbExtractor/RemoveDynamicAttributeClass.java
similarity index 94%
rename from src/main/java/TdbExtractor/RemoveDynamicAttributeClass.java
rename to tdbextractor/src/main/java/TdbExtractor/RemoveDynamicAttributeClass.java
index 857416348e5672566801cf0da3006bc7e34d11b9..8285958494549b28d32028029bf1e534ea47a1f1 100644
--- a/src/main/java/TdbExtractor/RemoveDynamicAttributeClass.java
+++ b/tdbextractor/src/main/java/TdbExtractor/RemoveDynamicAttributeClass.java
@@ -1,157 +1,157 @@
-//+======================================================================
-// $Source$
-//
-// Project:      Tango Device Server
-//
-// Description:  Java source code for the command TemplateClass of the
-//               TdbExtractor class.
-//
-// $Author$
-//
-// $Revision$
-//
-// $Log$
-// Revision 1.2  2009/12/17 12:47:15  pierrejoseph
-// CheckStyle:  Organize imports / Format
-//
-// Revision 1.1  2008/02/28 15:37:15  pierrejoseph
-// TdbExtractor has been forgotten
-//
-// Revision 1.3  2005/11/29 16:13:31  chinkumo
-// Code reformated (pogo compatible)
-//
-// Revision 1.2  2005/11/15 13:45:16  chinkumo
-// ...
-//
-// Revision 1.1  2005/09/09 10:03:41  chinkumo
-// First commit !
-// (Dynamic attribut release)
-//
-//
-// copyleft :    European Synchrotron Radiation Facility
-//               BP 220, Grenoble 38043
-//               FRANCE
-//
-//-======================================================================
-//
-//  		This file is generated by POGO
-//	(Program Obviously used to Generate tango Object)
-//
-//         (c) - Software Engineering Group - ESRF
-//=============================================================================
-
-/**
- * @author	$Author$
- * @version	$Revision$
- */
-package TdbExtractor;
-
-import org.omg.CORBA.Any;
-
-import fr.esrf.Tango.DevFailed;
-import fr.esrf.Tango.DispLevel;
-import fr.esrf.TangoDs.Command;
-import fr.esrf.TangoDs.DeviceImpl;
-import fr.esrf.TangoDs.TangoConst;
-import fr.esrf.TangoDs.Util;
-
-/**
- * Class Description: Remove the dynamic attribute.
- */
-
-public class RemoveDynamicAttributeClass extends Command implements TangoConst {
-    // ===============================================================
-    /**
-     * Constructor for Command class RemoveDynamicAttributeClass
-     * 
-     * @param name
-     *            command name
-     * @param in
-     *            argin type
-     * @param out
-     *            argout type
-     */
-    // ===============================================================
-    public RemoveDynamicAttributeClass(final String name, final int in, final int out) {
-	super(name, in, out);
-    }
-
-    // ===============================================================
-    /**
-     * Constructor for Command class RemoveDynamicAttributeClass
-     * 
-     * @param name
-     *            command name
-     * @param in
-     *            argin type
-     * @param in_comments
-     *            argin description
-     * @param out
-     *            argout type
-     * @param out_comments
-     *            argout description
-     */
-    // ===============================================================
-    public RemoveDynamicAttributeClass(final String name, final int in, final int out,
-	    final String in_comments, final String out_comments) {
-	super(name, in, out, in_comments, out_comments);
-    }
-
-    // ===============================================================
-    /**
-     * Constructor for Command class RemoveDynamicAttributeClass
-     * 
-     * @param name
-     *            command name
-     * @param in
-     *            argin type
-     * @param in_comments
-     *            argin description
-     * @param out
-     *            argout type
-     * @param out_comments
-     *            argout description
-     * @param level
-     *            The command display type OPERATOR or EXPERT
-     */
-    // ===============================================================
-    public RemoveDynamicAttributeClass(final String name, final int in, final int out,
-	    final String in_comments, final String out_comments, final DispLevel level) {
-	super(name, in, out, in_comments, out_comments, level);
-    }
-
-    // ===============================================================
-    /**
-     * return the result of the device's command.
-     */
-    // ===============================================================
-    @Override
-    public Any execute(final DeviceImpl device, final Any in_any) throws DevFailed {
-	Util.out2.println("RemoveDynamicAttributeClass.execute(): arrived");
-	final String argin = extract_DevString(in_any);
-	if (device instanceof TdbExtractor) {
-	    ((TdbExtractor) device).remove_dynamic_attribute(argin);
-	}
-	return insert();
-    }
-
-    // ===============================================================
-    /**
-     * Check if it is allowed to execute the command.
-     */
-    // ===============================================================
-    @Override
-    public boolean is_allowed(final DeviceImpl device, final Any data_in) {
-	// End of Generated Code
-
-	// Re-Start of Generated Code
-	return true;
-    }
-}
-
-// -----------------------------------------------------------------------------
-/*
- * end of $Source:
- * /cvsroot/tango-cs/archiving/server/hdbtdbArchivingServers/src/
- * main/java/TdbExtractor/RemoveDynamicAttributeClass.java,v $
- */
+//+======================================================================
+// $Source$
+//
+// Project:      Tango Device Server
+//
+// Description:  Java source code for the command TemplateClass of the
+//               TdbExtractor class.
+//
+// $Author: abeilleg $
+//
+// $Revision: 15279 $
+//
+// $Log$
+// Revision 1.2  2009/12/17 12:47:15  pierrejoseph
+// CheckStyle:  Organize imports / Format
+//
+// Revision 1.1  2008/02/28 15:37:15  pierrejoseph
+// TdbExtractor has been forgotten
+//
+// Revision 1.3  2005/11/29 16:13:31  chinkumo
+// Code reformated (pogo compatible)
+//
+// Revision 1.2  2005/11/15 13:45:16  chinkumo
+// ...
+//
+// Revision 1.1  2005/09/09 10:03:41  chinkumo
+// First commit !
+// (Dynamic attribut release)
+//
+//
+// copyleft :    European Synchrotron Radiation Facility
+//               BP 220, Grenoble 38043
+//               FRANCE
+//
+//-======================================================================
+//
+//  		This file is generated by POGO
+//	(Program Obviously used to Generate tango Object)
+//
+//         (c) - Software Engineering Group - ESRF
+//=============================================================================
+
+/**
+ * @author	$Author: abeilleg $
+ * @version	$Revision: 15279 $
+ */
+package TdbExtractor;
+
+import org.omg.CORBA.Any;
+
+import fr.esrf.Tango.DevFailed;
+import fr.esrf.Tango.DispLevel;
+import fr.esrf.TangoDs.Command;
+import fr.esrf.TangoDs.DeviceImpl;
+import fr.esrf.TangoDs.TangoConst;
+import fr.esrf.TangoDs.Util;
+
+/**
+ * Class Description: Remove the dynamic attribute.
+ */
+
+public class RemoveDynamicAttributeClass extends Command implements TangoConst {
+    // ===============================================================
+    /**
+     * Constructor for Command class RemoveDynamicAttributeClass
+     * 
+     * @param name
+     *            command name
+     * @param in
+     *            argin type
+     * @param out
+     *            argout type
+     */
+    // ===============================================================
+    public RemoveDynamicAttributeClass(final String name, final int in, final int out) {
+	super(name, in, out);
+    }
+
+    // ===============================================================
+    /**
+     * Constructor for Command class RemoveDynamicAttributeClass
+     * 
+     * @param name
+     *            command name
+     * @param in
+     *            argin type
+     * @param in_comments
+     *            argin description
+     * @param out
+     *            argout type
+     * @param out_comments
+     *            argout description
+     */
+    // ===============================================================
+    public RemoveDynamicAttributeClass(final String name, final int in, final int out,
+	    final String in_comments, final String out_comments) {
+	super(name, in, out, in_comments, out_comments);
+    }
+
+    // ===============================================================
+    /**
+     * Constructor for Command class RemoveDynamicAttributeClass
+     * 
+     * @param name
+     *            command name
+     * @param in
+     *            argin type
+     * @param in_comments
+     *            argin description
+     * @param out
+     *            argout type
+     * @param out_comments
+     *            argout description
+     * @param level
+     *            The command display type OPERATOR or EXPERT
+     */
+    // ===============================================================
+    public RemoveDynamicAttributeClass(final String name, final int in, final int out,
+	    final String in_comments, final String out_comments, final DispLevel level) {
+	super(name, in, out, in_comments, out_comments, level);
+    }
+
+    // ===============================================================
+    /**
+     * return the result of the device's command.
+     */
+    // ===============================================================
+    @Override
+    public Any execute(final DeviceImpl device, final Any in_any) throws DevFailed {
+	Util.out2.println("RemoveDynamicAttributeClass.execute(): arrived");
+	final String argin = extract_DevString(in_any);
+	if (device instanceof TdbExtractor) {
+	    ((TdbExtractor) device).remove_dynamic_attribute(argin);
+	}
+	return insert();
+    }
+
+    // ===============================================================
+    /**
+     * Check if it is allowed to execute the command.
+     */
+    // ===============================================================
+    @Override
+    public boolean is_allowed(final DeviceImpl device, final Any data_in) {
+	// End of Generated Code
+
+	// Re-Start of Generated Code
+	return true;
+    }
+}
+
+// -----------------------------------------------------------------------------
+/*
+ * end of $Source:
+ * /cvsroot/tango-cs/archiving/server/hdbtdbArchivingServers/src/
+ * main/java/TdbExtractor/RemoveDynamicAttributeClass.java,v $
+ */
diff --git a/src/main/java/TdbExtractor/RemoveDynamicAttributesClass.java b/tdbextractor/src/main/java/TdbExtractor/RemoveDynamicAttributesClass.java
similarity index 94%
rename from src/main/java/TdbExtractor/RemoveDynamicAttributesClass.java
rename to tdbextractor/src/main/java/TdbExtractor/RemoveDynamicAttributesClass.java
index d3489c41c51b50316b9608138acdac7571e8326e..4ace542d3879c2b849c3d71513ab762d2e5a4f99 100644
--- a/src/main/java/TdbExtractor/RemoveDynamicAttributesClass.java
+++ b/tdbextractor/src/main/java/TdbExtractor/RemoveDynamicAttributesClass.java
@@ -1,159 +1,159 @@
-//+======================================================================
-// $Source$
-//
-// Project:      Tango Device Server
-//
-// Description:  Java source code for the command TemplateClass of the
-//               TdbExtractor class.
-//
-// $Author$
-//
-// $Revision$
-//
-// $Log$
-// Revision 1.2  2009/12/17 12:47:15  pierrejoseph
-// CheckStyle:  Organize imports / Format
-//
-// Revision 1.1  2008/02/28 15:37:15  pierrejoseph
-// TdbExtractor has been forgotten
-//
-// Revision 1.1  2007/03/01 10:07:21  ounsy
-// creation
-//
-// Revision 1.3  2005/11/29 16:13:31  chinkumo
-// Code reformated (pogo compatible)
-//
-// Revision 1.2  2005/11/15 13:45:16  chinkumo
-// ...
-//
-// Revision 1.1  2005/09/09 10:03:41  chinkumo
-// First commit !
-// (Dynamic attribut release)
-//
-//
-// copyleft :    European Synchrotron Radiation Facility
-//               BP 220, Grenoble 38043
-//               FRANCE
-//
-//-======================================================================
-//
-//          This file is generated by POGO
-//  (Program Obviously used to Generate tango Object)
-//
-//         (c) - Software Engineering Group - ESRF
-//=============================================================================
-
-/**
- * @author  $Author$
- * @version $Revision$
- */
-package TdbExtractor;
-
-import org.omg.CORBA.Any;
-
-import fr.esrf.Tango.DevFailed;
-import fr.esrf.Tango.DispLevel;
-import fr.esrf.TangoDs.Command;
-import fr.esrf.TangoDs.DeviceImpl;
-import fr.esrf.TangoDs.TangoConst;
-import fr.esrf.TangoDs.Util;
-
-/**
- * Class Description: Remove the dynamic attribute.
- */
-
-public class RemoveDynamicAttributesClass extends Command implements TangoConst {
-    // ===============================================================
-    /**
-     * Constructor for Command class RemoveDynamicAttributeClass
-     * 
-     * @param name
-     *            command name
-     * @param in
-     *            argin type
-     * @param out
-     *            argout type
-     */
-    // ===============================================================
-    public RemoveDynamicAttributesClass(final String name, final int in, final int out) {
-	super(name, in, out);
-    }
-
-    // ===============================================================
-    /**
-     * Constructor for Command class RemoveDynamicAttributeClass
-     * 
-     * @param name
-     *            command name
-     * @param in
-     *            argin type
-     * @param in_comments
-     *            argin description
-     * @param out
-     *            argout type
-     * @param out_comments
-     *            argout description
-     */
-    // ===============================================================
-    public RemoveDynamicAttributesClass(final String name, final int in, final int out,
-	    final String in_comments, final String out_comments) {
-	super(name, in, out, in_comments, out_comments);
-    }
-
-    // ===============================================================
-    /**
-     * Constructor for Command class RemoveDynamicAttributeClass
-     * 
-     * @param name
-     *            command name
-     * @param in
-     *            argin type
-     * @param in_comments
-     *            argin description
-     * @param out
-     *            argout type
-     * @param out_comments
-     *            argout description
-     * @param level
-     *            The command display type OPERATOR or EXPERT
-     */
-    // ===============================================================
-    public RemoveDynamicAttributesClass(final String name, final int in, final int out,
-	    final String in_comments, final String out_comments, final DispLevel level) {
-	super(name, in, out, in_comments, out_comments, level);
-    }
-
-    // ===============================================================
-    /**
-     * return the result of the device's command.
-     */
-    // ===============================================================
-    @Override
-    public Any execute(final DeviceImpl device, final Any in_any) throws DevFailed {
-	Util.out2.println("RemoveDynamicAttributesClass.execute(): arrived");
-	if (device instanceof TdbExtractor) {
-	    ((TdbExtractor) device).remove_dynamic_attributes();
-	}
-	return insert();
-    }
-
-    // ===============================================================
-    /**
-     * Check if it is allowed to execute the command.
-     */
-    // ===============================================================
-    @Override
-    public boolean is_allowed(final DeviceImpl device, final Any data_in) {
-	// End of Generated Code
-
-	// Re-Start of Generated Code
-	return true;
-    }
-}
-
-// -----------------------------------------------------------------------------
-/*
- * end of $Source:
- * /cvsroot/tango-cs/archiving/server/hdbtdbArchivingServers/src/
- * main/java/TdbExtractor/RemoveDynamicAttributesClass.java,v $
- */
+//+======================================================================
+// $Source$
+//
+// Project:      Tango Device Server
+//
+// Description:  Java source code for the command TemplateClass of the
+//               TdbExtractor class.
+//
+// $Author: abeilleg $
+//
+// $Revision: 15279 $
+//
+// $Log$
+// Revision 1.2  2009/12/17 12:47:15  pierrejoseph
+// CheckStyle:  Organize imports / Format
+//
+// Revision 1.1  2008/02/28 15:37:15  pierrejoseph
+// TdbExtractor has been forgotten
+//
+// Revision 1.1  2007/03/01 10:07:21  ounsy
+// creation
+//
+// Revision 1.3  2005/11/29 16:13:31  chinkumo
+// Code reformated (pogo compatible)
+//
+// Revision 1.2  2005/11/15 13:45:16  chinkumo
+// ...
+//
+// Revision 1.1  2005/09/09 10:03:41  chinkumo
+// First commit !
+// (Dynamic attribut release)
+//
+//
+// copyleft :    European Synchrotron Radiation Facility
+//               BP 220, Grenoble 38043
+//               FRANCE
+//
+//-======================================================================
+//
+//          This file is generated by POGO
+//  (Program Obviously used to Generate tango Object)
+//
+//         (c) - Software Engineering Group - ESRF
+//=============================================================================
+
+/**
+ * @author  $Author: abeilleg $
+ * @version $Revision: 15279 $
+ */
+package TdbExtractor;
+
+import org.omg.CORBA.Any;
+
+import fr.esrf.Tango.DevFailed;
+import fr.esrf.Tango.DispLevel;
+import fr.esrf.TangoDs.Command;
+import fr.esrf.TangoDs.DeviceImpl;
+import fr.esrf.TangoDs.TangoConst;
+import fr.esrf.TangoDs.Util;
+
+/**
+ * Class Description: Remove the dynamic attribute.
+ */
+
+public class RemoveDynamicAttributesClass extends Command implements TangoConst {
+    // ===============================================================
+    /**
+     * Constructor for Command class RemoveDynamicAttributeClass
+     * 
+     * @param name
+     *            command name
+     * @param in
+     *            argin type
+     * @param out
+     *            argout type
+     */
+    // ===============================================================
+    public RemoveDynamicAttributesClass(final String name, final int in, final int out) {
+	super(name, in, out);
+    }
+
+    // ===============================================================
+    /**
+     * Constructor for Command class RemoveDynamicAttributeClass
+     * 
+     * @param name
+     *            command name
+     * @param in
+     *            argin type
+     * @param in_comments
+     *            argin description
+     * @param out
+     *            argout type
+     * @param out_comments
+     *            argout description
+     */
+    // ===============================================================
+    public RemoveDynamicAttributesClass(final String name, final int in, final int out,
+	    final String in_comments, final String out_comments) {
+	super(name, in, out, in_comments, out_comments);
+    }
+
+    // ===============================================================
+    /**
+     * Constructor for Command class RemoveDynamicAttributeClass
+     * 
+     * @param name
+     *            command name
+     * @param in
+     *            argin type
+     * @param in_comments
+     *            argin description
+     * @param out
+     *            argout type
+     * @param out_comments
+     *            argout description
+     * @param level
+     *            The command display type OPERATOR or EXPERT
+     */
+    // ===============================================================
+    public RemoveDynamicAttributesClass(final String name, final int in, final int out,
+	    final String in_comments, final String out_comments, final DispLevel level) {
+	super(name, in, out, in_comments, out_comments, level);
+    }
+
+    // ===============================================================
+    /**
+     * return the result of the device's command.
+     */
+    // ===============================================================
+    @Override
+    public Any execute(final DeviceImpl device, final Any in_any) throws DevFailed {
+	Util.out2.println("RemoveDynamicAttributesClass.execute(): arrived");
+	if (device instanceof TdbExtractor) {
+	    ((TdbExtractor) device).remove_dynamic_attributes();
+	}
+	return insert();
+    }
+
+    // ===============================================================
+    /**
+     * Check if it is allowed to execute the command.
+     */
+    // ===============================================================
+    @Override
+    public boolean is_allowed(final DeviceImpl device, final Any data_in) {
+	// End of Generated Code
+
+	// Re-Start of Generated Code
+	return true;
+    }
+}
+
+// -----------------------------------------------------------------------------
+/*
+ * end of $Source:
+ * /cvsroot/tango-cs/archiving/server/hdbtdbArchivingServers/src/
+ * main/java/TdbExtractor/RemoveDynamicAttributesClass.java,v $
+ */
diff --git a/src/main/java/TdbExtractor/TdbExtractor.java b/tdbextractor/src/main/java/TdbExtractor/TdbExtractor.java
similarity index 97%
rename from src/main/java/TdbExtractor/TdbExtractor.java
rename to tdbextractor/src/main/java/TdbExtractor/TdbExtractor.java
index 98802e51b8292a98566c15c0e212035680b543c0..fd9a84f61cfcb8e51fe8df740eed2e6d77dffb37 100644
--- a/src/main/java/TdbExtractor/TdbExtractor.java
+++ b/tdbextractor/src/main/java/TdbExtractor/TdbExtractor.java
@@ -1,2654 +1,2652 @@
-// +============================================================================
-// $Source:
-// /cvsroot/tango-cs/archiving/server/hdbtdbArchivingServers/src/main/java/TdbExtractor/TdbExtractor.java,v
-// $
-//
-// project : Tango Device Server
-//
-// Description: java source code for the TdbExtractor class and its commands.
-// This class is derived from DeviceImpl class.
-// It represents the CORBA servant obbject which
-// will be accessed from the network. All commands which
-// can be executed on the TdbExtractor are implemented
-// in this file.
-//
-// $Author$
-//
-// $Revision$
-//
-// $Log$
-// Revision 1.16  2010/11/19 16:17:40  abeilleg
-// remove critical of findbugs
-//
-// Revision 1.15  2010/08/17 09:50:10  pierrejoseph
-// correction in the getArchivingMode
-//
-// Revision 1.14  2010/08/04 07:28:22  pierrejoseph
-// delete_device method addition - must be implemented
-//
-// Revision 1.13  2010/08/03 11:55:59  pierrejoseph
-// Remove not useful traces
-//
-// Revision 1.12  2010/01/21 14:56:42  extia-soleil
-// AW (Extia) - Mantis 14438:
-// - Added commands to get the full name of an attribute from its id, in HDB and TDB
-//
-// Revision 1.11 2009/12/17 12:47:15 pierrejoseph
-// CheckStyle: Organize imports / Format
-//
-// Revision 1.10 2009/09/04 13:13:49 soleilarc
-// fix java 6 bug: remove singleton from constructor
-//
-// Revision 1.9 2009/08/10 14:04:43 soleilarc
-// Oracle RAC connection
-//
-// Revision 1.8 2009/06/12 15:00:40 soleilarc
-// Api: new architecture
-//
-// Revision 1.6 2008/08/01 13:16:22 soleilarc
-// Bug: 9378: Extract data from file when the needed respecting the export
-// period and the extract precision value.
-//
-// Revision 1.5 2008/07/11 07:49:12 soleilarc
-// Solve Bug n�8827: remove Corba exception when getting data between an invalid
-// dates.
-//
-// Revision 1.4 2008/05/07 16:37:39 pierrejoseph
-// The tango state type is transformed in string type before the dynamic
-// attribut creation because the state type.
-//
-// Revision 1.3 2008/04/08 11:34:58 pierrejoseph
-// G�n�ration automatique de la version des devices.
-//
-// Revision 1.2 2008/03/21 16:46:16 pierrejoseph
-// minor change
-//
-// Revision 1.1 2008/02/28 15:37:15 pierrejoseph
-// TdbExtractor has been forgotten
-//
-// Revision 1.28 2007/05/11 13:58:54 pierrejoseph
-// Attribute addition : release version
-//
-// Revision 1.27 2007/03/16 14:09:35 ounsy
-// minor changes
-//
-// Revision 1.26 2007/03/16 08:44:14 ounsy
-// added a GetMinTime command
-//
-// Revision 1.25 2007/03/05 16:25:20 ounsy
-// non-static DataBase
-//
-// Revision 1.24 2007/03/02 08:46:02 ounsy
-// added the GetMaxTime command
-//
-// Revision 1.23 2007/03/01 10:08:01 ounsy
-// added the RemoveDynamicAttributes command
-//
-// Revision 1.22 2007/02/26 16:14:24 ounsy
-// archiving devices now inherits just from DeviceImpl instead of
-// DeviceImplWithShutdownRunnable (they're nonlonger unexported onn shutdown)
-//
-// Revision 1.21 2007/02/08 08:44:15 pierrejoseph
-// The method getAttData is no more available (costly).
-//
-// Revision 1.20 2007/02/05 17:04:52 ounsy
-// corrected a bug for spectrum attributes with an empty value
-//
-// Revision 1.19 2006/12/06 10:17:06 ounsy
-// minor changes
-//
-// Revision 1.18 2006/11/30 15:30:15 ounsy
-// corrected a bug in add_attribute() when the extracted DbData is empty; the
-// dynamic attribute is no longer created, and a DevFailed is recieved instead
-//
-// Revision 1.17 2006/11/20 09:24:49 ounsy
-// minor changes
-//
-// Revision 1.16 2006/11/13 15:57:37 ounsy
-// all java devices now inherit from UnexportOnShutdownDeviceImpl instead of
-// from DeviceImpl
-//
-// Revision 1.15 2006/10/31 16:54:12 ounsy
-// milliseconds and null values management
-//
-// Revision 1.14 2006/10/09 12:56:28 chinkumo
-// A specific exception is raised when an outOfMemory error appeared, for the
-// methods who generate dynamics attributes.
-//
-// Revision 1.13 2006/09/07 13:48:30 ounsy
-// added extraction with sampling methods
-//
-// Revision 1.12 2006/09/05 12:25:16 ounsy
-// updated for sampling compatibility
-//
-// Revision 1.11 2006/07/24 09:55:22 ounsy
-// now uses buffered attribute ids
-//
-// Revision 1.10 2006/02/15 13:11:44 ounsy
-// organized imports
-//
-// Revision 1.9 2006/02/07 11:57:49 ounsy
-// small changes in logs
-//
-// Revision 1.8 2006/01/27 13:07:20 ounsy
-// organised imports
-//
-// Revision 1.7 2005/11/29 17:32:48 chinkumo
-// no message
-//
-// Revision 1.6.10.4 2005/11/29 16:13:31 chinkumo
-// Code reformated (pogo compatible)
-//
-// Revision 1.6.10.3 2005/11/15 13:45:16 chinkumo
-// ...
-//
-// Revision 1.6.10.2 2005/09/26 07:58:42 chinkumo
-// Every commands of shape 'getAttDataXXXXCount(...)' was changed. The type of
-// their returned object was changed from 'short' to 'long'.
-//
-// Revision 1.6.10.1 2005/09/09 10:37:47 chinkumo
-// Since the extraction politic changed to 'dynamic attributes', the device was
-// pogo-regenerated.
-//
-//
-// copyleft : European Synchrotron Radiation Facility
-// BP 220, Grenoble 38043
-// FRANCE
-//
-// -============================================================================
-//
-// This file is generated by POGO
-// (Program Obviously used to Generate tango Object)
-//
-// (c) - Software Engineering Group - ESRF
-// =============================================================================
-
-package TdbExtractor;
-
-import java.lang.reflect.Array;
-import java.sql.Timestamp;
-import java.util.StringTokenizer;
-
-import org.omg.CORBA.SystemException;
-import org.omg.CORBA.UserException;
-import org.tango.utils.DevFailedUtils;
-
-import TdbExtractor.Proxy.DbProxy;
-import fr.esrf.Tango.AttrDataFormat;
-import fr.esrf.Tango.AttrWriteType;
-import fr.esrf.Tango.DevError;
-import fr.esrf.Tango.DevFailed;
-import fr.esrf.Tango.DevState;
-import fr.esrf.Tango.DevVarDoubleStringArray;
-import fr.esrf.Tango.DevVarLongStringArray;
-import fr.esrf.Tango.ErrSeverity;
-import fr.esrf.TangoApi.DbDevice;
-import fr.esrf.TangoDs.Attr;
-import fr.esrf.TangoDs.Attribute;
-import fr.esrf.TangoDs.DeviceClass;
-import fr.esrf.TangoDs.DeviceImpl;
-import fr.esrf.TangoDs.Except;
-import fr.esrf.TangoDs.ImageAttr;
-import fr.esrf.TangoDs.SpectrumAttr;
-import fr.esrf.TangoDs.TangoConst;
-import fr.esrf.TangoDs.Util;
-import fr.soleil.archiving.common.api.exception.ArchivingException;
-import fr.soleil.archiving.common.api.tools.DbData;
-import fr.soleil.archiving.common.api.tools.NullableTimedData;
-import fr.soleil.archiving.hdbtdb.api.DataBaseManager;
-import fr.soleil.archiving.hdbtdb.api.HdbTdbConnectionParameters;
-import fr.soleil.archiving.hdbtdb.api.TDBDataBaseManager;
-import fr.soleil.archiving.hdbtdb.api.management.attributes.adtapt.IAdtAptAttributes;
-import fr.soleil.archiving.hdbtdb.api.tools.SamplingType;
-import fr.soleil.archiving.hdbtdb.api.tools.mode.Mode;
-import fr.soleil.archiving.hdbtdb.api.utils.database.DbUtils;
-
-/**
- * Class Description: A DServer used for temporary database's extractions.
- * 
- * @author $Author$
- * @version $Revision$
- */
-
-// --------- Start of States Description ----------
-/*
- * Device States Description:
- */
-// --------- End of States Description ----------
-
-public class TdbExtractor extends DeviceImpl
-/* WithShutdownRunnable */implements TangoConst {
-
-    // private int state;
-    private DbProxy dbProxy;
-    private final String m_version;
-
-    protected int id = 0;
-
-    public static final String HintOnMemoryError = "Hint: suppress some dynamics attributs before executing this command.";
-
-    // --------------------------------------
-
-    // =========================================================
-    /**
-     * Constructor for simulated Time Device Server.
-     * 
-     * @param cl
-     *            The DeviceClass object
-     * @param s
-     *            The Device name.
-     * @param version
-     *            The device version
-     */
-    // =========================================================
-    public TdbExtractor(final DeviceClass cl, final String s, final String version) throws DevFailed {
-        super(cl, s);
-        m_version = version;
-        init_device();
-    }
-
-    // =========================================================
-    /**
-     * Constructor for simulated Time Device Server.
-     * 
-     * @param cl
-     *            The DeviceClass object
-     * @param s
-     *            The Device name.
-     * @param d
-     *            Device description.
-     * @param version
-     *            The device version
-     */
-    // =========================================================
-    public TdbExtractor(final DeviceClass cl, final String s, final String d, final String version) throws DevFailed {
-        super(cl, s, d);
-        m_version = version;
-        init_device();
-    }
-
-    // =========================================================
-    /**
-     * Initialize the device.
-     */
-    // =========================================================
-    @Override
-    public void init_device() {
-        System.out.println("TdbExtractor() create " + device_name);
-        // Initialise variables to default values
-        // -------------------------------------------
-        connectDatabase();
-        get_logger().info("Exiting init_device()");
-    }
-
-    protected void connectDatabase() {
-        DbDevice device = get_db_device();
-        try {
-            HdbTdbConnectionParameters.performTDBInit(device, true, true);
-            String dbHost = HdbTdbConnectionParameters.getTDbHost();
-            String dbName = HdbTdbConnectionParameters.getTDbName();
-            String dbSchema = HdbTdbConnectionParameters.getTDbSchema();
-            String dbUser = HdbTdbConnectionParameters.getTDBUser();
-            String dbPassword = HdbTdbConnectionParameters.getTDBPassword();
-            boolean isRac = HdbTdbConnectionParameters.isTDBRac();
-            HdbTdbConnectionParameters.printTDBConnectionInfoLog();
-            dbProxy = new DbProxy(dbHost, dbName, dbSchema, dbUser, dbPassword, isRac);
-        } catch (ArchivingException e) {
-            e.printStackTrace();
-        }
-        if ((dbProxy == null) || (!dbProxy.is_db_connected())) {
-            set_state(DevState.FAULT);
-            set_status(device_name + " : DevState.FAULT" + "\r\n" + "Temporary database connection : " + "FAULT"
-                    + " (may be broken...)" + "\r\n");
-            get_logger().error("ERROR : Database unconnected !!");
-        } else {
-            set_state(DevState.ON);
-            set_status(device_name + " : " + "DevState.ON" + "\r\n" + "Temporary database connection : " + "OK"
-                    + "\r\n");
-        }
-    }
-
-    private synchronized void reconnectDatabaseIfNecessary() {
-        if (dbProxy == null) {
-            connectDatabase();
-        }
-    }
-
-    // =========================================================
-    /**
-     * Method always executed before command execution.
-     */
-    // =========================================================
-    @Override
-    public void always_executed_hook() {
-        // get_logger().info("In always_executed_hook method()");
-    }
-
-    // =========================================================
-    /**
-     * Execute command "GetInfo" on device. Returns misc informations about the
-     * database and a set of parameters characterizing the connection.
-     * 
-     * @return The informations that characterize the database
-     */
-    // =========================================================
-    public String get_info() throws DevFailed {
-        get_logger().info("Entering get_info()");
-        reconnectDatabaseIfNecessary();
-        String argout;
-        if (dbProxy == null) {
-            argout = "";
-        } else {
-            // ---Add your Own code to control device here ---
-            argout = dbProxy.getDataBase().getConnectionInfo();
-            get_logger().info("Exiting get_info()");
-        }
-        return argout;
-    }
-
-    // =========================================================
-    /**
-     * Execute command "GetHost" on device. Returns the connected database host
-     * identifier.
-     * 
-     * @return The connected database host identifier.
-     * @throws DevFailed
-     */
-    // =========================================================
-    public String get_host() throws DevFailed {
-        get_logger().info("Entering get_host()");
-        reconnectDatabaseIfNecessary();
-        // ---Add your Own code to control device here ---
-        String argout = dbProxy == null ? "" : dbProxy.getDataBase().getHost();
-        get_logger().info("Exiting get_host()");
-        return argout;
-    }
-
-    // =========================================================
-    /**
-     * Execute command "GetUser" on device. Gets the current user's name used
-     * for the connection.
-     * 
-     * @return The current user's name used for the connection.
-     * @throws DevFailed
-     */
-    // =========================================================
-    public String get_user() throws DevFailed {
-        get_logger().info("Entering get_user()");
-        reconnectDatabaseIfNecessary();
-        // ---Add your Own code to control device here ---
-        final String argout = dbProxy == null ? "" : dbProxy.getDataBase().getUser();
-        get_logger().info("Exiting get_user()");
-        return argout;
-    }
-
-    // =========================================================
-    /**
-     * Execute command "GetConnectionState" on device. Cheks if the connection
-     * to the temporary database is alive.
-     * 
-     * @return The connection state
-     */
-    // =========================================================
-    public boolean get_connection_state() throws DevFailed {
-        reconnectDatabaseIfNecessary();
-        get_logger().info("Entering get_connection_state()");
-        boolean argout = false;
-        if (dbProxy != null) {
-            // ---Add your Own code to control device here ---
-            try {
-                argout = dbProxy.getDataBase().isConnected();
-            } catch (final ArchivingException e) {
-                get_logger().error("Error during get_connection_state()", e);
-                e.printStackTrace();
-            }
-        }
-        get_logger().info("Exiting get_connection_state()");
-        return argout;
-    }
-
-    // =========================================================
-    /**
-     * Execute command "GetAttDefinitionData" on device. Returns an array
-     * containing the differents definition informations for the given
-     * attribute.
-     * 
-     * @param argin
-     *            The attribute's name
-     * @return Differents definition informations for the given attribute
-     */
-    // =========================================================
-    public String[] get_att_definition_data(final String argin) throws DevFailed {
-        get_logger().info("Entering get_att_definition_data()");
-        reconnectDatabaseIfNecessary();
-        String[] argout;
-        // ---Add your Own code to control device here ---
-        try {
-            argout = dbProxy == null ? new String[0] : DbUtils.toStringArray(dbProxy.getDataBase().getAttribute()
-                    .getAttDefinitionData(argin));
-        } catch (final ArchivingException e) {
-            throw e.toTangoException();
-        }
-        get_logger().info("Exiting get_att_definition_data()");
-        return argout;
-    }
-
-    // =========================================================
-    /**
-     * Execute command "GetAttPropertiesData" on device. Gets the differents
-     * properties informations for the given attribute
-     * 
-     * @param argin
-     *            The attribute's name
-     * @return An array containing the differents properties for the given
-     *         attribute
-     */
-    // =========================================================
-    public String[] get_att_properties_data(final String argin) throws DevFailed {
-        get_logger().info("Entering get_att_properties_data()");
-        reconnectDatabaseIfNecessary();
-        String[] argout;
-        if (dbProxy == null) {
-            argout = new String[0];
-        } else {
-            // ---Add your Own code to control device here ---
-            try {
-                IAdtAptAttributes adtAptAttributes = dbProxy.getDataBase().getAttribute();
-                argout = DbUtils.toStringArray(adtAptAttributes.getProperties().getAttPropertiesData(argin,
-                        adtAptAttributes.isCaseSentitiveDatabase()));
-            } catch (final ArchivingException e) {
-                throw e.toTangoException();
-            }
-        }
-        get_logger().info("Exiting get_att_properties_data()");
-        return argout;
-    }
-
-    // =========================================================
-    /**
-     * Execute command "GetAttFullName" on device. Gets for a specified
-     * attribute id its full name as defined in TDB
-     * 
-     * @param argin
-     *            The attribute's id
-     * @return The TDB's full name that characterize the given attribute
-     */
-    // =========================================================
-    public String get_att_full_name(final int argin) throws DevFailed {
-        get_logger().info("Entering get_att_full_name()");
-        reconnectDatabaseIfNecessary();
-        String argout;
-        // ---Add your Own code to control device here ---
-        try {
-            argout = dbProxy == null ? "" : dbProxy.getDataBase().getAttribute().getNames().getAttFullName(argin);
-        } catch (final ArchivingException e) {
-            throw e.toTangoException();
-        }
-        get_logger().info("Exiting get_att_full_name()");
-        return argout;
-    }
-
-    // =========================================================
-    /**
-     * Execute command "GetAttId" on device. Gets for a specified attribute its
-     * ID as defined in TDB
-     * 
-     * @param argin
-     *            The attribute's name
-     * @return The TDB's ID that characterize the given attribute
-     */
-    // =========================================================
-    public int get_att_id(final String argin) throws DevFailed {
-        get_logger().info("Entering get_att_id()");
-        reconnectDatabaseIfNecessary();
-        int argout;
-        if (dbProxy == null) {
-            argout = 0;
-        } else {
-            // ---Add your Own code to control device here ---
-            try {
-                IAdtAptAttributes adtAptAttributes = dbProxy.getDataBase().getAttribute();
-                // argout = ( short ) this.dbProxy.getDataBase().getAttID(argin);
-                argout = adtAptAttributes.getIds().getAttID(argin, adtAptAttributes.isCaseSentitiveDatabase());
-            } catch (final ArchivingException e) {
-                throw e.toTangoException();
-            }
-        }
-        get_logger().info("Exiting get_att_id()");
-        return argout;
-    }
-
-    // =========================================================
-    /**
-     * Execute command "GetAttNameAll" on device. Gets whole list of the
-     * attributes registered in TDB.
-     * 
-     * @return The whole list of the attributes registered in TDB.
-     */
-    // =========================================================
-    public String[] get_att_name_all() throws DevFailed {
-        get_logger().info("Entering get_att_name_all()");
-        reconnectDatabaseIfNecessary();
-        String[] argout;
-        // ---Add your Own code to control device here ---
-        try {
-            argout = dbProxy == null ? new String[0] : DbUtils.toStringArray(dbProxy.getDataBase().getAttribute()
-                    .getNames().getAttributes());
-        } catch (final ArchivingException e) {
-            throw e.toTangoException();
-        }
-        get_logger().info("Exiting get_att_name_all()");
-        return argout;
-    }
-
-    // =========================================================
-    /**
-     * Execute command "GetAttNameFacility" on device. Gets whole list of the
-     * attributes registered in TDB and that belong to the current facility.
-     * 
-     * @return The whole list of the attributes registered in TDB, and that
-     *         belong to the current facility.
-     */
-    // =========================================================
-    public String[] get_att_name_facility() throws DevFailed {
-        get_logger().info("Entering get_att_name_facility()");
-        reconnectDatabaseIfNecessary();
-        String[] argout;
-        // ---Add your Own code to control device here ---
-        try {
-            argout = dbProxy == null ? new String[0] : DbUtils.toStringArray(dbProxy.getDataBase().getAttribute()
-                    .getNames().getAttributes(System.getProperty("TANGO_HOST")));
-        } catch (final ArchivingException e) {
-            throw e.toTangoException();
-        }
-        get_logger().info("Exiting get_att_name_facility()");
-        return argout;
-    }
-
-    // =========================================================
-    /**
-     * Execute command "GetAttNameFilterFormat" on device. Gets the list of
-     * <I>TDB</I> registered attributes for the given format
-     * 
-     * @param argin
-     *            A format [0 -> scalar - 1 -> spectrum - 2 -> image]
-     * @return The filtered list of attributes registered in TDB. The filtering
-     *         is made according to the given format [0 -> scalar - 1 ->
-     *         spectrum - 2 -> image]
-     */
-    // =========================================================
-    public String[] get_att_name_filter_format(final short argin) throws DevFailed {
-        get_logger().info("Entering get_att_name_filter_format()");
-        reconnectDatabaseIfNecessary();
-        String[] argout;
-        // ---Add your Own code to control device here ---
-        try {
-            argout = dbProxy == null ? new String[0] : DbUtils.toStringArray(dbProxy.getDataBase().getAttribute()
-                    .getNames().getAttributesNamesF(argin));
-        } catch (final ArchivingException e) {
-            throw e.toTangoException();
-        }
-        get_logger().info("Exiting get_att_name_filter_format()");
-        return argout;
-    }
-
-    // =========================================================
-    /**
-     * Execute command "GetAttNameFilterType" on device. Gets the list of
-     * <I>TDB</I> registered attributes for the given type
-     * 
-     * @param argin
-     *            A type [2 -> Tango::DevShort | 3 -> Tango::DevLong | 5 ->
-     *            Tango::DevDouble and 8 -> Tango::DevString]
-     * @return The filtered list of attributes registered in TDB. The filtering
-     *         is made according to the given type [2 -> Tango::DevShort | 3 ->
-     *         Tango::DevLong | 5 -> Tango::DevDouble and 8 -> Tango::DevString]
-     */
-    // =========================================================
-    public String[] get_att_name_filter_type(final short argin) throws DevFailed {
-        get_logger().info("Entering get_att_name_filter_type()");
-        reconnectDatabaseIfNecessary();
-        String[] argout;
-        // ---Add your Own code to control device here ---
-        try {
-            argout = dbProxy == null ? new String[0] : DbUtils.toStringArray(dbProxy.getDataBase().getAttribute()
-                    .getNames().getAttributesNamesT(argin));
-        } catch (final ArchivingException e) {
-            throw e.toTangoException();
-        }
-        get_logger().info("Exiting get_att_name_filter_type()");
-        return argout;
-    }
-
-    // =========================================================
-    /**
-     * Execute command "GetAttCountAll" on device. Gets the total number of
-     * attributes defined in TDB.
-     * 
-     * @return The total number of attributes defined in TDB
-     */
-    // =========================================================
-    public int get_att_count_all() throws DevFailed {
-        get_logger().info("Entering get_att_count_all()");
-        reconnectDatabaseIfNecessary();
-        int argout;
-        // ---Add your Own code to control device here ---
-        try {
-            argout = dbProxy == null ? 0 : dbProxy.getDataBase().getAttribute().getNames().getAttributesCount();
-        } catch (final ArchivingException e) {
-            throw e.toTangoException();
-        }
-        get_logger().info("Exiting get_att_count_all()");
-        return argout;
-    }
-
-    // =========================================================
-    /**
-     * Execute command "GetAttCountFilterFormat" on device. Gets the total
-     * number of attributes defined in TDB with the given format.
-     * 
-     * @param argin
-     *            A format [0 -> scalar - 1 -> spectrum - 2 -> image]
-     * @return The total number of attributes defined in TDB with the given
-     *         format [0 -> scalar - 1 -> spectrum - 2 -> image]
-     */
-    // =========================================================
-    public int get_att_count_filter_format(final short argin) throws DevFailed {
-        get_logger().info("Entering get_att_count_filter_format()");
-        reconnectDatabaseIfNecessary();
-        int argout;
-        // ---Add your Own code to control device here ---
-        try {
-            argout = dbProxy == null ? 0 : dbProxy.getDataBase().getAttribute().getNames().getAttributesCountF(argin);
-        } catch (final ArchivingException e) {
-            throw e.toTangoException();
-        }
-        get_logger().info("Exiting get_att_count_filter_format()");
-        return argout;
-    }
-
-    // =========================================================
-    /**
-     * Execute command "GetAttCountFilterType" on device. Gets the total number
-     * of attributes defined in TDB with the given type.
-     * 
-     * @param argin
-     *            A type [2 -> Tango::DevShort | 3 -> Tango::DevLong | 5 ->
-     *            Tango::DevDouble and 8 -> Tango::DevString]
-     * @return The total number of attributes defined in TDB with the given type
-     *         [2 -> Tango::DevShort | 3 -> Tango::DevLong | 5 ->
-     *         Tango::DevDouble and 8 -> Tango::DevString]
-     */
-    // =========================================================
-    public int get_att_count_filter_type(final short argin) throws DevFailed {
-        get_logger().info("Entering get_att_count_filter_type()");
-        reconnectDatabaseIfNecessary();
-        int argout;
-        // ---Add your Own code to control device here ---
-        try {
-            argout = dbProxy == null ? 0 : dbProxy.getDataBase().getAttribute().getNames().getAttributesCountT(argin);
-        } catch (final ArchivingException e) {
-            throw e.toTangoException();
-        }
-        get_logger().info("Exiting get_att_count_filter_type()");
-        return argout;
-    }
-
-    // =========================================================
-    /**
-     * Execute command "GetDomains" on device. Gets all the registered domains.
-     * 
-     * @return The registered domains
-     */
-    // =========================================================
-    public String[] get_domains() throws DevFailed {
-        get_logger().info("Entering get_domains()");
-        reconnectDatabaseIfNecessary();
-        String[] argout;
-        // ---Add your Own code to control device here ---
-        try {
-            argout = dbProxy == null ? new String[0] : dbProxy.getDataBase().getAttribute().getDomains().getDomains();
-        } catch (final ArchivingException e) {
-            throw e.toTangoException();
-        }
-        get_logger().info("Exiting get_domains()");
-        return argout;
-    }
-
-    // =========================================================
-    /**
-     * Execute command "GetDomainsCount" on device. Returns the number of
-     * distinct registered domains.
-     * 
-     * @return The number of distinct registered domains.
-     */
-    // =========================================================
-    public int get_domains_count() throws DevFailed {
-        get_logger().info("Entering get_domains_count()");
-        reconnectDatabaseIfNecessary();
-        int argout;
-        // ---Add your Own code to control device here ---
-        try {
-            argout = dbProxy == null ? 0 : dbProxy.getDataBase().getAttribute().getDomains().getDomainsCount();
-        } catch (final ArchivingException e) {
-            throw e.toTangoException();
-        }
-        get_logger().info("Exiting get_domains_count()");
-        return argout;
-    }
-
-    // =========================================================
-    /**
-     * Execute command "GetFamilies" on device. Gets all the registered families
-     * 
-     * @return The registered families
-     */
-    // =========================================================
-    public String[] get_families() throws DevFailed {
-        get_logger().info("Entering get_families()");
-        reconnectDatabaseIfNecessary();
-        String[] argout;
-        // ---Add your Own code to control device here ---
-        try {
-            argout = dbProxy == null ? new String[0] : dbProxy.getDataBase().getAttribute().getFamilies().getFamilies();
-        } catch (final ArchivingException e) {
-            throw e.toTangoException();
-        }
-        get_logger().info("Exiting get_families()");
-        return argout;
-    }
-
-    // =========================================================
-    /**
-     * Execute command "GetFamiliesCount" on device. Returns the number of
-     * distinct registered families.
-     * 
-     * @return The number of distinct registered families.
-     */
-    // =========================================================
-    public int get_families_count() throws DevFailed {
-        get_logger().info("Entering get_families_count()");
-        reconnectDatabaseIfNecessary();
-        int argout;
-        // ---Add your Own code to control device here ---
-        try {
-            argout = dbProxy == null ? 0 : dbProxy.getDataBase().getAttribute().getFamilies().getFamiliesCount();
-        } catch (final ArchivingException e) {
-            throw e.toTangoException();
-        }
-        get_logger().info("Exiting get_families_count()");
-        return argout;
-    }
-
-    // =========================================================
-    /**
-     * Execute command "GetFamiliesByDomain" on device. Gets all the registered
-     * families for the given domain.
-     * 
-     * @param argin
-     *            The given domain
-     * @return The registered families for the given domain
-     */
-    // =========================================================
-    public String[] get_families_by_domain(final String argin) throws DevFailed {
-        get_logger().info("Entering get_families_by_domain()");
-        reconnectDatabaseIfNecessary();
-        String[] argout;
-        // ---Add your Own code to control device here ---
-        try {
-            argout = dbProxy == null ? new String[0] : dbProxy.getDataBase().getAttribute().getFamilies()
-                    .getFamilies(argin);
-        } catch (final ArchivingException e) {
-            throw e.toTangoException();
-        }
-        get_logger().info("Exiting get_families_by_domain()");
-        return argout;
-    }
-
-    // =========================================================
-    /**
-     * Execute command "GetFamiliesByDomainCount" on device. Returns the number
-     * of distinct registered families for a given domain.
-     * 
-     * @param argin
-     *            A domain name
-     * @return The number of distinct registered families for a given domain.
-     */
-    // =========================================================
-    public int get_families_by_domain_count(final String argin) throws DevFailed {
-        get_logger().info("Entering get_families_by_domain_count()");
-        reconnectDatabaseIfNecessary();
-        int argout;
-        // ---Add your Own code to control device here ---
-        try {
-            argout = dbProxy == null ? 0 : dbProxy.getDataBase().getAttribute().getFamilies().getFamiliesCount(argin);
-        } catch (final ArchivingException e) {
-            throw e.toTangoException();
-        }
-        get_logger().info("Exiting get_families_by_domain_count()");
-        return argout;
-    }
-
-    // =========================================================
-    /**
-     * Execute command "GetMembers" on device. Gets all the registered members
-     * 
-     * @return The registered members
-     */
-    // =========================================================
-    public String[] get_members() throws DevFailed {
-        get_logger().info("Entering get_members()");
-        reconnectDatabaseIfNecessary();
-        String[] argout;
-        // ---Add your Own code to control device here ---
-        try {
-            argout = dbProxy == null ? new String[0] : dbProxy.getDataBase().getAttribute().getMembers().getMembers();
-        } catch (final ArchivingException e) {
-            throw e.toTangoException();
-        }
-        get_logger().info("Exiting get_members()");
-        return argout;
-    }
-
-    // =========================================================
-    /**
-     * Execute command "GetMembersCount" on device. Returns the number of
-     * distinct members.
-     * 
-     * @return The number of distinct members.
-     */
-    // =========================================================
-    public int get_members_count() throws DevFailed {
-        get_logger().info("Entering get_members_count()");
-        reconnectDatabaseIfNecessary();
-        int argout;
-        // ---Add your Own code to control device here ---
-        try {
-            argout = dbProxy == null ? 0 : dbProxy.getDataBase().getAttribute().getMembers().getMembersCount();
-        } catch (final ArchivingException e) {
-            throw e.toTangoException();
-        }
-        get_logger().info("Exiting get_members_count()");
-        return argout;
-    }
-
-    // =========================================================
-    /**
-     * Execute command "GetMembersByDomainFamily" on device. Gets all the
-     * registered members for the given domain and family
-     * 
-     * @param argin
-     *            The given domain and family
-     * @return The registered members for the given domain and family
-     */
-    // =========================================================
-    public String[] get_members_by_domain_family(final String[] argin) throws DevFailed {
-        get_logger().info("Entering get_members_by_domain_family()");
-        reconnectDatabaseIfNecessary();
-        String[] argout;
-        // ---Add your Own code to control device here ---
-        if (argin.length != 2) {
-            Except.throw_exception("CONFIGURATION_ERROR", "Wrong number of parameters",
-                    "TdbExtractor.get_members_by_domain_family");
-            argout = new String[0];
-        } else {
-            try {
-                argout = dbProxy == null ? new String[0] : dbProxy.getDataBase().getAttribute().getMembers()
-                        .getMembers(argin[0].trim(), argin[1].trim());
-            } catch (final ArchivingException e) {
-                throw e.toTangoException();
-            }
-        }
-        get_logger().info("Exiting get_members_by_domain_family()");
-        return argout;
-    }
-
-    // =========================================================
-    /**
-     * Execute command "GetMembersByDomainFamilyCount" on device. Returns the
-     * number of distinct registered members for the given domain and family.
-     * 
-     * @param argin
-     *            A domain name, a family name
-     * @return The number of distinct registered members for the given domain
-     *         and family.
-     */
-    // =========================================================
-    public int get_members_by_domain_family_count(final String[] argin) throws DevFailed {
-        get_logger().info("Entering get_members_by_domain_family_count()");
-        reconnectDatabaseIfNecessary();
-        int argout;
-        // ---Add your Own code to control device here ---
-        if (argin.length != 2) {
-            Except.throw_exception("CONFIGURATION_ERROR", "Wrong number of parameters",
-                    "TdbExtractor.get_members_by_domain_family_count");
-            argout = 0;
-        } else {
-            try {
-                argout = dbProxy == null ? 0 : dbProxy.getDataBase().getAttribute().getMembers()
-                        .getMembersCount(argin[0], argin[1]);
-            } catch (final ArchivingException e) {
-                throw e.toTangoException();
-            }
-        }
-        get_logger().info("Exiting get_members_by_domain_family_count()");
-        return argout;
-    }
-
-    // =========================================================
-    /**
-     * Execute command "GetAttributesByDomainFamilyMembersCount" on device.
-     * Returns the number of registered the attributes for a given domain,
-     * family, member.
-     * 
-     * @param argin
-     *            A domain name, a family name, a member name.
-     * @return The number of registered the attributes for a given domain,
-     *         family, member.
-     */
-    // =========================================================
-    public int get_attributes_by_domain_family_members_count(final String[] argin) throws DevFailed {
-        get_logger().info("Entering get_attributes_by_domain_family_members_count()");
-        reconnectDatabaseIfNecessary();
-        int argout;
-        // ---Add your Own code to control device here ---
-        if (argin.length != 3) {
-            Except.throw_exception("CONFIGURATION_ERROR", "Wrong number of parameters",
-                    "TdbExtractor.get_attributes_by_domain_family_members_count");
-            argout = 0;
-        } else {
-            try {
-                argout = dbProxy == null ? 0 : dbProxy.getDataBase().getAttribute().getNames()
-                        .getAttributesCount(argin[0], argin[1], argin[2]);
-            } catch (final ArchivingException e) {
-                throw e.toTangoException();
-            }
-        }
-        get_logger().info("Exiting get_attributes_by_domain_family_members_count()");
-        return argout;
-    }
-
-    // =========================================================
-    /**
-     * Execute command "GetCurrentArchivedAtt" on device. Gets the list of
-     * attributes that are being archived in <I>TDB</I>
-     * 
-     * @return The list of attributes that are being archived
-     */
-    // =========================================================
-    public String[] get_current_archived_att() throws DevFailed {
-        get_logger().info("Entering get_current_archived_att()");
-        reconnectDatabaseIfNecessary();
-        String[] argout;
-        // ---Add your Own code to control device here ---
-        try {
-            argout = dbProxy == null ? new String[0] : dbProxy.getDataBase().getMode().getCurrentArchivedAtt();
-        } catch (final ArchivingException e) {
-            throw e.toTangoException();
-        }
-        get_logger().info("Exiting get_current_archived_att()");
-        return argout;
-    }
-
-    // =========================================================
-    /**
-     * Execute command "IsArchived" on device. Returns "true" if the attribute
-     * of given name is currently archived, "false" otherwise.
-     * 
-     * @param argin
-     *            The attribute's name
-     * @return true if the given attribute is being archived
-     */
-    // =========================================================
-    public boolean is_archived(final String argin) throws DevFailed {
-        get_logger().info("Entering is_archived()");
-        reconnectDatabaseIfNecessary();
-        boolean argout;
-        // ---Add your Own code to control device here ---
-        try {
-            argout = dbProxy == null ? false : dbProxy.getDataBase().getMode().isArchived(argin);
-        } catch (final ArchivingException e) {
-            throw e.toTangoException();
-        }
-        get_logger().info("Exiting is_archived()");
-        return argout;
-    }
-
-    // =========================================================
-    /**
-     * Execute command "GetArchivingMode" on device. Gets the archiving mode
-     * used for the specified attribute.
-     * 
-     * @param argin
-     *            The attribute's name
-     * @return The archiving mode used for the specified attribute
-     */
-    // =========================================================
-    public String[] get_archiving_mode(final String argin) throws DevFailed {
-        reconnectDatabaseIfNecessary();
-        String[] argout;
-        if (dbProxy == null) {
-            argout = new String[0];
-        } else {
-            // ---Add your Own code to control device here ---
-            try {
-                final Mode mode = dbProxy.getDataBase().getMode().getCurrentArchivingMode(argin);
-                argout = mode == null ? null : mode.toArray();
-                if (argout == null || argout.length == 0) {
-                    throw new ArchivingException("Invalid attribute: " + argin, "Invalid attribute: " + argin,
-                            ErrSeverity.WARN, "No database connection or \"" + argin
-                                    + "\" attribute not found in database", this.getClass().getName());
-                }
-            } catch (final ArchivingException e) {
-                throw e.toTangoException();
-            }
-        }
-        return argout;
-    }
-
-    // =========================================================
-    /**
-     * Execute command "GetAttData" on device. Gets all the data archieved for
-     * an attribute. Create a dynamic attribute, retrieve data from database and
-     * prepare result for attribute_history call.
-     * 
-     * @param argin
-     *            The attribute's name
-     * @return String : The new created dynamic attribute name, Long : the
-     *         number of data.
-     */
-    // =========================================================
-    public DevVarLongStringArray get_att_data(final String argin) throws DevFailed {
-        Except.throw_exception("DEPRECATED", "This method is no more available.", "TdbExtractor.get_att_data");
-        return null;
-
-        /*
-         * DevVarLongStringArray argout = new DevVarLongStringArray();
-         * get_logger().info("Entering get_att_data()"); // ---Add your Own code
-         * to control device here --- DbData dbData = null; try {
-         * ArchivingManagerApi.ExportData2Tdb(argin); // Get data from db.
-         * dbData = this.dbProxy.getDataBase().getAttData(argin); // Buid an
-         * attribute and gets its references argout = add_attribute(dbData); }
-         * catch ( ArchivingException e ) { e.printStackTrace(); //throw new
-         * ArchivingException(GlobalConst.ARC_UNREACH_EXCEPTION);
-         * get_logger().info("cla ZZZZZZZZZZ!!!!!!!!!!!!!!!!!!"); throw
-         * e.toTangoException(); } catch (java.lang.OutOfMemoryError oome) {
-         * get_logger().info("OutOfMemoryError in get_att_data");
-         * Except.throw_exception("MEMORY_ERROR",HintOnMemoryError,
-         * "TdbExtractor.get_att_data"); } catch ( Throwable t ) {
-         * t.printStackTrace(); if (t instanceof DevFailed) { DevError [] errors
-         * = ( (DevFailed) t ).errors; if ( errors != null ) { for ( int i = 0 ;
-         * i < errors.length ; i ++ ) { DevError error = errors [ i ];
-         * get_logger().error (
-         * "Error: /desc/"+error.desc+"/origin/"+error.origin
-         * +"/reason/"+error.reason ); } } get_logger().error (
-         * "Error: /CAUSE---------------" ); if ( ( (DevFailed) t ).getCause()
-         * != null ) { ( (DevFailed) t ).getCause().printStackTrace (); } } }
-         * get_logger().info("Exiting get_att_data()"); return argout;
-         */
-    }
-
-    /**
-     * Get the newest inserted value for an attribute. Returns READ part only
-     * 
-     * @param attributeName
-     *            the attribute name
-     * @return timestamp; values
-     * @throws DevFailed
-     */
-    public String getNewestValue(final String attributeName) throws DevFailed {
-        get_logger().info("Entering getNewestValue");
-        reconnectDatabaseIfNecessary();
-        String argout;
-        if (dbProxy == null) {
-            argout = "";
-        } else {
-            try {
-                final DbData data = dbProxy.getDataBase().getExtractor().getDataGetters().getNewestValue(attributeName);
-                if (data.getTimedData() != null && data.getTimedData()[0] != null) {
-                    argout = Long.toString(data.getTimedData()[0].getTime()) + "; ";
-                    final Object value = get(data.getTimedData()[0].getValue(), 0);
-                    argout = argout + String.valueOf(value);
-                } else {
-                    DevFailedUtils.throwDevFailed("no data found for " + attributeName);
-                    argout = "";
-                }
-            } catch (final ArchivingException e) {
-                throw e.toTangoException();
-            }
-        }
-        get_logger().info("Exiting getNewestValue");
-        return argout;
-    }
-
-    /**
-     * Get the nearest value and timestamp of an attribute for a given
-     * timestamp. Returns READ part only
-     * 
-     * @param argin
-     *            [attributeName, timestamp]. timestamp format is DD-MM-YYYY
-     *            HH24:MI:SS
-     * @return timestamp; values
-     * @throws DevFailed
-     */
-    public String getNearestValue(final String[] argin) throws DevFailed {
-        get_logger().info("Entering getNewestValue");
-        reconnectDatabaseIfNecessary();
-        String argout;
-        if (argin.length != 2) {
-            DevFailedUtils.throwDevFailed("input must be of size 2 [attributeName, timestamp] ");
-        }
-        if (dbProxy == null) {
-            argout = "";
-        } else {
-            final String attributeName = argin[0];
-            final String timestamp = argin[1];
-            try {
-                final DbData data2 = dbProxy.getDataBase().getExtractor().getDataGetters()
-                        .getNearestValue(attributeName, timestamp);
-                if (data2.getTimedData() != null && data2.getTimedData()[0] != null) {
-                    argout = Long.toString(data2.getTimedData()[0].getTime()) + "; ";
-                    final Object value = get(data2.getTimedData()[0].getValue(), 0);
-                    argout = argout + String.valueOf(value);
-                } else {
-                    DevFailedUtils.throwDevFailed("no data found for " + attributeName);
-                    argout = "";
-                }
-            } catch (final ArchivingException e) {
-                e.printStackTrace();
-                throw e.toTangoException();
-            }
-        }
-        get_logger().info("Exiting getNewestValue");
-        return argout;
-    }
-
-    // =========================================================
-    /**
-     * Execute command "GetAttDataCount" on device. Returns the number of the
-     * data archieved for an attribute.
-     * 
-     * @param argin
-     *            An attribute name.
-     * @return The number of the data archieved for an attribute.
-     */
-    // =========================================================
-    public int get_att_data_count(final String argin) throws DevFailed {
-        get_logger().info("Entering get_att_data_count()");
-        reconnectDatabaseIfNecessary();
-        int argout;
-        if (dbProxy == null) {
-            argout = 0;
-        } else {
-            // ---Add your Own code to control device here ---
-            try {
-                ((TDBDataBaseManager) dbProxy.getDataBase()).getTdbExport().ExportData2Tdb(argin, getTimeNow());
-                argout = dbProxy.getDataBase().getExtractor().getDataGetters().getAttDataCount(argin);
-            } catch (final ArchivingException e) {
-                throw e.toTangoException();
-            }
-        }
-        get_logger().info("Exiting get_att_data_count()");
-        return argout;
-    }
-
-    // =========================================================
-    /**
-     * Execute command "GetAttDataAvg" on device. Returns the average value
-     * generated by the given attribute.
-     * 
-     * @param argin
-     *            The attribute's name
-     * @return The average of the values generated by the attribute
-     */
-    // =========================================================
-    public double get_att_data_avg(final String argin) throws DevFailed {
-        get_logger().info("Entering get_att_data_avg()");
-        reconnectDatabaseIfNecessary();
-        double argout;
-        if (dbProxy == null) {
-            argout = 0;
-        } else {
-            // ---Add your Own code to control device here ---
-            try {
-                ((TDBDataBaseManager) dbProxy.getDataBase()).getTdbExport().ExportData2Tdb(argin, getTimeNow());
-                argout = dbProxy.getDataBase().getExtractor().getMinMaxAvgGetters().getAttDataAvg(argin);
-            } catch (final ArchivingException e) {
-                throw e.toTangoException();
-            }
-        }
-        get_logger().info("Exiting get_att_data_avg()");
-        return argout;
-    }
-
-    // =========================================================
-    /**
-     * Execute command "GetAttDataAvgBetweenDates" on device. Returns the
-     * average value generated by the given attribute and between the two given
-     * dates.
-     * 
-     * @param argin
-     *            The attribute's name, the beginning date (DD-MM-YYYY
-     *            HH24:MI:SS) and the ending date (DD-MM-YYYY HH24:MI:SS)
-     * @return The average value generated by the given attribute and between
-     *         the two given dates.
-     */
-    // =========================================================
-    public double get_att_data_avg_between_dates(final String[] argin) throws DevFailed {
-        get_logger().info("Entering get_att_data_avg_between_dates()");
-        reconnectDatabaseIfNecessary();
-        double argout;
-        if (dbProxy == null) {
-            argout = 0;
-        } else {
-            // ---Add your Own code to control device here ---
-            if (argin.length != 3) {
-                Except.throw_exception("CONFIGURATION_ERROR", "Wrong number of parameters",
-                        "TdbExtractor.get_att_scalar_data_avg_between_dates");
-                argout = 0;
-            } else {
-                try {
-                    ((TDBDataBaseManager) dbProxy.getDataBase()).getTdbExport().ExportData2Tdb(argin[0], argin[2]);
-
-                    argout = dbProxy.getDataBase().getExtractor().getMinMaxAvgGettersBetweenDates()
-                            .getAttDataAvgBetweenDates(argin);
-                } catch (final ArchivingException e) {
-                    throw e.toTangoException();
-                }
-            }
-        }
-        get_logger().info("Exiting get_att_data_avg_between_dates()");
-        return argout;
-    }
-
-    // =========================================================
-    /**
-     * Execute command "GetAttDataBetweenDates" on device. Retrieves data
-     * beetwen two dates, for a given scalar attribute. Create a dynamic
-     * attribute, retrieve data from database and prepare result for
-     * attribute_history call.
-     * 
-     * @param argin
-     *            : The attribute's name, the beginning date (DD-MM-YYYY
-     *            HH24:MI:SS) and the ending date (DD-MM-YYYY HH24:MI:SS), and
-     *            the sampling type (ALL, SECOND, MINUTE, HOUR, DAY)
-     * @return String : The new created dynamic attribute name, Long : the
-     *         number of data.
-     */
-    // =========================================================
-    public DevVarLongStringArray get_att_data_between_dates_sampling(final String[] argin) throws DevFailed {
-        get_logger().info("Entering get_att_data_between_dates_sampling()");
-        DevVarLongStringArray argout = null;
-        SamplingType samplingType = null;
-        reconnectDatabaseIfNecessary();
-        // ---Add your Own code to control device here ---
-        if (argin.length != 4) {
-            Except.throw_exception("CONFIGURATION_ERROR", "Wrong number of parameters",
-                    "TdbExtractor.get_att_data_between_dates_sampling");
-        }
-
-        try {
-            samplingType = SamplingType.getSamplingTypeByLabel(argin[3]);
-        } catch (final IllegalArgumentException iae) {
-            Except.throw_exception("CONFIGURATION_ERROR",
-                    "Invalid sampling type. Valid types are ALL, SECOND, MINUTE, HOUR, or DAY",
-                    "TdbExtractor.get_att_data_between_dates_sampling");
-        }
-        if (dbProxy != null) {
-            try {
-                // Get data from db.
-                final DbData dbData = dbProxy.getDataBase().getExtractor().getDataGettersBetweenDates()
-                        .getAttDataBetweenDates(argin, samplingType);
-                // Buid an attribute and gets its references
-                argout = add_attribute(dbData);
-            } catch (final ArchivingException e) {
-                e.printStackTrace();
-                throw e.toTangoException();
-            } catch (final java.lang.OutOfMemoryError oome) {
-                get_logger().info("OutOfMemoryError in get_att_data_between_dates_sampling");
-                Except.throw_exception("MEMORY_ERROR", HintOnMemoryError,
-                        "TdbExtractor.get_att_data_between_dates_sampling");
-            } catch (final Throwable t) {
-                t.printStackTrace();
-                if (t instanceof DevFailed) {
-                    final DevError[] errors = ((DevFailed) t).errors;
-                    if (errors != null) {
-                        for (final DevError error : errors) {
-                            get_logger().error(
-                                    "Error: /desc/" + error.desc + "/origin/" + error.origin + "/reason/"
-                                            + error.reason);
-                        }
-                    }
-
-                    get_logger().error("Error: /CAUSE---------------");
-                    if (((DevFailed) t).getCause() != null) {
-                        ((DevFailed) t).getCause().printStackTrace();
-                    }
-                }
-            }
-        }
-        get_logger().info("Exiting get_att_data_between_dates_sampling()");
-        return argout;
-    }
-
-    // =========================================================
-    /**
-     * Execute command "GetAttDataBetweenDates" on device. Retrieves data
-     * beetwen two dates, for a given scalar attribute. Create a dynamic
-     * attribute, retrieve data from database and prepare result for
-     * attribute_history call.
-     * 
-     * @param argin
-     *            : The attribute's name, the beginning date (DD-MM-YYYY
-     *            HH24:MI:SS) and the ending date (DD-MM-YYYY HH24:MI:SS)
-     * @return String : The new created dynamic attribute name, Long : the
-     *         number of data.
-     */
-    // =========================================================
-    public DevVarLongStringArray get_att_data_between_dates(final String[] argin) throws DevFailed {
-        get_logger().info("Entering get_att_data_between_dates()");
-        reconnectDatabaseIfNecessary();
-        DevVarLongStringArray argout = null;
-
-        // ---Add your Own code to control device here ---
-        if (argin.length != 3) {
-            Except.throw_exception("CONFIGURATION_ERROR", "Wrong number of parameters",
-                    "TdbExtractor.get_att_scalar_data_beetween_dates");
-        } else if (dbProxy != null) {
-            try {
-
-                ((TDBDataBaseManager) dbProxy.getDataBase()).getTdbExport().ExportData2Tdb(argin[0], argin[2]);
-
-                // Get data from db.
-                final DbData dbData = dbProxy.getDataBase().getExtractor().getDataGettersBetweenDates()
-                        .getAttDataBetweenDates(argin, SamplingType.getSamplingType(SamplingType.ALL));
-
-                // Buid an attribute and gets its references
-                argout = add_attribute(dbData);
-            } catch (final ArchivingException e) {
-                e.printStackTrace();
-                throw e.toTangoException();
-            } catch (final java.lang.OutOfMemoryError oome) {
-                get_logger().info("OutOfMemoryError in get_att_data_between_dates");
-                Except.throw_exception("MEMORY_ERROR", HintOnMemoryError, "TdbExtractor.get_att_data_between_dates");
-            } catch (final Throwable t) {
-                t.printStackTrace();
-                if (t instanceof DevFailed) {
-                    final DevError[] errors = ((DevFailed) t).errors;
-                    if (errors != null) {
-                        for (final DevError error : errors) {
-                            get_logger().error(
-                                    "Error: /desc/" + error.desc + "/origin/" + error.origin + "/reason/"
-                                            + error.reason);
-                        }
-                    }
-
-                    get_logger().error("Error: /CAUSE---------------");
-                    if (((DevFailed) t).getCause() != null) {
-                        ((DevFailed) t).getCause().printStackTrace();
-                    }
-                }
-            }
-        }
-        get_logger().info("Exiting get_att_data_between_dates()");
-        return argout;
-    }
-
-    /**
-     * Extract an attribute's data for TDB
-     * 
-     * @param argin
-     *            The attribute's name, the beginning date (DD-MM-YYYY
-     *            HH24:MI:SS) and the ending date (DD-MM-YYYY HH24:MI:SS)
-     * @return Long: the timestamps , String: values (read values only
-     * @throws DevFailed
-     */
-    public DevVarDoubleStringArray extractBetweenDates(final String[] argin) throws DevFailed {
-        get_logger().info("Entering get_att_data_between_dates()");
-        reconnectDatabaseIfNecessary();
-        DevVarDoubleStringArray argout = null;
-
-        // ---Add your Own code to control device here ---
-        if (argin.length != 3) {
-            Except.throw_exception("CONFIGURATION_ERROR", "Wrong number of parameters",
-                    "HdbExtractor.get_att_scalar_data_beetween_dates");
-        } else if (dbProxy != null) {
-            try {
-                // Get data from db.
-                final DbData dbData = dbProxy.getDataBase().getExtractor().getDataGettersBetweenDates()
-                        .getAttDataBetweenDates(argin, SamplingType.getSamplingType(SamplingType.ALL));
-                final NullableTimedData[] tuples = dbData.getTimedData();
-                final double[] timeStamps = new double[tuples.length];
-                final String[] values = new String[tuples.length];
-                for (int i = 0; i < tuples.length; i++) {
-                    timeStamps[i] = tuples[i].getTime();
-                    Object value = get(tuples[i].getValue(), 0);
-                    values[i] = String.valueOf(value);
-                }
-                argout = new DevVarDoubleStringArray(timeStamps, values);
-            } catch (final ArchivingException e) {
-
-                e.printStackTrace();
-                throw e.toTangoException();
-            }
-        }
-        get_logger().info("Exiting get_att_data_between_dates()");
-
-        return argout;
-    }
-
-    protected Object get(Object value, int index) {
-        Object result;
-        if ((value != null) && value.getClass().isArray() && (index > -1) && (index < Array.getLength(value))) {
-            result = Array.get(value, index);
-        } else {
-            result = null;
-        }
-        return result;
-    }
-
-    // =========================================================
-    /**
-     * Execute command "GetAttDataBetweenDatesCount" on device. Returns the
-     * number of data beetwen two dates and, for a given scalar attribute.
-     * 
-     * @param argin
-     *            The attribute's name, the beginning (DD-MM-YYYY HH24:MI:SS)
-     *            date and the ending date (DD-MM-YYYY HH24:MI:SS).
-     * @return The number of data beetwen two dates and, for a given scalar
-     *         attribute.
-     */
-    // =========================================================
-    public int get_att_data_between_dates_count(final String[] argin) throws DevFailed {
-        get_logger().info("Entering get_att_data_between_dates_count()");
-        reconnectDatabaseIfNecessary();
-        int argout = 0;
-        // ---Add your Own code to control device here ---
-        if (argin.length != 3) {
-            Except.throw_exception("CONFIGURATION_ERROR", "Wrong number of parameters",
-                    "TdbExtractor.get_att_scalar_data_between_dates_count");
-        } else if (dbProxy != null) {
-            try {
-                ((TDBDataBaseManager) dbProxy.getDataBase()).getTdbExport().ExportData2Tdb(argin[0], argin[2]);
-
-                argout = dbProxy.getDataBase().getExtractor().getDataGettersBetweenDates()
-                        .getAttDataBetweenDatesCount(argin);
-            } catch (final ArchivingException e) {
-                throw e.toTangoException();
-            }
-        }
-        get_logger().info("Exiting get_att_data_between_dates_count()");
-        return argout;
-    }
-
-    // =========================================================
-    /**
-     * Execute command "GetAttDataInfOrSupThan" on device. Retrieves all data
-     * that are lower than the given value x OR higher than the given value y.
-     * Create a dynamic attribute, retrieve the corresponding data from database
-     * and prepare result for attribute_history call.
-     * 
-     * @param argin
-     *            The attribute's name, the lower limit and the upper limit
-     * @return String : The new created dynamic attribute name, Long : the
-     *         number of data.
-     */
-    // =========================================================
-    public DevVarLongStringArray get_att_data_inf_or_sup_than(final String[] argin) throws DevFailed {
-        get_logger().info("Entering get_att_data_inf_or_sup_than()");
-        reconnectDatabaseIfNecessary();
-        DevVarLongStringArray argout = null;
-
-        // ---Add your Own code to control device here ---
-        if (argin.length != 3) {
-            Except.throw_exception("CONFIGURATION_ERROR", "Wrong number of parameters",
-                    "TdbExtractor.get_att_scalar_data_inf_or_sup_than");
-        } else if (dbProxy != null) {
-            try {
-
-                ((TDBDataBaseManager) dbProxy.getManager()).getTdbExport().ExportData2Tdb(argin[0], getTimeNow());
-
-                // Get data from db.
-                final DbData dbData = dbProxy.getDataBase().getExtractor().getInfSupGetters()
-                        .getAttDataInfOrSupThan(argin);
-                // Buid an attribute and gets its references
-                argout = add_attribute(dbData);
-            } catch (final ArchivingException e) {
-                throw e.toTangoException();
-            } catch (final java.lang.OutOfMemoryError oome) {
-                get_logger().info("OutOfMemoryError in get_att_data_inf_or_sup_than");
-                Except.throw_exception("MEMORY_ERROR", HintOnMemoryError, "TdbExtractor.get_att_data_inf_or_sup_than");
-            }
-        }
-        get_logger().info("Exiting get_att_data_inf_or_sup_than()");
-        return argout;
-    }
-
-    // =========================================================
-    /**
-     * Execute command "GetAttDataInfOrSupThanCount" on device. Returns the
-     * number of data lower than the given value x OR higher than the given
-     * value y.
-     * 
-     * @param argin
-     *            The attribute's name, the lower limit and the upper limit
-     * @return The number of scalar data lower than the given value x OR higher
-     *         than the given value y.
-     */
-    // =========================================================
-    public int get_att_data_inf_or_sup_than_count(final String[] argin) throws DevFailed {
-        get_logger().info("Entering get_att_data_inf_or_sup_than_count()");
-        reconnectDatabaseIfNecessary();
-        int argout = 0;
-        // ---Add your Own code to control device here ---
-        if (argin.length != 3) {
-            Except.throw_exception("CONFIGURATION_ERROR", "Wrong number of parameters",
-                    "TdbExtractor.get_att_scalar_data_inf_or_sup_than_count");
-        } else if (dbProxy != null) {
-            try {
-                ((TDBDataBaseManager) dbProxy.getDataBase()).getTdbExport().ExportData2Tdb(argin[0], getTimeNow());
-
-                argout = dbProxy.getDataBase().getExtractor().getInfSupGetters().getAttDataInfOrSupThanCount(argin);
-            } catch (final ArchivingException e) {
-                throw e.toTangoException();
-            }
-        }
-        get_logger().info("Exiting get_att_data_inf_or_sup_than_count()");
-        return argout;
-    }
-
-    // =========================================================
-    /**
-     * Execute command "GetAttDataInfOrSupThanBetweenDates" on device. Retrieves
-     * data beetwen two dates (date_1 & date_2) - Data are lower than the given
-     * value x OR higher than the given value y. Create a dynamic attribute,
-     * retrieve the corresponding data from database and prepare result for
-     * attribute_history call.
-     * 
-     * @param argin
-     *            The attribute's name, the lower limit, the upper limit, the
-     *            beginning date (DD-MM-YYYY HH24:MI:SS) and the ending date
-     *            (DD-MM-YYYY HH24:MI:SS)
-     * @return String : The new created dynamic attribute name, Long : the
-     *         number of data.
-     */
-    // =========================================================
-    public DevVarLongStringArray get_att_data_inf_or_sup_than_between_dates(final String[] argin) throws DevFailed {
-        get_logger().info("Entering get_att_data_inf_or_sup_than_between_dates()");
-        reconnectDatabaseIfNecessary();
-        DevVarLongStringArray argout = null;
-        // ---Add your Own code to control device here ---
-        if (argin.length != 5) {
-            Except.throw_exception("CONFIGURATION_ERROR", "Wrong number of parameters",
-                    "TdbExtractor.get_att_scalar_data_inf_or_sup_than_beetween_dates");
-        } else if (dbProxy != null) {
-            try {
-
-                ((TDBDataBaseManager) dbProxy.getDataBase()).getTdbExport().ExportData2Tdb(argin[0], argin[4]);
-
-                // Get data from db.
-                final DbData dbData = dbProxy.getDataBase().getExtractor().getInfSupGettersBetweenDates()
-                        .getAttDataInfOrSupThanBetweenDates(argin);
-                // Buid an attribute and gets its references
-                argout = add_attribute(dbData);
-            } catch (final ArchivingException e) {
-                throw e.toTangoException();
-            } catch (final java.lang.OutOfMemoryError oome) {
-                get_logger().info("OutOfMemoryError in get_att_data_inf_or_sup_than_between_dates");
-                Except.throw_exception("MEMORY_ERROR", HintOnMemoryError,
-                        "TdbExtractor.get_att_data_inf_or_sup_than_between_dates");
-            }
-        }
-        get_logger().info("Exiting get_att_data_inf_or_sup_than_between_dates()");
-        return argout;
-    }
-
-    // =========================================================
-    /**
-     * Execute command "GetAttDataInfOrSupThanBetweenDatesCount" on device.
-     * Returns the number of data beetwen two dates (date_1 & date_2). Data are
-     * lower than the given value x OR higher than the given value y.
-     * 
-     * @param argin
-     *            The attribute's name, the lower limit, the upper limit, the
-     *            beginning date (DD-MM-YYYY HH24:MI:SS) and the ending date
-     *            (DD-MM-YYYY HH24:MI:SS).
-     * @return The number of scalar data lower than the given value x OR higher
-     *         than the given value y, beetwen two dates and for the specified
-     *         attribute.
-     */
-    // =========================================================
-    public int get_att_data_inf_or_sup_than_between_dates_count(final String[] argin) throws DevFailed {
-        get_logger().info("Entering get_att_data_inf_or_sup_than_between_dates_count()");
-        reconnectDatabaseIfNecessary();
-        int argout = 0;
-        // ---Add your Own code to control device here ---
-        if (argin.length != 5) {
-            Except.throw_exception("CONFIGURATION_ERROR", "Wrong number of parameters",
-                    "TdbExtractor.get_att_scalar_data_inf_or_sup_than_between_dates_count");
-        } else if (dbProxy != null) {
-            try {
-
-                ((TDBDataBaseManager) dbProxy.getDataBase()).getTdbExport().ExportData2Tdb(argin[0], argin[5]);
-
-                argout = dbProxy.getDataBase().getExtractor().getInfSupGettersBetweenDates()
-                        .getAttDataInfOrSupThanBetweenDatesCount(argin);
-            } catch (final ArchivingException e) {
-                throw e.toTangoException();
-            }
-        }
-        get_logger().info("Exiting get_att_data_inf_or_sup_than_between_dates_count()");
-        return argout;
-    }
-
-    // =========================================================
-    /**
-     * Execute command "GetAttDataInfThan" on device. Retrieves all the data
-     * that are lower than the given value x. Create a dynamic attribute,
-     * retrieve the corresponding data from database and prepare result for
-     * attribute_history call.
-     * 
-     * @param argin
-     *            The attribute's name, the upper limit
-     * @return String : The new created dynamic attribute name, Long : the
-     *         number of data.
-     */
-    // =========================================================
-    public DevVarLongStringArray get_att_data_inf_than(final String[] argin) throws DevFailed {
-        get_logger().info("Entering get_att_data_inf_than()");
-        reconnectDatabaseIfNecessary();
-        DevVarLongStringArray argout = null;
-        // ---Add your Own code to control device here ---
-        if (argin.length != 2) {
-            Except.throw_exception("CONFIGURATION_ERROR", "Wrong number of parameters",
-                    "TdbExtractor.get_att_scalar_data_inf_than");
-        } else if (dbProxy != null) {
-            try {
-                ((TDBDataBaseManager) dbProxy.getDataBase()).getTdbExport().ExportData2Tdb(argin[0], getTimeNow());
-                // Get data from db.
-                final DbData dbData = dbProxy.getDataBase().getExtractor().getInfSupGetters().getAttDataInfThan(argin);
-                // Buid an attribute and gets its references
-                argout = add_attribute(dbData);
-            } catch (final ArchivingException e) {
-                throw e.toTangoException();
-            } catch (final java.lang.OutOfMemoryError oome) {
-                get_logger().info("OutOfMemoryError in get_att_data_inf_than");
-                Except.throw_exception("MEMORY_ERROR", HintOnMemoryError, "TdbExtractor.get_att_data_inf_than");
-            }
-        }
-        get_logger().info("Exiting get_att_data_inf_than()");
-        return argout;
-    }
-
-    // =========================================================
-    /**
-     * Execute command "GetAttDataInfThanCount" on device. Returns the number of
-     * data lower than the given value.
-     * 
-     * @param argin
-     *            The attribute's name and the upper limit.
-     * @return The number of scalar data lower than the given value and for the
-     *         specified attribute.
-     */
-    // =========================================================
-    public int get_att_data_inf_than_count(final String[] argin) throws DevFailed {
-        get_logger().info("Entering get_att_data_inf_than_count()");
-        reconnectDatabaseIfNecessary();
-        int argout = 0;
-        // ---Add your Own code to control device here ---
-        if (argin.length != 2) {
-            Except.throw_exception("CONFIGURATION_ERROR", "Wrong number of parameters",
-                    "TdbExtractor.get_att_scalar_data_inf_than_count");
-        } else if (dbProxy != null) {
-            try {
-                ((TDBDataBaseManager) dbProxy.getDataBase()).getTdbExport().ExportData2Tdb(argin[0], getTimeNow());
-                argout = dbProxy.getDataBase().getExtractor().getInfSupGetters().getAttDataInfThanCount(argin);
-            } catch (final ArchivingException e) {
-                throw e.toTangoException();
-            }
-        }
-        get_logger().info("Exiting get_att_data_inf_than_count()");
-        return argout;
-    }
-
-    // =========================================================
-    /**
-     * Execute command "GetAttDataInfThanBetweenDates" on device. Retrieves data
-     * beetwen two dates (date_1 & date_2) - Data are lower than the given value
-     * x. Create a dynamic attribute, retrieve the corresponding data from
-     * database and prepare result for attribute_history call.
-     * 
-     * @param argin
-     *            The attribute's name, the upper limit, the beginning date
-     *            (DD-MM-YYYY HH24:MI:SS) and the ending date (DD-MM-YYYY
-     *            HH24:MI:SS)
-     * @return String : The new created dynamic attribute name, Long : the
-     *         number of data.
-     */
-    // =========================================================
-    public DevVarLongStringArray get_att_data_inf_than_between_dates(final String[] argin) throws DevFailed {
-        get_logger().info("Entering get_att_data_inf_than_between_dates()");
-        reconnectDatabaseIfNecessary();
-        DevVarLongStringArray argout = null;
-        // ---Add your Own code to control device here ---
-        if (argin.length != 4) {
-            Except.throw_exception("CONFIGURATION_ERROR", "Wrong number of parameters",
-                    "TdbExtractor.get_att_scalar_data_inf_than_beetween_dates");
-        } else if (dbProxy != null) {
-            try {
-
-                ((TDBDataBaseManager) dbProxy.getDataBase()).getTdbExport().ExportData2Tdb(argin[0], argin[3]);
-
-                // Get data from db.
-                final DbData dbData = dbProxy.getDataBase().getExtractor().getInfSupGettersBetweenDates()
-                        .getAttDataInfThanBetweenDates(argin);
-                // Buid an attribute and gets its references
-                argout = add_attribute(dbData);
-            } catch (final ArchivingException e) {
-                throw e.toTangoException();
-            }
-        }
-        get_logger().info("Exiting get_att_data_inf_than_between_dates()");
-        return argout;
-    }
-
-    // =========================================================
-    /**
-     * Execute command "GetAttDataInfThanBetweenDatesCount" on device. Returns
-     * the number data lower than the given value x, and beetwen two dates
-     * (date_1 & date_2).
-     * 
-     * @param argin
-     *            The attribute's name, the upper limit, the beginning date
-     *            (DD-MM-YYYY HH24:MI:SS) and the ending date (DD-MM-YYYY
-     *            HH24:MI:SS).
-     * @return The number data lower than the given value x, and beetwen two
-     *         dates (date_1 & date_2).
-     */
-    // =========================================================
-    public int get_att_data_inf_than_between_dates_count(final String[] argin) throws DevFailed {
-        get_logger().info("Entering get_att_data_inf_than_between_dates_count()");
-        reconnectDatabaseIfNecessary();
-        int argout = 0;
-        // ---Add your Own code to control device here ---
-        if (argin.length != 4) {
-            Except.throw_exception("CONFIGURATION_ERROR", "Wrong number of parameters",
-                    "TdbExtractor.get_att_scalar_data_inf_than_between_dates_count");
-        } else if (dbProxy != null) {
-            try {
-                ((TDBDataBaseManager) dbProxy.getDataBase()).getTdbExport().ExportData2Tdb(argin[0], argin[3]);
-                argout = dbProxy.getDataBase().getExtractor().getInfSupGettersBetweenDates()
-                        .getAttDataInfThanBetweenDatesCount(argin);
-            } catch (final ArchivingException e) {
-                throw e.toTangoException();
-            }
-        }
-        get_logger().info("Exiting get_att_data_inf_than_between_dates_count()");
-        return argout;
-    }
-
-    // =========================================================
-    /**
-     * Execute command "GetAttDataLastN" on device. Retrieves the last n
-     * archived data, for a given scalar attribute. Create a dynamic attribute,
-     * retrieve the corresponding data from database and prepare result for
-     * attribute_history call.
-     * 
-     * @param argin
-     *            The attribute's name and the number of wished data
-     * @return String : The new created dynamic attribute name, Long : the
-     *         number of data.
-     */
-    // =========================================================
-    public DevVarLongStringArray get_att_data_last_n(final String[] argin) throws DevFailed {
-        get_logger().info("Entering get_att_data_last_n()");
-        reconnectDatabaseIfNecessary();
-        DevVarLongStringArray argout = null;
-        // ---Add your Own code to control device here ---
-        if (argin.length != 2) {
-            Except.throw_exception("CONFIGURATION_ERROR", "Wrong number of parameters",
-                    "TdbExtractor.get_att_scalar_data_last_n");
-        } else if (dbProxy != null) {
-            try {
-                ((TDBDataBaseManager) dbProxy.getDataBase()).getTdbExport().ExportData2Tdb(argin[0], getTimeNow());
-                // Get data from db.
-                final DbData dbData = dbProxy.getDataBase().getExtractor().getDataGetters().getAttDataLastN(argin);
-                // Buid an attribute and gets its references
-                argout = add_attribute(dbData);
-            } catch (final ArchivingException e) {
-                e.printStackTrace();
-                throw e.toTangoException();
-            } catch (final java.lang.OutOfMemoryError oome) {
-                get_logger().info("OutOfMemoryError in get_att_data_last_n");
-                Except.throw_exception("MEMORY_ERROR", HintOnMemoryError, "TdbExtractor.get_att_data_last_n");
-            } catch (final Throwable t) {
-                t.printStackTrace();
-                if (t instanceof DevFailed) {
-                    final DevError[] errors = ((DevFailed) t).errors;
-                    if (errors != null) {
-                        for (final DevError error : errors) {
-                            get_logger().error(
-                                    "Error: /desc/" + error.desc + "/origin/" + error.origin + "/reason/"
-                                            + error.reason);
-                        }
-                    }
-                    get_logger().error("Error: /CAUSE---------------");
-                    if (((DevFailed) t).getCause() != null) {
-                        ((DevFailed) t).getCause().printStackTrace();
-                    }
-                }
-            }
-        }
-        get_logger().info("Exiting get_att_data_last_n()");
-        return argout;
-    }
-
-    // =========================================================
-    /**
-     * Execute command "GetAttDataMax" on device. Returns the biggest value
-     * generated by the attribute.
-     * 
-     * @param argin
-     *            The attribute's name
-     * @return The biggest value generated by the attribute
-     */
-    // =========================================================
-    public double get_att_data_max(final String argin) throws DevFailed {
-        get_logger().info("Entering get_att_data_max()");
-        reconnectDatabaseIfNecessary();
-        double argout = 0;
-        if (dbProxy != null) {
-            // ---Add your Own code to control device here ---
-            try {
-                ((TDBDataBaseManager) dbProxy.getDataBase()).getTdbExport().ExportData2Tdb(argin, getTimeNow());
-
-                argout = dbProxy.getDataBase().getExtractor().getMinMaxAvgGetters().getAttDataMax(argin);
-            } catch (final ArchivingException e) {
-                throw e.toTangoException();
-            }
-        }
-        get_logger().info("Exiting get_att_data_max()");
-        return argout;
-    }
-
-    // =========================================================
-    /**
-     * Execute command "GetAttDataMaxBetweenDates" on device. Returns the
-     * biggest value generated between the two given dates.
-     * 
-     * @param argin
-     *            The attribute's name, the beginning date (DD-MM-YYYY
-     *            HH24:MI:SS) and the ending date (DD-MM-YYYY HH24:MI:SS)
-     * @return The biggest value generated between the two given dates.
-     */
-    // =========================================================
-    public double get_att_data_max_between_dates(final String[] argin) throws DevFailed {
-        get_logger().info("Entering get_att_data_max_between_dates()");
-        reconnectDatabaseIfNecessary();
-        double argout = 0;
-        // ---Add your Own code to control device here ---
-        if (argin.length != 3) {
-            Except.throw_exception("CONFIGURATION_ERROR", "Wrong number of parameters",
-                    "TdbExtractor.get_att_scalar_data_max_between_dates");
-        } else if (dbProxy != null) {
-            try {
-                ((TDBDataBaseManager) dbProxy.getDataBase()).getTdbExport().ExportData2Tdb(argin[0], argin[2]);
-                argout = dbProxy.getDataBase().getExtractor().getMinMaxAvgGettersBetweenDates()
-                        .getAttDataMaxBetweenDates(argin);
-            } catch (final ArchivingException e) {
-                throw e.toTangoException();
-            }
-        }
-        get_logger().info("Exiting get_att_data_max_between_dates()");
-        return argout;
-    }
-
-    public void remove_dynamic_attributes() throws DevFailed {
-        get_logger().info("Entering remove_dynamic_attributes()");
-        while (dev_attr.get_attr_nb() > 0) {
-            final Attribute nextAttribute = dev_attr.get_attr_by_ind(0);
-            final String attributeName = nextAttribute.get_name();
-            remove_attribute(attributeName);
-        }
-        get_logger().info("Exiting remove_dynamic_attributes()");
-    }
-
-    // =========================================================
-    /**
-     * Execute command "GetAttDataMin" on device. Returns the smallest scalar
-     * value generated by the attribute.
-     * 
-     * @param argin
-     *            The attribute's name
-     * @return The smallest value generated by the attribute
-     */
-    // =========================================================
-    public double get_att_data_min(final String argin) throws DevFailed {
-        get_logger().info("Entering get_att_data_min()");
-        reconnectDatabaseIfNecessary();
-        double argout = 0;
-        if (dbProxy != null) {
-            // ---Add your Own code to control device here ---
-            try {
-                ((TDBDataBaseManager) dbProxy.getDataBase()).getTdbExport().ExportData2Tdb(argin, getTimeNow());
-
-                argout = dbProxy.getDataBase().getExtractor().getMinMaxAvgGetters().getAttDataMin(argin);
-            } catch (final ArchivingException e) {
-                throw e.toTangoException();
-            }
-        }
-        get_logger().info("Exiting get_att_data_min()");
-        return argout;
-    }
-
-    // =========================================================
-    /**
-     * Execute command "GetAttDataMinBetweenDates" on device. Returns the
-     * smallest scalar value generated by the given attribute and between two
-     * given dates
-     * 
-     * @param argin
-     *            The attribute's name, the beginning date (DD-MM-YYYY
-     *            HH24:MI:SS) and the ending date (DD-MM-YYYY HH24:MI:SS)
-     * @return The smallest scalar value generated by the given attribute and
-     *         between the two given dates.
-     */
-    // =========================================================
-    public double get_att_data_min_between_dates(final String[] argin) throws DevFailed {
-        get_logger().info("Entering get_att_data_min_between_dates()");
-        reconnectDatabaseIfNecessary();
-        double argout = 0;
-        // ---Add your Own code to control device here ---
-        if (argin.length != 3) {
-            Except.throw_exception("CONFIGURATION_ERROR", "Wrong number of parameters",
-                    "TdbExtractor.get_att_scalar_data_min_between_dates");
-        } else if (dbProxy != null) {
-            try {
-                ((TDBDataBaseManager) dbProxy.getDataBase()).getTdbExport().ExportData2Tdb(argin[0], argin[2]);
-                argout = dbProxy.getDataBase().getExtractor().getMinMaxAvgGettersBetweenDates()
-                        .getAttDataMinBetweenDates(argin);
-            } catch (final ArchivingException e) {
-                throw e.toTangoException();
-            }
-        }
-        get_logger().info("Exiting get_att_data_min_between_dates()");
-        return argout;
-    }
-
-    // =========================================================
-    /**
-     * Execute command "GetAttDataSupThan" on device. Retrieves all the data
-     * that are higher than the given value x. Create a dynamic attribute,
-     * retrieve the corresponding data from database and prepare result for
-     * attribute_history call.
-     * 
-     * @param argin
-     *            The attribute's name and the lower limit
-     * @return String : The new created dynamic attribute name, Long : the
-     *         number of data.
-     */
-    // =========================================================
-    public DevVarLongStringArray get_att_data_sup_than(final String[] argin) throws DevFailed {
-        get_logger().info("Entering get_att_data_sup_than()");
-        reconnectDatabaseIfNecessary();
-        DevVarLongStringArray argout = null;
-        // ---Add your Own code to control device here ---
-        if (argin.length != 2) {
-            Except.throw_exception("CONFIGURATION_ERROR", "Wrong number of parameters",
-                    "TdbExtractor.get_att_scalar_data_sup_than");
-        } else if (dbProxy != null) {
-            try {
-                ((TDBDataBaseManager) dbProxy.getDataBase()).getTdbExport().ExportData2Tdb(argin[0], getTimeNow());
-                // Get data from db.
-                final DbData dbData = dbProxy.getDataBase().getExtractor().getInfSupGetters().getAttDataSupThan(argin);
-                // Buid an attribute and gets its references
-                argout = add_attribute(dbData);
-            } catch (final ArchivingException e) {
-                throw e.toTangoException();
-            } catch (final java.lang.OutOfMemoryError oome) {
-                get_logger().info("OutOfMemoryError in get_att_data_sup_than");
-                Except.throw_exception("MEMORY_ERROR", HintOnMemoryError, "TdbExtractor.get_att_data_sup_than");
-            }
-        }
-        get_logger().info("Exiting get_att_data_sup_than()");
-        return argout;
-    }
-
-    // =========================================================
-    /**
-     * Execute command "GetAttDataSupThanCount" on device. Returns the number of
-     * data higher than the given value.
-     * 
-     * @param argin
-     *            The attribute's name and the lower limit.
-     * @return The number of data higher than the given value.
-     */
-    // =========================================================
-    public int get_att_data_sup_than_count(final String[] argin) throws DevFailed {
-        get_logger().info("Entering get_att_data_sup_than_count()");
-        reconnectDatabaseIfNecessary();
-        int argout = 0;
-        // ---Add your Own code to control device here ---
-        if (argin.length != 2) {
-            Except.throw_exception("CONFIGURATION_ERROR", "Wrong number of parameters",
-                    "TdbExtractor.get_att_scalar_data_sup_than_count");
-        } else if (dbProxy != null) {
-            try {
-                ((TDBDataBaseManager) dbProxy.getDataBase()).getTdbExport().ExportData2Tdb(argin[0], getTimeNow());
-
-                argout = dbProxy.getDataBase().getExtractor().getInfSupGetters().getAttDataSupThanCount(argin);
-            } catch (final ArchivingException e) {
-                throw e.toTangoException();
-            }
-        }
-        get_logger().info("Exiting get_att_data_sup_than_count()");
-        return argout;
-    }
-
-    // =========================================================
-    /**
-     * Execute command "GetAttDataSupAndInfThan" on device. Retrieves all data
-     * that are higher than the given value x AND lower than the given value y.
-     * Create a dynamic attribute, retrieve the corresponding data from database
-     * and prepare result for attribute_history call.
-     * 
-     * @param argin
-     *            The attribute's name, the lower limit and the upper limit
-     * @return String : The new created dynamic attribute name, Long : the
-     *         number of data.
-     */
-    // =========================================================
-    public DevVarLongStringArray get_att_data_sup_and_inf_than(final String[] argin) throws DevFailed {
-        get_logger().info("Entering get_att_data_sup_and_inf_than()");
-        reconnectDatabaseIfNecessary();
-        DevVarLongStringArray argout = null;
-        // ---Add your Own code to control device here ---
-        if (argin.length != 3) {
-            Except.throw_exception("CONFIGURATION_ERROR", "Wrong number of parameters",
-                    "TdbExtractor.get_att_scalar_data_sup_and_inf_than");
-        } else if (dbProxy != null) {
-            try {
-                ((TDBDataBaseManager) dbProxy.getDataBase()).getTdbExport().ExportData2Tdb(argin[0], getTimeNow());
-
-                // Get data from db.
-                final DbData dbData = dbProxy.getDataBase().getExtractor().getInfSupGetters()
-                        .getAttDataSupAndInfThan(argin);
-                // Buid an attribute and gets its references
-                argout = add_attribute(dbData);
-            } catch (final ArchivingException e) {
-                throw e.toTangoException();
-            } catch (final java.lang.OutOfMemoryError oome) {
-                get_logger().info("OutOfMemoryError in get_att_data_sup_and_inf_than");
-                Except.throw_exception("MEMORY_ERROR", HintOnMemoryError, "TdbExtractor.get_att_data_sup_and_inf_than");
-            }
-        }
-        get_logger().info("Exiting get_att_data_sup_and_inf_than()");
-        return argout;
-    }
-
-    // =========================================================
-    /**
-     * Execute command "GetAttDataSupAndInfThanCount" on device. Returns data
-     * that are highter than the given value x AND lower than the given value y.
-     * 
-     * @param argin
-     *            The attribute's name, the lower limit and the upper limit
-     * @return The data that are highter than the given value x AND lower than
-     *         the given value y.
-     */
-    // =========================================================
-    public int get_att_data_sup_and_inf_than_count(final String[] argin) throws DevFailed {
-        get_logger().info("Entering get_att_data_sup_and_inf_than_count()");
-        reconnectDatabaseIfNecessary();
-        int argout = 0;
-        // ---Add your Own code to control device here ---
-        if (argin.length != 3) {
-            Except.throw_exception("CONFIGURATION_ERROR", "Wrong number of parameters",
-                    "TdbExtractor.get_att_scalar_data_sup_and_inf_than_count");
-        } else if (db_dev != null) {
-            try {
-                ((TDBDataBaseManager) dbProxy.getDataBase()).getTdbExport().ExportData2Tdb(argin[0], getTimeNow());
-
-                argout = dbProxy.getDataBase().getExtractor().getInfSupGetters().getAttDataSupAndInfThanCount(argin);
-            } catch (final ArchivingException e) {
-                throw e.toTangoException();
-            }
-        }
-        get_logger().info("Exiting get_att_data_sup_and_inf_than_count()");
-        return argout;
-    }
-
-    // =========================================================
-    /**
-     * Execute command "GetAttDataSupAndInfThanBetweenDates" on device.
-     * Retrieves data beetwen two dates (date_1 & date_2) - Data are higher than
-     * the given value x AND lower than the given value y. Create a dynamic
-     * attribute, retrieve the corresponding data from database and prepare
-     * result for attribute_history call.
-     * 
-     * @param argin
-     *            The attribute's name, the lower limit, the upper limit, the
-     *            beginning date (DD-MM-YYYY HH24:MI:SS) and the ending date
-     *            (DD-MM-YYYY HH24:MI:SS)
-     * @return String : The new created dynamic attribute name, Long : the
-     *         number of data.
-     */
-    // =========================================================
-    public DevVarLongStringArray get_att_data_sup_and_inf_than_between_dates(final String[] argin) throws DevFailed {
-        get_logger().info("Entering get_att_data_sup_and_inf_than_between_dates()");
-        reconnectDatabaseIfNecessary();
-        DevVarLongStringArray argout = null;
-        // ---Add your Own code to control device here ---
-        if (argin.length != 5) {
-            Except.throw_exception("CONFIGURATION_ERROR", "Wrong number of parameters",
-                    "TdbExtractor.get_att_scalar_data_sup_and_inf_than_beetween_dates");
-        } else if (dbProxy != null) {
-            try {
-                ((TDBDataBaseManager) dbProxy.getDataBase()).getTdbExport().ExportData2Tdb(argin[0], argin[4]);
-
-                // Get data from db.
-                final DbData dbData = dbProxy.getDataBase().getExtractor().getInfSupGettersBetweenDates()
-                        .getAttDataSupAndInfThanBetweenDates(argin);
-                // Buid an attribute and gets its references
-                argout = add_attribute(dbData);
-            } catch (final ArchivingException e) {
-                throw e.toTangoException();
-            } catch (final java.lang.OutOfMemoryError oome) {
-                get_logger().info("OutOfMemoryError in get_att_data_sup_and_inf_than_between_dates");
-                Except.throw_exception("MEMORY_ERROR", HintOnMemoryError,
-                        "TdbExtractor.get_att_data_sup_and_inf_than_between_dates");
-            }
-        }
-        get_logger().info("Exiting get_att_data_sup_and_inf_than_between_dates()");
-        return argout;
-    }
-
-    // =========================================================
-    /**
-     * Execute command "GetAttDataSupAndInfThanBetweenDatesCount" on device.
-     * Returns the number of data higher than the given value x, (AND) lower
-     * than the given value y, and beetwen two dates (date_1 & date_2).
-     * 
-     * @param argin
-     *            The attribute's name, the lower limit, the upper limit, the
-     *            beginning date (DD-MM-YYYY HH24:MI:SS) and the ending date
-     *            (DD-MM-YYYY HH24:MI:SS).
-     * @return The number of data higher than the given value x, (AND) lower
-     *         than the given value y, and beetwen two dates (date_1 & date_2).
-     */
-    // =========================================================
-    public int get_att_data_sup_and_inf_than_between_dates_count(final String[] argin) throws DevFailed {
-        get_logger().info("Entering get_att_data_sup_and_inf_than_between_dates_count()");
-        reconnectDatabaseIfNecessary();
-        int argout = 0;
-        // ---Add your Own code to control device here ---
-        if (argin.length != 5) {
-            Except.throw_exception("CONFIGURATION_ERROR", "Wrong number of parameters",
-                    "TdbExtractor.get_att_scalar_data_sup_and_inf_than_between_dates_count");
-        } else if (dbProxy != null) {
-            try {
-                ((TDBDataBaseManager) dbProxy.getDataBase()).getTdbExport().ExportData2Tdb(argin[0], argin[4]);
-
-                argout = dbProxy.getDataBase().getExtractor().getInfSupGettersBetweenDates()
-                        .getAttDataSupAndInfThanBetweenDatesCount(argin);
-            } catch (final ArchivingException e) {
-                throw e.toTangoException();
-            }
-        }
-        get_logger().info("Exiting get_att_data_sup_and_inf_than_between_dates_count()");
-        return argout;
-    }
-
-    // =========================================================
-    /**
-     * Execute command "GetAttDataSupThanBetweenDates" on device. Retrieves data
-     * beetwen two dates (date_1 & date_2) - Data are higher than the given
-     * value x. Create a dynamic attribute, retrieve the corresponding data from
-     * database and prepare result for attribute_history call.
-     * 
-     * @param argin
-     *            The attribute's name, the lower limit, the beginning date
-     *            (DD-MM-YYYY HH24:MI:SS) and the ending date (DD-MM-YYYY
-     *            HH24:MI:SS)
-     * @return String : The new created dynamic attribute name, Long : the
-     *         number of data.
-     */
-    // =========================================================
-    public DevVarLongStringArray get_att_data_sup_than_between_dates(final String[] argin) throws DevFailed {
-        get_logger().info("Entering get_att_data_sup_than_between_dates()");
-        reconnectDatabaseIfNecessary();
-        DevVarLongStringArray argout = null;
-        // ---Add your Own code to control device here ---
-        if (argin.length != 4) {
-            Except.throw_exception("CONFIGURATION_ERROR", "Wrong number of parameters",
-                    "TdbExtractor.get_att_scalar_data_sup_than_beetween_dates");
-        } else if (dbProxy != null) {
-            try {
-                ((TDBDataBaseManager) dbProxy.getDataBase()).getTdbExport().ExportData2Tdb(argin[0], argin[3]);
-                final DbData dbData = dbProxy.getDataBase().getExtractor().getInfSupGettersBetweenDates()
-                        .getAttDataSupThanBetweenDates(argin);
-                // Buid an attribute and gets its references
-                argout = add_attribute(dbData);
-            } catch (final ArchivingException e) {
-                throw e.toTangoException();
-            } catch (final java.lang.OutOfMemoryError oome) {
-                get_logger().info("OutOfMemoryError in get_att_data_sup_than_between_dates");
-                Except.throw_exception("MEMORY_ERROR", HintOnMemoryError,
-                        "TdbExtractor.get_att_data_sup_than_between_dates");
-            }
-        }
-        get_logger().info("Exiting get_att_data_sup_than_between_dates()");
-        return argout;
-    }
-
-    // =========================================================
-    /**
-     * Execute command "GetAttDataSupThanBetweenDatesCount" on device. Returns
-     * the number of data higher than the given value y, and beetwen two dates
-     * (date_1 & date_2).
-     * 
-     * @param argin
-     *            The attribute's name, the lower limit, the beginning date
-     *            (DD-MM-YYYY HH24:MI:SS) and the ending date (DD-MM-YYYY
-     *            HH24:MI:SS).
-     * @return The number of data higher than the given value y, and beetwen two
-     *         dates (date_1 & date_2).
-     */
-    // =========================================================
-    public int get_att_data_sup_than_between_dates_count(final String[] argin) throws DevFailed {
-        get_logger().info("Entering get_att_data_sup_than_between_dates_count()");
-        reconnectDatabaseIfNecessary();
-        int argout = 0;
-        // ---Add your Own code to control device here ---
-        if (argin.length != 4) {
-            Except.throw_exception("CONFIGURATION_ERROR", "Wrong number of parameters",
-                    "TdbExtractor.get_att_scalar_data_sup_than_between_dates_count");
-        } else if (dbProxy != null) {
-            try {
-                ((TDBDataBaseManager) dbProxy.getDataBase()).getTdbExport().ExportData2Tdb(argin[0], argin[3]);
-                argout = dbProxy.getDataBase().getExtractor().getInfSupGettersBetweenDates()
-                        .getAttDataSupThanBetweenDatesCount(argin);
-            } catch (final ArchivingException e) {
-                throw e.toTangoException();
-            }
-        }
-        get_logger().info("Exiting get_att_data_sup_than_between_dates_count()");
-        return argout;
-    }
-
-    // =========================================================
-    /**
-     * Execute command "RemoveDynamicAttribute" on device. Remove the dynamic
-     * attribute.
-     * 
-     * @param argin
-     *            The TdbExtractor dynamic attribute's name
-     */
-    // =========================================================
-    public void remove_dynamic_attribute(final String argin) throws DevFailed {
-        get_logger().info("Entering remove_dynamic_attribute()");
-
-        // ---Add your Own code to control device here ---
-        // Remove prop for the attribute
-        final String[] obj_to_del = new String[3];
-        obj_to_del[0] = device_name;
-        obj_to_del[1] = "attribute";
-        obj_to_del[2] = argin;
-        final Util tg = Util.instance();
-        tg.get_dserver_device().rem_obj_polling(obj_to_del, false);
-
-        // Remove the attribute
-        remove_attribute(argin);
-        get_logger().info("Exiting remove_dynamic_attribute()");
-    }
-
-    private DevVarLongStringArray add_attribute(final DbData dbData) throws DevFailed, ArchivingException {
-        if (dbData.getTimedData() == null || dbData.getTimedData().length == 0) {
-            // final String message = "Can't create the dynamic attribute!";
-            // final String reason = "The data is empty.";
-            // final String desc =
-            // "add_attribute/The DbData argument is empty.";
-            // throw new ArchivingException(message , reason , null , desc ,
-            // this.getClass().getName());
-            final int[] lv = { 0 };
-            final String[] sv = { "NO_DATA" };
-            final DevVarLongStringArray res = new DevVarLongStringArray(lv, sv);
-            return res;
-
-        }
-
-        final boolean _2value = dbData.getWritable() == AttrWriteType._READ_WITH_WRITE
-                || dbData.getWritable() == AttrWriteType._READ_WRITE ? true : false;
-        String random_name_1 = "", random_name_2 = "";
-        String[] names;
-        // Build new Attribute's name
-        final boolean firstIsRead = dbData.getWritable() != AttrWriteType._WRITE;
-        // random_name_1 = "att_000" + id++;
-        random_name_1 = getName(dbData.getName(), id, firstIsRead);
-        if (_2value) {
-            // random_name_2 = "att_000" + id++;
-            random_name_2 = getName(dbData.getName(), id, !firstIsRead);
-        }
-        id++;
-
-        if (!_2value) {
-            names = new String[1];
-            names[0] = random_name_1;
-        } else {
-            names = new String[2];
-            names[0] = random_name_1;
-            names[1] = random_name_2;
-        }
-
-        // Create the attribute depends on DataFormat
-        int data_type;
-        data_type = dbData.getDataType();
-        if (data_type == TangoConst.Tango_DEV_STATE) {
-            // The STATE type attributes are translated in STRING TYPE because
-            // the State type is not well
-            // managed in Tango layers
-            data_type = TangoConst.Tango_DEV_STRING;
-        } else if (data_type == TangoConst.Tango_DEV_USHORT || data_type == TangoConst.Tango_DEV_UCHAR) {
-            // U_* types are not supported by polling buffer, so use another
-            // supported type
-            data_type = TangoConst.Tango_DEV_SHORT;
-        } else if (data_type == TangoConst.Tango_DEV_ULONG) {
-            data_type = TangoConst.Tango_DEV_LONG;
-        } else if (data_type == TangoConst.Tango_DEV_ULONG64) {
-            data_type = TangoConst.Tango_DEV_LONG64;
-        }
-
-        switch (dbData.getDataFormat()) {
-            case AttrDataFormat._SCALAR:
-                // TODO Correction Tango � reporter !! Tango [Java side] ne
-                // supporte pas les attributs READ-WRITE.
-                // add_attribute(new Attr(random_name_1, dbData.getData_type(),
-                // AttrWriteType.from_int(dbData.getWritable())));
-
-                add_attribute(new Attr(random_name_1, data_type, AttrWriteType.READ));
-                if (_2value) {
-                    add_attribute(new Attr(random_name_2, data_type, AttrWriteType.READ));
-                }
-                break;
-            case AttrDataFormat._SPECTRUM:
-                int dimX = dbData.getMaxX();
-                if (dimX == 0) {
-                    dimX = 1;
-                }
-                add_attribute(new SpectrumAttr(random_name_1, data_type, dimX));
-                if (_2value) {
-                    add_attribute(new SpectrumAttr(random_name_2, data_type, dimX));
-                }
-                break;
-            case AttrDataFormat._IMAGE:
-                add_attribute(new ImageAttr(random_name_1, data_type, dbData.getMaxX(), dbData.getMaxY()));
-                break;
-        }
-
-        get_logger().info("attr " + random_name_1 + " created");
-        if (_2value) {
-            get_logger().info("attr " + random_name_2 + " created");
-        }
-        set_polled_attr(names);
-        set_poll_ring_depth(dbData.size());
-
-        // Start polling for this device in external sync. mode (udt = 0)
-        DevVarLongStringArray poll_1, poll_2;
-        poll_1 = new DevVarLongStringArray();
-        poll_2 = new DevVarLongStringArray();
-
-        poll_1.lvalue = new int[1];
-        poll_1.lvalue[0] = 0;
-        poll_1.svalue = new String[3];
-        poll_1.svalue[0] = device_name;
-        poll_1.svalue[1] = "attribute";
-        poll_1.svalue[2] = random_name_1;
-
-        if (_2value) {
-            poll_2.lvalue = new int[1];
-            poll_2.lvalue[0] = 0;
-            poll_2.svalue = new String[3];
-            poll_2.svalue[0] = device_name;
-            poll_2.svalue[1] = "attribute";
-            poll_2.svalue[2] = random_name_2;
-        }
-        final Util tg_1 = Util.instance();
-        tg_1.get_dserver_device().add_obj_polling(poll_1, false);
-
-        final Util tg_2 = Util.instance();
-        if (_2value) {
-            tg_2.get_dserver_device().add_obj_polling(poll_2, false);
-        }
-
-        // And fill buffer with database's data
-        try {
-            if (_2value) {
-                final DbData[] dbDatas = dbData.splitDbData();
-                tg_1.fill_attr_polling_buffer(this, random_name_1, dbDatas[0].getDataAsTimedAttrData());
-                tg_2.fill_attr_polling_buffer(this, random_name_2, dbDatas[1].getDataAsTimedAttrData());
-            } else {
-                tg_1.fill_attr_polling_buffer(this, random_name_1, dbData.getDataAsTimedAttrData());
-            }
-        } catch (final DevFailed e) {
-            throw e;
-        } catch (final Exception e) {
-            // FIXME java.lang.ArrayIndexOutOfBoundsException thrown when some
-            // data are empty.
-            e.printStackTrace();
-            System.out.println("ERROR when filling data polling buffer, may be empty");
-        }
-
-        final DevVarLongStringArray argout = new DevVarLongStringArray();
-        argout.lvalue = new int[1];
-        if (!_2value) {
-            argout.svalue = new String[1];
-        } else {
-            argout.svalue = new String[2];
-        }
-
-        argout.lvalue[0] = dbData.getTimedData().length;
-        argout.svalue[0] = random_name_1;
-        if (_2value) {
-            argout.svalue[1] = random_name_2;
-        }
-
-        return argout;
-    }
-
-    public String getName(final String completeName, final int id, final boolean isReadValue) {
-        final String partialName = getPartialName(completeName);
-        final String marker = isReadValue ? "r" : "w";
-
-        final StringBuilder buff = new StringBuilder();
-        buff.append(partialName);
-        buff.append("_");
-        buff.append(String.valueOf(id));
-        buff.append("_");
-        buff.append(marker);
-
-        return buff.toString().toLowerCase();
-    }
-
-    /**
-     * @param completeName
-     * @return
-     */
-    private String getPartialName(final String completeName) {
-        try {
-            final StringTokenizer st = new StringTokenizer(completeName, "/");
-            st.nextToken();// domain
-            st.nextToken();// family
-            st.nextToken();// member
-            return st.nextToken();// attribute
-        } catch (final Exception e) {
-            e.printStackTrace();
-            return null;
-        }
-    }
-
-    /*
-     * private DevVarLongStringArray add_attribute(DbData dbData) throws
-     * DevFailed { DevVarLongStringArray argout = new DevVarLongStringArray();
-     * boolean _2value = ( dbData.getWritable() ==
-     * AttrWriteType._READ_WITH_WRITE || dbData.getWritable() ==
-     * AttrWriteType._READ_WRITE ) ? true : false; String random_name_1 = "" ,
-     * random_name_2 = ""; String[] names; // Build new Attribute's name
-     * random_name_1 = "att_000" + id++; if ( _2value ) random_name_2 =
-     * "att_000" + id++; if ( !_2value ) { names = new String[ 1 ]; names[ 0 ] =
-     * random_name_1; } else { names = new String[ 2 ]; names[ 0 ] =
-     * random_name_1; names[ 1 ] = random_name_2; } // Create the attribute
-     * depends on DataFormat switch ( dbData.getData_format() ) { case
-     * AttrDataFormat._SCALAR: // TODO Correction Tango � reporter !! Tango
-     * [Java side] ne supporte pas les attributs READ-WRITE. //add_attribute(new
-     * Attr(random_name_1, dbData.getData_type(),
-     * AttrWriteType.from_int(dbData.getWritable()))); add_attribute(new
-     * Attr(random_name_1 , dbData.getData_type() , AttrWriteType.READ)); if (
-     * _2value ) add_attribute(new Attr(random_name_2 , dbData.getData_type() ,
-     * AttrWriteType.READ)); break; case AttrDataFormat._SPECTRUM:
-     * add_attribute(new SpectrumAttr(random_name_1 , dbData.getData_type() ,
-     * dbData.getMax_x())); break; case AttrDataFormat._IMAGE: add_attribute(new
-     * ImageAttr(random_name_1 , dbData.getData_type() , dbData.getMax_x() ,
-     * dbData.getMax_y())); break; } get_logger().info("attr " + random_name_1 +
-     * " created"); if ( _2value ) get_logger().info("attr " + random_name_2 +
-     * " created"); set_polled_attr(names); set_poll_ring_depth(dbData.size());
-     * // Start polling for this device in external sync. mode (udt = 0)
-     * DevVarLongStringArray poll_1 , poll_2; poll_1 = new
-     * DevVarLongStringArray(); poll_2 = new DevVarLongStringArray();
-     * poll_1.lvalue = new int[ 1 ]; poll_1.lvalue[ 0 ] = 0; poll_1.svalue = new
-     * String[ 3 ]; poll_1.svalue[ 0 ] = device_name; poll_1.svalue[ 1 ] =
-     * "attribute"; poll_1.svalue[ 2 ] = random_name_1; if ( _2value ) {
-     * poll_2.lvalue = new int[ 1 ]; poll_2.lvalue[ 0 ] = 0; poll_2.svalue = new
-     * String[ 3 ]; poll_2.svalue[ 0 ] = device_name; poll_2.svalue[ 1 ] =
-     * "attribute"; poll_2.svalue[ 2 ] = random_name_2; } Util tg_1 =
-     * Util.instance(); tg_1.get_dserver_device().add_obj_polling(poll_1 ,
-     * false); Util tg_2 = Util.instance(); if ( _2value )
-     * tg_2.get_dserver_device().add_obj_polling(poll_2 , false); // And fill
-     * buffer with database's data DbData[] dbDatas = dbData.splitDbData();
-     * tg_1.fill_attr_polling_buffer(this , random_name_1 , dbDatas[ 0
-     * ].getData()); if ( _2value ) tg_2.fill_attr_polling_buffer(this ,
-     * random_name_2 , dbDatas[ 1 ].getData()); argout = new
-     * DevVarLongStringArray(); argout.lvalue = new int[ 1 ]; if ( !_2value ) {
-     * argout.svalue = new String[ 1 ]; } else { argout.svalue = new String[ 2
-     * ]; } argout.lvalue[ 0 ] = dbData.getData().length; argout.svalue[ 0 ] =
-     * random_name_1; if ( _2value ) argout.svalue[ 1 ] = random_name_2; return
-     * argout; }
-     */
-    // ===================================================================
-    /**
-     * Method called by the read_attributes CORBA operation to set internal
-     * attribute value.
-     * 
-     * @param attr
-     *            reference to the Attribute object
-     */
-    // ===================================================================
-    @Override
-    public void read_attr(final Attribute attr) throws DevFailed {
-        final String attr_name = attr.get_name();
-        // get_logger().info("In read_attr for attribute " + attr_name);
-
-        // Switch on attribute name
-        // ---------------------------------
-        if (attr_name == "version") {
-            // Add your own code here
-            attr.set_value(m_version);
-        }
-    }
-
-    public String get_max_time(final String argin) throws DevFailed {
-        reconnectDatabaseIfNecessary();
-        String argout;
-        if (dbProxy == null) {
-            argout = "";
-        } else {
-            try {
-                final DataBaseManager db = dbProxy.getDataBase();
-                final Timestamp last = db.getDbUtil().getTimeOfLastInsert(argin, true);
-                if (last == null) {
-                    argout = "NO VALUES RECORDED";
-                } else {
-                    argout = last.toString();
-                }
-            } catch (final ArchivingException e) {
-                e.printStackTrace();
-                throw e.toTangoException();
-            }
-        }
-        return argout;
-    }
-
-    public String get_min_time(final String argin) throws DevFailed {
-        reconnectDatabaseIfNecessary();
-        String argout;
-        if (dbProxy == null) {
-            argout = "";
-        } else {
-            try {
-                final DataBaseManager db = dbProxy.getDataBase();
-                final Timestamp last = db.getDbUtil().getTimeOfLastInsert(argin, false);
-                if (last == null) {
-                    argout = "NO VALUES RECORDED";
-                } else {
-                    argout = last.toString();
-                }
-            } catch (final ArchivingException e) {
-                e.printStackTrace();
-                throw e.toTangoException();
-            }
-        }
-        return argout;
-    }
-
-    /*
-    *
-    */
-    public static String getTimeNow() {
-        // TODO Auto-generated method stub
-        final long _now = System.currentTimeMillis();
-        return new Timestamp(_now).toString();
-
-    }
-
-    @Override
-    public void delete_device() throws DevFailed {
-        // TODO Auto-generated method stub
-
-    }
-
-    // =========================================================
-    /**
-     * main part for the device server class
-     */
-    // =========================================================
-    public static void main(final String[] argv) {
-        try {
-            final Util tg = Util.init(argv, "TdbExtractor");
-            tg.server_init();
-
-            System.out.println("Ready to accept request");
-
-            tg.server_run();
-        } catch (final OutOfMemoryError ex) {
-            System.err.println("Can't allocate memory !!!!");
-            System.err.println("Exiting");
-        } catch (final UserException ex) {
-            Except.print_exception(ex);
-
-            System.err.println("Received a CORBA user exception");
-            System.err.println("Exiting");
-        } catch (final SystemException ex) {
-            Except.print_exception(ex);
-
-            System.err.println("Received a CORBA system exception");
-            System.err.println("Exiting");
-        }
-        System.exit(-1);
-    }
-
-}
-// --------------------------------------------------------------------------
-/*
- * end of $Source:
- * /cvsroot/tango-cs/archiving/server/hdbtdbArchivingServers/src/
- * main/java/TdbExtractor/TdbExtractor.java,v $
- */
+// +============================================================================
+// $Source:
+// /cvsroot/tango-cs/archiving/server/hdbtdbArchivingServers/src/main/java/TdbExtractor/TdbExtractor.java,v
+// $
+//
+// project : Tango Device Server
+//
+// Description: java source code for the TdbExtractor class and its commands.
+// This class is derived from DeviceImpl class.
+// It represents the CORBA servant obbject which
+// will be accessed from the network. All commands which
+// can be executed on the TdbExtractor are implemented
+// in this file.
+//
+// $Author: candelrg $
+//
+// $Revision: 28797 $
+//
+// $Log$
+// Revision 1.16  2010/11/19 16:17:40  abeilleg
+// remove critical of findbugs
+//
+// Revision 1.15  2010/08/17 09:50:10  pierrejoseph
+// correction in the getArchivingMode
+//
+// Revision 1.14  2010/08/04 07:28:22  pierrejoseph
+// delete_device method addition - must be implemented
+//
+// Revision 1.13  2010/08/03 11:55:59  pierrejoseph
+// Remove not useful traces
+//
+// Revision 1.12  2010/01/21 14:56:42  extia-soleil
+// AW (Extia) - Mantis 14438:
+// - Added commands to get the full name of an attribute from its id, in HDB and TDB
+//
+// Revision 1.11 2009/12/17 12:47:15 pierrejoseph
+// CheckStyle: Organize imports / Format
+//
+// Revision 1.10 2009/09/04 13:13:49 soleilarc
+// fix java 6 bug: remove singleton from constructor
+//
+// Revision 1.9 2009/08/10 14:04:43 soleilarc
+// Oracle RAC connection
+//
+// Revision 1.8 2009/06/12 15:00:40 soleilarc
+// Api: new architecture
+//
+// Revision 1.6 2008/08/01 13:16:22 soleilarc
+// Bug: 9378: Extract data from file when the needed respecting the export
+// period and the extract precision value.
+//
+// Revision 1.5 2008/07/11 07:49:12 soleilarc
+// Solve Bug n�8827: remove Corba exception when getting data between an invalid
+// dates.
+//
+// Revision 1.4 2008/05/07 16:37:39 pierrejoseph
+// The tango state type is transformed in string type before the dynamic
+// attribut creation because the state type.
+//
+// Revision 1.3 2008/04/08 11:34:58 pierrejoseph
+// G�n�ration automatique de la version des devices.
+//
+// Revision 1.2 2008/03/21 16:46:16 pierrejoseph
+// minor change
+//
+// Revision 1.1 2008/02/28 15:37:15 pierrejoseph
+// TdbExtractor has been forgotten
+//
+// Revision 1.28 2007/05/11 13:58:54 pierrejoseph
+// Attribute addition : release version
+//
+// Revision 1.27 2007/03/16 14:09:35 ounsy
+// minor changes
+//
+// Revision 1.26 2007/03/16 08:44:14 ounsy
+// added a GetMinTime command
+//
+// Revision 1.25 2007/03/05 16:25:20 ounsy
+// non-static DataBase
+//
+// Revision 1.24 2007/03/02 08:46:02 ounsy
+// added the GetMaxTime command
+//
+// Revision 1.23 2007/03/01 10:08:01 ounsy
+// added the RemoveDynamicAttributes command
+//
+// Revision 1.22 2007/02/26 16:14:24 ounsy
+// archiving devices now inherits just from DeviceImpl instead of
+// DeviceImplWithShutdownRunnable (they're nonlonger unexported onn shutdown)
+//
+// Revision 1.21 2007/02/08 08:44:15 pierrejoseph
+// The method getAttData is no more available (costly).
+//
+// Revision 1.20 2007/02/05 17:04:52 ounsy
+// corrected a bug for spectrum attributes with an empty value
+//
+// Revision 1.19 2006/12/06 10:17:06 ounsy
+// minor changes
+//
+// Revision 1.18 2006/11/30 15:30:15 ounsy
+// corrected a bug in add_attribute() when the extracted DbData is empty; the
+// dynamic attribute is no longer created, and a DevFailed is recieved instead
+//
+// Revision 1.17 2006/11/20 09:24:49 ounsy
+// minor changes
+//
+// Revision 1.16 2006/11/13 15:57:37 ounsy
+// all java devices now inherit from UnexportOnShutdownDeviceImpl instead of
+// from DeviceImpl
+//
+// Revision 1.15 2006/10/31 16:54:12 ounsy
+// milliseconds and null values management
+//
+// Revision 1.14 2006/10/09 12:56:28 chinkumo
+// A specific exception is raised when an outOfMemory error appeared, for the
+// methods who generate dynamics attributes.
+//
+// Revision 1.13 2006/09/07 13:48:30 ounsy
+// added extraction with sampling methods
+//
+// Revision 1.12 2006/09/05 12:25:16 ounsy
+// updated for sampling compatibility
+//
+// Revision 1.11 2006/07/24 09:55:22 ounsy
+// now uses buffered attribute ids
+//
+// Revision 1.10 2006/02/15 13:11:44 ounsy
+// organized imports
+//
+// Revision 1.9 2006/02/07 11:57:49 ounsy
+// small changes in logs
+//
+// Revision 1.8 2006/01/27 13:07:20 ounsy
+// organised imports
+//
+// Revision 1.7 2005/11/29 17:32:48 chinkumo
+// no message
+//
+// Revision 1.6.10.4 2005/11/29 16:13:31 chinkumo
+// Code reformated (pogo compatible)
+//
+// Revision 1.6.10.3 2005/11/15 13:45:16 chinkumo
+// ...
+//
+// Revision 1.6.10.2 2005/09/26 07:58:42 chinkumo
+// Every commands of shape 'getAttDataXXXXCount(...)' was changed. The type of
+// their returned object was changed from 'short' to 'long'.
+//
+// Revision 1.6.10.1 2005/09/09 10:37:47 chinkumo
+// Since the extraction politic changed to 'dynamic attributes', the device was
+// pogo-regenerated.
+//
+//
+// copyleft : European Synchrotron Radiation Facility
+// BP 220, Grenoble 38043
+// FRANCE
+//
+// -============================================================================
+//
+// This file is generated by POGO
+// (Program Obviously used to Generate tango Object)
+//
+// (c) - Software Engineering Group - ESRF
+// =============================================================================
+
+package TdbExtractor;
+
+import java.lang.reflect.Array;
+import java.sql.Timestamp;
+import java.util.StringTokenizer;
+
+import fr.soleil.archiving.hdbtdb.api.ConfigConst;
+import fr.soleil.database.connection.DataBaseParameters;
+import org.omg.CORBA.SystemException;
+import org.omg.CORBA.UserException;
+import org.tango.utils.DevFailedUtils;
+
+import TdbExtractor.Proxy.DbProxy;
+import fr.esrf.Tango.AttrDataFormat;
+import fr.esrf.Tango.AttrWriteType;
+import fr.esrf.Tango.DevError;
+import fr.esrf.Tango.DevFailed;
+import fr.esrf.Tango.DevState;
+import fr.esrf.Tango.DevVarDoubleStringArray;
+import fr.esrf.Tango.DevVarLongStringArray;
+import fr.esrf.Tango.ErrSeverity;
+import fr.esrf.TangoApi.DbDevice;
+import fr.esrf.TangoDs.Attr;
+import fr.esrf.TangoDs.Attribute;
+import fr.esrf.TangoDs.DeviceClass;
+import fr.esrf.TangoDs.DeviceImpl;
+import fr.esrf.TangoDs.Except;
+import fr.esrf.TangoDs.ImageAttr;
+import fr.esrf.TangoDs.SpectrumAttr;
+import fr.esrf.TangoDs.TangoConst;
+import fr.esrf.TangoDs.Util;
+import fr.soleil.archiving.common.api.exception.ArchivingException;
+import fr.soleil.archiving.common.api.tools.DbData;
+import fr.soleil.archiving.common.api.tools.NullableTimedData;
+import fr.soleil.archiving.hdbtdb.api.DataBaseManager;
+import fr.soleil.archiving.hdbtdb.api.HdbTdbConnectionParameters;
+import fr.soleil.archiving.hdbtdb.api.TDBDataBaseManager;
+import fr.soleil.archiving.hdbtdb.api.management.attributes.adtapt.IAdtAptAttributes;
+import fr.soleil.archiving.hdbtdb.api.tools.SamplingType;
+import fr.soleil.archiving.hdbtdb.api.tools.mode.Mode;
+import fr.soleil.archiving.hdbtdb.api.utils.database.DbUtils;
+
+/**
+ * Class Description: A DServer used for temporary database's extractions.
+ * 
+ * @author $Author: candelrg $
+ * @version $Revision: 28797 $
+ */
+
+// --------- Start of States Description ----------
+/*
+ * Device States Description:
+ */
+// --------- End of States Description ----------
+
+public class TdbExtractor extends DeviceImpl
+/* WithShutdownRunnable */implements TangoConst {
+
+    // private int state;
+    private DbProxy dbProxy;
+    private final String m_version;
+
+    protected int id = 0;
+
+    public static final String HintOnMemoryError = "Hint: suppress some dynamics attributs before executing this command.";
+
+    // --------------------------------------
+
+    // =========================================================
+    /**
+     * Constructor for simulated Time Device Server.
+     * 
+     * @param cl
+     *            The DeviceClass object
+     * @param s
+     *            The Device name.
+     * @param version
+     *            The device version
+     */
+    // =========================================================
+    public TdbExtractor(final DeviceClass cl, final String s, final String version) throws DevFailed {
+        super(cl, s);
+        m_version = version;
+        init_device();
+    }
+
+    // =========================================================
+    /**
+     * Constructor for simulated Time Device Server.
+     * 
+     * @param cl
+     *            The DeviceClass object
+     * @param s
+     *            The Device name.
+     * @param d
+     *            Device description.
+     * @param version
+     *            The device version
+     */
+    // =========================================================
+    public TdbExtractor(final DeviceClass cl, final String s, final String d, final String version) throws DevFailed {
+        super(cl, s, d);
+        m_version = version;
+        init_device();
+    }
+
+    // =========================================================
+    /**
+     * Initialize the device.
+     */
+    // =========================================================
+    @Override
+    public void init_device() {
+        System.out.println("TdbExtractor() create " + device_name);
+        // Initialise variables to default values
+        // -------------------------------------------
+        connectDatabase();
+        get_logger().info("Exiting init_device()");
+    }
+
+    protected void connectDatabase() {
+        DbDevice device = get_db_device();
+        try {
+            final DataBaseParameters params = new DataBaseParameters();
+            params.setParametersFromTango(ConfigConst.HDB_CLASS_DEVICE);
+            dbProxy = new DbProxy(params);
+        } catch (ArchivingException e) {
+            e.printStackTrace();
+        } catch (DevFailed devFailed) {
+            devFailed.printStackTrace();
+        }
+        if ((dbProxy == null) || (!dbProxy.is_db_connected())) {
+            set_state(DevState.FAULT);
+            set_status(device_name + " : DevState.FAULT" + "\r\n" + "Temporary database connection : " + "FAULT"
+                    + " (may be broken...)" + "\r\n");
+            get_logger().error("ERROR : Database unconnected !!");
+        } else {
+            set_state(DevState.ON);
+            set_status(device_name + " : " + "DevState.ON" + "\r\n" + "Temporary database connection : " + "OK"
+                    + "\r\n");
+        }
+    }
+
+    private synchronized void reconnectDatabaseIfNecessary() {
+        if (dbProxy == null) {
+            connectDatabase();
+        }
+    }
+
+    // =========================================================
+    /**
+     * Method always executed before command execution.
+     */
+    // =========================================================
+    @Override
+    public void always_executed_hook() {
+        // get_logger().info("In always_executed_hook method()");
+    }
+
+    // =========================================================
+    /**
+     * Execute command "GetInfo" on device. Returns misc informations about the
+     * database and a set of parameters characterizing the connection.
+     * 
+     * @return The informations that characterize the database
+     */
+    // =========================================================
+    public String get_info() throws DevFailed {
+        get_logger().info("Entering get_info()");
+        reconnectDatabaseIfNecessary();
+        String argout;
+        if (dbProxy == null) {
+            argout = "";
+        } else {
+            // ---Add your Own code to control device here ---
+            argout = dbProxy.getDataBase().getConnectionInfo();
+            get_logger().info("Exiting get_info()");
+        }
+        return argout;
+    }
+
+    // =========================================================
+    /**
+     * Execute command "GetHost" on device. Returns the connected database host
+     * identifier.
+     * 
+     * @return The connected database host identifier.
+     * @throws DevFailed
+     */
+    // =========================================================
+    public String get_host() throws DevFailed {
+        get_logger().info("Entering get_host()");
+        reconnectDatabaseIfNecessary();
+        // ---Add your Own code to control device here ---
+        String argout = dbProxy == null ? "" : dbProxy.getDataBase().getHost();
+        get_logger().info("Exiting get_host()");
+        return argout;
+    }
+
+    // =========================================================
+    /**
+     * Execute command "GetUser" on device. Gets the current user's name used
+     * for the connection.
+     * 
+     * @return The current user's name used for the connection.
+     * @throws DevFailed
+     */
+    // =========================================================
+    public String get_user() throws DevFailed {
+        get_logger().info("Entering get_user()");
+        reconnectDatabaseIfNecessary();
+        // ---Add your Own code to control device here ---
+        final String argout = dbProxy == null ? "" : dbProxy.getDataBase().getUser();
+        get_logger().info("Exiting get_user()");
+        return argout;
+    }
+
+    // =========================================================
+    /**
+     * Execute command "GetConnectionState" on device. Cheks if the connection
+     * to the temporary database is alive.
+     * 
+     * @return The connection state
+     */
+    // =========================================================
+    public boolean get_connection_state() throws DevFailed {
+        reconnectDatabaseIfNecessary();
+        get_logger().info("Entering get_connection_state()");
+        boolean argout = false;
+       // if (dbProxy != null) {
+            // ---Add your Own code to control device here ---
+         //   try {
+           //     argout = dbProxy.getDataBase().isConnected();
+            //} catch (final ArchivingException e) {
+              //  get_logger().error("Error during get_connection_state()", e);
+                //e.printStackTrace();
+            //}
+        //}
+        get_logger().info("Exiting get_connection_state()");
+        return argout;
+    }
+
+    // =========================================================
+    /**
+     * Execute command "GetAttDefinitionData" on device. Returns an array
+     * containing the differents definition informations for the given
+     * attribute.
+     * 
+     * @param argin
+     *            The attribute's name
+     * @return Differents definition informations for the given attribute
+     */
+    // =========================================================
+    public String[] get_att_definition_data(final String argin) throws DevFailed {
+        get_logger().info("Entering get_att_definition_data()");
+        reconnectDatabaseIfNecessary();
+        String[] argout;
+        // ---Add your Own code to control device here ---
+        try {
+            argout = dbProxy == null ? new String[0] : DbUtils.toStringArray(dbProxy.getDataBase().getAttribute()
+                    .getAttDefinitionData(argin));
+        } catch (final ArchivingException e) {
+            throw e.toTangoException();
+        }
+        get_logger().info("Exiting get_att_definition_data()");
+        return argout;
+    }
+
+    // =========================================================
+    /**
+     * Execute command "GetAttPropertiesData" on device. Gets the differents
+     * properties informations for the given attribute
+     * 
+     * @param argin
+     *            The attribute's name
+     * @return An array containing the differents properties for the given
+     *         attribute
+     */
+    // =========================================================
+    public String[] get_att_properties_data(final String argin) throws DevFailed {
+        get_logger().info("Entering get_att_properties_data()");
+        reconnectDatabaseIfNecessary();
+        String[] argout;
+        if (dbProxy == null) {
+            argout = new String[0];
+        } else {
+            // ---Add your Own code to control device here ---
+            try {
+                IAdtAptAttributes adtAptAttributes = dbProxy.getDataBase().getAttribute();
+                argout = DbUtils.toStringArray(adtAptAttributes.getProperties().getAttPropertiesData(argin,
+                        adtAptAttributes.isCaseSentitiveDatabase()));
+            } catch (final ArchivingException e) {
+                throw e.toTangoException();
+            }
+        }
+        get_logger().info("Exiting get_att_properties_data()");
+        return argout;
+    }
+
+    // =========================================================
+    /**
+     * Execute command "GetAttFullName" on device. Gets for a specified
+     * attribute id its full name as defined in TDB
+     * 
+     * @param argin
+     *            The attribute's id
+     * @return The TDB's full name that characterize the given attribute
+     */
+    // =========================================================
+    public String get_att_full_name(final int argin) throws DevFailed {
+        get_logger().info("Entering get_att_full_name()");
+        reconnectDatabaseIfNecessary();
+        String argout;
+        // ---Add your Own code to control device here ---
+        try {
+            argout = dbProxy == null ? "" : dbProxy.getDataBase().getAttribute().getNames().getAttFullName(argin);
+        } catch (final ArchivingException e) {
+            throw e.toTangoException();
+        }
+        get_logger().info("Exiting get_att_full_name()");
+        return argout;
+    }
+
+    // =========================================================
+    /**
+     * Execute command "GetAttId" on device. Gets for a specified attribute its
+     * ID as defined in TDB
+     * 
+     * @param argin
+     *            The attribute's name
+     * @return The TDB's ID that characterize the given attribute
+     */
+    // =========================================================
+    public int get_att_id(final String argin) throws DevFailed {
+        get_logger().info("Entering get_att_id()");
+        reconnectDatabaseIfNecessary();
+        int argout;
+        if (dbProxy == null) {
+            argout = 0;
+        } else {
+            // ---Add your Own code to control device here ---
+            try {
+                IAdtAptAttributes adtAptAttributes = dbProxy.getDataBase().getAttribute();
+                // argout = ( short ) this.dbProxy.getDataBase().getAttID(argin);
+                argout = adtAptAttributes.getIds().getAttID(argin, adtAptAttributes.isCaseSentitiveDatabase());
+            } catch (final ArchivingException e) {
+                throw e.toTangoException();
+            }
+        }
+        get_logger().info("Exiting get_att_id()");
+        return argout;
+    }
+
+    // =========================================================
+    /**
+     * Execute command "GetAttNameAll" on device. Gets whole list of the
+     * attributes registered in TDB.
+     * 
+     * @return The whole list of the attributes registered in TDB.
+     */
+    // =========================================================
+    public String[] get_att_name_all() throws DevFailed {
+        get_logger().info("Entering get_att_name_all()");
+        reconnectDatabaseIfNecessary();
+        String[] argout;
+        // ---Add your Own code to control device here ---
+        try {
+            argout = dbProxy == null ? new String[0] : DbUtils.toStringArray(dbProxy.getDataBase().getAttribute()
+                    .getNames().getAttributes());
+        } catch (final ArchivingException e) {
+            throw e.toTangoException();
+        }
+        get_logger().info("Exiting get_att_name_all()");
+        return argout;
+    }
+
+    // =========================================================
+    /**
+     * Execute command "GetAttNameFacility" on device. Gets whole list of the
+     * attributes registered in TDB and that belong to the current facility.
+     * 
+     * @return The whole list of the attributes registered in TDB, and that
+     *         belong to the current facility.
+     */
+    // =========================================================
+    public String[] get_att_name_facility() throws DevFailed {
+        get_logger().info("Entering get_att_name_facility()");
+        reconnectDatabaseIfNecessary();
+        String[] argout;
+        // ---Add your Own code to control device here ---
+        try {
+            argout = dbProxy == null ? new String[0] : DbUtils.toStringArray(dbProxy.getDataBase().getAttribute()
+                    .getNames().getAttributes(System.getProperty("TANGO_HOST")));
+        } catch (final ArchivingException e) {
+            throw e.toTangoException();
+        }
+        get_logger().info("Exiting get_att_name_facility()");
+        return argout;
+    }
+
+    // =========================================================
+    /**
+     * Execute command "GetAttNameFilterFormat" on device. Gets the list of
+     * <I>TDB</I> registered attributes for the given format
+     * 
+     * @param argin
+     *            A format [0 -> scalar - 1 -> spectrum - 2 -> image]
+     * @return The filtered list of attributes registered in TDB. The filtering
+     *         is made according to the given format [0 -> scalar - 1 ->
+     *         spectrum - 2 -> image]
+     */
+    // =========================================================
+    public String[] get_att_name_filter_format(final short argin) throws DevFailed {
+        get_logger().info("Entering get_att_name_filter_format()");
+        reconnectDatabaseIfNecessary();
+        String[] argout;
+        // ---Add your Own code to control device here ---
+        try {
+            argout = dbProxy == null ? new String[0] : DbUtils.toStringArray(dbProxy.getDataBase().getAttribute()
+                    .getNames().getAttributesNamesF(argin));
+        } catch (final ArchivingException e) {
+            throw e.toTangoException();
+        }
+        get_logger().info("Exiting get_att_name_filter_format()");
+        return argout;
+    }
+
+    // =========================================================
+    /**
+     * Execute command "GetAttNameFilterType" on device. Gets the list of
+     * <I>TDB</I> registered attributes for the given type
+     * 
+     * @param argin
+     *            A type [2 -> Tango::DevShort | 3 -> Tango::DevLong | 5 ->
+     *            Tango::DevDouble and 8 -> Tango::DevString]
+     * @return The filtered list of attributes registered in TDB. The filtering
+     *         is made according to the given type [2 -> Tango::DevShort | 3 ->
+     *         Tango::DevLong | 5 -> Tango::DevDouble and 8 -> Tango::DevString]
+     */
+    // =========================================================
+    public String[] get_att_name_filter_type(final short argin) throws DevFailed {
+        get_logger().info("Entering get_att_name_filter_type()");
+        reconnectDatabaseIfNecessary();
+        String[] argout;
+        // ---Add your Own code to control device here ---
+        try {
+            argout = dbProxy == null ? new String[0] : DbUtils.toStringArray(dbProxy.getDataBase().getAttribute()
+                    .getNames().getAttributesNamesT(argin));
+        } catch (final ArchivingException e) {
+            throw e.toTangoException();
+        }
+        get_logger().info("Exiting get_att_name_filter_type()");
+        return argout;
+    }
+
+    // =========================================================
+    /**
+     * Execute command "GetAttCountAll" on device. Gets the total number of
+     * attributes defined in TDB.
+     * 
+     * @return The total number of attributes defined in TDB
+     */
+    // =========================================================
+    public int get_att_count_all() throws DevFailed {
+        get_logger().info("Entering get_att_count_all()");
+        reconnectDatabaseIfNecessary();
+        int argout;
+        // ---Add your Own code to control device here ---
+        try {
+            argout = dbProxy == null ? 0 : dbProxy.getDataBase().getAttribute().getNames().getAttributesCount();
+        } catch (final ArchivingException e) {
+            throw e.toTangoException();
+        }
+        get_logger().info("Exiting get_att_count_all()");
+        return argout;
+    }
+
+    // =========================================================
+    /**
+     * Execute command "GetAttCountFilterFormat" on device. Gets the total
+     * number of attributes defined in TDB with the given format.
+     * 
+     * @param argin
+     *            A format [0 -> scalar - 1 -> spectrum - 2 -> image]
+     * @return The total number of attributes defined in TDB with the given
+     *         format [0 -> scalar - 1 -> spectrum - 2 -> image]
+     */
+    // =========================================================
+    public int get_att_count_filter_format(final short argin) throws DevFailed {
+        get_logger().info("Entering get_att_count_filter_format()");
+        reconnectDatabaseIfNecessary();
+        int argout;
+        // ---Add your Own code to control device here ---
+        try {
+            argout = dbProxy == null ? 0 : dbProxy.getDataBase().getAttribute().getNames().getAttributesCountF(argin);
+        } catch (final ArchivingException e) {
+            throw e.toTangoException();
+        }
+        get_logger().info("Exiting get_att_count_filter_format()");
+        return argout;
+    }
+
+    // =========================================================
+    /**
+     * Execute command "GetAttCountFilterType" on device. Gets the total number
+     * of attributes defined in TDB with the given type.
+     * 
+     * @param argin
+     *            A type [2 -> Tango::DevShort | 3 -> Tango::DevLong | 5 ->
+     *            Tango::DevDouble and 8 -> Tango::DevString]
+     * @return The total number of attributes defined in TDB with the given type
+     *         [2 -> Tango::DevShort | 3 -> Tango::DevLong | 5 ->
+     *         Tango::DevDouble and 8 -> Tango::DevString]
+     */
+    // =========================================================
+    public int get_att_count_filter_type(final short argin) throws DevFailed {
+        get_logger().info("Entering get_att_count_filter_type()");
+        reconnectDatabaseIfNecessary();
+        int argout;
+        // ---Add your Own code to control device here ---
+        try {
+            argout = dbProxy == null ? 0 : dbProxy.getDataBase().getAttribute().getNames().getAttributesCountT(argin);
+        } catch (final ArchivingException e) {
+            throw e.toTangoException();
+        }
+        get_logger().info("Exiting get_att_count_filter_type()");
+        return argout;
+    }
+
+    // =========================================================
+    /**
+     * Execute command "GetDomains" on device. Gets all the registered domains.
+     * 
+     * @return The registered domains
+     */
+    // =========================================================
+    public String[] get_domains() throws DevFailed {
+        get_logger().info("Entering get_domains()");
+        reconnectDatabaseIfNecessary();
+        String[] argout;
+        // ---Add your Own code to control device here ---
+        try {
+            argout = dbProxy == null ? new String[0] : dbProxy.getDataBase().getAttribute().getDomains().getDomains();
+        } catch (final ArchivingException e) {
+            throw e.toTangoException();
+        }
+        get_logger().info("Exiting get_domains()");
+        return argout;
+    }
+
+    // =========================================================
+    /**
+     * Execute command "GetDomainsCount" on device. Returns the number of
+     * distinct registered domains.
+     * 
+     * @return The number of distinct registered domains.
+     */
+    // =========================================================
+    public int get_domains_count() throws DevFailed {
+        get_logger().info("Entering get_domains_count()");
+        reconnectDatabaseIfNecessary();
+        int argout;
+        // ---Add your Own code to control device here ---
+        try {
+            argout = dbProxy == null ? 0 : dbProxy.getDataBase().getAttribute().getDomains().getDomainsCount();
+        } catch (final ArchivingException e) {
+            throw e.toTangoException();
+        }
+        get_logger().info("Exiting get_domains_count()");
+        return argout;
+    }
+
+    // =========================================================
+    /**
+     * Execute command "GetFamilies" on device. Gets all the registered families
+     * 
+     * @return The registered families
+     */
+    // =========================================================
+    public String[] get_families() throws DevFailed {
+        get_logger().info("Entering get_families()");
+        reconnectDatabaseIfNecessary();
+        String[] argout;
+        // ---Add your Own code to control device here ---
+        try {
+            argout = dbProxy == null ? new String[0] : dbProxy.getDataBase().getAttribute().getFamilies().getFamilies();
+        } catch (final ArchivingException e) {
+            throw e.toTangoException();
+        }
+        get_logger().info("Exiting get_families()");
+        return argout;
+    }
+
+    // =========================================================
+    /**
+     * Execute command "GetFamiliesCount" on device. Returns the number of
+     * distinct registered families.
+     * 
+     * @return The number of distinct registered families.
+     */
+    // =========================================================
+    public int get_families_count() throws DevFailed {
+        get_logger().info("Entering get_families_count()");
+        reconnectDatabaseIfNecessary();
+        int argout;
+        // ---Add your Own code to control device here ---
+        try {
+            argout = dbProxy == null ? 0 : dbProxy.getDataBase().getAttribute().getFamilies().getFamiliesCount();
+        } catch (final ArchivingException e) {
+            throw e.toTangoException();
+        }
+        get_logger().info("Exiting get_families_count()");
+        return argout;
+    }
+
+    // =========================================================
+    /**
+     * Execute command "GetFamiliesByDomain" on device. Gets all the registered
+     * families for the given domain.
+     * 
+     * @param argin
+     *            The given domain
+     * @return The registered families for the given domain
+     */
+    // =========================================================
+    public String[] get_families_by_domain(final String argin) throws DevFailed {
+        get_logger().info("Entering get_families_by_domain()");
+        reconnectDatabaseIfNecessary();
+        String[] argout;
+        // ---Add your Own code to control device here ---
+        try {
+            argout = dbProxy == null ? new String[0] : dbProxy.getDataBase().getAttribute().getFamilies()
+                    .getFamilies(argin);
+        } catch (final ArchivingException e) {
+            throw e.toTangoException();
+        }
+        get_logger().info("Exiting get_families_by_domain()");
+        return argout;
+    }
+
+    // =========================================================
+    /**
+     * Execute command "GetFamiliesByDomainCount" on device. Returns the number
+     * of distinct registered families for a given domain.
+     * 
+     * @param argin
+     *            A domain name
+     * @return The number of distinct registered families for a given domain.
+     */
+    // =========================================================
+    public int get_families_by_domain_count(final String argin) throws DevFailed {
+        get_logger().info("Entering get_families_by_domain_count()");
+        reconnectDatabaseIfNecessary();
+        int argout;
+        // ---Add your Own code to control device here ---
+        try {
+            argout = dbProxy == null ? 0 : dbProxy.getDataBase().getAttribute().getFamilies().getFamiliesCount(argin);
+        } catch (final ArchivingException e) {
+            throw e.toTangoException();
+        }
+        get_logger().info("Exiting get_families_by_domain_count()");
+        return argout;
+    }
+
+    // =========================================================
+    /**
+     * Execute command "GetMembers" on device. Gets all the registered members
+     * 
+     * @return The registered members
+     */
+    // =========================================================
+    public String[] get_members() throws DevFailed {
+        get_logger().info("Entering get_members()");
+        reconnectDatabaseIfNecessary();
+        String[] argout;
+        // ---Add your Own code to control device here ---
+        try {
+            argout = dbProxy == null ? new String[0] : dbProxy.getDataBase().getAttribute().getMembers().getMembers();
+        } catch (final ArchivingException e) {
+            throw e.toTangoException();
+        }
+        get_logger().info("Exiting get_members()");
+        return argout;
+    }
+
+    // =========================================================
+    /**
+     * Execute command "GetMembersCount" on device. Returns the number of
+     * distinct members.
+     * 
+     * @return The number of distinct members.
+     */
+    // =========================================================
+    public int get_members_count() throws DevFailed {
+        get_logger().info("Entering get_members_count()");
+        reconnectDatabaseIfNecessary();
+        int argout;
+        // ---Add your Own code to control device here ---
+        try {
+            argout = dbProxy == null ? 0 : dbProxy.getDataBase().getAttribute().getMembers().getMembersCount();
+        } catch (final ArchivingException e) {
+            throw e.toTangoException();
+        }
+        get_logger().info("Exiting get_members_count()");
+        return argout;
+    }
+
+    // =========================================================
+    /**
+     * Execute command "GetMembersByDomainFamily" on device. Gets all the
+     * registered members for the given domain and family
+     * 
+     * @param argin
+     *            The given domain and family
+     * @return The registered members for the given domain and family
+     */
+    // =========================================================
+    public String[] get_members_by_domain_family(final String[] argin) throws DevFailed {
+        get_logger().info("Entering get_members_by_domain_family()");
+        reconnectDatabaseIfNecessary();
+        String[] argout;
+        // ---Add your Own code to control device here ---
+        if (argin.length != 2) {
+            Except.throw_exception("CONFIGURATION_ERROR", "Wrong number of parameters",
+                    "TdbExtractor.get_members_by_domain_family");
+            argout = new String[0];
+        } else {
+            try {
+                argout = dbProxy == null ? new String[0] : dbProxy.getDataBase().getAttribute().getMembers()
+                        .getMembers(argin[0].trim(), argin[1].trim());
+            } catch (final ArchivingException e) {
+                throw e.toTangoException();
+            }
+        }
+        get_logger().info("Exiting get_members_by_domain_family()");
+        return argout;
+    }
+
+    // =========================================================
+    /**
+     * Execute command "GetMembersByDomainFamilyCount" on device. Returns the
+     * number of distinct registered members for the given domain and family.
+     * 
+     * @param argin
+     *            A domain name, a family name
+     * @return The number of distinct registered members for the given domain
+     *         and family.
+     */
+    // =========================================================
+    public int get_members_by_domain_family_count(final String[] argin) throws DevFailed {
+        get_logger().info("Entering get_members_by_domain_family_count()");
+        reconnectDatabaseIfNecessary();
+        int argout;
+        // ---Add your Own code to control device here ---
+        if (argin.length != 2) {
+            Except.throw_exception("CONFIGURATION_ERROR", "Wrong number of parameters",
+                    "TdbExtractor.get_members_by_domain_family_count");
+            argout = 0;
+        } else {
+            try {
+                argout = dbProxy == null ? 0 : dbProxy.getDataBase().getAttribute().getMembers()
+                        .getMembersCount(argin[0], argin[1]);
+            } catch (final ArchivingException e) {
+                throw e.toTangoException();
+            }
+        }
+        get_logger().info("Exiting get_members_by_domain_family_count()");
+        return argout;
+    }
+
+    // =========================================================
+    /**
+     * Execute command "GetAttributesByDomainFamilyMembersCount" on device.
+     * Returns the number of registered the attributes for a given domain,
+     * family, member.
+     * 
+     * @param argin
+     *            A domain name, a family name, a member name.
+     * @return The number of registered the attributes for a given domain,
+     *         family, member.
+     */
+    // =========================================================
+    public int get_attributes_by_domain_family_members_count(final String[] argin) throws DevFailed {
+        get_logger().info("Entering get_attributes_by_domain_family_members_count()");
+        reconnectDatabaseIfNecessary();
+        int argout;
+        // ---Add your Own code to control device here ---
+        if (argin.length != 3) {
+            Except.throw_exception("CONFIGURATION_ERROR", "Wrong number of parameters",
+                    "TdbExtractor.get_attributes_by_domain_family_members_count");
+            argout = 0;
+        } else {
+            try {
+                argout = dbProxy == null ? 0 : dbProxy.getDataBase().getAttribute().getNames()
+                        .getAttributesCount(argin[0], argin[1], argin[2]);
+            } catch (final ArchivingException e) {
+                throw e.toTangoException();
+            }
+        }
+        get_logger().info("Exiting get_attributes_by_domain_family_members_count()");
+        return argout;
+    }
+
+    // =========================================================
+    /**
+     * Execute command "GetCurrentArchivedAtt" on device. Gets the list of
+     * attributes that are being archived in <I>TDB</I>
+     * 
+     * @return The list of attributes that are being archived
+     */
+    // =========================================================
+    public String[] get_current_archived_att() throws DevFailed {
+        get_logger().info("Entering get_current_archived_att()");
+        reconnectDatabaseIfNecessary();
+        String[] argout;
+        // ---Add your Own code to control device here ---
+        try {
+            argout = dbProxy == null ? new String[0] : dbProxy.getDataBase().getMode().getCurrentArchivedAtt();
+        } catch (final ArchivingException e) {
+            throw e.toTangoException();
+        }
+        get_logger().info("Exiting get_current_archived_att()");
+        return argout;
+    }
+
+    // =========================================================
+    /**
+     * Execute command "IsArchived" on device. Returns "true" if the attribute
+     * of given name is currently archived, "false" otherwise.
+     * 
+     * @param argin
+     *            The attribute's name
+     * @return true if the given attribute is being archived
+     */
+    // =========================================================
+    public boolean is_archived(final String argin) throws DevFailed {
+        get_logger().info("Entering is_archived()");
+        reconnectDatabaseIfNecessary();
+        boolean argout;
+        // ---Add your Own code to control device here ---
+        try {
+            argout = dbProxy == null ? false : dbProxy.getDataBase().getMode().isArchived(argin);
+        } catch (final ArchivingException e) {
+            throw e.toTangoException();
+        }
+        get_logger().info("Exiting is_archived()");
+        return argout;
+    }
+
+    // =========================================================
+    /**
+     * Execute command "GetArchivingMode" on device. Gets the archiving mode
+     * used for the specified attribute.
+     * 
+     * @param argin
+     *            The attribute's name
+     * @return The archiving mode used for the specified attribute
+     */
+    // =========================================================
+    public String[] get_archiving_mode(final String argin) throws DevFailed {
+        reconnectDatabaseIfNecessary();
+        String[] argout;
+        if (dbProxy == null) {
+            argout = new String[0];
+        } else {
+            // ---Add your Own code to control device here ---
+            try {
+                final Mode mode = dbProxy.getDataBase().getMode().getCurrentArchivingMode(argin);
+                argout = mode == null ? null : mode.toArray();
+                if (argout == null || argout.length == 0) {
+                    throw new ArchivingException("Invalid attribute: " + argin, "Invalid attribute: " + argin,
+                            ErrSeverity.WARN, "No database connection or \"" + argin
+                                    + "\" attribute not found in database", this.getClass().getName());
+                }
+            } catch (final ArchivingException e) {
+                throw e.toTangoException();
+            }
+        }
+        return argout;
+    }
+
+    // =========================================================
+    /**
+     * Execute command "GetAttData" on device. Gets all the data archieved for
+     * an attribute. Create a dynamic attribute, retrieve data from database and
+     * prepare result for attribute_history call.
+     * 
+     * @param argin
+     *            The attribute's name
+     * @return String : The new created dynamic attribute name, Long : the
+     *         number of data.
+     */
+    // =========================================================
+    public DevVarLongStringArray get_att_data(final String argin) throws DevFailed {
+        Except.throw_exception("DEPRECATED", "This method is no more available.", "TdbExtractor.get_att_data");
+        return null;
+
+        /*
+         * DevVarLongStringArray argout = new DevVarLongStringArray();
+         * get_logger().info("Entering get_att_data()"); // ---Add your Own code
+         * to control device here --- DbData dbData = null; try {
+         * ArchivingManagerApi.ExportData2Tdb(argin); // Get data from db.
+         * dbData = this.dbProxy.getDataBase().getAttData(argin); // Buid an
+         * attribute and gets its references argout = add_attribute(dbData); }
+         * catch ( ArchivingException e ) { e.printStackTrace(); //throw new
+         * ArchivingException(GlobalConst.ARC_UNREACH_EXCEPTION);
+         * get_logger().info("cla ZZZZZZZZZZ!!!!!!!!!!!!!!!!!!"); throw
+         * e.toTangoException(); } catch (java.lang.OutOfMemoryError oome) {
+         * get_logger().info("OutOfMemoryError in get_att_data");
+         * Except.throw_exception("MEMORY_ERROR",HintOnMemoryError,
+         * "TdbExtractor.get_att_data"); } catch ( Throwable t ) {
+         * t.printStackTrace(); if (t instanceof DevFailed) { DevError [] errors
+         * = ( (DevFailed) t ).errors; if ( errors != null ) { for ( int i = 0 ;
+         * i < errors.length ; i ++ ) { DevError error = errors [ i ];
+         * get_logger().error (
+         * "Error: /desc/"+error.desc+"/origin/"+error.origin
+         * +"/reason/"+error.reason ); } } get_logger().error (
+         * "Error: /CAUSE---------------" ); if ( ( (DevFailed) t ).getCause()
+         * != null ) { ( (DevFailed) t ).getCause().printStackTrace (); } } }
+         * get_logger().info("Exiting get_att_data()"); return argout;
+         */
+    }
+
+    /**
+     * Get the newest inserted value for an attribute. Returns READ part only
+     * 
+     * @param attributeName
+     *            the attribute name
+     * @return timestamp; values
+     * @throws DevFailed
+     */
+    public String getNewestValue(final String attributeName) throws DevFailed {
+        get_logger().info("Entering getNewestValue");
+        reconnectDatabaseIfNecessary();
+        String argout;
+        if (dbProxy == null) {
+            argout = "";
+        } else {
+            try {
+                final DbData data = dbProxy.getDataBase().getExtractor().getDataGetters().getNewestValue(attributeName);
+                if (data.getTimedData() != null && data.getTimedData()[0] != null) {
+                    argout = Long.toString(data.getTimedData()[0].getTime()) + "; ";
+                    final Object value = get(data.getTimedData()[0].getValue(), 0);
+                    argout = argout + String.valueOf(value);
+                } else {
+                    DevFailedUtils.throwDevFailed("no data found for " + attributeName);
+                    argout = "";
+                }
+            } catch (final ArchivingException e) {
+                throw e.toTangoException();
+            }
+        }
+        get_logger().info("Exiting getNewestValue");
+        return argout;
+    }
+
+    /**
+     * Get the nearest value and timestamp of an attribute for a given
+     * timestamp. Returns READ part only
+     * 
+     * @param argin
+     *            [attributeName, timestamp]. timestamp format is DD-MM-YYYY
+     *            HH24:MI:SS
+     * @return timestamp; values
+     * @throws DevFailed
+     */
+    public String getNearestValue(final String[] argin) throws DevFailed {
+        get_logger().info("Entering getNewestValue");
+        reconnectDatabaseIfNecessary();
+        String argout;
+        if (argin.length != 2) {
+            DevFailedUtils.throwDevFailed("input must be of size 2 [attributeName, timestamp] ");
+        }
+        if (dbProxy == null) {
+            argout = "";
+        } else {
+            final String attributeName = argin[0];
+            final String timestamp = argin[1];
+            try {
+                final DbData data2 = dbProxy.getDataBase().getExtractor().getDataGetters()
+                        .getNearestValue(attributeName, timestamp);
+                if (data2.getTimedData() != null && data2.getTimedData()[0] != null) {
+                    argout = Long.toString(data2.getTimedData()[0].getTime()) + "; ";
+                    final Object value = get(data2.getTimedData()[0].getValue(), 0);
+                    argout = argout + String.valueOf(value);
+                } else {
+                    DevFailedUtils.throwDevFailed("no data found for " + attributeName);
+                    argout = "";
+                }
+            } catch (final ArchivingException e) {
+                e.printStackTrace();
+                throw e.toTangoException();
+            }
+        }
+        get_logger().info("Exiting getNewestValue");
+        return argout;
+    }
+
+    // =========================================================
+    /**
+     * Execute command "GetAttDataCount" on device. Returns the number of the
+     * data archieved for an attribute.
+     * 
+     * @param argin
+     *            An attribute name.
+     * @return The number of the data archieved for an attribute.
+     */
+    // =========================================================
+    public int get_att_data_count(final String argin) throws DevFailed {
+        get_logger().info("Entering get_att_data_count()");
+        reconnectDatabaseIfNecessary();
+        int argout;
+        if (dbProxy == null) {
+            argout = 0;
+        } else {
+            // ---Add your Own code to control device here ---
+            try {
+                ((TDBDataBaseManager) dbProxy.getDataBase()).getTdbExport().ExportData2Tdb(argin, getTimeNow());
+                argout = dbProxy.getDataBase().getExtractor().getDataGetters().getAttDataCount(argin);
+            } catch (final ArchivingException e) {
+                throw e.toTangoException();
+            }
+        }
+        get_logger().info("Exiting get_att_data_count()");
+        return argout;
+    }
+
+    // =========================================================
+    /**
+     * Execute command "GetAttDataAvg" on device. Returns the average value
+     * generated by the given attribute.
+     * 
+     * @param argin
+     *            The attribute's name
+     * @return The average of the values generated by the attribute
+     */
+    // =========================================================
+    public double get_att_data_avg(final String argin) throws DevFailed {
+        get_logger().info("Entering get_att_data_avg()");
+        reconnectDatabaseIfNecessary();
+        double argout;
+        if (dbProxy == null) {
+            argout = 0;
+        } else {
+            // ---Add your Own code to control device here ---
+            try {
+                ((TDBDataBaseManager) dbProxy.getDataBase()).getTdbExport().ExportData2Tdb(argin, getTimeNow());
+                argout = dbProxy.getDataBase().getExtractor().getMinMaxAvgGetters().getAttDataAvg(argin);
+            } catch (final ArchivingException e) {
+                throw e.toTangoException();
+            }
+        }
+        get_logger().info("Exiting get_att_data_avg()");
+        return argout;
+    }
+
+    // =========================================================
+    /**
+     * Execute command "GetAttDataAvgBetweenDates" on device. Returns the
+     * average value generated by the given attribute and between the two given
+     * dates.
+     * 
+     * @param argin
+     *            The attribute's name, the beginning date (DD-MM-YYYY
+     *            HH24:MI:SS) and the ending date (DD-MM-YYYY HH24:MI:SS)
+     * @return The average value generated by the given attribute and between
+     *         the two given dates.
+     */
+    // =========================================================
+    public double get_att_data_avg_between_dates(final String[] argin) throws DevFailed {
+        get_logger().info("Entering get_att_data_avg_between_dates()");
+        reconnectDatabaseIfNecessary();
+        double argout;
+        if (dbProxy == null) {
+            argout = 0;
+        } else {
+            // ---Add your Own code to control device here ---
+            if (argin.length != 3) {
+                Except.throw_exception("CONFIGURATION_ERROR", "Wrong number of parameters",
+                        "TdbExtractor.get_att_scalar_data_avg_between_dates");
+                argout = 0;
+            } else {
+                try {
+                    ((TDBDataBaseManager) dbProxy.getDataBase()).getTdbExport().ExportData2Tdb(argin[0], argin[2]);
+
+                    argout = dbProxy.getDataBase().getExtractor().getMinMaxAvgGettersBetweenDates()
+                            .getAttDataAvgBetweenDates(argin);
+                } catch (final ArchivingException e) {
+                    throw e.toTangoException();
+                }
+            }
+        }
+        get_logger().info("Exiting get_att_data_avg_between_dates()");
+        return argout;
+    }
+
+    // =========================================================
+    /**
+     * Execute command "GetAttDataBetweenDates" on device. Retrieves data
+     * beetwen two dates, for a given scalar attribute. Create a dynamic
+     * attribute, retrieve data from database and prepare result for
+     * attribute_history call.
+     * 
+     * @param argin
+     *            : The attribute's name, the beginning date (DD-MM-YYYY
+     *            HH24:MI:SS) and the ending date (DD-MM-YYYY HH24:MI:SS), and
+     *            the sampling type (ALL, SECOND, MINUTE, HOUR, DAY)
+     * @return String : The new created dynamic attribute name, Long : the
+     *         number of data.
+     */
+    // =========================================================
+    public DevVarLongStringArray get_att_data_between_dates_sampling(final String[] argin) throws DevFailed {
+        get_logger().info("Entering get_att_data_between_dates_sampling()");
+        DevVarLongStringArray argout = null;
+        SamplingType samplingType = null;
+        reconnectDatabaseIfNecessary();
+        // ---Add your Own code to control device here ---
+        if (argin.length != 4) {
+            Except.throw_exception("CONFIGURATION_ERROR", "Wrong number of parameters",
+                    "TdbExtractor.get_att_data_between_dates_sampling");
+        }
+
+        try {
+            samplingType = SamplingType.getSamplingTypeByLabel(argin[3]);
+        } catch (final IllegalArgumentException iae) {
+            Except.throw_exception("CONFIGURATION_ERROR",
+                    "Invalid sampling type. Valid types are ALL, SECOND, MINUTE, HOUR, or DAY",
+                    "TdbExtractor.get_att_data_between_dates_sampling");
+        }
+        if (dbProxy != null) {
+            try {
+                // Get data from db.
+                final DbData dbData = dbProxy.getDataBase().getExtractor().getDataGettersBetweenDates()
+                        .getAttDataBetweenDates(argin, samplingType);
+                // Buid an attribute and gets its references
+                argout = add_attribute(dbData);
+            } catch (final ArchivingException e) {
+                e.printStackTrace();
+                throw e.toTangoException();
+            } catch (final java.lang.OutOfMemoryError oome) {
+                get_logger().info("OutOfMemoryError in get_att_data_between_dates_sampling");
+                Except.throw_exception("MEMORY_ERROR", HintOnMemoryError,
+                        "TdbExtractor.get_att_data_between_dates_sampling");
+            } catch (final Throwable t) {
+                t.printStackTrace();
+                if (t instanceof DevFailed) {
+                    final DevError[] errors = ((DevFailed) t).errors;
+                    if (errors != null) {
+                        for (final DevError error : errors) {
+                            get_logger().error(
+                                    "Error: /desc/" + error.desc + "/origin/" + error.origin + "/reason/"
+                                            + error.reason);
+                        }
+                    }
+
+                    get_logger().error("Error: /CAUSE---------------");
+                    if (((DevFailed) t).getCause() != null) {
+                        ((DevFailed) t).getCause().printStackTrace();
+                    }
+                }
+            }
+        }
+        get_logger().info("Exiting get_att_data_between_dates_sampling()");
+        return argout;
+    }
+
+    // =========================================================
+    /**
+     * Execute command "GetAttDataBetweenDates" on device. Retrieves data
+     * beetwen two dates, for a given scalar attribute. Create a dynamic
+     * attribute, retrieve data from database and prepare result for
+     * attribute_history call.
+     * 
+     * @param argin
+     *            : The attribute's name, the beginning date (DD-MM-YYYY
+     *            HH24:MI:SS) and the ending date (DD-MM-YYYY HH24:MI:SS)
+     * @return String : The new created dynamic attribute name, Long : the
+     *         number of data.
+     */
+    // =========================================================
+    public DevVarLongStringArray get_att_data_between_dates(final String[] argin) throws DevFailed {
+        get_logger().info("Entering get_att_data_between_dates()");
+        reconnectDatabaseIfNecessary();
+        DevVarLongStringArray argout = null;
+
+        // ---Add your Own code to control device here ---
+        if (argin.length != 3) {
+            Except.throw_exception("CONFIGURATION_ERROR", "Wrong number of parameters",
+                    "TdbExtractor.get_att_scalar_data_beetween_dates");
+        } else if (dbProxy != null) {
+            try {
+
+                ((TDBDataBaseManager) dbProxy.getDataBase()).getTdbExport().ExportData2Tdb(argin[0], argin[2]);
+
+                // Get data from db.
+                final DbData dbData = dbProxy.getDataBase().getExtractor().getDataGettersBetweenDates()
+                        .getAttDataBetweenDates(argin, SamplingType.getSamplingType(SamplingType.ALL));
+
+                // Buid an attribute and gets its references
+                argout = add_attribute(dbData);
+            } catch (final ArchivingException e) {
+                e.printStackTrace();
+                throw e.toTangoException();
+            } catch (final java.lang.OutOfMemoryError oome) {
+                get_logger().info("OutOfMemoryError in get_att_data_between_dates");
+                Except.throw_exception("MEMORY_ERROR", HintOnMemoryError, "TdbExtractor.get_att_data_between_dates");
+            } catch (final Throwable t) {
+                t.printStackTrace();
+                if (t instanceof DevFailed) {
+                    final DevError[] errors = ((DevFailed) t).errors;
+                    if (errors != null) {
+                        for (final DevError error : errors) {
+                            get_logger().error(
+                                    "Error: /desc/" + error.desc + "/origin/" + error.origin + "/reason/"
+                                            + error.reason);
+                        }
+                    }
+
+                    get_logger().error("Error: /CAUSE---------------");
+                    if (((DevFailed) t).getCause() != null) {
+                        ((DevFailed) t).getCause().printStackTrace();
+                    }
+                }
+            }
+        }
+        get_logger().info("Exiting get_att_data_between_dates()");
+        return argout;
+    }
+
+    /**
+     * Extract an attribute's data for TDB
+     * 
+     * @param argin
+     *            The attribute's name, the beginning date (DD-MM-YYYY
+     *            HH24:MI:SS) and the ending date (DD-MM-YYYY HH24:MI:SS)
+     * @return Long: the timestamps , String: values (read values only
+     * @throws DevFailed
+     */
+    public DevVarDoubleStringArray extractBetweenDates(final String[] argin) throws DevFailed {
+        get_logger().info("Entering get_att_data_between_dates()");
+        reconnectDatabaseIfNecessary();
+        DevVarDoubleStringArray argout = null;
+
+        // ---Add your Own code to control device here ---
+        if (argin.length != 3) {
+            Except.throw_exception("CONFIGURATION_ERROR", "Wrong number of parameters",
+                    "HdbExtractor.get_att_scalar_data_beetween_dates");
+        } else if (dbProxy != null) {
+            try {
+                // Get data from db.
+                final DbData dbData = dbProxy.getDataBase().getExtractor().getDataGettersBetweenDates()
+                        .getAttDataBetweenDates(argin, SamplingType.getSamplingType(SamplingType.ALL));
+                final NullableTimedData[] tuples = dbData.getTimedData();
+                final double[] timeStamps = new double[tuples.length];
+                final String[] values = new String[tuples.length];
+                for (int i = 0; i < tuples.length; i++) {
+                    timeStamps[i] = tuples[i].getTime();
+                    Object value = get(tuples[i].getValue(), 0);
+                    values[i] = String.valueOf(value);
+                }
+                argout = new DevVarDoubleStringArray(timeStamps, values);
+            } catch (final ArchivingException e) {
+
+                e.printStackTrace();
+                throw e.toTangoException();
+            }
+        }
+        get_logger().info("Exiting get_att_data_between_dates()");
+
+        return argout;
+    }
+
+    protected Object get(Object value, int index) {
+        Object result;
+        if ((value != null) && value.getClass().isArray() && (index > -1) && (index < Array.getLength(value))) {
+            result = Array.get(value, index);
+        } else {
+            result = null;
+        }
+        return result;
+    }
+
+    // =========================================================
+    /**
+     * Execute command "GetAttDataBetweenDatesCount" on device. Returns the
+     * number of data beetwen two dates and, for a given scalar attribute.
+     * 
+     * @param argin
+     *            The attribute's name, the beginning (DD-MM-YYYY HH24:MI:SS)
+     *            date and the ending date (DD-MM-YYYY HH24:MI:SS).
+     * @return The number of data beetwen two dates and, for a given scalar
+     *         attribute.
+     */
+    // =========================================================
+    public int get_att_data_between_dates_count(final String[] argin) throws DevFailed {
+        get_logger().info("Entering get_att_data_between_dates_count()");
+        reconnectDatabaseIfNecessary();
+        int argout = 0;
+        // ---Add your Own code to control device here ---
+        if (argin.length != 3) {
+            Except.throw_exception("CONFIGURATION_ERROR", "Wrong number of parameters",
+                    "TdbExtractor.get_att_scalar_data_between_dates_count");
+        } else if (dbProxy != null) {
+            try {
+                ((TDBDataBaseManager) dbProxy.getDataBase()).getTdbExport().ExportData2Tdb(argin[0], argin[2]);
+
+                argout = dbProxy.getDataBase().getExtractor().getDataGettersBetweenDates()
+                        .getAttDataBetweenDatesCount(argin);
+            } catch (final ArchivingException e) {
+                throw e.toTangoException();
+            }
+        }
+        get_logger().info("Exiting get_att_data_between_dates_count()");
+        return argout;
+    }
+
+    // =========================================================
+    /**
+     * Execute command "GetAttDataInfOrSupThan" on device. Retrieves all data
+     * that are lower than the given value x OR higher than the given value y.
+     * Create a dynamic attribute, retrieve the corresponding data from database
+     * and prepare result for attribute_history call.
+     * 
+     * @param argin
+     *            The attribute's name, the lower limit and the upper limit
+     * @return String : The new created dynamic attribute name, Long : the
+     *         number of data.
+     */
+    // =========================================================
+    public DevVarLongStringArray get_att_data_inf_or_sup_than(final String[] argin) throws DevFailed {
+        get_logger().info("Entering get_att_data_inf_or_sup_than()");
+        reconnectDatabaseIfNecessary();
+        DevVarLongStringArray argout = null;
+
+        // ---Add your Own code to control device here ---
+        if (argin.length != 3) {
+            Except.throw_exception("CONFIGURATION_ERROR", "Wrong number of parameters",
+                    "TdbExtractor.get_att_scalar_data_inf_or_sup_than");
+        } else if (dbProxy != null) {
+            try {
+
+                ((TDBDataBaseManager) dbProxy.getManager()).getTdbExport().ExportData2Tdb(argin[0], getTimeNow());
+
+                // Get data from db.
+                final DbData dbData = dbProxy.getDataBase().getExtractor().getInfSupGetters()
+                        .getAttDataInfOrSupThan(argin);
+                // Buid an attribute and gets its references
+                argout = add_attribute(dbData);
+            } catch (final ArchivingException e) {
+                throw e.toTangoException();
+            } catch (final java.lang.OutOfMemoryError oome) {
+                get_logger().info("OutOfMemoryError in get_att_data_inf_or_sup_than");
+                Except.throw_exception("MEMORY_ERROR", HintOnMemoryError, "TdbExtractor.get_att_data_inf_or_sup_than");
+            }
+        }
+        get_logger().info("Exiting get_att_data_inf_or_sup_than()");
+        return argout;
+    }
+
+    // =========================================================
+    /**
+     * Execute command "GetAttDataInfOrSupThanCount" on device. Returns the
+     * number of data lower than the given value x OR higher than the given
+     * value y.
+     * 
+     * @param argin
+     *            The attribute's name, the lower limit and the upper limit
+     * @return The number of scalar data lower than the given value x OR higher
+     *         than the given value y.
+     */
+    // =========================================================
+    public int get_att_data_inf_or_sup_than_count(final String[] argin) throws DevFailed {
+        get_logger().info("Entering get_att_data_inf_or_sup_than_count()");
+        reconnectDatabaseIfNecessary();
+        int argout = 0;
+        // ---Add your Own code to control device here ---
+        if (argin.length != 3) {
+            Except.throw_exception("CONFIGURATION_ERROR", "Wrong number of parameters",
+                    "TdbExtractor.get_att_scalar_data_inf_or_sup_than_count");
+        } else if (dbProxy != null) {
+            try {
+                ((TDBDataBaseManager) dbProxy.getDataBase()).getTdbExport().ExportData2Tdb(argin[0], getTimeNow());
+
+                argout = dbProxy.getDataBase().getExtractor().getInfSupGetters().getAttDataInfOrSupThanCount(argin);
+            } catch (final ArchivingException e) {
+                throw e.toTangoException();
+            }
+        }
+        get_logger().info("Exiting get_att_data_inf_or_sup_than_count()");
+        return argout;
+    }
+
+    // =========================================================
+    /**
+     * Execute command "GetAttDataInfOrSupThanBetweenDates" on device. Retrieves
+     * data beetwen two dates (date_1 & date_2) - Data are lower than the given
+     * value x OR higher than the given value y. Create a dynamic attribute,
+     * retrieve the corresponding data from database and prepare result for
+     * attribute_history call.
+     * 
+     * @param argin
+     *            The attribute's name, the lower limit, the upper limit, the
+     *            beginning date (DD-MM-YYYY HH24:MI:SS) and the ending date
+     *            (DD-MM-YYYY HH24:MI:SS)
+     * @return String : The new created dynamic attribute name, Long : the
+     *         number of data.
+     */
+    // =========================================================
+    public DevVarLongStringArray get_att_data_inf_or_sup_than_between_dates(final String[] argin) throws DevFailed {
+        get_logger().info("Entering get_att_data_inf_or_sup_than_between_dates()");
+        reconnectDatabaseIfNecessary();
+        DevVarLongStringArray argout = null;
+        // ---Add your Own code to control device here ---
+        if (argin.length != 5) {
+            Except.throw_exception("CONFIGURATION_ERROR", "Wrong number of parameters",
+                    "TdbExtractor.get_att_scalar_data_inf_or_sup_than_beetween_dates");
+        } else if (dbProxy != null) {
+            try {
+
+                ((TDBDataBaseManager) dbProxy.getDataBase()).getTdbExport().ExportData2Tdb(argin[0], argin[4]);
+
+                // Get data from db.
+                final DbData dbData = dbProxy.getDataBase().getExtractor().getInfSupGettersBetweenDates()
+                        .getAttDataInfOrSupThanBetweenDates(argin);
+                // Buid an attribute and gets its references
+                argout = add_attribute(dbData);
+            } catch (final ArchivingException e) {
+                throw e.toTangoException();
+            } catch (final java.lang.OutOfMemoryError oome) {
+                get_logger().info("OutOfMemoryError in get_att_data_inf_or_sup_than_between_dates");
+                Except.throw_exception("MEMORY_ERROR", HintOnMemoryError,
+                        "TdbExtractor.get_att_data_inf_or_sup_than_between_dates");
+            }
+        }
+        get_logger().info("Exiting get_att_data_inf_or_sup_than_between_dates()");
+        return argout;
+    }
+
+    // =========================================================
+    /**
+     * Execute command "GetAttDataInfOrSupThanBetweenDatesCount" on device.
+     * Returns the number of data beetwen two dates (date_1 & date_2). Data are
+     * lower than the given value x OR higher than the given value y.
+     * 
+     * @param argin
+     *            The attribute's name, the lower limit, the upper limit, the
+     *            beginning date (DD-MM-YYYY HH24:MI:SS) and the ending date
+     *            (DD-MM-YYYY HH24:MI:SS).
+     * @return The number of scalar data lower than the given value x OR higher
+     *         than the given value y, beetwen two dates and for the specified
+     *         attribute.
+     */
+    // =========================================================
+    public int get_att_data_inf_or_sup_than_between_dates_count(final String[] argin) throws DevFailed {
+        get_logger().info("Entering get_att_data_inf_or_sup_than_between_dates_count()");
+        reconnectDatabaseIfNecessary();
+        int argout = 0;
+        // ---Add your Own code to control device here ---
+        if (argin.length != 5) {
+            Except.throw_exception("CONFIGURATION_ERROR", "Wrong number of parameters",
+                    "TdbExtractor.get_att_scalar_data_inf_or_sup_than_between_dates_count");
+        } else if (dbProxy != null) {
+            try {
+
+                ((TDBDataBaseManager) dbProxy.getDataBase()).getTdbExport().ExportData2Tdb(argin[0], argin[5]);
+
+                argout = dbProxy.getDataBase().getExtractor().getInfSupGettersBetweenDates()
+                        .getAttDataInfOrSupThanBetweenDatesCount(argin);
+            } catch (final ArchivingException e) {
+                throw e.toTangoException();
+            }
+        }
+        get_logger().info("Exiting get_att_data_inf_or_sup_than_between_dates_count()");
+        return argout;
+    }
+
+    // =========================================================
+    /**
+     * Execute command "GetAttDataInfThan" on device. Retrieves all the data
+     * that are lower than the given value x. Create a dynamic attribute,
+     * retrieve the corresponding data from database and prepare result for
+     * attribute_history call.
+     * 
+     * @param argin
+     *            The attribute's name, the upper limit
+     * @return String : The new created dynamic attribute name, Long : the
+     *         number of data.
+     */
+    // =========================================================
+    public DevVarLongStringArray get_att_data_inf_than(final String[] argin) throws DevFailed {
+        get_logger().info("Entering get_att_data_inf_than()");
+        reconnectDatabaseIfNecessary();
+        DevVarLongStringArray argout = null;
+        // ---Add your Own code to control device here ---
+        if (argin.length != 2) {
+            Except.throw_exception("CONFIGURATION_ERROR", "Wrong number of parameters",
+                    "TdbExtractor.get_att_scalar_data_inf_than");
+        } else if (dbProxy != null) {
+            try {
+                ((TDBDataBaseManager) dbProxy.getDataBase()).getTdbExport().ExportData2Tdb(argin[0], getTimeNow());
+                // Get data from db.
+                final DbData dbData = dbProxy.getDataBase().getExtractor().getInfSupGetters().getAttDataInfThan(argin);
+                // Buid an attribute and gets its references
+                argout = add_attribute(dbData);
+            } catch (final ArchivingException e) {
+                throw e.toTangoException();
+            } catch (final java.lang.OutOfMemoryError oome) {
+                get_logger().info("OutOfMemoryError in get_att_data_inf_than");
+                Except.throw_exception("MEMORY_ERROR", HintOnMemoryError, "TdbExtractor.get_att_data_inf_than");
+            }
+        }
+        get_logger().info("Exiting get_att_data_inf_than()");
+        return argout;
+    }
+
+    // =========================================================
+    /**
+     * Execute command "GetAttDataInfThanCount" on device. Returns the number of
+     * data lower than the given value.
+     * 
+     * @param argin
+     *            The attribute's name and the upper limit.
+     * @return The number of scalar data lower than the given value and for the
+     *         specified attribute.
+     */
+    // =========================================================
+    public int get_att_data_inf_than_count(final String[] argin) throws DevFailed {
+        get_logger().info("Entering get_att_data_inf_than_count()");
+        reconnectDatabaseIfNecessary();
+        int argout = 0;
+        // ---Add your Own code to control device here ---
+        if (argin.length != 2) {
+            Except.throw_exception("CONFIGURATION_ERROR", "Wrong number of parameters",
+                    "TdbExtractor.get_att_scalar_data_inf_than_count");
+        } else if (dbProxy != null) {
+            try {
+                ((TDBDataBaseManager) dbProxy.getDataBase()).getTdbExport().ExportData2Tdb(argin[0], getTimeNow());
+                argout = dbProxy.getDataBase().getExtractor().getInfSupGetters().getAttDataInfThanCount(argin);
+            } catch (final ArchivingException e) {
+                throw e.toTangoException();
+            }
+        }
+        get_logger().info("Exiting get_att_data_inf_than_count()");
+        return argout;
+    }
+
+    // =========================================================
+    /**
+     * Execute command "GetAttDataInfThanBetweenDates" on device. Retrieves data
+     * beetwen two dates (date_1 & date_2) - Data are lower than the given value
+     * x. Create a dynamic attribute, retrieve the corresponding data from
+     * database and prepare result for attribute_history call.
+     * 
+     * @param argin
+     *            The attribute's name, the upper limit, the beginning date
+     *            (DD-MM-YYYY HH24:MI:SS) and the ending date (DD-MM-YYYY
+     *            HH24:MI:SS)
+     * @return String : The new created dynamic attribute name, Long : the
+     *         number of data.
+     */
+    // =========================================================
+    public DevVarLongStringArray get_att_data_inf_than_between_dates(final String[] argin) throws DevFailed {
+        get_logger().info("Entering get_att_data_inf_than_between_dates()");
+        reconnectDatabaseIfNecessary();
+        DevVarLongStringArray argout = null;
+        // ---Add your Own code to control device here ---
+        if (argin.length != 4) {
+            Except.throw_exception("CONFIGURATION_ERROR", "Wrong number of parameters",
+                    "TdbExtractor.get_att_scalar_data_inf_than_beetween_dates");
+        } else if (dbProxy != null) {
+            try {
+
+                ((TDBDataBaseManager) dbProxy.getDataBase()).getTdbExport().ExportData2Tdb(argin[0], argin[3]);
+
+                // Get data from db.
+                final DbData dbData = dbProxy.getDataBase().getExtractor().getInfSupGettersBetweenDates()
+                        .getAttDataInfThanBetweenDates(argin);
+                // Buid an attribute and gets its references
+                argout = add_attribute(dbData);
+            } catch (final ArchivingException e) {
+                throw e.toTangoException();
+            }
+        }
+        get_logger().info("Exiting get_att_data_inf_than_between_dates()");
+        return argout;
+    }
+
+    // =========================================================
+    /**
+     * Execute command "GetAttDataInfThanBetweenDatesCount" on device. Returns
+     * the number data lower than the given value x, and beetwen two dates
+     * (date_1 & date_2).
+     * 
+     * @param argin
+     *            The attribute's name, the upper limit, the beginning date
+     *            (DD-MM-YYYY HH24:MI:SS) and the ending date (DD-MM-YYYY
+     *            HH24:MI:SS).
+     * @return The number data lower than the given value x, and beetwen two
+     *         dates (date_1 & date_2).
+     */
+    // =========================================================
+    public int get_att_data_inf_than_between_dates_count(final String[] argin) throws DevFailed {
+        get_logger().info("Entering get_att_data_inf_than_between_dates_count()");
+        reconnectDatabaseIfNecessary();
+        int argout = 0;
+        // ---Add your Own code to control device here ---
+        if (argin.length != 4) {
+            Except.throw_exception("CONFIGURATION_ERROR", "Wrong number of parameters",
+                    "TdbExtractor.get_att_scalar_data_inf_than_between_dates_count");
+        } else if (dbProxy != null) {
+            try {
+                ((TDBDataBaseManager) dbProxy.getDataBase()).getTdbExport().ExportData2Tdb(argin[0], argin[3]);
+                argout = dbProxy.getDataBase().getExtractor().getInfSupGettersBetweenDates()
+                        .getAttDataInfThanBetweenDatesCount(argin);
+            } catch (final ArchivingException e) {
+                throw e.toTangoException();
+            }
+        }
+        get_logger().info("Exiting get_att_data_inf_than_between_dates_count()");
+        return argout;
+    }
+
+    // =========================================================
+    /**
+     * Execute command "GetAttDataLastN" on device. Retrieves the last n
+     * archived data, for a given scalar attribute. Create a dynamic attribute,
+     * retrieve the corresponding data from database and prepare result for
+     * attribute_history call.
+     * 
+     * @param argin
+     *            The attribute's name and the number of wished data
+     * @return String : The new created dynamic attribute name, Long : the
+     *         number of data.
+     */
+    // =========================================================
+    public DevVarLongStringArray get_att_data_last_n(final String[] argin) throws DevFailed {
+        get_logger().info("Entering get_att_data_last_n()");
+        reconnectDatabaseIfNecessary();
+        DevVarLongStringArray argout = null;
+        // ---Add your Own code to control device here ---
+        if (argin.length != 2) {
+            Except.throw_exception("CONFIGURATION_ERROR", "Wrong number of parameters",
+                    "TdbExtractor.get_att_scalar_data_last_n");
+        } else if (dbProxy != null) {
+            try {
+                ((TDBDataBaseManager) dbProxy.getDataBase()).getTdbExport().ExportData2Tdb(argin[0], getTimeNow());
+                // Get data from db.
+                final DbData dbData = dbProxy.getDataBase().getExtractor().getDataGetters().getAttDataLastN(argin);
+                // Buid an attribute and gets its references
+                argout = add_attribute(dbData);
+            } catch (final ArchivingException e) {
+                e.printStackTrace();
+                throw e.toTangoException();
+            } catch (final java.lang.OutOfMemoryError oome) {
+                get_logger().info("OutOfMemoryError in get_att_data_last_n");
+                Except.throw_exception("MEMORY_ERROR", HintOnMemoryError, "TdbExtractor.get_att_data_last_n");
+            } catch (final Throwable t) {
+                t.printStackTrace();
+                if (t instanceof DevFailed) {
+                    final DevError[] errors = ((DevFailed) t).errors;
+                    if (errors != null) {
+                        for (final DevError error : errors) {
+                            get_logger().error(
+                                    "Error: /desc/" + error.desc + "/origin/" + error.origin + "/reason/"
+                                            + error.reason);
+                        }
+                    }
+                    get_logger().error("Error: /CAUSE---------------");
+                    if (((DevFailed) t).getCause() != null) {
+                        ((DevFailed) t).getCause().printStackTrace();
+                    }
+                }
+            }
+        }
+        get_logger().info("Exiting get_att_data_last_n()");
+        return argout;
+    }
+
+    // =========================================================
+    /**
+     * Execute command "GetAttDataMax" on device. Returns the biggest value
+     * generated by the attribute.
+     * 
+     * @param argin
+     *            The attribute's name
+     * @return The biggest value generated by the attribute
+     */
+    // =========================================================
+    public double get_att_data_max(final String argin) throws DevFailed {
+        get_logger().info("Entering get_att_data_max()");
+        reconnectDatabaseIfNecessary();
+        double argout = 0;
+        if (dbProxy != null) {
+            // ---Add your Own code to control device here ---
+            try {
+                ((TDBDataBaseManager) dbProxy.getDataBase()).getTdbExport().ExportData2Tdb(argin, getTimeNow());
+
+                argout = dbProxy.getDataBase().getExtractor().getMinMaxAvgGetters().getAttDataMax(argin);
+            } catch (final ArchivingException e) {
+                throw e.toTangoException();
+            }
+        }
+        get_logger().info("Exiting get_att_data_max()");
+        return argout;
+    }
+
+    // =========================================================
+    /**
+     * Execute command "GetAttDataMaxBetweenDates" on device. Returns the
+     * biggest value generated between the two given dates.
+     * 
+     * @param argin
+     *            The attribute's name, the beginning date (DD-MM-YYYY
+     *            HH24:MI:SS) and the ending date (DD-MM-YYYY HH24:MI:SS)
+     * @return The biggest value generated between the two given dates.
+     */
+    // =========================================================
+    public double get_att_data_max_between_dates(final String[] argin) throws DevFailed {
+        get_logger().info("Entering get_att_data_max_between_dates()");
+        reconnectDatabaseIfNecessary();
+        double argout = 0;
+        // ---Add your Own code to control device here ---
+        if (argin.length != 3) {
+            Except.throw_exception("CONFIGURATION_ERROR", "Wrong number of parameters",
+                    "TdbExtractor.get_att_scalar_data_max_between_dates");
+        } else if (dbProxy != null) {
+            try {
+                ((TDBDataBaseManager) dbProxy.getDataBase()).getTdbExport().ExportData2Tdb(argin[0], argin[2]);
+                argout = dbProxy.getDataBase().getExtractor().getMinMaxAvgGettersBetweenDates()
+                        .getAttDataMaxBetweenDates(argin);
+            } catch (final ArchivingException e) {
+                throw e.toTangoException();
+            }
+        }
+        get_logger().info("Exiting get_att_data_max_between_dates()");
+        return argout;
+    }
+
+    public void remove_dynamic_attributes() throws DevFailed {
+        get_logger().info("Entering remove_dynamic_attributes()");
+        while (dev_attr.get_attr_nb() > 0) {
+            final Attribute nextAttribute = dev_attr.get_attr_by_ind(0);
+            final String attributeName = nextAttribute.get_name();
+            remove_attribute(attributeName);
+        }
+        get_logger().info("Exiting remove_dynamic_attributes()");
+    }
+
+    // =========================================================
+    /**
+     * Execute command "GetAttDataMin" on device. Returns the smallest scalar
+     * value generated by the attribute.
+     * 
+     * @param argin
+     *            The attribute's name
+     * @return The smallest value generated by the attribute
+     */
+    // =========================================================
+    public double get_att_data_min(final String argin) throws DevFailed {
+        get_logger().info("Entering get_att_data_min()");
+        reconnectDatabaseIfNecessary();
+        double argout = 0;
+        if (dbProxy != null) {
+            // ---Add your Own code to control device here ---
+            try {
+                ((TDBDataBaseManager) dbProxy.getDataBase()).getTdbExport().ExportData2Tdb(argin, getTimeNow());
+
+                argout = dbProxy.getDataBase().getExtractor().getMinMaxAvgGetters().getAttDataMin(argin);
+            } catch (final ArchivingException e) {
+                throw e.toTangoException();
+            }
+        }
+        get_logger().info("Exiting get_att_data_min()");
+        return argout;
+    }
+
+    // =========================================================
+    /**
+     * Execute command "GetAttDataMinBetweenDates" on device. Returns the
+     * smallest scalar value generated by the given attribute and between two
+     * given dates
+     * 
+     * @param argin
+     *            The attribute's name, the beginning date (DD-MM-YYYY
+     *            HH24:MI:SS) and the ending date (DD-MM-YYYY HH24:MI:SS)
+     * @return The smallest scalar value generated by the given attribute and
+     *         between the two given dates.
+     */
+    // =========================================================
+    public double get_att_data_min_between_dates(final String[] argin) throws DevFailed {
+        get_logger().info("Entering get_att_data_min_between_dates()");
+        reconnectDatabaseIfNecessary();
+        double argout = 0;
+        // ---Add your Own code to control device here ---
+        if (argin.length != 3) {
+            Except.throw_exception("CONFIGURATION_ERROR", "Wrong number of parameters",
+                    "TdbExtractor.get_att_scalar_data_min_between_dates");
+        } else if (dbProxy != null) {
+            try {
+                ((TDBDataBaseManager) dbProxy.getDataBase()).getTdbExport().ExportData2Tdb(argin[0], argin[2]);
+                argout = dbProxy.getDataBase().getExtractor().getMinMaxAvgGettersBetweenDates()
+                        .getAttDataMinBetweenDates(argin);
+            } catch (final ArchivingException e) {
+                throw e.toTangoException();
+            }
+        }
+        get_logger().info("Exiting get_att_data_min_between_dates()");
+        return argout;
+    }
+
+    // =========================================================
+    /**
+     * Execute command "GetAttDataSupThan" on device. Retrieves all the data
+     * that are higher than the given value x. Create a dynamic attribute,
+     * retrieve the corresponding data from database and prepare result for
+     * attribute_history call.
+     * 
+     * @param argin
+     *            The attribute's name and the lower limit
+     * @return String : The new created dynamic attribute name, Long : the
+     *         number of data.
+     */
+    // =========================================================
+    public DevVarLongStringArray get_att_data_sup_than(final String[] argin) throws DevFailed {
+        get_logger().info("Entering get_att_data_sup_than()");
+        reconnectDatabaseIfNecessary();
+        DevVarLongStringArray argout = null;
+        // ---Add your Own code to control device here ---
+        if (argin.length != 2) {
+            Except.throw_exception("CONFIGURATION_ERROR", "Wrong number of parameters",
+                    "TdbExtractor.get_att_scalar_data_sup_than");
+        } else if (dbProxy != null) {
+            try {
+                ((TDBDataBaseManager) dbProxy.getDataBase()).getTdbExport().ExportData2Tdb(argin[0], getTimeNow());
+                // Get data from db.
+                final DbData dbData = dbProxy.getDataBase().getExtractor().getInfSupGetters().getAttDataSupThan(argin);
+                // Buid an attribute and gets its references
+                argout = add_attribute(dbData);
+            } catch (final ArchivingException e) {
+                throw e.toTangoException();
+            } catch (final java.lang.OutOfMemoryError oome) {
+                get_logger().info("OutOfMemoryError in get_att_data_sup_than");
+                Except.throw_exception("MEMORY_ERROR", HintOnMemoryError, "TdbExtractor.get_att_data_sup_than");
+            }
+        }
+        get_logger().info("Exiting get_att_data_sup_than()");
+        return argout;
+    }
+
+    // =========================================================
+    /**
+     * Execute command "GetAttDataSupThanCount" on device. Returns the number of
+     * data higher than the given value.
+     * 
+     * @param argin
+     *            The attribute's name and the lower limit.
+     * @return The number of data higher than the given value.
+     */
+    // =========================================================
+    public int get_att_data_sup_than_count(final String[] argin) throws DevFailed {
+        get_logger().info("Entering get_att_data_sup_than_count()");
+        reconnectDatabaseIfNecessary();
+        int argout = 0;
+        // ---Add your Own code to control device here ---
+        if (argin.length != 2) {
+            Except.throw_exception("CONFIGURATION_ERROR", "Wrong number of parameters",
+                    "TdbExtractor.get_att_scalar_data_sup_than_count");
+        } else if (dbProxy != null) {
+            try {
+                ((TDBDataBaseManager) dbProxy.getDataBase()).getTdbExport().ExportData2Tdb(argin[0], getTimeNow());
+
+                argout = dbProxy.getDataBase().getExtractor().getInfSupGetters().getAttDataSupThanCount(argin);
+            } catch (final ArchivingException e) {
+                throw e.toTangoException();
+            }
+        }
+        get_logger().info("Exiting get_att_data_sup_than_count()");
+        return argout;
+    }
+
+    // =========================================================
+    /**
+     * Execute command "GetAttDataSupAndInfThan" on device. Retrieves all data
+     * that are higher than the given value x AND lower than the given value y.
+     * Create a dynamic attribute, retrieve the corresponding data from database
+     * and prepare result for attribute_history call.
+     * 
+     * @param argin
+     *            The attribute's name, the lower limit and the upper limit
+     * @return String : The new created dynamic attribute name, Long : the
+     *         number of data.
+     */
+    // =========================================================
+    public DevVarLongStringArray get_att_data_sup_and_inf_than(final String[] argin) throws DevFailed {
+        get_logger().info("Entering get_att_data_sup_and_inf_than()");
+        reconnectDatabaseIfNecessary();
+        DevVarLongStringArray argout = null;
+        // ---Add your Own code to control device here ---
+        if (argin.length != 3) {
+            Except.throw_exception("CONFIGURATION_ERROR", "Wrong number of parameters",
+                    "TdbExtractor.get_att_scalar_data_sup_and_inf_than");
+        } else if (dbProxy != null) {
+            try {
+                ((TDBDataBaseManager) dbProxy.getDataBase()).getTdbExport().ExportData2Tdb(argin[0], getTimeNow());
+
+                // Get data from db.
+                final DbData dbData = dbProxy.getDataBase().getExtractor().getInfSupGetters()
+                        .getAttDataSupAndInfThan(argin);
+                // Buid an attribute and gets its references
+                argout = add_attribute(dbData);
+            } catch (final ArchivingException e) {
+                throw e.toTangoException();
+            } catch (final java.lang.OutOfMemoryError oome) {
+                get_logger().info("OutOfMemoryError in get_att_data_sup_and_inf_than");
+                Except.throw_exception("MEMORY_ERROR", HintOnMemoryError, "TdbExtractor.get_att_data_sup_and_inf_than");
+            }
+        }
+        get_logger().info("Exiting get_att_data_sup_and_inf_than()");
+        return argout;
+    }
+
+    // =========================================================
+    /**
+     * Execute command "GetAttDataSupAndInfThanCount" on device. Returns data
+     * that are highter than the given value x AND lower than the given value y.
+     * 
+     * @param argin
+     *            The attribute's name, the lower limit and the upper limit
+     * @return The data that are highter than the given value x AND lower than
+     *         the given value y.
+     */
+    // =========================================================
+    public int get_att_data_sup_and_inf_than_count(final String[] argin) throws DevFailed {
+        get_logger().info("Entering get_att_data_sup_and_inf_than_count()");
+        reconnectDatabaseIfNecessary();
+        int argout = 0;
+        // ---Add your Own code to control device here ---
+        if (argin.length != 3) {
+            Except.throw_exception("CONFIGURATION_ERROR", "Wrong number of parameters",
+                    "TdbExtractor.get_att_scalar_data_sup_and_inf_than_count");
+        } else if (db_dev != null) {
+            try {
+                ((TDBDataBaseManager) dbProxy.getDataBase()).getTdbExport().ExportData2Tdb(argin[0], getTimeNow());
+
+                argout = dbProxy.getDataBase().getExtractor().getInfSupGetters().getAttDataSupAndInfThanCount(argin);
+            } catch (final ArchivingException e) {
+                throw e.toTangoException();
+            }
+        }
+        get_logger().info("Exiting get_att_data_sup_and_inf_than_count()");
+        return argout;
+    }
+
+    // =========================================================
+    /**
+     * Execute command "GetAttDataSupAndInfThanBetweenDates" on device.
+     * Retrieves data beetwen two dates (date_1 & date_2) - Data are higher than
+     * the given value x AND lower than the given value y. Create a dynamic
+     * attribute, retrieve the corresponding data from database and prepare
+     * result for attribute_history call.
+     * 
+     * @param argin
+     *            The attribute's name, the lower limit, the upper limit, the
+     *            beginning date (DD-MM-YYYY HH24:MI:SS) and the ending date
+     *            (DD-MM-YYYY HH24:MI:SS)
+     * @return String : The new created dynamic attribute name, Long : the
+     *         number of data.
+     */
+    // =========================================================
+    public DevVarLongStringArray get_att_data_sup_and_inf_than_between_dates(final String[] argin) throws DevFailed {
+        get_logger().info("Entering get_att_data_sup_and_inf_than_between_dates()");
+        reconnectDatabaseIfNecessary();
+        DevVarLongStringArray argout = null;
+        // ---Add your Own code to control device here ---
+        if (argin.length != 5) {
+            Except.throw_exception("CONFIGURATION_ERROR", "Wrong number of parameters",
+                    "TdbExtractor.get_att_scalar_data_sup_and_inf_than_beetween_dates");
+        } else if (dbProxy != null) {
+            try {
+                ((TDBDataBaseManager) dbProxy.getDataBase()).getTdbExport().ExportData2Tdb(argin[0], argin[4]);
+
+                // Get data from db.
+                final DbData dbData = dbProxy.getDataBase().getExtractor().getInfSupGettersBetweenDates()
+                        .getAttDataSupAndInfThanBetweenDates(argin);
+                // Buid an attribute and gets its references
+                argout = add_attribute(dbData);
+            } catch (final ArchivingException e) {
+                throw e.toTangoException();
+            } catch (final java.lang.OutOfMemoryError oome) {
+                get_logger().info("OutOfMemoryError in get_att_data_sup_and_inf_than_between_dates");
+                Except.throw_exception("MEMORY_ERROR", HintOnMemoryError,
+                        "TdbExtractor.get_att_data_sup_and_inf_than_between_dates");
+            }
+        }
+        get_logger().info("Exiting get_att_data_sup_and_inf_than_between_dates()");
+        return argout;
+    }
+
+    // =========================================================
+    /**
+     * Execute command "GetAttDataSupAndInfThanBetweenDatesCount" on device.
+     * Returns the number of data higher than the given value x, (AND) lower
+     * than the given value y, and beetwen two dates (date_1 & date_2).
+     * 
+     * @param argin
+     *            The attribute's name, the lower limit, the upper limit, the
+     *            beginning date (DD-MM-YYYY HH24:MI:SS) and the ending date
+     *            (DD-MM-YYYY HH24:MI:SS).
+     * @return The number of data higher than the given value x, (AND) lower
+     *         than the given value y, and beetwen two dates (date_1 & date_2).
+     */
+    // =========================================================
+    public int get_att_data_sup_and_inf_than_between_dates_count(final String[] argin) throws DevFailed {
+        get_logger().info("Entering get_att_data_sup_and_inf_than_between_dates_count()");
+        reconnectDatabaseIfNecessary();
+        int argout = 0;
+        // ---Add your Own code to control device here ---
+        if (argin.length != 5) {
+            Except.throw_exception("CONFIGURATION_ERROR", "Wrong number of parameters",
+                    "TdbExtractor.get_att_scalar_data_sup_and_inf_than_between_dates_count");
+        } else if (dbProxy != null) {
+            try {
+                ((TDBDataBaseManager) dbProxy.getDataBase()).getTdbExport().ExportData2Tdb(argin[0], argin[4]);
+
+                argout = dbProxy.getDataBase().getExtractor().getInfSupGettersBetweenDates()
+                        .getAttDataSupAndInfThanBetweenDatesCount(argin);
+            } catch (final ArchivingException e) {
+                throw e.toTangoException();
+            }
+        }
+        get_logger().info("Exiting get_att_data_sup_and_inf_than_between_dates_count()");
+        return argout;
+    }
+
+    // =========================================================
+    /**
+     * Execute command "GetAttDataSupThanBetweenDates" on device. Retrieves data
+     * beetwen two dates (date_1 & date_2) - Data are higher than the given
+     * value x. Create a dynamic attribute, retrieve the corresponding data from
+     * database and prepare result for attribute_history call.
+     * 
+     * @param argin
+     *            The attribute's name, the lower limit, the beginning date
+     *            (DD-MM-YYYY HH24:MI:SS) and the ending date (DD-MM-YYYY
+     *            HH24:MI:SS)
+     * @return String : The new created dynamic attribute name, Long : the
+     *         number of data.
+     */
+    // =========================================================
+    public DevVarLongStringArray get_att_data_sup_than_between_dates(final String[] argin) throws DevFailed {
+        get_logger().info("Entering get_att_data_sup_than_between_dates()");
+        reconnectDatabaseIfNecessary();
+        DevVarLongStringArray argout = null;
+        // ---Add your Own code to control device here ---
+        if (argin.length != 4) {
+            Except.throw_exception("CONFIGURATION_ERROR", "Wrong number of parameters",
+                    "TdbExtractor.get_att_scalar_data_sup_than_beetween_dates");
+        } else if (dbProxy != null) {
+            try {
+                ((TDBDataBaseManager) dbProxy.getDataBase()).getTdbExport().ExportData2Tdb(argin[0], argin[3]);
+                final DbData dbData = dbProxy.getDataBase().getExtractor().getInfSupGettersBetweenDates()
+                        .getAttDataSupThanBetweenDates(argin);
+                // Buid an attribute and gets its references
+                argout = add_attribute(dbData);
+            } catch (final ArchivingException e) {
+                throw e.toTangoException();
+            } catch (final java.lang.OutOfMemoryError oome) {
+                get_logger().info("OutOfMemoryError in get_att_data_sup_than_between_dates");
+                Except.throw_exception("MEMORY_ERROR", HintOnMemoryError,
+                        "TdbExtractor.get_att_data_sup_than_between_dates");
+            }
+        }
+        get_logger().info("Exiting get_att_data_sup_than_between_dates()");
+        return argout;
+    }
+
+    // =========================================================
+    /**
+     * Execute command "GetAttDataSupThanBetweenDatesCount" on device. Returns
+     * the number of data higher than the given value y, and beetwen two dates
+     * (date_1 & date_2).
+     * 
+     * @param argin
+     *            The attribute's name, the lower limit, the beginning date
+     *            (DD-MM-YYYY HH24:MI:SS) and the ending date (DD-MM-YYYY
+     *            HH24:MI:SS).
+     * @return The number of data higher than the given value y, and beetwen two
+     *         dates (date_1 & date_2).
+     */
+    // =========================================================
+    public int get_att_data_sup_than_between_dates_count(final String[] argin) throws DevFailed {
+        get_logger().info("Entering get_att_data_sup_than_between_dates_count()");
+        reconnectDatabaseIfNecessary();
+        int argout = 0;
+        // ---Add your Own code to control device here ---
+        if (argin.length != 4) {
+            Except.throw_exception("CONFIGURATION_ERROR", "Wrong number of parameters",
+                    "TdbExtractor.get_att_scalar_data_sup_than_between_dates_count");
+        } else if (dbProxy != null) {
+            try {
+                ((TDBDataBaseManager) dbProxy.getDataBase()).getTdbExport().ExportData2Tdb(argin[0], argin[3]);
+                argout = dbProxy.getDataBase().getExtractor().getInfSupGettersBetweenDates()
+                        .getAttDataSupThanBetweenDatesCount(argin);
+            } catch (final ArchivingException e) {
+                throw e.toTangoException();
+            }
+        }
+        get_logger().info("Exiting get_att_data_sup_than_between_dates_count()");
+        return argout;
+    }
+
+    // =========================================================
+    /**
+     * Execute command "RemoveDynamicAttribute" on device. Remove the dynamic
+     * attribute.
+     * 
+     * @param argin
+     *            The TdbExtractor dynamic attribute's name
+     */
+    // =========================================================
+    public void remove_dynamic_attribute(final String argin) throws DevFailed {
+        get_logger().info("Entering remove_dynamic_attribute()");
+
+        // ---Add your Own code to control device here ---
+        // Remove prop for the attribute
+        final String[] obj_to_del = new String[3];
+        obj_to_del[0] = device_name;
+        obj_to_del[1] = "attribute";
+        obj_to_del[2] = argin;
+        final Util tg = Util.instance();
+        tg.get_dserver_device().rem_obj_polling(obj_to_del, false);
+
+        // Remove the attribute
+        remove_attribute(argin);
+        get_logger().info("Exiting remove_dynamic_attribute()");
+    }
+
+    private DevVarLongStringArray add_attribute(final DbData dbData) throws DevFailed, ArchivingException {
+        if (dbData.getTimedData() == null || dbData.getTimedData().length == 0) {
+            // final String message = "Can't create the dynamic attribute!";
+            // final String reason = "The data is empty.";
+            // final String desc =
+            // "add_attribute/The DbData argument is empty.";
+            // throw new ArchivingException(message , reason , null , desc ,
+            // this.getClass().getName());
+            final int[] lv = { 0 };
+            final String[] sv = { "NO_DATA" };
+            final DevVarLongStringArray res = new DevVarLongStringArray(lv, sv);
+            return res;
+
+        }
+
+        final boolean _2value = dbData.getWritable() == AttrWriteType._READ_WITH_WRITE
+                || dbData.getWritable() == AttrWriteType._READ_WRITE ? true : false;
+        String random_name_1 = "", random_name_2 = "";
+        String[] names;
+        // Build new Attribute's name
+        final boolean firstIsRead = dbData.getWritable() != AttrWriteType._WRITE;
+        // random_name_1 = "att_000" + id++;
+        random_name_1 = getName(dbData.getName(), id, firstIsRead);
+        if (_2value) {
+            // random_name_2 = "att_000" + id++;
+            random_name_2 = getName(dbData.getName(), id, !firstIsRead);
+        }
+        id++;
+
+        if (!_2value) {
+            names = new String[1];
+            names[0] = random_name_1;
+        } else {
+            names = new String[2];
+            names[0] = random_name_1;
+            names[1] = random_name_2;
+        }
+
+        // Create the attribute depends on DataFormat
+        int data_type;
+        data_type = dbData.getDataType();
+        if (data_type == TangoConst.Tango_DEV_STATE) {
+            // The STATE type attributes are translated in STRING TYPE because
+            // the State type is not well
+            // managed in Tango layers
+            data_type = TangoConst.Tango_DEV_STRING;
+        } else if (data_type == TangoConst.Tango_DEV_USHORT || data_type == TangoConst.Tango_DEV_UCHAR) {
+            // U_* types are not supported by polling buffer, so use another
+            // supported type
+            data_type = TangoConst.Tango_DEV_SHORT;
+        } else if (data_type == TangoConst.Tango_DEV_ULONG) {
+            data_type = TangoConst.Tango_DEV_LONG;
+        } else if (data_type == TangoConst.Tango_DEV_ULONG64) {
+            data_type = TangoConst.Tango_DEV_LONG64;
+        }
+
+        switch (dbData.getDataFormat()) {
+            case AttrDataFormat._SCALAR:
+                // TODO Correction Tango � reporter !! Tango [Java side] ne
+                // supporte pas les attributs READ-WRITE.
+                // add_attribute(new Attr(random_name_1, dbData.getData_type(),
+                // AttrWriteType.from_int(dbData.getWritable())));
+
+                add_attribute(new Attr(random_name_1, data_type, AttrWriteType.READ));
+                if (_2value) {
+                    add_attribute(new Attr(random_name_2, data_type, AttrWriteType.READ));
+                }
+                break;
+            case AttrDataFormat._SPECTRUM:
+                int dimX = dbData.getMaxX();
+                if (dimX == 0) {
+                    dimX = 1;
+                }
+                add_attribute(new SpectrumAttr(random_name_1, data_type, dimX));
+                if (_2value) {
+                    add_attribute(new SpectrumAttr(random_name_2, data_type, dimX));
+                }
+                break;
+            case AttrDataFormat._IMAGE:
+                add_attribute(new ImageAttr(random_name_1, data_type, dbData.getMaxX(), dbData.getMaxY()));
+                break;
+        }
+
+        get_logger().info("attr " + random_name_1 + " created");
+        if (_2value) {
+            get_logger().info("attr " + random_name_2 + " created");
+        }
+        set_polled_attr(names);
+        set_poll_ring_depth(dbData.size());
+
+        // Start polling for this device in external sync. mode (udt = 0)
+        DevVarLongStringArray poll_1, poll_2;
+        poll_1 = new DevVarLongStringArray();
+        poll_2 = new DevVarLongStringArray();
+
+        poll_1.lvalue = new int[1];
+        poll_1.lvalue[0] = 0;
+        poll_1.svalue = new String[3];
+        poll_1.svalue[0] = device_name;
+        poll_1.svalue[1] = "attribute";
+        poll_1.svalue[2] = random_name_1;
+
+        if (_2value) {
+            poll_2.lvalue = new int[1];
+            poll_2.lvalue[0] = 0;
+            poll_2.svalue = new String[3];
+            poll_2.svalue[0] = device_name;
+            poll_2.svalue[1] = "attribute";
+            poll_2.svalue[2] = random_name_2;
+        }
+        final Util tg_1 = Util.instance();
+        tg_1.get_dserver_device().add_obj_polling(poll_1, false);
+
+        final Util tg_2 = Util.instance();
+        if (_2value) {
+            tg_2.get_dserver_device().add_obj_polling(poll_2, false);
+        }
+
+        // And fill buffer with database's data
+        try {
+            if (_2value) {
+                final DbData[] dbDatas = dbData.splitDbData();
+                tg_1.fill_attr_polling_buffer(this, random_name_1, dbDatas[0].getDataAsTimedAttrData());
+                tg_2.fill_attr_polling_buffer(this, random_name_2, dbDatas[1].getDataAsTimedAttrData());
+            } else {
+                tg_1.fill_attr_polling_buffer(this, random_name_1, dbData.getDataAsTimedAttrData());
+            }
+        } catch (final DevFailed e) {
+            throw e;
+        } catch (final Exception e) {
+            // FIXME java.lang.ArrayIndexOutOfBoundsException thrown when some
+            // data are empty.
+            e.printStackTrace();
+            System.out.println("ERROR when filling data polling buffer, may be empty");
+        }
+
+        final DevVarLongStringArray argout = new DevVarLongStringArray();
+        argout.lvalue = new int[1];
+        if (!_2value) {
+            argout.svalue = new String[1];
+        } else {
+            argout.svalue = new String[2];
+        }
+
+        argout.lvalue[0] = dbData.getTimedData().length;
+        argout.svalue[0] = random_name_1;
+        if (_2value) {
+            argout.svalue[1] = random_name_2;
+        }
+
+        return argout;
+    }
+
+    public String getName(final String completeName, final int id, final boolean isReadValue) {
+        final String partialName = getPartialName(completeName);
+        final String marker = isReadValue ? "r" : "w";
+
+        final StringBuilder buff = new StringBuilder();
+        buff.append(partialName);
+        buff.append("_");
+        buff.append(String.valueOf(id));
+        buff.append("_");
+        buff.append(marker);
+
+        return buff.toString().toLowerCase();
+    }
+
+    /**
+     * @param completeName
+     * @return
+     */
+    private String getPartialName(final String completeName) {
+        try {
+            final StringTokenizer st = new StringTokenizer(completeName, "/");
+            st.nextToken();// domain
+            st.nextToken();// family
+            st.nextToken();// member
+            return st.nextToken();// attribute
+        } catch (final Exception e) {
+            e.printStackTrace();
+            return null;
+        }
+    }
+
+    /*
+     * private DevVarLongStringArray add_attribute(DbData dbData) throws
+     * DevFailed { DevVarLongStringArray argout = new DevVarLongStringArray();
+     * boolean _2value = ( dbData.getWritable() ==
+     * AttrWriteType._READ_WITH_WRITE || dbData.getWritable() ==
+     * AttrWriteType._READ_WRITE ) ? true : false; String random_name_1 = "" ,
+     * random_name_2 = ""; String[] names; // Build new Attribute's name
+     * random_name_1 = "att_000" + id++; if ( _2value ) random_name_2 =
+     * "att_000" + id++; if ( !_2value ) { names = new String[ 1 ]; names[ 0 ] =
+     * random_name_1; } else { names = new String[ 2 ]; names[ 0 ] =
+     * random_name_1; names[ 1 ] = random_name_2; } // Create the attribute
+     * depends on DataFormat switch ( dbData.getData_format() ) { case
+     * AttrDataFormat._SCALAR: // TODO Correction Tango � reporter !! Tango
+     * [Java side] ne supporte pas les attributs READ-WRITE. //add_attribute(new
+     * Attr(random_name_1, dbData.getData_type(),
+     * AttrWriteType.from_int(dbData.getWritable()))); add_attribute(new
+     * Attr(random_name_1 , dbData.getData_type() , AttrWriteType.READ)); if (
+     * _2value ) add_attribute(new Attr(random_name_2 , dbData.getData_type() ,
+     * AttrWriteType.READ)); break; case AttrDataFormat._SPECTRUM:
+     * add_attribute(new SpectrumAttr(random_name_1 , dbData.getData_type() ,
+     * dbData.getMax_x())); break; case AttrDataFormat._IMAGE: add_attribute(new
+     * ImageAttr(random_name_1 , dbData.getData_type() , dbData.getMax_x() ,
+     * dbData.getMax_y())); break; } get_logger().info("attr " + random_name_1 +
+     * " created"); if ( _2value ) get_logger().info("attr " + random_name_2 +
+     * " created"); set_polled_attr(names); set_poll_ring_depth(dbData.size());
+     * // Start polling for this device in external sync. mode (udt = 0)
+     * DevVarLongStringArray poll_1 , poll_2; poll_1 = new
+     * DevVarLongStringArray(); poll_2 = new DevVarLongStringArray();
+     * poll_1.lvalue = new int[ 1 ]; poll_1.lvalue[ 0 ] = 0; poll_1.svalue = new
+     * String[ 3 ]; poll_1.svalue[ 0 ] = device_name; poll_1.svalue[ 1 ] =
+     * "attribute"; poll_1.svalue[ 2 ] = random_name_1; if ( _2value ) {
+     * poll_2.lvalue = new int[ 1 ]; poll_2.lvalue[ 0 ] = 0; poll_2.svalue = new
+     * String[ 3 ]; poll_2.svalue[ 0 ] = device_name; poll_2.svalue[ 1 ] =
+     * "attribute"; poll_2.svalue[ 2 ] = random_name_2; } Util tg_1 =
+     * Util.instance(); tg_1.get_dserver_device().add_obj_polling(poll_1 ,
+     * false); Util tg_2 = Util.instance(); if ( _2value )
+     * tg_2.get_dserver_device().add_obj_polling(poll_2 , false); // And fill
+     * buffer with database's data DbData[] dbDatas = dbData.splitDbData();
+     * tg_1.fill_attr_polling_buffer(this , random_name_1 , dbDatas[ 0
+     * ].getData()); if ( _2value ) tg_2.fill_attr_polling_buffer(this ,
+     * random_name_2 , dbDatas[ 1 ].getData()); argout = new
+     * DevVarLongStringArray(); argout.lvalue = new int[ 1 ]; if ( !_2value ) {
+     * argout.svalue = new String[ 1 ]; } else { argout.svalue = new String[ 2
+     * ]; } argout.lvalue[ 0 ] = dbData.getData().length; argout.svalue[ 0 ] =
+     * random_name_1; if ( _2value ) argout.svalue[ 1 ] = random_name_2; return
+     * argout; }
+     */
+    // ===================================================================
+    /**
+     * Method called by the read_attributes CORBA operation to set internal
+     * attribute value.
+     * 
+     * @param attr
+     *            reference to the Attribute object
+     */
+    // ===================================================================
+    @Override
+    public void read_attr(final Attribute attr) throws DevFailed {
+        final String attr_name = attr.get_name();
+        // get_logger().info("In read_attr for attribute " + attr_name);
+
+        // Switch on attribute name
+        // ---------------------------------
+        if (attr_name == "version") {
+            // Add your own code here
+            attr.set_value(m_version);
+        }
+    }
+
+    public String get_max_time(final String argin) throws DevFailed {
+        reconnectDatabaseIfNecessary();
+        String argout;
+        if (dbProxy == null) {
+            argout = "";
+        } else {
+            try {
+                final DataBaseManager db = dbProxy.getDataBase();
+                final Timestamp last = db.getDbUtil().getTimeOfLastInsert(argin, true);
+                if (last == null) {
+                    argout = "NO VALUES RECORDED";
+                } else {
+                    argout = last.toString();
+                }
+            } catch (final ArchivingException e) {
+                e.printStackTrace();
+                throw e.toTangoException();
+            }
+        }
+        return argout;
+    }
+
+    public String get_min_time(final String argin) throws DevFailed {
+        reconnectDatabaseIfNecessary();
+        String argout;
+        if (dbProxy == null) {
+            argout = "";
+        } else {
+            try {
+                final DataBaseManager db = dbProxy.getDataBase();
+                final Timestamp last = db.getDbUtil().getTimeOfLastInsert(argin, false);
+                if (last == null) {
+                    argout = "NO VALUES RECORDED";
+                } else {
+                    argout = last.toString();
+                }
+            } catch (final ArchivingException e) {
+                e.printStackTrace();
+                throw e.toTangoException();
+            }
+        }
+        return argout;
+    }
+
+    /*
+    *
+    */
+    public static String getTimeNow() {
+        // TODO Auto-generated method stub
+        final long _now = System.currentTimeMillis();
+        return new Timestamp(_now).toString();
+
+    }
+
+    @Override
+    public void delete_device() throws DevFailed {
+        // TODO Auto-generated method stub
+
+    }
+
+    // =========================================================
+    /**
+     * main part for the device server class
+     */
+    // =========================================================
+    public static void main(final String[] argv) {
+        try {
+            final Util tg = Util.init(argv, "TdbExtractor");
+            tg.server_init();
+
+            System.out.println("Ready to accept request");
+
+            tg.server_run();
+        } catch (final OutOfMemoryError ex) {
+            System.err.println("Can't allocate memory !!!!");
+            System.err.println("Exiting");
+        } catch (final UserException ex) {
+            Except.print_exception(ex);
+
+            System.err.println("Received a CORBA user exception");
+            System.err.println("Exiting");
+        } catch (final SystemException ex) {
+            Except.print_exception(ex);
+
+            System.err.println("Received a CORBA system exception");
+            System.err.println("Exiting");
+        }
+        System.exit(-1);
+    }
+
+}
+// --------------------------------------------------------------------------
+/*
+ * end of $Source:
+ * /cvsroot/tango-cs/archiving/server/hdbtdbArchivingServers/src/
+ * main/java/TdbExtractor/TdbExtractor.java,v $
+ */
diff --git a/src/main/java/TdbExtractor/TdbExtractorClass.java b/tdbextractor/src/main/java/TdbExtractor/TdbExtractorClass.java
similarity index 98%
rename from src/main/java/TdbExtractor/TdbExtractorClass.java
rename to tdbextractor/src/main/java/TdbExtractor/TdbExtractorClass.java
index 3faab0e05dc640eae24e64f4cef087d21da67e67..6d831852ee903ebd30089da1959dd020fd76b6a8 100644
--- a/src/main/java/TdbExtractor/TdbExtractorClass.java
+++ b/tdbextractor/src/main/java/TdbExtractor/TdbExtractorClass.java
@@ -1,555 +1,555 @@
-// +======================================================================
-// $Source$
-//
-// Project:   	Tango Device Server
-//
-// Description:	java source code for the TdbExtractor class .
-//              This class is a singleton class and implements everything
-//              which exists only once for all the  TdbExtractor object
-//              It inherits from the DeviceClass class.
-//
-// $Author$
-//
-// $Revision$
-//
-// $Log$
-// Revision 1.4  2010/01/21 14:56:42  extia-soleil
-// AW (Extia) - Mantis 14438:
-// - Added commands to get the full name of an attribute from its id, in HDB and TDB
-//
-// Revision 1.3  2009/12/17 12:47:15  pierrejoseph
-// CheckStyle:  Organize imports / Format
-//
-// Revision 1.2  2008/04/08 11:34:58  pierrejoseph
-// G�n�ration automatique de la version des devices.
-//
-// Revision 1.1  2008/02/28 15:37:14  pierrejoseph
-// TdbExtractor has been forgotten
-//
-// Revision 1.14  2007/05/11 13:58:54  pierrejoseph
-// Attribute addition : release version
-//
-// Revision 1.13  2007/03/16 08:44:14  ounsy
-// added a GetMinTime command
-//
-// Revision 1.12  2007/03/02 08:46:03  ounsy
-// added the GetMaxTime command
-//
-// Revision 1.11  2007/03/01 17:59:00  pierrejoseph
-// The new  input args date format is YYYY-MM-DD
-//
-// Revision 1.10  2007/03/01 10:08:01  ounsy
-// added the RemoveDynamicAttributes command
-//
-// Revision 1.9  2006/09/07 13:48:30  ounsy
-// added extraction with sampling methods
-//
-// Revision 1.8  2006/02/15 11:12:20  chinkumo
-// Javadoc comments updated.
-//
-// Revision 1.7  2006/01/27 13:07:20  ounsy
-// organised imports
-//
-// Revision 1.6  2005/11/29 17:32:48  chinkumo
-// no message
-//
-// Revision 1.5.10.4  2005/11/29 16:13:31  chinkumo
-// Code reformated (pogo compatible)
-//
-// Revision 1.5.10.3  2005/11/15 13:45:16  chinkumo
-// ...
-//
-// Revision 1.5.10.2  2005/09/26 07:58:42  chinkumo
-// Every commands of shape 'getAttDataXXXXCount(...)' was changed. The type of their returned object was changed from 'short' to 'long'.
-//
-// Revision 1.5.10.1  2005/09/09 10:34:41  chinkumo
-// Since the extraction politic changed to 'dynamic attributes', the device was pogo-regenerated.
-//
-//
-// copyleft :    European Synchrotron Radiation Facility
-//               BP 220, Grenoble 38043
-//               FRANCE
-//
-//-======================================================================
-//
-//  		This file is generated by POGO
-//	(Program Obviously used to Generate tango Object)
-//
-//         (c) - Software Engineering Group - ESRF
-//=============================================================================
-
-package TdbExtractor;
-
-import java.util.ResourceBundle;
-import java.util.Vector;
-
-import fr.esrf.Tango.AttrWriteType;
-import fr.esrf.Tango.DevFailed;
-import fr.esrf.Tango.DispLevel;
-import fr.esrf.TangoApi.DbDatum;
-import fr.esrf.TangoDs.Attr;
-import fr.esrf.TangoDs.DeviceClass;
-import fr.esrf.TangoDs.DeviceImpl;
-import fr.esrf.TangoDs.TangoConst;
-import fr.esrf.TangoDs.TemplCommandInOut;
-import fr.esrf.TangoDs.Util;
-
-public class TdbExtractorClass extends DeviceClass implements TangoConst {
-    /**
-     * TdbExtractorClass class instance (it is a singleton).
-     */
-    private static TdbExtractorClass _instance = null;
-
-    /**
-     * Class properties array.
-     */
-    private DbDatum[] cl_prop = null;
-
-    // --------- Start of properties data members ----------
-
-    // --------- End of properties data members ----------
-
-    // ===================================================================
-    //
-    // method : instance()
-    //
-    // description : static method to retrieve the TdbExtractorClass object
-    // once it has been initialised
-    //
-    // ===================================================================
-    public static TdbExtractorClass instance() {
-        if (_instance == null) {
-            System.err.println("TdbExtractorClass is not initialised !!!");
-            System.err.println("Exiting");
-            System.exit(-1);
-        }
-        return _instance;
-    }
-
-    // ===================================================================
-    //
-    // method : Init()
-    //
-    // description : static method to create/retrieve the TdbExtractorClass
-    // object. This method is the only one which enables a
-    // user to create the object
-    //
-    // in : - class_name : The class name
-    //
-    // ===================================================================
-    public static synchronized TdbExtractorClass init(String class_name) throws DevFailed {
-        if (_instance == null) {
-            _instance = new TdbExtractorClass(class_name);
-        }
-        return _instance;
-    }
-
-    // ===================================================================
-    //
-    // method : TdbExtractorClass()
-    //
-    // description : constructor for the TdbExtractorClass class
-    //
-    // argument : in : - name : The class name
-    //
-    // ===================================================================
-    protected TdbExtractorClass(String name) throws DevFailed {
-        super(name);
-
-        Util.out2.println("Entering TdbExtractorClass constructor");
-        // write_class_property();
-        get_class_property();
-
-        Util.out2.println("Leaving TdbExtractorClass constructor");
-    }
-
-    // ===================================================================
-    //
-    // method : command_factory()
-    //
-    // description : Create the command object(s) and store them in the
-    // command list
-    // ===================================================================
-    @Override
-    public void command_factory() {
-        command_list.addElement(new GetMinTimeClass("GetMinTime", Tango_DEV_STRING, Tango_DEV_STRING,
-                "The attribute to search", "The earliest value's timestamp", DispLevel.OPERATOR));
-        command_list.addElement(new GetMaxTimeClass("GetMaxTime", Tango_DEV_STRING, Tango_DEV_STRING,
-                "The attribute to search", "The latest value's timestamp", DispLevel.OPERATOR));
-        command_list.addElement(new GetInfoClass("GetInfo", Tango_DEV_VOID, Tango_DEV_STRING, "",
-                "The informations that characterize the database", DispLevel.OPERATOR));
-        command_list.addElement(new GetHostClass("GetHost", Tango_DEV_VOID, Tango_DEV_STRING, "",
-                "The connected database host identifier.", DispLevel.OPERATOR));
-        command_list.addElement(new GetUserClass("GetUser", Tango_DEV_VOID, Tango_DEV_STRING, "",
-                "The current user's name used for the connection.", DispLevel.OPERATOR));
-        command_list.addElement(new GetConnectionStateClass("GetConnectionState", Tango_DEV_VOID, Tango_DEV_BOOLEAN,
-                "", "The connection state", DispLevel.OPERATOR));
-        command_list.addElement(new GetAttDefinitionDataClass("GetAttDefinitionData", Tango_DEV_STRING,
-                Tango_DEVVAR_STRINGARRAY, "The attribute's name",
-                "Differents definition informations for the given attribute", DispLevel.OPERATOR));
-        command_list.addElement(new GetAttPropertiesDataClass("GetAttPropertiesData", Tango_DEV_STRING,
-                Tango_DEVVAR_STRINGARRAY, "The attribute's name",
-                "An array containing the differents properties for the given attribute", DispLevel.OPERATOR));
-        command_list.addElement(new GetAttIdClass("GetAttId", Tango_DEV_STRING, Tango_DEV_LONG, "The attribute's name",
-                "The TDB's ID that characterize the given attribute", DispLevel.OPERATOR));
-        command_list.addElement(new GetAttNameAllClass("GetAttNameAll", Tango_DEV_VOID, Tango_DEVVAR_STRINGARRAY, "",
-                "The whole list of the attributes registered in TDB", DispLevel.OPERATOR));
-        command_list.addElement(new GetAttNameFacilityClass("GetAttNameFacility", Tango_DEV_VOID,
-                Tango_DEVVAR_STRINGARRAY, "",
-                "The whole list of the attributes registered in TDB, and that belong to the current facility.",
-                DispLevel.OPERATOR));
-        command_list
-                .addElement(new GetAttNameFilterFormatClass(
-                        "GetAttNameFilterFormat",
-                        Tango_DEV_SHORT,
-                        Tango_DEVVAR_STRINGARRAY,
-                        "A format [0 -> scalar - 1 -> spectrum - 2 -> image]",
-                        "The filtered list of attributes registered in TDB.  The filtering is made according to the given format [0 -> scalar - 1 -> spectrum - 2 -> image]",
-                        DispLevel.OPERATOR));
-        command_list
-                .addElement(new GetAttNameFilterTypeClass(
-                        "GetAttNameFilterType",
-                        Tango_DEV_SHORT,
-                        Tango_DEVVAR_STRINGARRAY,
-                        "A type [2 -> Tango::DevShort | 3 -> Tango::DevLong | 5 -> Tango::DevDouble and 8 -> Tango::DevString]",
-                        "The filtered list of attributes registered in TDB.  The filtering is made according to the given type [2 -> Tango::DevShort | 3 -> Tango::DevLong | 5 -> Tango::DevDouble and 8 -> Tango::DevString]",
-                        DispLevel.OPERATOR));
-        command_list.addElement(new GetAttCountAllClass("GetAttCountAll", Tango_DEV_VOID, Tango_DEV_LONG, "",
-                "The total number of attributes defined in TDB", DispLevel.OPERATOR));
-        command_list
-                .addElement(new GetAttCountFilterFormatClass(
-                        "GetAttCountFilterFormat",
-                        Tango_DEV_SHORT,
-                        Tango_DEV_LONG,
-                        "A format [0 -> scalar - 1 -> spectrum - 2 -> image]",
-                        "The total number of attributes defined in TDB with the given format [0 -> scalar - 1 -> spectrum - 2 -> image]",
-                        DispLevel.OPERATOR));
-        command_list
-                .addElement(new GetAttCountFilterTypeClass(
-                        "GetAttCountFilterType",
-                        Tango_DEV_SHORT,
-                        Tango_DEV_LONG,
-                        "A type [2 -> Tango::DevShort | 3 -> Tango::DevLong | 5 -> Tango::DevDouble and 8 -> Tango::DevString]",
-                        "The total number of attributes defined in TDB with the given type [2 -> Tango::DevShort | 3 -> Tango::DevLong | 5 -> Tango::DevDouble and 8 -> Tango::DevString]",
-                        DispLevel.OPERATOR));
-        command_list.addElement(new GetDomainsClass("GetDomains", Tango_DEV_VOID, Tango_DEVVAR_STRINGARRAY, "",
-                "The registered domains", DispLevel.OPERATOR));
-        command_list.addElement(new GetDomainsCountClass("GetDomainsCount", Tango_DEV_VOID, Tango_DEV_LONG, "",
-                "The number of distinct registered domains.", DispLevel.OPERATOR));
-        command_list.addElement(new GetFamiliesClass("GetFamilies", Tango_DEV_VOID, Tango_DEVVAR_STRINGARRAY, "",
-                "The registered families", DispLevel.OPERATOR));
-        command_list.addElement(new GetFamiliesCountClass("GetFamiliesCount", Tango_DEV_VOID, Tango_DEV_LONG, "",
-                "The number of distinct registered families.", DispLevel.OPERATOR));
-        command_list.addElement(new GetFamiliesByDomainClass("GetFamiliesByDomain", Tango_DEV_STRING,
-                Tango_DEVVAR_STRINGARRAY, "The given domain", "The registered families for the given domain",
-                DispLevel.OPERATOR));
-        command_list.addElement(new GetFamiliesByDomainCountClass("GetFamiliesByDomainCount", Tango_DEV_STRING,
-                Tango_DEV_LONG, "A domain name", "The number of distinct registered families for a given domain.",
-                DispLevel.OPERATOR));
-        command_list.addElement(new GetMembersClass("GetMembers", Tango_DEV_VOID, Tango_DEVVAR_STRINGARRAY, "",
-                "The registered members", DispLevel.OPERATOR));
-        command_list.addElement(new GetMembersCountClass("GetMembersCount", Tango_DEV_VOID, Tango_DEV_LONG, "",
-                "The number of distinct members.", DispLevel.OPERATOR));
-        command_list.addElement(new GetMembersByDomainFamilyClass("GetMembersByDomainFamily", Tango_DEVVAR_STRINGARRAY,
-                Tango_DEVVAR_STRINGARRAY, "The given domain and family",
-                "The registered members for the given domain and family", DispLevel.OPERATOR));
-        command_list.addElement(new GetMembersByDomainFamilyCountClass("GetMembersByDomainFamilyCount",
-                Tango_DEVVAR_STRINGARRAY, Tango_DEV_LONG, "A domain name, a family name",
-                "The number of distinct registered members for the given domain and family.", DispLevel.OPERATOR));
-        command_list.addElement(new GetAttributesByDomainFamilyMembersCountClass(
-                "GetAttributesByDomainFamilyMembersCount", Tango_DEVVAR_STRINGARRAY, Tango_DEV_LONG,
-                "A domain name, a family name, a member name.",
-                "The number of registered the attributes for a given  domain, family, member.", DispLevel.OPERATOR));
-        command_list.addElement(new GetCurrentArchivedAttClass("GetCurrentArchivedAtt", Tango_DEV_VOID,
-                Tango_DEVVAR_STRINGARRAY, "", "The list of attributes that are being archived", DispLevel.OPERATOR));
-        command_list.addElement(new IsArchivedClass("IsArchived", Tango_DEV_STRING, Tango_DEV_BOOLEAN,
-                "The attribute's name", "true if the given attribute is being archived", DispLevel.OPERATOR));
-        command_list.addElement(new GetArchivingModeClass("GetArchivingMode", Tango_DEV_STRING,
-                Tango_DEVVAR_STRINGARRAY, "The attribute's name",
-                "The archiving mode used for the specified attribute", DispLevel.OPERATOR));
-        command_list.addElement(new GetAttDataClass("GetAttData", Tango_DEV_STRING, Tango_DEVVAR_LONGSTRINGARRAY,
-                "The attribute's name", "String  : The new created dynamic attribute name, Long : the number of data.",
-                DispLevel.OPERATOR));
-        command_list.addElement(new GetAttDataCountClass("GetAttDataCount", Tango_DEV_STRING, Tango_DEV_LONG,
-                "An attribute name.", "The number of the data archieved for an attribute.", DispLevel.OPERATOR));
-        command_list.addElement(new GetAttDataAvgClass("GetAttDataAvg", Tango_DEV_STRING, Tango_DEV_DOUBLE,
-                "The attribute's name", "The average of the values generated by the attribute", DispLevel.OPERATOR));
-        command_list
-                .addElement(new GetAttDataAvgBetweenDatesClass(
-                        "GetAttDataAvgBetweenDates",
-                        Tango_DEVVAR_STRINGARRAY,
-                        Tango_DEV_DOUBLE,
-                        "The attribute's name, the beginning date (YYYY-MM-DD HH24:MI:SS) and the ending date (YYYY-MM-DD HH24:MI:SS)",
-                        "The average value generated by the given attribute and between the two given dates. ",
-                        DispLevel.OPERATOR));
-        command_list
-                .addElement(new GetAttDataBetweenDatesClass(
-                        "GetAttDataBetweenDates",
-                        Tango_DEVVAR_STRINGARRAY,
-                        Tango_DEVVAR_LONGSTRINGARRAY,
-                        "The attribute's name, the beginning date (YYYY-MM-DD HH24:MI:SS) and the ending date (YYYY-MM-DD HH24:MI:SS)",
-                        "String  : The new created dynamic attribute name, Long : the number of data.",
-                        DispLevel.OPERATOR));
-        command_list
-                .addElement(new GetAttDataBetweenDatesSamplingClass(
-                        "GetAttDataBetweenDatesSampling",
-                        Tango_DEVVAR_STRINGARRAY,
-                        Tango_DEVVAR_LONGSTRINGARRAY,
-                        "The attribute's name, the beginning date (YYYY-MM-DD HH24:MI:SS) and the ending date (YYYY-MM-DD HH24:MI:SS), and the sampling type (ALL, SECOND, MINUTE, HOUR, DAY)",
-                        "String  : The new created dynamic attribute name, Long : the number of data.",
-                        DispLevel.OPERATOR));
-        command_list
-                .addElement(new GetAttDataBetweenDatesCountClass(
-                        "GetAttDataBetweenDatesCount",
-                        Tango_DEVVAR_STRINGARRAY,
-                        Tango_DEV_LONG,
-                        "The attribute's name, the beginning (YYYY-MM-DD HH24:MI:SS) date and the ending date (YYYY-MM-DD HH24:MI:SS).",
-                        "The number of data beetwen two dates and, for a given scalar attribute.", DispLevel.OPERATOR));
-        command_list.addElement(new GetAttDataInfOrSupThanClass("GetAttDataInfOrSupThan", Tango_DEVVAR_STRINGARRAY,
-                Tango_DEVVAR_LONGSTRINGARRAY, "The attribute's name, the lower limit and the upper limit",
-                "String  : The new created dynamic attribute name, Long : the number of data.", DispLevel.OPERATOR));
-        command_list.addElement(new GetAttDataInfOrSupThanCountClass("GetAttDataInfOrSupThanCount",
-                Tango_DEVVAR_STRINGARRAY, Tango_DEV_LONG, "The attribute's name, the lower limit and the upper limit",
-                "The number of scalar data lower than the given value x OR higher than the given value y.",
-                DispLevel.OPERATOR));
-        command_list
-                .addElement(new GetAttDataInfOrSupThanBetweenDatesClass(
-                        "GetAttDataInfOrSupThanBetweenDates",
-                        Tango_DEVVAR_STRINGARRAY,
-                        Tango_DEVVAR_LONGSTRINGARRAY,
-                        "The attribute's name, the lower limit, the upper limit, the beginning date (YYYY-MM-DD HH24:MI:SS) and the ending date (YYYY-MM-DD HH24:MI:SS)",
-                        "String  : The new created dynamic attribute name, Long : the number of data.",
-                        DispLevel.OPERATOR));
-        command_list
-                .addElement(new GetAttDataInfOrSupThanBetweenDatesCountClass(
-                        "GetAttDataInfOrSupThanBetweenDatesCount",
-                        Tango_DEVVAR_STRINGARRAY,
-                        Tango_DEV_LONG,
-                        "The attribute's name, the lower limit, the upper limit, the beginning date (YYYY-MM-DD HH24:MI:SS) and the ending date (YYYY-MM-DD HH24:MI:SS).",
-                        "The number of scalar data lower than the given value x OR higher than the given value y, beetwen two dates and for the specified attribute.",
-                        DispLevel.OPERATOR));
-        command_list.addElement(new GetAttDataInfThanClass("GetAttDataInfThan", Tango_DEVVAR_STRINGARRAY,
-                Tango_DEVVAR_LONGSTRINGARRAY, "The attribute's name, the upper limit",
-                "String  : The new created dynamic attribute name, Long : the number of data.", DispLevel.OPERATOR));
-        command_list.addElement(new GetAttDataInfThanCountClass("GetAttDataInfThanCount", Tango_DEVVAR_STRINGARRAY,
-                Tango_DEV_LONG, "The attribute's name and the  upper limit.",
-                "The number of scalar data lower than the given value and for the specified attribute.",
-                DispLevel.OPERATOR));
-        command_list
-                .addElement(new GetAttDataInfThanBetweenDatesClass(
-                        "GetAttDataInfThanBetweenDates",
-                        Tango_DEVVAR_STRINGARRAY,
-                        Tango_DEVVAR_LONGSTRINGARRAY,
-                        "The attribute's name, the upper limit, the beginning date (YYYY-MM-DD HH24:MI:SS) and the ending date (YYYY-MM-DD HH24:MI:SS)",
-                        "String  : The new created dynamic attribute name, Long : the number of data.",
-                        DispLevel.OPERATOR));
-        command_list
-                .addElement(new GetAttDataInfThanBetweenDatesCountClass(
-                        "GetAttDataInfThanBetweenDatesCount",
-                        Tango_DEVVAR_STRINGARRAY,
-                        Tango_DEV_LONG,
-                        "The attribute's name, the upper limit, the beginning date (YYYY-MM-DD HH24:MI:SS) and the ending date (YYYY-MM-DD HH24:MI:SS). ",
-                        "The number data lower than the given value x, and beetwen two dates (date_1 & date_2).",
-                        DispLevel.OPERATOR));
-        command_list.addElement(new GetAttDataLastNClass("GetAttDataLastN", Tango_DEVVAR_STRINGARRAY,
-                Tango_DEVVAR_LONGSTRINGARRAY, "The attribute's name and the number of wished data",
-                "String  : The new created dynamic attribute name, Long : the number of data.", DispLevel.OPERATOR));
-        command_list.addElement(new GetAttDataMaxClass("GetAttDataMax", Tango_DEV_STRING, Tango_DEV_DOUBLE,
-                "The attribute's name", "The biggest value generated by the attribute", DispLevel.OPERATOR));
-        command_list
-                .addElement(new GetAttDataMaxBetweenDatesClass(
-                        "GetAttDataMaxBetweenDates",
-                        Tango_DEVVAR_STRINGARRAY,
-                        Tango_DEV_DOUBLE,
-                        "The attribute's name, the beginning date (YYYY-MM-DD HH24:MI:SS) and the ending date (YYYY-MM-DD HH24:MI:SS)",
-                        "The biggest value generated between the two given dates.", DispLevel.OPERATOR));
-        command_list.addElement(new GetAttDataMinClass("GetAttDataMin", Tango_DEV_STRING, Tango_DEV_DOUBLE,
-                "The attribute's name", "The smallest value generated by the attribute", DispLevel.OPERATOR));
-        command_list
-                .addElement(new GetAttDataMinBetweenDatesClass(
-                        "GetAttDataMinBetweenDates",
-                        Tango_DEVVAR_STRINGARRAY,
-                        Tango_DEV_DOUBLE,
-                        "The attribute's name, the beginning date (YYYY-MM-DD HH24:MI:SS) and the ending date (YYYY-MM-DD HH24:MI:SS)",
-                        "The smallest scalar value generated by the given attribute and between the two given dates.",
-                        DispLevel.OPERATOR));
-        command_list.addElement(new GetAttDataSupThanClass("GetAttDataSupThan", Tango_DEVVAR_STRINGARRAY,
-                Tango_DEVVAR_LONGSTRINGARRAY, "The attribute's name and the  lower limit",
-                "String  : The new created dynamic attribute name, Long : the number of data.", DispLevel.OPERATOR));
-        command_list.addElement(new GetAttDataSupThanCountClass("GetAttDataSupThanCount", Tango_DEVVAR_STRINGARRAY,
-                Tango_DEV_LONG, "The attribute's name and the  lower limit.",
-                "The number of data higher than the given value.", DispLevel.OPERATOR));
-        command_list.addElement(new GetAttDataSupAndInfThanClass("GetAttDataSupAndInfThan", Tango_DEVVAR_STRINGARRAY,
-                Tango_DEVVAR_LONGSTRINGARRAY, "The attribute's name, the lower limit and the upper limit",
-                "String  : The new created dynamic attribute name, Long : the number of data.", DispLevel.OPERATOR));
-        command_list.addElement(new GetAttDataSupAndInfThanCountClass("GetAttDataSupAndInfThanCount",
-                Tango_DEVVAR_STRINGARRAY, Tango_DEV_LONG, "The attribute's name, the lower limit and the upper limit",
-                "The data that are highter than the given value x AND lower than the given value y.",
-                DispLevel.OPERATOR));
-        command_list
-                .addElement(new GetAttDataSupAndInfThanBetweenDatesClass(
-                        "GetAttDataSupAndInfThanBetweenDates",
-                        Tango_DEVVAR_STRINGARRAY,
-                        Tango_DEVVAR_LONGSTRINGARRAY,
-                        "The attribute's name, the lower limit, the upper limit, the beginning date (YYYY-MM-DD HH24:MI:SS) and the ending date (YYYY-MM-DD HH24:MI:SS)",
-                        "String  : The new created dynamic attribute name, Long : the number of data.",
-                        DispLevel.OPERATOR));
-        command_list
-                .addElement(new GetAttDataSupAndInfThanBetweenDatesCountClass(
-                        "GetAttDataSupAndInfThanBetweenDatesCount",
-                        Tango_DEVVAR_STRINGARRAY,
-                        Tango_DEV_LONG,
-                        "The attribute's name, the lower limit, the upper limit, the beginning date (YYYY-MM-DD HH24:MI:SS) and the ending date (YYYY-MM-DD HH24:MI:SS).",
-                        "The number of data higher than the given value x, (AND) lower than the given value y, and beetwen two dates (date_1 & date_2).",
-                        DispLevel.OPERATOR));
-        command_list
-                .addElement(new GetAttDataSupThanBetweenDatesClass(
-                        "GetAttDataSupThanBetweenDates",
-                        Tango_DEVVAR_STRINGARRAY,
-                        Tango_DEVVAR_LONGSTRINGARRAY,
-                        "The attribute's name, the lower limit, the beginning date (YYYY-MM-DD HH24:MI:SS) and the ending date (YYYY-MM-DD HH24:MI:SS)",
-                        "String  : The new created dynamic attribute name, Long : the number of data.",
-                        DispLevel.OPERATOR));
-        command_list
-                .addElement(new GetAttDataSupThanBetweenDatesCountClass(
-                        "GetAttDataSupThanBetweenDatesCount",
-                        Tango_DEVVAR_STRINGARRAY,
-                        Tango_DEV_LONG,
-                        "The attribute's name, the lower limit, the beginning date  (YYYY-MM-DD HH24:MI:SS) and the ending date  (YYYY-MM-DD HH24:MI:SS).",
-                        "The number of data higher than the given value y, and beetwen two dates (date_1 & date_2).",
-                        DispLevel.OPERATOR));
-        command_list.addElement(new RemoveDynamicAttributeClass("RemoveDynamicAttribute", Tango_DEV_STRING,
-                Tango_DEV_VOID, "The TDBExtractor dynamic attribute's name", "", DispLevel.OPERATOR));
-        command_list.addElement(new RemoveDynamicAttributesClass("RemoveDynamicAttributes", Tango_DEV_VOID,
-                Tango_DEV_VOID, "", "", DispLevel.OPERATOR));
-        command_list.addElement(new GetAttFullNameClass("GetAttFullName", Tango_DEV_LONG, Tango_DEV_STRING,
-                "The id of an attribute", "The full name of this attribute", DispLevel.OPERATOR));
-        command_list.addElement(new TemplCommandInOut("GetNewestValue", "getNewestValue", "attribute name",
-                "timestamp; values"));
-        command_list.addElement(new TemplCommandInOut("GetNearestValue", "getNearestValue",
-                "[attributeName, timestamp]. timestamp format is DD-MM-YYYY HH24:MI:SS", "timestamp; values"));
-        command_list.addElement(new ExtractBetweenDatesClass("ExtractBetweenDates", Tango_DEVVAR_STRINGARRAY,
-                Tango_DEVVAR_DOUBLESTRINGARRAY,
-                "[attributeName,start date, end date]. dates format is DD-MM-YYYY HH24:MI:SS",
-                "long: timestamp; string :values"));
-        // add polling if any
-        /*
-         * for (int i = 0; i < command_list.size(); i++) { Command cmd =
-         * (Command) command_list.elementAt(i); }
-         */
-    }
-
-    // =============================================================================
-    //
-    // Method: attribute_factory(Vector att_list)
-    //
-    // =============================================================================
-    @Override
-    public void attribute_factory(Vector att_list) throws DevFailed {
-        // Attribute : version
-        Attr version = new Attr("version", Tango_DEV_STRING, AttrWriteType.READ);
-        att_list.addElement(version);
-    }
-
-    // ===================================================================
-    //
-    // method : device_factory()
-    //
-    // description : Create the device object(s) and store them in the
-    // device list
-    //
-    // argument : in : String[] devlist : The device name list
-    //
-    // ===================================================================
-    @Override
-    public void device_factory(String[] devlist) throws DevFailed {
-        String device_version = ResourceBundle.getBundle("application").getString("project.version");
-
-        for (int i = 0; i < devlist.length; i++) {
-            // Util.out4.println("Device name : " + devlist[ i ]);
-
-            // Create device and add it into the device list
-            // ----------------------------------------------
-            device_list.addElement(new TdbExtractor(this, devlist[i], device_version));
-
-            // Export device to the outside world
-            // ----------------------------------------------
-            if (Util._UseDb == true) {
-                export_device(((DeviceImpl) device_list.elementAt(i)));
-            } else {
-                export_device(((DeviceImpl) device_list.elementAt(i)), devlist[i]);
-            }
-        }
-    }
-
-    // ===================================================================
-    /**
-     * Get the class property for specified name.
-     * 
-     * @param name
-     *            The property name.
-     */
-    // ===================================================================
-    public DbDatum get_class_property(String name) {
-        for (int i = 0; i < cl_prop.length; i++) {
-            if (cl_prop[i].name.equals(name)) {
-                return cl_prop[i];
-            }
-        }
-        // if not found, return an empty DbDatum
-        return new DbDatum(name);
-    }
-
-    // ===================================================================
-    /**
-     * Read the class properties from database.
-     */
-    // ===================================================================
-    public void get_class_property() throws DevFailed {
-        // Initialize your default values here.
-        // ------------------------------------------
-
-        // Read class properties from database.(Automatic code generation)
-        // -------------------------------------------------------------
-        if (Util._UseDb == false) {
-            return;
-        }
-        String[] propnames = {};
-
-        // Call database and extract values
-        // --------------------------------------------
-        cl_prop = get_db_class().get_property(propnames);
-        // int i = -1;
-
-        // End of Automatic code generation
-        // -------------------------------------------------------------
-
-    }
-
-    // ===================================================================
-    /**
-     * Set class description as property in database
-     */
-    // ===================================================================
-    // private void write_class_property() throws DevFailed {
-    // // First time, check if database used
-    // // --------------------------------------------
-    // if (Util._UseDb == false) {
-    // return;
-    // }
-    //
-    // // Prepeare DbDatum
-    // // --------------------------------------------
-    // DbDatum[] data = new DbDatum[2];
-    // data[0] = new DbDatum("ProjectTitle");
-    // data[0].insert("Tango Device Server");
-    //
-    // data[1] = new DbDatum("Description");
-    // data[1].insert("A DServer used for temporary database's extractions.");
-    //
-    // // Call database and and values
-    // // --------------------------------------------
-    // get_db_class().put_property(data);
-    // }
-
-}
+// +======================================================================
+// $Source$
+//
+// Project:   	Tango Device Server
+//
+// Description:	java source code for the TdbExtractor class .
+//              This class is a singleton class and implements everything
+//              which exists only once for all the  TdbExtractor object
+//              It inherits from the DeviceClass class.
+//
+// $Author: candelrg $
+//
+// $Revision: 27050 $
+//
+// $Log$
+// Revision 1.4  2010/01/21 14:56:42  extia-soleil
+// AW (Extia) - Mantis 14438:
+// - Added commands to get the full name of an attribute from its id, in HDB and TDB
+//
+// Revision 1.3  2009/12/17 12:47:15  pierrejoseph
+// CheckStyle:  Organize imports / Format
+//
+// Revision 1.2  2008/04/08 11:34:58  pierrejoseph
+// G�n�ration automatique de la version des devices.
+//
+// Revision 1.1  2008/02/28 15:37:14  pierrejoseph
+// TdbExtractor has been forgotten
+//
+// Revision 1.14  2007/05/11 13:58:54  pierrejoseph
+// Attribute addition : release version
+//
+// Revision 1.13  2007/03/16 08:44:14  ounsy
+// added a GetMinTime command
+//
+// Revision 1.12  2007/03/02 08:46:03  ounsy
+// added the GetMaxTime command
+//
+// Revision 1.11  2007/03/01 17:59:00  pierrejoseph
+// The new  input args date format is YYYY-MM-DD
+//
+// Revision 1.10  2007/03/01 10:08:01  ounsy
+// added the RemoveDynamicAttributes command
+//
+// Revision 1.9  2006/09/07 13:48:30  ounsy
+// added extraction with sampling methods
+//
+// Revision 1.8  2006/02/15 11:12:20  chinkumo
+// Javadoc comments updated.
+//
+// Revision 1.7  2006/01/27 13:07:20  ounsy
+// organised imports
+//
+// Revision 1.6  2005/11/29 17:32:48  chinkumo
+// no message
+//
+// Revision 1.5.10.4  2005/11/29 16:13:31  chinkumo
+// Code reformated (pogo compatible)
+//
+// Revision 1.5.10.3  2005/11/15 13:45:16  chinkumo
+// ...
+//
+// Revision 1.5.10.2  2005/09/26 07:58:42  chinkumo
+// Every commands of shape 'getAttDataXXXXCount(...)' was changed. The type of their returned object was changed from 'short' to 'long'.
+//
+// Revision 1.5.10.1  2005/09/09 10:34:41  chinkumo
+// Since the extraction politic changed to 'dynamic attributes', the device was pogo-regenerated.
+//
+//
+// copyleft :    European Synchrotron Radiation Facility
+//               BP 220, Grenoble 38043
+//               FRANCE
+//
+//-======================================================================
+//
+//  		This file is generated by POGO
+//	(Program Obviously used to Generate tango Object)
+//
+//         (c) - Software Engineering Group - ESRF
+//=============================================================================
+
+package TdbExtractor;
+
+import java.util.ResourceBundle;
+import java.util.Vector;
+
+import fr.esrf.Tango.AttrWriteType;
+import fr.esrf.Tango.DevFailed;
+import fr.esrf.Tango.DispLevel;
+import fr.esrf.TangoApi.DbDatum;
+import fr.esrf.TangoDs.Attr;
+import fr.esrf.TangoDs.DeviceClass;
+import fr.esrf.TangoDs.DeviceImpl;
+import fr.esrf.TangoDs.TangoConst;
+import fr.esrf.TangoDs.TemplCommandInOut;
+import fr.esrf.TangoDs.Util;
+
+public class TdbExtractorClass extends DeviceClass implements TangoConst {
+    /**
+     * TdbExtractorClass class instance (it is a singleton).
+     */
+    private static TdbExtractorClass _instance = null;
+
+    /**
+     * Class properties array.
+     */
+    private DbDatum[] cl_prop = null;
+
+    // --------- Start of properties data members ----------
+
+    // --------- End of properties data members ----------
+
+    // ===================================================================
+    //
+    // method : instance()
+    //
+    // description : static method to retrieve the TdbExtractorClass object
+    // once it has been initialised
+    //
+    // ===================================================================
+    public static TdbExtractorClass instance() {
+        if (_instance == null) {
+            System.err.println("TdbExtractorClass is not initialised !!!");
+            System.err.println("Exiting");
+            System.exit(-1);
+        }
+        return _instance;
+    }
+
+    // ===================================================================
+    //
+    // method : Init()
+    //
+    // description : static method to create/retrieve the TdbExtractorClass
+    // object. This method is the only one which enables a
+    // user to create the object
+    //
+    // in : - class_name : The class name
+    //
+    // ===================================================================
+    public static synchronized TdbExtractorClass init(String class_name) throws DevFailed {
+        if (_instance == null) {
+            _instance = new TdbExtractorClass(class_name);
+        }
+        return _instance;
+    }
+
+    // ===================================================================
+    //
+    // method : TdbExtractorClass()
+    //
+    // description : constructor for the TdbExtractorClass class
+    //
+    // argument : in : - name : The class name
+    //
+    // ===================================================================
+    protected TdbExtractorClass(String name) throws DevFailed {
+        super(name);
+
+        Util.out2.println("Entering TdbExtractorClass constructor");
+        // write_class_property();
+        get_class_property();
+
+        Util.out2.println("Leaving TdbExtractorClass constructor");
+    }
+
+    // ===================================================================
+    //
+    // method : command_factory()
+    //
+    // description : Create the command object(s) and store them in the
+    // command list
+    // ===================================================================
+    @Override
+    public void command_factory() {
+        command_list.addElement(new GetMinTimeClass("GetMinTime", Tango_DEV_STRING, Tango_DEV_STRING,
+                "The attribute to search", "The earliest value's timestamp", DispLevel.OPERATOR));
+        command_list.addElement(new GetMaxTimeClass("GetMaxTime", Tango_DEV_STRING, Tango_DEV_STRING,
+                "The attribute to search", "The latest value's timestamp", DispLevel.OPERATOR));
+        command_list.addElement(new GetInfoClass("GetInfo", Tango_DEV_VOID, Tango_DEV_STRING, "",
+                "The informations that characterize the database", DispLevel.OPERATOR));
+        command_list.addElement(new GetHostClass("GetHost", Tango_DEV_VOID, Tango_DEV_STRING, "",
+                "The connected database host identifier.", DispLevel.OPERATOR));
+        command_list.addElement(new GetUserClass("GetUser", Tango_DEV_VOID, Tango_DEV_STRING, "",
+                "The current user's name used for the connection.", DispLevel.OPERATOR));
+        command_list.addElement(new GetConnectionStateClass("GetConnectionState", Tango_DEV_VOID, Tango_DEV_BOOLEAN,
+                "", "The connection state", DispLevel.OPERATOR));
+        command_list.addElement(new GetAttDefinitionDataClass("GetAttDefinitionData", Tango_DEV_STRING,
+                Tango_DEVVAR_STRINGARRAY, "The attribute's name",
+                "Differents definition informations for the given attribute", DispLevel.OPERATOR));
+        command_list.addElement(new GetAttPropertiesDataClass("GetAttPropertiesData", Tango_DEV_STRING,
+                Tango_DEVVAR_STRINGARRAY, "The attribute's name",
+                "An array containing the differents properties for the given attribute", DispLevel.OPERATOR));
+        command_list.addElement(new GetAttIdClass("GetAttId", Tango_DEV_STRING, Tango_DEV_LONG, "The attribute's name",
+                "The TDB's ID that characterize the given attribute", DispLevel.OPERATOR));
+        command_list.addElement(new GetAttNameAllClass("GetAttNameAll", Tango_DEV_VOID, Tango_DEVVAR_STRINGARRAY, "",
+                "The whole list of the attributes registered in TDB", DispLevel.OPERATOR));
+        command_list.addElement(new GetAttNameFacilityClass("GetAttNameFacility", Tango_DEV_VOID,
+                Tango_DEVVAR_STRINGARRAY, "",
+                "The whole list of the attributes registered in TDB, and that belong to the current facility.",
+                DispLevel.OPERATOR));
+        command_list
+                .addElement(new GetAttNameFilterFormatClass(
+                        "GetAttNameFilterFormat",
+                        Tango_DEV_SHORT,
+                        Tango_DEVVAR_STRINGARRAY,
+                        "A format [0 -> scalar - 1 -> spectrum - 2 -> image]",
+                        "The filtered list of attributes registered in TDB.  The filtering is made according to the given format [0 -> scalar - 1 -> spectrum - 2 -> image]",
+                        DispLevel.OPERATOR));
+        command_list
+                .addElement(new GetAttNameFilterTypeClass(
+                        "GetAttNameFilterType",
+                        Tango_DEV_SHORT,
+                        Tango_DEVVAR_STRINGARRAY,
+                        "A type [2 -> Tango::DevShort | 3 -> Tango::DevLong | 5 -> Tango::DevDouble and 8 -> Tango::DevString]",
+                        "The filtered list of attributes registered in TDB.  The filtering is made according to the given type [2 -> Tango::DevShort | 3 -> Tango::DevLong | 5 -> Tango::DevDouble and 8 -> Tango::DevString]",
+                        DispLevel.OPERATOR));
+        command_list.addElement(new GetAttCountAllClass("GetAttCountAll", Tango_DEV_VOID, Tango_DEV_LONG, "",
+                "The total number of attributes defined in TDB", DispLevel.OPERATOR));
+        command_list
+                .addElement(new GetAttCountFilterFormatClass(
+                        "GetAttCountFilterFormat",
+                        Tango_DEV_SHORT,
+                        Tango_DEV_LONG,
+                        "A format [0 -> scalar - 1 -> spectrum - 2 -> image]",
+                        "The total number of attributes defined in TDB with the given format [0 -> scalar - 1 -> spectrum - 2 -> image]",
+                        DispLevel.OPERATOR));
+        command_list
+                .addElement(new GetAttCountFilterTypeClass(
+                        "GetAttCountFilterType",
+                        Tango_DEV_SHORT,
+                        Tango_DEV_LONG,
+                        "A type [2 -> Tango::DevShort | 3 -> Tango::DevLong | 5 -> Tango::DevDouble and 8 -> Tango::DevString]",
+                        "The total number of attributes defined in TDB with the given type [2 -> Tango::DevShort | 3 -> Tango::DevLong | 5 -> Tango::DevDouble and 8 -> Tango::DevString]",
+                        DispLevel.OPERATOR));
+        command_list.addElement(new GetDomainsClass("GetDomains", Tango_DEV_VOID, Tango_DEVVAR_STRINGARRAY, "",
+                "The registered domains", DispLevel.OPERATOR));
+        command_list.addElement(new GetDomainsCountClass("GetDomainsCount", Tango_DEV_VOID, Tango_DEV_LONG, "",
+                "The number of distinct registered domains.", DispLevel.OPERATOR));
+        command_list.addElement(new GetFamiliesClass("GetFamilies", Tango_DEV_VOID, Tango_DEVVAR_STRINGARRAY, "",
+                "The registered families", DispLevel.OPERATOR));
+        command_list.addElement(new GetFamiliesCountClass("GetFamiliesCount", Tango_DEV_VOID, Tango_DEV_LONG, "",
+                "The number of distinct registered families.", DispLevel.OPERATOR));
+        command_list.addElement(new GetFamiliesByDomainClass("GetFamiliesByDomain", Tango_DEV_STRING,
+                Tango_DEVVAR_STRINGARRAY, "The given domain", "The registered families for the given domain",
+                DispLevel.OPERATOR));
+        command_list.addElement(new GetFamiliesByDomainCountClass("GetFamiliesByDomainCount", Tango_DEV_STRING,
+                Tango_DEV_LONG, "A domain name", "The number of distinct registered families for a given domain.",
+                DispLevel.OPERATOR));
+        command_list.addElement(new GetMembersClass("GetMembers", Tango_DEV_VOID, Tango_DEVVAR_STRINGARRAY, "",
+                "The registered members", DispLevel.OPERATOR));
+        command_list.addElement(new GetMembersCountClass("GetMembersCount", Tango_DEV_VOID, Tango_DEV_LONG, "",
+                "The number of distinct members.", DispLevel.OPERATOR));
+        command_list.addElement(new GetMembersByDomainFamilyClass("GetMembersByDomainFamily", Tango_DEVVAR_STRINGARRAY,
+                Tango_DEVVAR_STRINGARRAY, "The given domain and family",
+                "The registered members for the given domain and family", DispLevel.OPERATOR));
+        command_list.addElement(new GetMembersByDomainFamilyCountClass("GetMembersByDomainFamilyCount",
+                Tango_DEVVAR_STRINGARRAY, Tango_DEV_LONG, "A domain name, a family name",
+                "The number of distinct registered members for the given domain and family.", DispLevel.OPERATOR));
+        command_list.addElement(new GetAttributesByDomainFamilyMembersCountClass(
+                "GetAttributesByDomainFamilyMembersCount", Tango_DEVVAR_STRINGARRAY, Tango_DEV_LONG,
+                "A domain name, a family name, a member name.",
+                "The number of registered the attributes for a given  domain, family, member.", DispLevel.OPERATOR));
+        command_list.addElement(new GetCurrentArchivedAttClass("GetCurrentArchivedAtt", Tango_DEV_VOID,
+                Tango_DEVVAR_STRINGARRAY, "", "The list of attributes that are being archived", DispLevel.OPERATOR));
+        command_list.addElement(new IsArchivedClass("IsArchived", Tango_DEV_STRING, Tango_DEV_BOOLEAN,
+                "The attribute's name", "true if the given attribute is being archived", DispLevel.OPERATOR));
+        command_list.addElement(new GetArchivingModeClass("GetArchivingMode", Tango_DEV_STRING,
+                Tango_DEVVAR_STRINGARRAY, "The attribute's name",
+                "The archiving mode used for the specified attribute", DispLevel.OPERATOR));
+        command_list.addElement(new GetAttDataClass("GetAttData", Tango_DEV_STRING, Tango_DEVVAR_LONGSTRINGARRAY,
+                "The attribute's name", "String  : The new created dynamic attribute name, Long : the number of data.",
+                DispLevel.OPERATOR));
+        command_list.addElement(new GetAttDataCountClass("GetAttDataCount", Tango_DEV_STRING, Tango_DEV_LONG,
+                "An attribute name.", "The number of the data archieved for an attribute.", DispLevel.OPERATOR));
+        command_list.addElement(new GetAttDataAvgClass("GetAttDataAvg", Tango_DEV_STRING, Tango_DEV_DOUBLE,
+                "The attribute's name", "The average of the values generated by the attribute", DispLevel.OPERATOR));
+        command_list
+                .addElement(new GetAttDataAvgBetweenDatesClass(
+                        "GetAttDataAvgBetweenDates",
+                        Tango_DEVVAR_STRINGARRAY,
+                        Tango_DEV_DOUBLE,
+                        "The attribute's name, the beginning date (YYYY-MM-DD HH24:MI:SS) and the ending date (YYYY-MM-DD HH24:MI:SS)",
+                        "The average value generated by the given attribute and between the two given dates. ",
+                        DispLevel.OPERATOR));
+        command_list
+                .addElement(new GetAttDataBetweenDatesClass(
+                        "GetAttDataBetweenDates",
+                        Tango_DEVVAR_STRINGARRAY,
+                        Tango_DEVVAR_LONGSTRINGARRAY,
+                        "The attribute's name, the beginning date (YYYY-MM-DD HH24:MI:SS) and the ending date (YYYY-MM-DD HH24:MI:SS)",
+                        "String  : The new created dynamic attribute name, Long : the number of data.",
+                        DispLevel.OPERATOR));
+        command_list
+                .addElement(new GetAttDataBetweenDatesSamplingClass(
+                        "GetAttDataBetweenDatesSampling",
+                        Tango_DEVVAR_STRINGARRAY,
+                        Tango_DEVVAR_LONGSTRINGARRAY,
+                        "The attribute's name, the beginning date (YYYY-MM-DD HH24:MI:SS) and the ending date (YYYY-MM-DD HH24:MI:SS), and the sampling type (ALL, SECOND, MINUTE, HOUR, DAY)",
+                        "String  : The new created dynamic attribute name, Long : the number of data.",
+                        DispLevel.OPERATOR));
+        command_list
+                .addElement(new GetAttDataBetweenDatesCountClass(
+                        "GetAttDataBetweenDatesCount",
+                        Tango_DEVVAR_STRINGARRAY,
+                        Tango_DEV_LONG,
+                        "The attribute's name, the beginning (YYYY-MM-DD HH24:MI:SS) date and the ending date (YYYY-MM-DD HH24:MI:SS).",
+                        "The number of data beetwen two dates and, for a given scalar attribute.", DispLevel.OPERATOR));
+        command_list.addElement(new GetAttDataInfOrSupThanClass("GetAttDataInfOrSupThan", Tango_DEVVAR_STRINGARRAY,
+                Tango_DEVVAR_LONGSTRINGARRAY, "The attribute's name, the lower limit and the upper limit",
+                "String  : The new created dynamic attribute name, Long : the number of data.", DispLevel.OPERATOR));
+        command_list.addElement(new GetAttDataInfOrSupThanCountClass("GetAttDataInfOrSupThanCount",
+                Tango_DEVVAR_STRINGARRAY, Tango_DEV_LONG, "The attribute's name, the lower limit and the upper limit",
+                "The number of scalar data lower than the given value x OR higher than the given value y.",
+                DispLevel.OPERATOR));
+        command_list
+                .addElement(new GetAttDataInfOrSupThanBetweenDatesClass(
+                        "GetAttDataInfOrSupThanBetweenDates",
+                        Tango_DEVVAR_STRINGARRAY,
+                        Tango_DEVVAR_LONGSTRINGARRAY,
+                        "The attribute's name, the lower limit, the upper limit, the beginning date (YYYY-MM-DD HH24:MI:SS) and the ending date (YYYY-MM-DD HH24:MI:SS)",
+                        "String  : The new created dynamic attribute name, Long : the number of data.",
+                        DispLevel.OPERATOR));
+        command_list
+                .addElement(new GetAttDataInfOrSupThanBetweenDatesCountClass(
+                        "GetAttDataInfOrSupThanBetweenDatesCount",
+                        Tango_DEVVAR_STRINGARRAY,
+                        Tango_DEV_LONG,
+                        "The attribute's name, the lower limit, the upper limit, the beginning date (YYYY-MM-DD HH24:MI:SS) and the ending date (YYYY-MM-DD HH24:MI:SS).",
+                        "The number of scalar data lower than the given value x OR higher than the given value y, beetwen two dates and for the specified attribute.",
+                        DispLevel.OPERATOR));
+        command_list.addElement(new GetAttDataInfThanClass("GetAttDataInfThan", Tango_DEVVAR_STRINGARRAY,
+                Tango_DEVVAR_LONGSTRINGARRAY, "The attribute's name, the upper limit",
+                "String  : The new created dynamic attribute name, Long : the number of data.", DispLevel.OPERATOR));
+        command_list.addElement(new GetAttDataInfThanCountClass("GetAttDataInfThanCount", Tango_DEVVAR_STRINGARRAY,
+                Tango_DEV_LONG, "The attribute's name and the  upper limit.",
+                "The number of scalar data lower than the given value and for the specified attribute.",
+                DispLevel.OPERATOR));
+        command_list
+                .addElement(new GetAttDataInfThanBetweenDatesClass(
+                        "GetAttDataInfThanBetweenDates",
+                        Tango_DEVVAR_STRINGARRAY,
+                        Tango_DEVVAR_LONGSTRINGARRAY,
+                        "The attribute's name, the upper limit, the beginning date (YYYY-MM-DD HH24:MI:SS) and the ending date (YYYY-MM-DD HH24:MI:SS)",
+                        "String  : The new created dynamic attribute name, Long : the number of data.",
+                        DispLevel.OPERATOR));
+        command_list
+                .addElement(new GetAttDataInfThanBetweenDatesCountClass(
+                        "GetAttDataInfThanBetweenDatesCount",
+                        Tango_DEVVAR_STRINGARRAY,
+                        Tango_DEV_LONG,
+                        "The attribute's name, the upper limit, the beginning date (YYYY-MM-DD HH24:MI:SS) and the ending date (YYYY-MM-DD HH24:MI:SS). ",
+                        "The number data lower than the given value x, and beetwen two dates (date_1 & date_2).",
+                        DispLevel.OPERATOR));
+        command_list.addElement(new GetAttDataLastNClass("GetAttDataLastN", Tango_DEVVAR_STRINGARRAY,
+                Tango_DEVVAR_LONGSTRINGARRAY, "The attribute's name and the number of wished data",
+                "String  : The new created dynamic attribute name, Long : the number of data.", DispLevel.OPERATOR));
+        command_list.addElement(new GetAttDataMaxClass("GetAttDataMax", Tango_DEV_STRING, Tango_DEV_DOUBLE,
+                "The attribute's name", "The biggest value generated by the attribute", DispLevel.OPERATOR));
+        command_list
+                .addElement(new GetAttDataMaxBetweenDatesClass(
+                        "GetAttDataMaxBetweenDates",
+                        Tango_DEVVAR_STRINGARRAY,
+                        Tango_DEV_DOUBLE,
+                        "The attribute's name, the beginning date (YYYY-MM-DD HH24:MI:SS) and the ending date (YYYY-MM-DD HH24:MI:SS)",
+                        "The biggest value generated between the two given dates.", DispLevel.OPERATOR));
+        command_list.addElement(new GetAttDataMinClass("GetAttDataMin", Tango_DEV_STRING, Tango_DEV_DOUBLE,
+                "The attribute's name", "The smallest value generated by the attribute", DispLevel.OPERATOR));
+        command_list
+                .addElement(new GetAttDataMinBetweenDatesClass(
+                        "GetAttDataMinBetweenDates",
+                        Tango_DEVVAR_STRINGARRAY,
+                        Tango_DEV_DOUBLE,
+                        "The attribute's name, the beginning date (YYYY-MM-DD HH24:MI:SS) and the ending date (YYYY-MM-DD HH24:MI:SS)",
+                        "The smallest scalar value generated by the given attribute and between the two given dates.",
+                        DispLevel.OPERATOR));
+        command_list.addElement(new GetAttDataSupThanClass("GetAttDataSupThan", Tango_DEVVAR_STRINGARRAY,
+                Tango_DEVVAR_LONGSTRINGARRAY, "The attribute's name and the  lower limit",
+                "String  : The new created dynamic attribute name, Long : the number of data.", DispLevel.OPERATOR));
+        command_list.addElement(new GetAttDataSupThanCountClass("GetAttDataSupThanCount", Tango_DEVVAR_STRINGARRAY,
+                Tango_DEV_LONG, "The attribute's name and the  lower limit.",
+                "The number of data higher than the given value.", DispLevel.OPERATOR));
+        command_list.addElement(new GetAttDataSupAndInfThanClass("GetAttDataSupAndInfThan", Tango_DEVVAR_STRINGARRAY,
+                Tango_DEVVAR_LONGSTRINGARRAY, "The attribute's name, the lower limit and the upper limit",
+                "String  : The new created dynamic attribute name, Long : the number of data.", DispLevel.OPERATOR));
+        command_list.addElement(new GetAttDataSupAndInfThanCountClass("GetAttDataSupAndInfThanCount",
+                Tango_DEVVAR_STRINGARRAY, Tango_DEV_LONG, "The attribute's name, the lower limit and the upper limit",
+                "The data that are highter than the given value x AND lower than the given value y.",
+                DispLevel.OPERATOR));
+        command_list
+                .addElement(new GetAttDataSupAndInfThanBetweenDatesClass(
+                        "GetAttDataSupAndInfThanBetweenDates",
+                        Tango_DEVVAR_STRINGARRAY,
+                        Tango_DEVVAR_LONGSTRINGARRAY,
+                        "The attribute's name, the lower limit, the upper limit, the beginning date (YYYY-MM-DD HH24:MI:SS) and the ending date (YYYY-MM-DD HH24:MI:SS)",
+                        "String  : The new created dynamic attribute name, Long : the number of data.",
+                        DispLevel.OPERATOR));
+        command_list
+                .addElement(new GetAttDataSupAndInfThanBetweenDatesCountClass(
+                        "GetAttDataSupAndInfThanBetweenDatesCount",
+                        Tango_DEVVAR_STRINGARRAY,
+                        Tango_DEV_LONG,
+                        "The attribute's name, the lower limit, the upper limit, the beginning date (YYYY-MM-DD HH24:MI:SS) and the ending date (YYYY-MM-DD HH24:MI:SS).",
+                        "The number of data higher than the given value x, (AND) lower than the given value y, and beetwen two dates (date_1 & date_2).",
+                        DispLevel.OPERATOR));
+        command_list
+                .addElement(new GetAttDataSupThanBetweenDatesClass(
+                        "GetAttDataSupThanBetweenDates",
+                        Tango_DEVVAR_STRINGARRAY,
+                        Tango_DEVVAR_LONGSTRINGARRAY,
+                        "The attribute's name, the lower limit, the beginning date (YYYY-MM-DD HH24:MI:SS) and the ending date (YYYY-MM-DD HH24:MI:SS)",
+                        "String  : The new created dynamic attribute name, Long : the number of data.",
+                        DispLevel.OPERATOR));
+        command_list
+                .addElement(new GetAttDataSupThanBetweenDatesCountClass(
+                        "GetAttDataSupThanBetweenDatesCount",
+                        Tango_DEVVAR_STRINGARRAY,
+                        Tango_DEV_LONG,
+                        "The attribute's name, the lower limit, the beginning date  (YYYY-MM-DD HH24:MI:SS) and the ending date  (YYYY-MM-DD HH24:MI:SS).",
+                        "The number of data higher than the given value y, and beetwen two dates (date_1 & date_2).",
+                        DispLevel.OPERATOR));
+        command_list.addElement(new RemoveDynamicAttributeClass("RemoveDynamicAttribute", Tango_DEV_STRING,
+                Tango_DEV_VOID, "The TDBExtractor dynamic attribute's name", "", DispLevel.OPERATOR));
+        command_list.addElement(new RemoveDynamicAttributesClass("RemoveDynamicAttributes", Tango_DEV_VOID,
+                Tango_DEV_VOID, "", "", DispLevel.OPERATOR));
+        command_list.addElement(new GetAttFullNameClass("GetAttFullName", Tango_DEV_LONG, Tango_DEV_STRING,
+                "The id of an attribute", "The full name of this attribute", DispLevel.OPERATOR));
+        command_list.addElement(new TemplCommandInOut("GetNewestValue", "getNewestValue", "attribute name",
+                "timestamp; values"));
+        command_list.addElement(new TemplCommandInOut("GetNearestValue", "getNearestValue",
+                "[attributeName, timestamp]. timestamp format is DD-MM-YYYY HH24:MI:SS", "timestamp; values"));
+        command_list.addElement(new ExtractBetweenDatesClass("ExtractBetweenDates", Tango_DEVVAR_STRINGARRAY,
+                Tango_DEVVAR_DOUBLESTRINGARRAY,
+                "[attributeName,start date, end date]. dates format is DD-MM-YYYY HH24:MI:SS",
+                "long: timestamp; string :values"));
+        // add polling if any
+        /*
+         * for (int i = 0; i < command_list.size(); i++) { Command cmd =
+         * (Command) command_list.elementAt(i); }
+         */
+    }
+
+    // =============================================================================
+    //
+    // Method: attribute_factory(Vector att_list)
+    //
+    // =============================================================================
+    @Override
+    public void attribute_factory(Vector att_list) throws DevFailed {
+        // Attribute : version
+        Attr version = new Attr("version", Tango_DEV_STRING, AttrWriteType.READ);
+        att_list.addElement(version);
+    }
+
+    // ===================================================================
+    //
+    // method : device_factory()
+    //
+    // description : Create the device object(s) and store them in the
+    // device list
+    //
+    // argument : in : String[] devlist : The device name list
+    //
+    // ===================================================================
+    @Override
+    public void device_factory(String[] devlist) throws DevFailed {
+        String device_version = ResourceBundle.getBundle("application").getString("project.version");
+
+        for (int i = 0; i < devlist.length; i++) {
+            // Util.out4.println("Device name : " + devlist[ i ]);
+
+            // Create device and add it into the device list
+            // ----------------------------------------------
+            device_list.addElement(new TdbExtractor(this, devlist[i], device_version));
+
+            // Export device to the outside world
+            // ----------------------------------------------
+            if (Util._UseDb == true) {
+                export_device(((DeviceImpl) device_list.elementAt(i)));
+            } else {
+                export_device(((DeviceImpl) device_list.elementAt(i)), devlist[i]);
+            }
+        }
+    }
+
+    // ===================================================================
+    /**
+     * Get the class property for specified name.
+     * 
+     * @param name
+     *            The property name.
+     */
+    // ===================================================================
+    public DbDatum get_class_property(String name) {
+        for (int i = 0; i < cl_prop.length; i++) {
+            if (cl_prop[i].name.equals(name)) {
+                return cl_prop[i];
+            }
+        }
+        // if not found, return an empty DbDatum
+        return new DbDatum(name);
+    }
+
+    // ===================================================================
+    /**
+     * Read the class properties from database.
+     */
+    // ===================================================================
+    public void get_class_property() throws DevFailed {
+        // Initialize your default values here.
+        // ------------------------------------------
+
+        // Read class properties from database.(Automatic code generation)
+        // -------------------------------------------------------------
+        if (Util._UseDb == false) {
+            return;
+        }
+        String[] propnames = {};
+
+        // Call database and extract values
+        // --------------------------------------------
+        cl_prop = get_db_class().get_property(propnames);
+        // int i = -1;
+
+        // End of Automatic code generation
+        // -------------------------------------------------------------
+
+    }
+
+    // ===================================================================
+    /**
+     * Set class description as property in database
+     */
+    // ===================================================================
+    // private void write_class_property() throws DevFailed {
+    // // First time, check if database used
+    // // --------------------------------------------
+    // if (Util._UseDb == false) {
+    // return;
+    // }
+    //
+    // // Prepeare DbDatum
+    // // --------------------------------------------
+    // DbDatum[] data = new DbDatum[2];
+    // data[0] = new DbDatum("ProjectTitle");
+    // data[0].insert("Tango Device Server");
+    //
+    // data[1] = new DbDatum("Description");
+    // data[1].insert("A DServer used for temporary database's extractions.");
+    //
+    // // Call database and and values
+    // // --------------------------------------------
+    // get_db_class().put_property(data);
+    // }
+
+}
diff --git a/tdbextractor/src/main/resources/application.properties b/tdbextractor/src/main/resources/application.properties
new file mode 100644
index 0000000000000000000000000000000000000000..256553fd996bcf6edfc00d2799b25e9767957e5d
--- /dev/null
+++ b/tdbextractor/src/main/resources/application.properties
@@ -0,0 +1,5 @@
+#application properties
+project.name=${project.name}
+project.version=${project.version}
+build.date=${buildNumber}
+