001/*
002 * Copyright (C) 2014 konik.io
003 *
004 * This file is part of Konik library.
005 *
006 * Konik library is free software: you can redistribute it and/or modify
007 * it under the terms of the GNU Affero General Public License as published by
008 * the Free Software Foundation, either version 3 of the License, or
009 * (at your option) any later version.
010 *
011 * Konik library is distributed in the hope that it will be useful,
012 * but WITHOUT ANY WARRANTY; without even the implied warranty of
013 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
014 * GNU Affero General Public License for more details.
015 *
016 * You should have received a copy of the GNU Affero General Public License
017 * along with Konik library.  If not, see <http://www.gnu.org/licenses/>.
018 */
019package io.konik.zugferd.entity;
020
021import io.konik.zugferd.qualified.DateTime;
022
023import javax.validation.Valid;
024import javax.xml.bind.annotation.XmlAccessType;
025import javax.xml.bind.annotation.XmlAccessorType;
026import javax.xml.bind.annotation.XmlElement;
027import javax.xml.bind.annotation.XmlType;
028
029
030/**
031 * = The Period of time
032 * 
033 */
034@XmlAccessorType(XmlAccessType.FIELD)
035@XmlType(name = "SpecifiedPeriodType", propOrder = { "start", "end" })
036public class Period {
037
038   @Valid
039        @XmlElement(name = "StartDateTime")
040        private DateTime start;
041
042   @Valid
043        @XmlElement(name = "EndDateTime")
044        private DateTime end;
045
046        /**
047         * Gets the start date time.
048         * 
049         * @return the start date time
050         */
051        public DateTime getStart() {
052                return start;
053        }
054
055        /**
056    * Sets the start date time.
057    *
058    * @param start the new start date time
059    * @return the period
060    */
061        public Period setStart(DateTime start) {
062                this.start = start;
063                return this;
064        }
065
066        /**
067         * Gets the end date time.
068         * 
069         * @return the end date time
070         */
071        public DateTime getEnd() {
072                return end;
073        }
074
075        /**
076    * Sets the end date time.
077    *
078    * @param end the new end date time
079    * @return the period
080    */
081        public Period setEnd(DateTime end) {
082                this.end = end;
083                return this;
084        }
085
086}