org.virbo.jythonsupport
Class Util

java.lang.Object
  extended by org.virbo.jythonsupport.Util

public class Util
extends java.lang.Object

Utilities for jython scripts in both the datasource and application contexts.


Constructor Summary
Util()
           
 
Method Summary
static org.virbo.dataset.QDataSet getDataSet(java.lang.String surl)
          load the data specified by URL into Autoplot's internal data model.
static org.virbo.dataset.QDataSet getDataSet(java.lang.String surl, org.das2.util.monitor.ProgressMonitor mon)
          load the data specified by URL into Autoplot's internal data model.
static java.util.Map<java.lang.String,java.lang.Object> getMetaData(java.lang.String surl, org.das2.util.monitor.ProgressMonitor mon)
          load the metadata for the url.
static java.lang.String[] list(java.lang.String surl)
          returns a list of the files in the local or remote filesystem pointed to by surl.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Util

public Util()
Method Detail

getDataSet

public static org.virbo.dataset.QDataSet getDataSet(java.lang.String surl,
                                                    org.das2.util.monitor.ProgressMonitor mon)
                                             throws java.lang.Exception
load the data specified by URL into Autoplot's internal data model. This will block until the load is complete, and a ProgressMonitor object can be used to monitor the load.

Parameters:
ds -
Throws:
java.lang.Exception

getMetaData

public static java.util.Map<java.lang.String,java.lang.Object> getMetaData(java.lang.String surl,
                                                                           org.das2.util.monitor.ProgressMonitor mon)
                                                                    throws java.lang.Exception
load the metadata for the url. This can be called independently from getDataSet, and data sources should not assume that getDataSet is called before getMetaData. Some may, in which case a bug report should be submitted.

Parameters:
surl -
mon -
Returns:
metadata tree created by the data source.
Throws:
java.lang.Exception

getDataSet

public static org.virbo.dataset.QDataSet getDataSet(java.lang.String surl)
                                             throws java.lang.Exception
load the data specified by URL into Autoplot's internal data model. This will block until the load is complete.

Parameters:
surl -
Returns:
data set for the URL.
Throws:
java.lang.Exception - depending on data source.

list

public static java.lang.String[] list(java.lang.String surl)
                               throws java.net.MalformedURLException,
                                      java.io.IOException
returns a list of the files in the local or remote filesystem pointed to by surl. print list( 'http://www.papco.org/data/de/eics/*' ) --> '81355_eics_de_96s_v01.cdf', '81356_eics_de_96s_v01.cdf', '81357_eics_de_96s_v01.cdf', ...

Parameters:
surl -
Returns:
Throws:
java.net.MalformedURLException
java.io.IOException