cds.simbad.ident
Class VarE

java.lang.Object
  extended bycds.simbad.ident.Instruction
      extended bycds.simbad.ident.VarE
All Implemented Interfaces:
java.io.Serializable

public class VarE
extends Instruction

Instruction defining a variable letter (R,S,..RR,RS,...)

Version:
1.0 Jan 2004
Author:
Marc Wenger
See Also:
Serialized Form

Field Summary
(package private)  java.lang.String varChars
           
 
Fields inherited from class cds.simbad.ident.Instruction
ALIG_LEFT, ALIG_RIGHT, alignment, BINARY, binPos, BLANC_RE, CARMAX, CAT, catName, CH, CONST, DE, DECIMAL, DECIMALES, DEFAULT_BINARY, DEFAULT_DECIMAL, DEFAULT_DELIMITOR, DEFAULT_FILLER, DEFAULT_MIN, DEFAULT_OPTIONAL, DELIMITOR, FACULTATIF, filler, FORMAT, IND, instrNames, INT, isBinary, JUSTIFICATION, LET, LGQ, LIST, LONGUEUR, MAJ, MAX_DEFAULT_CARMAX, MAXIMUM, MIN, MIN_DEFAULT_CARMAX, MINIMUM, NO_ALIGNMENT, NO_BIN_POS, NO_FILLER, NOM, optional, PARAM_FINISHED, paramNames, PGM, PLUS, POSITION, RA, regexGen, ROM, SPACE, SPACES_RE, STRICT, TAB, TEXT, TEXTE, UINT, valuelim, VAR, VAR_LENGTH, vec_format_car, ZONE
 
Constructor Summary
VarE(java.lang.String params)
          Constructor
 
Method Summary
private  byte getVarcharCode(char c)
          Compute the binary value of a variable char.
 boolean normalize(java.lang.String str, java.lang.StringBuffer norm)
          Normalization of the field
 byte[] toBin()
          Returns the binary form of the parameter received in input
 java.lang.String toRE()
          Returns the regular expression used to analyse this field
 java.lang.String toString()
          Returns a string display of the whole instruction
 
Methods inherited from class cds.simbad.ident.Instruction
align, appendBinary, appendCarmax, appendCarmax, appendClose, appendDecimal, appendDelimitor, appendFormat, appendJustification, appendLength, appendList, appendMaximum, appendMinimum, appendMinimum, appendName, appendNom, appendOptional, appendPlus, appendPosition, appendStrict, appendText, displayError, equals, extractParams, format2dbl, format2RE, getBinaryPosition, getCatName, getInstrCode, getInstrName, getInteger, getLong, getNextParam, getRegexGen, isBinary, isOptional, isREKeyword, isREKeyword, normalize, optional, setBinary, setJustification, setRegexGen, toByteArray
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

varChars

java.lang.String varChars
Constructor Detail

VarE

public VarE(java.lang.String params)
     throws IdentifierDescriptionException
Constructor

Parameters:
params - parameter list string
Throws:
IdentifierDescriptionException
Method Detail

toString

public java.lang.String toString()
Returns a string display of the whole instruction

Overrides:
toString in class Instruction
Returns:
the instruction in the form of a string

toRE

public java.lang.String toRE()
Returns the regular expression used to analyse this field

Overrides:
toRE in class Instruction
Returns:
the regular expression string

normalize

public boolean normalize(java.lang.String str,
                         java.lang.StringBuffer norm)
Normalization of the field

Overrides:
normalize in class Instruction
Parameters:
str - string to normalize
norm - stringbuffer to complete with the normalized string
Returns:
true or false whether the normalization succeeded or not

getVarcharCode

private byte getVarcharCode(char c)
Compute the binary value of a variable char. R = 1, Z=9, A=10, .., Q=26 !!
The character is supposed to be in uppercase at this level

Parameters:
c - char to code
Returns:
the var character value

toBin

public byte[] toBin()
Returns the binary form of the parameter received in input

Overrides:
toBin in class Instruction
Returns:
the uppercase letters in binary format (variable number of bytes)