001/* Copyright (C) 2014 konik.io
002 *
003 * This file is part of the Konik library.
004 *
005 * The Konik library is free software: you can redistribute it and/or modify
006 * it under the terms of the GNU Affero General Public License as
007 * published by the Free Software Foundation, either version 3 of the
008 * License, or (at your option) any later version.
009 *
010 * The Konik library is distributed in the hope that it will be useful,
011 * but WITHOUT ANY WARRANTY; without even the implied warranty of
012 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
013 * GNU Affero General Public License for more details.
014 *
015 * You should have received a copy of the GNU Affero General Public License
016 * along with the Konik library. If not, see <http://www.gnu.org/licenses/>.
017 */
018
019package io.konik.zugferd.unqualified;
020
021import io.konik.validator.annotation.NotBlank;
022
023import javax.xml.bind.annotation.XmlAccessType;
024import javax.xml.bind.annotation.XmlAccessorType;
025import javax.xml.bind.annotation.XmlAttribute;
026import javax.xml.bind.annotation.XmlSchemaType;
027import javax.xml.bind.annotation.XmlType;
028import javax.xml.bind.annotation.XmlValue;
029import javax.xml.bind.annotation.adapters.CollapsedStringAdapter;
030import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
031
032/**
033 * = The classification code
034 */
035@XmlAccessorType(XmlAccessType.FIELD)
036@XmlType(name = "CodeType", propOrder = { "value" })
037public class Code {
038
039   @NotBlank
040   @XmlValue
041   @XmlJavaTypeAdapter(CollapsedStringAdapter.class)
042   @XmlSchemaType(name = "token")
043   protected String value;
044
045   @NotBlank
046   @XmlAttribute(name = "listID")
047   @XmlJavaTypeAdapter(CollapsedStringAdapter.class)
048   @XmlSchemaType(name = "token")
049   protected String listId;
050
051   @XmlAttribute(name = "listVersionID")
052   @XmlJavaTypeAdapter(CollapsedStringAdapter.class)
053   @XmlSchemaType(name = "token")
054   protected String listVersionId;
055
056   /**
057    * Gets the value.
058    *
059    * @return the value
060    */
061   public String getValue() {
062      return value;
063   }
064
065   /**
066    * Sets the value.
067    *
068    * @param value the value
069    */
070   public void setValue(String value) {
071      this.value = value;
072   }
073
074   /**
075    * Gets the list id.
076    *
077    * @return the list id
078    */
079   public String getListID() {
080      return listId;
081   }
082
083   /**
084    * Sets the list id.
085    *
086    * @param value the list id
087    */
088   public void setListID(String value) {
089      this.listId = value;
090   }
091
092   /**
093    * Gets the list version id.
094    *
095    * @return the list version id
096    */
097   public String getListVersionID() {
098      return listVersionId;
099   }
100
101   /**
102    * Sets the list version id.
103    *
104    * @param value the list version id
105    */
106   public void setListVersionID(String value) {
107      this.listVersionId = value;
108   }
109
110}