All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.wicketstuff.datatable_autocomplete.trie.ITrieConfiguration Maven / Gradle / Ivy

/*
 * 
 * ==============================================================================
 * Licensed under the Apache License, Version 2.0 (the "License"); you may not
 * use this file except in compliance with the License. You may obtain a copy of
 * the License at
 * 
 * http://www.apache.org/licenses/LICENSE-2.0
 * 
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
 * License for the specific language governing permissions and limitations under
 * the License.
 */
package org.wicketstuff.datatable_autocomplete.trie;

import org.apache.wicket.IClusterable;


/**
 * @author mocleiri
 * 
 * Provides the logic to create the string that is indexed from the actual object context.
 * 
 * Can hint as to the 
 *
 */
public interface ITrieConfiguration extends IClusterable {
	
	/**
	 * Extract the word from the context given.
	 * 
	 * @param ctx
	 * @return the extracted word.
	 */
	public String getWord (C ctx);
	
	/**
	 * Provides the default filter to be used when searching for a match.
	 * 
	 */
	public ITrieFilter getDefaultFilter();
	
	/**
	 * 
	 * If true then capitalized and lower case will be sorted separately.
	 * 
	 * If false the word will be converted to lower case.
	 * 
	 * @return case sensitivity of the index.
	 * 
	 */
	public boolean isIndexCaseSensitive();
	

	public TrieNode createTrieNode(TrieNode parent, String rootMatchedString,
			String nextCharacter);
	
	/**
	 * A callback to let the instantiated trie to register with us.
	 * @param containerTrie
	 */
	public void setTrie (Trie containerTrie);
	
	
	/**
	 * 
	 * @return true if the trie contains a suffix tree (used when the trie is built to make sure we build it right).
	 * 
	 */
	public boolean isSuffixTree();
	
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy