Class KeywordQuery

  • All Implemented Interfaces:
    Query

    public class KeywordQuery
    extends Object
    implements Query
    Represents a Query testing the keywords property of a project resource.
    • Constructor Detail

      • KeywordQuery

        public KeywordQuery​(String... keywords)
        Build a KeywordQuery to test if the keywords property is equal to one of the given keywords
        Parameters:
        keywords - the keywords.
      • KeywordQuery

        public KeywordQuery​(Collection<String> keywords)
        Build a KeywordQuery to test if the keywords property is equal to one of the given keywords
        Parameters:
        keywords - the keywords.
      • KeywordQuery

        public KeywordQuery​(Query.Operator operator,
                            String... keywords)
        Build a KeywordQuery to test if the keywords property is equal or different to one of the given keywords
        Parameters:
        operator - the operator (equal ot not-equal)
        keywords - the keywords.
    • Method Detail

      • build

        public String build()
                     throws QuerySyntaxException
        Description copied from interface: Query
        Build the solr query string representing the Query object.
        Specified by:
        build in interface Query
        Returns:
        the solr query string representing the Query object.
        Throws:
        QuerySyntaxException - if the query can't be built because of a syntax error.