org.kuali.common.impex.model.util
Class DifferenceUtils

java.lang.Object
  extended by org.kuali.common.impex.model.util.DifferenceUtils

public class DifferenceUtils
extends Object


Field Summary
static String CLOSE_PAD_PAREN
           
static String COMMA
           
static String DOT
           
static String FOUND_IN_LABEL
           
static String LABEL_SEPARATOR
           
static String NOT_EQUAL_SEPARATOR
           
static String NOT_FOUND_IN_LABEL
           
static String OPEN_PAD_PAREN
           
static String SPACE
           
 
Constructor Summary
DifferenceUtils()
           
 
Method Summary
static String buildDifferenceToken(String label, SchemaDifference difference)
           
static String buildMissingElementToken(String typeLabel, String foundToken, String notFoundToken)
          Build a token representing a missing schema element
static String buildSchema1Token(SchemaDifference difference)
          Build a token to label the first "side" of a schema difference.
static String buildSchema2Token(SchemaDifference difference)
          Build a token to label the second "side" of a schema difference.
static String buildTable1DifferenceToken(TableDifference t)
          Build a token to label the first "side" of a difference.
static String buildTable2DifferenceToken(TableDifference t)
          Build a token to label the second "side" of a difference.
static String buildTypeSizeToken(DataTypeSize typeSize)
           
static String parenWrapToken(String s)
          Wraps a token in space padded parenthesis
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

LABEL_SEPARATOR

public static final String LABEL_SEPARATOR
See Also:
Constant Field Values

FOUND_IN_LABEL

public static final String FOUND_IN_LABEL
See Also:
Constant Field Values

NOT_FOUND_IN_LABEL

public static final String NOT_FOUND_IN_LABEL
See Also:
Constant Field Values

DOT

public static final String DOT
See Also:
Constant Field Values

COMMA

public static final String COMMA
See Also:
Constant Field Values

SPACE

public static final String SPACE
See Also:
Constant Field Values

NOT_EQUAL_SEPARATOR

public static final String NOT_EQUAL_SEPARATOR
See Also:
Constant Field Values

OPEN_PAD_PAREN

public static final String OPEN_PAD_PAREN
See Also:
Constant Field Values

CLOSE_PAD_PAREN

public static final String CLOSE_PAD_PAREN
See Also:
Constant Field Values
Constructor Detail

DifferenceUtils

public DifferenceUtils()
Method Detail

buildDifferenceToken

public static String buildDifferenceToken(String label,
                                          SchemaDifference difference)

buildTable1DifferenceToken

public static String buildTable1DifferenceToken(TableDifference t)
Build a token to label the first "side" of a difference. This method will append applicable labels from instances of subclasses of TableDifference as well.

Parameters:
t - the TableDifference containing table data
Returns:
a String representation of the first side of the given table data

buildSchema1Token

public static String buildSchema1Token(SchemaDifference difference)
Build a token to label the first "side" of a schema difference.

Parameters:
difference - the SchemaDifference containing difference data
Returns:
a String representation of the first side of the given difference data

buildSchema2Token

public static String buildSchema2Token(SchemaDifference difference)
Build a token to label the second "side" of a schema difference.

Parameters:
difference - the SchemaDifference containing difference data
Returns:
a String representation of the second side of the given difference data

buildTable2DifferenceToken

public static String buildTable2DifferenceToken(TableDifference t)
Build a token to label the second "side" of a difference. This method will append applicable labels from instances of subclasses of TableDifference as well.

Parameters:
t - the TableDifference containing table data
Returns:
a String representation of the second side of the given table data

buildMissingElementToken

public static String buildMissingElementToken(String typeLabel,
                                              String foundToken,
                                              String notFoundToken)
Build a token representing a missing schema element

Parameters:
typeLabel - label for the type of difference
foundToken - token labeling the found element
notFoundToken - token labeling the missing element
Returns:
a token describing with the following format; [typeLabel] : FOUND IN : [foundToken] NOT FOUND IN: [notFoundToken]

parenWrapToken

public static String parenWrapToken(String s)
Wraps a token in space padded parenthesis

Parameters:
s - input String
Returns:
the input surrounded by space-padded parentheses

buildTypeSizeToken

public static String buildTypeSizeToken(DataTypeSize typeSize)


Copyright © 2004-2013 The Kuali Foundation. All Rights Reserved.