java.lang.Object
org.opencastproject.elasticsearch.impl.AbstractSearchQuery
org.opencastproject.elasticsearch.index.objects.series.SeriesSearchQuery
All Implemented Interfaces:
SearchQuery

public class SeriesSearchQuery extends AbstractSearchQuery
This interface defines a fluent api for a query object used to lookup series in the search index.
  • Field Details

    • identifiers

      protected List<String> identifiers
  • Constructor Details

    • SeriesSearchQuery

      public SeriesSearchQuery(String organization, User user)
      Creates a query that will return series documents.
  • Method Details

    • sortOrderFieldName

      protected String sortOrderFieldName(String field)
      Specified by:
      sortOrderFieldName in class AbstractSearchQuery
    • withIdentifier

      public SeriesSearchQuery withIdentifier(String id)
      Selects series with the given identifier.

      Note that this method may be called multiple times to support selection of multiple series.

      Parameters:
      id - the series identifier
      Returns:
      the enhanced search query
    • getIdentifier

      public String[] getIdentifier()
      Returns the list of series identifiers or an empty array if no identifiers have been specified.
      Returns:
      the identifiers
    • withTitle

      public SeriesSearchQuery withTitle(String title)
      Selects series with the given title.
      Parameters:
      title - the title
      Returns:
      the enhanced search query
    • getTitle

      public String getTitle()
      Returns the title of the series.
      Returns:
      the title
    • withoutActions

      public SeriesSearchQuery withoutActions()
      Filter the series without any action checked.
      Returns:
      the enhanced search query
    • withAction

      public SeriesSearchQuery withAction(Permissions.Action action)
      Filter the series with the given action.

      Note that this method may be called multiple times to support filtering by multiple actions.

      Parameters:
      action - the action
      Returns:
      the enhanced search query
    • getActions

      public String[] getActions()
      Returns the list of actions or an empty array if no actions have been specified.
      Returns:
      the actions
    • withAccessControlEntry

      public SeriesSearchQuery withAccessControlEntry(String role, Permissions.Action action)
      Filter the series with the given role and action.

      Note that this method may be called multiple times to support filtering by multiple role and action combinations.

      Parameters:
      role - the role
      action - the action
      Returns:
      the enhanced search query
    • getAccessControlEntries

      public Map<String,String> getAccessControlEntries()
      Returns the list of access control entries or an empty map if no access control entries have been specified.
      Returns:
      the access control entries
    • withDescription

      public SeriesSearchQuery withDescription(String description)
      Selects series with the given description.
      Parameters:
      description - the description
      Returns:
      the enhanced search query
    • getDescription

      public String getDescription()
      Returns the description of the series.
      Returns:
      the description
    • withSubject

      public SeriesSearchQuery withSubject(String subject)
      Selects series with the given subject.

      Note that this method may be called multiple times to support selection of multiple series.

      Parameters:
      subject - the subject
      Returns:
      the enhanced search query
    • getSubjects

      public String[] getSubjects()
      Returns the list of recording subjects or an empty array if no subject have been specified.
      Returns:
      the subjects
    • getOrganization

      public String getOrganization()
      Returns the organization of the series.
      Returns:
      the organization
    • getUser

      public User getUser()
      Returns the user of this search query
      Returns:
      the user of this search query
    • withLanguage

      public SeriesSearchQuery withLanguage(String language)
      Selects series with the given language.
      Parameters:
      language - the language
      Returns:
      the enhanced search query
    • getLanguage

      public String getLanguage()
      Returns the language of the series.
      Returns:
      the language
    • withCreator

      public SeriesSearchQuery withCreator(String creator)
      Selects series with the given creator.
      Parameters:
      creator - the creator
      Returns:
      the enhanced search query
    • getCreator

      public String getCreator()
      Returns the creator of the series.
      Returns:
      the creator
    • withLicense

      public SeriesSearchQuery withLicense(String license)
      Selects series with the given license.
      Parameters:
      license - the license
      Returns:
      the enhanced search query
    • getLicense

      public String getLicense()
      Returns the license of the series.
      Returns:
      the license
    • withAccessPolicy

      public SeriesSearchQuery withAccessPolicy(String accessPolicy)
      Selects series with the given access policy.
      Parameters:
      accessPolicy - the access policy
      Returns:
      the enhanced search query
    • getAccessPolicy

      public String getAccessPolicy()
      Returns the access policy of the series.
      Returns:
      the access policy
    • withTheme

      public SeriesSearchQuery withTheme(long theme)
      Selects series with the given theme.
      Parameters:
      theme - the theme
      Returns:
      the enhanced search query
    • getTheme

      public Long getTheme()
      Returns the theme of the series.
      Returns:
      the theme
    • withManagedAcl

      public SeriesSearchQuery withManagedAcl(String managedAcl)
      Selects series with the given managed ACL name.
      Parameters:
      managedAcl - the name of the managed ACL
      Returns:
      the enhanced search query
    • getManagedAcl

      public String getManagedAcl()
      Returns the name of the managed ACL set to the series.
      Returns:
      the name of the managed ACL
    • withOrganizer

      public SeriesSearchQuery withOrganizer(String organizer)
      Selects series with the given organizers.

      Note that this method may be called multiple times to support selection of multiple series.

      Parameters:
      organizer - the organizer
      Returns:
      the enhanced search query
    • getOrganizers

      public String[] getOrganizers()
      Returns the list of series organizers or an empty array if no organizers have been specified.
      Returns:
      the organizers
    • withContributor

      public SeriesSearchQuery withContributor(String contributor)
      Selects series with the given contributor.

      Note that this method may be called multiple times to support selection of multiple contributors.

      Parameters:
      contributor - the contributor
      Returns:
      the enhanced search query
    • getContributors

      public String[] getContributors()
      Returns the list of series contributors or an empty array if no contributor have been specified.
      Returns:
      the contributors
    • withPublisher

      public SeriesSearchQuery withPublisher(String publisher)
      Select series with the given publishers
      Parameters:
      publisher - The publisher to add to the search query.
      Returns:
      This query with the added publisher
    • getPublishers

      public String[] getPublishers()
      Returns an array of series publishers or an empty array if no publisher has been specified.
      Returns:
      The publishers
    • withCreatedFrom

      public SeriesSearchQuery withCreatedFrom(Date createdFrom)
      The created date to start looking for series.
      Parameters:
      createdFrom - The created date to start looking for series
      Returns:
      the enhanced search query
    • getCreatedFrom

      public Date getCreatedFrom()
      Returns:
      The Date after which all series returned should have been created
    • withCreatedTo

      public SeriesSearchQuery withCreatedTo(Date createdTo)
      The created date to stop looking for series.
      Parameters:
      createdTo - The created date to stop looking for series
      Returns:
      the enhanced search query
    • getCreatedTo

      public Date getCreatedTo()
      Returns:
      The Date before which all series returned should have been created
    • withEdit

      public SeriesSearchQuery withEdit(Boolean edit)
      Parameters:
      edit - True to only get series with edit permissions
      Returns:
      enhanced search query
    • isEditOnly

      public boolean isEditOnly()
      Returns:
      True to only get series that this user can edit.
    • withRightsHolder

      public SeriesSearchQuery withRightsHolder(String rightsHolder)
      Parameters:
      rightsHolder - The rights holder to search for
      Returns:
      enhanced query
    • getRightsHolder

      public String getRightsHolder()
      Returns:
      The rights holder to search for
    • sortByIdentifer

      public SeriesSearchQuery sortByIdentifer(SortCriterion.Order order)
      Defines the sort order for the series by contributors.
      Parameters:
      order - the order
      Returns:
      the enhanced search query
    • getSeriesIdentifierSortOrder

      public SortCriterion.Order getSeriesIdentifierSortOrder()
      Returns the sort order for the series created date.
      Returns:
      the sort order
    • sortBySubject

      public SeriesSearchQuery sortBySubject(SortCriterion.Order order)
      Defines the sort order for the series by contributors.
      Parameters:
      order - the order
      Returns:
      the enhanced search query
    • getSeriesSubjectSortOrder

      public SortCriterion.Order getSeriesSubjectSortOrder()
      Returns the sort order for the series created date.
      Returns:
      the sort order
    • sortByCreator

      public SeriesSearchQuery sortByCreator(SortCriterion.Order order)
      Defines the sort order for the series by contributors.
      Parameters:
      order - the order
      Returns:
      the enhanced search query
    • getSeriesCreatorSortOrder

      public SortCriterion.Order getSeriesCreatorSortOrder()
      Returns the sort order for the series created date.
      Returns:
      the sort order
    • sortByPublishers

      public SeriesSearchQuery sortByPublishers(SortCriterion.Order order)
      Defines the sort order for the series by contributors.
      Parameters:
      order - the order
      Returns:
      the enhanced search query
    • getSeriesPublishersSortOrder

      public SortCriterion.Order getSeriesPublishersSortOrder()
      Returns the sort order for the series created date.
      Returns:
      the sort order
    • sortByDescription

      public SeriesSearchQuery sortByDescription(SortCriterion.Order order)
      Defines the sort order for the series by contributors.
      Parameters:
      order - the order
      Returns:
      the enhanced search query
    • getSeriesDescriptionSortOrder

      public SortCriterion.Order getSeriesDescriptionSortOrder()
      Returns the sort order for the series created date.
      Returns:
      the sort order
    • sortByLanguage

      public SeriesSearchQuery sortByLanguage(SortCriterion.Order order)
      Defines the sort order for the series by contributors.
      Parameters:
      order - the order
      Returns:
      the enhanced search query
    • getSeriesLanguageSortOrder

      public SortCriterion.Order getSeriesLanguageSortOrder()
      Returns the sort order for the series created date.
      Returns:
      the sort order
    • sortByRightsHolder

      public SeriesSearchQuery sortByRightsHolder(SortCriterion.Order order)
      Defines the sort order for the series by contributors.
      Parameters:
      order - the order
      Returns:
      the enhanced search query
    • getSeriesRightsHolderSortOrder

      public SortCriterion.Order getSeriesRightsHolderSortOrder()
      Returns the sort order for the series created date.
      Returns:
      the sort order
    • sortByLicense

      public SeriesSearchQuery sortByLicense(SortCriterion.Order order)
      Defines the sort order for the series by contributors.
      Parameters:
      order - the order
      Returns:
      the enhanced search query
    • getSeriesLicenseSortOrder

      public SortCriterion.Order getSeriesLicenseSortOrder()
      Returns the sort order for the series created date.
      Returns:
      the sort order
    • sortByContributors

      public SeriesSearchQuery sortByContributors(SortCriterion.Order order)
      Defines the sort order for the series by contributors.
      Parameters:
      order - the order
      Returns:
      the enhanced search query
    • getSeriesContributorsSortOrder

      public SortCriterion.Order getSeriesContributorsSortOrder()
      Returns the sort order for the series created date.
      Returns:
      the sort order
    • sortByManagedAcl

      public SeriesSearchQuery sortByManagedAcl(SortCriterion.Order order)
      Defines the sort order for the managed ACL.
      Parameters:
      order - the order
      Returns:
      the enhanced search query
    • getSeriesManagedAclSortOrder

      public SortCriterion.Order getSeriesManagedAclSortOrder()
      Returns the sort order for the series managed ACL.
      Returns:
      the sort order
    • sortByCreatedDateTime

      public SeriesSearchQuery sortByCreatedDateTime(SortCriterion.Order order)
      Defines the sort order for the series created date & time.
      Parameters:
      order - the order
      Returns:
      the enhanced search query
    • getSeriesDateSortOrder

      public SortCriterion.Order getSeriesDateSortOrder()
      Returns the sort order for the series created date.
      Returns:
      the sort order
    • sortByOrganizers

      public SeriesSearchQuery sortByOrganizers(SortCriterion.Order order)
      Defines the sort order for the series by organizers.
      Parameters:
      order - the order
      Returns:
      the enhanced search query
    • getSeriesOrganizersSortOrder

      public SortCriterion.Order getSeriesOrganizersSortOrder()
      Returns the sort order for the series organizers.
      Returns:
      the sort order
    • sortByTitle

      public SeriesSearchQuery sortByTitle(SortCriterion.Order order)
      Defines the sort order for the series by title.
      Parameters:
      order - the order
      Returns:
      the enhanced search query
    • getSeriesTitleSortOrder

      public SortCriterion.Order getSeriesTitleSortOrder()
      Returns the sort order for the series title.
      Returns:
      the sort order
    • toString

      public String toString()
      Overrides:
      toString in class Object