/**********************************************************************************
 * $URL: https://source.sakaiproject.org/svn/search/tags/sakai_2-3-1/search-api/api/src/java/org/sakaiproject/search/api/SearchResult.java $
 * $Id: SearchResult.java 10080 2006-05-30 05:24:18Z ian@caret.cam.ac.uk $
 ***********************************************************************************
 *
 * Copyright (c) 2003, 2004, 2005, 2006 The Sakai Foundation.
 *
 * Licensed under the Educational Community License, Version 1.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.opensource.org/licenses/ecl1.php
 *
 * 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.sakaiproject.search.api;

import java.util.Map;

/**
 * @author ieb
 */
public interface SearchResult
{

	/**
	 * the result score
	 * 
	 * @return
	 */
	float getScore();

	/**
	 * The result ID (entity id)
	 * 
	 * @return
	 */
	String getId();

	/**
	 * All field names in the search record
	 * 
	 * @return
	 */
	String[] getFieldNames();

	/**
	 * All values in a search field
	 * 
	 * @param string
	 * @return
	 */
	String[] getValues(String string);

	/**
	 * Get a map of values in the result
	 * 
	 * @return
	 */
	Map getValueMap();

	/**
	 * An absolute URL to the resource (no host, protocol or port)
	 * 
	 * @return
	 */
	String getUrl();

	/**
	 * The title of the resource, usually including the type (eg Wiki Page,
	 * Resource)
	 * 
	 * @return
	 */
	String getTitle();

	/**
	 * get the index of the search entry over the whole change set
	 * 
	 * @return
	 */
	int getIndex();

	/**
	 * get the search result content for display
	 */
	String getSearchResult();

	/**
	 * get the Sakai Entity Reference String
	 * @return
	 */
	String getReference();

}
