Go to most recent revision | Blame | Last modification | View Log | Download | RSS feed
/*==============================================================================Project: Simple JAVA Search Engine for Keyword SearchJAVA Source file for the class IndexEntryCOPYRIGHT (C), 1998, Thomas BaierALL RIGHTS RESERVED.$Source: /scratch/CVS-ARCHIVE/R/doc/html/search/IndexEntry.java,v $$Revision: 1.1 $$Date: 1998/05/15 10:38:09 $$Author: leisch $==============================================================================*//* -------------------------------- Imports --------------------------------- */import java.lang.Object;import java.lang.String;import java.applet.AppletContext;import java.net.URL;import java.net.MalformedURLException;/*==============================================================================Interface of class IndexEntry==============================================================================*//*------------------------------------------------------------------------------CLASS: IndexEntrySUPER: ObjectCONF. TO:PURPOSE:NOTES:HISTORY: 98-04-26: created------------------------------------------------------------------------------*/public class IndexEntry extends Object{/*============================================================================Public methods============================================================================*//*----------------------------------------------------------------------------INTERFACE:PURPOSE: constructorNOTES:PARAMS:THROWS:RETURNS: voidHISTORY: 98-04-26: created98-05-08: adapted for new index file format98-05-10: added trace----------------------------------------------------------------------------*/public IndexEntry (String title,String keywords,String desc,String url){iTitle = title;iKey = keywords;iDescription = desc;iURL = url;// trace hereTracer.write ("Created IndexEntry. Title = \"" +title + "\", Keywords = \"" + keywords + "\"\n");return;}/*----------------------------------------------------------------------------INTERFACE:PURPOSE: check for a matching search stringNOTES: case-insensitive comparePARAMS:THROWS:RETURNS: boolean: true if matchesHISTORY: 98-04-26: created----------------------------------------------------------------------------*/public boolean matches (String aString){// case-insensitive substring!if (iKey.toUpperCase ().indexOf (aString.toUpperCase ()) > -1) {return true;} else {return false;}}/*----------------------------------------------------------------------------INTERFACE:PURPOSE: return the description textNOTES:PARAMS:THROWS:RETURNS: String: the descriptionHISTORY: 98-04-26: created----------------------------------------------------------------------------*/public String getDescription (){return iDescription;}/*----------------------------------------------------------------------------INTERFACE:PURPOSE: return the title stringNOTES:PARAMS:THROWS:RETURNS: voidHISTORY: 98-05-08: created----------------------------------------------------------------------------*/public String getTitle (){return iTitle;}/*----------------------------------------------------------------------------INTERFACE:PURPOSE: return the URL as a stringNOTES:PARAMS:THROWS:RETURNS: String: the URLHISTORY: 98-04-26: created----------------------------------------------------------------------------*/public String getURL (){return iURL;}/*============================================================================Protected methods============================================================================*//*============================================================================Private methods============================================================================*//*============================================================================Instance Variables============================================================================*/private String iTitle;private String iKey;private String iDescription;private String iURL;/*============================================================================Static Data============================================================================*/}/*==============================================================================HISTORY:$Log: IndexEntry.java,v $Revision 1.1 1998/05/15 10:38:09 leischNew: Search EngineRevision 1.3 1998/05/10 02:43:24 baiernow a simple data-classRevision 1.2 1998/04/26 22:35:21 baiersome commentsRevision 1.1 1998/04/26 21:43:09 baierInitial revision==============================================================================*/// Local Variables:// mode: Java// mode: font-lock// End: