Class Title

  • All Implemented Interfaces:
    Serializable, CharSequence, Comparable<TypedText>, Supplier<String>, Child<MediaObject>, Identifiable<Long>, nl.vpro.domain.media.support.MutableOwnable, nl.vpro.domain.media.support.Ownable, Typable<TextualType>, OwnedText, TypedText

    @Entity
    public class Title
    extends AbstractOwnedText<Title>
    implements Serializable, Child<MediaObject>, Identifiable<Long>
    A MediaObject can have more than one title which should differ in type and owner.

    To some extent a titles type describes a usage scenario. In most cases the main title will be used.

    The title owner describes the origin of the title. Several media suppliers provide their own titles. To prevent conflicts while updating incoming data, all titles are stored for later usage. With the restriction that there are no titles t1 and t2 such that t1.equals(t2).

    This class confirms to a natural ordering consistent with equals based on its type and owner. Beware of the fact that the title value itself has no part in the ordering algorithm. Two titles are equal if their owner and type are equal. When adding a title to a SortedSet which already contains an equal title, the added title automatically replaces the existing title.

    The ordering of titles is dictated by the order (ordinal numbers) of the enum values for a titles type and ownertype.

    Since:
    0.4
    Author:
    Roelof Jan Koekoek
    See Also:
    TextualType, OwnerType, Serialized Form
    • Field Detail

      • value

        @NotNull(message="{nl.vpro.constraints.NotNull}")
        @Size(min=1,message="{nl.vpro.constraints.text.Size.min}") @Size(max=255,message="{nl.vpro.constraints.text.Size.max}")
        @NoHtml
        protected @NotNull(message="{nl.vpro.constraints.NotNull}") @Size(min=1,message="{nl.vpro.constraints.text.Size.min}") @Size(max=255,message="{nl.vpro.constraints.text.Size.max}") @NoHtml String value
    • Constructor Detail

      • Title

        public Title​(@NonNull String title,
                     @NonNull nl.vpro.domain.media.support.OwnerType owner,
                     @NonNull TextualType type)
        Creates a new Title with a length of 256 characters.
      • Title

        public Title​(@NonNull String title,
                     @NonNull nl.vpro.domain.media.support.OwnerType owner,
                     @NonNull TextualType type,
                     boolean crop)
        Optional constructor to bypass cropping the title to a length of 256 characters which is the default.
      • Title

        public Title​(Title source)
      • Title

        public Title()