Revision 2512

View differences:

org.gvsig.tools/library/tags/org.gvsig.tools-3.0.284/org.gvsig.tools.lib/pom.xml
1
<?xml version="1.0" encoding="UTF-8"?>
2

  
3
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
4

  
5
    <modelVersion>4.0.0</modelVersion>
6
    <artifactId>org.gvsig.tools.lib</artifactId>
7
    <packaging>jar</packaging>
8
    <name>org.gvsig.tools.lib</name>
9
    <description>Tools related to application framework architecture
10
        and implementations of design patterns</description>
11
    <parent>
12
        <groupId>org.gvsig</groupId>
13
        <artifactId>org.gvsig.tools</artifactId>
14
        <version>3.0.284</version>
15
    </parent>
16
    <dependencies>
17
        <dependency>
18
            <groupId>org.glassfish</groupId>
19
            <artifactId>javax.json</artifactId>
20
            <scope>compile</scope>
21
        </dependency>
22

  
23
        <dependency>
24
            <groupId>org.apache.commons</groupId>
25
            <artifactId>commons-lang3</artifactId>
26
            <scope>compile</scope>
27
        </dependency>
28

  
29
        <dependency>
30
            <groupId>easymock</groupId>
31
            <artifactId>easymock</artifactId>
32
            <scope>test</scope>
33
        </dependency>
34
        <dependency>
35
            <groupId>net.sf.kxml</groupId>
36
            <artifactId>kxml2</artifactId>
37
        </dependency>
38
        <dependency>
39
            <groupId>commons-io</groupId>
40
            <artifactId>commons-io</artifactId>
41
        </dependency>
42
        <dependency>
43
            <groupId>commons-codec</groupId>
44
            <artifactId>commons-codec</artifactId>
45
            <scope>compile</scope>
46
        </dependency>
47
    </dependencies>
48
    <build>
49
        <plugins>
50

  
51
            <plugin>
52
                <groupId>org.apache.maven.plugins</groupId>
53
                <artifactId>maven-jar-plugin</artifactId>
54
                <configuration>
55
                </configuration>
56
                <executions>
57
                    <!-- Generates a jar file only with the test classes -->
58
                    <execution>
59
                        <goals>
60
                            <goal>test-jar</goal>
61
                        </goals>
62
                    </execution>
63
                </executions>
64
            </plugin>
65
        </plugins>
66
    </build>
67
</project>
org.gvsig.tools/library/tags/org.gvsig.tools-3.0.284/org.gvsig.tools.lib/README.txt
1
====
2
    gvSIG. Desktop Geographic Information System.
3

  
4
    Copyright (C) 2007-2013 gvSIG Association.
5

  
6
    This program is free software; you can redistribute it and/or
7
    modify it under the terms of the GNU General Public License
8
    as published by the Free Software Foundation; either version 2
9
    of the License, or (at your option) any later version.
10

  
11
    This program is distributed in the hope that it will be useful,
12
    but WITHOUT ANY WARRANTY; without even the implied warranty of
13
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14
    GNU General Public License for more details.
15

  
16
    You should have received a copy of the GNU General Public License
17
    along with this program; if not, write to the Free Software
18
    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
19
    MA  02110-1301, USA.
20

  
21
    For any additional information, do not hesitate to contact us
22
    at info AT gvsig.com, or visit our website www.gvsig.com.
23
====
24

  
25
The project structure of this project is the following:
26

  
27
Project
28
|-pom.xml:   		Maven 2 configuration file.
29
`-src
30
  |-main:    		Project source code, resources and configuration
31
  | |-java:  		Java source code
32
  | |-resources:	Resources needed by the code (resource bundles, images, etc.)   
33
  | `-javadoc:		Javadoc common resources	
34
  `-test:    		Unit tests source code, resources and configuration
35
    |-java:  		Unit tests java source code
36
    `-resources:	Resources needed by the test code (resource bundles, images, etc.)   
37

  
38
Look at the main folders for a README.txt file with more information on the 
39
contents of each folder.
org.gvsig.tools/library/tags/org.gvsig.tools-3.0.284/org.gvsig.tools.lib/src/main/javadoc/overview.html
1
<?xml version="1.0" encoding="UTF-8" ?>
2
<!--
3

  
4
    gvSIG. Desktop Geographic Information System.
5

  
6
    Copyright (C) 2007-2013 gvSIG Association.
7

  
8
    This program is free software; you can redistribute it and/or
9
    modify it under the terms of the GNU General Public License
10
    as published by the Free Software Foundation; either version 2
11
    of the License, or (at your option) any later version.
12

  
13
    This program is distributed in the hope that it will be useful,
14
    but WITHOUT ANY WARRANTY; without even the implied warranty of
15
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16
    GNU General Public License for more details.
17

  
18
    You should have received a copy of the GNU General Public License
19
    along with this program; if not, write to the Free Software
20
    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
21
    MA  02110-1301, USA.
22

  
23
    For any additional information, do not hesitate to contact us
24
    at info AT gvsig.com, or visit our website www.gvsig.com.
25

  
26
-->
27
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
28
<html xmlns="http://www.w3.org/1999/xhtml">
29
<head>
30
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
31
<title>org.gvsig.tools.lib package documentation</title>
32
</head>
33
<body>
34

  
35
	<p>TODO: Example library overview.</p>
36
	
37
	<p>See the <a href="http://java.sun.com/j2se/1.4.2/docs/tooldocs/windows/javadoc.html#overviewcomment">Javadoc Tool documentation about the overview file</a></p>
38

  
39
</body>
40
</html>
org.gvsig.tools/library/tags/org.gvsig.tools-3.0.284/org.gvsig.tools.lib/src/main/resources/org/gvsig/tools/persistence/xml/persistentState_base.xsd
1
<?xml version="1.0"?>
2
<!--
3

  
4
    gvSIG. Desktop Geographic Information System.
5

  
6
    Copyright (C) 2007-2013 gvSIG Association.
7

  
8
    This program is free software; you can redistribute it and/or
9
    modify it under the terms of the GNU General Public License
10
    as published by the Free Software Foundation; either version 2
11
    of the License, or (at your option) any later version.
12

  
13
    This program is distributed in the hope that it will be useful,
