source: trunk/docx4j/src/main/java/org/docx4j/wml/Fonts.java @ 359

Revision 359, 18.9 KB checked in by jharrop, 4 years ago (diff)

Change CT_FldChar to FldChar?;
Style is freestanding, rather than an inner class of Styles.
(Other changes largely whitespace in license header)

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
21
22package org.docx4j.wml;
23
24import java.util.ArrayList;
25import java.util.List;
26import javax.xml.bind.Unmarshaller;
27import javax.xml.bind.annotation.XmlAccessType;
28import javax.xml.bind.annotation.XmlAccessorType;
29import javax.xml.bind.annotation.XmlAttribute;
30import javax.xml.bind.annotation.XmlRootElement;
31import javax.xml.bind.annotation.XmlTransient;
32import javax.xml.bind.annotation.XmlType;
33import org.jvnet.jaxb2_commons.ppp.Child;
34
35
36/**
37 * <p>Java class for anonymous complex type.
38 *
39 * <p>The following schema fragment specifies the expected content contained within this class.
40 *
41 * <pre>
42 * &lt;complexType>
43 *   &lt;complexContent>
44 *     &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
45 *       &lt;sequence>
46 *         &lt;element name="font" maxOccurs="unbounded" minOccurs="0">
47 *           &lt;complexType>
48 *             &lt;complexContent>
49 *               &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
50 *                 &lt;sequence>
51 *                   &lt;element name="altName" minOccurs="0">
52 *                     &lt;complexType>
53 *                       &lt;complexContent>
54 *                         &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
55 *                           &lt;attribute name="val" type="{http://www.w3.org/2001/XMLSchema}string" />
56 *                         &lt;/restriction>
57 *                       &lt;/complexContent>
58 *                     &lt;/complexType>
59 *                   &lt;/element>
60 *                   &lt;element name="panose1" type="{http://schemas.openxmlformats.org/wordprocessingml/2006/main}CT_Panose" minOccurs="0"/>
61 *                   &lt;element name="charset" type="{http://schemas.openxmlformats.org/wordprocessingml/2006/main}CT_UcharHexNumber" minOccurs="0"/>
62 *                   &lt;element name="family" type="{http://schemas.openxmlformats.org/wordprocessingml/2006/main}CT_FontFamily" minOccurs="0"/>
63 *                   &lt;element name="notTrueType" type="{http://schemas.openxmlformats.org/wordprocessingml/2006/main}BooleanDefaultTrue" minOccurs="0"/>
64 *                   &lt;element name="pitch" type="{http://schemas.openxmlformats.org/wordprocessingml/2006/main}CT_Pitch" minOccurs="0"/>
65 *                   &lt;element name="sig" type="{http://schemas.openxmlformats.org/wordprocessingml/2006/main}CT_FontSig" minOccurs="0"/>
66 *                   &lt;element name="embedRegular" type="{http://schemas.openxmlformats.org/wordprocessingml/2006/main}CT_FontRel" minOccurs="0"/>
67 *                   &lt;element name="embedBold" type="{http://schemas.openxmlformats.org/wordprocessingml/2006/main}CT_FontRel" minOccurs="0"/>
68 *                   &lt;element name="embedItalic" type="{http://schemas.openxmlformats.org/wordprocessingml/2006/main}CT_FontRel" minOccurs="0"/>
69 *                   &lt;element name="embedBoldItalic" type="{http://schemas.openxmlformats.org/wordprocessingml/2006/main}CT_FontRel" minOccurs="0"/>
70 *                 &lt;/sequence>
71 *                 &lt;attribute name="name" use="required" type="{http://schemas.openxmlformats.org/wordprocessingml/2006/main}ST_String" />
72 *               &lt;/restriction>
73 *             &lt;/complexContent>
74 *           &lt;/complexType>
75 *         &lt;/element>
76 *       &lt;/sequence>
77 *     &lt;/restriction>
78 *   &lt;/complexContent>
79 * &lt;/complexType>
80 * </pre>
81 *
82 *
83 */
84@XmlAccessorType(XmlAccessType.FIELD)
85@XmlType(name = "", propOrder = {
86    "font"
87})
88@XmlRootElement(name = "fonts")
89public class Fonts
90    implements Child
91{
92
93    protected List<Fonts.Font> font;
94    @XmlTransient
95    private Object parent;
96
97    /**
98     * Gets the value of the font property.
99     *
100     * <p>
101     * This accessor method returns a reference to the live list,
102     * not a snapshot. Therefore any modification you make to the
103     * returned list will be present inside the JAXB object.
104     * This is why there is not a <CODE>set</CODE> method for the font property.
105     *
106     * <p>
107     * For example, to add a new item, do as follows:
108     * <pre>
109     *    getFont().add(newItem);
110     * </pre>
111     *
112     *
113     * <p>
114     * Objects of the following type(s) are allowed in the list
115     * {@link Fonts.Font }
116     *
117     *
118     */
119    public List<Fonts.Font> getFont() {
120        if (font == null) {
121            font = new ArrayList<Fonts.Font>();
122        }
123        return this.font;
124    }
125
126    /**
127     * Gets the parent object in the object tree representing the unmarshalled xml document.
128     *
129     * @return
130     *     The parent object.
131     */
132    public Object getParent() {
133        return this.parent;
134    }
135
136    public void setParent(Object parent) {
137        this.parent = parent;
138    }
139
140    /**
141     * This method is invoked by the JAXB implementation on each instance when unmarshalling completes.
142     *
143     * @param parent
144     *     The parent object in the object tree.
145     * @param unmarshaller
146     *     The unmarshaller that generated the instance.
147     */
148    public void afterUnmarshal(Unmarshaller unmarshaller, Object parent) {
149        setParent(parent);
150    }
151
152
153    /**
154     * <p>Java class for anonymous complex type.
155     *
156     * <p>The following schema fragment specifies the expected content contained within this class.
157     *
158     * <pre>
159     * &lt;complexType>
160     *   &lt;complexContent>
161     *     &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
162     *       &lt;sequence>
163     *         &lt;element name="altName" minOccurs="0">
164     *           &lt;complexType>
165     *             &lt;complexContent>
166     *               &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
167     *                 &lt;attribute name="val" type="{http://www.w3.org/2001/XMLSchema}string" />
168     *               &lt;/restriction>
169     *             &lt;/complexContent>
170     *           &lt;/complexType>
171     *         &lt;/element>
172     *         &lt;element name="panose1" type="{http://schemas.openxmlformats.org/wordprocessingml/2006/main}CT_Panose" minOccurs="0"/>
173     *         &lt;element name="charset" type="{http://schemas.openxmlformats.org/wordprocessingml/2006/main}CT_UcharHexNumber" minOccurs="0"/>
174     *         &lt;element name="family" type="{http://schemas.openxmlformats.org/wordprocessingml/2006/main}CT_FontFamily" minOccurs="0"/>
175     *         &lt;element name="notTrueType" type="{http://schemas.openxmlformats.org/wordprocessingml/2006/main}BooleanDefaultTrue" minOccurs="0"/>
176     *         &lt;element name="pitch" type="{http://schemas.openxmlformats.org/wordprocessingml/2006/main}CT_Pitch" minOccurs="0"/>
177     *         &lt;element name="sig" type="{http://schemas.openxmlformats.org/wordprocessingml/2006/main}CT_FontSig" minOccurs="0"/>
178     *         &lt;element name="embedRegular" type="{http://schemas.openxmlformats.org/wordprocessingml/2006/main}CT_FontRel" minOccurs="0"/>
179     *         &lt;element name="embedBold" type="{http://schemas.openxmlformats.org/wordprocessingml/2006/main}CT_FontRel" minOccurs="0"/>
180     *         &lt;element name="embedItalic" type="{http://schemas.openxmlformats.org/wordprocessingml/2006/main}CT_FontRel" minOccurs="0"/>
181     *         &lt;element name="embedBoldItalic" type="{http://schemas.openxmlformats.org/wordprocessingml/2006/main}CT_FontRel" minOccurs="0"/>
182     *       &lt;/sequence>
183     *       &lt;attribute name="name" use="required" type="{http://schemas.openxmlformats.org/wordprocessingml/2006/main}ST_String" />
184     *     &lt;/restriction>
185     *   &lt;/complexContent>
186     * &lt;/complexType>
187     * </pre>
188     *
189     *
190     */
191    @XmlAccessorType(XmlAccessType.FIELD)
192    @XmlType(name = "", propOrder = {
193        "altName",
194        "panose1",
195        "charset",
196        "family",
197        "notTrueType",
198        "pitch",
199        "sig",
200        "embedRegular",
201        "embedBold",
202        "embedItalic",
203        "embedBoldItalic"
204    })
205    public static class Font
206        implements Child
207    {
208
209        protected Fonts.Font.AltName altName;
210        protected FontPanose panose1;
211        protected CTUcharHexNumber charset;
212        protected FontFamily family;
213        protected BooleanDefaultTrue notTrueType;
214        protected FontPitch pitch;
215        protected FontSig sig;
216        protected FontRel embedRegular;
217        protected FontRel embedBold;
218        protected FontRel embedItalic;
219        protected FontRel embedBoldItalic;
220        @XmlAttribute(namespace = "http://schemas.openxmlformats.org/wordprocessingml/2006/main", required = true)
221        protected String name;
222        @XmlTransient
223        private Object parent;
224
225        /**
226         * Gets the value of the altName property.
227         *
228         * @return
229         *     possible object is
230         *     {@link Fonts.Font.AltName }
231         *     
232         */
233        public Fonts.Font.AltName getAltName() {
234            return altName;
235        }
236
237        /**
238         * Sets the value of the altName property.
239         *
240         * @param value
241         *     allowed object is
242         *     {@link Fonts.Font.AltName }
243         *     
244         */
245        public void setAltName(Fonts.Font.AltName value) {
246            this.altName = value;
247        }
248
249        /**
250         * Gets the value of the panose1 property.
251         *
252         * @return
253         *     possible object is
254         *     {@link FontPanose }
255         *     
256         */
257        public FontPanose getPanose1() {
258            return panose1;
259        }
260
261        /**
262         * Sets the value of the panose1 property.
263         *
264         * @param value
265         *     allowed object is
266         *     {@link FontPanose }
267         *     
268         */
269        public void setPanose1(FontPanose value) {
270            this.panose1 = value;
271        }
272
273        /**
274         * Gets the value of the charset property.
275         *
276         * @return
277         *     possible object is
278         *     {@link CTUcharHexNumber }
279         *     
280         */
281        public CTUcharHexNumber getCharset() {
282            return charset;
283        }
284
285        /**
286         * Sets the value of the charset property.
287         *
288         * @param value
289         *     allowed object is
290         *     {@link CTUcharHexNumber }
291         *     
292         */
293        public void setCharset(CTUcharHexNumber value) {
294            this.charset = value;
295        }
296
297        /**
298         * Gets the value of the family property.
299         *
300         * @return
301         *     possible object is
302         *     {@link FontFamily }
303         *     
304         */
305        public FontFamily getFamily() {
306            return family;
307        }
308
309        /**
310         * Sets the value of the family property.
311         *
312         * @param value
313         *     allowed object is
314         *     {@link FontFamily }
315         *     
316         */
317        public void setFamily(FontFamily value) {
318            this.family = value;
319        }
320
321        /**
322         * Gets the value of the notTrueType property.
323         *
324         * @return
325         *     possible object is
326         *     {@link BooleanDefaultTrue }
327         *     
328         */
329        public BooleanDefaultTrue getNotTrueType() {
330            return notTrueType;
331        }
332
333        /**
334         * Sets the value of the notTrueType property.
335         *
336         * @param value
337         *     allowed object is
338         *     {@link BooleanDefaultTrue }
339         *     
340         */
341        public void setNotTrueType(BooleanDefaultTrue value) {
342            this.notTrueType = value;
343        }
344
345        /**
346         * Gets the value of the pitch property.
347         *
348         * @return
349         *     possible object is
350         *     {@link FontPitch }
351         *     
352         */
353        public FontPitch getPitch() {
354            return pitch;
355        }
356
357        /**
358         * Sets the value of the pitch property.
359         *
360         * @param value
361         *     allowed object is
362         *     {@link FontPitch }
363         *     
364         */
365        public void setPitch(FontPitch value) {
366            this.pitch = value;
367        }
368
369        /**
370         * Gets the value of the sig property.
371         *
372         * @return
373         *     possible object is
374         *     {@link FontSig }
375         *     
376         */
377        public FontSig getSig() {
378            return sig;
379        }
380
381        /**
382         * Sets the value of the sig property.
383         *
384         * @param value
385         *     allowed object is
386         *     {@link FontSig }
387         *     
388         */
389        public void setSig(FontSig value) {
390            this.sig = value;
391        }
392
393        /**
394         * Gets the value of the embedRegular property.
395         *
396         * @return
397         *     possible object is
398         *     {@link FontRel }
399         *     
400         */
401        public FontRel getEmbedRegular() {
402            return embedRegular;
403        }
404
405        /**
406         * Sets the value of the embedRegular property.
407         *
408         * @param value
409         *     allowed object is
410         *     {@link FontRel }
411         *     
412         */
413        public void setEmbedRegular(FontRel value) {
414            this.embedRegular = value;
415        }
416
417        /**
418         * Gets the value of the embedBold property.
419         *
420         * @return
421         *     possible object is
422         *     {@link FontRel }
423         *     
424         */
425        public FontRel getEmbedBold() {
426            return embedBold;
427        }
428
429        /**
430         * Sets the value of the embedBold property.
431         *
432         * @param value
433         *     allowed object is
434         *     {@link FontRel }
435         *     
436         */
437        public void setEmbedBold(FontRel value) {
438            this.embedBold = value;
439        }
440
441        /**
442         * Gets the value of the embedItalic property.
443         *
444         * @return
445         *     possible object is
446         *     {@link FontRel }
447         *     
448         */
449        public FontRel getEmbedItalic() {
450            return embedItalic;
451        }
452
453        /**
454         * Sets the value of the embedItalic property.
455         *
456         * @param value
457         *     allowed object is
458         *     {@link FontRel }
459         *     
460         */
461        public void setEmbedItalic(FontRel value) {
462            this.embedItalic = value;
463        }
464
465        /**
466         * Gets the value of the embedBoldItalic property.
467         *
468         * @return
469         *     possible object is
470         *     {@link FontRel }
471         *     
472         */
473        public FontRel getEmbedBoldItalic() {
474            return embedBoldItalic;
475        }
476
477        /**
478         * Sets the value of the embedBoldItalic property.
479         *
480         * @param value
481         *     allowed object is
482         *     {@link FontRel }
483         *     
484         */
485        public void setEmbedBoldItalic(FontRel value) {
486            this.embedBoldItalic = value;
487        }
488
489        /**
490         * Gets the value of the name property.
491         *
492         * @return
493         *     possible object is
494         *     {@link String }
495         *     
496         */
497        public String getName() {
498            return name;
499        }
500
501        /**
502         * Sets the value of the name property.
503         *
504         * @param value
505         *     allowed object is
506         *     {@link String }
507         *     
508         */
509        public void setName(String value) {
510            this.name = value;
511        }
512
513        /**
514         * Gets the parent object in the object tree representing the unmarshalled xml document.
515         *
516         * @return
517         *     The parent object.
518         */
519        public Object getParent() {
520            return this.parent;
521        }
522
523        public void setParent(Object parent) {
524            this.parent = parent;
525        }
526
527        /**
528         * This method is invoked by the JAXB implementation on each instance when unmarshalling completes.
529         *
530         * @param parent
531         *     The parent object in the object tree.
532         * @param unmarshaller
533         *     The unmarshaller that generated the instance.
534         */
535        public void afterUnmarshal(Unmarshaller unmarshaller, Object parent) {
536            setParent(parent);
537        }
538
539
540        /**
541         * <p>Java class for anonymous complex type.
542         *
543         * <p>The following schema fragment specifies the expected content contained within this class.
544         *
545         * <pre>
546         * &lt;complexType>
547         *   &lt;complexContent>
548         *     &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
549         *       &lt;attribute name="val" type="{http://www.w3.org/2001/XMLSchema}string" />
550         *     &lt;/restriction>
551         *   &lt;/complexContent>
552         * &lt;/complexType>
553         * </pre>
554         *
555         *
556         */
557        @XmlAccessorType(XmlAccessType.FIELD)
558        @XmlType(name = "")
559        public static class AltName
560            implements Child
561        {
562
563            @XmlAttribute(namespace = "http://schemas.openxmlformats.org/wordprocessingml/2006/main")
564            protected String val;
565            @XmlTransient
566            private Object parent;
567
568            /**
569             * Gets the value of the val property.
570             *
571             * @return
572             *     possible object is
573             *     {@link String }
574             *     
575             */
576            public String getVal() {
577                return val;
578            }
579
580            /**
581             * Sets the value of the val property.
582             *
583             * @param value
584             *     allowed object is
585             *     {@link String }
586             *     
587             */
588            public void setVal(String value) {
589                this.val = value;
590            }
591
592            /**
593             * Gets the parent object in the object tree representing the unmarshalled xml document.
594             *
595             * @return
596             *     The parent object.
597             */
598            public Object getParent() {
599                return this.parent;
600            }
601
602            public void setParent(Object parent) {
603                this.parent = parent;
604            }
605
606            /**
607             * This method is invoked by the JAXB implementation on each instance when unmarshalling completes.
608             *
609             * @param parent
610             *     The parent object in the object tree.
611             * @param unmarshaller
612             *     The unmarshaller that generated the instance.
613             */
614            public void afterUnmarshal(Unmarshaller unmarshaller, Object parent) {
615                setParent(parent);
616            }
617
618        }
619
620    }
621
622}
Note: See TracBrowser for help on using the repository browser.