source: trunk/docx4j/src/main/java/org/docx4j/relationships/Relationships.java @ 532

Revision 532, 2.6 KB checked in by jharrop, 4 years ago (diff)

RelationshipsPart? is now a JAXB part.

Line 
1/*
2 *  Copyright 2007-2008, Plutext Pty Ltd.
3 *   
4 *  This file is part of docx4j.
5
6    docx4j is licensed under the Apache License, Version 2.0 (the "License");
7    you may not use this file except in compliance with the License.
8
9    You may obtain a copy of the License at
10
11        http://www.apache.org/licenses/LICENSE-2.0
12
13    Unless required by applicable law or agreed to in writing, software
14    distributed under the License is distributed on an "AS IS" BASIS,
15    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16    See the License for the specific language governing permissions and
17    limitations under the License.
18
19 */
20
21package org.docx4j.relationships;
22
23import java.util.ArrayList;
24import java.util.List;
25import javax.xml.bind.annotation.XmlAccessType;
26import javax.xml.bind.annotation.XmlAccessorType;
27import javax.xml.bind.annotation.XmlElement;
28import javax.xml.bind.annotation.XmlRootElement;
29import javax.xml.bind.annotation.XmlType;
30
31
32/**
33 * <p>Java class for anonymous complex type.
34 *
35 * <p>The following schema fragment specifies the expected content contained within this class.
36 *
37 * <pre>
38 * &lt;complexType>
39 *   &lt;complexContent>
40 *     &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
41 *       &lt;sequence>
42 *         &lt;element ref="{http://schemas.openxmlformats.org/package/2006/relationships}Relationship" maxOccurs="unbounded" minOccurs="0"/>
43 *       &lt;/sequence>
44 *     &lt;/restriction>
45 *   &lt;/complexContent>
46 * &lt;/complexType>
47 * </pre>
48 *
49 *
50 */
51@XmlAccessorType(XmlAccessType.FIELD)
52@XmlType(name = "", propOrder = {
53    "relationship"
54})
55@XmlRootElement(name = "Relationships")
56public class Relationships {
57
58    @XmlElement(name = "Relationship")
59    protected List<Relationship> relationship;
60
61    /**
62     * Gets the value of the relationship property.
63     *
64     * <p>
65     * This accessor method returns a reference to the live list,
66     * not a snapshot. Therefore any modification you make to the
67     * returned list will be present inside the JAXB object.
68     * This is why there is not a <CODE>set</CODE> method for the relationship property.
69     *
70     * <p>
71     * For example, to add a new item, do as follows:
72     * <pre>
73     *    getRelationship().add(newItem);
74     * </pre>
75     *
76     *
77     * <p>
78     * Objects of the following type(s) are allowed in the list
79     * {@link Relationship }
80     *
81     *
82     */
83    public List<Relationship> getRelationship() {
84        if (relationship == null) {
85            relationship = new ArrayList<Relationship>();
86        }
87        return this.relationship;
88    }
89
90}
Note: See TracBrowser for help on using the repository browser.