org.eclipse.datatools.enablement.oda.xml.ui.utils
Class XMLRelationInfoUtil

java.lang.Object
  extended by org.eclipse.datatools.enablement.oda.xml.ui.utils.XMLRelationInfoUtil

public class XMLRelationInfoUtil
extends java.lang.Object

The utility class to get relation info and process relation info


Constructor Summary
XMLRelationInfoUtil()
           
 
Method Summary
static java.lang.String concatRelationInfo(java.lang.String originalStr, java.lang.String newInfo)
          connect the relationInfo with special regular expression "#-#"
static java.lang.String getTableName(java.lang.String queryText)
          get table name from query text
static java.lang.String getTableRelationInfo(java.lang.String info, java.lang.String tableName)
          get the relation info of table
static java.lang.String getUniqueName(java.lang.String info)
          generate a unique table name for the query
static java.lang.String getXPathExpression(java.lang.String queryText, java.lang.String tableName)
           
static java.lang.String replaceInfo(java.lang.String tableName, java.lang.String newString, java.lang.String relationInformation)
          replace the table's relation information with new string
static java.lang.String replaceXpathExpression(java.lang.String tableName, java.lang.String relationInfo, java.lang.String xPath)
          change the xpath expression in relationInfo, if the xpath changed
static void setSystemHelp(org.eclipse.swt.widgets.Control control, java.lang.String contextId)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

XMLRelationInfoUtil

public XMLRelationInfoUtil()
Method Detail

concatRelationInfo

public static java.lang.String concatRelationInfo(java.lang.String originalStr,
                                                  java.lang.String newInfo)
connect the relationInfo with special regular expression "#-#"

Parameters:
originalStr -
newInfo -
Returns:

getTableRelationInfo

public static java.lang.String getTableRelationInfo(java.lang.String info,
                                                    java.lang.String tableName)
get the relation info of table

Parameters:
info -
tableName -
Returns:

getUniqueName

public static final java.lang.String getUniqueName(java.lang.String info)
generate a unique table name for the query

Parameters:
info -
Returns:

replaceInfo

public static java.lang.String replaceInfo(java.lang.String tableName,
                                           java.lang.String newString,
                                           java.lang.String relationInformation)
replace the table's relation information with new string

Parameters:
tableName -
newString -
relationInformation -
Returns:

replaceXpathExpression

public static java.lang.String replaceXpathExpression(java.lang.String tableName,
                                                      java.lang.String relationInfo,
                                                      java.lang.String xPath)
change the xpath expression in relationInfo, if the xpath changed

Parameters:
tableName -
relationInfo -
Returns:

getTableName

public static java.lang.String getTableName(java.lang.String queryText)
get table name from query text

Parameters:
queryText -
Returns:

getXPathExpression

public static java.lang.String getXPathExpression(java.lang.String queryText,
                                                  java.lang.String tableName)

setSystemHelp

public static void setSystemHelp(org.eclipse.swt.widgets.Control control,
                                 java.lang.String contextId)
Parameters:
control -
contextId -