com.rapidminer.tools
Class Tools

java.lang.Object
  extended by com.rapidminer.tools.Tools

public class Tools
extends java.lang.Object

Tools for RapidMiner.

Author:
Simon Fischer, Ingo Mierswa

Field Summary
static java.lang.String[] availableTimeZoneNames
           
static java.lang.String[] FALSE_STRINGS
           
static java.lang.String RESOURCE_PREFIX
           
static int SYSTEM_TIME_ZONE
           
static java.lang.String[] TRUE_STRINGS
           
 
Constructor Summary
Tools()
           
 
Method Summary
static void addResourceSource(ResourceSource source)
          Adds a new resource source.
static boolean booleanValue(java.lang.String string, boolean deflt)
           
static java.lang.Class classForName(java.lang.String className)
          TODO: Looks like this can be replaced by Plugin.getMajorClassLoader()
static java.lang.String classNameWOPackage(java.lang.Class c)
          Deprecated. Call c.getSimpleName() directly.
static void copy(java.io.File srcPath, java.io.File dstPath)
           
static void copyStreamSynchronously(java.io.InputStream in, java.io.OutputStream out, boolean closeOutputStream)
          Copies the contents read from the input stream to the output stream in the current thread.
static boolean delete(java.io.File file)
          Deletes the file.
static boolean equals(java.lang.Object o1, java.lang.Object o2)
          In contrast to o1.equals(o2), this method also works with p1==null.
static java.lang.String escape(java.lang.String unescaped)
          Esacapes quotes, newlines, and backslashes.
static java.lang.String escape(java.lang.String source, char escapeChar, char[] specialCharacters)
          Prefixes every occurrence
static java.lang.String escapeHTML(java.lang.String string)
          This method will encode the given string by replacing all forbidden characters by the appropriate HTML entity.
static java.lang.String escapeQuoteCharsInQuotes(java.lang.String line, java.util.regex.Pattern separatorPattern, char quotingChar, char escapeChar, boolean showWarning)
          Replace quote chars in-quote characters by escapeChar+quotingChar Example: seperatorPatern = ',' , quotingChar = '"' , escapeCahr = '\\' line = '"Charles says: "Some people never go crazy, What truly horrible lives they must live"", 1968, "US"' return = '"Charles says: \"Some people never go crazy, What truly horrible lives they must live\"", "1968", "US"'
static java.lang.String escapeXML(java.lang.String string)
          Replaces angle brackets by html entities.
static void findImplementationsInJar(java.lang.ClassLoader loader, java.util.jar.JarFile jar, java.lang.Class<?> superClass, java.util.List<java.lang.String> implementations)
           
static void findImplementationsInJar(java.util.jar.JarFile jar, java.lang.Class superClass, java.util.List<java.lang.String> implementations)
           
static java.io.File findSourceFile(java.lang.StackTraceElement e)
           
static java.lang.String format(java.lang.Object value, int valueType)
          Formats the value according to the given valueType.
static java.lang.String formatBytes(long numberOfBytes)
           
static java.lang.String formatDate(java.util.Date date)
          Format date as a short time string.
static java.lang.String formatDateTime(java.util.Date date)
          Format date as a short time string.
static java.lang.String formatDuration(long milliseconds)
          Format the given amount of milliseconds as a human readable string.
static java.lang.String formatIntegerIfPossible(double value)
          Returns a number string with no fraction digits if possible.
static java.lang.String formatIntegerIfPossible(double value, int numberOfDigits)
          Returns a number string with no fraction digits if possible.
static java.lang.String formatIntegerIfPossible(double value, int numberOfDigits, boolean groupingCharacter)
          Returns a number string with no fraction digits if possible.
static java.lang.String formatNumber(double value)
          Returns a formatted string of the given number (number format with usually three fraction digits).
static java.lang.String formatNumber(double value, int numberOfDigits)
          Returns a formatted string of the given number (uses the property rapidminer.gui.fractiondigits.numbers if the given number of digits is smaller than 0 (usually 3)).
static java.lang.String formatNumber(double value, int numberOfDigits, boolean groupingCharacters)
          Returns a formatted string of the given number (uses the property rapidminer.gui.fractiondigits.numbers if the given number of digits is smaller than 0 (usually 3)).
