public class GDUtilities extends Object
| Modifier and Type | Class and Description |
|---|---|
static class |
GDUtilities.Result |
| Modifier and Type | Field and Description |
|---|---|
static boolean |
DEBUG |
static boolean |
DEBUG_DETAILS |
static String |
FORMAT |
protected static int |
STEP_SIZE |
| Constructor and Description |
|---|
GDUtilities() |
| Modifier and Type | Method and Description |
|---|---|
static String |
dom2String(Document d) |
static GDUtilities.Result[] |
filter(File rootDir,
String category,
String name,
GDUtilities.Result[] res)
Applies a filter to res.
|
static String |
getDesktopURL() |
static InputStream |
getResultInputStream(String queryString,
String start,
String num,
String flags) |
static String |
getURL(String queryString,
String start,
String num,
String flags) |
static boolean |
matchs(GDUtilities.Result res,
File rootDir,
String category,
String name)
Determines if res matchs the filter defined by rootDir, category and
name.
|
static GDUtilities.Result[] |
parseXML(InputStream in,
File rootDir,
String category,
String name) |
static GDUtilities.Result[] |
search(String query,
int start,
int items) |
static GDUtilities.Result[] |
search(String query,
int start,
int items,
File rootDir,
String category,
String name) |
static GDUtilities.Result[] |
searchInDirectory(String query,
File rootDir) |
static void |
setFormat(String format) |
protected static int STEP_SIZE
public static boolean DEBUG
public static boolean DEBUG_DETAILS
public static String FORMAT
public static void setFormat(String format)
public static String getURL(String queryString, String start, String num, String flags) throws Exception
Exceptionpublic static InputStream getResultInputStream(String queryString, String start, String num, String flags) throws Exception
Exceptionpublic static GDUtilities.Result[] search(String query, int start, int items) throws Exception
Exceptionpublic static GDUtilities.Result[] search(String query, int start, int items, File rootDir, String category, String name) throws Exception
Exceptionpublic static GDUtilities.Result[] parseXML(InputStream in, File rootDir, String category, String name)
public static GDUtilities.Result[] filter(File rootDir, String category, String name, GDUtilities.Result[] res)
root - File. Directory in which the results must be stored. The
results returned will be only of type 'file'. If null no
filter is applied to location of the result.category - String. Type of the result. If null no filter is applied to
the type of the result.name - String. String that must be contained in the name of the
resource (case-insensitive). If null no filter is applied.res - Result[]public static boolean matchs(GDUtilities.Result res, File rootDir, String category, String name)
res - Result Result to evaluateroot - File. Directory in which the results must be stored. The
results returned will be only of type 'file'. If null no
filter is applied to location of the result.category - String. Type of the result. If null no filter is applied to
the type of the result.name - String. String that must be contained in the name of the
resource (case-insensitive). If null no filter is applied.public static GDUtilities.Result[] searchInDirectory(String query, File rootDir) throws Exception
ExceptionCopyright © 2016 Imatia Innovation S.L.. All rights reserved.