pops.ale.epc.spec
Class ECFieldSpec

java.lang.Object
  extended by pops.ale.epc.spec.ECFieldSpec

public class ECFieldSpec
extends java.lang.Object

An ECFieldSpec encodes a fieldspec. Reminder of the TAG memory map :


Note : The ECFieldSpec type is used in many places within the ALE Reading API and ALE Writing API.

Author:
pops, R.DAGHER

Constructor Summary
ECFieldSpec(java.lang.String fieldname, java.lang.String datatype, java.lang.String format)
          Constructor
 
Method Summary
static int decodeBank(ECFieldSpec fieldSpec)
           
static int decodeLength(ECFieldSpec fieldSpec)
           
static int decodeOffset(ECFieldSpec fieldSpec)
           
 java.lang.String getDatatype()
          Getter for datatype
 java.lang.String getFieldname()
          Getter for fieldname
 java.lang.String getFormat()
          Getter for format
static boolean isAbsoluteAddress(java.lang.String fieldname)
          Test if the given String is conform to the following syntax : '@bank.length[.offset]'
static void main(java.lang.String[] args)
           
static void validateSpec(ECFieldSpec fieldSpec)
          Validate spec fields according to implementation
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ECFieldSpec

public ECFieldSpec(java.lang.String fieldname,
                   java.lang.String datatype,
                   java.lang.String format)
            throws ECSpecValidationException
Constructor

Parameters:
fieldname -
datatype -
format -
Throws:
ECSpecValidationException - if invalid or unsupported parameters
Method Detail

validateSpec

public static void validateSpec(ECFieldSpec fieldSpec)
                         throws ECSpecValidationException
Validate spec fields according to implementation

Parameters:
fieldSpec - ECFieldSpec object to verify
Throws:
ECSpecValidationException - : if Invalid or Unsupported

isAbsoluteAddress

public static boolean isAbsoluteAddress(java.lang.String fieldname)
Test if the given String is conform to the following syntax : '@bank.length[.offset]'

Parameters:
fieldname - the field name string
Returns:
true if the syntax is respected, false otherwise

decodeBank

public static int decodeBank(ECFieldSpec fieldSpec)
Parameters:
fieldSpec -
Returns:

decodeLength

public static int decodeLength(ECFieldSpec fieldSpec)
Parameters:
fieldSpec -
Returns:

decodeOffset

public static int decodeOffset(ECFieldSpec fieldSpec)
Parameters:
fieldSpec -
Returns:

getFieldname

public java.lang.String getFieldname()
Getter for fieldname

Returns:
the fieldname

getDatatype

public java.lang.String getDatatype()
Getter for datatype

Returns:
the datatype

getFormat

public java.lang.String getFormat()
Getter for format

Returns:
the format

main

public static void main(java.lang.String[] args)
                 throws java.lang.Exception
Throws:
java.lang.Exception