Login | Register
My pages Projects Community openCollabNet

Discussions > cvs > CVS update: joist/java/org/joist/search SearchResultItem.java

Project highlights: Architectural Overview

joist
Discussion topic

Back to topic list

CVS update: joist/java/org/joist/search SearchResultItem.java

Author stack
Full name Michael Stack
Date 2000-10-24 11:34:35 PDT
Message User: stack
  Date: 00/10/24 11:34:35

  Modified: java/org/joist/search SearchResultItem.java
  Log:
  Added conveniance methods to make the handling of the URL search item easier in WebMacro.
  
  Revision Changes Path
  1.2 +22 -8 joist/java/org/joist​/search/SearchResult​Item.java
  
  Index: SearchResultItem.java
  ====================​====================​====================​=======
  RCS file: /cvs/joist/java/org/​joist/search/SearchR​esultItem.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- SearchResultItem.java 2000/10/23 23:21:45 1.1
  +++ SearchResultItem.java 2000/10/24 18:34:35 1.2
  @@ -51,14 +51,14 @@
   * «Immutable -- Read-Only.»
   *
   * @author <a href="mailto:stack@c​ollab.net">St.Ack​</a>
  -* @version $Id: SearchResultItem.java,v 1.1 2000/10/23 23:21:45 stack Exp $
  +* @version $Id: SearchResultItem.java,v 1.2 2000/10/24 18:34:35 stack Exp $
   */
   public class SearchResultItem
   {
       /** Class version string
       */
       public static final String versionID
  - = "$Id: SearchResultItem.java,v 1.1 2000/10/23 23:21:45 stack Exp $";
  + = "$Id: SearchResultItem.java,v 1.2 2000/10/24 18:34:35 stack Exp $";
       
       
       /** Search engine ranking.
  @@ -73,7 +73,7 @@
       
       /** File or URL pointing to file found.
       */
  - protected java.net.URL location = null;
  + protected java.net.URL url = null;
       
       
       /** File title -- usually the HTML TITLE
  @@ -101,7 +101,7 @@
       {
           if( inURL == null )
               throw new NullPointerException( "inURL is null" );
  - location = inURL;
  + url = inURL;
           
           ranking = inRanking;
           size = inSize;
  @@ -129,11 +129,13 @@
       }
       
       
  - /** Get search result file.
  + /** Get search result file url.
       * Do a toExternalForm( ) or toString( )
       * on returned URL to just use it. Use
       * getProtocol( ) to figure if it's a file
  - * or http spec.
  + * or http spec. Use getFile( ) in this
  + * class to get the 'file' only portion of
  + * the url.
       * <p>
       * The way i'm going to make an URL is look at first
       * character. If it's not a '/' for an absolute path,
  @@ -142,10 +144,22 @@
       * just files but http protocol too...
       *
       * @return File location as a java.net.URL.
  + * @see #getFile
  + * @see java.net.URL
       */
  - public java.net.URL getLocation( )
  + public java.net.URL getUrl( )
       {
  - return location;
  + return url;
  + }
  +
  +
  + /** Return the 'file' portion of the url.
  + * Calls java.net.URL.getFile( ).
  + * @return 'File' portion of the url
  + */
  + public String getFile( )
  + {
  + return url.getFile( );
       }

« Previous message in topic | 1 of 1 | Next message in topic »

Messages

Show all messages in topic

CVS update: joist/java/org/joist/search SearchResultItem.java stack Michael Stack 2000-10-24 11:34:35 PDT
Messages per page: