Class MediaObject
- All Implemented Interfaces:
Serializable
,Accountable
,Changeable
,Embargo
,Identifiable<Long>
,LocalizedObject<Title,
,Description, Website, TwitterRef, MediaObject> Media<MediaObject>
,MediaIdentifiable
,MidIdentifiable
,TrackableMedia
,TrackableObject
,MutableEmbargo<MediaObject>
,MutableEmbargoDeprecated<MediaObject>
,Publishable<MediaObject>
,TextualObject<Title,
,Description, MediaObject> TextualObjectUpdate<Title,
,Description, MediaObject> Trackable
,NicamRated
Media objects are the most central objects of POMS. A media object represents one document of meta-information, with all titles, descriptions, tags and all other fields that are associated with 'media' in general.
Also Group
s are an extension, which implies e.g. that things like a GroupType.PLAYLIST
may themselves have similar metadata, though they
basically represent groups of other MediaObject
s, and are not themselves associated with actual audio or video.
But also Program
s themselves can function as a group and therefor have 'members' (e.g. such a member may be a ProgramType.PROMO
).
Segment
s are a special kind of members of only Program
s, and represent a 'segment' from a larger 'program' only.
The purpose of a mediaobject is
- Be a full representation of meta data related to one entity
- Be also its database representation. Therefore e.g.
javax.persistence
annotations are present. These are optional, and are probably only relevant in the realm of 'poms backend application' - Be also the XML/Json representation of most of this data. For a few fields it doesn't make sense to be exposed in that way, like for example the
Editor
s ofAccountable
. For this the object is annotated with some annotation fromjavax.xml
andcom.fasterxml.jackson
- The JSON version is basically also the representation used in Elasticsearch (only with
Views.Publisher
enabled)
- Author:
- roekoe
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from interface nl.vpro.domain.media.MediaIdentifiable
MediaIdentifiable.Correlation
-
Field Summary
Modifier and TypeFieldDescriptionprotected @NotNull(groups=nl.vpro.validation.WarningValidatorGroup.class) @MustDisplay(groups=nl.vpro.validation.PomsValidatorGroup.class) @Nullable AgeRating
protected AVAttributes
protected @NotNull(message="avType: {nl.vpro.constraints.NotNull}") @Nullable AVType
protected @Valid @Size(min=0,message="{nl.vpro.constraints.Size.min}") List<@NotNull Broadcaster>
protected List<@NotNull ContentRating>
protected List<@PomsValidCountry org.meeuw.i18n.regions.Region>
protected @Valid Set<@NotNull Description>
protected @Valid @Nullable AuthorizedDuration
protected SortedSet<@NotNull @Valid GeoLocations>
protected @Valid Set<@NotNull GeoRestriction>
protected @Valid SortedSet<@NotNull Intentions>
protected Boolean
protected boolean
protected List<@PomsValidCountry(groups=nl.vpro.validation.WarningValidatorGroup.class) @Language(mayContainCountry=true,groups=nl.vpro.validation.WarningValidatorGroup.class) Locale>
protected @Size(max=255,min=4) @Pattern(regexp="^[a-zA-Z0-9][ .a-zA-Z0-9_-]*$",flags=CASE_INSENSITIVE,message="{nl.vpro.constraints.mid}") @NotNull(groups=nl.vpro.validation.PrePersistValidatorGroup.class) @MonotonicNonNull String
protected @Valid List<@NotNull PortalRestriction>
protected Set<@NonNull @Valid Prediction>
protected Short
protected Instant
protected String
protected @Pattern(regexp="[^\u241e\u241f]*") String
␟ and ␟ are used to encode multiple reasons (with a date) in headers, and therefore should not be in the database field itself.protected Instant
protected String
protected @Valid SortedSet<@NotNull TargetGroups>
protected Short
protected @Valid List<@NotNull ThirdParty>
protected @Valid @Size(min=1,message="{nl.vpro.constraints.collection.Size.min}",groups=nl.vpro.validation.RedundantValidatorGroup.class) Set<@NotNull Title>
protected List<@NotNull @Valid TwitterRef>
protected Integer
Fields inherited from class nl.vpro.domain.media.support.PublishableObject
PUBLISH_WORKFLOW, workflow
Fields inherited from class nl.vpro.domain.AbstractPublishableObject
createdBy, creationInstant, lastModified, lastModifiedBy, lastPublished, publishStart, publishStop
Fields inherited from class nl.vpro.domain.DomainObject
id
Fields inherited from interface nl.vpro.domain.TextualObject
DEFAULT_OWNER
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addAllImages
(List<Image> imgs) addBroadcaster
(@NonNull Broadcaster broadcaster) addContentRating
(ContentRating rating) addCountry
(@NonNull com.neovisionaries.i18n.CountryCode country) addCountry
(@NonNull org.meeuw.i18n.regions.Region country) addCountry
(String code) addDescription
(@Nullable String description, @NonNull nl.vpro.domain.media.support.OwnerType owner, @NonNull TextualType type) addDescription
(Description description) void
addGeoRestriction
(GeoRestriction geoRestriction) addLanguage
(@NonNull Locale language) addLocation
(Location location) addLocation
(Location location, boolean implicitRealize) void
addPortalRestriction
(PortalRestriction restriction) addRelation
(@NonNull Relation relation) addThirdParty
(ThirdParty thirdParty) addTitle
(@NonNull String title, @NonNull nl.vpro.domain.media.support.OwnerType owner, @NonNull TextualType type) protected MediaIdentifiable.Correlation
protected CRC32
We keep track of a CRC32 hash to determine whether an object is 'changed', in the sense that it would need republication.void
void
void
boolean
findAncestry
(MediaObject ancestor) protected void
findAncestry
(MediaObject ancestor, List<MediaObject> ancestors) @Nullable Credits
findCredit
(Long id) @Nullable GeoRestriction
@Nullable Image
@Nullable Image
@Nullable Image
findImages
(nl.vpro.domain.media.support.OwnerType owner) @Nullable Location
findLocation
(Long locationId) @Nullable Location
findLocation
(String url) @Nullable Location
findLocation
(String url, nl.vpro.domain.media.support.OwnerType owner) findMemberOfRef
(Long memberRefId) @Nullable MemberRef
findMemberOfRef
(MediaObject owner) @Nullable MemberRef
findMemberOfRef
(MediaObject owner, Integer number) @Nullable Name
findOrCreatePrediction
(Platform platform) protected Prediction
findOrCreatePrediction
(Platform platform, boolean planned, Consumer<Prediction> onCreate) @Nullable Person
findPerson
(Long id) @Nullable Person
findPerson
(Person person) @Nullable PortalRestriction
@Nullable Relation
findRelation
(Long id) @Nullable Relation
findRelation
(Relation relation) Property used for marshalling/unmarshalling, avoiding theRelation.copy(nl.vpro.domain.media.Relation)
(which disappears the id)Overridden to help FTL.@Nullable AgeRating
getAuthority
(Platform platform) seePrediction.getAuthority()
()} or User, if no such prediction record.Return the available subtitles.@Nullable AVType
The correlation of thisMediaIdentifiable
is the best id currently available.List<@PomsValidCountry org.meeuw.i18n.regions.Region>
The production locationgetCrids()
@Nullable AuthorizedDuration
getEmail()
For NPA-403, to provide to ES the needed mapping.@NonNull SortedSet<GeoLocations>
@Nullable Image
getImage
(int index) @Nullable Image
@Nullable Image
@NonNull SortedSet<Intentions>
This method just exists to contain the json annotations.Overridden to help FTL.@Nullable Location
getLocation
(Location location) Returns the locations inLocation.PRESENTATION_ORDER
Overridden to help hibernate search (see MediaSearchMappingFactory) Probably has to to with ...@Nullable String
@Nullable Image
Overridden to help hibernate search (see MediaSearchMappingFactory) Probably has to to with JDK-8071693final @NotNull MediaType
@Nullable MediaObject
getMid()
protected StreamingStatusImpl
Overridden to help FTL.org.meeuw.functional.TriFunction<String,
nl.vpro.domain.media.support.OwnerType, TextualType, Description> org.meeuw.functional.TriFunction<String,
nl.vpro.domain.media.support.OwnerType, TextualType, Title> Returns only thegetCredits()
that arePerson
getPrediction
(Platform platform) Returns the prediction for givenPlatform
.@NonNull SortedSet<Prediction>
protected Collection<Prediction>
We don't return 'non announced' predictions in the xml.getPredictionWithoutFixing
(Platform platform) LikegetPrediction(Platform)
but without also implicitly correcting theprediction state
if that happens to be not consistent with thelocations
.Returns the locations inLocation.PRESENTATION_ORDER
protected String
protected String
␟ and ␟ are used to encode multiple reasons (with a date) in headers, and therefore should not be in the database field itself.Overridden to help FTL.Overridden to help FTL.final Date
Deprecated.Returns the sortDate for this MediaObject.Returns (a copy of, since you have no business setting it) theStreamingStatus
.Overridden to help FTL.Overridden to help hibernate search (see MediaSearchMappingFactory) Probably has to to with ...getTags()
@NonNull SortedSet<TargetGroups>
abstract SubMediaType
getType()
protected abstract String
Overridden to help FTL.giveCredits
(Credits credit) boolean
hasAncestor
(MediaObject ancestor) boolean
boolean
hasDescendant
(MediaObject descendant) boolean
Default implementation based onTextualObjectUpdate.getDescriptions()
, you may want to override this, if getDescriptions may modify the object (it is e.g.boolean
hasEpisode
(Program episode) int
hashCode()
protected boolean
boolean
hasMember
(MediaObject member) boolean
Default implementation based onTextualObjectUpdate.getTitles()
, you may want to override this, if getTitles may modify the object (it is e.g.void
Implicitly create predictions for all platforms that have a location, but no prediction yet.protected void
isDubbed()
boolean
What does it mean to be 'embeddable'?protected Boolean
boolean
When true Ceres/Pluto needs a restriction update.boolean
isMember()
boolean
isMemberOf
(MediaObject owner) boolean
isMemberOf
(MediaObject owner, Integer number) boolean
isMerged()
MediaObjects can be merged.void
mergeImages
(MediaObject incoming, nl.vpro.domain.media.support.OwnerType owner) boolean
removeBroadcaster
(Broadcaster broadcaster) removeCrid
(String crid) boolean
removeDescription
(Description description) boolean
removeGeoRestriction
(GeoRestriction restriction) boolean
removeImage
(@NonNull Image image) boolean
removeImage
(Long imageId) void
boolean
removeLocation
(Long locationId) boolean
removeLocation
(Location location) boolean
removeName
(Name name) boolean
removePerson
(Long id) boolean
removePerson
(Person person) boolean
removePortal
(Portal portal) boolean
removePortalRestriction
(PortalRestriction restriction) boolean
removePrediction
(Platform platform) boolean
removeRelation
(Long id) boolean
removeThirdParty
(ThirdParty thirdParty) boolean
removeTitle
(Title title) void
revokeLocations
(Platform platform) protected byte[]
protected void
set_Locations
(SortedSet<Location> locations) protected void
set_Relations
(SortedSet<Relation> relations) void
setAgeRating
(@Nullable AgeRating ageRating) void
setAvailableSubtitles
(List<@NonNull AvailableSubtitles> availableSubtitles) void
setAvAttributes
(AVAttributes avAttributes) void
void
void
setBroadcasters
(List<Broadcaster> broadcasters) setContentRatings
(List<ContentRating> contentRatings) void
setCountries
(List<org.meeuw.i18n.regions.Region> countries) void
setCreationInstant
(Instant creationInstant) void
setCredits
(@Nullable List<? extends Credits> credits) void
void
setDescriptions
(SortedSet<Description> descriptions) void
setDuration
(@Nullable Duration duration) UseAuthorizedDuration.get()
in combination withgetDuration()
to get the java.time.Durationvoid
void
setEmbeddable
(boolean embeddable) void
void
setGeoLocations
(@NonNull SortedSet<GeoLocations> newGeoLocations) void
setGeoRestrictions
(Set<GeoRestriction> geoRestrictions) protected void
setHasSubtitles
(Boolean hasSubtitles) void
void
setIntentions
(SortedSet<@NonNull Intentions> newIntentions) void
setIsDubbed
(Boolean isDubbed) protected void
setJsonCredits
(List<Credits> credits) void
setLanguages
(List<Locale> languages) void
setLocationAuthorityUpdate
(Boolean ceresUpdate) void
setLocations
(SortedSet<Location> locations) abstract void
setMediaType
(MediaType type) void
setMemberOf
(SortedSet<MemberRef> memberOf) void
setMergedTo
(@Nullable MediaObject mergedTo) Mark this object as being merged to another mediaobject.void
setMergedToRef
(@Nullable String mergedToRef) void
void
setPersons
(@Nullable List<Person> persons) Deprecated.UsesetCredits(List)
void
setPortalRestrictions
(List<PortalRestriction> portalRestrictions) void
setPortals
(List<Portal> portals) void
setPredictions
(Collection<Prediction> predictions) protected void
setPredictionsForXml
(List<Prediction> predictions) @NonNull MediaObject
setPublishStartInstant
(Instant publishStart) @NonNull MediaObject
setPublishStopInstant
(Instant publishStop) void
setRelations
(SortedSet<Relation> relations) void
setReleaseYear
(Short releaseYear) protected void
setRepubDestinations
(String repubDestinations) protected void
setRepubReason
(String repubReason) ␟ and ␟ are used to encode multiple reasons (with a date) in headers, and therefore should not be in the database field itself.void
void
Consider using nl.vpro.domain.media.TagService#findOrCreate() first.void
setTargetGroups
(SortedSet<@NonNull TargetGroups> newTargetGroups) void
setTeletext
(Short teletext) void
void
void
setTwitterRefs
(List<@NonNull TwitterRef> twitterRefs) setWebsites
(List<Website> websites) protected void
setWorkflow
(Workflow workflow) final @NonNull String
toString()
Methods inherited from class nl.vpro.domain.media.support.PublishableObject
acceptChanges, beforeUnmarshal, getHash, getWorkflow, hasChanges, isActivation, isDeactivation, isDeleted
Methods inherited from class nl.vpro.domain.AbstractPublishableObject
getCreatedBy, getCreationInstant, getLastModifiedBy, getLastModifiedInstant, getLastPublishedInstant, getPublishStartInstant, getPublishStopInstant, getUrn, setCreatedBy, setLastModifiedBy, setLastModifiedInstant, setLastPublishedInstant, setUrn
Methods inherited from class nl.vpro.domain.DomainObject
getId, isPersisted, setId, superHashCode
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface nl.vpro.domain.Embargo
asRange, getPublishStartInstant, getPublishStopInstant, inPublicationWindow, inPublicationWindow, isUnderEmbargo, isUnderEmbargo, wasUnderEmbargo, wasUnderEmbargo, willBePublished, willBePublished, willBeUnderEmbargo, willBeUnderEmbargo
Methods inherited from interface nl.vpro.domain.LocalizedObject
addTag, addTwitterRef, addWebsite, addWebsite, findWebsite, findWebsite, getMainWebsite, getWebsite, removeTag, removeWebsite, removeWebsite
Methods inherited from interface nl.vpro.domain.media.MediaIdentifiable
getCorrelationId, getId, getMainIdentifier
Methods inherited from interface nl.vpro.domain.MutableEmbargo
set
Methods inherited from interface nl.vpro.domain.MutableEmbargoDeprecated
getPublishStart, getPublishStop, setPublishStart, setPublishStop
Methods inherited from interface nl.vpro.nicam.NicamRated
isNicamRated
Methods inherited from interface nl.vpro.domain.TextualObject
addDescription, addTitle, findDescription, findTitle, getDescriptionCreator, getTitleCreator, removeDescription, removeDescriptionsForOwner, removeTitle, removeTitlesForOwner, setDescription, setTitle
Methods inherited from interface nl.vpro.domain.TextualObjectUpdate
findDescription, findTitle, getLanguage, getLongDescription, removeDescription, self, setDescription, setDescription, setLongDescription, setMainDescription, setMainTitle, setTitle, setTitle
Methods inherited from interface nl.vpro.domain.Trackable
getCreationInstant, getLastModifiedInstant
Methods inherited from interface nl.vpro.domain.media.TrackableObject
getParent, getWorkflow, isConsiderableForPublication, isPublishable, isPublishable, isRevocable
-
Field Details
-
mid
@Size(max=255, min=4) @Pattern(regexp="^[a-zA-Z0-9][ .a-zA-Z0-9_-]*$", flags=CASE_INSENSITIVE, message="{nl.vpro.constraints.mid}") @NotNull(groups=nl.vpro.validation.PrePersistValidatorGroup.class) protected @Size(max=255,min=4) @Pattern(regexp="^[a-zA-Z0-9][ .a-zA-Z0-9_-]*$",flags=CASE_INSENSITIVE,message="{nl.vpro.constraints.mid}") @NotNull(groups=nl.vpro.validation.PrePersistValidatorGroup.class) @MonotonicNonNull String mid -
version
-
crids
-
broadcasters
@Valid @Size(min=0, message="{nl.vpro.constraints.Size.min}") protected @Valid @Size(min=0,message="{nl.vpro.constraints.Size.min}") List<@NotNull Broadcaster> broadcasters -
portals
-
thirdParties
-
portalRestrictions
-
geoRestrictions
-
titles
@Valid @Size(min=1, message="{nl.vpro.constraints.collection.Size.min}", groups=nl.vpro.validation.RedundantValidatorGroup.class) protected @Valid @Size(min=1,message="{nl.vpro.constraints.collection.Size.min}",groups=nl.vpro.validation.RedundantValidatorGroup.class) Set<@NotNull Title> titles -
descriptions
-
genres
-
tags
-
intentions
-
targetGroups
-
source
-
countries
-
languages
protected List<@PomsValidCountry(groups=nl.vpro.validation.WarningValidatorGroup.class) @Language(mayContainCountry=true,groups=nl.vpro.validation.WarningValidatorGroup.class) Locale> languages -
avType
@NotNull(message="avType: {nl.vpro.constraints.NotNull}") protected @NotNull(message="avType: {nl.vpro.constraints.NotNull}") @Nullable AVType avType -
avAttributes
-
releaseYear
-
duration
-
credits
-
geoLocations
-
topics
-
awards
-
memberOf
-
ageRating
@NotNull(groups=nl.vpro.validation.WarningValidatorGroup.class) @MustDisplay(groups=nl.vpro.validation.PomsValidatorGroup.class) protected @NotNull(groups=nl.vpro.validation.WarningValidatorGroup.class) @MustDisplay(groups=nl.vpro.validation.PomsValidatorGroup.class) @Nullable AgeRating ageRating -
contentRatings
-
email
-
websites
-
twitterRefs
-
teletext
-
isDubbed
-
predictions
-
locations
-
relations
-
images
-
isEmbeddable
protected boolean isEmbeddable -
sortInstant
-
repubDate
-
repubReason
@Pattern(regexp="[^\u241e\u241f]*") protected @Pattern(regexp="[^\u241e\u241f]*") String repubReason␟ and ␟ are used to encode multiple reasons (with a date) in headers, and therefore should not be in the database field itself. \t can be used to temporary store multiple reasons, which will all be published at the same time. -
repubDestinations
-
-
Constructor Details
-
MediaObject
public MediaObject() -
MediaObject
public MediaObject(long id) -
MediaObject
-
-
Method Details
-
getMid
- Specified by:
getMid
in interfaceMidIdentifiable
-
setMid
-
getAvailableSubtitles
Return the available subtitles. These subtitles may not be published.In the publisher this list is explicitly cleared before publishing to the API if there are no published locations This is kind of a hack. May be it is better to have the workflow in AvailableSubtitles also.
-
getCrids
- Specified by:
getCrids
in interfaceMediaIdentifiable
-
setCrids
-
addCrid
-
removeCrid
-
getBroadcasters
-
setBroadcasters
-
addBroadcaster
-
removeBroadcaster
-
getMainBroadcaster
-
getPortals
-
setPortals
-
addPortal
-
removePortal
-
clearPortals
public void clearPortals() -
getThirdParties
-
addThirdParty
-
removeThirdParty
-
clearThirdParties
public void clearThirdParties() -
getPortalRestrictions
-
setPortalRestrictions
-
removePortalRestriction
-
findPortalRestriction
-
addPortalRestriction
-
getGeoRestrictions
-
setGeoRestrictions
-
findGeoRestriction
-
addGeoRestriction
-
removeGeoRestriction
-
getTitles
- Specified by:
getTitles
in interfaceTextualObjectUpdate<Title,
Description, MediaObject>
-
setTitles
- Specified by:
setTitles
in interfaceTextualObjectUpdate<Title,
Description, MediaObject>
-
getExpandedTitles
For NPA-403, to provide to ES the needed mapping.The result can be calculated from other fields, so this is not available in XML, nor in the default json view.
Only in the
Views.Publisher
version of the json. -
addTitle
- Specified by:
addTitle
in interfaceTextualObjectUpdate<Title,
Description, MediaObject>
-
removeTitle
- Specified by:
removeTitle
in interfaceTextualObjectUpdate<Title,
Description, MediaObject>
-
getOwnedTitleCreator
public org.meeuw.functional.TriFunction<String,nl.vpro.domain.media.support.OwnerType, getOwnedTitleCreator()TextualType, Title> - Specified by:
getOwnedTitleCreator
in interfaceTextualObject<Title,
Description, MediaObject>
-
addTitle
public MediaObject addTitle(@NonNull String title, @NonNull nl.vpro.domain.media.support.OwnerType owner, @NonNull TextualType type) - Specified by:
addTitle
in interfaceTextualObject<Title,
Description, MediaObject>
-
hasTitles
public boolean hasTitles()Description copied from interface:TextualObjectUpdate
Default implementation based onTextualObjectUpdate.getTitles()
, you may want to override this, if getTitles may modify the object (it is e.g. required by jaxb that this will never returnnull
- Specified by:
hasTitles
in interfaceTextualObjectUpdate<Title,
Description, MediaObject>
-
hasDescriptions
public boolean hasDescriptions()Description copied from interface:TextualObjectUpdate
Default implementation based onTextualObjectUpdate.getDescriptions()
, you may want to override this, if getDescriptions may modify the object (it is e.g. required by hibernate that this will never returnnull
- Specified by:
hasDescriptions
in interfaceTextualObjectUpdate<Title,
Description, MediaObject>
-
getDescriptions
- Specified by:
getDescriptions
in interfaceTextualObjectUpdate<Title,
Description, MediaObject>
-
setDescriptions
- Specified by:
setDescriptions
in interfaceTextualObjectUpdate<Title,
Description, MediaObject>
-
addDescription
- Specified by:
addDescription
in interfaceTextualObjectUpdate<Title,
Description, MediaObject>
-
removeDescription
- Specified by:
removeDescription
in interfaceTextualObjectUpdate<Title,
Description, MediaObject>
-
getOwnedDescriptionCreator
public org.meeuw.functional.TriFunction<String,nl.vpro.domain.media.support.OwnerType, getOwnedDescriptionCreator()TextualType, Description> - Specified by:
getOwnedDescriptionCreator
in interfaceTextualObject<Title,
Description, MediaObject>
-
addDescription
public MediaObject addDescription(@Nullable String description, @NonNull nl.vpro.domain.media.support.OwnerType owner, @NonNull TextualType type) - Specified by:
addDescription
in interfaceTextualObject<Title,
Description, MediaObject>
-
getGenres
-
setGenres
-
addGenre
-
getTags
- Specified by:
getTags
in interfaceLocalizedObject<Title,
Description, Website, TwitterRef, MediaObject>
-
setTags
Consider using nl.vpro.domain.media.TagService#findOrCreate() first.- Specified by:
setTags
in interfaceLocalizedObject<Title,
Description, Website, TwitterRef, MediaObject>
-
getGeoLocations
-
setGeoLocations
-
getExpandedGeoLocations
-
getTopics
-
setTopics
-
getExpandedTopics
-
getIntentions
-
getExpandedIntentions
-
setIntentions
-
getTargetGroups
-
getExpandedTargetGroups
-
setTargetGroups
-
getSource
-
setSource
-
getCountries
The production location -
setCountries
-
addCountry
-
addCountry
-
addCountry
-
getLanguages
-
setLanguages
-
addLanguage
-
getAVType
-
setAVType
-
getAvAttributes
-
setAvAttributes
-
getReleaseYear
-
setReleaseYear
-
getDuration
-
setDuration
UseAuthorizedDuration.get()
in combination withgetDuration()
to get the java.time.Duration- Throws:
ModificationException
- If you may not set the duration
-
hasAuthorizedDuration
public boolean hasAuthorizedDuration() -
getCredits
-
getJsonCredits
This method just exists to contain the json annotations. Putting them ongetCredits()
complicates matters, because we basicly configured jackson to use jaxb annotations. -
setJsonCredits
-
setCredits
-
getPersons
Returns only thegetCredits()
that arePerson
-
setPersons
Deprecated.UsesetCredits(List)
-
removePerson
-
removePerson
-
addPerson
-
addName
-
removeName
-
giveCredits
- Since:
- 5.12
-
findPerson
-
findCredit
-
findPerson
-
findName
-
getAwards
-
setAwards
-
addAward
-
getDescendantOf
-
getMemberOf
-
setMemberOf
-
isMember
public boolean isMember() -
isMemberOf
-
isMemberOf
-
hasMember
-
findMemberOfRef
-
findMemberOfRef
-
findMemberOfRef
-
getAgeRating
- Specified by:
getAgeRating
in interfaceNicamRated
-
setAgeRating
-
getContentRatings
- Specified by:
getContentRatings
in interfaceNicamRated
-
setContentRatings
-
addContentRating
-
getEmail
-
setEmail
-
getMainEmail
-
addEmail
-
addEmail
-
getWebsites
- Specified by:
getWebsites
in interfaceLocalizedObject<Title,
Description, Website, TwitterRef, MediaObject>
-
setWebsites
- Specified by:
setWebsites
in interfaceLocalizedObject<Title,
Description, Website, TwitterRef, MediaObject>
-
getTwitterRefs
- Specified by:
getTwitterRefs
in interfaceLocalizedObject<Title,
Description, Website, TwitterRef, MediaObject>
-
setTwitterRefs
- Specified by:
setTwitterRefs
in interfaceLocalizedObject<Title,
Description, Website, TwitterRef, MediaObject>
-
getTeletext
-
hasSubtitles
-
isDubbed
-
isHasSubtitles
-
setHasSubtitles
-
hasEpisode
-
hasAncestor
-
findAncestry
-
findAncestry
-
hasDescendant
-
getAncestors
-
getVirtualMemberRefs
- Since:
- 5.9
-
getStreamingPlatformStatus
Returns (a copy of, since you have no business setting it) theStreamingStatus
.Note that this field is
XmlTransient
and not included in the json view or xml view. It is only used on the server side, and not available in the frontend api!- Since:
- 5.11
-
getModifiableStreamingPlatformStatus
-
getPredictions
EveryMediaObject
can be assigned severalprediction records
(one perPlatform
). Originally these contained information about 'predicted playability' only. They can be used more generally, and also indicate whether for a certain platform the object is or was playable.- See Also:
-
implicitPredictions
public void implicitPredictions()Implicitly create predictions for all platforms that have a location, but no prediction yet. -
setPredictions
-
getPredictionsForXml
We don't return 'non announced' predictions in the xml. -
setPredictionsForXml
-
getPredictionWithoutFixing
LikegetPrediction(Platform)
but without also implicitly correcting theprediction state
if that happens to be not consistent with thelocations
. In other words this just returns the requested prediction without side effects. -
getPrediction
Returns the prediction for givenPlatform
. As a side effect the state of this prediction may also be implicitly corrected if that happens to be not consistent with thelocations
. In other words this returns the requested prediction, but also ensures that the prediction state is consistent with the locations.- See Also:
-
getAuthority
seePrediction.getAuthority()
()} or User, if no such prediction record. -
correctPredictions
public void correctPredictions() -
removePrediction
-
findOrCreatePrediction
-
findOrCreatePrediction
protected Prediction findOrCreatePrediction(Platform platform, boolean planned, Consumer<Prediction> onCreate) -
getLocations
Returns the locations inLocation.PRESENTATION_ORDER
-
get_Locations
-
set_Locations
-
getPresentationOrderLocations
Returns the locations inLocation.PRESENTATION_ORDER
- Since:
- 5.12 (in 5.11
getLocations()
behaved like this)
-
setLocations
-
getLocation
-
findLocation
-
findLocation
-
findLocation
-
addLocation
-
addLocation
-
removeLocation
-
removeLocation
-
revokeLocations
-
get_Relations
Property used for marshalling/unmarshalling, avoiding theRelation.copy(nl.vpro.domain.media.Relation)
(which disappears the id) -
set_Relations
-
getRelations
-
setRelations
-
addRelation
-
findRelation
-
findRelation
-
removeRelation
-
getImages
-
setImages
-
getImage
-
getImage
-
getImage
-
getMainImage
-
addImage
-
addImage
-
findImages
-
findImage
-
findImage
-
findImage
-
removeImage
-
removeImage
-
isEmbeddable
public boolean isEmbeddable()What does it mean to be 'embeddable'? -
setEmbeddable
public void setEmbeddable(boolean embeddable) -
isLocationAuthorityUpdate
public boolean isLocationAuthorityUpdate()When true Ceres/Pluto needs a restriction update. The underlying field is managed by Hibernate, and not accessible. -
setLocationAuthorityUpdate
-
setPublishStartInstant
- Specified by:
setPublishStartInstant
in interfaceMutableEmbargo<MediaObject>
- Overrides:
setPublishStartInstant
in classAbstractPublishableObject<MediaObject>
-
setPublishStopInstant
- Specified by:
setPublishStopInstant
in interfaceMutableEmbargo<MediaObject>
- Overrides:
setPublishStopInstant
in classAbstractPublishableObject<MediaObject>
-
hasInternetVodAuthority
protected boolean hasInternetVodAuthority() -
setCreationInstant
- Specified by:
setCreationInstant
in interfaceChangeable
- Overrides:
setCreationInstant
in classAbstractPublishableObject<MediaObject>
-
setWorkflow
- Overrides:
setWorkflow
in classPublishableObject<MediaObject>
-
getSortInstant
Returns the sortDate for this MediaObject. The default behaviour for this field falls back to other available fields in order:- First ScheduleEvent
- Publication start
- Creation date
- Since:
- 1.5
- See Also:
-
getSortDate
Deprecated.Buts still used in FTL which doesn't supportInstant
well?- Since:
- 1.5
-
invalidateSortDate
protected void invalidateSortDate() -
isMerged
public boolean isMerged()- Specified by:
isMerged
in interfaceTrackableObject
-
getMergedTo
-
setMergedTo
Mark this object as being merged to another mediaobject. This will only set themergedTo
field. The workflow status will be unaffected. The publisher will pick up that the workflow is notWorkflow.MERGED
while there themergedTo
field is set, and then correct that and republish accordingly.- Parameters:
mergedTo
- The destination of the merge.- Throws:
IllegalArgumentException
- If this mediaobject was already merged to some other object
-
getMergedToRef
-
setMergedToRef
-
getType
-
setMediaType
- Since:
- 5.8
-
getMediaType
- Specified by:
getMediaType
in interfaceMidIdentifiable
- Since:
- 3.2
-
equals
- Overrides:
equals
in classDomainObject
-
hashCode
public int hashCode()- Overrides:
hashCode
in classDomainObject
-
getUrnPrefix
- Specified by:
getUrnPrefix
in classAbstractPublishableObject<MediaObject>
-
getMainTitle
Overridden to help hibernate search (see MediaSearchMappingFactory) Probably has to to with JDK-8071693
- Specified by:
getMainTitle
in interfaceTextualObjectUpdate<Title,
Description, MediaObject>
-
getSubTitle
Overridden to help hibernate search (see MediaSearchMappingFactory) Probably has to to with ...
Retrieves the first sub- or episode title. MIS distributes episode titles. For internal use this episode title is handled as a subtitle.- Specified by:
getSubTitle
in interfaceTextualObjectUpdate<Title,
Description, MediaObject> - Returns:
- - the first subtitle
-
getMainDescription
Overridden to help hibernate search (see MediaSearchMappingFactory) Probably has to to with ...
Returns the first available description. Probably the 'MAIN' description.- Specified by:
getMainDescription
in interfaceTextualObjectUpdate<Title,
Description, MediaObject>
-
getShortTitle
Overridden to help FTL. See FREEMARKER-24
- Specified by:
getShortTitle
in interfaceTextualObjectUpdate<Title,
Description, MediaObject>
-
getOriginalTitle
Overridden to help FTL. See FREEMARKER-24
- Specified by:
getOriginalTitle
in interfaceTextualObjectUpdate<Title,
Description, MediaObject>
-
getWorkTitle
Overridden to help FTL. See FREEMARKER-24
- Specified by:
getWorkTitle
in interfaceTextualObjectUpdate<Title,
Description, MediaObject>
-
getLexicoTitle
Overridden to help FTL. See FREEMARKER-24
Return the 'lexicographic title'. This is the title where the object normally would be sorted on. This defaults toTextualObjectUpdate.getMainTitle()
if no explicit value was set. If an explicit value is set, it may e.g. be the same asTextualObjectUpdate.getMainTitle()
but with leading articles ommitted.- Specified by:
getLexicoTitle
in interfaceTextualObjectUpdate<Title,
Description, MediaObject>
-
getAbbreviatedTitle
Overridden to help FTL. See FREEMARKER-24
- Specified by:
getAbbreviatedTitle
in interfaceTextualObjectUpdate<Title,
Description, MediaObject>
-
getSubDescription
Overridden to help FTL. See FREEMARKER-24
- Specified by:
getSubDescription
in interfaceTextualObjectUpdate<Title,
Description, MediaObject>
-
getShortDescription
Overridden to help FTL. See FREEMARKER-24
- Specified by:
getShortDescription
in interfaceTextualObjectUpdate<Title,
Description, MediaObject>
-
mergeImages
-
addAllImages
-
removeImages
public void removeImages() -
serializeForCalcCRC32
protected byte[] serializeForCalcCRC32()- Overrides:
serializeForCalcCRC32
in classPublishableObject<MediaObject>
-
calcCRC32
Description copied from class:PublishableObject
We keep track of a CRC32 hash to determine whether an object is 'changed', in the sense that it would need republication.- Overrides:
calcCRC32
in classPublishableObject<MediaObject>
-
getCorrelation
Description copied from interface:MediaIdentifiable
The correlation of thisMediaIdentifiable
is the best id currently available. Oftentimes that will be theMidIdentifiable.getMid()
, but in certain situation that is not (yet) available, and it may fall back to (the first)MediaIdentifiable.getCrids()
.- Specified by:
getCorrelation
in interfaceMediaIdentifiable
- Specified by:
getCorrelation
in interfaceMidIdentifiable
-
calcCorrelation
-
toString
- Overrides:
toString
in classPublishableObject<MediaObject>
-
getVersion
-
setTeletext
-
setIsDubbed
-
getRepubReason
␟ and ␟ are used to encode multiple reasons (with a date) in headers, and therefore should not be in the database field itself. \t can be used to temporary store multiple reasons, which will all be published at the same time. -
setRepubReason
␟ and ␟ are used to encode multiple reasons (with a date) in headers, and therefore should not be in the database field itself. \t can be used to temporary store multiple reasons, which will all be published at the same time. -
getRepubDestinations
-
setRepubDestinations
-
setAvailableSubtitles
-
Instant
well?