14
    but WITHOUT ANY WARRANTY; without even the implied warranty of
15
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16
    GNU General Public License for more details.
17

  
18
    You should have received a copy of the GNU General Public License
19
    along with this program; if not, write to the Free Software
20
    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
21
    MA  02110-1301, USA.
22

  
23
    For any additional information, do not hesitate to contact us
24
    at info AT gvsig.com, or visit our website www.gvsig.com.
25

  
26
-->
27

  
28
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
29
	targetNamespace="http://www.gvsig.org/libTools"	
30
	xmlns:tools="http://www.gvsig.org/libTools"
31
	xmlns:xlink="http://www.w3.org/1999/xlink" 
32
    elementFormDefault="unqualified"
33
    attributeFormDefault="unqualified"
34
>
35

  
36
<xs:simpleType name="stateTypeId">
37
    <xs:restriction base="xs:NMTOKEN">
38
      <xs:enumeration value="String"/>
39
      <xs:enumeration value="ObjectReference"/>
40
      <xs:enumeration value="Boolean"/>
41
      <xs:enumeration value="Integer"/>
42
      <xs:enumeration value="List"/>
43
      <xs:enumeration value="Set"/>
44
      <xs:enumeration value="Map"/>
45
      <xs:enumeration value="Double"/>
46
      <xs:enumeration value="Long"/>
47
      <xs:enumeration value="Float"/>
48
      <xs:enumeration value="Date"/>
49
      <xs:enumeration value="null"/>
50
    </xs:restriction>
51
</xs:simpleType>
52

  
53
<xs:simpleType name="stateTypeId_String">
54
    <xs:restriction base="xs:NMTOKEN">
55
      <xs:enumeration value="String"/>
56
      <xs:enumeration value="null"/>
57
    </xs:restriction>
58
</xs:simpleType>
59

  
60
<xs:simpleType name="stateTypeId_ObjectReference">
61
    <xs:restriction base="xs:NMTOKEN">
62
      <xs:enumeration value="ObjectReference"/>
63
      <xs:enumeration value="null"/>
64
    </xs:restriction>
65
</xs:simpleType>
66

  
67
<xs:simpleType name="stateTypeId_Boolean">
68
    <xs:restriction base="xs:NMTOKEN">
69
      <xs:enumeration value="Boolean"/>
70
      <xs:enumeration value="null"/>
71
    </xs:restriction>
72
</xs:simpleType>
73

  
74

  
75
<xs:simpleType name="stateTypeId_Integer">
76
    <xs:restriction base="xs:NMTOKEN">
77
      <xs:enumeration value="Integer"/>
78
      <xs:enumeration value="null"/>
79
    </xs:restriction>
80
</xs:simpleType>
81

  
82

  
83
<xs:simpleType name="stateTypeId_List">
84
    <xs:restriction base="xs:NMTOKEN">
85
      <xs:enumeration value="List"/>
86
      <xs:enumeration value="null"/>
87
    </xs:restriction>
88
</xs:simpleType>
89

  
90
<xs:simpleType name="stateTypeId_Set">
91
    <xs:restriction base="xs:NMTOKEN">
92
      <xs:enumeration value="Set"/>
93
      <xs:enumeration value="null"/>
94
    </xs:restriction>
95
</xs:simpleType>
96

  
97
<xs:simpleType name="stateTypeId_Map">
98
    <xs:restriction base="xs:NMTOKEN">
99
      <xs:enumeration value="Map"/>
100
      <xs:enumeration value="null"/>
101
    </xs:restriction>
102
</xs:simpleType>
103

  
104
<xs:simpleType name="stateTypeId_Double">
105
    <xs:restriction base="xs:NMTOKEN">
106
      <xs:enumeration value="Double"/>
107
      <xs:enumeration value="null"/>
108
    </xs:restriction>
109
</xs:simpleType>
110

  
111
<xs:simpleType name="stateTypeId_Long">
112
    <xs:restriction base="xs:NMTOKEN">
113
      <xs:enumeration value="Long"/>
114
      <xs:enumeration value="null"/>
115
    </xs:restriction>
116
</xs:simpleType>
117

  
118
<xs:simpleType name="stateTypeId_Float">
119
    <xs:restriction base="xs:NMTOKEN">
120
      <xs:enumeration value="Float"/>
121
      <xs:enumeration value="null"/>
122
    </xs:restriction>
123
</xs:simpleType>
124

  
125
<xs:simpleType name="stateTypeId_Date">
126
    <xs:restriction base="xs:NMTOKEN">
127
      <xs:enumeration value="Date"/>
128
      <xs:enumeration value="null"/>
129
    </xs:restriction>
130
</xs:simpleType>
131

  
132

  
133
<xs:simpleType name="xml_persistence_version">
134
    <xs:restriction base="xs:string">
135
      <xs:pattern value="[0-9]*[.][0-9]*[.][0-9]*"/>
136
    </xs:restriction>
137
</xs:simpleType>
138

  
139
<xs:simpleType name="boolean" xmlns="http://www.gvsig.org/libTools">
140
    <xs:restriction base="xs:NMTOKEN">
141
      <xs:enumeration value="true"/>
142
      <xs:enumeration value="false"/>
143
    </xs:restriction>
144
</xs:simpleType>
145

  
146

  
147
<xs:complexType name="state_attribute">	
148
	<xs:attribute name="type" type="tools:stateTypeId"/>
149
</xs:complexType>
150

  
151

  
152
<xs:complexType name="state_attribute_Null" mixed="true">
153
	<xs:attribute name="type" type="tools:stateTypeId" fixed="null"/>
154
</xs:complexType>
155

  
156
<xs:complexType name="state_attribute_Integer">
157
	<xs:simpleContent>
158
		<xs:extension base="xs:integer">
159
			<xs:attribute name="type" type="tools:stateTypeId_Integer" />
160
		</xs:extension>
161
	</xs:simpleContent>
162
</xs:complexType>
163

  
164
<xs:complexType name="state_attribute_Integer_notNull">
165
	<xs:simpleContent>
166
		<xs:extension base="xs:integer">
167
			<xs:attribute name="type" type="tools:stateTypeId_Integer" fixed="Integer"/>
168
		</xs:extension>
169
	</xs:simpleContent>
170
</xs:complexType>
171

  
172

  
173
<xs:complexType name="state_attribute_Long">
174
	<xs:simpleContent>
175
		<xs:extension base="xs:long">
176
			<xs:attribute name="type" type="tools:stateTypeId_Long"/>
177
		</xs:extension>		
178
	</xs:simpleContent>
179
</xs:complexType>
180

  
181
<xs:complexType name="state_attribute_Long_notNull">
182
	<xs:simpleContent>
183
		<xs:extension base="xs:long">
184
			<xs:attribute name="type" type="tools:stateTypeId_Long" fixed="Long"/>
185
		</xs:extension>		
186
	</xs:simpleContent>
187
</xs:complexType>
188

  
189
<xs:complexType name="state_attribute_Date">
190
	<xs:simpleContent>
191
		<xs:extension base="xs:long">
192
			<xs:attribute name="type" type="tools:stateTypeId_Date"/>
193
		</xs:extension>		
194
	</xs:simpleContent>
195
</xs:complexType>
196

  
197
<xs:complexType name="state_attribute_Date_notNull">
198
	<xs:simpleContent>
199
		<xs:extension base="xs:long">
200
			<xs:attribute name="type" type="tools:stateTypeId_Date" fixed="Date"/>
201
		</xs:extension>		
202
	</xs:simpleContent>
203
</xs:complexType>
204

  
205
<xs:complexType name="state_attribute_Float">
206
	<xs:simpleContent>
207
		<xs:extension base="xs:float">
208
			<xs:attribute name="type" type="tools:stateTypeId_Float" />
209
		</xs:extension>		
210
	</xs:simpleContent>
211
</xs:complexType>
212

  
213
<xs:complexType name="state_attribute_Float_notNull">
214
	<xs:simpleContent>
215
		<xs:extension base="xs:float">
216
			<xs:attribute name="type" type="tools:stateTypeId_Float" fixed="Float"/>
217
		</xs:extension>		
218
	</xs:simpleContent>
219
</xs:complexType>
220

  
221

  
222
<xs:complexType name="state_attribute_Double">
223
	<xs:simpleContent>
224
		<xs:extension base="xs:double">
225
			<xs:attribute name="type" type="tools:stateTypeId_Double"/>
226
		</xs:extension>		
227
	</xs:simpleContent>
228
</xs:complexType>
229

  
230

  
231
<xs:complexType name="state_attribute_Double_notNull">
232
	<xs:simpleContent>
233
		<xs:extension base="xs:double">
234
			<xs:attribute name="type" type="tools:stateTypeId_Double" fixed="Double"/>
235
		</xs:extension>		
236
	</xs:simpleContent>
237
</xs:complexType>
238

  
239
<xs:complexType name="state_attribute_Boolean">
240
	<xs:simpleContent>
241
		<xs:extension base="tools:boolean">
242
			<xs:attribute name="type" type="tools:stateTypeId_Boolean"/>
243
		</xs:extension>		
244
	</xs:simpleContent>
245
</xs:complexType>
246

  
247
<xs:complexType name="state_attribute_Boolean_notNull">
248
	<xs:simpleContent>
249
		<xs:extension base="tools:boolean">
250
			<xs:attribute name="type" type="tools:stateTypeId_Boolean" fixed="Boolean"/>
251
		</xs:extension>		
252
	</xs:simpleContent>
253
</xs:complexType>
254

  
255

  
256
<xs:complexType name="state_attribute_String">
257
	<xs:simpleContent>
258
		<xs:extension base="xs:string">
259
			<xs:attribute name="type" type="tools:stateTypeId_String"/>
260
		</xs:extension>		
261
	</xs:simpleContent>
262
</xs:complexType>
263

  
264

  
265
<xs:complexType name="state_attribute_String_notNull">
266
	<xs:simpleContent>
267
		<xs:extension base="xs:string">
268
			<xs:attribute name="type" type="tools:stateTypeId_String" fixed="String"/>
269
		</xs:extension>		
270
	</xs:simpleContent>
271
</xs:complexType>
272

  
273
<xs:complexType name="state_attribute_List">
274
	<xs:sequence>
275
		<xs:element name="listItem" type="tools:state_attribute" maxOccurs="unbounded"/>
276
	</xs:sequence>
277
	<xs:attribute name="type" type="tools:stateTypeId_List"/>
278
</xs:complexType>
279

  
280
<xs:complexType name="state_attribute_List_notNull">
281
	<xs:sequence>
282
		<xs:element name="listItem" type="tools:state_attribute" maxOccurs="unbounded"/>
283
	</xs:sequence>
284
	<xs:attribute name="type" type="tools:stateTypeId_List" fixed="List"/>
285
</xs:complexType>
286

  
287

  
288
<xs:complexType name="state_attribute_Set">
289
	<xs:sequence>
290
		<xs:element name="setItem" type="tools:state_attribute" maxOccurs="unbounded"/>
291
	</xs:sequence>
292
	<xs:attribute name="type" type="tools:stateTypeId_Set"/>
293
</xs:complexType>
294

  
295

  
296
<xs:complexType name="state_attribute_Set_notNull">
297
	<xs:sequence>
298
		<xs:element name="setItem" type="tools:state_attribute" maxOccurs="unbounded"/>
299
	</xs:sequence>
300
	<xs:attribute name="type" type="tools:stateTypeId_Set" fixed="Set"/>
301
</xs:complexType>
302

  
303

  
304
<xs:complexType name="mapItem">
305
	<xs:all>
306
		<xs:element name="key" type="tools:state_attribute"/>
307
		<xs:element name="value" type="tools:state_attribute"/>
308
	</xs:all>
309
</xs:complexType>
310

  
311
<xs:complexType name="state_attribute_Map">
312
	<xs:sequence>		
313
		<xs:element name="mapItem" type="tools:mapItem" maxOccurs="unbounded"/>
314
	</xs:sequence>
315
	<xs:attribute name="type" type="tools:stateTypeId_Map"/>
316
</xs:complexType>
317

  
318
<xs:complexType name="state_attribute_Map_notNull">
319
	<xs:sequence>		
320
		<xs:element name="mapItem" type="tools:mapItem" maxOccurs="unbounded"/>
321
	</xs:sequence>
322
	<xs:attribute name="type" type="tools:stateTypeId_Map" fixed="Map"/>
323
</xs:complexType>
324

  
325
<xs:attributeGroup name="xlink_attributes">
326
	<xs:attribute name="type" xmlns="http://www.w3.org/1999/xlink" type="xs:string" fixed="simple" use="required"/>
327
	<xs:attribute name="href" xmlns="http://www.w3.org/1999/xlink" use="required">
328
		<xs:simpleType>
329
			<xs:restriction base="xs:string">
330
				<xs:pattern value="states[#]id[(]['][0-9]*['][)]"/>
331
			</xs:restriction>
332
		</xs:simpleType>
333
	</xs:attribute>
334
</xs:attributeGroup>
335

  
336
<xs:complexType name="objectReference">
337
	<xs:attribute name="id_state" type="xs:integer"/>
338
	<xs:attributeGroup ref="tools:xlink_attributes"/>
339
</xs:complexType>
340

  
341
<xs:complexType name="state_attribute_ObjectReference">
342
	<xs:all>		
343
		<xs:element name="reference" type="tools:objectReference"/>
344
	</xs:all>
345
	<xs:attribute name="type" type="tools:stateTypeId_ObjectReference"/>
346
</xs:complexType>
347

  
348
<xs:complexType name="state_attribute_ObjectReference_notNull">
349
	<xs:sequence>		
350
		<xs:element name="reference" type="tools:objectReference" maxOccurs="1" minOccurs="1"/>
351
	</xs:sequence>
352
	<xs:attribute name="type" type="tools:stateTypeId_ObjectReference" fixed="ObjectReference"/>
353
</xs:complexType>
354

  
355

  
356
 
357
<xs:attributeGroup name="state_attributes">
358
	<xs:attribute name="id" type="xs:integer" use="required"/>
359
</xs:attributeGroup>
360

  
361
 
362
<xs:element name="XMLPersitence">
363
  <xs:complexType>
364
    <xs:all>
365
    
366
      <xs:element name="persistence_xml_version" type="tools:xml_persistence_version" 
367
      		minOccurs="1" maxOccurs="1"/>
368
      <xs:element name="rootState" minOccurs="1" maxOccurs="1">
369
        <xs:complexType>
370
		  <xs:attribute name="id_state" type="xs:integer" use="required"/>
371
		  <xs:attributeGroup ref="tools:xlink_attributes"/>
372
		</xs:complexType>
373
      </xs:element>
374
      <xs:element name="states">
375
      	<xs:complexType>
376
      		<xs:sequence>
377
      			<xs:any minOccurs="1" maxOccurs="unbounded"/>
378
      		</xs:sequence>
379
      	</xs:complexType>
380
      </xs:element>
381
      
382
      
383
    </xs:all>
384
  </xs:complexType>
385
</xs:element>
386
</xs:schema>
org.gvsig.tools/library/tags/org.gvsig.tools-3.0.284/org.gvsig.tools.lib/src/main/resources/org/gvsig/tools/lib/i18n/text.properties
1
#
2
# gvSIG. Desktop Geographic Information System.
3
#
4
# Copyright (C) 2007-2013 gvSIG Association.
5
#
6
# This program is free software; you can redistribute it and/or
7
# modify it under the terms of the GNU General Public License
8
# as published by the Free Software Foundation; either version 2
9
# of the License, or (at your option) any later version.
10
#
11
# This program is distributed in the hope that it will be useful,
12
# but WITHOUT ANY WARRANTY; without even the implied warranty of
13
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14
# GNU General Public License for more details.
15
#
16
# You should have received a copy of the GNU General Public License
17
# along with this program; if not, write to the Free Software
18
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
19
# MA  02110-1301, USA.
20
#
21
# For any additional information, do not hesitate to contact us
22
# at info AT gvsig.com, or visit our website www.gvsig.com.
23
#
24

  
25
# Resource bundle texts for the Spanish language locale (es)
26
Example.returns_value=devuelve el valor
org.gvsig.tools/library/tags/org.gvsig.tools-3.0.284/org.gvsig.tools.lib/src/main/resources/org/gvsig/tools/lib/i18n/text_en.properties
1
#
2
# gvSIG. Desktop Geographic Information System.
3
#
4
# Copyright (C) 2007-2013 gvSIG Association.
5
#
6
# This program is free software; you can redistribute it and/or
7
# modify it under the terms of the GNU General Public License
8
# as published by the Free Software Foundation; either version 2
9
# of the License, or (at your option) any later version.
10
#
11
# This program is distributed in the hope that it will be useful,
12
# but WITHOUT ANY WARRANTY; without even the implied warranty of
13
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14
# GNU General Public License for more details.
15
#
16
# You should have received a copy of the GNU General Public License
17
# along with this program; if not, write to the Free Software
18
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
19
# MA  02110-1301, USA.
20
#
21
# For any additional information, do not hesitate to contact us
22
# at info AT gvsig.com, or visit our website www.gvsig.com.
23
#
24

  
25
# Resource bundle texts for the English language locale (en)
26
Example.returns_value=returns value
org.gvsig.tools/library/tags/org.gvsig.tools-3.0.284/org.gvsig.tools.lib/src/main/resources/README.txt
1
====
2
    gvSIG. Desktop Geographic Information System.
3

  
4
    Copyright (C) 2007-2013 gvSIG Association.
5

  
6
    This program is free software; you can redistribute it and/or
7
    modify it under the terms of the GNU General Public License
8
    as published by the Free Software Foundation; either version 2
9
    of the License, or (at your option) any later version.
10

  
11
    This program is distributed in the hope that it will be useful,
12
    but WITHOUT ANY WARRANTY; without even the implied warranty of
13
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14
    GNU General Public License for more details.
15

  
16
    You should have received a copy of the GNU General Public License
17
    along with this program; if not, write to the Free Software
18
    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
19
    MA  02110-1301, USA.
20

  
21
    For any additional information, do not hesitate to contact us
22
    at info AT gvsig.com, or visit our website www.gvsig.com.
23
====
24

  
25
Put into this folder the resources needed by your library classes.
26

  
27
This folder is added to the runtime classpath, so you can load any resources 
28
through the ClassLoader.
29

  
30
By default, into this folder you can find some examples of resource bundle 
31
property files that may be used by your library classes.
org.gvsig.tools/library/tags/org.gvsig.tools-3.0.284/org.gvsig.tools.lib/src/main/resources/META-INF/services/org.gvsig.tools.library.Library
1
org.gvsig.tools.ToolsLibrary
2
org.gvsig.tools.persistence.xml.XMLPersistenceLibrary
org.gvsig.tools/library/tags/org.gvsig.tools-3.0.284/org.gvsig.tools.lib/src/main/java/org/gvsig/installer/lib/api/Dependency.java
1
/**
2
 * gvSIG. Desktop Geographic Information System.
3
 *
4
 * Copyright (C) 2007-2013 gvSIG Association.
5
 *
6
 * This program is free software; you can redistribute it and/or
7
 * modify it under the terms of the GNU General Public License
8
 * as published by the Free Software Foundation; either version 2
9
 * of the License, or (at your option) any later version.
10
 *
11
 * This program is distributed in the hope that it will be useful,
12
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14
 * GNU General Public License for more details.
15
 *
16
 * You should have received a copy of the GNU General Public License
17
 * along with this program; if not, write to the Free Software
18
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
19
 * MA  02110-1301, USA.
20
 *
21
 * For any additional information, do not hesitate to contact us
22
 * at info AT gvsig.com, or visit our website www.gvsig.com.
23
 */
24
package org.gvsig.installer.lib.api;
25

  
26
import org.gvsig.tools.lang.Cloneable;
27
import org.gvsig.tools.packageutils.StringWithAlias;
28

  
29

  
30
/**
31
 * 
32
 * Este interface se mantiene aqui por compatibilidad con versiones anteriores.
33
 * 
34
 * @see #org.gvsig.tools.packageutils.Dependency
35
 * @deprecated use #org.gvsig.tools.packageutils.Dependency
36
 */
37
public interface Dependency extends Cloneable  {
38

  
39
	public final String REQUIRED = "required";
40
	public final String CONFLICT = "conflict";
41
	public final String RECOMMENDED = "recommended";
42

  
43
	public Dependency parse(String dependency);
44

  
45
	public String getType();
46

  
47
	public String getCode();
48

  
49
	public String getOp();
50

  
51
	public Version getVersion();
52

  
53
	public boolean match(String type, String code, Version version);
54
	public boolean match(String type, StringWithAlias code, Version version);
55
}
0 56

  
org.gvsig.tools/library/tags/org.gvsig.tools-3.0.284/org.gvsig.tools.lib/src/main/java/org/gvsig/installer/lib/api/Version.java
1
/**
2
 * gvSIG. Desktop Geographic Information System.
3
 *
4
 * Copyright (C) 2007-2013 gvSIG Association.
5
 *
6
 * This program is free software; you can redistribute it and/or
7
 * modify it under the terms of the GNU General Public License
8
 * as published by the Free Software Foundation; either version 2
9
 * of the License, or (at your option) any later version.
10
 *
11
 * This program is distributed in the hope that it will be useful,
12
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14
 * GNU General Public License for more details.
15
 *
16
 * You should have received a copy of the GNU General Public License
17
 * along with this program; if not, write to the Free Software
18
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
19
 * MA  02110-1301, USA.
20
 *
21
 * For any additional information, do not hesitate to contact us
22
 * at info AT gvsig.com, or visit our website www.gvsig.com.
23
 */
24
package org.gvsig.installer.lib.api;
25

  
26
import org.gvsig.tools.lang.Cloneable;
27

  
28

  
29
/**
30
 * 
31
 * Este interface se mantiene aqui por compatibilidad con versiones anteriores.
32
 * 
33
 * @see #org.gvsig.tools.packageutils.Version
34
 * @deprecated use #org.gvsig.tools.packageutils.Version
35
 * 
36
 */
37
public interface Version  extends Cloneable, Comparable {
38

  
39
	public Version parse(String version);
40

  
41
	public int getMajor();
42
	
43
	/**
44
	 * @deprecated Use {@link #getMajor()}
45
	 */
46
    public int getMayor();
47

  
48
	public int getMinor();
49

  
50
	public int getRevision();
51

  
52
	public String getClassifier();
53

  
54
	public int getBuild();
55

  
56
	public boolean check(String op, Version other);
57

  
58
	public String fullFormat();
59
	
60
	/**
61
	 * Return the version formated as string with the format specified as fmt.
62
	 * It replace in fmt:
63
	 * - %M by the major number of the version
64
	 * - %m by the minor number of the version
65
	 * - %r by the revision number of the version
66
	 * - %c by the classifier of the version
67
	 * - %b by the build number of the version
68
	 * 
69
	 * @param fmt, string used as format
70
	 * @return the version formated as string 
71
	 */
72
	public String format(String fmt);
73

  
74
	/**
75
	 * @deprecated don't use, set only in parse 
76
	 */
77
	public Version setBuild(int build);
78

  
79
}
0 80

  
org.gvsig.tools/library/tags/org.gvsig.tools-3.0.284/org.gvsig.tools.lib/src/main/java/org/gvsig/installer/lib/api/Dependencies.java
1
/**
2
 * gvSIG. Desktop Geographic Information System.
3
 *
4
 * Copyright (C) 2007-2013 gvSIG Association.
5
 *
6
 * This program is free software; you can redistribute it and/or
7
 * modify it under the terms of the GNU General Public License
8
 * as published by the Free Software Foundation; either version 2
9
 * of the License, or (at your option) any later version.
10
 *
11
 * This program is distributed in the hope that it will be useful,
12
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14
 * GNU General Public License for more details.
15
 *
16
 * You should have received a copy of the GNU General Public License
17
 * along with this program; if not, write to the Free Software
18
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
19
 * MA  02110-1301, USA.
20
 *
21
 * For any additional information, do not hesitate to contact us
22
 * at info AT gvsig.com, or visit our website www.gvsig.com.
23
 */
24
package org.gvsig.installer.lib.api;
25

  
26
import java.util.List;
27

  
28
import org.gvsig.tools.lang.Cloneable;
29
import org.gvsig.tools.packageutils.StringWithAlias;
30

  
31
/**
32
 * 
33
 * Este interface se mantiene aqui por compatibilidad con versiones anteriores.
34
 * 
35
 * @see #org.gvsig.tools.packageutils.Dependencies
36
 * @deprecated use #org.gvsig.tools.packageutils.Dependencies
37
 */
38
public interface Dependencies extends List, Cloneable  {
39
    
40
	public Dependencies parse(String dependenies);
41

  
42
	public boolean match(String type, String code, Version version);
43
	public boolean match(String type, StringWithAlias code, Version version);
44

  
45
    public Dependency find(String type, String code, Version version);
46
    public Dependency find(String type, StringWithAlias code, Version version);
47
    public List findAll(String type, String code, Version version);
48
    public List findAll(String type, StringWithAlias code, Version version);
49
}
0 50

  
org.gvsig.tools/library/tags/org.gvsig.tools-3.0.284/org.gvsig.tools.lib/src/main/java/org/gvsig/installer/lib/api/PackageInfo.java
1
/**
2
 * gvSIG. Desktop Geographic Information System.
3
 *
4
 * Copyright (C) 2007-2013 gvSIG Association.
5
 *
6
 * This program is free software; you can redistribute it and/or
7
 * modify it under the terms of the GNU General Public License
8
 * as published by the Free Software Foundation; either version 2
9
 * of the License, or (at your option) any later version.
10
 *
11
 * This program is distributed in the hope that it will be useful,
12
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14
 * GNU General Public License for more details.
15
 *
16
 * You should have received a copy of the GNU General Public License
17
 * along with this program; if not, write to the Free Software
18
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
19
 * MA  02110-1301, USA.
20
 *
21
 * For any additional information, do not hesitate to contact us
22
 * at info AT gvsig.com, or visit our website www.gvsig.com.
23
 */
24

  
25
package org.gvsig.installer.lib.api;
26

  
27
import java.io.File;
28
import java.net.URL;
29
import java.util.List;
30

  
31
import org.gvsig.tools.exception.BaseException;
32
import org.gvsig.tools.lang.Cloneable;
33
import org.gvsig.tools.task.SimpleTaskStatus;
34
import org.gvsig.tools.packageutils.StringWithAlias;
35
import org.gvsig.tools.packageutils.PackageManager.ARCH;
36
import org.gvsig.tools.packageutils.PackageManager.JVM;
37
import org.gvsig.tools.packageutils.PackageManager.OS;
38
import org.gvsig.tools.packageutils.PackageManager.STATE;
39

  
40
/**
41
 * @deprecated use instead #org.gvsig.tools.packageutils.PackageInfo
42
 */
