| 
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectorg.syrup.helpers.Utils
Utility functions to aid the testing of Syrup objects.
| Constructor Summary | |
Utils()
 | 
|
| Method Summary | |
static java.lang.String | 
asDate(long t)
Utility function that maps a timestamp to a formatted date.  | 
static boolean | 
isDone(boolean in1_done,
       boolean in2_done,
       boolean out1_done,
       boolean out2_done,
       boolean in1_full,
       boolean in2_full,
       boolean out1_full,
       boolean out2_full,
       boolean orType,
       boolean outer_world)
Returns true if a Task is done based on type and if its inputs are also done.  | 
static boolean | 
isExecutable(boolean firstInFull,
             boolean secondInFull,
             boolean firstOutFull,
             boolean secondOutFull,
             boolean orType,
             boolean isDone)
Returns true if a Task is executable based on type and whether its inputs are filled and all its outputs are empty.  | 
static boolean | 
isFull(Link l)
Returns true if the Link has content.  | 
static Data | 
manageError(java.util.logging.Logger logger,
            java.lang.Throwable error,
            java.lang.String msg)
 | 
static long | 
parseDate(java.lang.String str)
Utility function that parses a formatted date to a timestamp.  | 
static void | 
validate(Workflow workflow)
Validates the Workflow.  | 
| Methods inherited from class java.lang.Object | 
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait | 
| Constructor Detail | 
public Utils()
| Method Detail | 
public static final boolean isFull(Link l)
l - The Link that is tested.
public static final void validate(Workflow workflow)
                           throws java.lang.Exception
workflow - the Workflow to be validated.
Execption - the invalid part of the Workflow
java.lang.Exception
public static final boolean isDone(boolean in1_done,
                                   boolean in2_done,
                                   boolean out1_done,
                                   boolean out2_done,
                                   boolean in1_full,
                                   boolean in2_full,
                                   boolean out1_full,
                                   boolean out2_full,
                                   boolean orType,
                                   boolean outer_world)
in1_done - true if the first input is done.in2_done - true if the second input is done.out1_done - true if the first output is done.out2_done - true if the second output is done.orType - true if the Task is of type OR.outer_world - true if the Task represents the outer world.
public static final boolean isExecutable(boolean firstInFull,
                                         boolean secondInFull,
                                         boolean firstOutFull,
                                         boolean secondOutFull,
                                         boolean orType,
                                         boolean isDone)
firstInFull - true if the first input is full.secondInFull - true if the second input is full.firstOutFull - true if the first output is full.secondOutFull - true if the second output is full.orType - true if the Task is of type OR.isDone - true if the Task is done.
public static Data manageError(java.util.logging.Logger logger,
                               java.lang.Throwable error,
                               java.lang.String msg)
public static final java.lang.String asDate(long t)
t - The timestamp to be formatted.
public static final long parseDate(java.lang.String str)
                            throws java.lang.Exception
str - The date to be parsed.
java.lang.Exception
  | 
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||