static java.lang.String formatPercent(double value)
          Returns a formatted string of the given number (percent format with two fraction digits).
static java.lang.String formatSizeInBytes(long bytes)
           
static java.lang.String formatTime(java.util.Date date)
          Format date as a short time string.
static java.lang.String[] getAllTimeZones()
           
static java.nio.charset.Charset getDefaultEncoding()
          This method tries to identify the encoding if a GUI is running and a process is defined.
static java.lang.String getExcelColumnName(int index)
          Returns the column name of the the n'th column like excel names it.
static java.io.File getFile(java.io.File parent, java.lang.String name)
          Creates a file relative to the given parent if name is not an absolute file name.
static void getFirstToken(java.io.StreamTokenizer tokenizer)
          Delivers the next token and skip empty lines.
static java.util.Locale getFormatLocale()
           
static void getLastToken(java.io.StreamTokenizer tokenizer, boolean endOfFileOk)
          Delivers the next token and checks if its the end of line.
static java.lang.String getLineSeparator()
          Returns the correct line separator for the current operating system.
static java.lang.String getLineSeparators(int number)
          Returns the correct line separator for the current operating system concatenated for the given number of times.
static void getNextToken(java.io.StreamTokenizer tokenizer)
          Delivers the next token and checks for an unexpected end of line or file.
static java.util.Calendar getPreferredCalendar()
           
static java.util.TimeZone getPreferredTimeZone()
           
static int getPreferredTimeZoneIndex()
           
static java.io.BufferedReader getReader(java.io.File file, java.nio.charset.Charset encoding)
          This method checks if the given file is a Zip file containing one entry (in case of file extension .zip).
static java.lang.String getRelativePath(java.io.File firstFile, java.io.File secondFile)
          Returns the relative path of the first file resolved against the second.
static java.net.URL getResource(java.lang.ClassLoader loader, java.lang.String name)
           
static java.net.URL getResource(java.lang.ClassLoader loader, java.lang.String prefix, java.lang.String name)
           
static java.net.URL getResource(java.lang.String name)
          Returns the desired resource.
static java.util.TimeZone getTimeZone(int index)
           
static java.lang.String indent(int indent)
          Returns a whitespace with length indent.
static boolean isEqual(double d1, double d2)
          Returns true if the difference between both numbers is smaller than IS_ZERO.
static boolean isGreater(double d1, double d2)
          Returns true if the d1 is greater than d2 and they are not equal.
static boolean isGreaterEqual(double d1, double d2)
          Returns true if the d1 is greater than d1 or both are equal, or if one of the values is NaN
static boolean isLess(double d1, double d2)
          Returns true if the d1 is less than d2 and they are not equal.
static boolean isLessEqual(double d1, double d2)
          Returns true if the d1 is less than d1 or both are equal.
static boolean isNotEqual(double d1, double d2)
          Returns no isEqual(double, double).
static boolean isZero(double d)
          Returns isEqual(double, double) for d and 0.
static java.lang.Process launchFileEditor(java.io.File file, int line)
           
static java.lang.String[] mergeQuotedSplits(java.lang.String line, java.lang.String[] splittedTokens, java.lang.String quoteString)
          Deprecated. Please use quotedSplit(String, Pattern, char, char) or quotedSplit(String, Pattern) instead
static java.lang.String ordinalNumber(int n)
          Returns the name for an ordinal number.
static void prependResourceSource(ResourceSource source)
          Adds a new resource source before the others.
static java.lang.String[] quotedSplit(java.lang.String line, java.util.regex.Pattern separatorPattern)
          Splits the given line according to the given separator pattern while only those separators will be regarded not lying inside of a quoting string.
static java.lang.String[] quotedSplit(java.lang.String line, java.util.regex.Pattern separatorPattern, char quotingChar, char escapeChar)
          Splits the given line according to the given separator pattern while only those separators will be regarded not lying inside of a quoting string.
static java.lang.String readOutput(java.io.BufferedReader in)
          Reads the output of the reader and delivers it as string.
static java.lang.String readTextFile(java.io.File file)
          Reads a text file into a single string.
static java.lang.String readTextFile(java.io.InputStream in)
           
static java.lang.String readTextFile(java.io.Reader r)
           
static byte[] readUrl(java.net.URL url)
          This method will return a byte array containing the raw data from the given url.
