Package javax.help.search

# Class SearchItem

java.lang.Object
javax.help.search.SearchItem

public class SearchItem extends Object
A SearchItem corresponds to one specific item found in a search query. SearchItems are used in the default Search navigator.

See Also:
  - `SearchTOCItem`
  - `SearchEvent`
  - `SearchListener`

## Constructor Summary

Constructors
Constructor
Description
`SearchItem(URL base, String title, String lang, String filename, double confidence, int begin, int end, Vector concepts)`
Constructs a SearchItem

## Method Summary

Modifier and Type
Method
Description
`URL`
`getBase()`
Gets the base of the SearchItem.
`int`
`getBegin()`
Gets the begin pointer position for the hit.
`Enumeration`
`getConcepts()`
If there are "concepts" against which the query is made, this is an enumeration of the concepts.
`double`
`getConfidence()`
Gets the confidence value for the hit.
`int`
`getEnd()`
Gets the ending pointer position.
`String`
`getFilename()`
Gets the spec (as a URL relative to getBase() ) to the document.
`String`
`getLang()`
Gets the lang of the SearchItem.
`String`
`getTitle()`
Gets the title of the SearchItem.
`String`
`toString()`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

## Constructor Details

### SearchItem

public SearchItem(URL base, String title, String lang, String filename, double confidence, int begin, int end, Vector concepts)
Constructs a SearchItem

Parameters:
  `base` - The URL to the base from which file is a spec.
  `title` - Title of the item
  `lang` - A string representation of the locale. A null lang is valid and represents the default locale.
  `filename` - FileName for the item.
  `confidence` - How closely this matches the params.
  `begin` - Starting position where the (requested) match has been found.
  `end` - Ending position.
  `concepts` - A vector of concepts.

## Method Details

### getBase

public URL getBase()
Gets the base of the SearchItem.

Returns:
  The base for this SearchItem. Should be used with filename to obtain a URL to the desired hit.

### getTitle

public String getTitle()
Gets the title of the SearchItem.

Returns:
  The title of the document. Used to present the hit in the navigator.

### getLang

public String getLang()
Gets the lang of the SearchItem.

Returns:
  The title of the document. Used to present the hit in the navigator.

### getFilename

public String getFilename()
Gets the spec (as a URL relative to getBase() ) to the document.

Returns:
  The spec, relative to getBase(), to the document containing the hit.

### getConfidence

public double getConfidence()
Gets the confidence value for the hit.

Returns:
  The confidence value for the hit. This measures how "good" the hit is. The lower the value the better.

### getBegin

public int getBegin()
Gets the begin pointer position for the hit.

Returns:
  The starting position for the area in the document where a hit is found.

### getEnd

public int getEnd()
Gets the ending pointer position.

Returns:
  The ending position for the area in the document where a hit is found.

### getConcepts

public Enumeration getConcepts()
If there are "concepts" against which the query is made, this is an enumeration of the concepts. Otherwise null.

Returns:
  An enumeration of the concepts found in this query.

### toString

public String toString()

Overrides:
  `toString` in class `Object`