43
public interface PackageInfo extends Cloneable{
44

  
45

  
46
	/**
47
	 * @return Gets the code of the package.
48
	 */
49
	public String getCode();
50

  
51
	public void setCode(String code);
52

  
53
	public StringWithAlias getAllCodes();	
54
    
55
    public boolean hasThisCode(String code);
56
    public boolean hasThisCode(StringWithAlias code);
57
	
58
	
59
	public String getID();
60

  
61
	/**
62
	 * @return Gets the name of the package.
63
	 */
64
	public String getName();
65

  
66
	public void setName(String name);
67

  
68
	/**
69
	 * @return Gets the description of the package.
70
	 */
71
	public String getDescription();
72

  
73
	public void setDescription(String description);
74

  
75
	/**
76
	 * @return Gets the version of the package.
77
	 */
78
	public Version getVersion();
79

  
80
	public void setVersion(Version version);
81

  
82
	/**
83
	 * @return Gets the state of the package.
84
	 * @see STATE
85
	 */
86
	public String getState();
87

  
88
	/**
89
	 * Sets the state of the package
90
	 * 
91
	 * @param state
92
	 * @see STATE
93
	 */
94
	public void setState(String state);
95

  
96
	/**
97
	 * @return Gets if the package is official.
98
	 */
99
	public boolean isOfficial();
100

  
101
	public void setOfficial(boolean official);
102

  
103
	/**
104
	 * @return Gets the type of the package.
105
	 */
106
	public String getType();
107

  
108
	public void setType(String type);
109

  
110
	/**
111
	 * Returns the supported operating system.
112
	 * 
113
	 * @return the supported operating system
114
	 * @see OS
115
	 */
116
	public String getOperatingSystem();
117

  
118
	/**
119
	 * Sets the supported operating system.
120
	 * 
121
	 * @param operatingSystem
122
	 *            the supported operating system
123
	 * @see OS
124
	 */
125
	public void setOperatingSystem(String operatingSystem);
126
        
127
        public String getOperatingSystemFamily();
128

  
129
        public String getOperatingSystemName();
130

  
131
        public String getOperatingSystemVersion();
132
        
133
        public void setOperatingSystemFamily(String operatingSystemFamily);
134

  
135
        public void setOperatingSystemName(String operatingSystemName);
136

  
137
        public void setOperatingSystemVersion(String operatingSystemVersion);
138
	/**
139
	 * Returns the supported hardware architecture.
140
	 * 
141
	 * @return the supported hardware architecture
142
	 * @see ARCH
143
	 */
144
	public String getArchitecture();
145

  
146
	/**
147
	 * Sets the supported hardware architecture.
148
	 * 
149
	 * @param architecture
150
	 *            the supported hardware architecture
151
	 * @see ARCH
152
	 */
153
	public void setArchitecture(String architecture);
154

  
155
	/**
156
	 * Returns the supported java vm version.
157
	 * 
158
	 * @return the supported java vm version
159
	 * @see JVM
160
	 */
161
	public String getJavaVM();
162

  
163
	/**
164
	 * Sets the supported java vm version.
165
	 * 
166
	 * @param javaVM
167
	 *            the supported java vm version
168
	 * @see JVM
169
	 */
170
	public void setJavaVM(String javaVM);
171

  
172
	/**
173
	 * Returns the supported application version.
174
	 * 
175
	 * @return the supported application version
176
	 */
177
	public Version getApplicationVersion();
178

  
179
	/**
180
	 * Sets the supported application version.
181
	 * 
182
	 * @param verion
183
	 *            the supported application version
184
	 */
185
	public void setApplicationVersion(Version version);
186

  
187
	/**
188
	 * Returns the package bundle download {@link URL}.
189
	 *  
190
	 * May be null if there is no remote URL to download the bundle.
191
	 * 
192
	 * @return the package bundle download {@link URL}
193
	 */
194
	public URL getDownloadURL();
195

  
196
	public String getDownloadURLAsString();
197

  
198
	/**
199
	 * Sets the package bundle download {@link URL}. Optional.
200
	 * 
201
	 * @param defaultURL
202
	 *            the package bundle download {@link URL}
203
	 */
204
	public void setDownloadURL(URL defaultURL);
205

  
206
	public void setDownloadURL(String defaultDownloadURL);
207

  
208
	/**
209
	 * Returns the package info model version.
210
	 * 
211
	 * @return the package info model version
212
	 */
213
	public String getModelVersion();
214

  
215
	/**
216
	 * Sets the package info model version.
217
	 * 
218
	 * @param modelVersion
219
	 *            the package info model version
220
	 */
221
	public void setModelVersion(String modelVersion);
222

  
223
	public String getOwner();
224

  
225
	/**
226
	 * Sets the package owner.
227
	 * 
228
	 * @param owner
229
	 *            the package owner
230
	 */
231
	public void setOwner(String owner);
232

  
233
	/**
234
	 * Returns the owner's url {@link URL}.
235
	 * 
236
	 * @return the owner's url {@link URL}
237
	 */
238
	public URL getOwnerURL();
239

  
240
	/**
241
	 * Sets the package owner's url.
242
	 * 
243
	 * @param sources
244
	 *            the package owner's url
245
	 */
246
	public void setOwnerURL(URL sources);
247

  
248
	/**
249
	 * Returns the package source files url {@link URL}.
250
	 * 
251
	 * @return the package source files url {@link URL}
252
	 */
253
	public URL getSourcesURL();
254

  
255
	/**
256
	 * Sets the package sources.
257
	 * 
258
	 * @param sources
259
	 *            the package sources
260
	 */
261
	public void setSourcesURL(URL sources);
262

  
263
	/**
264
	 * Returns the package web url {@link URL}.
265
	 * 
266
	 * @return the package web url {@link URL}
267
	 */
268
	public URL getWebURL();
269

  
270
	/**
271
	 * Sets the package web url {@link URL}.
272
	 * 
273
	 * @param webURL
274
	 *            the package web url {@link URL}
275
	 */
276
	public void setWebURL(URL webURL);
277

  
278
	/**
279
	 * @param string
280
	 * @return
281
	 */
282
	public boolean matchID(String string);
283

  
284
	public Dependencies getDependencies();
285

  
286
	public void setDependencies(String dependencies);
287

  
288
	public void setDependencies(Dependencies dependencies);
289

  
290
	public String toStringCompact();
291

  
292
	public List getCategories();
293

  
294
	public void setCategories(List categoriesList);
295

  
296
	public String getCategoriesAsString();
297

  
298
	public void addCategoriesAsString(String categoriesString);
299

  
300
	public boolean isBroken();
301

  
302

  
303

  
304
	
305
	
306
	
307
	
308

  
309
	/**
310
	 * 
311
	 * @param version
312
	 * @deprecated Use {@link #setVersion(Version)}
313
	 */
314
	public void setVersion(String version);
315

  
316
	
317
	/**
318
	 * @return Gets the build number of the package.
319
	 * @deprecated use {@link #getVersion()}.getBuild()
320
	 */
321
	public int getBuild();
322

  
323
	/**
324
	 * @deprecated use {@link #getVersion()}
325
	 */
326
	public void setBuild(int build);
327

  
328
	/**
329
	 * Returns the supported gvSIG version.
330
	 * 
331
	 * @return the supported gvSIG version
332
	 * @deprecated use {@link #getApplicationVersion()}
333
	 */
334
	public String getGvSIGVersion();
335

  
336
	/**
337
	 * Sets the supported gvSIG version.
338
	 * 
339
	 * @param gvSIGVersion the supported gvSIG version
340
	 * @deprecated use {@link #setApplicationVersion(org.gvsig.tools.packageutils.Version)}
341
	 */
342
	public void setGvSIGVersion(String gvSIGVersion);
343

  
344

  
345
	 /**
346
	 * Returns the package bundle download {@link URL}.
347
	 *
348
	 * May be null if there is no remote URL to download the bundle.
349
	 *
350
	 * @return the package bundle download {@link URL}
351
	 * @deprecated use InstallManager
352
	 *
353
	 */
354
	public URL getDownloadURL(URL baseURL);
355

  
356
	/**
357
	 * Gets the ant script that has to be executed in the installation process.
358
	 * 
359
	 * @return the script.
360
	 * @deprecated use {@link #getPostInstallScript()} 
361
	 */
362
	public String getAntScript();
363

  
364
	/**
365
	 * Sets the ant script that can be executed in the installation process.
366
	 * 
367
	 * @param antScript The ant script to copy.
368
	 * @deprecated use {@link #setPostInstallScript(String)}
369
	 */
370
	public void setAntScript(String antScript);
371

  
372
	/**
373
	 * @deprecated use InstallManager
374
	 */
375
	public File downloadFile() throws BaseException;
376

  
377
	/**
378
	 * @deprecated use InstallManager
379
	 */
380
	public File downloadFile(SimpleTaskStatus taskStatus) throws BaseException;
381

  
382
	/**
383
	 * @deprecated use InstallManager.getPackageInfoFiles
384
	 */
385
	public void addFileToCopy(File file);
386

  
387
	/**
388
	 * @deprecated use InstallManager.getPackageInfoFiles
389
	 */
390
	public File getFileToCopy(int i);
391

  
392
	/**
393
	 * @deprecated use InstallManager.getPackageInfoFiles
394
	 */
395
	public void removeFileToCopy(File file);
396

  
397
	/**
398
	 * @deprecated use InstallManager.getPackageInfoFiles
399
	 */
400
	public void clearFilesToCopy();
401

  
402
	/**
403
	 * @deprecated use InstallManager.getPackageInfoFiles
404
	 */
405
	public List getFilesToCopy();
406

  
407
	/**
408
	 * @deprecated use InstallManager.getPackageInfoFiles
409
	 */
410
	public boolean removeInstallFolder(File folder);
411

  
412
	/**
413
	 * @deprecated use InstallManager.getPackageInfoFiles
414
	 */
415
	public boolean removeFilesFolder(File folder);
416

  
417
	/**
418
	 * @deprecated always return true
419
	 */
420
	public boolean isSigned();
421

  
422
	/**
423
	 * @deprecated do nothing
424
	 */
425
	public void checkSignature(byte[] pkgdata);
426

  
427
}
0 428

  
org.gvsig.tools/library/tags/org.gvsig.tools-3.0.284/org.gvsig.tools.lib/src/main/java/org/gvsig/tools/bookmarksandhistory/Bookmark.java
1
package org.gvsig.tools.bookmarksandhistory;
2

  
3
import org.gvsig.tools.util.LabeledValue;
4

  
5
/**
6
 *
7
 * @author jjdelcerro
8
 * @param <T>
9
 */
