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; 028import javax.xml.bind.annotation.adapters.CollapsedStringAdapter; 029import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter; 030 031 032/** 033 * = The Referenced Document 034 * 035 * References a external Document. 036 */ 037@XmlAccessorType(XmlAccessType.FIELD) 038@XmlType(name = "ReferencedDocumentType", propOrder = { "issued", "id" }) 039public class ReferencedDocument { 040 041 @Valid 042 @XmlElement(name = "IssueDateTime") 043 private DateTime issued; 044 045 @XmlElement(name = "ID") 046 @XmlJavaTypeAdapter(CollapsedStringAdapter.class) 047 private String id; 048 049 /** 050 * Gets the issue date time. 051 * 052 * Profile:: COMFORT 053 * 054 * @return the issue date time 055 */ 056 public DateTime getIssued() { 057 return issued; 058 } 059 060 /** 061 * Sets the issue date time. 062 * 063 * Profile:: COMFORT 064 * 065 * @param issued the new issue date time 066 * @return the referenced document 067 */ 068 public ReferencedDocument setIssued(DateTime issued) { 069 this.issued = issued; 070 return this; 071 } 072 073 /** 074 * Sets the reference document id. 075 * 076 * @param referenceDocumentId the value 077 * @return the referenced document 078 */ 079 public ReferencedDocument setId(String referenceDocumentId){ 080 id = referenceDocumentId; 081 return this; 082 } 083 084 /** 085 * Gets the id. 086 * 087 * @return the id 088 */ 089 public String getId() { 090 return id; 091 } 092}