1 /* 2 * Copyright 2001-2008 The Apache Software Foundation. 3 * 4 * Licensed under the Apache License, Version 2.0 (the "License"); 5 * you may not use this file except in compliance with the License. 6 * You may obtain a copy of the License at 7 * 8 * http://www.apache.org/licenses/LICENSE-2.0 9 * 10 * Unless required by applicable law or agreed to in writing, software 11 * distributed under the License is distributed on an "AS IS" BASIS, 12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 * See the License for the specific language governing permissions and 14 * limitations under the License. 15 * 16 */ 17 18 19 package org.uddi.policy_v3; 20 21 import java.io.Serializable; 22 import java.util.ArrayList; 23 import java.util.List; 24 import javax.xml.bind.annotation.XmlAccessType; 25 import javax.xml.bind.annotation.XmlAccessorType; 26 import javax.xml.bind.annotation.XmlElement; 27 import javax.xml.bind.annotation.XmlRootElement; 28 import javax.xml.bind.annotation.XmlTransient; 29 import javax.xml.bind.annotation.XmlType; 30 import org.w3._2000._09.xmldsig_.SignatureType; 31 32 33 /** 34 * This is the top level element containing all policy elements. 35 * 36 * <p>Java class for anonymous complex type. 37 * 38 * <p>The following schema fragment specifies the expected content contained within this class. 39 * 40 * <pre> 41 * <complexType> 42 * <complexContent> 43 * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType"> 44 * <sequence> 45 * <element ref="{urn:uddi-org:policy_v3}policy" maxOccurs="unbounded" minOccurs="0"/> 46 * <element ref="{http://www.w3.org/2000/09/xmldsig#}Signature" maxOccurs="unbounded" minOccurs="0"/> 47 * </sequence> 48 * </restriction> 49 * </complexContent> 50 * </complexType> 51 * </pre> 52 * 53 * 54 */ 55 @XmlAccessorType(XmlAccessType.FIELD) 56 @XmlType(name = "", propOrder = { 57 "policy", 58 "signature" 59 }) 60 @XmlRootElement(name = "policies") 61 public class Policies implements Serializable{ 62 63 @XmlTransient 64 private static final long serialVersionUID = 3101747856169577400L; 65 protected List<Policy> policy; 66 @XmlElement(name = "Signature", namespace = "http://www.w3.org/2000/09/xmldsig#") 67 protected List<SignatureType> signature; 68 69 /** 70 * Gets the value of the policy property. 71 * 72 * <p> 73 * This accessor method returns a reference to the live list, 74 * not a snapshot. Therefore any modification you make to the 75 * returned list will be present inside the JAXB object. 76 * This is why there is not a <CODE>set</CODE> method for the policy property. 77 * 78 * <p> 79 * For example, to add a new item, do as follows: 80 * <pre> 81 * getPolicy().add(newItem); 82 * </pre> 83 * 84 * 85 * <p> 86 * Objects of the following type(s) are allowed in the list 87 * {@link Policy } 88 * 89 * 90 */ 91 public List<Policy> getPolicy() { 92 if (policy == null) { 93 policy = new ArrayList<Policy>(); 94 } 95 return this.policy; 96 } 97 98 /** 99 * Gets the value of the signature property. 100 * 101 * <p> 102 * This accessor method returns a reference to the live list, 103 * not a snapshot. Therefore any modification you make to the 104 * returned list will be present inside the JAXB object. 105 * This is why there is not a <CODE>set</CODE> method for the signature property. 106 * 107 * <p> 108 * For example, to add a new item, do as follows: 109 * <pre> 110 * getSignature().add(newItem); 111 * </pre> 112 * 113 * 114 * <p> 115 * Objects of the following type(s) are allowed in the list 116 * {@link SignatureType } 117 * 118 * 119 */ 120 public List<SignatureType> getSignature() { 121 if (signature == null) { 122 signature = new ArrayList<SignatureType>(); 123 } 124 return this.signature; 125 } 126 127 }