Package org.gephi.filters.api
Interface Query
-
public interface QueryQueries are wrapping filters and are assembled in a query tree. Each query is built from a single filter instance and it's role is to basically to execute the filter. The graph that is passed to the filter depends on the fact the query belongs to a complex query tree or if the tree is a single leaf.The system works like this. Leaves of the query tree receives the complete graph and the subgraphs they return are passed to the parent query. Thus the root query is the last query to get the subgraphs and returns the final result. This querying system make possible to create query chains and complex scenario with various operators (AND, OR, ...).
Queries are built by the
FilterControllerfrom filter instances.- Author:
- Mathieu Bastian
- See Also:
FilterController
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description FilterBuildergetBuilder()Returns the filter builder that creates the filter this query is wrapping.Query[]getChildren()Returns queries that are children of this query.intgetChildrenSlotsCount()Returns the limit number of children this query can have.Query[]getDescendantsAndSelf()Utility method that returns all descendant queries plus this query.FiltergetFilter()Returns the filter this query is wrapping.StringgetName()Returns query's full name.QuerygetParent()Returns the parent query ornullif this query is root.intgetPropertiesCount()Returns the number of properties this query has.StringgetPropertyName(int index)Returns the name of the property at the specifiedindex.ObjectgetPropertyValue(int index)Returns the value of the property at the specifiedindex.Query[]getQueries(Class<? extends Filter> filterClass)Utility method that returns all queries in this query hierarchy that arefilterClassinstance.voidsetName(String name)Sets the query name to a custom value
-
-
-
Method Detail
-
getName
String getName()
Returns query's full name.- Returns:
- query's name
-
setName
void setName(String name)
Sets the query name to a custom value- Parameters:
name- Custom name
-
getChildren
Query[] getChildren()
Returns queries that are children of this query.- Returns:
- query's children
-
getChildrenSlotsCount
int getChildrenSlotsCount()
Returns the limit number of children this query can have. Return 1 for a standard query.- Returns:
- the number of allowed children query
-
getParent
Query getParent()
Returns the parent query ornullif this query is root.- Returns:
- the query's parent query, or
null
-
getPropertiesCount
int getPropertiesCount()
Returns the number of properties this query has.- Returns:
- the query's number of properties
-
getPropertyName
String getPropertyName(int index)
Returns the name of the property at the specifiedindex.- Parameters:
index- the index of the property- Returns:
- the query's property name
- Throws:
ArrayIndexOutOfBoundsException- ifindexis out of bounds
-
getPropertyValue
Object getPropertyValue(int index)
Returns the value of the property at the specifiedindex.- Parameters:
index- the index of the property- Returns:
- the query's property value
- Throws:
ArrayIndexOutOfBoundsException- ifindexis out of bounds
-
getQueries
Query[] getQueries(Class<? extends Filter> filterClass)
Utility method that returns all queries in this query hierarchy that arefilterClassinstance.- Parameters:
filterClass- the filter class that is to be queried- Returns:
- all queries, including self that are
filterClassinstance
-
getDescendantsAndSelf
Query[] getDescendantsAndSelf()
Utility method that returns all descendant queries plus this query.- Returns:
- all descendant queries and self
-
getFilter
Filter getFilter()
Returns the filter this query is wrapping.- Returns:
- the filter
-
getBuilder
FilterBuilder getBuilder()
Returns the filter builder that creates the filter this query is wrapping.- Returns:
- the builder or null
-
-