Class CustomNameStringifier

java.lang.Object
net.ontopia.topicmaps.nav2.impl.basic.CustomNameStringifier
All Implemented Interfaces:
Function<Object,String>

public class CustomNameStringifier extends Object implements Function<Object,String>
INTERNAL: Stringifier that stringifies TopicNameIFs and VariantNameIFs by calling their getValue() method. In addition it can be specified which strings to use for the different fail-situations:
  • the object is null (no base name/variant name existent)
  • the value is null (null base name/variant name)
  • the value is empty (empty string base name/variant name)
  • Field Details

    • stringNonExistent

      protected String stringNonExistent
    • stringValueNull

      protected String stringValueNull
    • stringValueEmpty

      protected String stringValueEmpty
  • Constructor Details

    • CustomNameStringifier

      public CustomNameStringifier()
  • Method Details

    • apply

      public String apply(Object name)
      INTERNAL: Stringifies the given name.
      Specified by:
      apply in interface Function<Object,String>
      Parameters:
      name - object, cast to TopicNameIF or VariantNameIF internally; the given name
      Returns:
      string containing name value or "[No name]"
    • setStringNonExistent

      public void setStringNonExistent(String stringNonExistent)
    • getStringNonExistent

      public String getStringNonExistent()
    • setStringValueNull

      public void setStringValueNull(String stringValueNull)
    • getStringValueNull

      public String getStringValueNull()
    • setStringValueEmpty

      public void setStringValueEmpty(String stringValueEmpty)
    • getStringValueEmpty

      public String getStringValueEmpty()