10
public interface Bookmark<T> extends LabeledValue<T> {
11

  
12
    public String getName();
13
    
14
    public void setName(String name);
15
    
16
    public void used();
17

  
18
    public long getLastUse();
19

  
20
    public boolean isGlobal();
21
    
22
    public void setGlobal(boolean global);
23
    
24
}
org.gvsig.tools/library/tags/org.gvsig.tools-3.0.284/org.gvsig.tools.lib/src/main/java/org/gvsig/tools/bookmarksandhistory/Bookmarks.java
1
package org.gvsig.tools.bookmarksandhistory;
2

  
3
import java.util.List;
4
import java.util.function.Predicate;
5
import org.gvsig.tools.util.UnmodifiableBasicList;
6

  
7
/**
8
 *
9
 * @author jjdelcerro
10
 * @param <T>
11
 */
12
public interface Bookmarks<T> extends UnmodifiableBasicList<Bookmark<T>>{
13
    /**
14
     * This method add an element with a key name. It didn't clone the element.
15
     * 
16
     * @param name Name of the element for the bookmark.
17
     * @param value
18
     * @return 
19
     */
20
    public Bookmark add(String name, T value);
21
    
22
    public Bookmark add(T value);
23

  
24
    public boolean remove(Bookmark bookmark);
25
    
26
    public boolean remove(String bookmarkName);
27
    
28
    public List<Bookmark<T>> filter(Predicate<Bookmark<T>> filter);
29
    
30
    public Bookmark get(String name);
31
    
32
    public boolean hasBookmark(String name);
33
    
34
}
org.gvsig.tools/library/tags/org.gvsig.tools-3.0.284/org.gvsig.tools.lib/src/main/java/org/gvsig/tools/bookmarksandhistory/BookmarksAndHistoryManager.java
1
package org.gvsig.tools.bookmarksandhistory;
2

  
3
import java.util.Collection;
4
import org.gvsig.tools.resourcesstorage.ResourcesStorage;
5

  
6
/**
7
 *
8
 * @author jjdelcerro
9
 */
10

  
11
public interface BookmarksAndHistoryManager {
12

  
13
  public Collection<String> getBookmarkNames();
14
  
15
  public Collection<String> getHistoryNames();
16
  
17
  public boolean existsBookmarksGroup(String name);
18
  
19
  public boolean existsBookmarksHistory(String name);
20
  
21
  public Bookmarks<Object> getBookmarksGroup(String name);
22

  
23
  public History<Object> getHistoryGroup(String name);
24

  
25
  public ResourcesStorage getPrimaryStorage();
26

  
27
  public ResourcesStorage getSecondaryStorage();
28

  
29
  public void load();
30

  
31
  public void registerBookmarksGroup(String name, Bookmarks<Object> bookmarks);
32

  
33
  public void registerBookmarksGroup(String name);
34

  
35
  public void registerHistoryGroup(String name, History<Object> history);
36

  
37
  public void registerHistoryGroup(String name, int size);
38

  
39
  public void save();
40

  
41
  public void setPrimaryStorage(ResourcesStorage primaryStorage);
42

  
43
  public void setSecondaryStorage(ResourcesStorage secondaryStorage);
44
  
45
}
org.gvsig.tools/library/tags/org.gvsig.tools-3.0.284/org.gvsig.tools.lib/src/main/java/org/gvsig/tools/bookmarksandhistory/History.java
1
package org.gvsig.tools.bookmarksandhistory;
2

  
3
import org.gvsig.tools.util.UnmodifiableBasicList;
4

  
5
/**
6
 *
7
 * @author jjdelcerro
8
 * @param <T>
9
 */
10
public interface History<T> extends UnmodifiableBasicList<T>{
11
     /**
12
     * This method add an element with a key name. It didn't clone the element.
13
     * 
14
     * @param value
15
     * @return 
16
     */
17
    public boolean add(T value);
18
    
19
    public void clear();
20
}
org.gvsig.tools/library/tags/org.gvsig.tools-3.0.284/org.gvsig.tools.lib/src/main/java/org/gvsig/tools/bookmarksandhistory/impl/BaseHistory.java
1
package org.gvsig.tools.bookmarksandhistory.impl;
2

  
3
import java.util.ArrayList;
4
import java.util.Collections;
5
import java.util.Iterator;
6
import java.util.List;
7
import org.gvsig.tools.bookmarksandhistory.History;
8
import org.slf4j.Logger;
9
import org.slf4j.LoggerFactory;
10

  
11
/**
12
 *
13
 * @author jjdelcerro
14
 * @param <T>
15
 */
16
public class BaseHistory<T>
17
        implements History<T> {
18
    
19
    private static final Logger LOG = LoggerFactory.getLogger(BaseHistory.class);
20

  
21
    protected int maxsize;
22
    protected List<T> history;
23

  
24
    public BaseHistory(int size) {
25
        this.maxsize = size;
26
        this.history = new ArrayList<>();
27
    }
28

  
29
    /**
30
     *
31
     * @param element
32
     * @return
33
     */
34
    @Override
35
    public boolean add(T element) {
... This diff was truncated because it exceeds the maximum size that can be displayed.

Also available in: Unified diff