Fixed rebase conflits

This commit is contained in:
Raf Ponsaerts
2018-08-09 10:22:06 +02:00
parent 544536ccef
commit db6c9faf83
4 changed files with 55 additions and 19 deletions

View File

@@ -43,22 +43,22 @@ public class DiscoverySearchFilter {
}
/**
* Returns the type of the DiscoverySearchFilter
* @return The type of the DiscoverySearchFilter
*/
* Returns the type of the DiscoverySearchFilter
* @return The type of the DiscoverySearchFilter
*/
public String getType() {
return type;
}
/**
* Sets the type of the DiscoverySearchFilter to the one given in the parameter if it matches
* a set of possible types
* The possible types are described in: {@link org.dspace.discovery.configuration.DiscoveryConfigurationParameters}
* For the DiscoverySearchFilter only the TYPE_TEXT, TYPE_DATE and TYPE_HIERARCHICAL are allowed
*
* @param type The type for this DiscoverySearchFilter
* @throws DiscoveryConfigurationException If none of the types match, this error will be thrown indiciating this
*/
* Sets the type of the DiscoverySearchFilter to the one given in the parameter if it matches
* a set of possible types
* The possible types are described in: {@link org.dspace.discovery.configuration.DiscoveryConfigurationParameters}
* For the DiscoverySearchFilter only the TYPE_TEXT, TYPE_DATE and TYPE_HIERARCHICAL are allowed
*
* @param type The type for this DiscoverySearchFilter
* @throws DiscoveryConfigurationException If none of the types match, this error will be thrown indiciating this
*/
public void setType(String type) throws DiscoveryConfigurationException {
if (type.equalsIgnoreCase(DiscoveryConfigurationParameters.TYPE_TEXT)) {
this.type = DiscoveryConfigurationParameters.TYPE_TEXT;

View File

@@ -89,11 +89,11 @@ public class DiscoverFacetsConverter {
}
/**
* This method will fill the facetEntry with the appropriate min and max values if they're not empty
* @param context The relevant DSpace context
* @param field The DiscoverySearchFilterFacet field to search for this value in solr
* @param facetEntry The SearchFacetEntryRest facetEntry for which this needs to be filled in
*/
* This method will fill the facetEntry with the appropriate min and max values if they're not empty
* @param context The relevant DSpace context
* @param field The DiscoverySearchFilterFacet field to search for this value in solr
* @param facetEntry The SearchFacetEntryRest facetEntry for which this needs to be filled in
*/
private void handleExposeMinMaxValues(Context context,DiscoverySearchFilterFacet field,
SearchFacetEntryRest facetEntry) {
try {

View File

@@ -119,9 +119,19 @@ public class SearchConfigurationRest extends BaseObjectRest<String> {
public static final String OPERATOR_NOTCONTAINS = "notcontains";
public static final String OPERATOR_QUERY = "query";
/**
* Specifies whether this filter has facets or not
* @return A boolean indicating whether this filter has facets or not
*/
public boolean isHasFacets() {
return hasFacets;
}
/**
* Sets the hasFacets property of the filter class to the given boolean
*
* @param hasFacets The boolean that the hasFacets property will be set to
*/
public void setHasFacets(boolean hasFacets) {
this.hasFacets = hasFacets;
}
@@ -150,11 +160,15 @@ public class SearchConfigurationRest extends BaseObjectRest<String> {
public void setType(String type) {
this.type = type;
}
/**
* See documentantion at {@link DiscoverySearchFilter#isOpenByDefault()}
*/
public boolean isOpenByDefault() {
return isOpenByDefault;
}
/**
* See documentantion at {@link DiscoverySearchFilter#setIsOpenByDefault(boolean)}
*/
public void setOpenByDefault(boolean openByDefault) {
isOpenByDefault = openByDefault;
}

View File

@@ -13,6 +13,7 @@ import java.util.List;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonInclude;
import org.dspace.app.rest.DiscoveryRestController;
import org.dspace.discovery.configuration.DiscoverySearchFilterFacet;
/**
* This class' purpose is to create a container for the information used in the SearchFacetEntryResource
@@ -97,26 +98,47 @@ public class SearchFacetEntryRest implements RestAddressableModel {
this.facetLimit = facetLimit;
}
/**
* See documentation at {@link DiscoverySearchFilterFacet#exposeMinAndMaxValue()}
*/
public boolean exposeMinAndMaxValue() {
return exposeMinMax;
}
/**
* See documentation at {@link DiscoverySearchFilterFacet#setExposeMinAndMaxValue(boolean)}
*/
public void setExposeMinMax(boolean exposeMinMax) {
this.exposeMinMax = exposeMinMax;
}
/**
* Returns the smallest value that can be found for this value in solr
* @return The smallest value for this facet as a String
*/
public String getMinValue() {
return minValue;
}
/**
* Sets the minValue property for the SearchFacetEntryRest to the given parameter
* @param minValue The String that the minValue will be set to
*/
public void setMinValue(String minValue) {
this.minValue = minValue;
}
/**
* Returns the highest value that can be found for this value in solr
* @return The highest value for this facet as a String
*/
public String getMaxValue() {
return maxValue;
}
/**
* Sets the maxValue property for the SearchFacetEntryRest to the given parameter
* @param maxValue The String that the maxValue will be set to
*/
public void setMaxValue(String maxValue) {
this.maxValue = maxValue;
}