Index: ether_statistics/service/test/com/ether/EtherTest.java
===================================================================
--- ether_statistics/service/test/com/ether/EtherTest.java	(revision 569)
+++ ether_statistics/service/test/com/ether/EtherTest.java	(revision 572)
@@ -1,18 +1,7 @@
 package com.ether;
 
-import gov.noaa.pmel.sgt.LineAttribute;
-import gov.noaa.pmel.util.GeoDateArray;
 import org.jetbrains.annotations.NotNull;
-import org.jetbrains.annotations.Nullable;
-import org.junit.Test;
 
-import javax.imageio.ImageIO;
-import javax.swing.*;
-import java.awt.*;
-import java.awt.image.BufferedImage;
-import java.io.File;
 import java.io.Serializable;
-import java.text.ParseException;
-import java.util.Date;
 
 /**
@@ -47,54 +36,4 @@
 //    }
 
-    /**
-     * @param day : jour au format yyyy-MM-dd
-     */
-    @NotNull
-    protected GeoDateArray createTimeArray( @NotNull final Integer size, @Nullable String day )
-            throws ParseException
-    {
-        if( null == day )
-            day = "2009-07-13";
-
-        final Date[] dates = new Date[size];
-        for( int i = 0; i < size; i++ )
-        {
-            final String dateString = day + ' ' + i + ":32";
-            final Date date = DateHelper.parseDate( dateString, DateHelper.ENGLISH_DATE_PATTERN );
-            dates[i] = date;
-        }
-        return new GeoDateArray( dates );
-    }
-
-    @NotNull
-    protected double[] createDataArray( @NotNull final Integer size, @NotNull final Integer begin )
-            throws ParseException
-    {
-        final double[] datas = new double[size];
-        for( int i = 0; i < size; i++ )
-        {
-            datas[i] = Double.valueOf( i + begin );
-        }
-        return datas;
-    }
-
-    protected void copyToFile( @NotNull final JFrame frame, @NotNull final String fileName )
-    {
-        final BufferedImage image = new BufferedImage( frame.getWidth(), frame.getHeight(), BufferedImage.TYPE_INT_RGB );
-
-        final Graphics2D g2 = image.createGraphics();
-        frame.paint( g2 );
-        g2.dispose();
-
-        try
-        {
-            final File out = new File( fileName );
-            ImageIO.write( image, "JPEG", out );
-        }
-        catch( Exception e )
-        {
-        }
-    }
-
     protected <T extends Serializable> void displayArray( @NotNull final T[] objectsArray )
     {
Index: ether_statistics/service/test/com/ether/SGTTest.java
===================================================================
--- ether_statistics/service/test/com/ether/SGTTest.java	(revision 569)
+++ 	(revision )
@@ -1,855 +1,0 @@
-package com.ether;
-
-//import com.ether.tutorial.src.tutorial.Example1;
-//import com.ether.tutorial.src.tutorial.SBExample1;
-//import com.ether.tutorial.src.tutorial.SBExample2;
-//import com.ether.tutorial.src.tutorial.SBExample3;
-//import com.keypoint.PngEncoder;
-//import com.keypoint.PngEncoderB;
-
-/**
- * @author vmipsl
- * @date 31 may 2011
- */
-public class SGTTest
-        extends EtherTest
-{
-//    @Test
-//    public void testImageKeroppi()
-//            throws Exception
-//    {
-//        JFrame frame = new JFrame( "Test de superposition" );
-//        JLayeredPane lp = frame.getLayeredPane();
-//        JPanel p1 = new JPanel();
-//        ImageIcon ic = new ImageIcon( "service/test/kerropi1.jpg" );
-//        JLabel l = new JLabel( ic );
-//        p1.setBounds( 0, 0, 640, 480 );
-//
-//        p1.add( l );
-//        lp.add( p1, 1 );
-//
-//        p1.setVisible( true ); //Quand on met Ã  false, le rectangle apparait !
-//        frame.setSize( 700, 550 );
-//        frame.setDefaultCloseOperation( JFrame.EXIT_ON_CLOSE );
-//        frame.setVisible( true );
-//
-//        copyToFile( frame, "service/test/test_ImageIcon.jpg" );
-//    }
-//
-//    @Test
-//    public void testJLabel()
-//            throws Exception
-//    {
-//        final JFrame frame = new JFrame( "Frame principale" );
-//        final JPanel panel = new JPanel( new BorderLayout() );
-//
-//        final JLabel jlbHelloWorld = new JLabel( "Hello World" );
-//        panel.add( jlbHelloWorld, BorderLayout.EAST );
-//        panel.setVisible( true );
-//        frame.setContentPane( panel );
-//
-//        frame.setSize( 700, 550 );
-//        frame.setVisible( true );
-//
-//        copyToFile( frame, "service/test/test_JLabel.jpg" );
-//    }
-//
-//    @Test
-//    public void testJPlotLayout()
-//            throws Exception
-//    {
-//        final JFrame frame = new JFrame( "Frame principale" );
-//        final JPanel panel = new JPanel( new BorderLayout() );
-//
-//        final JLabel jlbHelloWorld = new JLabel( "Hello World" );
-//        panel.add( jlbHelloWorld, BorderLayout.SOUTH );
-//
-//        final ImageIcon ic = new ImageIcon( "service/test/kerropi1.jpg" );
-//        final JLabel jLabel = new JLabel( ic );
-//        panel.add( jLabel, BorderLayout.EAST );
-//
-//        final JPlotLayout jPlotLayout = new JPlotLayout( false, false, false, "Trajectory data", null, false );
-//        jPlotLayout.setTitles( "title1", "title2", "title3" );
-//        jPlotLayout.setVisible( true );
-//        panel.add( jPlotLayout, BorderLayout.NORTH );
-//
-//        panel.setVisible( true );
-//        frame.setContentPane( panel );
-//
-//        frame.setSize( 700, 550 );
-//        frame.setVisible( true );
-//
-//        Thread.sleep( 100 );
-//        copyToFile( frame, "service/test/test_JPlotLayout.jpg" );
-//    }
-//
-////    @Test
-////    public void testExample1()
-////            throws Exception
-////    {
-////        new Example1();
-////    }
-////
-////    @Test
-////    public void testSBExamples()
-////            throws Exception
-////    {
-////        final SBExample1 frame = new SBExample1();
-////        frame.pack();
-////        frame.setResizable( false );
-////        frame.setVisible( true );
-////        Thread.sleep( 100 );
-////        copyToFile( frame, "service/test/test_SBExample1.jpg" );
-////
-////        final SBExample2 frame2 = new SBExample2();
-////        frame2.pack();
-////        frame2.setResizable( false );
-////        frame2.setVisible( true );
-////        Thread.sleep( 100 );
-////        copyToFile( frame2, "service/test/test_SBExample2.jpg" );
-////
-////        final SBExample3 frame3 = new SBExample3();
-////        frame3.pack();
-////        //Center the window
-////        final Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize();
-////        final Dimension frameSize = frame3.getSize();
-////        if( frameSize.height > screenSize.height )
-////        {
-////            frameSize.height = screenSize.height;
-////        }
-////        if( frameSize.width > screenSize.width )
-////        {
-////            frameSize.width = screenSize.width;
-////        }
-////        frame3.setLocation( ( screenSize.width - frameSize.width ) / 2, ( screenSize.height - frameSize.height ) / 2 );
-////        frame3.setResizable( false );
-////        frame3.setVisible( true );
-////        Thread.sleep( 100 );
-////        copyToFile( frame3, "service/test/test_SBExample3.jpg" );
-////    }
-//
-//    @Test
-//    /**
-//     * TODO :
-//     *      - dÃ©marrer plot Ã  (0,0)
-//     *      - lÃ©gende de l'axe des temps
-//     *      - titre du graph ??
-//     *      - lÃ©gende gÃ©nÃ©rale
-//     *
-//     */
-//    public void testTimeSeriePlot()
-//            throws Exception
-//    {
-//        // Values to configure plot
-//        final String parameterName = "OZONE";
-//        final String parameterUnit = "ppbv";
-//        final boolean startToZero = true;
-//        final boolean markPoint = false;
-//
-//        final GeoDateArray dateArray = createTimeArray( 10, null );
-//        final double[] dataArray = createDataArray( 10, 5 );
-//
-////        for( int i = 0; i < dateArray.getLength(); i++ )
-////            System.out.println( dateArray.getGeoDate( i ).toString() );
-////
-////        for( int i = 0; i < dataArray.length; i++ )
-////            System.out.println( dataArray[i] );
-//
-//        SimpleLine data = new SimpleLine( dateArray, dataArray, "legend" );
-//        SGTMetaData meta = new SGTMetaData( "Longitude", "degrees East", false, false );
-//        data.setXMetaData( meta );
-//
-//        meta = new SGTMetaData( parameterName, parameterUnit, false, false );
-//        data.setYMetaData( meta );
-//
-//        final LineAttribute lineAttribute = createLineAttribute( markPoint );
-//
-//        final MegapoliPlot timeSeriesPlot = new MegapoliPlot();
-//        timeSeriesPlot.setTitle( "Keroppi title" );
-//        timeSeriesPlot.setLogoMegapoli( "keroppi1.jpg" );
-////        timeSeriesPlot.setData( data );
-////        timeSeriesPlot.setLineAttribute( lineAttribute );
-//
-////        getEtherPlotService().createTimeSeriesPlot( timeSeriesPlot );
-////        timeSeriesPlot.createTimeSeriesPlot();
-////
-////        timeSeriesPlot.pack();
-////        timeSeriesPlot.setResizable( false );
-////        timeSeriesPlot.setVisible( true );
-////
-//        Thread.sleep( 100 );
-////        copyToFile( timeSeriesPlot, "service/test/test_TimeSeriesFrameeee.jpg" );
-////
-////        final Image image = timeSeriesPlot.createImage( 400, 400 );
-//
-////        BufferedImage bufferedImage = toBufferedImage( image );
-////        BASE64Encoder encoder = new BASE64Encoder();
-////        encoder.encode( bufferedImage );
-//
-////        PngEncoder pngEncoder = new PngEncoder();
-////        pngEncoder.setImage( image );
-////        byte[] bytes = pngEncoder.pngEncode();
-//    }
-//
-////    @Test
-////    public void testSerializationImage() throws Exception {
-////    	Example1 example = new Example1();
-////
-////    	Image createdImage = example.createImage(example.getWidth(), example.getHeight());
-////
-////    	FileInputStream fichierKer = new FileInputStream("kerropi1.jpg");
-////		BufferedImage bImageKer = ImageIO.read(fichierKer);
-////		Image imageKer = bImageKer;
-////
-//////    	int w = createdImage.getWidth(null);
-//////		int h = createdImage.getHeight(null);
-//////		BufferedImage bImage = new BufferedImage(w, h, BufferedImage.TYPE_INT_RGB);
-////		BufferedImage bImage = ImageHelper.createBufferedImage(createdImage);
-////		BufferedImage bImageKer2 = ImageHelper.createBufferedImage(imageKer);
-////
-//////    	final byte[] bytes = createdImage.toString().getBytes();
-//////    	final String pif = Base64.encode(bytes);
-////
-////    	try {
-////    		File outKer = new File("outKer.jpg");
-////			ImageIO.write(bImageKer2, "jpeg", outKer);
-////
-////    		File out = new File("out.jpg");
-////			ImageIO.write(bImage, "jpeg", out);
-////
-////
-//////    		FileOutputStream flux = new FileOutputStream("bob_image.jpg");
-//////    		BufferedOutputStream fluxBuf = new BufferedOutputStream(flux);
-//////    		JPEGImageEncoder codec = JPEGCodec.createJPEGEncoder(fluxBuf, JPEGCodec.getDefaultJPEGEncodeParam(bImage));
-//////    		codec.encode(bImage);
-//////    		fluxBuf.close();
-////
-//////    		FileWriter fichier = new FileWriter("bob_encode.gif");
-//////    		BufferedWriter output = new BufferedWriter(fichier);
-//////    		output.write(pif);
-//////    		output.flush();
-//////    		output.close();
-//////
-//////    		FileWriter fichier1 = new FileWriter("bob.gif");
-//////    		BufferedWriter output1 = new BufferedWriter(fichier1);
-//////    		String bytesS = new String(bytes);
-//////    		output1.write(bytesS);
-//////    		output1.flush();
-//////    		output1.close();
-//////
-//////    		FileWriter fichier2 = new FileWriter("bob_decode.gif");
-//////    		BufferedWriter output2 = new BufferedWriter(fichier2);
-//////    		byte[] paf = Base64.decode(pif);
-//////    		String bytesS2 = new String(paf);
-//////    		output2.write(bytesS2);
-//////    		output2.flush();
-//////    		output2.close();
-////
-////    	} catch (IOException e) {
-////    		e.printStackTrace();
-////    	}
-////    }
-//
-//
-////        Image createdImage = example.createImage(example.getWidth(), example.getHeight());
-////        final byte[] bytes = createdImage.toString().getBytes();
-////        final String pif = Base64.encode( bytes );
-////
-////        try {
-////            FileWriter fichier = new FileWriter("bob_encode.gif");
-////            fichier.write(pif);
-////
-////            FileWriter fichier1 = new FileWriter("bob.gif");
-////            String bytesS = new String(bytes);
-////            fichier.write(bytesS);
-////        } catch (IOException e) {
-////            e.printStackTrace();
-////        }
-//
-//    @Test
-//    public void doGetImage()
-//            throws Exception
-//    {
-//        // Appel .jsp
-//        // <img src="plotEther?agentId=15" width="150px" height="150px"/>
-//        final FileInputStream fichierKer = new FileInputStream( "/home_local/workspaces/Megapoli/service/test/kerropi1.jpg" );
-//        final BufferedImage bImageKer = ImageIO.read( fichierKer );
-//
-//        if( bImageKer != null )
-//        {
-////            final PngEncoderB pngEncoderB = new PngEncoderB();
-////            pngEncoderB.setImage( bImageKer );
-//
-////            ImageIO.write( bImageKer, "png", response.getOutputStream() );
-//        }
-//    }
-//
-//    @Test
-//    public void doGetImage_withFrame()
-//            throws Exception
-//    {
-//        final GeoDateArray dateArray = createTimeArray( 10, null );
-//        final double[] dataArray = createDataArray( 10, 5 );
-//
-//        final SimpleLine data = new SimpleLine( dateArray, dataArray, "legend" );
-//        SGTMetaData meta = new SGTMetaData( "Longitude", "degrees East", false, false );
-//        data.setXMetaData( meta );
-//
-//        meta = new SGTMetaData( "parameterName", "parameterUnit", false, false );
-//        data.setYMetaData( meta );
-//
-//        final JFrame frame = new JFrame( "Frame principale" );
-//        final JPane jPane = new JPane();
-//
-//        final JLabel jlbHelloWorld = new JLabel( "Hello World" );
-//        jPane.add( jlbHelloWorld, BorderLayout.SOUTH );
-//
-//        final ImageIcon ic = new ImageIcon( "/home_local/workspaces/Megapoli/service/test/kerropi1.jpg" );
-//        final JLabel jLabel = new JLabel( ic );
-//        jPane.add( jLabel, BorderLayout.EAST );
-//
-//        final JPlotLayout jPlotLayout = new JPlotLayout( false, true, false, "Trajectory data", null, false );
-//        jPlotLayout.setTitles( "title1", "title2", "title3" );
-//        jPlotLayout.addData( data, data.getTitle() );
-//        jPlotLayout.setVisible( true );
-//        jPane.add( jPlotLayout, BorderLayout.EAST );
-//
-//        jPane.setVisible( true );
-//        frame.setContentPane( jPane );
-//
-//        frame.setSize( 700, 550 );
-//        frame.setEnabled( false );
-//        frame.pack();
-//        frame.setVisible( true );
-//
-//
-//        final BufferedImage bufferedImage = new BufferedImage( jPlotLayout.getWidth(), jPlotLayout.getHeight(), BufferedImage.TYPE_INT_RGB );
-//        final Graphics2D graphics2D = bufferedImage.createGraphics();
-//        graphics2D.setBackground( Color.WHITE );
-//        jPlotLayout.getComponent().addNotify();
-//        jPlotLayout.getComponent().validate();
-//
-//        jPlotLayout.draw( graphics2D );
-//
-//        try
-//        {
-//            final File outFile = new File( "/home_local/workspaces/Megapoli/service/test/keroppi_out.jpg" );
-//            ImageIO.write( bufferedImage, "jpg", outFile );
-//        }
-//        catch( Exception e )
-//        {
-//        }
-//    }
-//
-//
-//    protected GeoDateArray createTimeArray( @NotNull final Integer size, @Nullable String day )
-//            throws ParseException
-//    {
-//        if( null == day )
-//            day = "2009-07-13";
-//
-//        final Date[] dates = new Date[size];
-//        for( int i = 0; i < size; i++ )
-//        {
-//            final String dateString = day + ' ' + i + ":32";
-//            final Date date = DateHelper.parseDate( dateString, DateHelper.ENGLISH_DATE_PATTERN );
-//            dates[i] = date;
-//        }
-//        return new GeoDateArray( dates );
-//    }
-//
-//    @NotNull
-//    protected double[] createDataArray( @NotNull final Integer size, @NotNull final Integer begin )
-//            throws ParseException
-//    {
-//        final double[] datas = new double[size];
-//        for( int i = 0; i < size; i++ )
-//        {
-//            datas[i] = Double.valueOf( i + begin );
-//        }
-//        return datas;
-//    }
-//
-//    private MegapoliPlot createPlot()
-//            throws ParseException, ServiceException
-//    {
-//        final String parameterName = "OZONE";
-//        final String parameterUnit = "ppbv";
-//        final boolean startToZero = true;
-//        final boolean markPoint = false;
-//
-//        final GeoDateArray dateArray = createTimeArray( 10, null );
-//        final double[] dataArray = createDataArray( 10, 5 );
-//
-//        final SimpleLine data = new SimpleLine( dateArray, dataArray, "legend" );
-//        SGTMetaData meta = new SGTMetaData( "Longitude", "degrees East", false, false );
-//        data.setXMetaData( meta );
-//
-//        meta = new SGTMetaData( parameterName, parameterUnit, false, false );
-//        data.setYMetaData( meta );
-//
-//        final LineAttribute lineAttribute = new LineAttribute( LineAttribute.SOLID, Color.red );
-//
-//        final MegapoliPlot timeSeriesPlot = new MegapoliPlot();
-//        timeSeriesPlot.setTitle( "Keroppi title" );
-//        timeSeriesPlot.setLogoMegapoli( "keroppi1.jpg" );
-////        timeSeriesPlot.setData( data );
-////        timeSeriesPlot.setLineAttribute( lineAttribute );
-//
-//        createTimeSeriesPlot();
-//        return timeSeriesPlot;
-//    }
-//
-//    private JPlotLayout createLayout( @Nullable final String plateformName, @Nullable final String parameterName )
-//    {
-//        final JFrame frame = new JFrame( "Frame principale" );
-//        final JPanel panel = new JPanel( new BorderLayout() );
-//
-//        final JLabel jlbHelloWorld = new JLabel( "Hello World" );
-//        panel.add( jlbHelloWorld, BorderLayout.SOUTH );
-//
-//        final ImageIcon ic = new ImageIcon( "kerropi1.jpg" );
-//        final JLabel jLabel = new JLabel( ic );
-//        panel.add( jLabel, BorderLayout.EAST );
-//
-//        final JPlotLayout jPlotLayout = new JPlotLayout( false, false, false, "Trajectory data", null, false );
-//        jPlotLayout.setTitles( plateformName, parameterName, "title3" );
-////		jPlotLayout.setTitleHeightP(0.2, 0.2);
-//        jPlotLayout.setVisible( true );
-//        panel.add( jPlotLayout, BorderLayout.NORTH );
-//
-//        panel.setVisible( true );
-//        frame.setContentPane( panel );
-//
-//        frame.setSize( MAIN_WIDTH, 550 );
-//        frame.setVisible( true );
-//
-//        return jPlotLayout;
-//    }
-//
-//    public void doGet_Layout( final HttpServletResponse response, final SimpleLine data )
-//            throws ServletException, IOException
-//    {
-//        try
-//        {
-//            final JPlotLayout jPlotLayout = new JPlotLayout( false, true, false, "Trajectory data", null, false );
-//            jPlotLayout.setTitles( "title1", "title2", "title3" );
-//            jPlotLayout.addData( data, data.getTitle() );
-//            jPlotLayout.setVisible( true );
-//
-//            jPlotLayout.addNotify();
-//            jPlotLayout.validate();
-//
-//            final BufferedImage bufferedImage = new BufferedImage( jPlotLayout.getWidth(), jPlotLayout.getHeight(), BufferedImage.TYPE_INT_RGB );
-//            final Graphics2D graphics2D = bufferedImage.createGraphics();
-//            graphics2D.setBackground( Color.red );
-//            jPlotLayout.draw( graphics2D );
-//
-//            ImageIO.write( bufferedImage, "png", response.getOutputStream() );
-//        }
-//
-//        catch( Exception e )
-//        {
-//            e.printStackTrace();
-//        }
-//    }
-//
-//    @ControllerMethod(jsonResult = true)
-//    public JSONObject searchDatasByPlateformByParameterByPeriod(
-//            @Mandatory @ParamName(ParameterConstants.PARAMETER_PLATEFORM_ID) final Integer plateformId,
-//            @Mandatory @ParamName(ParameterConstants.PARAMETER_PARAMETER_ID) final Integer parameterId,
-//            @ParamName(ParameterConstants.PARAMETER_DATE_BEGIN) final String dateBegin,
-//            @ParamName(ParameterConstants.PARAMETER_DATE_END) final String dateEnd )
-//            throws ServiceException, ParseException
-//    {
-////        final String pofBegin = "2009-07-13 13:00";
-////        final String pofEnd = "2009-07-13 14:00";
-////        final Date formatedDateBegin = DateHelper.parseDate( pofBegin, DateHelper.ENGLISH_DATE_PATTERN );
-////        final Date formatedDateEnd = DateHelper.parseDate( pofEnd, DateHelper.ENGLISH_DATE_PATTERN );
-//
-////        final Plateforme plateform = _etherService.getPlateformById( plateformId );
-////        final Parametre parameter = _etherService.getParameterById( parameterId );
-////        final List<Data> values = _etherService.getValuesByPlateformByParameterByPeriod( plateformId, parameterId, formatedDateBegin, formatedDateEnd );
-//
-//        //JPlotLayout layout = createLayout( plateform.getPlateformeNom(), parameter.getParametreNom() );
-////        final TimeSeriesPlot timeSeriesPlot = createPlot();
-////        final Image image = timeSeriesPlot.createImage( 400, 400 );
-//
-////        BufferedImage bufferedImage = toBufferedImage( image );
-////        BASE64Encoder encoder = new BASE64Encoder();
-////        encoder.encode( bufferedImage );
-//
-////        PngEncoder pngEncoder = new PngEncoder();
-////        pngEncoder.setImage( image );
-////        byte[] bytes = pngEncoder.pngEncode();
-//
-//        //final BufferedImage bufferedImage = ImageHelper.createBufferedImage( timeSeriesPlot );
-//        final BufferedImage bufferedImage = new BufferedImage( 400, 400, BufferedImage.TYPE_INT_RGB );
-//        final Graphics2D g2 = bufferedImage.createGraphics();
-////        timeSeriesPlot.paint( g2 );
-//        g2.dispose();
-//
-////        final PngEncoderB pngEncoderB = new PngEncoderB();
-////        pngEncoderB.setImage( bufferedImage );
-////        final byte[] bytesB = pngEncoderB.pngEncode();
-//
-//        final JSONObject result = new JSONObject();
-////        result.put( ParameterConstants.PARAMETER_IMAGE, bytesB );
-//        return result;
-////        return new JSONObject();
-//    }
-//
-////    public void searchDatasByPlateformByParameterByPeriod( final HttpServletRequest request, final HttpServletResponse response )
-////            throws ParseException, ServiceException, IOException
-////    {
-////        final TimeSeriesPlot timeSeriesPlot = createPlot();
-////        final Image image = timeSeriesPlot.createImage( 400, 400 );
-////
-////        //final BufferedImage bufferedImage = ImageHelper.createBufferedImage( timeSeriesPlot );
-////        final BufferedImage bufferedImage = new BufferedImage( 400, 400, BufferedImage.TYPE_INT_RGB );
-////        final Graphics2D g2 = bufferedImage.createGraphics();
-////        timeSeriesPlot.paint( g2 );
-////        g2.dispose();
-////
-////        final PngEncoderB pngEncoderB = new PngEncoderB();
-////        pngEncoderB.setImage( bufferedImage );
-////        final byte[] bytesB = pngEncoderB.pngEncode();
-////
-////        ImageIO.write( (RenderedImage) image, "png", response.getOutputStream() );
-////    }
-////
-////    private TimeSeriesPlot createPlot()
-////            throws ParseException, ServiceException
-////    {
-////
-////        final String parameterName = "OZONE";
-////        final String parameterUnit = "ppbv";
-////        final boolean startToZero = true;
-////        final boolean markPoint = false;
-////
-////        final GeoDateArray dateArray = createTimeArray( 10, null );
-////        final double[] dataArray = createDataArray( 10, 5 );
-////
-////        final SimpleLine data = new SimpleLine( dateArray, dataArray, "legend" );
-////        SGTMetaData meta = new SGTMetaData( "Longitude", "degrees East", false, false );
-////        data.setXMetaData( meta );
-////
-////        meta = new SGTMetaData( parameterName, parameterUnit, false, false );
-////        data.setYMetaData( meta );
-////
-////        final LineAttribute lineAttribute = new LineAttribute( LineAttribute.SOLID, Color.red );
-////
-////        final TimeSeriesPlot timeSeriesPlot = new TimeSeriesPlot();
-////        timeSeriesPlot.setTitle( "Keroppi title" );
-////        timeSeriesPlot.setLogoMegapoli( "keroppi1.jpg" );
-////        timeSeriesPlot.setData( data );
-////        timeSeriesPlot.setLineAttribute( lineAttribute );
-////
-////        timeSeriesPlot.createTimeSeriesPlot();
-////        return timeSeriesPlot;
-////    }
-////
-////    private JPlotLayout createLayout( @Nullable final String plateformName, @Nullable final String parameterName )
-////    {
-////        final JFrame frame = new JFrame( "Frame principale" );
-////        final JPanel panel = new JPanel( new BorderLayout() );
-////
-////        final JLabel jlbHelloWorld = new JLabel( "Hello World" );
-////        panel.add( jlbHelloWorld, BorderLayout.SOUTH );
-////
-////        final ImageIcon ic = new ImageIcon( "kerropi1.jpg" );
-////        final JLabel jLabel = new JLabel( ic );
-////        panel.add( jLabel, BorderLayout.EAST );
-////
-////        final JPlotLayout jPlotLayout = new JPlotLayout( false, false, false, "Trajectory data", null, false );
-////        jPlotLayout.setTitles( plateformName, parameterName, "title3" );
-//////		jPlotLayout.setTitleHeightP(0.2, 0.2);
-////        jPlotLayout.setVisible( true );
-////        panel.add( jPlotLayout, BorderLayout.NORTH );
-////
-////        panel.setVisible( true );
-////        frame.setContentPane( panel );
-////
-////        frame.setSize( 700, 550 );
-////        frame.setVisible( true );
-////
-////        return jPlotLayout;
-////    }
-//
-////    @ControllerMethod(jsonResult = true)
-////    public JSONObject searchDatasByPlateformByParameterByPeriod(
-////    		@Mandatory @ParamName(ParameterConstants.PARAMETER_PLATEFORM_ID) final Integer plateformId,
-////    		@Mandatory @ParamName(ParameterConstants.PARAMETER_PARAMETER_ID) final Integer parameterId,
-////    		@ParamName(ParameterConstants.PARAMETER_DATE_BEGIN) final String dateBegin,
-////    		@ParamName(ParameterConstants.PARAMETER_DATE_END) final String dateEnd)
-////    	throws ServiceException, EtherException, ParseException
-////    {
-////    	final long time1 = Calendar.getInstance().getTimeInMillis();
-////    	LOGGER.error("Date Controller begin : "+Calendar.getInstance().getTime());
-//////    	final Date formatedDateBegin = DateHelper.parseDate(dateBegin, DateHelper.ENGLISH_DATE_PATTERN_SHORT);
-//////    	final Date formatedDateEnd = DateHelper.parseDate(dateEnd, DateHelper.ENGLISH_DATE_PATTERN_SHORT);
-////
-////    	final Date formatedDateBegin = null;
-////    	final Date formatedDateEnd = null;
-////
-////    	final long time2 = Calendar.getInstance().getTimeInMillis();
-////    	LOGGER.error("Date Controller before request : "+Calendar.getInstance().getTime()+", Duration : "+(time2-time1));
-////		final List<Data> values = _etherService.getValuesByPlateformByParameterByPeriod(plateformId, parameterId, formatedDateBegin, formatedDateEnd);
-////    	final long time3 = Calendar.getInstance().getTimeInMillis();
-////    	LOGGER.error("Date Controller after request : "+Calendar.getInstance().getTime()+", Duration : "+(time3-time2));
-////
-////    	final JSONObject result = new JSONObject();
-////    	result.put( ParameterConstants.PARAMETER_VALUES, values );
-////    	final long time4 = Calendar.getInstance().getTimeInMillis();
-////    	LOGGER.error("!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!");
-////    	LOGGER.error("Date Controller before return Result : "+Calendar.getInstance().getTime()+", Duration : "+(time4-time3)+", Total : "+(time4-time1)+", Taille : "+values.size());
-////    	LOGGER.error("plateformId : "+plateformId+", parameterId : "+parameterId);
-////    	LOGGER.error("!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!");
-////    	return result;
-////    }
-//
-////	private void createPlot() {
-////		JPlotLayout layout_ = new JPlotLayout(false, false, false,
-////				"Trajectory data", null, false);
-////		/*
-////		 * Batch changes to layout.
-////		 */
-////		layout_.setBatch(true);
-////		/*
-////		 * Set the titles.
-////		 */
-////		layout_.setTitles(
-////				"Steller's Sea Lion Climate Research Profiling Floats",
-////				"Trajectories", "");
-////		/*
-////		 * Change the title sizes from the defaults. (0.25, 0.15)
-////		 */
-////		layout_.setTitleHeightP(0.2, 0.2);
-////		/*
-////		 * Use a BorderLayout for the JFrame and and the JPlotLayout to the
-////		 * "Center". Pack the frame and make it visible.
-////		 */
-////		JFrame pif = new JFrame();
-////		pif.getContentPane().setLayout(new BorderLayout());
-////		pif.getContentPane().add(layout_, BorderLayout.CENTER);
-////		pif.pack();
-////		pif.setVisible(true);
-////		/*
-////		 * Read trajectory data from local file
-////		 */
-////		SGTData data = readTrajectory("service/implementation/com/ether/tutorial/data/trajectory");
-////		/*
-////		 * Add the trajectory data to the plot using the data title as the data
-////		 * description. The description is used in the LineKey.
-////		 */
-////		layout_.addData(data, data.getTitle());
-////		/*
-////		 * Read the North Pacific hi-resolution coastline and add it to the
-////		 * layout. Coastlines are handled differently by JPlotLayout. Coastlines
-////		 * are not used to compute the X and Y ranges and are always clipped to
-////		 * the axes.
-////		 */
-////		// SGTLine coastLine = getCoastLine("support/npac_hi_rez", 120000);
-////		// layout_.setCoastLine(coastLine);
-////		/*
-////		 * Turn batching off. All batched changes to the JPlotLayout will now be
-////		 * executed.
-////		 */
-////		layout_.setBatch(false);
-////	}
-//
-//
-////    public void doGet_OK( final HttpServletRequest request, final HttpServletResponse response )
-////            throws ServletException, IOException
-////    {
-////        final JFrame frame = new JFrame( "Frame principale" );
-////        final JPanel panel = new JPanel( new BorderLayout() );
-////
-////        final JLabel jlbHelloWorld = new JLabel( "Hello World" );
-////        panel.add( jlbHelloWorld, BorderLayout.SOUTH );
-////
-////        final ImageIcon ic = new ImageIcon( "/home_local/workspaces/Megapoli/kerropi1.jpg" );
-////        final JLabel jLabel = new JLabel( ic );
-////        panel.add( jLabel, BorderLayout.EAST );
-////
-////        final JPlotLayout jPlotLayout = new JPlotLayout( false, false, false, "Trajectory data", null, false );
-////        jPlotLayout.setTitles( "title1", "title2", "title3" );
-////        jPlotLayout.setVisible( true );
-////        panel.add( jPlotLayout, BorderLayout.NORTH );
-////
-////        panel.setVisible( true );
-////        frame.setContentPane( panel );
-////
-////        frame.setSize( MAIN_WIDTH, 550 );
-////        frame.setVisible( true );
-////
-////        final BufferedImage bufferedImage = new BufferedImage( frame.getWidth(), frame.getHeight(), BufferedImage.TYPE_INT_RGB );
-////
-////        final Graphics2D g2 = bufferedImage.createGraphics();
-////        frame.paint( g2 );
-////        g2.dispose();
-////
-////        try
-////        {
-////            final File out = new File( "/home_local/workspaces/Megapoli/test_JPlotLayout.jpg" );
-////            ImageIO.write( bufferedImage, "JPEG", out );
-////        }
-////        catch( Exception e )
-////        {
-////        }
-////        ImageIO.write( bufferedImage, "JPEG", response.getOutputStream() );
-////    }
-////
-////    public void doGet_OKK( final HttpServletRequest request, final HttpServletResponse response )
-////            throws ServletException, IOException
-////    {
-////        try
-////        {
-////            final GeoDateArray dateArray = createTimeArray( 10, null );
-////            final double[] dataArray = createDataArray( 10, 5 );
-////
-////            final SimpleLine data = new SimpleLine( dateArray, dataArray, "legend" );
-////            SGTMetaData meta = new SGTMetaData( "Longitude", "degrees East", false, false );
-////            data.setXMetaData( meta );
-////
-////            meta = new SGTMetaData( "parameterName", "parameterUnit", false, false );
-////            data.setYMetaData( meta );
-////
-////            final JPane jPane = new JPane();
-////
-////            final JLabel jlbHelloWorld = new JLabel( "Hello World" );
-////            jPane.add( jlbHelloWorld, BorderLayout.SOUTH );
-////
-////            final ImageIcon ic = new ImageIcon( "/home_local/workspaces/Megapoli/kerropi1.jpg" );
-////            final JLabel jLabel = new JLabel( ic );
-////            jPane.add( jLabel, BorderLayout.EAST );
-////
-////            final JPlotLayout jPlotLayout = new JPlotLayout( false, true, false, "Trajectory data", null, false );
-////            jPlotLayout.setTitles( "title1", "title2", "title3" );
-////            jPlotLayout.addData( data, data.getTitle() );
-////            jPlotLayout.setVisible( true );
-////            jPane.add( jPlotLayout, BorderLayout.EAST );
-////
-////            jPane.setVisible( true );
-////
-////
-////            final BufferedImage bufferedImage = new BufferedImage( jPlotLayout.getWidth(), jPlotLayout.getHeight(), BufferedImage.TYPE_INT_RGB );
-////            final Graphics2D graphics2D = bufferedImage.createGraphics();
-////            graphics2D.setBackground( Color.WHITE );
-////            jPlotLayout.getComponent().addNotify();
-////            jPlotLayout.getComponent().validate();
-////
-////            jPlotLayout.draw( graphics2D );
-////
-////            try
-////            {
-////                final File outFile = new File( "/home_local/workspaces/Megapoli/keroppi_out.jpg" );
-////                ImageIO.write( bufferedImage, "jpg", outFile );
-////            }
-////            catch( Exception e )
-////            {
-////                throw new IOException( e );
-////            }
-////            ImageIO.write( bufferedImage, "png", response.getOutputStream() );
-////        }
-////        catch( Exception e )
-////        {
-////            throw new IOException( e );
-////        }
-////    }
-//
-//
-//    public void createTimeSeriesPlot()
-//            throws ServiceException
-//    {
-//        // Enable WindowEvents. Set the layout of the content pane to a BorderLayout.
-////        enableEvents( AWTEvent.WINDOW_EVENT_MASK );
-////        getContentPane().setLayout( new BorderLayout() );
-////
-////        // Add the page object to graphicPanel
-////        getjPanel().add( getPage(), BorderLayout.CENTER );
-////
-////        // DATA MODEL
-////        getPage().setDataModel( getDataModel() );
-////
-////        // PANEL MODEL
-////        final PanelModel panelModel = extractPanelModel();
-////        setPanelModel( panelModel );
-////        getPage().setPanelModel( getPanelModel() );
-////
-////        // PANEL HOLDER
-////        final PanelHolder panelHolder = panelModel.findPanelHolder( PANEL_GRAPH );
-////        if( null != panelHolder )
-////        {
-////            changeTitle( getTitle(), panelHolder.getLabels() );
-////            changeLogos( panelHolder.getLabels() );
-////
-////
-////            final DataGroup dataGroup = panelHolder.findDataGroup( DATA_GROUP );
-////            final Legend timeLegend = panelHolder.findLegend( LEGEND );
-////            getDataModel().addData( getData(), getLineAttribute(), panelHolder, dataGroup, timeLegend );
-////        }
-////        else
-////            getDataModel().addData( getData(), getLineAttribute(), panelHolder, null, null );
-////
-//////        final PanelHolder panelHolderImage = panelModel.findPanelHolder( PANEL_IMAGE );
-//////        getDataModel().addData( getData(), getLineAttribute(), panelHolderImage, null, null);
-////
-////        // Add the graphic to the content pane of the JFrame.
-////        getContentPane().add( getjPanel(), BorderLayout.CENTER );
-//    }
-//
-////    private void changeTitle( @Nullable final String title, @Nullable final Map panelHolderLabels )
-////    {
-//////        if( null != title && null != panelHolderLabels && null != panelHolderLabels.get( LABEL_TITLE ) )
-//////        {
-//////            final gov.noaa.pmel.sgt.beans.Label labelTitle = (gov.noaa.pmel.sgt.beans.Label) panelHolderLabels.get( LABEL_TITLE );
-//////            labelTitle.setText( title );
-//////        }
-////    }
-////
-////
-////    private void changeLogos( @Nullable final Map panelHolderLabels )
-////    {
-////        if( null != getLogoMegapoli() && null != panelHolderLabels && null != panelHolderLabels.get( LABEL_LOGO_MEGAPOLI ) )
-////        {
-////            final gov.noaa.pmel.sgt.beans.Label labelLogoMegapoli = (gov.noaa.pmel.sgt.beans.Label) panelHolderLabels.get( LABEL_LOGO_MEGAPOLI );
-////            labelLogoMegapoli.setText( getLogoMegapoli() );
-////        }
-////    }
-////
-////    /**
-////     * Create panelModel by de-serializing an existing PanelModel.
-////     * The file megapoli.xml was created using gov.noaa.pmel.sgt.beans.PanelModelEditor.
-////     */
-////    private PanelModel extractPanelModel()
-////            throws ServiceException
-////    {
-////        try
-////        {
-////            return PanelModel.loadFromXML( getClass().getResource( FILE_NAME ).openStream() );
-////        }
-////        catch( Exception e )
-////        {
-////            throw new ServiceException( ServiceException.ServiceCode.PANEL_MODEL_NOT_FOUND, e );
-////        }
-////    }
-//
-//    @NotNull
-//    public LineAttribute createLineAttribute( final boolean markPoint )
-//    {
-//        final LineAttribute lineAttribute = new LineAttribute( LineAttribute.SOLID, Color.red );
-//        if( markPoint )
-//        {
-//            lineAttribute.setStyle( LineAttribute.MARK );
-//            // int to display cross
-//            lineAttribute.setMark( 2 );
-//        }
-//        return lineAttribute;
-//    }
-
-
-    // Dimensions of the jPanes
-    private static final int MAIN_WIDTH = 1000;
-    private static final int MAIN_HEIGHT = 1000;
-}
Index: ether_statistics/service/test/com/ether/ServiceEtherTest.java
===================================================================
--- ether_statistics/service/test/com/ether/ServiceEtherTest.java	(revision 569)
+++ ether_statistics/service/test/com/ether/ServiceEtherTest.java	(revision 572)
@@ -1,6 +1,3 @@
 package com.ether;
-
-import com.medias.database.objects.Plateforme;
-import com.medias.database.objects.TypePlateforme;
 
 /**
Index: ether_statistics/service/test/com/ether/ServiceTestHelper.java
===================================================================
--- ether_statistics/service/test/com/ether/ServiceTestHelper.java	(revision 569)
+++ ether_statistics/service/test/com/ether/ServiceTestHelper.java	(revision 572)
@@ -1,8 +1,4 @@
 package com.ether;
 
-import com.medias.database.objects.Parametre;
-import com.medias.database.objects.Plateforme;
-import com.medias.database.objects.TypePlateforme;
-import com.medias.database.objects.Valeur;
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
@@ -33,8 +29,5 @@
     public static Class[] getAllKnownDomainClasses()
     {
-        return new Class[]{
-                Plateforme.class,
-                Parametre.class,
-                Valeur.class,};
+        return new Class[]{};
     }
 
