All Downloads are FREE. Search and download functionalities are using the official Maven repository.

nl.vpro.domain.media.Member Maven / Gradle / Ivy

Go to download

The basic domain classes for 'media', the core of POMS. Also, the 'update' XML bindings for it. It also contains some closely related domain classes like the enum to contain NICAM kijkwijzer settings.

There is a newer version: 8.3.1
Show newest version
package nl.vpro.domain.media;

import java.io.Serial;
import java.io.Serializable;

import jakarta.xml.bind.annotation.*;

/**
 * This combines a MemberRef with MediaObject. This represents a member 'from the other side'.
 * Because:
 * - The XML representation of a MemberRef does only make sense as a sub XML of its parent.
 * @author Michiel Meeuwissen
 */
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "memberType",
    propOrder = {})
public class Member implements Serializable {

    @Serial
    private static final long serialVersionUID = 8447129713109420423L;

    @XmlElement(required = true)
    private MediaObject member;

    @XmlAttribute
    private boolean highlighted;
    @XmlAttribute
    private Integer number;

    private Member() {
        // just to satisfy jaxb
    }

    public Member(MemberRef ref) {
        member = ref.getMember();
        highlighted = ref.isHighlighted();
        number = ref.getNumber();
    }

    public boolean isHighlighted() {
        return highlighted;
    }
    public Integer getNumber() {
        return number;
    }
    public MediaObject getMember() {
        return member;
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy