|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object au.csiro.netcdf.NcDefineVariable
public class NcDefineVariable
The ncdefineVar command defines a Variable
object in a netCDF file.
Copyright 2010, CSIRO Australia All rights reserved.
Field Summary | |
---|---|
static String |
DIMENSION_NAMES
The name of the command line option used for specifying the dimensions of the variable. |
static String |
INPUT_FILE
The name of the command line option used for specifying the input text file name. |
static String |
IS_FILL_VARIABLE
Ensure that any variable value not written will have the fill value, otherwise those values will be undefined: possibly zero, or possibly garbage. |
static String |
IS_LARGE_FILE
Whether the netCDF file should be written with large file support, that is, 64-bit addressing for files greater than 2 GB. |
static String |
NC_DEFINE_VAR_COMMAND_NAME
The command name |
static String |
OUTPUT_FILE
The name of the command line option used for specifying the output netCDF file name. |
static String |
VARIABLE_ATTRIBUTES
The name of the command line option used for specifying the attributes of the variable. |
static String |
VARIABLE_DATA_TYPE
The name of the command line option used for specifying the data type of the variable. |
static String |
VARIABLE_NAME
The name of the command line option used for specifying the name of the variable. |
Fields inherited from interface au.csiro.netcdf.cli.Command |
---|
MAX_32BIT_OFFSET_FILE_SIZE, PRINT_WIDTH |
Constructor Summary | |
---|---|
NcDefineVariable()
Constructor |
Method Summary | |
---|---|
org.apache.commons.cli.Options |
createOptions()
Create the command line options for this command. |
void |
execute(File outputFilename,
String variableName,
DataType variableDataType,
List<Attribute> variableAttributes,
String dimensionNamesString,
boolean isLargeFileSupport,
boolean isFillVariable)
Allows the command to be run programmatically, instead of from a command line. |
void |
execute(String[] args)
Run the command. |
String |
getCommandName()
|
static Set<DataType> |
getNetCDF3DataTypes()
|
String |
getUsageString()
|
static void |
setNetCDF3DataTypes(Set<DataType> netCDF3DataTypes)
|
String |
toString()
|
String |
validCommand(String[] commandLine)
Determine if this command is valid, check its syntax. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final String NC_DEFINE_VAR_COMMAND_NAME
public static final String OUTPUT_FILE
public static final String INPUT_FILE
public static final String VARIABLE_NAME
public static final String VARIABLE_DATA_TYPE
public static final String VARIABLE_ATTRIBUTES
public static final String DIMENSION_NAMES
public static final String IS_LARGE_FILE
public static final String IS_FILL_VARIABLE
Constructor Detail |
---|
public NcDefineVariable()
Method Detail |
---|
public void execute(String[] args) throws IllegalArgumentException, IOException, org.apache.commons.cli.ParseException
Command
execute
in interface Command
args
- command line arguments.
IOException
- thrown if netCDF can to be written to or read from.
org.apache.commons.cli.ParseException
- thrown if the command line arguments can not be parsed.
IllegalArgumentException
public void execute(File outputFilename, String variableName, DataType variableDataType, List<Attribute> variableAttributes, String dimensionNamesString, boolean isLargeFileSupport, boolean isFillVariable) throws IOException
outputFilename
- the netCDF file in which to define a dimension.variableName
- the name of the variable, this value will be used to reference the dimension.variableDataType
- the data type of the variable.variableAttributes
- a attributes of the variable.dimensionNamesString
- a whitespace separated list of dimension names, or '*' for Dimension.UNKNOWN. A null or empty
String is a scalar.isLargeFileSupport
- whether the netCDF file should be written with large file support, i.e. 64-bit addressing for files
greater than 2 GB.isFillVariable
- whether unwritten variable values should have the fill value.
IOException
- thrown if netCDF can not be written to or read from.public String getCommandName()
getCommandName
in interface Command
public String toString()
toString
in class Object
public org.apache.commons.cli.Options createOptions()
Command
createOptions
in interface Command
public String getUsageString()
getUsageString
in interface Command
public String validCommand(String[] commandLine)
Command
validCommand
in interface Command
commandLine
- command line arguments.
public static Set<DataType> getNetCDF3DataTypes()
public static void setNetCDF3DataTypes(Set<DataType> netCDF3DataTypes)
netCDF3DataTypes
- the netCDF3DataTypes to set
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |