net.ontopia.topicmaps.utils
Class DisplayNameGrabber
java.lang.Object
net.ontopia.topicmaps.utils.DisplayNameGrabber
- All Implemented Interfaces:
- GrabberIF
Deprecated. Since 1.1. Use TopicCharacteristicGrabbers instead.
public class DisplayNameGrabber
- extends Object
- implements GrabberIF
PUBLIC: Grabber that grabs the name most suitable for display from
a topic. If the topic has a display name that will be chosen. If
not, the base name in the least constrained scope will be chosen.
Field Summary |
protected GrabberIF |
subGrabber
Deprecated. PROTECTED: The NameGrabber used to implement the grabbing. |
Constructor Summary |
DisplayNameGrabber()
Deprecated. PUBLIC: Creates the grabber and sets the comparator to be a
ScopedIFComparator using the least constrained scope. |
Method Summary |
Object |
grab(Object object)
Deprecated. PUBLIC: Grabs the name for display. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
subGrabber
protected GrabberIF subGrabber
- Deprecated.
- PROTECTED: The NameGrabber used to implement the grabbing.
DisplayNameGrabber
public DisplayNameGrabber()
- Deprecated.
- PUBLIC: Creates the grabber and sets the comparator to be a
ScopedIFComparator using the least constrained scope.
grab
public Object grab(Object object)
- Deprecated.
- PUBLIC: Grabs the name for display. The name returned is the
first display (variant) name found, when the basenames of the
give topic have been sorted using the comparator. If there is no
display name, then the last base name found is returned,
corresponding to the least constrained scope.
- Specified by:
grab
in interface GrabberIF
- Parameters:
object
- The topic whose name is being grabbed; formally an object.
- Returns:
- A name to display; an object implementing TopicNameIF or
VariantNameIF, null if the topic has no basenames.
- Throws:
Throws
- OntopiaRuntimeException if object is not a topic.
Copyright © 2000-2012 Ontopia.