KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > sync4j > framework > core > ComplexData


1 /**
2  * Copyright (C) 2003-2005 Funambol
3  *
4  * This program is free software; you can redistribute it and/or modify
5  * it under the terms of the GNU General Public License as published by
6  * the Free Software Foundation; either version 2 of the License, or
7  * (at your option) any later version.
8  *
9  * This program is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12  * GNU General Public License for more details.
13  *
14  * You should have received a copy of the GNU General Public License
15  * along with this program; if not, write to the Free Software
16  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17  */

18
19
20 package sync4j.framework.core;
21
22 /**
23  * Corresponds to the <Data> tag in the SyncML represent DTD when delivering
24  * an Anchor
25  *
26  * @author Stefano Fornari @ Funambol
27  *
28  * @version $Id: ComplexData.java,v 1.4 2005/03/02 20:57:37 harrie Exp $
29  */

30 public final class ComplexData
31 extends Data
32 implements java.io.Serializable JavaDoc {
33     
34     // ------------------------------------------------------------ Private data
35
private Anchor anchor;
36     private DevInf devInf;
37     
38     // ------------------------------------------------------------ Constructors
39
/** For serialization purposes */
40     public ComplexData() {}
41     
42     /**
43      * Creates a Data object from the given anchors string.
44      *
45      * @param data the data
46      *
47      */

48     public ComplexData(String JavaDoc data) {
49         super(data);
50     }
51     
52     // ---------------------------------------------------------- Public methods
53

54     /**
55      * Gets the Anchor object property
56      *
57      * @return anchor the Anchor object
58      */

59     public Anchor getAnchor() {
60         return anchor;
61     }
62     
63     /**
64      * Sets the Anchor object property
65      *
66      * @param anchor the Anchor object
67      */

68     public void setAnchor(Anchor anchor) {
69         if (null == anchor) {
70             throw new IllegalArgumentException JavaDoc("anchor cannot be null");
71         }
72         this.anchor = anchor;
73     }
74
75     /**
76      * Gets the DevInf object property
77      *
78      * @return devInf the DevInf object property
79      */

80     public DevInf getDevInf() {
81         return devInf;
82     }
83     
84     /**
85      * Sets the DevInf object property
86      *
87      * @param devInf the DevInf object property
88      *
89      */

90     public void setDevInf(DevInf devInf) {
91         if (null == devInf) {
92             throw new IllegalArgumentException JavaDoc("devInf cannot be null");
93         }
94         this.devInf = devInf;
95     }
96 }
97
Popular Tags