org.iges.grads.server
Class GradsUploadModule

java.lang.Object
  |
  +--org.iges.anagram.AbstractModule
        |
        +--org.iges.grads.server.GradsUploadModule
All Implemented Interfaces:
Module

public class GradsUploadModule
extends AbstractModule

Handles an incoming dataset upload stream. The contents of the stream must be binary data in the format used for passing data to GrADS UDF functions. This module requires a utility called "udfread" (which is not currently a standard part of the GrADS package). The GDS upload interface is somewhat limited and has not fully tested or documented, so it is not yet being publicly advertised as an operational capability.


Field Summary
protected  long defaultStorage
           
protected  GradsTool tool
           
protected  java.io.File udfBinary
           
 
Fields inherited from class org.iges.anagram.AbstractModule
log, moduleName, parent, server
 
Constructor Summary
GradsUploadModule(GradsTool tool)
           
 
Method Summary
 void configure(Setting setting)
          Configures the module according to the settings provided.
 TempDataHandle doUpload(java.lang.String name, java.io.InputStream input, long size, Privilege privilege)
          Accepts an input stream, writes it to disk, and invokes the 'udfread' utility which generates a .dat and a .ctl file from a UDF input file, then creates a handle to the temporary data.
 java.lang.String getModuleID()
          Returns an ID for this module.
 
Methods inherited from class org.iges.anagram.AbstractModule
configModule, debug, debug, error, fail, fail, fail, getModuleName, info, init, toString, verbose, verbose
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

tool

protected GradsTool tool

udfBinary

protected java.io.File udfBinary

defaultStorage

protected long defaultStorage
Constructor Detail

GradsUploadModule

public GradsUploadModule(GradsTool tool)
Method Detail

getModuleID

public java.lang.String getModuleID()
Description copied from interface: Module
Returns an ID for this module. This ID should be a legal XML tag name. It has two uses: as a tag name in the server's configuration file, and as the final element of the complete module name.

Specified by:
getModuleID in interface Module
Specified by:
getModuleID in class AbstractModule

configure

public void configure(Setting setting)
               throws ConfigException
Description copied from class: AbstractModule
Configures the module according to the settings provided. The server supports dynamic reconfiguration. Thus this method may be called at any time in the life of the module. If the module cannot be reconfigured, it should throw an exception.

Specified by:
configure in interface Module
Specified by:
configure in class AbstractModule
ConfigException

doUpload

public TempDataHandle doUpload(java.lang.String name,
                               java.io.InputStream input,
                               long size,
                               Privilege privilege)
                        throws ModuleException
Accepts an input stream, writes it to disk, and invokes the 'udfread' utility which generates a .dat and a .ctl file from a UDF input file, then creates a handle to the temporary data.

ModuleException