Package javax.help.search
Class SearchItem
java.lang.Object
javax.help.search.SearchItem
A SearchItem corresponds to one specific item found in a search query.
SearchItems are used in the default Search navigator.
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetBase()
Gets the base of the SearchItem.int
getBegin()
Gets the begin pointer position for the hit.If there are "concepts" against which the query is made, this is an enumeration of the concepts.double
Gets the confidence value for the hit.int
getEnd()
Gets the ending pointer position.Gets the spec (as a URL relative to getBase() ) to the document.getLang()
Gets the lang of the SearchItem.getTitle()
Gets the title of the SearchItem.toString()
-
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 itemlang
- 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
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
Gets the title of the SearchItem.- Returns:
- The title of the document. Used to present the hit in the navigator.
-
getLang
Gets the lang of the SearchItem.- Returns:
- The title of the document. Used to present the hit in the navigator.
-
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
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
-