Revision 25210

View differences:

branches/v2_0_0_prep/libraries/libFMap_dal/src/org/gvsig/fmap/dal/feature/impl/DefaultFeatureStoreTransforms.java
36 36
	public FeatureStoreTransform add(FeatureStoreTransform transform) throws DataException {
37 37
		checkEditingMode();
38 38
		if( ! transform.getFeatureTypes().contains(transform.getDefaultFeatureType())) {
39
			throw new IllegalArgumentException(); // FIXME: A?adir tipo especifico.
39
			throw new IllegalArgumentException(); // FIXME: Añadir tipo especifico.
40 40
		}
41 41
		this.transforms.add(transform);
42 42
		return transform;
branches/v2_0_0_prep/libraries/libFMap_dal/src/org/gvsig/fmap/dal/feature/FeatureStoreTransforms.java
4 4

  
5 5
import org.gvsig.fmap.dal.exception.DataException;
6 6

  
7
/**
8
 * This interface represents a container for store transforms.
9
 *
10
 * Provides access to transforms by index and by iterator, and also adding and removing 
11
 * transforms.
12
 *
13
 */
7 14
public interface FeatureStoreTransforms {
8 15

  
16
	/**
17
	 * Returns the FeatureStoreTransform given its index.
18
	 * 
19
	 * @param index
20
	 * 			a position in this FeatureStoreTransforms
21
	 * 
22
	 * @return
23
	 * 		the FeatureStoreTransform that is stored in the given index.
24
	 */
9 25
	public FeatureStoreTransform getTransform(int index);
10 26

  
27
	/**
28
	 * Adds a FeatureStoreTransform to this container.
29
	 * 
30
	 * @param transform
31
	 * 			the FeatureStoreTransform to add
32
	 * 
33
	 * @return
34
	 * 		the added FeatureStoreTransform
35
	 * 
36
	 * @throws DataException
37
	 */
11 38
	public FeatureStoreTransform add(FeatureStoreTransform transform)
12 39
			throws DataException;
13 40

  
41
	/**
42
	 * Returns the number of FeatureStoreTransforms stored in this container
43
	 * 
44
	 * @return
45
	 * 		number of FeatureStoreTransforms stored in this container
46
	 */
14 47
	public int size();
15 48

  
49
	/**
50
	 * Indicates whether this container is empty.
51
	 * 
52
	 * @return
53
	 * 		true if this container is empty, false if not
54
	 */
16 55
	public boolean isEmpty();
17 56

  
57
	/**
58
	 * Returns an iterator over this container elements.
59
	 * 
60
	 * @return
61
	 * 		an iterator over this container elements.
62
	 */
18 63
	public Iterator iterator();
19 64

  
65
	/**
66
	 * Empties this container.
67
	 * 
68
	 */
20 69
	public void clear();
21 70

  
71
	/**
72
	 * Removes the {@link FeatureStoreTransform} given its index.
73
	 * 
74
	 * @param index
75
	 * 			the position of the {@link FeatureStoreTransform} to remove.
76
	 * @return
77
	 * 		the removed object
78
	 */
22 79
	public Object remove(int index);
23 80

  
81
	/**
82
	 * Removes the given {@link FeatureStoreTransform}.
83
	 * 
84
	 * @param transform
85
	 * 				{@link FeatureStoreTransform} to remove
86
	 * @return
87
	 * 		true if the transform was successfully removed, false if not.
88
	 */
24 89
	public boolean remove(FeatureStoreTransform transform);
25 90
}
branches/v2_0_0_prep/libraries/libFMap_dal/src/org/gvsig/fmap/dal/feature/FeatureStoreTransform.java
33 33
import org.gvsig.tools.persistence.Persistent;
34 34

  
35 35
/**
36
 * A FeatureStoreTransform provides a mechanism for mapping a source 
37
 * FeatureType to a target FeatureType, allowing to build different views
38
 * (as in database view) over different feature types even from different 
39
 * stores.
40
 * 
36 41
 * @author jmvivo
37 42
 *
38 43
 */
39 44
public interface FeatureStoreTransform extends Persistent {
40 45

  
41

  
46
	/**
47
	 * Returns the default {@link FeatureType}.
48
	 * 
49
	 * @return
50
	 * 		default {@link FeatureType}
51
	 * 
52
	 * @throws DataException
53
	 */
42 54
	public FeatureType getDefaultFeatureType() throws DataException;
43 55

  
56
	/**
57
	 * Returns this FeatureStoreTransform's FeatureType(s)
58
	 * @return
59
	 * @throws DataException
60
	 */
44 61
	public List getFeatureTypes() throws DataException;
45 62

  
63
	/**
64
	 * Applies this transform between two features, copying the source data
65
	 * to the target feature.
66
	 * 
67
	 * @param source
68
	 * 			feature whose data will be used as source
69
	 * 
70
	 * @param target
71
	 * 			feature in which the source data will be copied
72
	 * 
73
	 * @throws DataException
74
	 */
46 75
	public void applyTransform(Feature source, EditableFeature target)
47 76
			throws DataException;
48 77

  

Also available in: Unified diff