001: /**********************************************************************************
002: * $URL: https://source.sakaiproject.org/svn/citations/tags/sakai_2-4-1/citations-api/api/src/java/org/sakaiproject/citation/api/SearchManager.java $
003: * $Id: SearchManager.java 22676 2007-03-15 17:34:35Z gbhatnag@umich.edu $
004: ***********************************************************************************
005: *
006: * Copyright (c) 2006 The Sakai Foundation.
007: *
008: * Licensed under the Educational Community License, Version 1.0 (the "License");
009: * you may not use this file except in compliance with the License.
010: * You may obtain a copy of the License at
011: *
012: * http://www.opensource.org/licenses/ecl1.php
013: *
014: * Unless required by applicable law or agreed to in writing, software
015: * distributed under the License is distributed on an "AS IS" BASIS,
016: * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
017: * See the License for the specific language governing permissions and
018: * limitations under the License.
019: *
020: **********************************************************************************/package org.sakaiproject.citation.api;
021:
022: import java.io.IOException;
023: import java.util.List;
024: import java.util.Map;
025:
026: import org.osid.repository.RepositoryIterator;
027: import org.sakaiproject.citation.api.ActiveSearch;
028: import org.sakaiproject.citation.util.api.SearchException;
029:
030: /**
031: *
032: */
033: public interface SearchManager {
034: public static final int DEFAULT_PAGE_SIZE = 10;
035: public static final int DEFAULT_START_RECORD = 1;
036: public static final int MIN_START_RECORD = 1;
037: public static final String DEFAULT_SORT_BY = "rank";
038:
039: public static final String ASSET_NOT_FETCHED = "An Asset is available, but has not yet been fetched.";
040:
041: public static final String METASEARCH_ERROR = "Metasearch error has occured.";
042:
043: public static final String SESSION_TIMED_OUT = "Metasearch session has timed out.";
044:
045: /**
046: * @param search
047: * @return
048: * @throws SearchException
049: */
050: public ActiveSearch doNextPage(ActiveSearch search)
051: throws SearchException;
052:
053: /**
054: * @param search
055: * @return
056: * @throws SearchException
057: */
058: public ActiveSearch doPrevPage(ActiveSearch search)
059: throws SearchException;
060:
061: /**
062: * @param search
063: * @return
064: * @throws SearchException
065: */
066: public ActiveSearch doSearch(ActiveSearch search)
067: throws SearchException;
068:
069: /**
070: * @return The SearchDatabaseHierarchy for this search.
071: * @throws SearchException
072: * @see SearchDatabaseHierarchy
073: */
074: public SearchDatabaseHierarchy getSearchHierarchy()
075: throws SearchException;
076:
077: /**
078: * @return
079: */
080: public ActiveSearch newSearch();
081:
082: /**
083: * @param savedResults
084: * @return
085: */
086: public ActiveSearch newSearch(CitationCollection savedResults);
087:
088: /**
089: * @param resourceId
090: * @return
091: */
092: public String getGoogleScholarUrl(String resourceId);
093:
094: /**
095: * Sets the databases that have been selected to search.
096: *
097: * @param databaseIds String array of database ids that have been
098: * selected to search
099: */
100: public void setDatabaseIds(String[] databaseIds);
101:
102: }
|