KickJava   Java API By Example, From Geeks To Geeks.

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


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  * This class represents the <Item> tag as defined by the SyncML
24  * representation specifications with device info like data.
25  *
26  * @author Stefano Fornari @ Funambol
27  *
28  * @version $Id: DevInfItem.java,v 1.4 2005/03/02 20:57:37 harrie Exp $
29  */

30 public final class DevInfItem
31 extends Item
32 implements java.io.Serializable JavaDoc {
33
34     // ------------------------------------------------------------ Private data
35
private Target target;
36     private Source source;
37     private Meta meta;
38     private DevInfData data;
39
40     // ------------------------------------------------------------ Constructors
41
protected DevInfItem() {}
42     
43     /**
44      * Creates a new DevInfItem object.
45      *
46      * @param target item target - NULL ALLOWED
47      * @param source item source - NULL ALLOWED
48      * @param meta item meta data - NULL ALLOWED
49      * @param data item data - NULL ALLOWED
50      *
51      */

52     public DevInfItem(final Target target,
53                       final Source source,
54                       final Meta meta ,
55                       final DevInfData data ) {
56         this.target = target;
57         this.source = source;
58         this.meta = meta ;
59         this.data = data ;
60     }
61
62     // ---------------------------------------------------------- Public methods
63
/**
64      * Returns the item target
65      *
66      * @return the item target
67      */

68     public Target getTarget() {
69         return target;
70     }
71     
72     /**
73      * Sets the item target
74      *
75      * @param target the target
76      *
77      */

78     public void setTarget(Target target) {
79         this.target = target;
80     }
81     
82     /**
83      * Returns the item source
84      *
85      * @return the item source
86      */

87     public Source getSource() {
88         return source;
89     }
90     
91     /**
92      * Sets the item source
93      *
94      * @param source the source
95      *
96      */

97     public void setSource(Source source) {
98         this.source = source;
99     }
100     
101     /**
102      * Returns the item meta element
103      *
104      * @return the item meta element
105      */

106     public Meta getMeta() {
107         return meta;
108     }
109     
110     /**
111      * Sets the meta item
112      *
113      * @param meta the item meta element
114      *
115      */

116     public void setMeta(Meta meta) {
117         this.meta = meta;
118     }
119
120     /**
121      * Returns the item data
122      *
123      * @return the item data
124      *
125      */

126     public DevInfData getDevInfData() {
127         return data;
128     }
129     
130     /**
131      * Sets the item data
132      *
133      * @param data the item data
134      *
135      */

136     public void setDevInfData(DevInfData data) {
137         this.data = data;
138     }
139 }
140
Popular Tags