GPXCopyright.java

  1. /*
  2.  * This file is part of Openrouteservice.
  3.  *
  4.  * Openrouteservice is free software; you can redistribute it and/or modify it under the terms of the
  5.  * GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1
  6.  * of the License, or (at your option) any later version.
  7.  *
  8.  * This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
  9.  * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
  10.  * See the GNU Lesser General Public License for more details.
  11.  *
  12.  * You should have received a copy of the GNU Lesser General Public License along with this library;
  13.  * if not, see <https://www.gnu.org/licenses/>.
  14.  */

  15. package org.heigit.ors.api.responses.routing.gpx;

  16. import jakarta.xml.bind.annotation.XmlAttribute;
  17. import jakarta.xml.bind.annotation.XmlElement;

  18. import java.util.Calendar;

  19. public class GPXCopyright {
  20.     @XmlAttribute(name = "author")
  21.     private final String author;
  22.     @XmlElement(name = "year")
  23.     private final int year;
  24.     @XmlElement(name = "license")
  25.     private final String license;

  26.     public GPXCopyright(String contentLicense, String author) {
  27.         this.author = author;
  28.         this.license = contentLicense;
  29.         this.year = Calendar.getInstance().get(Calendar.YEAR);
  30.     }
  31. }