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 javax.xml.bind.annotation.XmlAccessType;
022import javax.xml.bind.annotation.XmlAccessorType;
023import javax.xml.bind.annotation.XmlElement;
024import javax.xml.bind.annotation.XmlType;
025import javax.xml.bind.annotation.adapters.CollapsedStringAdapter;
026import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
027
028/**
029 * = The Note
030 */
031@XmlAccessorType(XmlAccessType.FIELD)
032@XmlType(name = "NoteType", propOrder = { "content", "subjectCode" })
033public class Note {
034
035        @XmlElement(name = "Content")
036        private String content;
037
038        @XmlElement(name = "SubjectCode")
039        @XmlJavaTypeAdapter(CollapsedStringAdapter.class)
040        private String subjectCode;
041
042        /** Instantiates a new note. */
043        public Note() {
044        }
045
046        /**
047         * Instantiates a new note without a content only.
048         *
049         * @param content the content
050         */
051        public Note(String content) {
052                super();
053                this.content = content;
054        }
055
056        /**
057         * Instantiates a new note.
058         *
059         * @param content the content
060         * @param subjectCode the subject code
061         */
062        public Note(String content, String subjectCode) {
063                super();
064                this.content = content;
065                this.subjectCode = subjectCode;
066        }
067
068        /**
069         * Gets the content.
070         *
071         * @return the content
072         */
073        public String getContent() {
074                return content;
075        }
076
077        /**
078    * Sets the content.
079    *
080    * @param content the new content
081    * @return the note
082    */
083        public Note setContent(String content) {
084                this.content = content;
085                return this;
086        }
087
088        /**
089         * Gets the subject code.
090         *
091         * @return the subject code
092         */
093        public String getSubjectCode() {
094                return subjectCode;
095        }
096
097        /**
098    * Sets the subject code.
099    *
100    * @param subjectCode the new subject code
101    * @return the note
102    */
103        public Note setSubjectCode(String subjectCode) {
104                this.subjectCode = subjectCode;
105                return this;
106        }
107
108}