KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > sync4j > framework > core > dm > ddf > DevInfo


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.dm.ddf;
21
22 import java.util.*;
23
24 /**
25  * Corresponds to the <DevInf> element in the SyncML devinf DTD
26  *
27  * @author Stefano Fornari @ Funambol
28  *
29  * @version $Id: DevInfo.java,v 1.1 2005/05/16 17:32:55 nichele Exp $
30  */

31 public final class DevInfo implements java.io.Serializable JavaDoc {
32
33     // --------------------------------------------------------------- Constants
34

35     public static final String JavaDoc DEVINFO_DEV_ID = "/DevId";
36     public static final String JavaDoc DEVINFO_MAN = "/Man" ;
37     public static final String JavaDoc DEVINFO_MOD = "/Mod" ;
38     public static final String JavaDoc DEVINFO_DMV = "/DmV" ;
39     public static final String JavaDoc DEVINFO_LANG = "/Lang" ;
40
41     // ------------------------------------------------------------ Private data
42
private String JavaDoc devId;
43     private String JavaDoc man;
44     private String JavaDoc mod;
45     private String JavaDoc dmV;
46     private String JavaDoc lang;
47
48     // ------------------------------------------------------------ Constructors
49
/** For serialization purposes */
50     protected DevInfo() {}
51
52     /**
53      * Creates a new DevInfo object with the given parameters
54      *
55      * @param devId the device identifier
56      * @param man the device manufacturer
57      * @param mod the device model name
58      * @param dmV a SyncML DM client version identifier
59      * @param lang the device software version
60      */

61     public DevInfo(final String JavaDoc devId,
62                    final String JavaDoc man ,
63                    final String JavaDoc mod ,
64                    final String JavaDoc dmV ,
65                    final String JavaDoc lang ) {
66         this.devId = devId;
67         this.man = man ;
68         this.mod = mod ;
69         this.dmV = dmV ;
70         this.lang = lang ;
71     }
72
73     // ---------------------------------------------------------- Public methods
74
/**
75      * Gets the devId
76      *
77      * @return the devId
78      */

79     public String JavaDoc getDevId() {
80         return devId;
81     }
82
83     /**
84      * Sets the devId
85      *
86      * @param the devId
87      */

88     public void setDevId(String JavaDoc devId) {
89         this.devId = devId;
90     }
91
92     /**
93      * Gets the device manufacturer property
94      *
95      * @return the device manufacturer property
96      */

97     public String JavaDoc getMan() {
98         return man;
99     }
100
101     /**
102      * Sets the device manufacturer property
103      *
104      * @param man the device manufacturer property
105      *
106      */

107     public void setMan(String JavaDoc man) {
108         this.man = man;
109     }
110
111     /**
112      * Gets the model name of device
113      *
114      * @return the model name of device
115      */

116     public String JavaDoc getMod() {
117         return mod;
118     }
119
120     /**
121      * Sets the device model property
122      *
123      * @param man the device model property
124      *
125      */

126     public void setMod(String JavaDoc mod) {
127         this.mod = mod;
128     }
129
130     /**
131      * Gets the SyncML DM client version
132      *
133      * @return the SyncML DM client version
134      */

135     public String JavaDoc getFwV() {
136         return dmV;
137     }
138
139     /**
140      * Sets the SyncML DM client version
141      *
142      * @param dmV the SyncML DM client version
143      *
144      */

145     public void setDmV(String JavaDoc dmV) {
146         this.dmV =dmV;
147     }
148
149     /**
150      * Gets the device current language setting
151      *
152      * @return the device current language setting
153      */

154     public String JavaDoc getLang() {
155         return lang;
156     }
157
158     /**
159      * Sets the device current language setting
160      *
161      * @param lang the device current language setting
162      *
163      */

164     public void setLang(String JavaDoc lang) {
165         this.lang = lang;
166     }
167 }
Popular Tags