edu.isi.pegasus.planner.catalog.transformation.client
Class TCFormatUtility

java.lang.Object
  extended by edu.isi.pegasus.planner.catalog.transformation.client.TCFormatUtility

public class TCFormatUtility
extends Object

This is a utility class for converting transformation catalog into different formats.

Version:
$Revision $
Author:
prasanth@isi.edu

Constructor Summary
TCFormatUtility()
           
 
Method Summary
private static void addLineToText(StringBuffer sb, String newIndent, String newline, String key, String value)
          Convenience method to add a line to the internal textual representation.
static void printXMLFormat(TransformationStore tStore)
          Prints the transformations in XML format
private static String quote(String str)
          Quotes a String.
private static String toText(TransformationCatalogEntry entry, String newline, String indent)
          Converts the transformation catalog entry object to the multi line textual representation.
static String toTextFormat(TransformationStore mTCStore)
          Converts the transformations into multi line text format
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TCFormatUtility

public TCFormatUtility()
Method Detail

toTextFormat

public static String toTextFormat(TransformationStore mTCStore)
Converts the transformations into multi line text format

Parameters:
mTCStore - the transformation store
Returns:
the text format

toText

private static String toText(TransformationCatalogEntry entry,
                             String newline,
                             String indent)
Converts the transformation catalog entry object to the multi line textual representation. e.g. site wind { profile env "me" "with" profile condor "more" "test" pfn "/path/to/keg" arch "x86" os "linux" osrelease "fc" osversion "4" type "STAGEABLE" }

Parameters:
entry - the transformation catalog entry
newline - the newline characters
indent - the indentation to use
Returns:
the textual description

addLineToText

private static void addLineToText(StringBuffer sb,
                                  String newIndent,
                                  String newline,
                                  String key,
                                  String value)
Convenience method to add a line to the internal textual representation.

Parameters:
sb - the StringBuffer to which contents are to be added.
newIndent - the indentation
key - the key
value - the value

quote

private static String quote(String str)
Quotes a String.

Parameters:
str - the String to be quoted.
Returns:
quoted version

printXMLFormat

public static void printXMLFormat(TransformationStore tStore)
Prints the transformations in XML format

Parameters:
tStore - the transformation store


Copyright © 2011 The University of Southern California. All Rights Reserved.