package iptc.newsml.g2.model;

/*
 * #%L
 * IPTC NewsML G2 Model
 * %%
 * Copyright (C) 2015 Ben Asmussen <opensource@ben-asmussen.com>
 * %%
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 * 
 *      http://www.apache.org/licenses/LICENSE-2.0
 * 
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * #L%
 */

import java.io.Serializable;
import java.util.Calendar;
import java.util.LinkedHashSet;
import java.util.Set;

import javax.validation.constraints.NotNull;
import javax.xml.bind.annotation.XmlElement;

/**
 * ContentMetadata Model Object
 * 
 * @see <a
 *      href="http://www.iptc.org/std/NewsML-G2/2.19/specification/XML-Schema-Doc-Power/ContentMetadata.html">ContentMetadata</a>
 */
public class ContentMeta implements Serializable, Cloneable
{
    private static final long serialVersionUID = 1L;

    private Integer urgency;

    @NotNull
    private Calendar contentCreated;

    private Calendar contentModified;

    @NotNull
    private Set<Keyword> keyword = new LinkedHashSet<Keyword>();

    public ContentMeta()
    {
    }

    @XmlElement(nillable = true)
    public Integer getUrgency()
    {
        return urgency;
    }

    public void setUrgency(Integer urgency)
    {
        this.urgency = urgency;

    }

    @XmlElement()
    public Calendar getContentCreated()
    {
        return contentCreated;
    }

    public void setContentCreated(Calendar contentCreated)
    {
        this.contentCreated = contentCreated;

    }

    @XmlElement(nillable = true)
    public Calendar getContentModified()
    {
        return contentModified;
    }

    public void setContentModified(Calendar contentModified)
    {
        this.contentModified = contentModified;

    }

    @XmlElement()
    public Set<Keyword> getKeyword()
    {
        return keyword;
    }

    public void setKeyword(Set<Keyword> keyword)
    {
        this.keyword = keyword;

    }
}

package iptc.newsml.g2.model;

/*
 * #%L
 * IPTC NewsML G2 Model
 * %%
 * Copyright (C) 2015 Ben Asmussen <opensource@ben-asmussen.com>
 * %%
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 * 
 *      http://www.apache.org/licenses/LICENSE-2.0
 * 
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * #L%
 */

import java.io.Serializable;
import java.util.Calendar;
import java.util.LinkedHashSet;
import java.util.Set;

import javax.validation.constraints.NotNull;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlType;

/**
 * ContentMetadata Model Object
 * 
 * @see <a
 *      href="http://www.iptc.org/std/NewsML-G2/2.19/specification/XML-Schema-Doc-Power/ContentMetadata.html">ContentMetadata</a>
 */

@XmlType(propOrder =
{ "urgency", "contentCreated", "contentModified", "keyword" })
// TODO add support
// "language", "subject", "slugline", "headline", "description", "", "", "", ""
public class ContentMeta implements Serializable, Cloneable
{
    private static final long serialVersionUID = 1L;

    private Integer urgency;

    @NotNull
    private Calendar contentCreated;

    private Calendar contentModified;

    @NotNull
    private Set<Keyword> keyword = new LinkedHashSet<Keyword>();

    public ContentMeta()
    {
    }

    @XmlElement(nillable = true)
    public Integer getUrgency()
    {
        return urgency;
    }

    public void setUrgency(Integer urgency)
    {
        this.urgency = urgency;

    }

    @XmlElement()
    public Calendar getContentCreated()
    {
        return contentCreated;
    }

    public void setContentCreated(Calendar contentCreated)
    {
        this.contentCreated = contentCreated;

    }

    @XmlElement(nillable = true)
    public Calendar getContentModified()
    {
        return contentModified;
    }

    public void setContentModified(Calendar contentModified)
    {
        this.contentModified = contentModified;

    }

    @XmlElement()
    public Set<Keyword> getKeyword()
    {
        return keyword;
    }

    public void setKeyword(Set<Keyword> keyword)
    {
        this.keyword = keyword;

    }
}

Improve ContentMeta