This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public String getSeeburgerVariable(String variableName, Container container) throws StreamTransformationException{ | |
AbstractTrace trace; | |
trace = container.getTrace(); | |
String variableValue = ""; | |
try | |
{ | |
VariableBean be=VariableFactory.getVariableInstance(""); | |
variableValue = be.getStringVariable(variableName); | |
if ( variableValue!= null) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public String getStreamTransformationConstant(Container container) throws StreamTransformationException{ | |
GlobalContainer globalContainer; | |
MappingTrace trace; | |
String headerField; | |
java.util.Map map; | |
trace = container.getTrace(); | |
globalContainer = container.getGlobalContainer(); | |
map = globalContainer.getTransformationParameters(); | |
headerField = (String) map.get( StreamTransformationConstants.INTERFACE_NAMESPACE ); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public void splitValue(String FieldValue, String SplitterChar, ResultList result, Container container) throws StreamTransformationException{ | |
try{ | |
//Split the string value based on the splitterchar | |
String [ ] strArray = FieldValue.split(SplitterChar); | |
int istrArray = strArray.length; | |
for (int i=0; i < istrArray; i++){ | |
result.addValue(strArray[i]); | |
} | |
}catch(Exception ee){ | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public void makeArray5(String[] a, String[] b, String[] c, String[] d, String[] e, ResultList result, Container container) throws StreamTransformationException{ | |
String[] str = new String[5]; | |
try{ | |
str[0] = a[0].trim(); | |
str[1] = b[0].trim(); | |
str[2] = c[0].trim(); | |
str[3] = d[0].trim(); | |
str[4] = e[0].trim(); | |
for (int i = 0; i < 10; i++) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public String hasLike(String FieldValue, String searchValue, Container container) throws StreamTransformationException{ | |
String newFieldValue = "not found"; | |
try{ | |
//Find the index value of the searchvalue | |
int index = FieldValue.indexOf(searchValue); | |
if(index >= 0){ //if found | |
newFieldValue = "found"; | |
} | |
}catch(Exception ee){ | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public String subStrings(String FieldValue, String startPos, String endPos, Container container) throws StreamTransformationException{ | |
String newFieldValue = ""; | |
try{ | |
int istartPos = Integer.parseInt(startPos); | |
int iendPos = Integer.parseInt(endPos); | |
if( startPos.equals("-1") ){ //startPos value is passed as -1 then substring from 0 till the endPos value | |
newFieldValue = FieldValue.substring(0,iendPos); | |
}else if ( endPos.equals("-1") ){ //endPos value is passed as -1 then substring from startPos till end | |
newFieldValue = FieldValue.substring(istartPos); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public String removeLeadingZero(String FieldValue, Container container) throws StreamTransformationException{ | |
String newFieldValue = ""; | |
try{ | |
//Find 0 from starting and replace it with nothing | |
newFieldValue = FieldValue.replaceFirst("^0+", ""); | |
}catch(Exception ee){ | |
newFieldValue = FieldValue; | |
} | |
return newFieldValue; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public String addLeadingZero(String FieldValue, String Zeros, Container container) throws StreamTransformationException{ | |
String newFieldValue = ""; | |
String newZeros = "0"; | |
try{ | |
//Convert Zero to int iZeros | |
int iZeros = Integer.parseInt(Zeros); | |
//Check how Zeros to add | |
iZeros = iZeros-FieldValue.length(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public String getInstanceUDF(Container container) throws StreamTransformationException{ | |
GlobalContainer globalContainer; | |
MappingTrace trace; | |
String headerField; | |
java.util.Map map; | |
trace = container.getTrace(); | |
globalContainer = container.getGlobalContainer(); | |
map = globalContainer.getTransformationParameters(); | |
headerField = (String) map.get( StreamTransformationConstants.INTERFACE_NAMESPACE ); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public String setGlobalParameter(String Parameter, String ParameterValue, Container container) throws StreamTransformationException{ | |
try{ | |
GlobalContainer gc = container.getGlobalContainer(); | |
gc.setParameter(Parameter, ParameterValue); | |
}catch(Exception ee){ | |
} | |
return ParameterValue; | |
} |