net.ontopia.topicmaps.utils
Class TypedIFStringifier<T extends TypedIF>

java.lang.Object
  extended by net.ontopia.topicmaps.utils.TypedIFStringifier<T>
All Implemented Interfaces:
StringifierIF<T>

public class TypedIFStringifier<T extends TypedIF>
extends Object
implements StringifierIF<T>

INTERNAL: Stringifier that generates a string representation of the type property of the object given to it.

This stringifier uses a TypedIFGrabber internally to grab the object's type property. Instances of this class can be configured with a stringifier used to stringify the resulting topic.


Field Summary
protected  GrabberIF<T,TopicIF> grabber
           
protected  StringifierIF<? super TopicIF> topic_stringifier
           
 
Constructor Summary
TypedIFStringifier(StringifierIF<? super TopicIF> topic_stringifier)
           
 
Method Summary
 String toString(T typed)
          Returns a string representation of the type property of the typed object.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

grabber

protected GrabberIF<T extends TypedIF,TopicIF> grabber

topic_stringifier

protected StringifierIF<? super TopicIF> topic_stringifier
Constructor Detail

TypedIFStringifier

public TypedIFStringifier(StringifierIF<? super TopicIF> topic_stringifier)
Method Detail

toString

public String toString(T typed)
Returns a string representation of the type property of the typed object.

Specified by:
toString in interface StringifierIF<T extends TypedIF>
Parameters:
typed - An object implementing TypedIF.
Returns:
The string that results from applying the configured stringifier to the type extracted from the typed object.


Copyright © 2000-2012 Ontopia.