1 2 package org.apache.chemistry.opencmis.commons.impl.jaxb; 3 4 import java.util.ArrayList; 5 import java.util.HashMap; 6 import java.util.List; 7 import java.util.Map; 8 import javax.xml.bind.annotation.XmlAccessType; 9 import javax.xml.bind.annotation.XmlAccessorType; 10 import javax.xml.bind.annotation.XmlAnyAttribute; 11 import javax.xml.bind.annotation.XmlAnyElement; 12 import javax.xml.bind.annotation.XmlElement; 13 import javax.xml.bind.annotation.XmlElements; 14 import javax.xml.bind.annotation.XmlType; 15 import javax.xml.namespace.QName; 16 import org.w3c.dom.Element; 17 18 19 /** 20 * <p>Java class for cmisPropertiesType complex type. 21 * 22 * <p>The following schema fragment specifies the expected content contained within this class. 23 * 24 * <pre> 25 * <complexType name="cmisPropertiesType"> 26 * <complexContent> 27 * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType"> 28 * <sequence> 29 * <choice maxOccurs="unbounded" minOccurs="0"> 30 * <element name="propertyBoolean" type="{http://docs.oasis-open.org/ns/cmis/core/200908/}cmisPropertyBoolean"/> 31 * <element name="propertyId" type="{http://docs.oasis-open.org/ns/cmis/core/200908/}cmisPropertyId"/> 32 * <element name="propertyInteger" type="{http://docs.oasis-open.org/ns/cmis/core/200908/}cmisPropertyInteger"/> 33 * <element name="propertyDateTime" type="{http://docs.oasis-open.org/ns/cmis/core/200908/}cmisPropertyDateTime"/> 34 * <element name="propertyDecimal" type="{http://docs.oasis-open.org/ns/cmis/core/200908/}cmisPropertyDecimal"/> 35 * <element name="propertyHtml" type="{http://docs.oasis-open.org/ns/cmis/core/200908/}cmisPropertyHtml"/> 36 * <element name="propertyString" type="{http://docs.oasis-open.org/ns/cmis/core/200908/}cmisPropertyString"/> 37 * <element name="propertyUri" type="{http://docs.oasis-open.org/ns/cmis/core/200908/}cmisPropertyUri"/> 38 * </choice> 39 * <any processContents='lax' namespace='##other' maxOccurs="unbounded" minOccurs="0"/> 40 * </sequence> 41 * <attGroup ref="{http://docs.oasis-open.org/ns/cmis/core/200908/}cmisUndefinedAttribute"/> 42 * <anyAttribute processContents='lax' namespace='##other'/> 43 * </restriction> 44 * </complexContent> 45 * </complexType> 46 * </pre> 47 * 48 * 49 */ 50 @XmlAccessorType(XmlAccessType.FIELD) 51 @XmlType(name = "cmisPropertiesType", namespace = "http://docs.oasis-open.org/ns/cmis/core/200908/", propOrder = { 52 "property", 53 "any" 54 }) 55 public class CmisPropertiesType { 56 57 @XmlElements({ 58 @XmlElement(name = "propertyString", type = CmisPropertyString.class, nillable = true), 59 @XmlElement(name = "propertyDecimal", type = CmisPropertyDecimal.class, nillable = true), 60 @XmlElement(name = "propertyHtml", type = CmisPropertyHtml.class, nillable = true), 61 @XmlElement(name = "propertyId", type = CmisPropertyId.class, nillable = true), 62 @XmlElement(name = "propertyBoolean", type = CmisPropertyBoolean.class, nillable = true), 63 @XmlElement(name = "propertyDateTime", type = CmisPropertyDateTime.class, nillable = true), 64 @XmlElement(name = "propertyUri", type = CmisPropertyUri.class, nillable = true), 65 @XmlElement(name = "propertyInteger", type = CmisPropertyInteger.class, nillable = true) 66 }) 67 protected List<CmisProperty> property; 68 @XmlAnyElement(lax = true) 69 protected List<Object> any; 70 @XmlAnyAttribute 71 private Map<QName, String> otherAttributes = new HashMap<QName, String>(); 72 73 /** 74 * Gets the value of the property property. 75 * 76 * <p> 77 * This accessor method returns a reference to the live list, 78 * not a snapshot. Therefore any modification you make to the 79 * returned list will be present inside the JAXB object. 80 * This is why there is not a <CODE>set</CODE> method for the property property. 81 * 82 * <p> 83 * For example, to add a new item, do as follows: 84 * <pre> 85 * getProperty().add(newItem); 86 * </pre> 87 * 88 * 89 * <p> 90 * Objects of the following type(s) are allowed in the list 91 * {@link CmisPropertyString } 92 * {@link CmisPropertyDecimal } 93 * {@link CmisPropertyHtml } 94 * {@link CmisPropertyId } 95 * {@link CmisPropertyBoolean } 96 * {@link CmisPropertyDateTime } 97 * {@link CmisPropertyUri } 98 * {@link CmisPropertyInteger } 99 * 100 * 101 */ 102 public List<CmisProperty> getProperty() { 103 if (property == null) { 104 property = new ArrayList<CmisProperty>(); 105 } 106 return this.property; 107 } 108 109 /** 110 * Gets the value of the any property. 111 * 112 * <p> 113 * This accessor method returns a reference to the live list, 114 * not a snapshot. Therefore any modification you make to the 115 * returned list will be present inside the JAXB object. 116 * This is why there is not a <CODE>set</CODE> method for the any property. 117 * 118 * <p> 119 * For example, to add a new item, do as follows: 120 * <pre> 121 * getAny().add(newItem); 122 * </pre> 123 * 124 * 125 * <p> 126 * Objects of the following type(s) are allowed in the list 127 * {@link Element } 128 * {@link Object } 129 * 130 * 131 */ 132 public List<Object> getAny() { 133 if (any == null) { 134 any = new ArrayList<Object>(); 135 } 136 return this.any; 137 } 138 139 /** 140 * Gets a map that contains attributes that aren't bound to any typed property on this class. 141 * 142 * <p> 143 * the map is keyed by the name of the attribute and 144 * the value is the string value of the attribute. 145 * 146 * the map returned by this method is live, and you can add new attribute 147 * by updating the map directly. Because of this design, there's no setter. 148 * 149 * 150 * @return 151 * always non-null 152 */ 153 public Map<QName, String> getOtherAttributes() { 154 return otherAttributes; 155 } 156 157 }