Class BwString

All Implemented Interfaces:
Serializable, Comparable<BwString>, SizedEntity, org.bedework.util.logging.Logged

public class BwString extends BwStringBase<BwString>
A String value in bedework. This class is for strings that are not very long usually a max of 2-3k. This is mostly because db systems tend to handle long strings in a different manner. (clobs, no searches etc)

Internally there is no difference, this just provides essentially a label for the schema.

Version:
1.0
See Also:
  • Constructor Details

    • BwString

      public BwString()
      Constructor
    • BwString

      public BwString(String lang, String value)
      Create a string by specifying all its fields
      Parameters:
      lang - String language code
      value - String value
  • Method Details

    • findLang

      public static BwString findLang(String lang, Collection<BwString> c)
      Search the collection for a string that matches the given language code.

      A supplied lang of null implies the default language code.

      If the supplied language equals any language in the collection we return with that.

      Otherwise if if matches the first part of a qualified code we take that, e.g lan="en" could match "en_US"

      Otherwise we return the first one we found.

      Parameters:
      lang - language code
      c - collection of strings
      Returns:
      BwString or null if no strings.
    • getRestoreCallback

      public static org.bedework.util.xml.FromXmlCallback getRestoreCallback()
    • clone

      public Object clone()
      Description copied from class: BwUnversionedDbentity
      Make visible
      Overrides:
      clone in class BwStringBase<BwString>
      Returns:
      Object of class T