|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.hd.d.pg2k.webSvr.exhibit.SimpleSimilarExhibitFinder
public final class SimpleSimilarExhibitFinder
A simple fast mechanism to collect "similar" exhibits to a named one. Can be used in a catalogue page to find similar exhibits quickly (in a CPU-efficient way), possibly (when the site is busy) as an alternative to the more general default search.
| Field Summary | |
|---|---|
private static Name.ExhibitFull[] |
NO_RESULTS
Fixed empty result object. |
| Constructor Summary | |
|---|---|
SimpleSimilarExhibitFinder()
|
|
| Method Summary | |
|---|---|
static Name.ExhibitFull[] |
getSimpleSimilarExhibitList(java.util.List<Name.ExhibitFull> exhibits,
java.util.Comparator<? super Name.ExhibitFull> exhibitComparator,
Name.ExhibitFull exhibitName,
java.util.Set<java.lang.String> attrWords,
int maxResults)
Deprecated. slow and not very smart |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
private static final Name.ExhibitFull[] NO_RESULTS
| Constructor Detail |
|---|
public SimpleSimilarExhibitFinder()
| Method Detail |
|---|
@Deprecated
public static Name.ExhibitFull[] getSimpleSimilarExhibitList(java.util.List<Name.ExhibitFull> exhibits,
java.util.Comparator<? super Name.ExhibitFull> exhibitComparator,
Name.ExhibitFull exhibitName,
java.util.Set<java.lang.String> attrWords,
int maxResults)
The sort order should probably be SMART_ORDER or something similar, eg case-insensitively by the first "main" word in the name (ignoring the directory component).
This will then return a list of exhibits adjacent in the original named exhibit that has the first main word (matched case-insensitively) but not including any variant of the original exhibit and no more than one variant of any of the returned names.
A maximum number of results is specified, and a list no longer than this will be returned.
This is designed to be CPU efficient yet return a useful set of results.
Results in same order as original list.
This is designed to be efficient generating a small number of results (eg less than ten).
This attempts to be reasonably unbiased in terms of direction.
exhibits - list of full exhibit names sorted with the exhibitComparator;
not modified by the routineexhibitComparator - exhibits must be sorted with thisexhibitName - full name of main exhibit; must be in exhibits list
and neither it nor any variant will appear in the outputattrWords - set of all valid attribute wordsmaxResults - maximum number if results to return
|
DHD Multimedia Gallery V1.60.69 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||