Class ContextNameGrabber
java.lang.Object
net.ontopia.topicmaps.nav.utils.comparators.ContextNameGrabber
INTERNAL: Grabber that grabs the most appropriate basename from a
topic and then the most appropriate variant name, if one can be
found. If no better variant name can be found, the base name is
used. This class is much used for grabbing display and sort names.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected Comparator<TopicNameIF>protected Comparator<VariantNameIF>protected Predicate<VariantNameIF> -
Constructor Summary
ConstructorsConstructorDescriptionContextNameGrabber(Collection<TopicIF> baseNameContext, Collection<TopicIF> variantNameContext) INTERNAL: Creates a grabber; makes the comparators ScopedIFComparator for the given scopes. -
Method Summary
-
Field Details
-
within
-
bnComparator
-
vnComparator
-
-
Constructor Details
-
ContextNameGrabber
public ContextNameGrabber(Collection<TopicIF> baseNameContext, Collection<TopicIF> variantNameContext) INTERNAL: Creates a grabber; makes the comparators ScopedIFComparator for the given scopes.- Parameters:
baseNameContext- basename scope; a collection of TopicIF objects.variantNameContext- variantname scope; a collection of TopicIF objects.
-
-
Method Details
-
apply
INTERNAL: Grabs the most appropriate base name for the given topic, using the comparator established at creation to compare available base names and if a sort variant is available it will be used.
-