Properties.java

  1. /*
  2.  * GovWay - A customizable API Gateway
  3.  * https://govway.org
  4.  *
  5.  * Copyright (c) 2005-2025 Link.it srl (https://link.it).
  6.  *
  7.  * This program is free software: you can redistribute it and/or modify
  8.  * it under the terms of the GNU General Public License version 3, as published by
  9.  * the Free Software Foundation.
  10.  *
  11.  * This program is distributed in the hope that it will be useful,
  12.  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  13.  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  14.  * GNU General Public License for more details.
  15.  *
  16.  * You should have received a copy of the GNU General Public License
  17.  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
  18.  *
  19.  */

  20. package org.openspcoop2.utils.jaxb;

  21. import java.util.ArrayList;
  22. import java.util.List;

  23. import javax.xml.bind.annotation.XmlAccessType;
  24. import javax.xml.bind.annotation.XmlAccessorType;
  25. import javax.xml.bind.annotation.XmlType;

  26. /**
  27.  * <p>Java class for anonymous complex type.
  28.  *
  29.  * <p>The following schema fragment specifies the expected content contained within this class.
  30.  *
  31.  * <pre>
  32.  * &lt;complexType&gt;
  33.  *   &lt;complexContent&gt;
  34.  *     &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"&gt;
  35.  *       &lt;sequence&gt;
  36.  *         &lt;element name="entry" maxOccurs="unbounded" minOccurs="0"&gt;
  37.  *           &lt;complexType&gt;
  38.  *             &lt;complexContent&gt;
  39.  *               &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"&gt;
  40.  *                 &lt;sequence&gt;
  41.  *                   &lt;element name="key" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/&gt;
  42.  *                   &lt;element name="value" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/&gt;
  43.  *                 &lt;/sequence&gt;
  44.  *               &lt;/restriction&gt;
  45.  *             &lt;/complexContent&gt;
  46.  *           &lt;/complexType&gt;
  47.  *         &lt;/element&gt;
  48.  *       &lt;/sequence&gt;
  49.  *     &lt;/restriction&gt;
  50.  *   &lt;/complexContent&gt;
  51.  * &lt;/complexType&gt;
  52.  * </pre>
  53.  *
  54.  * @author $Author$
  55.  * @version $Rev$, $Date$
  56.  */
  57. @XmlAccessorType(XmlAccessType.FIELD)
  58. @XmlType(name = "", propOrder = {
  59.     "entry"
  60. })
  61. public class Properties {

  62.     protected List<Properties.Entry> entry;

  63.     /**
  64.      * Gets the value of the entry property.
  65.      *
  66.      * <p>
  67.      * This accessor method returns a reference to the live list,
  68.      * not a snapshot. Therefore any modification you make to the
  69.      * returned list will be present inside the JAXB object.
  70.      * This is why there is not a <CODE>set</CODE> method for the entry property.
  71.      *
  72.      * <p>
  73.      * For example, to add a new item, do as follows:
  74.      * <pre>
  75.      *    getEntry().add(newItem);
  76.      * </pre>
  77.      *
  78.      *
  79.      * <p>
  80.      * Objects of the following type(s) are allowed in the list
  81.      * {@link Properties.Entry }
  82.      *
  83.      *
  84.      */
  85.     public List<Properties.Entry> getEntry() {
  86.         if (this.entry == null) {
  87.             this.entry = new ArrayList<Properties.Entry>();
  88.         }
  89.         return this.entry;
  90.     }


  91.     /**
  92.      * <p>Java class for anonymous complex type.
  93.      *
  94.      * <p>The following schema fragment specifies the expected content contained within this class.
  95.      *
  96.      * <pre>
  97.      * &lt;complexType&gt;
  98.      *   &lt;complexContent&gt;
  99.      *     &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"&gt;
  100.      *       &lt;sequence&gt;
  101.      *         &lt;element name="key" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/&gt;
  102.      *         &lt;element name="value" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/&gt;
  103.      *       &lt;/sequence&gt;
  104.      *     &lt;/restriction&gt;
  105.      *   &lt;/complexContent&gt;
  106.      * &lt;/complexType&gt;
  107.      * </pre>
  108.      *
  109.      *
  110.      */
  111.     @XmlAccessorType(XmlAccessType.FIELD)
  112.     @XmlType(name = "", propOrder = {
  113.         "key",
  114.         "value"
  115.     })
  116.     public static class Entry {

  117.         protected String key;
  118.         protected String value;

  119.         public Entry() {        }
  120.        
  121.         public Entry(String key, String value) {
  122.             this.key = key;
  123.             this.value = value;
  124.         }
  125.         /**
  126.          * Gets the value of the key property.
  127.          *
  128.          * @return
  129.          *     possible object is
  130.          *     {@link String }
  131.          *    
  132.          */
  133.         public String getKey() {
  134.             return this.key;
  135.         }

  136.         /**
  137.          * Sets the value of the key property.
  138.          *
  139.          * @param value
  140.          *     allowed object is
  141.          *     {@link String }
  142.          *    
  143.          */
  144.         public void setKey(String value) {
  145.             this.key = value;
  146.         }

  147.         /**
  148.          * Gets the value of the value property.
  149.          *
  150.          * @return
  151.          *     possible object is
  152.          *     {@link String }
  153.          *    
  154.          */
  155.         public String getValue() {
  156.             return this.value;
  157.         }

  158.         /**
  159.          * Sets the value of the value property.
  160.          *
  161.          * @param value
  162.          *     allowed object is
  163.          *     {@link String }
  164.          *    
  165.          */
  166.         public void setValue(String value) {
  167.             this.value = value;
  168.         }

  169.     }

  170. }