001
002/*
003 * Copyright (C) 2010 Archie L. Cobbs. All rights reserved.
004 *
005 * $Id$
006 */
007
008package org.dellroad.jibxbindings.pidf.lo;
009
010import java.net.URI;
011import java.util.Date;
012
013import org.dellroad.jibxbindings.pidf.LangContent;
014
015/**
016 * The {@code <gp:usage-rules>} element as defined in RFC 4119.
017 */
018public class UsageRules implements Cloneable {
019
020    private boolean retransmissionAllowed;
021    private Date retentionExpiry;
022    private URI externalRuleset;
023    private LangContent noteWell;
024
025    public boolean isRetransmissionAllowed() {
026        return this.retransmissionAllowed;
027    }
028    public void setRetransmissionAllowed(boolean retransmissionAllowed) {
029        this.retransmissionAllowed = retransmissionAllowed;
030    }
031
032    public Date getRetentionExpiry() {
033        return this.retentionExpiry;
034    }
035    public void setRetentionExpiry(Date retentionExpiry) {
036        this.retentionExpiry = retentionExpiry;
037    }
038
039    public URI getExternalRuleset() {
040        return this.externalRuleset;
041    }
042    public void setExternalRuleset(URI externalRuleset) {
043        this.externalRuleset = externalRuleset;
044    }
045
046    public LangContent getNoteWell() {
047        return this.noteWell;
048    }
049    public void setNoteWell(LangContent noteWell) {
050        this.noteWell = noteWell;
051    }
052
053// Cloneable
054
055    @Override
056    public UsageRules clone() {
057        final UsageRules clone;
058        try {
059            clone = (UsageRules)super.clone();
060        } catch (CloneNotSupportedException e) {
061            throw new RuntimeException(e);
062        }
063        clone.noteWell = this.noteWell != null ? this.noteWell.clone() : null;
064        return clone;
065    }
066}
067