mirror of
https://github.com/DSpace/DSpace.git
synced 2025-10-15 05:53:08 +00:00
DS-4166 community feedback: remove unused methods and configurations
This commit is contained in:
@@ -30,8 +30,6 @@ public class DiscoverResult {
|
|||||||
private int start;
|
private int start;
|
||||||
private List<IndexableObject> indexableObjects;
|
private List<IndexableObject> indexableObjects;
|
||||||
private Map<String, List<FacetResult>> facetResults;
|
private Map<String, List<FacetResult>> facetResults;
|
||||||
private Map<String, List<FacetResult>> facetQueryResults;
|
|
||||||
private Map<String, List<FacetResult>> facetFieldResults;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A map that contains all the documents sougth after, the key is a string representation of the Indexable Object
|
* A map that contains all the documents sougth after, the key is a string representation of the Indexable Object
|
||||||
@@ -45,8 +43,6 @@ public class DiscoverResult {
|
|||||||
public DiscoverResult() {
|
public DiscoverResult() {
|
||||||
indexableObjects = new ArrayList<IndexableObject>();
|
indexableObjects = new ArrayList<IndexableObject>();
|
||||||
facetResults = new LinkedHashMap<String, List<FacetResult>>();
|
facetResults = new LinkedHashMap<String, List<FacetResult>>();
|
||||||
facetQueryResults = new LinkedHashMap<String, List<FacetResult>>();
|
|
||||||
facetFieldResults = new LinkedHashMap<String, List<FacetResult>>();
|
|
||||||
searchDocuments = new LinkedHashMap<String, List<SearchDocument>>();
|
searchDocuments = new LinkedHashMap<String, List<SearchDocument>>();
|
||||||
highlightedResults = new HashMap<String, IndexableObjectHighlightResult>();
|
highlightedResults = new HashMap<String, IndexableObjectHighlightResult>();
|
||||||
}
|
}
|
||||||
@@ -104,40 +100,6 @@ public class DiscoverResult {
|
|||||||
return facetResults;
|
return facetResults;
|
||||||
}
|
}
|
||||||
|
|
||||||
public List<FacetResult> getFacetQueryResult(String facet) {
|
|
||||||
return facetQueryResults.get(facet) == null ? new ArrayList<FacetResult>() : facetQueryResults.get(facet);
|
|
||||||
}
|
|
||||||
|
|
||||||
public void addFacetQueryResult(String facetField, FacetResult... facetResults) {
|
|
||||||
List<FacetResult> facetValues = this.facetQueryResults.get(facetField);
|
|
||||||
if (facetValues == null) {
|
|
||||||
facetValues = new ArrayList<FacetResult>();
|
|
||||||
}
|
|
||||||
facetValues.addAll(Arrays.asList(facetResults));
|
|
||||||
this.facetQueryResults.put(facetField, facetValues);
|
|
||||||
}
|
|
||||||
|
|
||||||
public Map<String, List<FacetResult>> getFacetQueryResults() {
|
|
||||||
return facetQueryResults;
|
|
||||||
}
|
|
||||||
|
|
||||||
public List<FacetResult> getFacetFieldResult(String facet) {
|
|
||||||
return facetFieldResults.get(facet) == null ? new ArrayList<FacetResult>() : facetFieldResults.get(facet);
|
|
||||||
}
|
|
||||||
|
|
||||||
public void addFacetFieldResult(String facetField, FacetResult... facetResults) {
|
|
||||||
List<FacetResult> facetValues = this.facetFieldResults.get(facetField);
|
|
||||||
if (facetValues == null) {
|
|
||||||
facetValues = new ArrayList<FacetResult>();
|
|
||||||
}
|
|
||||||
facetValues.addAll(Arrays.asList(facetResults));
|
|
||||||
this.facetFieldResults.put(facetField, facetValues);
|
|
||||||
}
|
|
||||||
|
|
||||||
public Map<String, List<FacetResult>> getFacetFieldResults() {
|
|
||||||
return facetFieldResults;
|
|
||||||
}
|
|
||||||
|
|
||||||
public List<FacetResult> getFacetResult(String facet) {
|
public List<FacetResult> getFacetResult(String facet) {
|
||||||
return ListUtils.emptyIfNull(facetResults.get(facet));
|
return ListUtils.emptyIfNull(facetResults.get(facet));
|
||||||
}
|
}
|
||||||
|
@@ -21,18 +21,9 @@ import org.dspace.services.factory.DSpaceServicesFactory;
|
|||||||
*/
|
*/
|
||||||
public class DiscoveryConfigurationService {
|
public class DiscoveryConfigurationService {
|
||||||
|
|
||||||
private Map<String, List<String>> extraConfigurationMapping = new HashMap<String, List<String>>();
|
|
||||||
private Map<String, DiscoveryConfiguration> map;
|
private Map<String, DiscoveryConfiguration> map;
|
||||||
private Map<Integer, List<String>> toIgnoreMetadataFields = new HashMap<>();
|
private Map<Integer, List<String>> toIgnoreMetadataFields = new HashMap<>();
|
||||||
|
|
||||||
public void setExtraConfigurationMapping(Map<String, List<String>> extraConfigurationMapping) {
|
|
||||||
this.extraConfigurationMapping = extraConfigurationMapping;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Map<String, List<String>> getExtraConfigurationMapping() {
|
|
||||||
return extraConfigurationMapping;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Map<String, DiscoveryConfiguration> getMap() {
|
public Map<String, DiscoveryConfiguration> getMap() {
|
||||||
return map;
|
return map;
|
||||||
}
|
}
|
||||||
|
@@ -345,16 +345,6 @@
|
|||||||
<value>search.resourcetype:2 OR search.resourcetype:[8 TO 9]</value>
|
<value>search.resourcetype:2 OR search.resourcetype:[8 TO 9]</value>
|
||||||
</list>
|
</list>
|
||||||
</property>
|
</property>
|
||||||
<!--The configuration for the recent submissions-->
|
|
||||||
<property name="recentSubmissionConfiguration">
|
|
||||||
<bean class="org.dspace.discovery.configuration.DiscoveryRecentSubmissionsConfiguration">
|
|
||||||
<property name="metadataSortField" value="dc.date.accessioned" />
|
|
||||||
<property name="type" value="date"/>
|
|
||||||
<property name="max" value="20"/>
|
|
||||||
<!-- If enabled the collection home page will not display metadata but show a pageable list of recent submissions -->
|
|
||||||
<property name="useAsHomePage" value="false"/>
|
|
||||||
</bean>
|
|
||||||
</property>
|
|
||||||
<!--Default result per page -->
|
<!--Default result per page -->
|
||||||
<property name="defaultRpp" value="10" />
|
<property name="defaultRpp" value="10" />
|
||||||
<property name="hitHighlightingConfiguration">
|
<property name="hitHighlightingConfiguration">
|
||||||
@@ -383,26 +373,6 @@
|
|||||||
</property>
|
</property>
|
||||||
</bean>
|
</bean>
|
||||||
</property>
|
</property>
|
||||||
<property name="moreLikeThisConfiguration">
|
|
||||||
<bean class="org.dspace.discovery.configuration.DiscoveryMoreLikeThisConfiguration">
|
|
||||||
<!--When altering this list also alter the "xmlui.Discovery.RelatedItems.help" key as it describes
|
|
||||||
the metadata fields below-->
|
|
||||||
<property name="similarityMetadataFields">
|
|
||||||
<list>
|
|
||||||
<value>dc.title</value>
|
|
||||||
<value>dc.contributor.author</value>
|
|
||||||
<value>dc.creator</value>
|
|
||||||
<value>dc.subject</value>
|
|
||||||
</list>
|
|
||||||
</property>
|
|
||||||
<!--The minimum number of matching terms across the metadata fields above before an item is found as related -->
|
|
||||||
<property name="minTermFrequency" value="5"/>
|
|
||||||
<!--The maximum number of related items displayed-->
|
|
||||||
<property name="max" value="3"/>
|
|
||||||
<!--The minimum word length below which words will be ignored-->
|
|
||||||
<property name="minWordLength" value="5"/>
|
|
||||||
</bean>
|
|
||||||
</property>
|
|
||||||
<!-- When true a "did you mean" example will be displayed, value can be true or false -->
|
<!-- When true a "did you mean" example will be displayed, value can be true or false -->
|
||||||
<property name="spellCheckEnabled" value="true"/>
|
<property name="spellCheckEnabled" value="true"/>
|
||||||
</bean>
|
</bean>
|
||||||
@@ -452,16 +422,6 @@
|
|||||||
<value>search.resourcetype:[10 TO 11]</value>
|
<value>search.resourcetype:[10 TO 11]</value>
|
||||||
</list>
|
</list>
|
||||||
</property>
|
</property>
|
||||||
<!--The configuration for the recent submissions-->
|
|
||||||
<property name="recentSubmissionConfiguration">
|
|
||||||
<bean class="org.dspace.discovery.configuration.DiscoveryRecentSubmissionsConfiguration">
|
|
||||||
<property name="metadataSortField" value="dc.date.accessioned" />
|
|
||||||
<property name="type" value="date"/>
|
|
||||||
<property name="max" value="20"/>
|
|
||||||
<!-- If enabled the collection home page will not display metadata but show a pageable list of recent submissions -->
|
|
||||||
<property name="useAsHomePage" value="false"/>
|
|
||||||
</bean>
|
|
||||||
</property>
|
|
||||||
<!--Default result per page -->
|
<!--Default result per page -->
|
||||||
<property name="defaultRpp" value="10" />
|
<property name="defaultRpp" value="10" />
|
||||||
<property name="hitHighlightingConfiguration">
|
<property name="hitHighlightingConfiguration">
|
||||||
@@ -490,26 +450,6 @@
|
|||||||
</property>
|
</property>
|
||||||
</bean>
|
</bean>
|
||||||
</property>
|
</property>
|
||||||
<property name="moreLikeThisConfiguration">
|
|
||||||
<bean class="org.dspace.discovery.configuration.DiscoveryMoreLikeThisConfiguration">
|
|
||||||
<!--When altering this list also alter the "xmlui.Discovery.RelatedItems.help" key as it describes
|
|
||||||
the metadata fields below-->
|
|
||||||
<property name="similarityMetadataFields">
|
|
||||||
<list>
|
|
||||||
<value>dc.title</value>
|
|
||||||
<value>dc.contributor.author</value>
|
|
||||||
<value>dc.creator</value>
|
|
||||||
<value>dc.subject</value>
|
|
||||||
</list>
|
|
||||||
</property>
|
|
||||||
<!--The minimum number of matching terms across the metadata fields above before an item is found as related -->
|
|
||||||
<property name="minTermFrequency" value="5"/>
|
|
||||||
<!--The maximum number of related items displayed-->
|
|
||||||
<property name="max" value="3"/>
|
|
||||||
<!--The minimum word length below which words will be ignored-->
|
|
||||||
<property name="minWordLength" value="5"/>
|
|
||||||
</bean>
|
|
||||||
</property>
|
|
||||||
<!-- When true a "did you mean" example will be displayed, value can be true or false -->
|
<!-- When true a "did you mean" example will be displayed, value can be true or false -->
|
||||||
<property name="spellCheckEnabled" value="true"/>
|
<property name="spellCheckEnabled" value="true"/>
|
||||||
</bean>
|
</bean>
|
||||||
|
Reference in New Issue
Block a user