public class DefaultQueryBuilder extends Object implements QueryBuilder, Serializable
| Constructor and Description |
|---|
DefaultQueryBuilder() |
| Modifier and Type | Method and Description |
|---|---|
void |
addPropertyChangeListener(PropertyChangeListener listener)
Adds listeners for changes to this Query's properties.
|
void |
addPropertyChangeListener(String propertyName,
PropertyChangeListener listener)
Adds listeners for changes to the specified property.
|
Query |
build(KnowledgeSource knowledgeSource,
AlgorithmSource algorithmSource)
Builds a
Query. |
Filter |
getFilters()
Gets the filters to be applied to this query.
|
String[] |
getKeyIds()
Returns the key ids to be queried.
|
String |
getName() |
PropositionDefinition[] |
getPropositionDefinitions()
Returns an optional set of user-specified proposition definitions.
|
String[] |
getPropositionIds()
Returns the proposition ids to be queried.
|
QueryMode |
getQueryMode() |
And<String>[] |
getTermIds()
Gets the term ids to be queried in disjunctive normal form.
|
String |
getUsername() |
static boolean |
isValidatePropositionIds() |
void |
removePropertyChangeListener(PropertyChangeListener listener)
Removes listeners for changes to this Query's properties.
|
void |
removePropertyChangeListener(String propertyName,
PropertyChangeListener listener)
Removes listeners for changes to the specified property.
|
void |
setFilters(Filter filters)
Sets the filters to apply to this query.
|
void |
setKeyIds(String[] keyIds)
Sets the key ids to be queried.
|
void |
setName(String name) |
void |
setPropositionDefinitions(PropositionDefinition[] propDefs)
Returns an optional set of user-specified proposition definitions.
|
void |
setPropositionIds(String[] propIds)
Sets the proposition ids to be queried.
|
void |
setQueryMode(QueryMode queryMode) |
void |
setTermIds(And<String>[] termIds)
Sets the term ids to be queried in disjunctive normal form.
|
void |
setUsername(String username) |
static void |
setValidatePropositionIds(boolean validatePropositionIdsFlag)
Set the value of the flag that determined whether the build method
validates proposition IDs.
|
String |
toString() |
public String getName()
public void setName(String name)
public String getUsername()
public void setUsername(String username)
public QueryMode getQueryMode()
public void setQueryMode(QueryMode queryMode)
public final Filter getFilters()
Filter.public final void setFilters(Filter filters)
Serializable.filters - a Filter.public final String[] getKeyIds()
String[]. Never returns null.public final void setKeyIds(String[] keyIds)
null
means that all key ids will be queried.keyIds - a String[] of key ids. If null, an
empty String[] will be stored.public final String[] getPropositionIds()
propIds - a String[]. Never returns null.public final void setPropositionIds(String[] propIds)
null means that all proposition ids will be queried.propIds - a String[] of proposition ids. If
null, an empty String[] will be stored.public final And<String>[] getTermIds()
And'd term ids will only match a proposition definition if
it is annotated with all of the specified term ids (or terms in their
subsumption hierarchies).String[] of term ids representing disjunctive normal
form.public final void setTermIds(And<String>[] termIds)
and'd term ids are specified,
proposition definitions will only match if they are annotated with all of
the specified term ids (or terms in their subsumption hierarchies).termIds - a And[] term ids representing disjunctive normal
form.public final PropositionDefinition[] getPropositionDefinitions()
PropositionDefinitions.public final void setPropositionDefinitions(PropositionDefinition[] propDefs)
propDefs - an array of PropositionDefinitions.public final void addPropertyChangeListener(PropertyChangeListener listener)
listener - a PropertyChangeListener.public final void removePropertyChangeListener(PropertyChangeListener listener)
listener - a PropertyChangeListener.public final void addPropertyChangeListener(String propertyName, PropertyChangeListener listener)
propertyName - the name String of the property of interest.listener - a PropertyChangeListener.public final void removePropertyChangeListener(String propertyName, PropertyChangeListener listener)
propertyName - the name String of the property that is no
longer of interest.listener - a PropertyChangeListener.public Query build(KnowledgeSource knowledgeSource, AlgorithmSource algorithmSource) throws QueryBuildException
QueryBuilderQuery. This method could validate the query
specification using the knowledge source and algorithm source.build in interface QueryBuilderknowledgeSource - a KnowledgeSource.algorithmSource - a AlgorithmSource.Query. Guaranteed not null.QueryBuildException - If the query specification failed
validation or some other error occurred.public static void setValidatePropositionIds(boolean validatePropositionIdsFlag)
validatePropositionIds - Proposition IDs are validated if, and only
if, this is true. The default value for this is true.public static boolean isValidatePropositionIds()
Copyright © 2012–2017 Emory University. All rights reserved.