public class Searcher extends Object
| Constructor and Description |
|---|
Searcher() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
hasSolution(Pattern p,
BioPAXElement... ele)
Checks if there is any match for the given pattern if search starts from the given element.
|
static List<Match> |
search(BioPAXElement ele,
Pattern pattern)
Searches the pattern starting from the given element.
|
static Map<BioPAXElement,List<Match>> |
search(Collection<? extends BioPAXElement> eles,
Pattern pattern)
Searches the given pattern starting from the given elements.
|
static List<Match> |
search(Match m,
Pattern pattern)
Searches the pattern starting from the given match.
|
static Map<BioPAXElement,List<Match>> |
search(Model model,
Pattern pattern)
Searches the given pattern in the given model.
|
static Map<BioPAXElement,List<Match>> |
search(Model model,
Pattern pattern,
ProgressWatcher prg)
Searches the given pattern in the given model.
|
static <T extends BioPAXElement> |
searchAndCollect(BioPAXElement ele,
Pattern pattern,
int index,
Class<T> c)
Searches the given pattern starting from the given element, then collects the specified
elements of the matches and returns.
|
static <T extends BioPAXElement> |
searchAndCollect(Collection<? extends BioPAXElement> eles,
Pattern pattern,
int index,
Class<T> c)
Searches the given pattern starting from the given elements, then collects the specified
elements of the matches and returns.
|
static <T extends BioPAXElement> |
searchAndCollect(Model model,
Pattern pattern,
int index,
Class<T> c)
Searches a model for the given pattern, then collects the specified elements of the matches
and returns.
|
static void |
searchInFile(Pattern p,
String inFile,
String outFile)
Searches a pattern reading the model from the given file, and creates another model that is
excised using the matching patterns.
|
static void |
searchInFile(Pattern p,
String inFile,
String outFile,
int seedLimit,
int graphPerSeed)
Searches a pattern reading the model from the given file, and creates another model that is
excised using the matching patterns.
|
static List<Match> |
searchPlain(Collection<? extends BioPAXElement> eles,
Pattern pattern)
Searches the pattern starting from given elements, but instead of a match map, returns all
matches in a list.
|
static List<Match> |
searchPlain(Model model,
Pattern pattern)
Searches the pattern in a given model, but instead of a match map, returns all matches in a
list.
|
static List<Match> |
searchRecursive(Match match,
List<MappedConst> mc,
int index)
Continues searching with the mapped constraint at the given index.
|
public static List<Match> search(Match m, Pattern pattern)
m - match to start frompattern - pattern to searchpublic static List<Match> search(BioPAXElement ele, Pattern pattern)
ele - element to start frompattern - pattern to searchpublic static List<Match> searchRecursive(Match match, List<MappedConst> mc, int index)
match - match to start frommc - mapped constraints of the patternindex - index of the current mapped constraintpublic static List<Match> searchPlain(Model model, Pattern pattern)
model - model to search inpattern - pattern to search forpublic static List<Match> searchPlain(Collection<? extends BioPAXElement> eles, Pattern pattern)
eles - elements to start frompattern - pattern to search forpublic static Map<BioPAXElement,List<Match>> search(Model model, Pattern pattern)
model - model to search inpattern - pattern to search forpublic static Map<BioPAXElement,List<Match>> search(Model model, Pattern pattern, ProgressWatcher prg)
model - model to search inpattern - pattern to search forprg - progress watcher to keep track of the progresspublic static Map<BioPAXElement,List<Match>> search(Collection<? extends BioPAXElement> eles, Pattern pattern)
eles - elements to start frompattern - pattern to search forpublic static <T extends BioPAXElement> Set<T> searchAndCollect(Model model, Pattern pattern, int index, Class<T> c)
T - BioPAX typemodel - model to search inpattern - pattern to search forindex - index of the element in the match to collectc - type of the element to collectpublic static <T extends BioPAXElement> Set<T> searchAndCollect(Collection<? extends BioPAXElement> eles, Pattern pattern, int index, Class<T> c)
T - BioPAX typeeles - elements to start frompattern - pattern to search forindex - index of the element in the match to collectc - type of the element to collectpublic static <T extends BioPAXElement> Set<T> searchAndCollect(BioPAXElement ele, Pattern pattern, int index, Class<T> c)
T - BioPAX typeele - element to start frompattern - pattern to search forindex - index of the element in the match to collectc - type of the element to collectpublic boolean hasSolution(Pattern p, BioPAXElement... ele)
p - pattern to search forele - element to start frompublic static void searchInFile(Pattern p, String inFile, String outFile) throws FileNotFoundException
p - pattern to search forinFile - filename for the model to search inoutFile - filename for the result modelFileNotFoundException - when no file existspublic static void searchInFile(Pattern p, String inFile, String outFile, int seedLimit, int graphPerSeed) throws FileNotFoundException
p - pattern to search forinFile - filename for the model to search inoutFile - filename for the result modelseedLimit - max number of starting elementsgraphPerSeed - max number of matches for a starting elementFileNotFoundException - when no file existsCopyright © 2015 BioPAX. All rights reserved.