Cleanup
This commit is contained in:
@@ -17,7 +17,7 @@
|
||||
*
|
||||
*/
|
||||
|
||||
package ch.psi.fda.aq;
|
||||
package ch.psi.fda;
|
||||
|
||||
import java.awt.FlowLayout;
|
||||
import java.awt.event.ActionEvent;
|
||||
@@ -53,8 +53,8 @@ import com.google.common.eventbus.EventBus;
|
||||
|
||||
import sun.misc.Signal;
|
||||
import sun.misc.SignalHandler;
|
||||
import ch.psi.fda.aq.Acquisition;
|
||||
import ch.psi.fda.core.messages.DataMessageMetadata;
|
||||
import ch.psi.fda.core.messages.DataQueue;
|
||||
import ch.psi.fda.gui.ProgressPanel;
|
||||
import ch.psi.fda.gui.ScrollableFlowPanel;
|
||||
import ch.psi.fda.install.ApplicationConfigurator;
|
||||
@@ -64,10 +64,9 @@ import ch.psi.fda.model.v1.Data;
|
||||
import ch.psi.fda.visualizer.Visualizer;
|
||||
|
||||
/**
|
||||
* Main class for data acquisition
|
||||
* @author ebner
|
||||
*
|
||||
* Entry class for command line based data acquisition
|
||||
*/
|
||||
@SuppressWarnings("restriction")
|
||||
public class AcquisitionMain {
|
||||
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
*
|
||||
*/
|
||||
|
||||
package ch.psi.fda.co;
|
||||
package ch.psi.fda;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.PrintWriter;
|
||||
@@ -51,10 +51,10 @@ import ch.psi.fda.serializer.DataSerializerTXTSplit;
|
||||
* Converter to convert the format of datafiles
|
||||
* @author ebner
|
||||
*/
|
||||
public class ConversionEngine {
|
||||
public class ConversionMain {
|
||||
|
||||
// Get Logger
|
||||
private static Logger logger = Logger.getLogger(ConversionEngine.class.getName());
|
||||
private static Logger logger = Logger.getLogger(ConversionMain.class.getName());
|
||||
|
||||
public enum Writer {TXT, TXT_2D, TXT_SPLIT, MAT, MAT_2D, MDA, MAT_2D_Z};
|
||||
public enum Reader {TXT, MDA};
|
||||
@@ -235,7 +235,7 @@ public class ConversionEngine {
|
||||
System.exit(-1);
|
||||
}
|
||||
|
||||
ConversionEngine e = new ConversionEngine();
|
||||
ConversionMain e = new ConversionMain();
|
||||
try{
|
||||
e.convert(infile, outfile, reader, writer);
|
||||
}
|
||||
@@ -17,7 +17,7 @@
|
||||
*
|
||||
*/
|
||||
|
||||
package ch.psi.fda.vis;
|
||||
package ch.psi.fda;
|
||||
|
||||
import java.awt.FlowLayout;
|
||||
import java.awt.event.WindowAdapter;
|
||||
@@ -61,15 +61,15 @@ import ch.psi.fda.visualizer.Visualizer;
|
||||
* @author ebner
|
||||
*
|
||||
*/
|
||||
public class VisualizationEngine {
|
||||
public class VisualizationMain {
|
||||
|
||||
// Get Logger
|
||||
private static Logger logger = Logger.getLogger(VisualizationEngine.class.getName());
|
||||
private static Logger logger = Logger.getLogger(VisualizationMain.class.getName());
|
||||
|
||||
/**
|
||||
* Default constructor
|
||||
*/
|
||||
public VisualizationEngine(){
|
||||
public VisualizationMain(){
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -218,7 +218,7 @@ public class VisualizationEngine {
|
||||
System.exit(-1);
|
||||
}
|
||||
|
||||
VisualizationEngine e = new VisualizationEngine();
|
||||
VisualizationMain e = new VisualizationMain();
|
||||
try{
|
||||
e.visualize(cfile, dfile);
|
||||
}
|
||||
@@ -30,7 +30,6 @@ import java.util.Collections;
|
||||
import java.util.Date;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.concurrent.LinkedBlockingQueue;
|
||||
import java.util.logging.FileHandler;
|
||||
import java.util.logging.Handler;
|
||||
import java.util.logging.Level;
|
||||
@@ -68,8 +67,6 @@ import ch.psi.fda.core.manipulator.JythonManipulation;
|
||||
import ch.psi.fda.core.manipulator.Manipulation;
|
||||
import ch.psi.fda.core.manipulator.Manipulator;
|
||||
import ch.psi.fda.core.messages.DataMessageMetadata;
|
||||
import ch.psi.fda.core.messages.DataQueue;
|
||||
import ch.psi.fda.core.messages.Message;
|
||||
import ch.psi.fda.core.scripting.JythonGlobalVariable;
|
||||
import ch.psi.fda.core.scripting.JythonGlobalVariableDictionary;
|
||||
import ch.psi.fda.core.scripting.JythonParameterMapping;
|
||||
|
||||
@@ -1,43 +0,0 @@
|
||||
/**
|
||||
*
|
||||
* Copyright 2013 Paul Scherrer Institute. All rights reserved.
|
||||
*
|
||||
* This code is free software: you can redistribute it and/or modify it under
|
||||
* the terms of the GNU Lesser General Public License as published by the Free
|
||||
* Software Foundation, either version 3 of the License, or (at your option) any
|
||||
* later version.
|
||||
*
|
||||
* This code is distributed in the hope that it will be useful, but without any
|
||||
* warranty; without even the implied warranty of merchantability or fitness for
|
||||
* a particular purpose. See the GNU Lesser General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with this code. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
|
||||
package ch.psi.fda;
|
||||
|
||||
import java.util.logging.Logger;
|
||||
|
||||
import org.apache.commons.lang.SerializationUtils;
|
||||
//import org.jeromq.ZMQ;
|
||||
|
||||
public class Receiver {
|
||||
|
||||
private static final Logger logger = Logger.getLogger(Receiver.class.getName());
|
||||
|
||||
public static void main(String[] args){
|
||||
// ZMQ.Context context = ZMQ.context();
|
||||
// ZMQ.Socket socket = context.socket(ZMQ.SUB);
|
||||
// socket.subscribe("");
|
||||
// socket.connect("tcp://emac:9090");
|
||||
// while(true){
|
||||
// Object message = SerializationUtils.deserialize(socket.recv());
|
||||
//// Object message = socket.recv();
|
||||
// logger.info(""+message);
|
||||
// }
|
||||
}
|
||||
|
||||
}
|
||||
@@ -17,7 +17,7 @@
|
||||
*
|
||||
*/
|
||||
|
||||
package ch.psi.fda.vis;
|
||||
package ch.psi.fda;
|
||||
|
||||
import java.io.File;
|
||||
import java.net.URI;
|
||||
@@ -27,20 +27,19 @@ import javax.xml.bind.JAXBException;
|
||||
|
||||
import org.junit.After;
|
||||
import org.junit.Before;
|
||||
import org.junit.Ignore;
|
||||
import org.junit.Test;
|
||||
import org.xml.sax.SAXException;
|
||||
|
||||
import ch.psi.fda.vis.VisualizationEngine;
|
||||
import ch.psi.fda.VisualizationMain;
|
||||
|
||||
/**
|
||||
* Testcase for visualization engine
|
||||
* @author ebner
|
||||
*
|
||||
*/
|
||||
public class VisualizationEngineTest {
|
||||
public class VisualizationMainTest {
|
||||
|
||||
private VisualizationEngine engine;
|
||||
private VisualizationMain engine;
|
||||
private String configurationFile;
|
||||
private String dataFile;
|
||||
|
||||
@@ -55,7 +54,7 @@ public class VisualizationEngineTest {
|
||||
url = this.getClass().getClassLoader().getResource("testdata/scan/scan1d_0000.txt");
|
||||
dataFile = new File(new URI(url.toString())).getAbsolutePath();
|
||||
|
||||
engine = new VisualizationEngine();
|
||||
engine = new VisualizationMain();
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -66,7 +65,7 @@ public class VisualizationEngineTest {
|
||||
}
|
||||
|
||||
/**
|
||||
* Test method for {@link ch.psi.fda.vis.VisualizationEngine#visualize(java.io.File, java.io.File)}.
|
||||
* Test method for {@link ch.psi.fda.VisualizationMain#visualize(java.io.File, java.io.File)}.
|
||||
* Test whether a null data parameter is handled correctly
|
||||
* @throws InterruptedException
|
||||
* @throws SAXException
|
||||
@@ -78,7 +77,7 @@ public class VisualizationEngineTest {
|
||||
}
|
||||
|
||||
/**
|
||||
* Test method for {@link ch.psi.fda.vis.VisualizationEngine#visualize(java.io.File, java.io.File)}.
|
||||
* Test method for {@link ch.psi.fda.VisualizationMain#visualize(java.io.File, java.io.File)}.
|
||||
* Test whether a non existing data file is handled correctly
|
||||
* @throws InterruptedException
|
||||
* @throws SAXException
|
||||
@@ -90,7 +89,7 @@ public class VisualizationEngineTest {
|
||||
}
|
||||
|
||||
/**
|
||||
* Test method for {@link ch.psi.fda.vis.VisualizationEngine#visualize(java.io.File, java.io.File)}.
|
||||
* Test method for {@link ch.psi.fda.VisualizationMain#visualize(java.io.File, java.io.File)}.
|
||||
* Check whether null configuration file is handled correctly
|
||||
* @throws InterruptedException
|
||||
* @throws SAXException
|
||||
@@ -102,7 +101,7 @@ public class VisualizationEngineTest {
|
||||
}
|
||||
|
||||
/**
|
||||
* Test method for {@link ch.psi.fda.vis.VisualizationEngine#visualize(java.io.File, java.io.File)}.
|
||||
* Test method for {@link ch.psi.fda.VisualizationMain#visualize(java.io.File, java.io.File)}.
|
||||
* Test correct visualization
|
||||
* @throws InterruptedException
|
||||
* @throws SAXException
|
||||
@@ -115,11 +114,11 @@ public class VisualizationEngineTest {
|
||||
|
||||
/**
|
||||
* Test whether main can automatically determine the configuration file for a given data file
|
||||
* Test method for {@link ch.psi.fda.vis.VisualizationEngine#main(String[])}
|
||||
* Test method for {@link ch.psi.fda.VisualizationMain#main(String[])}
|
||||
*/
|
||||
@Test
|
||||
public void testMain(){
|
||||
// ATTENTION - This test will never fail because possible exceptions are caught in the main method !!!!
|
||||
VisualizationEngine.main(new String[]{dataFile});
|
||||
VisualizationMain.main(new String[]{dataFile});
|
||||
}
|
||||
}
|
||||
@@ -23,6 +23,8 @@ import org.junit.Before;
|
||||
import org.junit.Ignore;
|
||||
import org.junit.Test;
|
||||
|
||||
import ch.psi.fda.AcquisitionMain;
|
||||
|
||||
/**
|
||||
* @author ebner
|
||||
*
|
||||
@@ -44,7 +46,7 @@ public class AcquisitionMainTest {
|
||||
}
|
||||
|
||||
/**
|
||||
* Test method for {@link ch.psi.fda.aq.AcquisitionMain#main(java.lang.String[])}.
|
||||
* Test method for {@link ch.psi.fda.AcquisitionMain#main(java.lang.String[])}.
|
||||
*/
|
||||
@Ignore
|
||||
@Test
|
||||
|
||||
@@ -18,12 +18,12 @@
|
||||
*/
|
||||
package ch.psi.fda.core.loops;
|
||||
|
||||
import java.util.logging.Logger;
|
||||
//import java.util.logging.Logger;
|
||||
|
||||
import jcifs.smb.SmbFile;
|
||||
|
||||
import org.junit.Ignore;
|
||||
import org.junit.Test;
|
||||
//import jcifs.smb.SmbFile;
|
||||
//
|
||||
//import org.junit.Ignore;
|
||||
//import org.junit.Test;
|
||||
|
||||
/**
|
||||
* @author ebner
|
||||
@@ -31,36 +31,36 @@ import org.junit.Test;
|
||||
*/
|
||||
public class SambaTest {
|
||||
|
||||
private static final Logger logger = Logger.getLogger(SambaTest.class.getName());
|
||||
// private static final Logger logger = Logger.getLogger(SambaTest.class.getName());
|
||||
|
||||
@Test
|
||||
public void testSamba() throws Exception{
|
||||
// System.setProperty("jcifs.smb.client.dfs.disabled", "true");
|
||||
// System.setProperty("jcifs.smb.client.ssnLimit", "1");
|
||||
|
||||
// System.setProperty("jcifs.smb.client.domain", "x05la.psi.ch");
|
||||
// System.setProperty("jcifs.smb.client.username", "x05laop");
|
||||
// System.setProperty("jcifs.smb.client.password", "mXAS");
|
||||
// @Test
|
||||
// public void testSamba() throws Exception{
|
||||
//// System.setProperty("jcifs.smb.client.dfs.disabled", "true");
|
||||
//// System.setProperty("jcifs.smb.client.ssnLimit", "1");
|
||||
//
|
||||
// System.setProperty("jcifs.util.loglevel", "6");
|
||||
|
||||
// System.setProperty("jcifs.smb.lmCompatibility", "0");
|
||||
|
||||
// jcifs.smb.client.{domain,username,password
|
||||
|
||||
String smbShare = "";
|
||||
// smbShare = "smb://x05laop:mXAS@x05la/x05laop/Data1/otfTmp/";
|
||||
// smbShare = "smb://x05la.psi.ch/x05laop/Data1/otfTmp/";
|
||||
// smbShare = "smb://x05laop:mXAS@x05la/x05laop/Data1/otfTmp/000000.txt.lock";
|
||||
smbShare = "smb://:@yoke.psi.ch/nfs/";
|
||||
// NtlmPasswordAuthentication auth = new NtlmPasswordAuthentication("x05laop:mXAS");
|
||||
// SmbFile tmpDir = new SmbFile(smbShare,auth);
|
||||
// SmbFile tmpDir = new SmbFile(smbShare);
|
||||
|
||||
// tmpDir.createNewFile();
|
||||
// logger.info(""+tmpDir.exists());
|
||||
// logger.info(""+tmpDir.isDirectory());
|
||||
// SmbFile tmpFile = new SmbFile(tmpDir, "000000.txt.lock");
|
||||
// tmpFile.exists();
|
||||
}
|
||||
//// System.setProperty("jcifs.smb.client.domain", "x05la.psi.ch");
|
||||
//// System.setProperty("jcifs.smb.client.username", "x05laop");
|
||||
//// System.setProperty("jcifs.smb.client.password", "mXAS");
|
||||
////
|
||||
//// System.setProperty("jcifs.util.loglevel", "6");
|
||||
//
|
||||
//// System.setProperty("jcifs.smb.lmCompatibility", "0");
|
||||
//
|
||||
//// jcifs.smb.client.{domain,username,password
|
||||
//
|
||||
// String smbShare = "";
|
||||
//// smbShare = "smb://x05laop:mXAS@x05la/x05laop/Data1/otfTmp/";
|
||||
//// smbShare = "smb://x05la.psi.ch/x05laop/Data1/otfTmp/";
|
||||
//// smbShare = "smb://x05laop:mXAS@x05la/x05laop/Data1/otfTmp/000000.txt.lock";
|
||||
// smbShare = "smb://:@yoke.psi.ch/nfs/";
|
||||
//// NtlmPasswordAuthentication auth = new NtlmPasswordAuthentication("x05laop:mXAS");
|
||||
//// SmbFile tmpDir = new SmbFile(smbShare,auth);
|
||||
//// SmbFile tmpDir = new SmbFile(smbShare);
|
||||
//
|
||||
//// tmpDir.createNewFile();
|
||||
//// logger.info(""+tmpDir.exists());
|
||||
//// logger.info(""+tmpDir.isDirectory());
|
||||
//// SmbFile tmpFile = new SmbFile(tmpDir, "000000.txt.lock");
|
||||
//// tmpFile.exists();
|
||||
// }
|
||||
}
|
||||
|
||||
@@ -29,7 +29,6 @@ import java.util.logging.Logger;
|
||||
|
||||
import org.junit.After;
|
||||
import org.junit.Before;
|
||||
import org.junit.Ignore;
|
||||
import org.junit.Test;
|
||||
|
||||
import ch.psi.fda.TestConfiguration;
|
||||
|
||||
Reference in New Issue
Block a user