1 package org.kuali.ole.docstore.common.document.content.instance; 2 3 import com.thoughtworks.xstream.annotations.XStreamAlias; 4 import com.thoughtworks.xstream.annotations.XStreamConverter; 5 import com.thoughtworks.xstream.annotations.XStreamImplicit; 6 import org.kuali.ole.docstore.common.document.content.instance.xstream.ExtensionConverter; 7 8 import javax.xml.bind.annotation.*; 9 import java.util.ArrayList; 10 import java.util.List; 11 12 13 /** 14 * Created by IntelliJ IDEA. 15 * User: Pranitha 16 * Date: 8/17/12 17 * Time: 10:47 AM 18 * To change this template use File | Settings | File Templates. 19 * <p/> 20 * <p>Java class for extension complex type. 21 * <p/> 22 * <p>The following schema fragment specifies the expected content contained within this class. 23 * <p/> 24 * <pre> 25 * <complexType name="extension"> 26 * <complexContent> 27 * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType"> 28 * <sequence> 29 * <any processContents='lax' maxOccurs="unbounded" minOccurs="0"/> 30 * </sequence> 31 * <attribute name="displayLabel" type="{http://www.w3.org/2001/XMLSchema}string" /> 32 * </restriction> 33 * </complexContent> 34 * </complexType> 35 * </pre> 36 */ 37 @XmlAccessorType(XmlAccessType.FIELD) 38 @XmlType(name = "extension", propOrder = { 39 "content" 40 }) 41 @XStreamAlias("extension") 42 @XStreamConverter(value = ExtensionConverter.class) 43 public class Extension { 44 45 @XmlMixed 46 @XmlAnyElement(lax = true) 47 @XStreamImplicit(itemFieldName = "content") 48 protected List<Object> content; 49 @XmlAttribute 50 protected String displayLabel; 51 52 /** 53 * Gets the value of the content property. 54 * <p/> 55 * <p/> 56 * This accessor method returns a reference to the live list, 57 * not a snapshot. Therefore any modification you make to the 58 * returned list will be present inside the JAXB object. 59 * This is why there is not a <CODE>set</CODE> method for the content property. 60 * <p/> 61 * <p/> 62 * For example, to add a new item, do as follows: 63 * <pre> 64 * getContent().add(newItem); 65 * </pre> 66 * <p/> 67 * <p/> 68 * <p/> 69 * Objects of the following type(s) are allowed in the list 70 * {@link org.w3c.dom.Element } 71 * {@link String } 72 * {@link Object } 73 */ 74 public List<Object> getContent() { 75 if (content == null) { 76 content = new ArrayList<Object>(); 77 } 78 return this.content; 79 } 80 81 public void setContent(List<Object> content) { 82 this.content = content; 83 } 84 85 /** 86 * Gets the value of the displayLabel property. 87 * 88 * @return possible object is 89 * {@link String } 90 */ 91 public String getDisplayLabel() { 92 return displayLabel; 93 } 94 95 /** 96 * Sets the value of the displayLabel property. 97 * 98 * @param value allowed object is 99 * {@link String } 100 */ 101 public void setDisplayLabel(String value) { 102 this.displayLabel = value; 103 } 104 105 }