Package org.gephi.filters.api
Interface FilterLibrary
-
- All Superinterfaces:
org.openide.util.Lookup.Provider
public interface FilterLibrary extends org.openide.util.Lookup.ProviderThe Filter Library is the place where filter builders are registered and ready to be used. It also has default Categories that filters use to be sorted and well-described.Modules can dynamically create new filter builders and serve it ot users by using
addBuilder(org.gephi.filters.spi.FilterBuilder).- Author:
- Mathieu Bastian
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidaddBuilder(FilterBuilder builder)Addsbuilderto this library.voiddeleteQuery(Query query)Delete a savedqueryfrom the library.FilterBuildergetBuilder(Filter filter)Returns the builder that has createdfilter.org.openide.util.LookupgetLookup()Returns this library's lookup.voidregisterMask(FilterLibraryMask mask)Registersmaskas a newFilterLibraryMask.voidremoveBuilder(FilterBuilder builder)Removesbuilderfrom this library.voidsaveQuery(Query query)Savequeryin the library in order it can be reused.voidunregisterMask(FilterLibraryMask mask)Unregistersmaskin the library.
-
-
-
Field Detail
-
TOPOLOGY
static final Category TOPOLOGY
DefaultCategoryfor topological filters. Use this category for filters working on graph topology, i.e. the structure of nodes and edges.
-
ATTRIBUTES
static final Category ATTRIBUTES
DefaultCategoryfor attributes filters. Use this category for filters working on attribute values.
-
EDGE
static final Category EDGE
DefaultCategoryfor filters working on edges only.
-
-
Method Detail
-
addBuilder
void addBuilder(FilterBuilder builder)
Addsbuilderto this library.- Parameters:
builder- the builder that is to be added
-
removeBuilder
void removeBuilder(FilterBuilder builder)
Removesbuilderfrom this library.- Parameters:
builder- the builder that is to be removed
-
getLookup
org.openide.util.Lookup getLookup()
Returns this library's lookup. The lookup is a general container for objects and contains:FilterBuilder: Builders, these are building filters.CategoryBuilder: Category builders, these are building. categories, i.e. filters containers.FilterLibraryMask: Masks, for enable/disable categories according to the context.Query: Saved queries, look atFilterControllerfor active queries.
FilterBuilderin the library can be obtained by doing the following command:FilterLibrary.getLookup().lookupAll(FilterBuilder.class);
- Specified by:
getLookupin interfaceorg.openide.util.Lookup.Provider- Returns:
- the lookup container of this library
-
registerMask
void registerMask(FilterLibraryMask mask)
Registersmaskas a newFilterLibraryMask. Such masks have categories enable/disable flag. Useful to disable for instance filters for undirected graphs when the current graph is directed.- Parameters:
mask- the mask that is to be registered
-
unregisterMask
void unregisterMask(FilterLibraryMask mask)
Unregistersmaskin the library. The mask will no longer be used.- Parameters:
mask- the mask that is to be unregistered
-
getBuilder
FilterBuilder getBuilder(Filter filter)
Returns the builder that has createdfilter.- Parameters:
filter- the filter that the builder is to be returned- Returns:
- the builder that has created
filter
-
saveQuery
void saveQuery(Query query)
Savequeryin the library in order it can be reused. Saved queries are saved to the project.- Parameters:
query- the query that is to be saved
-
deleteQuery
void deleteQuery(Query query)
Delete a savedqueryfrom the library. Deleted queries are deleted from the project.- Parameters:
query- the query that is to be deleted
-
-