public class SearchResourcesGenerator extends AbstractSearchGenerator
AbstractSearchGenerator.ContentTypeFacetField, AbstractSearchGenerator.FacetField, AbstractSearchGenerator.MetadataFacetField
Modifier and Type | Field and Description |
---|---|
protected static String[] |
AUDIO_MIMETYPE
MIME types for audio files
|
protected static String[] |
IMAGE_MIMETYPE
MIME types for images
|
protected static String[] |
PDF_MIMETYPE
MIME types for pdf
|
protected static String[] |
PRES_MIMETYPE
MIME types for presentation
|
protected static String[] |
SPREADSHEET_MIMETYPE
MIME types for spreadsheets
|
protected static String[] |
TEXT_MIMETYPE
MIME types for text documents
|
protected static String[] |
VIDEO_MIMETYPE
MIME types for videos
|
_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 |
---|
SearchResourcesGenerator() |
Modifier and Type | Method and Description |
---|---|
private void |
_addCreatorFieldQuery(Collection<Query> queries,
Request request) |
private void |
_addFormatQuery(Collection<Query> queries,
Request request) |
private void |
_addPagesQuery(Collection<Query> queries,
Request request) |
private void |
_addPublisherQuery(Collection<Query> queries,
Request request) |
private void |
_addRightsQuery(Collection<Query> queries,
Request request) |
private void |
_addTextFieldQuery(Collection<Query> queries,
String language,
Request request) |
private void |
_saxCreatorField(Request request) |
private void |
_saxFormatCriteria() |
private void |
_saxFormats(Request request) |
private void |
_saxMultisite(Request request) |
private void |
_saxPages(Request request) |
private void |
_saxPublisher(Request request) |
private void |
_saxPublisherCriteria() |
private void |
_saxRights(Request request) |
private void |
_saxRightsCriteria() |
private void |
_saxSitemapCriteria() |
private void |
_saxTextField(Request request) |
protected Collection<String> |
getDocumentTypes(Request request)
Get the document types.
|
protected Map<String,AbstractSearchGenerator.FacetField> |
getFacets(Request request)
Get the facets from request parameters
|
protected Map<String,List<String>> |
getFacetValues(Request request,
Collection<String> siteNames,
String language)
Get the facet values
|
protected Collection<String> |
getFields()
Get the searchable fields
|
protected Collection<Query> |
getFilterQueries(Request request,
Collection<String> siteNames,
String language)
Get the filter queries from the request parameters.
|
protected List<Sort> |
getPrimarySortFields(Request request)
Get the primary sort fields
|
protected Query |
getQuery(Request request,
Collection<String> siteNames,
String language)
Get the query from request parameters
|
protected Set<FrontOfficeSearcherFactory.QueryFacet> |
getQueryFacets(Request request)
Get the facet.queries
|
protected Collection<String> |
getQueryFacetValues(Request request)
Get the facet.query values
|
protected Sort |
getSortField(Request request)
Get the sort field
|
protected void |
saxFormFields(Request request,
String siteName,
String lang)
SAX the form search criteria
|
protected void |
saxFormValues(Request request,
int start,
int offset)
SAX the form search criteria values
|
protected void |
saxHits(SearchResults<AmetysObject> results,
int start,
int maxResults)
SAX the result hits
|
_additionalSearchProcessing, contextualize, generate, getDocumentTypesQuery, getPageIndex, getSearchMode, getZoneItem, isInputValid, saxAdditionalInfos, saxAdditionalInfosOnPageHit, saxContent, saxFacets, saxFormParameters, saxPageHit, saxPagination, saxResourceHit, saxRichTextExcerpt, saxServiceIdentifiers, saxSort, search, search, service, 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 static final String[] IMAGE_MIMETYPE
protected static final String[] VIDEO_MIMETYPE
protected static final String[] AUDIO_MIMETYPE
protected static final String[] PDF_MIMETYPE
protected static final String[] TEXT_MIMETYPE
protected static final String[] PRES_MIMETYPE
protected static final String[] SPREADSHEET_MIMETYPE
public SearchResourcesGenerator()
protected Query getQuery(Request request, Collection<String> siteNames, String language) throws IllegalArgumentException
AbstractSearchGenerator
getQuery
in class AbstractSearchGenerator
request
- The requestsiteNames
- The site names.language
- The languageIllegalArgumentException
- If the search field is invalid.protected Collection<Query> getFilterQueries(Request request, Collection<String> siteNames, String language) throws IllegalArgumentException
AbstractSearchGenerator
getFilterQueries
in class AbstractSearchGenerator
request
- The request.siteNames
- The site names.language
- The language.IllegalArgumentException
- If a search field is invalid.protected Collection<String> getDocumentTypes(Request request)
AbstractSearchGenerator
getDocumentTypes
in class AbstractSearchGenerator
request
- The request.protected Collection<String> getFields()
AbstractSearchGenerator
getFields
in class AbstractSearchGenerator
protected Map<String,AbstractSearchGenerator.FacetField> getFacets(Request request) throws IllegalArgumentException
AbstractSearchGenerator
getFacets
in class AbstractSearchGenerator
request
- The requestIllegalArgumentException
- If the search field is invalid.protected Set<FrontOfficeSearcherFactory.QueryFacet> getQueryFacets(Request request)
AbstractSearchGenerator
getQueryFacets
in class AbstractSearchGenerator
request
- The requestprotected Map<String,List<String>> getFacetValues(Request request, Collection<String> siteNames, String language) throws IllegalArgumentException
AbstractSearchGenerator
getFacetValues
in class AbstractSearchGenerator
request
- The requestsiteNames
- The site nameslanguage
- The languageIllegalArgumentException
protected Collection<String> getQueryFacetValues(Request request)
AbstractSearchGenerator
getQueryFacetValues
in class AbstractSearchGenerator
request
- The requestprotected void saxHits(SearchResults<AmetysObject> results, int start, int maxResults) throws SAXException, IOException
AbstractSearchGenerator
saxHits
in class AbstractSearchGenerator
results
- The search results.start
- The start indexmaxResults
- The number of results to generate.SAXException
- If an error occurs while SAXingIOException
- If there is a low-level IO errorprotected Sort getSortField(Request request)
AbstractSearchGenerator
getSortField
in class AbstractSearchGenerator
request
- The requestprotected List<Sort> getPrimarySortFields(Request request)
AbstractSearchGenerator
getPrimarySortFields
in class AbstractSearchGenerator
request
- The requestprotected void saxFormFields(Request request, String siteName, String lang) throws SAXException
AbstractSearchGenerator
saxFormFields
in class AbstractSearchGenerator
request
- The requestsiteName
- The current site namelang
- The current languageSAXException
- if an error occurs while SAXingprivate void _saxSitemapCriteria() throws SAXException
SAXException
protected void saxFormValues(Request request, int start, int offset) throws SAXException
AbstractSearchGenerator
saxFormValues
in class AbstractSearchGenerator
request
- The requeststart
- The start indexoffset
- The number of resultsSAXException
- if an error occurs while SAXingprivate void _saxTextField(Request request) throws SAXException
SAXException
private void _saxPages(Request request) throws SAXException
SAXException
private void _saxCreatorField(Request request) throws SAXException
SAXException
private void _saxFormats(Request request) throws SAXException
SAXException
private void _saxPublisher(Request request) throws SAXException
SAXException
private void _saxRights(Request request) throws SAXException
SAXException
private void _saxMultisite(Request request) throws SAXException
SAXException
private void _saxFormatCriteria() throws SAXException
SAXException
private void _saxPublisherCriteria() throws SAXException
SAXException
private void _saxRightsCriteria() throws SAXException
SAXException
private void _addTextFieldQuery(Collection<Query> queries, String language, Request request) throws IllegalArgumentException
IllegalArgumentException
private void _addPagesQuery(Collection<Query> queries, Request request)
private void _addCreatorFieldQuery(Collection<Query> queries, Request request)
private void _addFormatQuery(Collection<Query> queries, Request request)
private void _addPublisherQuery(Collection<Query> queries, Request request)
private void _addRightsQuery(Collection<Query> queries, Request request)