svn-gvsig-desktop / trunk / org.gvsig.desktop / org.gvsig.desktop.library / org.gvsig.annotation / org.gvsig.annotation.lib / org.gvsig.annotation.lib.api / src / main / java / org / gvsig / annotation / AnnotationCreationService.java @ 41254
History | View | Annotate | Download (4.7 KB)
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 3
|
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.annotation; |
25 |
|
26 |
import org.gvsig.annotation.calculator.AnnotationPositionCalculator; |
27 |
import org.gvsig.fmap.dal.exception.DataException; |
28 |
import org.gvsig.fmap.dal.feature.FeatureStore; |
29 |
import org.gvsig.tools.task.MonitorableTask; |
30 |
|
31 |
/**
|
32 |
* <p>
|
33 |
* This service is used to create an annotation layer.
|
34 |
* </p>
|
35 |
* <p>
|
36 |
* It inherits if {@link MonitorableTask}, and it means that the annotation
|
37 |
* process can be monitorized by one or more observers that can listen
|
38 |
* all the export events.
|
39 |
* <p>
|
40 |
* @author gvSIG team
|
41 |
* @version $Id$
|
42 |
*/
|
43 |
public interface AnnotationCreationService extends MonitorableTask { |
44 |
|
45 |
/**
|
46 |
* @return
|
47 |
* the store that is used like input.
|
48 |
*/
|
49 |
public FeatureStore getFeatureStore();
|
50 |
|
51 |
/**
|
52 |
* This method creates a {@link FeatureStore} with the annotations.
|
53 |
* @param destinationShapeFile
|
54 |
* path there the shape this the annotation information is created.
|
55 |
* @param textValueAttributeIndex
|
56 |
* attribute index of the original {@link FeatureStore} that contains the text.
|
57 |
* @return
|
58 |
* a new store with the annotation information.
|
59 |
* @throws AnnotationCreationException
|
60 |
* if there is an error creating the annotation store.
|
61 |
*/
|
62 |
public FeatureStore createAnnotationStore(String destinationShapeFile, int textValueAttributeIndex) throws AnnotationCreationException; |
63 |
|
64 |
/**
|
65 |
* This method creates a {@link FeatureStore} with the annotations.
|
66 |
* @param destinationShapeFile
|
67 |
* path there the shape this the annotation information is created.
|
68 |
* @param textValueAttributeName
|
69 |
* attribute name of the original {@link FeatureStore} that contains the text.
|
70 |
* @return
|
71 |
* a new store with the annotation information.
|
72 |
* @throws AnnotationCreationException
|
73 |
* if there is an error creating the annotation store.
|
74 |
*/
|
75 |
public FeatureStore createAnnotationStore(String destinationShapeFile, String textValueAttributeName) throws AnnotationCreationException; |
76 |
|
77 |
/**
|
78 |
* Sets the {@link AnnotationCreationFinishAction} that is used at the end
|
79 |
* of the annotation creation service.
|
80 |
* @param annotationCreationFinishAction
|
81 |
* it contains an action that can be executed at the end of the annotation
|
82 |
* creation process.
|
83 |
*/
|
84 |
public void setAnnotationCreationFinishAction(AnnotationCreationFinishAction annotationCreationFinishAction); |
85 |
|
86 |
/**
|
87 |
* @return
|
88 |
* the {@link AnnotationCreationFinishAction} used at the end of the annotation
|
89 |
* creation process.
|
90 |
*/
|
91 |
public AnnotationCreationFinishAction getAnnotationCreationFinishAction();
|
92 |
|
93 |
/**
|
94 |
* Sets an {@link AnnotationPositionCalculator} used to calculate the
|
95 |
* position of the
|
96 |
* @param annotationPositionCalculator
|
97 |
*/
|
98 |
public void setAnnotationPositionCalculator(AnnotationPositionCalculator annotationPositionCalculator); |
99 |
|
100 |
public void setFontTypeAttribute(int index) throws DataException; |
101 |
|
102 |
public void setFontStyleAttribute(int index) throws DataException; |
103 |
|
104 |
public void setFontColorAttribute(int index) throws DataException; |
105 |
|
106 |
public void setFontHeigthAttribute(int index) throws DataException; |
107 |
|
108 |
public void setFontRotationAttribute(int index) throws DataException; |
109 |
|
110 |
public void setFontTypeAttribute(String attributeName) throws DataException; |
111 |
|
112 |
public void setFontStyleAttribute(String attributeName) throws DataException; |
113 |
|
114 |
public void setFontColorAttribute(String attributeName) throws DataException; |
115 |
|
116 |
public void setFontHeigthAttribute(String attributeName) throws DataException; |
117 |
|
118 |
public void setFontRotationAttribute(String attributeName) throws DataException; |
119 |
|
120 |
/**
|
121 |
* Returns the {@link AnnotationManager}
|
122 |
*
|
123 |
* @return {@link AnnotationManager}
|
124 |
* @see {@link AnnotationManager}
|
125 |
*/
|
126 |
public AnnotationManager getManager();
|
127 |
} |