|
Gephi Toolkit Javadoc | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface SearchReplaceController
Independent controller for search/replace feature.
Operates with SearchOptions
and SearchResult
objects.
Nested Class Summary | |
---|---|
static class |
SearchReplaceController.SearchOptions
Class that wraps the different possible options of search and provides various useful constructors. |
static class |
SearchReplaceController.SearchResult
Class that wraps the result of a search contaning the search options used for this result and the node or edge, row, column and start-end index of the value where ocurrence was found. |
Method Summary | |
---|---|
boolean |
canReplace(SearchReplaceController.SearchResult result)
Indicates if a SearchResult can be replaced or not. |
SearchReplaceController.SearchResult |
findNext(SearchReplaceController.SearchOptions searchOptions)
Finds next (or first) ocurrence for the given search options. |
SearchReplaceController.SearchResult |
findNext(SearchReplaceController.SearchResult result)
Finds next ocurrence for the given search options contained in a SearchResult. |
SearchReplaceController.SearchResult |
replace(SearchReplaceController.SearchResult result,
java.lang.String replacement)
Replaces a SearchResult with the given replacement String. |
int |
replaceAll(SearchReplaceController.SearchOptions searchOptions,
java.lang.String replacement)
Replaces all SearchResults that can be replaced with the given search options from the beginning to the end of the data. |
Method Detail |
---|
SearchReplaceController.SearchResult findNext(SearchReplaceController.SearchOptions searchOptions)
Finds next (or first) ocurrence for the given search options.
Returns a SearchResult
instance with the details or null if the search was not successful.
Modifies the given search options in order to match the next result the next time findNext
is called
searchOptions
- Options of the search
SearchReplaceController.SearchResult findNext(SearchReplaceController.SearchResult result)
Finds next ocurrence for the given search options contained in a SearchResult.
Returns a SearchResult
instance with the details or null if the search was not successful.
Modifies the given search options in order to match the next result the next time findNext
is called
result
- Last result of the search
boolean canReplace(SearchReplaceController.SearchResult result)
Indicates if a SearchResult
can be replaced or not.
Computed columns and id columns cannot be replaced.
result
- SearchResult to check before replacing
SearchReplaceController.SearchResult replace(SearchReplaceController.SearchResult result, java.lang.String replacement)
Replaces a SearchResult
with the given replacement String.
Also tries to find next search result and returns it.
If the data has changed and the replacement can't be done it will just return next SearchResult
calling findNext
.
If useRegexReplaceMode is enabled, IndexOutOfBoundsException can be thrown when the replacement is not correct for the regular expression.
result
- SearchResult to replacereplacement
- Replacement String
int replaceAll(SearchReplaceController.SearchOptions searchOptions, java.lang.String replacement)
Replaces all SearchResults that can be replaced with the given search options from the beginning to the end of the data.
If useRegexReplaceMode is enabled, IndexOutOfBoundsException can be thrown when the replacement is not correct for the regular expression.
searchOptions
- Search options for the searchesreplacement
- Replacement String
|
Gephi Toolkit Javadoc | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |