Package org.dspace.discovery.configuration

Examples of org.dspace.discovery.configuration.HierarchicalSidebarFacetConfiguration


                        }
                    }
                    else if (searchFilter.getType().equals(
                            DiscoveryConfigurationParameters.TYPE_HIERARCHICAL))
                    {
                        HierarchicalSidebarFacetConfiguration hierarchicalSidebarFacetConfiguration = (HierarchicalSidebarFacetConfiguration) searchFilter;
                        String[] subValues = svalue
                                .split(hierarchicalSidebarFacetConfiguration
                                        .getSplitter());
                        if (hierarchicalSidebarFacetConfiguration
                                .isSkipFirstNodeLevel() && 1 < subValues.length)
                        {
                            // Remove the first element of our array
                            subValues = (String[]) ArrayUtils.subarray(
                                    subValues, 1, subValues.length);
                        }
                        for (int i = 0; i < subValues.length; i++)
                        {
                            StringBuilder valueBuilder = new StringBuilder();
                            for (int j = 0; j <= i; j++)
                            {
                                valueBuilder.append(subValues[j]);
                                if (j < i)
                                {
                                    valueBuilder
                                            .append(hierarchicalSidebarFacetConfiguration
                                                    .getSplitter());
                                }
                            }

                            String indexValue = valueBuilder.toString().trim();
View Full Code Here


                                      }
                                }
                            }else
                            if(searchFilter.getType().equals(DiscoveryConfigurationParameters.TYPE_HIERARCHICAL))
                            {
                                HierarchicalSidebarFacetConfiguration hierarchicalSidebarFacetConfiguration = (HierarchicalSidebarFacetConfiguration) searchFilter;
                                String[] subValues = value.split(hierarchicalSidebarFacetConfiguration.getSplitter());
                                if(hierarchicalSidebarFacetConfiguration.isSkipFirstNodeLevel() && 1 < subValues.length)
                                {
                                    //Remove the first element of our array
                                    subValues = (String[]) ArrayUtils.subarray(subValues, 1, subValues.length);
                                }
                                for (int i = 0; i < subValues.length; i++)
                                {
                                    StringBuilder valueBuilder = new StringBuilder();
                                    for(int j = 0; j <= i; j++)
                                    {
                                        valueBuilder.append(subValues[j]);
                                        if(j < i)
                                        {
                                            valueBuilder.append(hierarchicalSidebarFacetConfiguration.getSplitter());
                                        }
                                    }

                                    String indexValue = valueBuilder.toString().trim();
                                    doc.addField(searchFilter.getIndexFieldName() + "_tax_" + i + "_filter", indexValue.toLowerCase() + separator + indexValue);
View Full Code Here

TOP

Related Classes of org.dspace.discovery.configuration.HierarchicalSidebarFacetConfiguration

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.