Package gorsat.process
Class GorJavaUtilities
java.lang.Object
gorsat.process.GorJavaUtilities
public class GorJavaUtilities
extends java.lang.Object
Created by sigmar on 21/12/15.
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classGorJavaUtilities.CmdParamsstatic classGorJavaUtilities.PRPRPRValuestatic classGorJavaUtilities.PRPRValuestatic classGorJavaUtilities.VCFValue -
Field Summary
Fields Modifier and Type Field Description static java.text.DecimalFormatfd3static double[]pArraystatic java.lang.String[]prArraystatic GorJavaUtilities.PRPRValueprprFunctionstatic GorJavaUtilities.PRPRPRValueprprprFunction -
Constructor Summary
Constructors Constructor Description GorJavaUtilities() -
Method Summary
Modifier and Type Method Description static java.lang.StringcreateMapString(java.util.Map<java.lang.String,java.lang.String> createMap)static org.gorpipe.model.gor.iterators.RowSourcegetDbIteratorSource(java.lang.String sqlQuery, boolean gortable, java.lang.String source, boolean scoping)static java.util.Optional<java.lang.String>getIgnoreCase(java.util.Collection<java.lang.String> c, java.lang.String str)static java.lang.String[]mergeArrays(java.lang.String[] array1, java.lang.String[] array2)static java.lang.StringprojectDataReplacement(java.lang.String projectRoot, java.lang.String myCommand)static java.lang.StringprojectReplacement(java.lang.String myCommand, java.lang.String projectRoot, java.lang.String requestId, java.lang.String securityContext)static java.lang.StringprojectReplacement(java.lang.String myCommand, org.gorpipe.gor.session.GorSession session)static java.util.Map<java.lang.String,GorJavaUtilities.CmdParams>readWhiteList(java.lang.String cmdConfigFile)static java.util.Map<java.lang.String,GorJavaUtilities.CmdParams>readWhiteList(java.nio.file.Path cmdConfigPath)static java.nio.file.PathresolveWhiteListFilePath(java.lang.String whiteListFile, java.nio.file.Path projectRoot)Helper method to resolve whitelist file path (from config file) to full path.static java.lang.StringseekReplacement(java.lang.String myCommand, java.lang.String chr, int start, int stop)static java.util.List<org.gorpipe.gor.model.Row>stream2RowList(java.util.stream.Stream<org.gorpipe.gor.model.Row> str)static java.lang.String[]toUppercase(java.util.Collection<java.lang.String> c)static java.util.stream.Stream<java.lang.String>wrapObjectArrayIterator(java.util.Iterator<java.lang.Object[]> iterator)Helper method for wrapping Object[] iterator to Stream.
-
Field Details
-
fd3
public static java.text.DecimalFormat fd3 -
pArray
public static double[] pArray -
prArray
public static java.lang.String[] prArray -
prprFunction
-
prprprFunction
-
-
Constructor Details
-
GorJavaUtilities
public GorJavaUtilities()
-
-
Method Details
-
createMapString
public static java.lang.String createMapString(java.util.Map<java.lang.String,java.lang.String> createMap) -
stream2RowList
public static java.util.List<org.gorpipe.gor.model.Row> stream2RowList(java.util.stream.Stream<org.gorpipe.gor.model.Row> str) -
seekReplacement
public static java.lang.String seekReplacement(java.lang.String myCommand, java.lang.String chr, int start, int stop) -
projectReplacement
public static java.lang.String projectReplacement(java.lang.String myCommand, org.gorpipe.gor.session.GorSession session) throws java.io.IOException- Throws:
java.io.IOException
-
projectReplacement
public static java.lang.String projectReplacement(java.lang.String myCommand, java.lang.String projectRoot, java.lang.String requestId, java.lang.String securityContext) throws java.io.IOException- Throws:
java.io.IOException
-
projectDataReplacement
public static java.lang.String projectDataReplacement(java.lang.String projectRoot, java.lang.String myCommand) throws java.io.IOException- Throws:
java.io.IOException
-
getDbIteratorSource
public static org.gorpipe.model.gor.iterators.RowSource getDbIteratorSource(java.lang.String sqlQuery, boolean gortable, java.lang.String source, boolean scoping) -
wrapObjectArrayIterator
public static java.util.stream.Stream<java.lang.String> wrapObjectArrayIterator(java.util.Iterator<java.lang.Object[]> iterator)Helper method for wrapping Object[] iterator to Stream.- Parameters:
iterator-- Returns:
- Stream where iterator elements are represented as string joined with tab delimiter
-
readWhiteList
public static java.util.Map<java.lang.String,GorJavaUtilities.CmdParams> readWhiteList(java.nio.file.Path cmdConfigPath) -
readWhiteList
public static java.util.Map<java.lang.String,GorJavaUtilities.CmdParams> readWhiteList(java.lang.String cmdConfigFile) throws java.io.IOException- Throws:
java.io.IOException
-
resolveWhiteListFilePath
public static java.nio.file.Path resolveWhiteListFilePath(java.lang.String whiteListFile, java.nio.file.Path projectRoot)Helper method to resolve whitelist file path (from config file) to full path.If whitelist path is resolved as follows: 1. If input is absolute or empty then it is returned. 2. Search relative for the project directory. 3. If nothing is found we return the input.
- Parameters:
whiteListFile- white list file path, can not be null or emtpy.projectRoot- project root for the current project.- Returns:
- fully resolved path to the whitelist file.
-
getIgnoreCase
public static java.util.Optional<java.lang.String> getIgnoreCase(java.util.Collection<java.lang.String> c, java.lang.String str) -
toUppercase
public static java.lang.String[] toUppercase(java.util.Collection<java.lang.String> c) -
mergeArrays
public static java.lang.String[] mergeArrays(java.lang.String[] array1, java.lang.String[] array2)
-