public class SearchReplaceControllerImpl extends Object implements SearchReplaceController
SearchReplaceControllerSearchReplaceController.SearchOptions, SearchReplaceController.SearchResult| Constructor and Description |
|---|
SearchReplaceControllerImpl() |
| Modifier and Type | Method and Description |
|---|---|
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.
|
private SearchReplaceController.SearchResult |
findOnEdges(SearchReplaceController.SearchOptions searchOptions,
int rowIndex,
int columnIndex) |
private SearchReplaceController.SearchResult |
findOnNodes(SearchReplaceController.SearchOptions searchOptions,
int rowIndex,
int columnIndex) |
private SearchReplaceController.SearchResult |
matchRegex(Object value,
SearchReplaceController.SearchOptions searchOptions,
int rowIndex,
int columnIndex,
org.gephi.graph.api.TimeFormat timeFormat,
org.joda.time.DateTimeZone timeZone) |
SearchReplaceController.SearchResult |
replace(SearchReplaceController.SearchResult result,
String replacement)
Replaces a
SearchResult with the given replacement String. |
int |
replaceAll(SearchReplaceController.SearchOptions searchOptions,
String replacement)
Replaces all SearchResults that can be replaced with the given search options from the beginning to the end of the data.
|
public SearchReplaceController.SearchResult findNext(SearchReplaceController.SearchOptions searchOptions)
SearchReplaceControllerFinds 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
findNext in interface SearchReplaceControllersearchOptions - Options of the searchpublic SearchReplaceController.SearchResult findNext(SearchReplaceController.SearchResult result)
SearchReplaceControllerFinds 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
findNext in interface SearchReplaceControllerresult - Last result of the searchpublic boolean canReplace(SearchReplaceController.SearchResult result)
SearchReplaceControllerIndicates if a SearchResult can be replaced or not.
Computed columns and id columns cannot be replaced.
canReplace in interface SearchReplaceControllerresult - SearchResult to check before replacingpublic SearchReplaceController.SearchResult replace(SearchReplaceController.SearchResult result, String replacement)
SearchReplaceControllerReplaces 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.
replace in interface SearchReplaceControllerresult - SearchResult to replacereplacement - Replacement Stringpublic int replaceAll(SearchReplaceController.SearchOptions searchOptions, String replacement)
SearchReplaceControllerReplaces 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.
replaceAll in interface SearchReplaceControllersearchOptions - Search options for the searchesreplacement - Replacement Stringprivate SearchReplaceController.SearchResult findOnNodes(SearchReplaceController.SearchOptions searchOptions, int rowIndex, int columnIndex)
private SearchReplaceController.SearchResult findOnEdges(SearchReplaceController.SearchOptions searchOptions, int rowIndex, int columnIndex)
private SearchReplaceController.SearchResult matchRegex(Object value, SearchReplaceController.SearchOptions searchOptions, int rowIndex, int columnIndex, org.gephi.graph.api.TimeFormat timeFormat, org.joda.time.DateTimeZone timeZone)
Copyright © 2007–2016 Gephi Consortium. All rights reserved.