svn-gvsig-desktop / trunk / libraries / libFMap / src / com / iver / cit / gvsig / fmap / edition / ExpansionFile.java @ 3996
History | View | Annotate | Download (2.68 KB)
1 |
package com.iver.cit.gvsig.fmap.edition; |
---|---|
2 |
|
3 |
import com.iver.cit.gvsig.fmap.core.IRow; |
4 |
|
5 |
import java.io.IOException; |
6 |
|
7 |
import java.util.BitSet; |
8 |
import java.util.HashMap; |
9 |
|
10 |
|
11 |
/**
|
12 |
* Maneja el fichero de extensi?n en el que se almacenan las modificacionesy adici?nes
|
13 |
* durante la edici?n. Los ?ndices que devuelve esta clase en sus m?todos
|
14 |
* addRow y modifyRow son invariables, es decir, que si se invoca un
|
15 |
* m?todo addRow que retorna un 8, independientemente de las operaciones
|
16 |
* que se realicen posteriormente, una llamada a getRow(8) retornar?
|
17 |
* dicha fila. Si esta geometr?a es eliminada posteriormente, se retornar? un
|
18 |
* null. Esto ?ltimo se cumple mientras no se invoque el m?todo compact, mediante
|
19 |
* el que se reorganizan las geometr?as dejando en el fichero s?lo las que tienen
|
20 |
* validez en el momento de realizar la invocaci?n.
|
21 |
*/
|
22 |
public interface ExpansionFile { |
23 |
/**
|
24 |
* A?ade una geometria al final del fichero y retorna el ?ndice que ocupa
|
25 |
* esta geometria en el mismo
|
26 |
*
|
27 |
* @param row DOCUMENT ME!
|
28 |
*
|
29 |
* @return DOCUMENT ME!
|
30 |
*
|
31 |
* @throws IOException
|
32 |
*/
|
33 |
int addRow(IRow row) throws IOException; |
34 |
|
35 |
/**
|
36 |
* Modifica la index-?sima geometr?a del fichero devolviendo la posici?n en
|
37 |
* la que se pone la geometria modificada.
|
38 |
*
|
39 |
* @param index DOCUMENT ME!
|
40 |
* @param row DOCUMENT ME!
|
41 |
*
|
42 |
* @return DOCUMENT ME!
|
43 |
*
|
44 |
* @throws IOException
|
45 |
*/
|
46 |
int modifyRow(int index, IRow row) throws IOException; |
47 |
|
48 |
/**
|
49 |
* Obtiene la geometria que hay en el ?ndice 'index' o null si la geometr?a
|
50 |
* ha sido invalidada.
|
51 |
*
|
52 |
* @param index DOCUMENT ME!
|
53 |
*
|
54 |
* @return DOCUMENT ME!
|
55 |
*
|
56 |
* @throws IOException
|
57 |
*/
|
58 |
IRowEdited getRow(int index) throws IOException; |
59 |
|
60 |
/**
|
61 |
* Invalida una geometr?a, de cara a una futura compactaci?n del fichero
|
62 |
*
|
63 |
* @param index DOCUMENT ME!
|
64 |
*/
|
65 |
//void invalidateRow(int index);
|
66 |
|
67 |
/**
|
68 |
* Realiza una compactaci?n del fichero que maneja esta clase
|
69 |
*
|
70 |
* @param relations DOCUMENT ME!
|
71 |
*/
|
72 |
void compact(HashMap relations); |
73 |
|
74 |
/**
|
75 |
* Devuelve el n?mero de geometr?as del fichero.
|
76 |
*
|
77 |
* @return n?mero de geometr?as.
|
78 |
*/
|
79 |
//int getRowCount();
|
80 |
|
81 |
/**
|
82 |
* Mueve el puntero de escritura de manera que las siguientes escrituras
|
83 |
* machacar?n la ?ltima fila
|
84 |
*/
|
85 |
void deleteLastRow();
|
86 |
|
87 |
/**
|
88 |
* Abre el fichero de expansi?n para comenzar la edici?n
|
89 |
*
|
90 |
* @throws IOException Si se produce alg?n error al abrir
|
91 |
*/
|
92 |
void open() throws IOException; |
93 |
|
94 |
/**
|
95 |
* Cierra el fichero de expansi?n al terminar la edici?n
|
96 |
*
|
97 |
* @throws IOException Si se produce alg?n error
|
98 |
*/
|
99 |
void close() throws IOException; |
100 |
|
101 |
/**
|
102 |
* @param previousExpansionFileIndex
|
103 |
*/
|
104 |
//void validateRow(int previousExpansionFileIndex);
|
105 |
//BitSet getInvalidRows();
|
106 |
} |