|
SMILA (incubation) API documentation | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.eclipse.smila.search.templates.TemplateRegistryController
public abstract class TemplateRegistryController
A cache and manager for Search- and FieldTemplates. If a template is not defined then an empty dummy template is created.
| Method Summary | |
|---|---|
static ITerm |
applyFieldTemplate(DField dField,
DFieldTemplate dTemplate,
IndexConnection ic)
Apply field template. |
static IQueryExpression |
applyTemplate(DQuery dQuery,
DTemplate dTemplate,
IndexConnection ic)
|
static boolean |
doesFieldMatchTemplate(DQuery query,
DField field,
DFieldTemplate template)
Checks whether a field does match a template. |
static DFieldTemplate |
getFieldTemplate(DQuery query,
DField field,
java.lang.String indexName)
Get field template for simple search field. |
static DFieldTemplates |
getFieldTemplates(java.lang.String indexName)
Returns the template for the given index. |
static DSearchTemplates |
getSearchTemplates(java.lang.String indexName)
Resolves all search templates for a given index. |
static DTemplate |
getTemplate(DQuery dQuery)
Get template for simple search. |
static boolean |
matchesFilterExpression(java.lang.String filterExpression,
DQuery query)
Checks whether a query matches the filter expression. |
static void |
removeTemplates(java.lang.String indexName,
boolean doSearchTemplates,
boolean doFieldTemplates)
Removes for the given index the given template(s) from cache and disk. |
static void |
setFieldTemplates(DFieldTemplates templates)
Takes the given FieldTemplate (a) caches it in .fieldTemplates and saves it to the harddrive. |
static void |
setSearchTemplates(DSearchTemplates templates)
Takes the given SearchTemplate (a) caches it in .searchTemplates and saves it to the harddrive. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public static DTemplate getTemplate(DQuery dQuery)
throws TemplateException
dQuery - Simple search query.
TemplateException - Unable to get template.
public static DFieldTemplate getFieldTemplate(DQuery query,
DField field,
java.lang.String indexName)
throws TemplateException
query - Simple search query.field - Field from simple search.indexName - index name.
TemplateException - Unable to get template.
public static boolean doesFieldMatchTemplate(DQuery query,
DField field,
DFieldTemplate template)
query - Query.field - Field.template - Template.
public static boolean matchesFilterExpression(java.lang.String filterExpression,
DQuery query)
throws TemplateException
filterExpression - Filter expression.query - Query.
TemplateException - -
public static IQueryExpression applyTemplate(DQuery dQuery,
DTemplate dTemplate,
IndexConnection ic)
throws TemplateException,
NodeTransformerException,
IndexException
dQuery - Search query.dTemplate - Search template.ic - Index connection.
TemplateException - Unable to apply search template.
NodeTransformerException - Unable to apply node transformers.
IndexException - Unable to apply search template.
public static ITerm applyFieldTemplate(DField dField,
DFieldTemplate dTemplate,
IndexConnection ic)
throws TemplateException,
NodeTransformerException,
IndexException
dField - Query field.dTemplate - Template.ic - Index connection.
TemplateException - Unable to apply field template.
NodeTransformerException - Unable to apply node transformers.
IndexException - Error applying field templates.
public static void setSearchTemplates(DSearchTemplates templates)
throws TemplateException
templates - Search templates for a index.
TemplateException - Unable to set search templates.
public static DSearchTemplates getSearchTemplates(java.lang.String indexName)
throws TemplateException
indexName - Index name.
TemplateException - Unable to get search templates.
public static void setFieldTemplates(DFieldTemplates templates)
throws TemplateException
templates - Field templates for a index.
TemplateException - Unable to set field templates.
public static DFieldTemplates getFieldTemplates(java.lang.String indexName)
throws TemplateException
indexName - Index name.
TemplateException - Unable to resolve field templates.
public static void removeTemplates(java.lang.String indexName,
boolean doSearchTemplates,
boolean doFieldTemplates)
indexName - Index name.doSearchTemplates - Whether search templates should be deleted.doFieldTemplates - Whether field templates should be deleted.
|
SMILA (incubation) API documentation | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||