org.jcrontab.data
Class CrontabParser

java.lang.Object
  |
  +--org.jcrontab.data.CrontabParser

public class CrontabParser
extends java.lang.Object

This class parses a Line and returns CrontabEntryBean. This class + Is done to do more modular and eficient

Version:
$Revision: 1.4 $
Author:
$Author: iolalla $

Constructor Summary
CrontabParser()
           
 
Method Summary
 CrontabEntryBean marshall(java.lang.String entry)
          Parses a string describing this time table entry and sets the neded variables in order to build a CrontabEntry.
 void parseToken(java.lang.String token, boolean[] arrayBool, boolean bBeginInOne)
          Parses a token and fills the array of booleans that represents this CrontabEntryBean
 java.lang.String unmarshall(CrontabEntryBean ceb)
          Parses a string describing this time table entry
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CrontabParser

public CrontabParser()
Method Detail

marshall

public CrontabEntryBean marshall(java.lang.String entry)
                          throws CrontabEntryException
Parses a string describing this time table entry and sets the neded variables in order to build a CrontabEntry. Crontab Line usually something similar to: * * * * * org.jcrontab.jcrontab

Parameters:
entry - the line to parse
Throws:
CrontabEntryException - Error parsing the string

unmarshall

public java.lang.String unmarshall(CrontabEntryBean ceb)
                            throws CrontabEntryException
Parses a string describing this time table entry

Returns:
String describing the time table entry usuarlly something like: * * * * * org.jcrontab.jcrontab
Throws:
CrontabEntryException - Error parsing the string

parseToken

public void parseToken(java.lang.String token,
                       boolean[] arrayBool,
                       boolean bBeginInOne)
                throws CrontabEntryException
Parses a token and fills the array of booleans that represents this CrontabEntryBean

Parameters:
token - String to parser usually smth like [ * , 2-3 , 2,3,4 ,4/5 ]
arrayBool - this array is the most efficient way to compare entries
bBeginInOne - says if the array begins in 0 or in 1
Throws:
CrontabEntryException - Error parsing the string