Class AssemblageConfig


  • public class AssemblageConfig
    extends Object
    Contains hints and configuration about how to assemble media objects from MediaUpdate objects.
    Since:
    5.5
    Author:
    Michiel Meeuwissen
    • Method Detail

      • getOwnerAndSimilar

        public Set<nl.vpro.domain.media.support.OwnerType> getOwnerAndSimilar()
      • loggerFor

        public nl.vpro.logging.simple.SimpleLogger loggerFor​(Logger log)
      • loggerFor

        public nl.vpro.logging.simple.SimpleLogger loggerFor​(Logger log)
      • withLogger

        public AssemblageConfig withLogger​(nl.vpro.logging.simple.SimpleLogger logger)
      • isMemberOfUpdate

        public boolean isMemberOfUpdate()
      • withAllTrue

        public static AssemblageConfig.Builder withAllTrue()
        Sets updating as permissive as possible, with a few exceptions:
        • relations: only sync relations of the broadcasters associated with the account (this is also the default)
        • memberrefs
      • considerForDeletion

        public boolean considerForDeletion​(Segment segment)
      • backwardsCompatible

        public void backwardsCompatible​(IntegerVersion version)
        Makes the default assemblage backwards compatible for certain properties (unless they were explicitly stated).
      • setMemberOfUpdateBoolean

        public void setMemberOfUpdateBoolean​(boolean bool)
      • isCopyPredictions

        public boolean isCopyPredictions()
      • isCopyTwitterRefs

        public boolean isCopyTwitterRefs()
      • isCopyLanguageAndCountry

        public boolean isCopyLanguageAndCountry()
      • getOwner

        public nl.vpro.domain.media.support.OwnerType getOwner()
      • getSimilarOwnerTypes

        public List<nl.vpro.domain.media.support.OwnerType> getSimilarOwnerTypes()
      • isCopyWorkflow

        public boolean isCopyWorkflow()
      • getCopyLanguageAndCountry

        public Boolean getCopyLanguageAndCountry()
      • isImageMetaData

        public boolean isImageMetaData()
      • getCopyPredictions

        public Boolean getCopyPredictions()
      • isEpisodeOfUpdate

        public boolean isEpisodeOfUpdate()
      • isGuessEpisodePosition

        public boolean isGuessEpisodePosition()
      • isRatingsUpdate

        public boolean isRatingsUpdate()
      • getCopyTwitterRefs

        public Boolean getCopyTwitterRefs()
      • isCopyIntentions

        public boolean isCopyIntentions()
      • isCopyTargetGroups

        public boolean isCopyTargetGroups()
      • isCopyGeoLocations

        public boolean isCopyGeoLocations()
      • isCopyTopics

        public boolean isCopyTopics()
      • isCreateScheduleEvents

        public boolean isCreateScheduleEvents()
      • getDeleteIfNoScheduleEventsLeft

        public Predicate<Program> getDeleteIfNoScheduleEventsLeft()
      • getMergeScheduleEvents

        public Duration getMergeScheduleEvents()
        This is mainly targeted at PREPR which does not support programs spanning 0 o'clock. If this is set to >= 0, then schedule merging will merge adjacent schedule events if they are of the same MID The size of the duration defines the maximal gap between the events. (For PREPR there is never anything broadcast in the second before midnight)
      • isLocationsUpdate

        public boolean isLocationsUpdate()
      • getStealCrids

        public org.meeuw.functional.TriPredicate<MediaObject,​MediaObject,​String> getStealCrids()
        Matching happens on crid. There is a possibility though that the found object is of the wrong type (e.g. a Program and not a Segment) If stealCrids is true, then in that situation the existing object is left, but the matching crid is removed.
      • getStealSegments

        public AssemblageConfig.Steal getStealSegments()
        If an incoming segment matches a segment of _different_ program, then disconnect it from that other program Otherwise consider this situation errorneous.
      • isFollowMerges

        public boolean isFollowMerges()
        TODO
        Since:
        5.13
      • getLogger

        public nl.vpro.logging.simple.SimpleLogger getLogger()
      • setOwner

        public void setOwner​(nl.vpro.domain.media.support.OwnerType owner)
      • setSimilarOwnerTypes

        public void setSimilarOwnerTypes​(List<nl.vpro.domain.media.support.OwnerType> similarOwnerTypes)
      • setCopyWorkflow

        public void setCopyWorkflow​(boolean copyWorkflow)
      • setCopyLanguageAndCountry

        public void setCopyLanguageAndCountry​(Boolean copyLanguageAndCountry)
      • setImageMetaData

        public void setImageMetaData​(boolean imageMetaData)
      • setCopyPredictions

        public void setCopyPredictions​(Boolean copyPredictions)
      • setEpisodeOfUpdate

        public void setEpisodeOfUpdate​(boolean episodeOfUpdate)
      • setGuessEpisodePosition

        public void setGuessEpisodePosition​(boolean guessEpisodePosition)
      • setRatingsUpdate

        public void setRatingsUpdate​(boolean ratingsUpdate)
      • setCopyTwitterRefs

        public void setCopyTwitterRefs​(Boolean copyTwitterRefs)
      • setCopyIntentions

        public void setCopyIntentions​(boolean copyIntentions)
      • setCopyTargetGroups

        public void setCopyTargetGroups​(boolean copyTargetGroups)
      • setCopyGeoLocations

        public void setCopyGeoLocations​(boolean copyGeoLocations)
      • setCopyTopics

        public void setCopyTopics​(boolean copyTopics)
      • setCreateScheduleEvents

        public void setCreateScheduleEvents​(boolean createScheduleEvents)
      • setDeleteIfNoScheduleEventsLeft

        public void setDeleteIfNoScheduleEventsLeft​(Predicate<Program> deleteIfNoScheduleEventsLeft)
      • setMergeScheduleEvents

        public void setMergeScheduleEvents​(Duration mergeScheduleEvents)
        This is mainly targeted at PREPR which does not support programs spanning 0 o'clock. If this is set to >= 0, then schedule merging will merge adjacent schedule events if they are of the same MID The size of the duration defines the maximal gap between the events. (For PREPR there is never anything broadcast in the second before midnight)
      • setLocationsUpdate

        public void setLocationsUpdate​(boolean locationsUpdate)
      • setStealCrids

        public void setStealCrids​(org.meeuw.functional.TriPredicate<MediaObject,​MediaObject,​String> stealCrids)
        Matching happens on crid. There is a possibility though that the found object is of the wrong type (e.g. a Program and not a Segment) If stealCrids is true, then in that situation the existing object is left, but the matching crid is removed.
      • setStealSegments

        public void setStealSegments​(AssemblageConfig.Steal stealSegments)
        If an incoming segment matches a segment of _different_ program, then disconnect it from that other program Otherwise consider this situation errorneous.
      • setCridsForDelete

        public void setCridsForDelete​(Predicate<String> cridsForDelete)
      • setFollowMerges

        public void setFollowMerges​(boolean followMerges)
        TODO
        Since:
        5.13
      • setDeleteBroadcasters

        public void setDeleteBroadcasters​(Predicate<MediaObject> deleteBroadcasters)
      • setLogger

        public void setLogger​(nl.vpro.logging.simple.SimpleLogger logger)
      • equals

        public boolean equals​(@Nullable Object o)
        Overrides:
        equals in class Object
      • canEqual

        protected boolean canEqual​(@Nullable Object other)
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object