public class FrontODFSearch extends SearchGenerator
Modifier and Type | Class and Description |
---|---|
static class |
FrontODFSearch.DisplaySubprogramMode
Enumeration for display subprogram mode
|
(package private) class |
FrontODFSearch.SubProgramPageContentQuery |
SearchGenerator.ContentTypeSearch
AbstractSearchGenerator.ContentTypeFacetField, AbstractSearchGenerator.FacetField, AbstractSearchGenerator.MetadataFacetField
Modifier and Type | Field and Description |
---|---|
private FrontODFSearch.DisplaySubprogramMode |
_displaySubprogramMode |
protected List<String> |
_matchingSubProgramIds
The matching subprograms
|
private OdfPageResolver |
_odfPageResolver |
_queryAdapterFOSearchEP, _siteTypeEP
_contentHelper, _contentTypesHelper, _context, _cTypeExtPt, _dcProvider, _metadataManager, _resolver, _searcherFactory, _searchHelper, _siteManager, _tagExtPt, _TEXTFIELD_PATTERN, _uriResolverEP, DOCUMENT_TYPE_IS_PAGE_RESOURCE_FACET_NAME
manager
objectModel, parameters, resolver, source
contentHandler, EMPTY_CONTENT_HANDLER, lexicalHandler, xmlConsumer
ATTACHMENT_PAGE_ID, CONTENT_IDS, CONTENT_INTERESTING_DATES, DATE_FOR_SORTING, DATES_FACET, FACETABLE_CONTENT_FIELD_PREFIX, LASTNAME_FOR_SORTING, ORPHAN, PAGE_ANCESTOR_IDS, PAGE_CONTENT_TYPES, PAGE_DEPTH, PAGE_IDS, PAGE_LONG_TITLE, PAGE_OUTGOING_REFEERENCES_RESOURCE_IDS, PAGE_PARENT_ID, PAGE_TITLE, PAGE_TYPE, PAGE_VISIBLE_ATTACHMENT_RESOURCE_IDS, PRIVACY, SECTION_PAGE_TITLE, SERVICE_IDS, SHARED, SITE_NAME, SITE_TYPE, SITEMAP_NAME, TEMPLATE, TYPE_PAGE, TYPE_PAGE_RESOURCE
ACL_INIT_VALUE_ALLOWED_GROUPS, ACL_INIT_VALUE_ALLOWED_USERS, ACL_INIT_VALUE_ANONYMOUS, ACL_INIT_VALUE_ANYCONNECTED, ACL_INIT_VALUE_DENIED_GROUPS, ACL_INIT_VALUE_DENIED_USERS, ALL_CONTENT_TYPES, ALL_MIXIN_TYPES, ALL_TAGS, ATTACHMENT_CONTENT_ID, CONTENT_COMMENTS, CONTENT_COMMENTS_NONVALIDATED, CONTENT_COMMENTS_VALIDATED, CONTENT_CREATOR, CONTENT_LANGUAGE, CONTENT_LANGUAGES, CONTENT_LAST_CONTRIBUTOR, CONTENT_NAME, CONTENT_OUTGOING_REFEERENCES_RESOURCE_IDS, CONTENT_TITLES, CONTENT_TYPE_RESOURCE, CONTENT_TYPES, CONTENT_VISIBLE_ATTACHMENT_RESOURCE_IDS, CREATION_DATE, DC_CONTRIBUTOR, DC_COVERAGE, DC_CREATOR, DC_DATE, DC_DESCRIPTION, DC_FORMAT, DC_IDENTIFIER, DC_LANGUAGE, DC_PUBLISHER, DC_RELATION, DC_RIGHTS, DC_SOURCE, DC_SUBJECT, DC_TITLE, DC_TYPE, DOCUMENT_TYPE, EXCERPT, FILENAME, FIRST_VALIDATION, FULL_EXACT_WS, FULL_GENERAL, FULL_PREFIX, FULL_STEMMED_PREFIX, ID, IS_AMETYS_OBJECT, LAST_MAJOR_VALIDATION, LAST_MODIFIED, LAST_VALIDATION, LENGTH, MIME_TYPES, MIXIN_TYPES, PATH, PSEUDO_CONTENT_TYPE_VALUE_RESOURCE, PSEUDO_CONTENT_TYPES, REPEATER_ENTRY_POSITION, RESOURCE_ANCESTOR_AND_SELF_IDS, RESOURCE_ANCESTOR_IDS, RESOURCE_CREATOR, RESOURCE_DATE, RESOURCE_LAST_MODIFIED, RESOURCE_ROOT_ID, SIMPLE_CONTENT_PARENTS, SUB_CONTENT, TAGS, TITLE, TITLE_SORT, TYPE_CONTENT, TYPE_CONTENT_ATTACHMENT_RESOURCE, TYPE_CONTENT_ATTRIBUTE_RESOURCE, TYPE_REPEATER, TYPE_RESOURCE, TYPE_WF_ENTRY, TYPE_WF_STEP, WORKFLOW_CURRENT_STEPS, WORKFLOW_CURRENT_STEPS_DV, WORKFLOW_ENTRY_STATE, WORKFLOW_HISTORY_STEPS, WORKFLOW_HISTORY_STEPS_DV, WORKFLOW_NAME, WORKFLOW_REF, WORKFLOW_REF_DV, WORKFLOW_STEP, WORKFLOW_STEP_ACTIONID, WORKFLOW_STEP_CALLER, WORKFLOW_STEP_DUEDATE, WORKFLOW_STEP_FINISHDATE, WORKFLOW_STEP_ID, WORKFLOW_STEP_OWNER, WORKFLOW_STEP_STARTDATE, WORKFLOW_STEP_STATUS
Constructor and Description |
---|
FrontODFSearch() |
Modifier and Type | Method and Description |
---|---|
protected void |
_addMetadataFacet(Map<String,AbstractSearchGenerator.FacetField> facets,
Collection<String> contentTypes,
String metadataPath)
Add metadata facet to facets map
|
protected Query |
_getStringMetadataQuery(String language,
String metadataPath,
String value,
MetadataDefinition metadataDefinition)
Get query from string metadata
|
protected boolean |
_searchOnSubPrograms()
Determines the search should be executed on subprograms
|
protected void |
addContentTypeQuery(Collection<Query> queries,
Request request)
Add the content type query
|
void |
generate() |
protected List<Query> |
getContentQueries(Request request,
Collection<String> siteNames,
String language)
Get the queries to be apply on joined contents ONLY
|
protected Collection<String> |
getContentTypes(Request request)
Get the content type's
|
protected FrontODFSearch.DisplaySubprogramMode |
getDisplaySubProgramMode()
Get the display mode for subprograms
|
protected Query |
getQuery(Request request,
Collection<String> siteNames,
String language)
Get the query from request parameters
|
protected Query |
getSubProgramPageQuery(Query contentQuery)
Get the page query to execute for subprogram's pages
|
protected List<String> |
getSubProgramsMatchingSearch(Request request,
Collection<String> siteNames,
String language)
Get the ids of subprograms matching the current search
|
protected void |
saxAdditionalInfosOnPageHit(Page page)
SAX additional information on page hit
|
protected SearchResults<AmetysObject> |
search(Request request,
Collection<String> siteNames,
String language,
int pageIndex,
int start,
int maxResults,
boolean saxResults)
Search
|
void |
service(ServiceManager smanager) |
_additionalSearchProcessing, addAllWordsTextFieldQuery, addDateQuery, addExactWordingTextFieldQuery, addMetadataQuery, addNoWordsTextFieldQuery, addPagesQuery, addTagsQuery, addTextFieldQuery, getContentResourcesOrAttachmentQueries, getContentTypeFilterValue, getContentTypeSearch, getContentValues, getDocumentTypes, getFacets, getFacetValues, getFields, getFilterQueries, getFixedCTypeFilterQueries, getPageQueries, getPageResourcesOrAttachmentQueries, getPrimarySortFields, getQueryFacets, getQueryFacetValues, getSortField, getWordingQueries, saxEnumeratorValueForMetadata, saxFormFields, saxFormValues, saxHits, saxMetadataDef, search
contextualize, getDocumentTypesQuery, getPageIndex, getSearchMode, getZoneItem, isInputValid, saxAdditionalInfos, saxContent, saxFacets, saxFormParameters, saxPageHit, saxPagination, saxResourceHit, saxRichTextExcerpt, saxServiceIdentifiers, saxSort, useFacets
dispose
recycle, setup
setConsumer, setContentHandler, setLexicalHandler
enableLogging, getLogger, setupLogger, setupLogger, setupLogger
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
setConsumer
protected List<String> _matchingSubProgramIds
private FrontODFSearch.DisplaySubprogramMode _displaySubprogramMode
private OdfPageResolver _odfPageResolver
public FrontODFSearch()
public void service(ServiceManager smanager) throws ServiceException
service
in interface Serviceable
service
in class SearchGenerator
ServiceException
protected Collection<String> getContentTypes(Request request)
SearchGenerator
getContentTypes
in class SearchGenerator
request
- The requestpublic void generate() throws IOException, SAXException, ProcessingException
generate
in interface Generator
generate
in class AbstractSearchGenerator
IOException
SAXException
ProcessingException
protected Query _getStringMetadataQuery(String language, String metadataPath, String value, MetadataDefinition metadataDefinition)
SearchGenerator
_getStringMetadataQuery
in class SearchGenerator
language
- the languagemetadataPath
- the metadata pathvalue
- the valuemetadataDefinition
- the metadata definitionprotected void _addMetadataFacet(Map<String,AbstractSearchGenerator.FacetField> facets, Collection<String> contentTypes, String metadataPath)
SearchGenerator
_addMetadataFacet
in class SearchGenerator
facets
- the facets mapcontentTypes
- the content typesmetadataPath
- the metadata pathprotected List<Query> getContentQueries(Request request, Collection<String> siteNames, String language)
SearchGenerator
getContentQueries
in class SearchGenerator
request
- the requestsiteNames
- the site nameslanguage
- the languageprotected Query getQuery(Request request, Collection<String> siteNames, String language) throws IllegalArgumentException
AbstractSearchGenerator
getQuery
in class SearchGenerator
request
- The requestsiteNames
- The site names.language
- The languageIllegalArgumentException
- If the search field is invalid.protected SearchResults<AmetysObject> search(Request request, Collection<String> siteNames, String language, int pageIndex, int start, int maxResults, boolean saxResults) throws Exception
AbstractSearchGenerator
search
in class AbstractSearchGenerator
request
- the requestsiteNames
- The name of the sites to search inlanguage
- The language code to searchpageIndex
- the page indexstart
- The offset for search resultsmaxResults
- The maximum number of resultssaxResults
- false to not sax resultsException
- If an error occurred during searchprotected List<String> getSubProgramsMatchingSearch(Request request, Collection<String> siteNames, String language) throws Exception
request
- The requestsiteNames
- The site nameslanguage
- The languagesException
- if failed to execute searchprotected Query getSubProgramPageQuery(Query contentQuery)
contentQuery
- the initial content queryprotected void saxAdditionalInfosOnPageHit(Page page) throws SAXException
AbstractSearchGenerator
saxAdditionalInfosOnPageHit
in class AbstractSearchGenerator
page
- the pageSAXException
- if something goes wrong when saxing the informationprotected FrontODFSearch.DisplaySubprogramMode getDisplaySubProgramMode()
protected boolean _searchOnSubPrograms()
protected void addContentTypeQuery(Collection<Query> queries, Request request)
SearchGenerator
addContentTypeQuery
in class SearchGenerator
queries
- The queriesrequest
- The request