static java.lang.String removeAllLineSeparators(java.lang.String text)
          Removes all possible line feed character combinations.
static void sendEmail(java.lang.String address, java.lang.String subject, java.lang.String content)
          Deprecated. Use MailUtilities.sendEmail(String,String,String) instead
static void setFormatLocale(java.util.Locale locale)
           
static java.lang.String toString(java.util.Collection<?> collection)
          As toString(Collection, String) with ", ".
static java.lang.String toString(java.util.Collection<?> collection, java.lang.String separator)
          Returns a string containing the toString()-representation of the elements of collection, separated by the given separator.
static java.lang.String toString(java.lang.Object[] collection)
           
static java.lang.String toString(java.lang.Object[] collection, java.lang.String separator)
           
static java.lang.String transformAllLineSeparators(java.lang.String text)
          Replaces all possible line feed character combinations by "\n".
static java.lang.String unescape(java.lang.String escaped)
           
static java.util.List<java.lang.String> unescape(java.lang.String source, char escapeChar, char[] specialCharacters, char splitCharacter)
          Splits the string at every split character unless escaped.
static java.util.List<java.lang.String> unescape(java.lang.String source, char escapeChar, char[] specialCharacters, char splitCharacter, int splitLimit)
          Splits the string at every split character unless escaped.
static void waitForEOL(java.io.StreamTokenizer tokenizer)
          Skips all tokens before next end of line (EOL).
static void waitForProcess(Operator operator, java.lang.Process process, java.lang.String name)
          Waits for process to die and writes log messages.
static void writeTextFile(java.io.File file, java.lang.String text)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

RESOURCE_PREFIX

public static final java.lang.String RESOURCE_PREFIX
See Also:
Constant Field Values

availableTimeZoneNames

public static java.lang.String[] availableTimeZoneNames

SYSTEM_TIME_ZONE

public static final int SYSTEM_TIME_ZONE
See Also:
Constant Field Values

TRUE_STRINGS

public static final java.lang.String[] TRUE_STRINGS

FALSE_STRINGS

public static final java.lang.String[] FALSE_STRINGS
Constructor Detail

Tools

public Tools()
Method Detail

setFormatLocale

public static void setFormatLocale(java.util.Locale locale)

getFormatLocale

public static java.util.Locale getFormatLocale()

getAllTimeZones

public static java.lang.String[] getAllTimeZones()

getTimeZone

public static java.util.TimeZone getTimeZone(int index)

getPreferredTimeZone

public static java.util.TimeZone getPreferredTimeZone()

getPreferredTimeZoneIndex

public static int getPreferredTimeZoneIndex()

getPreferredCalendar

public static java.util.Calendar getPreferredCalendar()

format

public static java.lang.String format(java.lang.Object value,
                                      int valueType)
Formats the value according to the given valueType. The value must be an object of type String for nominal values, an object of type Date for date_time values or of type Double for numerical values.

Parameters:
value -
valueType -
Returns:
value as string

formatPercent

public static java.lang.String formatPercent(double value)
Returns a formatted string of the given number (percent format with two fraction digits).


formatNumber

public static java.lang.String formatNumber(double value)
Returns a formatted string of the given number (number format with usually three fraction digits).


formatNumber

public static java.lang.String formatNumber(double value,
                                            int numberOfDigits)
Returns a formatted string of the given number (uses the property rapidminer.gui.fractiondigits.numbers if the given number of digits is smaller than 0 (usually 3)).


formatNumber

public static java.lang.String formatNumber(double value,
                                            int numberOfDigits,
                                            boolean groupingCharacters)
Returns a formatted string of the given number (uses the property rapidminer.gui.fractiondigits.numbers if the given number of digits is smaller than 0 (usually 3)).


formatIntegerIfPossible

public static java.lang.String formatIntegerIfPossible(double value)
Returns a number string with no fraction digits if possible. Otherwise the default number of digits will be returned.


formatIntegerIfPossible

public static java.lang.String formatIntegerIfPossible(double value,
                                                       int numberOfDigits)
Returns a number string with no fraction digits if possible. Otherwise the given number of digits will be returned.


formatIntegerIfPossible

public static java.lang.String formatIntegerIfPossible(double value,
                                                       int numberOfDigits,
                                                       boolean groupingCharacter)
