eu.xenit.apix.search.SearchQueryResult Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of apix-interface Show documentation
Show all versions of apix-interface Show documentation
Xenit API-X Java interface
package eu.xenit.apix.search;
import eu.xenit.apix.data.NodeRef;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
/**
* Datastructure that represents the result of a search.
* noderefs: The list of noderefs that fulfill the search.
* facets: The facets available on the search result.
*/
public class SearchQueryResult {
private List noderefs = new ArrayList<>();
private List facets;
public long totalResultCount;
private Highlights highlights;
public List getNoderefs() {
return noderefs;
}
public void setNoderefs(List noderefs) {
this.noderefs = noderefs;
}
public void addResult(NodeRef nodeRef) {
noderefs.add(nodeRef.toString());
}
public List getFacets() {
return facets;
}
public void setFacets(List facets) {
this.facets = facets;
}
/**
* @return Returns the total number of results for the search query. Depending on if the query is executed
* against the database or Solr this will include the skipped results or not.
*/
public long getTotalResultCount() {
return totalResultCount;
}
public void setTotalResultCount(long totalResultCount) {
this.totalResultCount = totalResultCount;
}
public Highlights getHighlights() {
return highlights;
}
public void setHighlights(Highlights highlights) {
this.highlights = highlights;
}
@Override
public String toString() {
return "SearchQueryResult{" +
"totalResultCount=" + totalResultCount +
", noderefs=" + noderefs +
", facets=" + facets +
", highlights=" + highlights +
'}';
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy