lempinen.neatseeker.html
Class HTMLTarget

java.lang.Object
  |
  +--lempinen.neatseeker.core.Target
        |
        +--lempinen.neatseeker.html.HTMLTarget
All Implemented Interfaces:
java.io.Serializable

public class HTMLTarget
extends Target
implements java.io.Serializable

Extends the Target class for indexing HTML documents.

This implementation adds the capability to store the document title and a string of sample text from the target document.

Version:
$Id: HTMLTarget.java,v 1.2 2000/09/27 21:27:21 lempinen Exp $
Author:
Sami Lempinen
See Also:
Target, Serialized Form

Field Summary
protected  java.lang.String sample
          Sample text.
protected  java.lang.String title
          The title of the document.
 
Fields inherited from class lempinen.neatseeker.core.Target
size, uri
 
Constructor Summary
HTMLTarget()
          Creates an empty HTMLTarget instance.
HTMLTarget(java.lang.String u)
          Creates a HTMLTarget instance and initialises the URI.
HTMLTarget(java.lang.String u, java.lang.String t)
          Creates a HTMLTarget instance and initialises the URI and the title.
HTMLTarget(java.lang.String u, java.lang.String t, java.lang.String s)
          Creates a HTMLTarget instance and initialises the data variables.
 
Method Summary
 java.lang.String getSample()
          Returns the sample.
 java.lang.String getTitle()
          Returns the title.
private  void readObject(java.io.ObjectInputStream in)
          Reads a serialized object.
 void setSample(java.lang.String s)
          Sets the sample.
 void setTitle(java.lang.String t)
          Sets the title.
 java.lang.String toString()
          Returns a String representation.
private  void writeObject(java.io.ObjectOutputStream out)
          Writes the object in a serialized form.
 
Methods inherited from class lempinen.neatseeker.core.Target
equals, getSize, getURI, setSize, setURI
 
Methods inherited from class java.lang.Object
, clone, finalize, getClass, hashCode, notify, notifyAll, registerNatives, wait, wait, wait
 

Field Detail

title

protected java.lang.String title
The title of the document.

sample

protected java.lang.String sample
Sample text.
Constructor Detail

HTMLTarget

public HTMLTarget()
Creates an empty HTMLTarget instance.

HTMLTarget

public HTMLTarget(java.lang.String u)
Creates a HTMLTarget instance and initialises the URI.

HTMLTarget

public HTMLTarget(java.lang.String u,
                  java.lang.String t)
Creates a HTMLTarget instance and initialises the URI and the title.

HTMLTarget

public HTMLTarget(java.lang.String u,
                  java.lang.String t,
                  java.lang.String s)
Creates a HTMLTarget instance and initialises the data variables.
Method Detail

setTitle

public void setTitle(java.lang.String t)
Sets the title.

getTitle

public java.lang.String getTitle()
Returns the title.

setSample

public void setSample(java.lang.String s)
Sets the sample.

getSample

public java.lang.String getSample()
Returns the sample.

toString

public java.lang.String toString()
Returns a String representation.
Overrides:
toString in class Target

writeObject

private void writeObject(java.io.ObjectOutputStream out)
                  throws java.io.IOException
Writes the object in a serialized form.
Overrides:
writeObject in class Target

readObject

private void readObject(java.io.ObjectInputStream in)
                 throws java.io.IOException,
                        java.lang.ClassNotFoundException
Reads a serialized object.
Overrides:
readObject in class Target