Returns a number string with no fraction digits if possible. Otherwise the given number of digits will be returned.


formatTime

public static java.lang.String formatTime(java.util.Date date)
Format date as a short time string.


formatDate

public static java.lang.String formatDate(java.util.Date date)
Format date as a short time string.


formatDateTime

public static java.lang.String formatDateTime(java.util.Date date)
Format date as a short time string.


formatDuration

public static java.lang.String formatDuration(long milliseconds)
Format the given amount of milliseconds as a human readable string.


ordinalNumber

public static java.lang.String ordinalNumber(int n)
Returns the name for an ordinal number.


isEqual

public static boolean isEqual(double d1,
                              double d2)
Returns true if the difference between both numbers is smaller than IS_ZERO.


isZero

public static boolean isZero(double d)
Returns isEqual(double, double) for d and 0.


isNotEqual

public static boolean isNotEqual(double d1,
                                 double d2)
Returns no isEqual(double, double).


isGreater

public static boolean isGreater(double d1,
                                double d2)
Returns true if the d1 is greater than d2 and they are not equal.


isGreaterEqual

public static boolean isGreaterEqual(double d1,
                                     double d2)
Returns true if the d1 is greater than d1 or both are equal, or if one of the values is NaN


isLess

public static boolean isLess(double d1,
                             double d2)
Returns true if the d1 is less than d2 and they are not equal.


isLessEqual

public static boolean isLessEqual(double d1,
                                  double d2)
Returns true if the d1 is less than d1 or both are equal.


getLineSeparator

public static java.lang.String getLineSeparator()
Returns the correct line separator for the current operating system.


getLineSeparators

public static java.lang.String getLineSeparators(int number)
Returns the correct line separator for the current operating system concatenated for the given number of times.


transformAllLineSeparators

public static java.lang.String transformAllLineSeparators(java.lang.String text)
Replaces all possible line feed character combinations by "\n". This might be important for GUI purposes like tool tip texts which do not support carriage return combinations.


removeAllLineSeparators

public static java.lang.String removeAllLineSeparators(java.lang.String text)
Removes all possible line feed character combinations. This might be important for GUI purposes like tool tip texts which do not support carriage return combinations.


classNameWOPackage

@Deprecated
public static java.lang.String classNameWOPackage(java.lang.Class c)
Deprecated. Call c.getSimpleName() directly.

Returns the class name of the given class without the package information.


readOutput

public static java.lang.String readOutput(java.io.BufferedReader in)
                                   throws java.io.IOException
Reads the output of the reader and delivers it as string.

Throws:
java.io.IOException

getFile

public static java.io.File getFile(java.io.File parent,
                                   java.lang.String name)
Creates a file relative to the given parent if name is not an absolute file name. Returns null if name is null.


getReader

public static java.io.BufferedReader getReader(java.io.File file,
                                               java.nio.charset.Charset encoding)
                                        throws java.io.IOException
This method checks if the given file is a Zip file containing one entry (in case of file extension .zip). If this is the case, a reader based on a ZipInputStream for this entry is returned. Otherwise, this method checks if the file has the extension .gz. If this applies, a gzipped stream reader is returned. Otherwise, this method just returns a BufferedReader for the given file (file was not zipped at all).

Throws:
java.io.IOException

getDefaultEncoding

public static java.nio.charset.Charset getDefaultEncoding()
This method tries to identify the encoding if a GUI is running and a process is defined. In this case, the encoding is taken from the process. Otherwise, the method tries to identify the encoding via the property RapidMiner.PROPERTY_RAPIDMINER_GENERAL_DEFAULT_ENCODING. If this is not possible, this method just returns the default system encoding.


getRelativePath

public static java.lang.String getRelativePath(java.io.File firstFile,
                                               java.io.File secondFile)
                                        throws java.io.IOException
Returns the relative path of the first file resolved against the second.

Throws:
java.io.IOException

waitForProcess

public static void waitForProcess(Operator operator,
                                  java.lang.Process process,
                                  java.lang.String name)
                           throws OperatorException
Waits for process to die and writes log messages. Terminates if exit value is not 0.

Throws:
OperatorException

sendEmail

@Deprecated
public static void sendEmail(java.lang.String address,
                                        java.lang.String subject,
                                        java.lang.String content)
