public enum RestSearchOperator extends Enum<RestSearchOperator>
| Enum Constant and Description |
|---|
AUTHORITY
The authority operator can be used by adding an id: infront of the search query
It then becomes id:VALUE to call for a search on the authority operator for VALUE
|
CONTAINS
The contains operator can be used by adding a * behind the search query
It then becomes VALUE* to call for a search on the contains operator for VALUE
|
EQUALS
The equals operator is default and will be used if none of the above are matched
|
NOTAUTHORITY
The notauthority operator can be used by adding a -id: infront of the search query
It then becomes -id:VALUE to call for a search on the notauthority operator for VALUE
|
NOTCONTAINS
The notcontains operator can be used by adding a - (minus) infront of the search query
and a * at the end
It then becomes -VALUE* to call for a search on the notcontains operator for VALUE
|
NOTEQUALS
The notequals operator can be used by adding a - infront of the search query
It then becomes -VALUE to call for a search on the notequals operator for VALUE
|
| Modifier and Type | Method and Description |
|---|---|
String |
extractValue(String query)
This method extracts the value from the query.
|
static RestSearchOperator |
forQuery(String query)
This method will return the correct RestSearchOperator that's bound to the query given in the parameter.
|
String |
getDspaceOperator() |
Pattern |
getRegex() |
static RestSearchOperator |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static RestSearchOperator[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final RestSearchOperator NOTCONTAINS
public static final RestSearchOperator NOTAUTHORITY
public static final RestSearchOperator NOTEQUALS
public static final RestSearchOperator CONTAINS
public static final RestSearchOperator AUTHORITY
public static final RestSearchOperator EQUALS
public static RestSearchOperator[] values()
for (RestSearchOperator c : RestSearchOperator.values()) System.out.println(c);
public static RestSearchOperator valueOf(String name)
name - the name of the enum constant to be returned.IllegalArgumentException - if this enum type has no constant with the specified nameNullPointerException - if the argument is nullpublic String extractValue(String query)
query - The full query that was usedpublic static RestSearchOperator forQuery(String query)
query - The query for which we'll return the appropriate RestSearchOperatorpublic Pattern getRegex()
public String getDspaceOperator()
Copyright © 2019 DuraSpace. All rights reserved.