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.unqualified; 020 021import javax.xml.bind.annotation.XmlAccessType; 022import javax.xml.bind.annotation.XmlAccessorType; 023import javax.xml.bind.annotation.XmlAttribute; 024import javax.xml.bind.annotation.XmlSchemaType; 025import javax.xml.bind.annotation.XmlType; 026import javax.xml.bind.annotation.XmlValue; 027import javax.xml.bind.annotation.adapters.CollapsedStringAdapter; 028import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter; 029 030/** 031 * = The ID. 032 */ 033@XmlAccessorType(XmlAccessType.FIELD) 034@XmlType(name = "IDType", propOrder = { "value" }) 035public class ID { 036 037 @XmlValue 038 @XmlJavaTypeAdapter(CollapsedStringAdapter.class) 039 @XmlSchemaType(name = "token") 040 private String value; 041 042 @XmlAttribute(name = "schemeID") 043 @XmlJavaTypeAdapter(CollapsedStringAdapter.class) 044 @XmlSchemaType(name = "token") 045 private String schemeId; 046 047 /** Instantiates a new id. */ 048 public ID() { 049 } 050 051 /** 052 * Instantiates a new id with value and a null scheme 053 * 054 * @param value the value 055 */ 056 public ID(String value) { 057 this.value = value; 058 } 059 060 /** 061 * Instantiates a new id with value and scheme id. 062 * 063 * @param value the value 064 * @param schemeId the scheme id 065 */ 066 public ID(String value, String schemeId) { 067 this.value = value; 068 this.schemeId = schemeId; 069 } 070 071 /** 072 * Gets the value. 073 * 074 * @return the value 075 */ 076 public String getValue() { 077 return value; 078 } 079 080 /** 081 * Sets the value. 082 * 083 * @param value the new value 084 */ 085 public void setValue(String value) { 086 this.value = value; 087 } 088 089 /** 090 * Gets the scheme id. 091 * 092 * @return the scheme id 093 */ 094 public String getSchemeId() { 095 return schemeId; 096 } 097 098 /** 099 * Sets the scheme id. 100 * 101 * @param schemeId the new scheme id 102 */ 103 public void setSchemeId(String schemeId) { 104 this.schemeId = schemeId; 105 } 106 107}