NXM Help QUALIFIERS

From ICE Enterprises
Jump to navigation Jump to search
Go to the full list of NXM Help pages.

QUALIFIERS - File qualifiers in NeXtMidas use curly braces, {}; trimmers use parentheses,

File qualifiers in NeXtMidas use curly braces, {}; trimmers use parentheses, (). Qualifiers are filename modifiers that change the normal interpretation of the file. They provide for specific value indexing, or other tuning parameters.

(N:M) - Trimmer, see help on trimmers
AUX   - Aux specifier (overrides normal aux disk search paths)
CFL   - Circular File Length
EXIST - URL existence check mask
FS    - Set the frame size in elements, 0=Type 1000
FG    - Force file group (do not guess from extension)
TAG   - Set the ID (or tag) of a file
FLAGS - Optional flags mask

When file qualifiers are masks, the also have the additional options: ALL - for all options (-1) NONE - none of the options (0) DEF - the default option (case dependent)

Tests can be combined by combining the strings with a '|' separator. For example: 'EXIST=CGI|STATUS' will apply CGI and STATUS tests for the exist qualifier.

File qualifiers are order independent although it is more readable to put file trimmers directly after the filename.

nM> noop fftdemo(N:M){AUX=DAT} outfile

Multiple file qualifiers may used together as follows:

nM> noop http://localhost:9000/fftdemo{EXISTS=NONE,AUX=DAT,FS=0} outfile{AUX=HOME,FLAGS=NATIVE}

AUX - This short-circuits the normal search through the read aux list.

This short-circuits the normal search through the read aux list. for the file only on the named aux.

nM> plot myfile{AUX=DAT}

TAG - This sets the ID of the file for plot layers.

This sets the ID of the file for plot layers.

nM> plot myfile{AUX=DAT,TAG=MYWORLD}

FLAGS - This sets optional flags to tailor the behavior of the file.

This sets optional flags to tailor the behavior of the file.

NATIVE - bypass Java I/O and use the OS's fopen,fclose,fread,fwrite calls.
APPEND - append to the named file
NOABORT - do not abort on error
FLUSH - flush the header and data after every write.
nM> noop file1 file2{flags=NATIVE|APPEND}

FS - This qualifier can be used to override the frame size of a file on-the-fly.

This qualifier can be used to override the frame size of a file on-the-fly. FS>0 causes the input file to be treated as a type 2000 file with the specified frame size. It does not change the header of the file itself. Only the in-memory copy of the header is altered. If FS=0, the input file is cast as a type 1000 file.

FG - The FG (File Group) qualifier can be used to specify the category of the file.

The FG (File Group) qualifier can be used to specify the category of the file. This is useful if one wants to force a file to be treated as something other than what its extension might indicate. For instance, a perl script which generates a Midas data file may be looked as a test file by using this qualifier equal to TXT.

If there is no file type qualifier then NeXtMidas will attempt to determine the file type from the extension. Accepted values for the FG qualifier are:

DAT - Midas data file (Type 1000, 2000,...) IMG - Image file (.tif, .gif, .png,...) TXT - Text file

For example:

nM> datalist mytextfile.tmp{fg=txt}

opens mytextfile.tmp as a textfile even though it has a Midas DataFile extension.

EXIST - The EXIST qualifier is used to tailor the existence algorithm used for a

The EXIST qualifier is used to tailor the existence algorithm used for a particular URL. The values that are accepted and how they modify the algorithm are shown below.

NONE - Turn off any explicit existence checks. URLs are assumed to exist.

CGI - Performs a check on the URL string itself to determine if the URL

points to a CGI script. If the URL string contains known patterns
then the existence is true.

LIST - An attempt is made to retrieve a directory listing of the directory

containing the URL. This listing is then examined to determine if the
named file exists. In some contexts this is a very nice way to test
for existence. The server and the directory must support server
generated listings for this to work properly.

STATUS - A HEAD request is performed on the URL and the status code of the

response is examined.  If the status code indicates success then
the URL is assumed to exist.  This has problems with CGI scripts
since the script must be executed in order for the status code to
be generated.

ALL - Use all of the tests.

TAG - The {TAG=name} qualifier may be used to set the "ID" of a file.

The {TAG=name} qualifier may be used to set the "ID" of a file. by the plot command to identify a layer.

CFL - The Circular File Length qualifier sets the length in seconds of the disk file

The Circular File Length qualifier sets the length in seconds of the disk file before wrapping back to the beginning. It behaves like a pipe but can be hours or days long.