org.galagosearch.tupleflow.execution
Class Verification

java.lang.Object
  extended by org.galagosearch.tupleflow.execution.Verification

public class Verification
extends java.lang.Object

Author:
trevor

Constructor Summary
Verification()
           
 
Method Summary
static boolean compatibleOrders(java.lang.String[] currentOrder, java.lang.String[] requiredOrder)
          Tests to see if two object orders are compatible.
static boolean isClassAvailable(java.lang.String name)
           
static boolean isOrderAvailable(java.lang.String typeName, java.lang.String[] orderSpec)
           
static boolean requireClass(java.lang.String typeName, ErrorHandler handler)
           
static boolean requireOrder(java.lang.String typeName, java.lang.String[] orderSpec, ErrorHandler handler)
           
static boolean requireParameters(java.lang.String[] required, Parameters parameters, ErrorHandler handler)
           
static boolean requireWriteableDirectory(java.lang.String pathname, ErrorHandler handler)
           
static boolean requireWriteableDirectoryParent(java.lang.String pathname, ErrorHandler handler)
          If pathname exists, returns true.
static boolean requireWriteableFile(java.lang.String pathname, ErrorHandler handler)
           
static void verify(Job job, ErrorStore store)
           
static void verify(Stage stage, ErrorStore store)
           
static void verify(org.galagosearch.tupleflow.execution.Verification.TypeState state, Stage stage, java.util.ArrayList<Step> steps, ErrorStore store)
           
static boolean verifyTypeReader(java.lang.String readerName, java.lang.Class typeClass, java.lang.String[] order, TupleFlowParameters parameters, ErrorHandler handler)
           
static boolean verifyTypeReader(java.lang.String readerName, java.lang.Class typeClass, TupleFlowParameters parameters, ErrorHandler handler)
           
static boolean verifyTypeWriter(java.lang.String readerName, java.lang.Class typeClass, java.lang.String[] order, TupleFlowParameters parameters, ErrorHandler handler)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Verification

public Verification()
Method Detail

compatibleOrders

public static boolean compatibleOrders(java.lang.String[] currentOrder,
                                       java.lang.String[] requiredOrder)
Tests to see if two object orders are compatible. By compatible, we mean that a list of objects in outputOrder is also in inputOrder. This is true if the orders are identical, but also if inputOrder is more permissive than outputOrder. For instance, suppose we are sorting a list of people's names. People typically have a surname (last name) and a given name (first name). In Galago notation, consider these two orders you could use: +surname +surname +givenName If a list is ordered by (+surname +givenName), then it is also ordered by +surname. The reverse isn't true, though: if you order by +surname, you haven't necessarily ordered by (+surname +givenName). Therefore: compatibleOrders({ "+surname" }, { "+surname", "+givenName" }) == false compatibleOrders({ "+surname", "+givenName" }, { "+surname" }) == true

Parameters:
currentOrder - The current order of the data that is supplied.
requiredOrder - The required order of the data.

requireParameters

public static boolean requireParameters(java.lang.String[] required,
                                        Parameters parameters,
                                        ErrorHandler handler)

isOrderAvailable

public static boolean isOrderAvailable(java.lang.String typeName,
                                       java.lang.String[] orderSpec)

isClassAvailable

public static boolean isClassAvailable(java.lang.String name)

requireOrder

public static boolean requireOrder(java.lang.String typeName,
                                   java.lang.String[] orderSpec,
                                   ErrorHandler handler)

requireClass

public static boolean requireClass(java.lang.String typeName,
                                   ErrorHandler handler)

requireWriteableFile

public static boolean requireWriteableFile(java.lang.String pathname,
                                           ErrorHandler handler)

requireWriteableDirectory

public static boolean requireWriteableDirectory(java.lang.String pathname,
                                                ErrorHandler handler)

requireWriteableDirectoryParent

public static boolean requireWriteableDirectoryParent(java.lang.String pathname,
                                                      ErrorHandler handler)

If pathname exists, returns true. If pathname doesn't exist, checks to see if it's possible for this process to create something called pathname.

This method returns false if the closest existing parent directory of pathname is not writeable (or isn't a directory)

For example, if filename is /a/b/c/d/e/f, this method will return true if:


verify

public static void verify(org.galagosearch.tupleflow.execution.Verification.TypeState state,
                          Stage stage,
                          java.util.ArrayList<Step> steps,
                          ErrorStore store)

verify

public static void verify(Stage stage,
                          ErrorStore store)

verify

public static void verify(Job job,
                          ErrorStore store)

verifyTypeReader

public static boolean verifyTypeReader(java.lang.String readerName,
                                       java.lang.Class typeClass,
                                       TupleFlowParameters parameters,
                                       ErrorHandler handler)

verifyTypeReader

public static boolean verifyTypeReader(java.lang.String readerName,
                                       java.lang.Class typeClass,
                                       java.lang.String[] order,
                                       TupleFlowParameters parameters,
                                       ErrorHandler handler)

verifyTypeWriter

public static boolean verifyTypeWriter(java.lang.String readerName,
                                       java.lang.Class typeClass,
                                       java.lang.String[] order,
                                       TupleFlowParameters parameters,
                                       ErrorHandler handler)


Copyright © 2009. All Rights Reserved.