public class FilterControllerImpl extends Object implements FilterController, PropertyExecutor
PropertyExecutor.Callback| Constructor and Description |
|---|
FilterControllerImpl() |
| Modifier and Type | Method and Description |
|---|---|
void |
add(Query query)
Adds
query as a new query in the system. |
Query |
createQuery(Filter filter)
Creates a query from
filter. |
Query |
createQuery(FilterBuilder builder)
Creates a query from
builder. |
void |
exportToColumn(String title,
Query query)
Exports
query result in a new column title. |
void |
exportToLabelVisible(Query query)
Exports
query result to visible/hidden labels. |
void |
exportToNewWorkspace(Query query)
Exports
query result in a new workspace. |
org.gephi.graph.api.GraphView |
filter(Query query)
Filtering method for API users.
|
void |
filterVisible(Query query)
Filters main graph with
query and set result as the new
visible graph. |
FilterModel |
getModel()
Returns the filter's model.
|
FilterModel |
getModel(Workspace workspace)
Returns the filter's model for
workspace. |
void |
remove(Query query)
Removes
query from the system if exists. |
void |
removeSubQuery(Query query,
Query parent)
Removes
query from parent query. |
void |
rename(Query query,
String name)
Renames
query with name. |
void |
selectVisible(Query query)
Selects
query results on the main graph visualization
window. |
void |
setAutoRefresh(boolean autoRefresh) |
void |
setCurrentQuery(Query query) |
void |
setSubQuery(Query query,
Query subQuery)
Sets
subQuery as a child of query. |
void |
setValue(FilterProperty property,
Object value,
PropertyExecutor.Callback callback)
Set
value on property in a safe way by using
callback. |
public Query createQuery(FilterBuilder builder)
FilterControllerbuilder. The created query is a root
query.createQuery in interface FilterControllerbuilder - the builder that can create the filter that is to be
wrapped in a new querybuilderpublic Query createQuery(Filter filter)
FilterControllerfilter. The created query is a root
query.createQuery in interface FilterControllerfilter - the filter that is to be wrapped in a new queryfilterpublic void add(Query query)
FilterControllerquery as a new query in the system. The query should be
a root query.add in interface FilterControllerquery - the query that is to be addedpublic void remove(Query query)
FilterControllerquery from the system if exists.remove in interface FilterControllerquery - the query that is to be removedpublic void rename(Query query, String name)
FilterControllerquery with name.rename in interface FilterControllerquery - the query that is to be renamedname - the new query's namepublic void setSubQuery(Query query, Query subQuery)
FilterControllersubQuery as a child of query. If
subQuery already has a parent query, it will be removed
first.setSubQuery in interface FilterControllerquery - the query that subQuery is to be added as a new
childsubQuery - the query that is to be added as a child of
querypublic void removeSubQuery(Query query, Query parent)
FilterControllerquery from parent query.removeSubQuery in interface FilterControllerquery - the query that is to be removed from parentparent - the query that query is to be removed as a
childpublic void filterVisible(Query query)
FilterControllerquery and set result as the new
visible graph. Note that the query will be executed in a background
thread and results delivered as soon as ready. Then, query
is defined as the currently active query and property's value changes are
watched. If a query's property is changed the query is automatically
reexecuted.filterVisible in interface FilterControllerquery - the query that is to be executedpublic org.gephi.graph.api.GraphView filter(Query query)
FilterControllerquery is executed and
the GraphView result is returned.filter in interface FilterControllerquery - the query that is to be executedpublic void selectVisible(Query query)
FilterControllerquery results on the main graph visualization
window. Note that the query will be executed in a background thread and
results delivered as soon as ready. Then, query is defined
as the currently active query and property's value changes are watched.
If a query's property is changed the query is automatically reexecuted.selectVisible in interface FilterControllerquery - the query that is to be executedpublic void exportToColumn(String title, Query query)
FilterControllerquery result in a new column title.
Nodes and edges that pass the query have true value
and
false for others.exportToColumn in interface FilterControllertitle - the column's titlequery - the query that is to be executedpublic void exportToNewWorkspace(Query query)
FilterControllerquery result in a new workspace. Note that query is
executed in a separate thread and the workspace may not be ready
immediately when this method returns.exportToNewWorkspace in interface FilterControllerquery - the query that is to be executedpublic void exportToLabelVisible(Query query)
FilterControllerquery result to visible/hidden labels. Each node and
edge not present in the query result has its label set hidden. Label
visibility is controlled from TextData object, accessible
from NodeData or EdgeData.exportToLabelVisible in interface FilterControllerquery - the query that is to be used to hide labelspublic void setAutoRefresh(boolean autoRefresh)
setAutoRefresh in interface FilterControllerpublic void setCurrentQuery(Query query)
setCurrentQuery in interface FilterControllerpublic FilterModel getModel()
FilterControllergetModel in interface FilterControllerpublic FilterModel getModel(Workspace workspace)
FilterControllerworkspace.getModel in interface FilterControllerworkspace - workspacepublic void setValue(FilterProperty property, Object value, PropertyExecutor.Callback callback)
PropertyExecutorvalue on property in a safe way by using
callback.setValue in interface PropertyExecutorproperty - the filter property that value is to be setvalue - the value that is to be setcallback - the callback function to be notified when setting has to
be doneCopyright © 2007–2017. All rights reserved.