Search in sources :

Example 1 with ExportEvent

use of cbit.rmi.event.ExportEvent in project vcell by virtualcell.

the class VirtualFrapWindowManager method startExport.

public void startExport(Component requester, OutputContext outContext, ExportSpecs exportSpecs) {
    try {
        ExportServiceImpl exportServiceImpl = new ExportServiceImpl();
        DataServerImpl dataServerImpl = new DataServerImpl(localWorkSpace.getDataSetControllerImpl(), exportServiceImpl);
        exportServiceImpl.addExportListener(new ExportListener() {

            public void exportMessage(ExportEvent event) {
                System.out.println(event.toString());
            }
        });
        exportServiceImpl.makeRemoteFile(null, LocalWorkspace.getDefaultOwner(), dataServerImpl, exportSpecs);
    } catch (DataAccessException e) {
        e.printStackTrace(System.out);
    } catch (FileNotFoundException e) {
        // TODO Auto-generated catch block
        e.printStackTrace();
    }
}
Also used : DataServerImpl(cbit.vcell.simdata.DataServerImpl) ExportEvent(cbit.rmi.event.ExportEvent) FileNotFoundException(java.io.FileNotFoundException) ExportListener(cbit.rmi.event.ExportListener) ExportServiceImpl(cbit.vcell.export.server.ExportServiceImpl) DataAccessException(org.vcell.util.DataAccessException)

Example 2 with ExportEvent

use of cbit.rmi.event.ExportEvent in project vcell by virtualcell.

the class ExportServiceImpl method fireExportAssembling.

protected void fireExportAssembling(long jobID, VCDataIdentifier vcdID, String format) {
    User user = null;
    Object object = jobRequestIDs.get(new Long(jobID));
    if (object != null) {
        user = (User) object;
    }
    ExportEvent event = new ExportEvent(this, jobID, user, vcdID, ExportEvent.EXPORT_ASSEMBLING, format, null, null, null, null);
    fireExportEvent(event);
}
Also used : User(org.vcell.util.document.User) ExportEvent(cbit.rmi.event.ExportEvent)

Example 3 with ExportEvent

use of cbit.rmi.event.ExportEvent in project vcell by virtualcell.

the class ExportServiceImpl method fireExportProgress.

/**
 * Insert the method's description here.
 * Creation date: (4/1/2001 11:20:45 AM)
 * @param exportSpecs cbit.vcell.export.server.ExportSpecs
 * @param progress double
 */
protected void fireExportProgress(long jobID, VCDataIdentifier vcdID, String format, double progress) {
    User user = null;
    Object object = jobRequestIDs.get(new Long(jobID));
    if (object != null) {
        user = (User) object;
    }
    ExportEvent event = new ExportEvent(this, jobID, user, vcdID, ExportEvent.EXPORT_PROGRESS, format, null, new Double(progress), null, null);
    fireExportEvent(event);
}
Also used : User(org.vcell.util.document.User) ExportEvent(cbit.rmi.event.ExportEvent)

Example 4 with ExportEvent

use of cbit.rmi.event.ExportEvent in project vcell by virtualcell.

the class ExportServiceImpl method fireExportCompleted.

/**
 * Insert the method's description here.
 * Creation date: (4/1/2001 11:20:45 AM)
 * @deprecated
 */
protected ExportEvent fireExportCompleted(long jobID, VCDataIdentifier vcdID, String format, String location, ExportSpecs exportSpecs) {
    User user = null;
    Object object = jobRequestIDs.get(new Long(jobID));
    if (object != null) {
        user = (User) object;
    }
    TimeSpecs timeSpecs = (exportSpecs != null) ? exportSpecs.getTimeSpecs() : (null);
    VariableSpecs varSpecs = (exportSpecs != null) ? exportSpecs.getVariableSpecs() : (null);
    final KeyValue dataKey;
    if (vcdID instanceof VCSimulationDataIdentifier) {
        dataKey = ((VCSimulationDataIdentifier) vcdID).getSimulationKey();
    } else if (vcdID instanceof ExternalDataIdentifier) {
        dataKey = ((ExternalDataIdentifier) vcdID).getSimulationKey();
    } else {
        throw new RuntimeException("unexpected VCDataIdentifier");
    }
    ExportEvent event = new ExportEvent(this, jobID, user, vcdID.getID(), dataKey, ExportEvent.EXPORT_COMPLETE, format, location, null, timeSpecs, varSpecs);
    fireExportEvent(event);
    return event;
}
Also used : User(org.vcell.util.document.User) KeyValue(org.vcell.util.document.KeyValue) ExportEvent(cbit.rmi.event.ExportEvent) ExternalDataIdentifier(org.vcell.util.document.ExternalDataIdentifier) VCSimulationDataIdentifier(cbit.vcell.solver.VCSimulationDataIdentifier)