Deprecated. Use MailUtilities.sendEmail(String,String,String) instead


addResourceSource

public static void addResourceSource(ResourceSource source)
Adds a new resource source. Might be used by plugins etc.


prependResourceSource

public static void prependResourceSource(ResourceSource source)
Adds a new resource source before the others. Might be used by plugins etc.


getResource

public static java.net.URL getResource(java.lang.ClassLoader loader,
                                       java.lang.String name)

getResource

public static java.net.URL getResource(java.lang.ClassLoader loader,
                                       java.lang.String prefix,
                                       java.lang.String name)

getResource

public static java.net.URL getResource(java.lang.String name)
Returns the desired resource. Tries first to find a resource in the core RapidMiner resources directory. If no resource with the given name is found, it is tried to load with help of the ResourceSource which might have been added by plugins. Please note that resource names are only allowed to use '/' as separator instead of File.separator!


readTextFile

public static java.lang.String readTextFile(java.io.InputStream in)
                                     throws java.io.IOException
Throws:
java.io.IOException

readTextFile

public static java.lang.String readTextFile(java.io.File file)
                                     throws java.io.IOException
Reads a text file into a single string.

Throws:
java.io.IOException

readTextFile

public static java.lang.String readTextFile(java.io.Reader r)
                                     throws java.io.IOException
Throws:
java.io.IOException

writeTextFile

public static void writeTextFile(java.io.File file,
                                 java.lang.String text)
                          throws java.io.IOException
Throws:
java.io.IOException

booleanValue

public static boolean booleanValue(java.lang.String string,
                                   boolean deflt)

findSourceFile

public static java.io.File findSourceFile(java.lang.StackTraceElement e)

launchFileEditor

public static java.lang.Process launchFileEditor(java.io.File file,
                                                 int line)
                                          throws java.io.IOException
Throws:
java.io.IOException

escapeXML

public static java.lang.String escapeXML(java.lang.String string)
Replaces angle brackets by html entities.


escapeHTML

public static java.lang.String escapeHTML(java.lang.String string)
This method will encode the given string by replacing all forbidden characters by the appropriate HTML entity.


findImplementationsInJar

public static void findImplementationsInJar(java.util.jar.JarFile jar,
                                            java.lang.Class superClass,
                                            java.util.List<java.lang.String> implementations)

findImplementationsInJar

public static void findImplementationsInJar(java.lang.ClassLoader loader,
                                            java.util.jar.JarFile jar,
                                            java.lang.Class<?> superClass,
                                            java.util.List<java.lang.String> implementations)

classForName

public static java.lang.Class classForName(java.lang.String className)
                                    throws java.lang.ClassNotFoundException
TODO: Looks like this can be replaced by Plugin.getMajorClassLoader()

Throws:
java.lang.ClassNotFoundException

quotedSplit

public static java.lang.String[] quotedSplit(java.lang.String line,
                                             java.util.regex.Pattern separatorPattern)
