Statistics
| Revision:

root / branches / v2_0_0_prep / libraries / org.gvsig.annotation / org.gvsig.annotation.lib / org.gvsig.annotation.lib.api / src / main / java / org / gvsig / annotation / AnnotationCreationService.java @ 36679

History | View | Annotate | Download (4.65 KB)

1
/* gvSIG. Geographic Information System of the Valencian Government
2
 *
3
 * Copyright (C) 2007-2008 Infrastructures and Transports Department
4
 * of the Valencian Government (CIT)
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
 */
22

    
23
package org.gvsig.annotation;
24

    
25
import org.gvsig.annotation.calculator.AnnotationPositionCalculator;
26
import org.gvsig.fmap.dal.exception.DataException;
27
import org.gvsig.fmap.dal.feature.FeatureStore;
28
import org.gvsig.tools.task.MonitorableTask;
29

    
30
/**
31
 * <p>
32
 * This service is used to create an annotation layer.
33
 * </p>
34
 * <p>
35
 * It inherits if {@link MonitorableTask}, and it means that the annotation 
36
 * process can be monitorized by one or more observers that can listen
37
 * all the export events.
38
 * <p>
39
 * @author gvSIG team
40
 * @version $Id$
41
 */
42
public interface AnnotationCreationService extends MonitorableTask {
43

    
44
        /**
45
         * @return
46
         * the store that is used like input.
47
         */
48
        public FeatureStore getFeatureStore();
49
        
50
        /**
51
         * This method creates a {@link FeatureStore} with the annotations. 
52
         * @param destinationShapeFile 
53
         * path there the shape this the annotation information is created.
54
         * @param textValueAttributeIndex
55
         * attribute index of the original {@link FeatureStore} that contains the text.
56
         * @return
57
         * a new store with the annotation information.
58
         * @throws AnnotationCreationException
59
         * if there is an error creating the annotation store. 
60
         */
61
    public FeatureStore createAnnotationStore(String destinationShapeFile, int textValueAttributeIndex) throws AnnotationCreationException;
62
        
63
    /**
64
         * This method creates a {@link FeatureStore} with the annotations. 
65
         * @param destinationShapeFile 
66
         * path there the shape this the annotation information is created.
67
         * @param textValueAttributeName
68
         * attribute name of the original {@link FeatureStore} that contains the text.
69
         * @return
70
         * a new store with the annotation information.
71
         * @throws AnnotationCreationException
72
         * if there is an error creating the annotation store. 
73
         */
74
    public FeatureStore createAnnotationStore(String destinationShapeFile, String textValueAttributeName) throws AnnotationCreationException;   
75
    
76
    /**
77
     * Sets the {@link AnnotationCreationFinishAction} that is used at the end
78
     * of the annotation creation service. 
79
     * @param annotationCreationFinishAction
80
     * it contains an action that can be executed at the end of the annotation
81
     * creation process.
82
     */
83
    public void setAnnotationCreationFinishAction(AnnotationCreationFinishAction annotationCreationFinishAction);
84
    
85
    /**
86
     * @return
87
     * the {@link AnnotationCreationFinishAction} used at the end of the annotation
88
     * creation process.
89
     */
90
    public AnnotationCreationFinishAction getAnnotationCreationFinishAction();
91
    
92
    /**
93
     * Sets an {@link AnnotationPositionCalculator} used to calculate the
94
     * position of the 
95
     * @param annotationPositionCalculator
96
     */
97
    public void setAnnotationPositionCalculator(AnnotationPositionCalculator annotationPositionCalculator);
98
       
99
    public void setFontTypetAttribute(int index) throws DataException;
100
    
101
    public void setFontStyleAttribute(int index) throws DataException;
102
                            
103
    public void setFontColorAttribute(int index) throws DataException;
104
    
105
    public void setFontHeigthAttribute(int index) throws DataException;
106
    
107
    public void setFontRotationAttribute(int index) throws DataException;
108
    
109
    public void setFontTypetAttribute(String attributeName) throws DataException;
110
    
111
    public void setFontStyleAttribute(String attributeName) throws DataException;
112
                    
113
    public void setFontColorAttribute(String attributeName) throws DataException;
114
    
115
    public void setFontHeigthAttribute(String attributeName) throws DataException;
116
    
117
    public void setFontRotationAttribute(String attributeName) throws DataException;
118
    
119
    /**
120
     * Returns the {@link AnnotationManager}
121
     * 
122
     * @return {@link AnnotationManager}
123
     * @see {@link AnnotationManager}
124
     */
125
    public AnnotationManager getManager();
126
}