Example 5 with ExportEvent

use of cbit.rmi.event.ExportEvent in project vcell by virtualcell.

the class ExportMonitorPanelTest method main.

/**
 * main entrypoint - starts the part when it is run as an application
 * @param args java.lang.String[]
 */
public static void main(java.lang.String[] args) {
    try {
        JFrame frame = new javax.swing.JFrame();
        ExportMonitorPanel aExportMonitorPanel;
        aExportMonitorPanel = new ExportMonitorPanel();
        frame.setContentPane(aExportMonitorPanel);
        frame.setSize(aExportMonitorPanel.getSize());
        frame.addWindowListener(new java.awt.event.WindowAdapter() {

            public void windowClosing(java.awt.event.WindowEvent e) {
                System.exit(0);
            }
        });
        frame.show();
        java.awt.Insets insets = frame.getInsets();
        frame.setSize(frame.getWidth() + insets.left + insets.right, frame.getHeight() + insets.top + insets.bottom);
        VCSimulationDataIdentifier vcSimDataId = new VCSimulationDataIdentifier(new VCSimulationIdentifier(new KeyValue("234"), null), 1);
        aExportMonitorPanel.addExportEvent(new ExportEvent(aExportMonitorPanel, 123456789L, null, vcSimDataId.getID(), vcSimDataId.getSimulationKey(), ExportEvent.EXPORT_PROGRESS, "CSV", "", new Double(0.47), null, null), "bogus [application: model]");
        aExportMonitorPanel.addExportEvent(new ExportEvent(aExportMonitorPanel, 987654321L, null, vcSimDataId.getID(), vcSimDataId.getSimulationKey(), ExportEvent.EXPORT_COMPLETE, "GIF", "http://nrcam.uchc.edu/export/987654321.zip", new Double(1), null, null), "simulation [application: model]");
        frame.pack();
        frame.setVisible(true);
    } catch (Throwable exception) {
        System.err.println("Exception occurred in main() of javax.swing.JPanel");
        exception.printStackTrace(System.out);
    }
}
Also used : VCSimulationIdentifier(cbit.vcell.solver.VCSimulationIdentifier) KeyValue(org.vcell.util.document.KeyValue) ExportEvent(cbit.rmi.event.ExportEvent) VCSimulationDataIdentifier(cbit.vcell.solver.VCSimulationDataIdentifier) JFrame(javax.swing.JFrame)

Aggregations

ExportEvent (cbit.rmi.event.ExportEvent)15 User (org.vcell.util.document.User)8 DataJobEvent (cbit.rmi.event.DataJobEvent)4 ExportSpecs (cbit.vcell.export.server.ExportSpecs)4 DataServerImpl (cbit.vcell.simdata.DataServerImpl)4 DisplayPreferences (cbit.image.DisplayPreferences)3 AsynchClientTask (cbit.vcell.client.task.AsynchClientTask)3 ExportServiceImpl (cbit.vcell.export.server.ExportServiceImpl)3 ClientPDEDataContext (cbit.vcell.simdata.ClientPDEDataContext)3 OutputContext (cbit.vcell.simdata.OutputContext)3 Hashtable (java.util.Hashtable)3 KeyValue (org.vcell.util.document.KeyValue)3 ExportListener (cbit.rmi.event.ExportListener)2 SimulationJobStatusEvent (cbit.rmi.event.SimulationJobStatusEvent)2 VCellMessageEvent (cbit.rmi.event.VCellMessageEvent)2 PDEDataViewer (cbit.vcell.client.data.PDEDataViewer)2 SimStatusEvent (cbit.vcell.client.server.SimStatusEvent)2 ExportFormat (cbit.vcell.export.server.ExportFormat)2 MovieSpecs (cbit.vcell.export.server.MovieSpecs)2 TimeSpecs (cbit.vcell.export.server.TimeSpecs)2