ontology/solr-facet-tree/src/main/java/uk/co/flax/biosolr/builders/FacetTreeBuilderFactory.java
/**
	 * Construct a {@link FacetTreeBuilder} from a set of local parameters.
	 * @param params the local parameters parsed from a 
	 * <code>facet.tree.field</code> parameter.
	 * @return an appropriate {@link FacetTreeBuilder}, or <code>null</code>
	 * if none could be found.
	 * @throws SyntaxError if required parameters are missing for the derived
	 * {@link FacetTreeBuilder}, or the strategy is unrecognised.
	 */
Construct a  FacetTreeBuilder from a set of local parameters.
@param params the local parameters parsed from a
facet.tree.field parameter.
@return an appropriate  FacetTreeBuilder, or null
if none could be found.
@throws SyntaxError if required parameters are missing for the derived
FacetTreeBuilder, or the strategy is unrecognised.
Construct a FacetTreeBuilder from a set of local parameters . @param params the local parameters parsed from a facet . tree . field parameter . @return an appropriate FacetTreeBuilder or null if none could be found . @throws SyntaxError if required parameters are missing for the derived FacetTreeBuilder or the strategy is unrecognised .
public FacetTreeBuilder constructFacetTreeBuilder(SolrParams params) throws SyntaxError {
		if (params == null) {
			throw new SyntaxError("No local parameters supplied.");
		}
		String strategy = deriveStrategyFromLocalParams(params);
		if (StringUtils.isBlank(strategy)) {
			throw new SyntaxError("Unable to derive strategy from parameters");
		}
		FacetTreeBuilder ftb = constructFacetTreeBuilderFromStrategy(strategy);
		if (ftb == null) {
			throw new SyntaxError("Unrecognised strategy for facet tree: " + strategy);
		}
		ftb.initialiseParameters(params);
		return ftb;
	}
public FacetTreeBuilder constructFacetTreeBuilder ( SolrParams params ) throws SyntaxError { if ( params == null ) { throw new SyntaxError ( "No local parameters supplied." ) ; } String strategy = deriveStrategyFromLocalParams ( params ) ; if ( StringUtils . isBlank ( strategy ) ) { throw new SyntaxError ( "Unable to derive strategy from parameters" ) ; } FacetTreeBuilder ftb = constructFacetTreeBuilderFromStrategy ( strategy ) ; if ( ftb == null ) { throw new SyntaxError ( "Unrecognised strategy for facet tree: " + strategy ) ; } ftb . initialiseParameters ( params ) ; return ftb ; }
Construct a {@link FacetTreeBuilder} from a set of local parameters.
Construct a { @link FacetTreeBuilder } from a set of local parameters .
// Initialise the FacetTreeBuilder parameters