|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.irisa.genouest.logol.utils.LogolUtils
public class LogolUtils
Field Summary | |
---|---|
static int |
predCounter
|
static int |
varCounter
Incremental counter to get unique variable identifiers. |
Constructor Summary | |
---|---|
LogolUtils()
|
Method Summary | |
---|---|
static java.lang.String |
addParent(LogolVariable lvar,
int id)
|
static void |
convert2Fasta(java.lang.String inputFile,
java.lang.String outputFile)
Convert a Logol output XML file to fasta format |
static boolean |
copyFile(java.lang.String inFile,
java.lang.String outFile)
Copy a file content to an other |
static int |
countGrammarModels(java.lang.String grammar,
java.lang.String model)
Counts the number of models required to match the sequence |
static java.util.HashSet<java.lang.String> |
getAllUsedVariables(java.lang.String predicate)
Looks for variable references to know which variables are used in a predicate |
static java.util.HashSet<java.lang.String> |
getAllUserVariables(java.lang.String predicate)
Used by pre-analysis to get variables |
static java.lang.String |
getArray(java.lang.String sequence)
Generate a string array from a terminal e.g. |
static int |
getCounter()
Get a new varCounter value |
static java.util.HashSet<java.lang.String> |
getErrorVariables(java.lang.String predicate)
Looks for variable errors to know which variables are used in a predicate |
static java.lang.String |
getPostponedPredicateVariable()
Sends a temporary variable identifier for a postponed predicate. |
static java.lang.String |
getPredicateInput(java.lang.String predicate)
Get the first Before reference to get first intput |
static java.lang.String |
getPredicateOutput(java.lang.String predicate)
Get the last After reference to get last output |
static java.lang.String |
getPredicateVariable()
Sends a temporary variable identifier for a predicate. |
static java.lang.String |
getSavedVariables(java.lang.String data,
int id,
java.lang.String model)
Gets the saved variable reference for the input data string |
static java.lang.String |
getTemporaryVariable()
Sends a temporary variable identifier. |
static boolean |
moveFile(java.lang.String inFile,
java.lang.String outFile)
Move a file to an other place or name |
static Expression |
percent2int(java.lang.String motif,
java.lang.String percent)
Compute a percentage calculation on motif to get a size |
static void |
sendMail(java.util.Properties props,
java.lang.String[] recipients,
java.lang.String subject,
java.lang.String message,
java.lang.String from)
Sends a mail to a list of recipents |
static void |
showUsage(org.apache.commons.cli.Options usageOptions)
Show on output stream the usage based on a list of options |
static java.lang.Integer[][] |
splitSequence(int sequenceSize,
int nbjobs,
int minSplitSize,
int maxSize,
int nbModels)
Split a sequence in several sub sequences according to size and number of processor |
static void |
zipFiles(java.util.Vector<java.lang.String> filenames,
java.lang.String outFilename)
|
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static int varCounter
public static int predCounter
Constructor Detail |
---|
public LogolUtils()
Method Detail |
---|
public static int getCounter()
public static Expression percent2int(java.lang.String motif, java.lang.String percent)
motif
- a prolog List to analysepercent
- the percent variable or value
public static java.lang.String getTemporaryVariable()
public static java.lang.String getPredicateVariable()
public static java.lang.String getPostponedPredicateVariable()
public static java.lang.String addParent(LogolVariable lvar, int id)
public static java.lang.String getArray(java.lang.String sequence)
sequence
- input terminal
public static java.util.HashSet<java.lang.String> getAllUserVariables(java.lang.String predicate)
predicate
-
public static java.lang.String getSavedVariables(java.lang.String data, int id, java.lang.String model)
data
- id
- current id of variable, -1 if not applicablemodel
- current model
public static java.util.HashSet<java.lang.String> getErrorVariables(java.lang.String predicate)
predicate
- predicate string to analyse to get used variables
public static java.util.HashSet<java.lang.String> getAllUsedVariables(java.lang.String predicate)
predicate
- predicate string to analyse to get used variables
public static java.lang.String getPredicateInput(java.lang.String predicate)
predicate
- Predicate to analyse
public static java.lang.String getPredicateOutput(java.lang.String predicate)
predicate
- Predicate to analyse
public static void showUsage(org.apache.commons.cli.Options usageOptions)
usageOptions
- List of optionspublic static void convert2Fasta(java.lang.String inputFile, java.lang.String outputFile)
inputFile
- Logol outputoutputFile
- New fasta result filepublic static void zipFiles(java.util.Vector<java.lang.String> filenames, java.lang.String outFilename)
public static void sendMail(java.util.Properties props, java.lang.String[] recipients, java.lang.String subject, java.lang.String message, java.lang.String from) throws javax.mail.MessagingException
props
- Mail properties (see javax.mail), such as smtp host....recipients
- List of "To:"subject
- Subject of the messagemessage
- Message to sendfrom
- "From:" user to use
javax.mail.MessagingException
public static int countGrammarModels(java.lang.String grammar, java.lang.String model) throws java.io.IOException, GrammarException
grammar
- Logol Grammar filemodel
- Model file
java.io.IOException
GrammarException
public static java.lang.Integer[][] splitSequence(int sequenceSize, int nbjobs, int minSplitSize, int maxSize, int nbModels)
sequenceSize
- size of input sequencenbjobs
- Max number of jobs (number of processors or number of drm jobs)minSplitSize
- minimum size to split a sequencemaxSize
- Maximal size of a match
public static boolean copyFile(java.lang.String inFile, java.lang.String outFile)
inFile
- path to inputoutFile
- path to output
public static boolean moveFile(java.lang.String inFile, java.lang.String outFile)
inFile
- input fileoutFile
- output file
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |