|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectau.csiro.netcdf.NcDefineAttributes
public class NcDefineAttributes
The ncdefineAtt command defines global or variable Attribute
s in a netCDF file.
Copyright 2010, CSIRO Australia All rights reserved.
Field Summary | |
---|---|
static String |
ATTRIBUTE_DATA_TYPE
The name of the command line option used for specifying the data type of the attribute. |
static String |
ATTRIBUTES
The name of the command line option used for specifying the attributes of a netCDF file. |
static String |
FILENAME_PATTERN
The pattern for accepted file names where multiple files are accepted. |
static String |
INPUT_FILE
The name of the command line option used for specifying the input text file name. |
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_ATT_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_NAME
The name of the command line option used for specifying the name of the variable receiving the attributes. |
Fields inherited from interface au.csiro.netcdf.cli.Command |
---|
MAX_32BIT_OFFSET_FILE_SIZE, PRINT_WIDTH |
Constructor Summary | |
---|---|
NcDefineAttributes()
Constructor |
Method Summary | |
---|---|
org.apache.commons.cli.Options |
createOptions()
Create the command line options for this command. |
void |
execute(String[] args)
Run the command. |
void |
execute(String outputFilename,
List<Attribute> attributes,
boolean isLargeFileSupport)
Allows the command to be run programmatically, instead of from a command line. |
void |
execute(String outputFilename,
List<Attribute> attributes,
boolean isLargeFileSupport,
String variableName)
Allows the command to be run programmatically, instead of from a command line. |
String |
getCommandName()
|
String |
getUsageString()
|
static DataType |
mapStringToDataType(String variableDataType)
Maps a String into a DataType . |
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_ATT_COMMAND_NAME
public static final String OUTPUT_FILE
public static final String INPUT_FILE
public static final String ATTRIBUTES
public static final String VARIABLE_NAME
public static final String IS_LARGE_FILE
public static final String FILENAME_PATTERN
public static final String ATTRIBUTE_DATA_TYPE
Constructor Detail |
---|
public NcDefineAttributes()
Method Detail |
---|
public void execute(String[] args) throws org.apache.commons.cli.ParseException, IOException, IllegalArgumentException
Command
execute
in interface Command
args
- command line arguments.
org.apache.commons.cli.ParseException
- thrown if the command line arguments can not be parsed.
IOException
- thrown if netCDF can to be written to or read from.
IllegalArgumentException
public void execute(String outputFilename, List<Attribute> attributes, boolean isLargeFileSupport) throws IOException, SecurityException
outputFilename
- the netCDF file in which to define a dimension.attributes
- a attributes of the file.isLargeFileSupport
- whether the netCDF file should be written with large file support, i.e. 64-bit addressing for files
greater than 2 GB.
IOException
- thrown if netCDF can to be written to or read from.
SecurityException
- thrown if a security manager exists and it prevents the netCDF file from being created.public void execute(String outputFilename, List<Attribute> attributes, boolean isLargeFileSupport, String variableName) throws IOException, SecurityException
outputFilename
- the netCDF file in which to define a dimension.attributes
- a attributes of the file.isLargeFileSupport
- whether the netCDF file should be written with large file support, i.e. 64-bit addressing for files
greater than 2 GB.variableName
- the variable name to assign attributes to
IOException
- thrown if netCDF can to be written to or read from.
SecurityException
- thrown if a security manager exists and it prevents the netCDF file from being created.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)
validCommand
in interface Command
commandLine
- command line arguments.
public static DataType mapStringToDataType(String variableDataType) throws IllegalArgumentException
String
into a DataType
.
variableDataType
- a data type description.
DataType
IllegalArgumentException
- thrown if the String
can not be mapped to a DataType
.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |