Package nl.vpro.domain.media
Class RecursiveMemberRef
- java.lang.Object
-
- nl.vpro.domain.media.RecursiveMemberRef
-
- All Implemented Interfaces:
Serializable
,Comparable<RecursiveMemberRef>
,ParentChildRelation
,RecursiveParentChildRelation
public class RecursiveMemberRef extends Object implements Serializable, RecursiveParentChildRelation, Comparable<RecursiveMemberRef>
- Since:
- 5.13
- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
RecursiveMemberRef.Builder
-
Field Summary
Fields Modifier and Type Field Description protected String
childMid
protected SortedSet<RecursiveMemberRef>
episodeOf
protected SortedSet<RecursiveMemberRef>
memberOf
protected String
midRef
protected RecursiveMemberRef
segmentOf
protected MediaType
type
-
Constructor Summary
Constructors Constructor Description RecursiveMemberRef()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static @NonNull RecursiveMemberRef.Builder
builder()
int
compareTo(@NonNull RecursiveMemberRef memberRef)
static SortedSet<RecursiveMemberRef>
episodeOfs(MemberRef ref)
For certain memberRef, create a set of recursive Members representing the 'episode' of the parent of this memberRefboolean
equals(Object o)
String
getChildMid()
SortedSet<RecursiveMemberRef>
getEpisodeOf()
Integer
getIndex()
SortedSet<RecursiveMemberRef>
getMemberOf()
String
getMidRef()
RecursiveMemberRef
getSegmentOf()
MediaType
getType()
The type of the parentint
hashCode()
boolean
isCircular()
If this recursive memberref is marked 'circular' then we have detected that in the current stack the parent is already available.static SortedSet<RecursiveMemberRef>
memberOfs(MemberRef ref)
For certain memberRef, create a set of recursive Members representing the 'memberOf' of the parent of this memberRefstatic RecursiveMemberRef
ofSegment(Segment segment)
protected static RecursiveMemberRef
ofSegment(Segment segment, Set<nl.vpro.domain.media.RecursiveMemberRef.StackElement> stack)
void
setChildMid(String childMid)
void
setCircular(Boolean circular)
void
setEpisodeOf(SortedSet<RecursiveMemberRef> episodeOf)
void
setHighlighted(Boolean highlighted)
void
setIndex(Integer index)
void
setMemberOf(SortedSet<RecursiveMemberRef> memberOf)
void
setMidRef(String midRef)
void
setParent(ParentChildRelation parent)
void
setSegmentOf(RecursiveMemberRef segmentOf)
void
setType(MediaType type)
String
toString()
String
toString(String childMid)
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface nl.vpro.domain.media.ParentChildRelation
getParentMid
-
Methods inherited from interface nl.vpro.domain.media.RecursiveParentChildRelation
getOrCreate, getOrCreateEpisodeOf, getOrCreateMemberOf
-
-
-
-
Field Detail
-
midRef
protected String midRef
-
childMid
protected String childMid
-
type
protected MediaType type
-
memberOf
protected SortedSet<RecursiveMemberRef> memberOf
-
episodeOf
protected SortedSet<RecursiveMemberRef> episodeOf
-
segmentOf
protected RecursiveMemberRef segmentOf
-
-
Method Detail
-
ofSegment
public static RecursiveMemberRef ofSegment(Segment segment)
-
ofSegment
protected static RecursiveMemberRef ofSegment(Segment segment, Set<nl.vpro.domain.media.RecursiveMemberRef.StackElement> stack)
-
memberOfs
public static SortedSet<RecursiveMemberRef> memberOfs(MemberRef ref)
For certain memberRef, create a set of recursive Members representing the 'memberOf' of the parent of this memberRef
-
episodeOfs
public static SortedSet<RecursiveMemberRef> episodeOfs(MemberRef ref)
For certain memberRef, create a set of recursive Members representing the 'episode' of the parent of this memberRef
-
isCircular
public boolean isCircular()
If this recursive memberref is marked 'circular' then we have detected that in the current stack the parent is already available. this recursive memberref will not includes its parent, because that would lead to infinite recursion.
-
getChildMid
public String getChildMid()
- Specified by:
getChildMid
in interfaceParentChildRelation
-
compareTo
public int compareTo(@NonNull RecursiveMemberRef memberRef)
- Specified by:
compareTo
in interfaceComparable<RecursiveMemberRef>
-
builder
public static @NonNull RecursiveMemberRef.Builder builder()
-
setMidRef
public void setMidRef(String midRef)
-
setChildMid
public void setChildMid(String childMid)
-
setParent
public void setParent(ParentChildRelation parent)
-
setType
public void setType(MediaType type)
-
setSegmentOf
public void setSegmentOf(RecursiveMemberRef segmentOf)
- Specified by:
setSegmentOf
in interfaceRecursiveParentChildRelation
-
setIndex
public void setIndex(Integer index)
-
setHighlighted
public void setHighlighted(Boolean highlighted)
-
setCircular
public void setCircular(Boolean circular)
-
getMidRef
public String getMidRef()
- Specified by:
getMidRef
in interfaceParentChildRelation
-
getType
public MediaType getType()
Description copied from interface:ParentChildRelation
The type of the parent- Specified by:
getType
in interfaceParentChildRelation
-
setMemberOf
public void setMemberOf(SortedSet<RecursiveMemberRef> memberOf)
- Specified by:
setMemberOf
in interfaceRecursiveParentChildRelation
-
getMemberOf
public SortedSet<RecursiveMemberRef> getMemberOf()
- Specified by:
getMemberOf
in interfaceRecursiveParentChildRelation
-
setEpisodeOf
public void setEpisodeOf(SortedSet<RecursiveMemberRef> episodeOf)
- Specified by:
setEpisodeOf
in interfaceRecursiveParentChildRelation
-
getEpisodeOf
public SortedSet<RecursiveMemberRef> getEpisodeOf()
- Specified by:
getEpisodeOf
in interfaceRecursiveParentChildRelation
-
getSegmentOf
public RecursiveMemberRef getSegmentOf()
- Specified by:
getSegmentOf
in interfaceRecursiveParentChildRelation
-
getIndex
public Integer getIndex()
-
-