Splits the given line according to the given separator pattern while only those separators will be regarded not lying inside of a quoting string. Please note that quoting characters will not be regarded if they are escaped by an escaping character. The usual double quote (") is used for quoting and can be escaped by a backslash, i.e. \".


quotedSplit

public static java.lang.String[] quotedSplit(java.lang.String line,
                                             java.util.regex.Pattern separatorPattern,
                                             char quotingChar,
                                             char escapeChar)
Splits the given line according to the given separator pattern while only those separators will be regarded not lying inside of a quoting string. Please note that quoting characters will not be regarded if they are escaped by an escaping character.


mergeQuotedSplits

@Deprecated
public static java.lang.String[] mergeQuotedSplits(java.lang.String line,
                                                              java.lang.String[] splittedTokens,
                                                              java.lang.String quoteString)
                                            throws java.io.IOException
Deprecated. Please use quotedSplit(String, Pattern, char, char) or quotedSplit(String, Pattern) instead

This method merges quoted splits, e.g. if a string line should be splitted by comma and commas inside of a quoted string should not be used as splitting point.

Parameters:
line - the original line
splittedTokens - the tokens as they were originally splitted
quoteString - the string which should be used as quote indicator, e.g. " or '
Returns:
the array of strings where the given quoteString was regarded
Throws:
java.io.IOException - if an open quote was not ended

getFirstToken

public static void getFirstToken(java.io.StreamTokenizer tokenizer)
                          throws java.io.IOException
Delivers the next token and skip empty lines.

Throws:
java.io.IOException

getLastToken

public static void getLastToken(java.io.StreamTokenizer tokenizer,
                                boolean endOfFileOk)
                         throws java.io.IOException
Delivers the next token and checks if its the end of line.

Throws:
java.io.IOException

getNextToken

public static void getNextToken(java.io.StreamTokenizer tokenizer)
                         throws java.io.IOException
Delivers the next token and checks for an unexpected end of line or file.

Throws:
java.io.IOException

waitForEOL

public static void waitForEOL(java.io.StreamTokenizer tokenizer)
                       throws java.io.IOException
Skips all tokens before next end of line (EOL).

Throws:
java.io.IOException

delete

public static boolean delete(java.io.File file)
Deletes the file. If it is a directory, deletes recursively.


copy

public static void copy(java.io.File srcPath,
                        java.io.File dstPath)
                 throws java.io.IOException
Throws:
java.io.IOException

indent

public static java.lang.String indent(int indent)
Returns a whitespace with length indent.


formatBytes

public static java.lang.String formatBytes(long numberOfBytes)

copyStreamSynchronously

public static void copyStreamSynchronously(java.io.InputStream in,
                                           java.io.OutputStream out,
                                           boolean closeOutputStream)
                                    throws java.io.IOException
Copies the contents read from the input stream to the output stream in the current thread. Both streams will be closed, even in case of a failure.

Parameters:
closeOutputStream -
Throws:
java.io.IOException

escape

public static java.lang.String escape(java.lang.String unescaped)
Esacapes quotes, newlines, and backslashes.


getExcelColumnName

public static java.lang.String getExcelColumnName(int index)
Returns the column name of the the n'th column like excel names it.

Parameters:
index - the index of the column
Returns:

escapeQuoteCharsInQuotes

public static java.lang.String escapeQuoteCharsInQuotes(java.lang.String line,
                                                        java.util.regex.Pattern separatorPattern,
                                                        char quotingChar,
                                                        char escapeChar,
                                                        boolean showWarning)
Replace quote chars in-quote characters by escapeChar+quotingChar Example: seperatorPatern = ',' , quotingChar = '"' , escapeCahr = '\\' line = '"Charles says: "Some people never go crazy, What truly horrible lives they must live"", 1968, "US"' return = '"Charles says: \"Some people never go crazy, What truly horrible lives they must live\"", "1968", "US"'


unescape

public static java.lang.String unescape(java.lang.String escaped)

toString

public static java.lang.String toString(java.util.Collection<?> collection)
As toString(Collection, String) with ", ".


toString

public static java.lang.String toString(java.util.Collection<?> collection,
                                        java.lang.String separator)
Returns a string containing the toString()-representation of the elements of collection, separated by the given separator.


toString

public static java.lang.String toString(java.lang.Object[] collection)

toString

public static java.lang.String toString(java.lang.Object[] collection,
                                        java.lang.String separator)

formatSizeInBytes

public static java.lang.String formatSizeInBytes(long bytes)

readUrl

public static byte[] readUrl(java.net.URL url)
This method will return a byte array containing the raw data from the given url. If any error occurs null will be returned. Please keep in mind that in order to load the data, the data will be stored in memory twice.


escape

public static java.lang.String escape(java.lang.String source,
                                      char escapeChar,
                                      char[] specialCharacters)
Prefixes every occurrence


unescape

public static java.util.List<java.lang.String> unescape(java.lang.String source,
                                                        char escapeChar,
                                                        char[] specialCharacters,
                                                        char splitCharacter)
Splits the string at every split character unless escaped.


unescape

public static java.util.List<java.lang.String> unescape(java.lang.String source,
                                                        char escapeChar,
                                                        char[] specialCharacters,
                                                        char splitCharacter,
                                                        int splitLimit)
Splits the string at every split character unless escaped. If the split limit is not -1, at most so many tokens will be returned. No more escaping is performed in the last token!


equals

public static boolean equals(java.lang.Object o1,
                             java.lang.Object o2)
In contrast to o1.equals(o2), this method also works with p1==null.



Copyright © 2001-2009 by Rapid-I