Interface TextualObjectUpdate<T extends TypedText,D extends TypedText,TO extends TextualObjectUpdate<T,D,TO>>

Type Parameters:
T - The type of 'titles' in this object.
D - The type of 'descriptions'.
TO - The type of self() which is returned by several setters, so they can easily be chained
All Known Subinterfaces:
LocalizedObject<T,D,WS,TR,TO>, Media<T>, TextualObject<T,D,TO>
All Known Implementing Classes:
AbstractTextualObject, AbstractTextualObjectUpdate, BasicTextualObject, BasicTextualUpdate, Group, GroupUpdate, MediaObject, MediaObjectTranslation, MediaUpdate, Program, ProgramUpdate, ScheduleEvent, ScheduleEventUpdate, Segment, SegmentUpdate

public interface TextualObjectUpdate<T extends TypedText,D extends TypedText,TO extends TextualObjectUpdate<T,D,TO>>
An object that has titles and descriptions, which are typed, but not necessary owned (unlike TextualObject). This means that the object generally is used to update 'TextualObjects', since the user updating is associated with only one OwnerType.
Since:
5.3
Author:
Michiel Meeuwissen
  • Method Details

    • getLanguage

      default Locale getLanguage()
      Describes in which language the contained text objects are. This defaults to Locales.DUTCH.
    • getTitleCreator

      BiFunction<String,TextualType,T> getTitleCreator()
      How to create an instance of a title. This makes a lot of default methods possible.
      Since:
      5.5
    • addTitle

      default TO addTitle(String title, @NonNull TextualType type)
    • setTitle

      default void setTitle(String title, @NonNull TextualType type)
      Sets title if already set, otherwise addTitle(String, TextualType)
      Since:
      5.11
    • setTitle

      default TO setTitle(@Nullable Supplier<String> up, @NonNull TextualType type)
      Updates a title with a Supplier, if at least the given supplier is not null.
    • getTitles

      SortedSet<T> getTitles()
    • setTitles

      void setTitles(SortedSet<T> titles)
    • hasTitles

      default boolean hasTitles()
      Default implementation based on getTitles(), you may want to override this, if getTitles may modify the object (it is e.g. required by jaxb that this will never return null
    • addTitle

      default TO addTitle(T title)
    • removeTitle

      default boolean removeTitle(T title)
    • self

      default TO self()
    • findTitle

      default T findTitle(@NonNull TextualType type)
    • getMainTitle

      default String getMainTitle()
    • setMainTitle

      default void setMainTitle(String title)
    • getSubTitle

      default String getSubTitle()
      Retrieves the first sub- or episode title. MIS distributes episode titles. For internal use this episode title is handled as a subtitle.
      Returns:
      - the first subtitle
    • getShortTitle

      default String getShortTitle()
    • getOriginalTitle

      default String getOriginalTitle()
    • getWorkTitle

      default String getWorkTitle()
    • getLexicoTitle

      default String getLexicoTitle()
      Return the 'lexicographic title'. This is the title where the object normally would be sorted on. This defaults to getMainTitle() if no explicit value was set. If an explicit value is set, it may e.g. be the same as getMainTitle() but with leading articles ommitted.
    • getAbbreviatedTitle

      default String getAbbreviatedTitle()
      Since:
      2.1
    • setDescription

      default void setDescription(String description, @NonNull TextualType type)
      Sets description if already set, otherwise addDescription(String, TextualType)
      Since:
      5.11
    • setDescription

      default TO setDescription(@Nullable Supplier<String> up, @NonNull TextualType type)
      Updates a description with a Supplier, if at least the given supplier is not null.
    • getDescriptionCreator

      BiFunction<String,TextualType,D> getDescriptionCreator()
      Since:
      5.5
    • addDescription

      default TO addDescription(@Nullable String description, @NonNull TextualType type)
    • getDescriptions

      SortedSet<D> getDescriptions()
    • setDescriptions

      void setDescriptions(SortedSet<D> descriptions)
    • hasDescriptions

      default boolean hasDescriptions()
      Default implementation based on getDescriptions(), you may want to override this, if getDescriptions may modify the object (it is e.g. required by hibernate that this will never return null
    • addDescription

      default TO addDescription(D description)
    • removeDescription

      default boolean removeDescription(D description)
    • removeDescription

      default boolean removeDescription(TextualType type)
    • findDescription

      default D findDescription(@NonNull TextualType type)
    • getMainDescription

      default String getMainDescription()
      Returns the first available description. Probably the 'MAIN' description.
    • setMainDescription

      default void setMainDescription(String description)
    • getLongDescription

      default String getLongDescription()
      Returns the description with textual type 'LONG' if there is one. Otherwise, returns getMainDescription()
    • setLongDescription

      default void setLongDescription(String description)
    • getSubDescription

      default String getSubDescription()
    • getShortDescription

      default String getShortDescription()