Changeset 4520
- Timestamp:
- 02/14/14 10:36:21 (10 years ago)
- Location:
- vlo/branches/vlo-3.0
- Files:
-
- 10 edited
Legend:
- Unmodified
- Added
- Removed
-
vlo/branches/vlo-3.0/vlo-commons/src/main/java/eu/clarin/cmdi/vlo/config/XmlVloConfigFactory.java
r4517 r4520 22 22 23 23 /** 24 * Factory that reads a VLO configuration from a URL (typically a local file) 24 25 * 25 26 * @author twagoo … … 29 30 private final URL configLocation; 30 31 32 /** 33 * 34 * @param configLocation URL from which the configuration should be read 35 */ 31 36 public XmlVloConfigFactory(URL configLocation) { 32 37 this.configLocation = configLocation; -
vlo/branches/vlo-3.0/vlo-web-app/src/main/java/eu/clarin/cmdi/vlo/pojo/QueryFacetsSelection.java
r4519 r4520 23 23 24 24 /** 25 * Represents a query and any number of selected values for zero or more facets 25 26 * 26 27 * @author twagoo … … 32 33 33 34 /** 34 * creates an empty selection (no string, no facet values)35 * Creates an empty selection (no string, no facet values) 35 36 */ 36 37 public QueryFacetsSelection() { … … 39 40 40 41 /** 41 * creates a selection without a query42 * Creates a selection without a query 42 43 * 43 44 * @param selection facet values selection map … … 48 49 49 50 /** 50 * creates a selection with a textual query and facet value selection51 * Creates a selection with a textual query and facet value selection 51 52 * 52 53 * @param query textual query -
vlo/branches/vlo-3.0/vlo-web-app/src/main/java/eu/clarin/cmdi/vlo/service/FacetFieldsService.java
r4519 r4520 15 15 * along with this program. If not, see <http://www.gnu.org/licenses/>. 16 16 */ 17 18 17 package eu.clarin.cmdi.vlo.service; 19 18 … … 23 22 24 23 /** 24 * A service that retrieves facet fields based on pre-formulated SOLR query 25 25 * 26 26 * @author twagoo 27 27 */ 28 28 public interface FacetFieldsService { 29 29 30 /** 31 * 32 * @param selection query and selected facet values 33 * @return facet field objects representing the state of all present facets 34 */ 30 35 List<FacetField> getFacetFields(QueryFacetsSelection selection); 31 36 37 /** 38 * 39 * @return the total number of facets 40 */ 32 41 long getFacetFieldCount(); 33 42 } -
vlo/branches/vlo-3.0/vlo-web-app/src/main/java/eu/clarin/cmdi/vlo/service/SolrQueryFactory.java
r4519 r4520 21 21 22 22 /** 23 * A factory that constructs SOLR queries to be used in various services for 24 * data providers etc. 23 25 * 24 26 * @author twagoo … … 27 29 28 30 SolrQuery createFacetQuery(QueryFacetsSelection selection); 29 31 30 32 SolrQuery createCountFacetsQuery(); 31 33 -
vlo/branches/vlo-3.0/vlo-web-app/src/main/java/eu/clarin/cmdi/vlo/service/impl/FacetFieldsDataProvider.java
r4519 r4520 27 27 28 28 /** 29 * Provides FacetField objects given a selection 29 30 * 30 31 * @author twagoo -
vlo/branches/vlo-3.0/vlo-web-app/src/main/java/eu/clarin/cmdi/vlo/service/impl/SolrFacetFieldsService.java
r4519 r4520 25 25 26 26 /** 27 * Gets FacetFields from SOLR based on a selection and the queries constructed 28 * by the provided query factory 27 29 * 28 30 * @author twagoo … … 33 35 private final SolrQueryFactory queryFatory; 34 36 37 /** 38 * 39 * @param searchResultsDao DAO to use to retrieve facets 40 * @param queryFatory factory to use to construct facet queries 41 */ 35 42 public SolrFacetFieldsService(SearchResultsDao searchResultsDao, SolrQueryFactory queryFatory) { 36 43 this.searchResultsDao = searchResultsDao; -
vlo/branches/vlo-3.0/vlo-web-app/src/main/java/eu/clarin/cmdi/vlo/service/impl/SolrQueryFactoryImpl.java
r4519 r4520 29 29 30 30 /** 31 * Implements a SOLR query factory, to be used by SOLR service implementation 32 * for the VLO 31 33 * 32 34 * @author twagoo -
vlo/branches/vlo-3.0/vlo-web-app/src/main/java/eu/clarin/cmdi/vlo/wicket/components/FacetPanel.java
r4515 r4520 24 24 25 25 /** 26 * A panel representing a single facet 26 27 * 27 28 * @author twagoo … … 32 33 super(id, model); 33 34 setDefaultModel(new CompoundPropertyModel<FacetField>(model)); 34 35 35 36 add(new Label("name")); 36 37 } -
vlo/branches/vlo-3.0/vlo-web-app/src/main/java/eu/clarin/cmdi/vlo/wicket/components/FacetsPanel.java
r4515 r4520 28 28 29 29 /** 30 * A panel representing a group of facets 30 31 * 31 32 * @author twagoo -
vlo/branches/vlo-3.0/vlo-web-app/src/main/java/eu/clarin/cmdi/vlo/wicket/pages/FacetedSearchPage.java
r4519 r4520 5 5 import java.util.Collection; 6 6 import java.util.Collections; 7 import java.util.HashMap; 7 8 import org.apache.wicket.request.mapper.parameter.PageParameters; 8 9 import org.apache.wicket.markup.html.WebPage; 9 10 import org.apache.wicket.model.Model; 10 11 12 /** 13 * The main search page showing a search form, facets, and search results 14 * 15 * @author twagoo 16 */ 11 17 public class FacetedSearchPage extends WebPage { 12 18 … … 17 23 18 24 final QueryFacetsSelection selection = new QueryFacetsSelection( 19 Collections.<String, Collection<String>>singletonMap("language", Collections.singleton("Dutch"))); 25 new HashMap<String, Collection<String>>() { 26 { 27 put("language", Collections.singleton("Dutch")); 28 put("continent", Collections.<String>emptyList()); 29 } 30 }); 20 31 21 32 add(new FacetsPanel("facets", new Model<QueryFacetsSelection>(selection)));
Note: See TracChangeset
for help on using the changeset viewer.