Source Code Cross Referenced for EditCommandFactory.java in  » GIS » udig-1.1 » net » refractions » udig » project » command » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » GIS » udig 1.1 » net.refractions.udig.project.command 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        /*
002:         * uDig - User Friendly Desktop Internet GIS client http://udig.refractions.net (C) 2004,
003:         * Refractions Research Inc. This library is free software; you can redistribute it and/or modify it
004:         * under the terms of the GNU Lesser General Public License as published by the Free Software
005:         * Foundation; version 2.1 of the License. This library is distributed in the hope that it will be
006:         * useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
007:         * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
008:         */
009:        package net.refractions.udig.project.command;
010:
011:        import java.net.URL;
012:
013:        import net.refractions.udig.catalog.IGeoResource;
014:        import net.refractions.udig.core.StaticBlockingProvider;
015:        import net.refractions.udig.project.ILayer;
016:        import net.refractions.udig.project.internal.Layer;
017:        import net.refractions.udig.project.internal.commands.DeleteLayerCommand;
018:        import net.refractions.udig.project.internal.commands.edit.CreateFeatureCommand;
019:        import net.refractions.udig.project.internal.commands.edit.CreateLayerCommand;
020:        import net.refractions.udig.project.internal.commands.edit.DeleteFeatureCommand;
021:        import net.refractions.udig.project.internal.commands.edit.ResetEditFeatureCommand;
022:        import net.refractions.udig.project.internal.commands.edit.RollbackCommand;
023:        import net.refractions.udig.project.internal.commands.edit.SetAttributeCommand;
024:        import net.refractions.udig.project.internal.commands.edit.SetEditFeatureCommand;
025:        import net.refractions.udig.project.internal.commands.edit.SetGeometryCommand;
026:        import net.refractions.udig.project.internal.commands.edit.WriteEditFeatureCommand;
027:        import net.refractions.udig.project.internal.commands.selection.CommitCommand;
028:
029:        import org.geotools.feature.Feature;
030:
031:        import com.vividsolutions.jts.geom.Coordinate;
032:        import com.vividsolutions.jts.geom.Geometry;
033:
034:        /**
035:         * Creates Edit commands which must be used to modify editable feature data. API internal classes
036:         * are in the returned API
037:         * 
038:         * @author jeichar
039:         * @deprecated
040:         * @since 0.3
041:         */
042:        public class EditCommandFactory {
043:            /**
044:             * Creates a new EditCommandFactory object
045:             * 
046:             * @return a new EditCommandFactory object
047:             */
048:            public static EditCommandFactory getInstance() {
049:                return instance;
050:            }
051:
052:            private static final EditCommandFactory instance = new EditCommandFactory();
053:
054:            protected EditCommandFactory() {
055:                // no op
056:            }
057:
058:            /**
059:             * Creates a {@linkplain SetAttributeCommand}object.
060:             * 
061:             * @param xpath xpath that identifies an attribute in the current editable Feature
062:             * @param value the value that the attribute will be set to.
063:             * @return a new {@linkplain SetAttributeCommand}object
064:             * @see EditCommand
065:             */
066:            public UndoableMapCommand createSetAttributeCommand(String xpath,
067:                    Object value) {
068:                return new SetAttributeCommand(xpath, value);
069:            }
070:
071:            /**
072:             * Creates a {@linkplain SetGeometryCommand}object.
073:             * 
074:             * @param xpath xpath that identifies an attribute in the current editable Feature
075:             * @param geom the geom (in <b>layer </b> CRS) that the geometry will be set to.
076:             * @return a new {@linkplain SetGeometryCommand}object
077:             * @see EditCommand
078:             * @see Geometry
079:             */
080:            public UndoableMapCommand createSetGeometryCommand(String xpath,
081:                    Geometry geom) {
082:                return new SetGeometryCommand(xpath, geom);
083:            }
084:
085:            /**
086:             * Creates a {@linkplain SetGeometryCommand}object that sets the default geometry.
087:             * 
088:             * @param geom the geom (in <b>layer </b> CRS) that the geometry will be set to.
089:             * @return a new {@linkplain SetGeometryCommand}object.
090:             * @see EditCommand
091:             * @see Geometry
092:             */
093:            public UndoableMapCommand createSetGeometryCommand(Geometry geom) {
094:                return new SetGeometryCommand(SetGeometryCommand.DEFAULT, geom);
095:            }
096:
097:            /**
098:             * Creates a {@linkplain SetEditFeatureCommand}object that sets the current editVictim victim.
099:             * 
100:             * @param feature the feature that will be the new editable Feature.
101:             * @param layer A victim Store that contains the editable Feature.
102:             * @return a new {@linkplain SetEditFeatureCommand}object.
103:             * @see Feature
104:             * @see Layer
105:             * @see UndoableMapCommand
106:             */
107:            public UndoableMapCommand createSetEditFeatureCommand(
108:                    Feature feature, ILayer layer) {
109:                return new SetEditFeatureCommand(feature, layer);
110:            }
111:
112:            /**
113:             * Create a Commit command
114:             * 
115:             * @return a new {@linkplain CommitCommand} object that deletes the feature.
116:             * @see CommitCommand
117:             */
118:            public MapCommand createCommitCommand() {
119:                return new CommitCommand();
120:            }
121:
122:            /**
123:             * Create a Commit command
124:             * 
125:             * @return a new {@linkplain RollbackCommand} object that deletes the feature.
126:             * @see RollbackCommand
127:             */
128:            public MapCommand createRollbackCommand() {
129:                return new RollbackCommand();
130:            }
131:
132:            /**
133:             * Creates a {@linkplain SetEditFeatureCommand}object that sets the current editable Feature.
134:             * 
135:             * @param feature the feature that will be the new editable Feature.
136:             * @return a new {@linkplain SetEditFeatureCommand}object.
137:             * @see UndoableMapCommand
138:             * @see Feature
139:             */
140:            public UndoableMapCommand createSetEditFeatureCommand(
141:                    Feature feature) {
142:                return new SetEditFeatureCommand(feature);
143:            }
144:
145:            /**
146:             * Creates a {@linkplain SetEditFeatureCommand}object that sets the current editable Feature
147:             * to null.
148:             * 
149:             * @return a new {@linkplain SetEditFeatureCommand}object that sets the current editable
150:             *         Feature to null..
151:             * @see UndoableMapCommand
152:             */
153:            public UndoableMapCommand createNullEditFeatureCommand() {
154:                return new SetEditFeatureCommand((Feature) null, (ILayer) null);
155:            }
156:
157:            /**
158:             * @param coordinates the coordinates of the new feature in <b>Map </b> CRS.
159:             * @return a new {@linkplain CreateFeatureCommand}object creates the feature.
160:             * @see CreateFeatureCommand
161:             */
162:            public UndoableMapCommand createFeature(Coordinate[] coordinates) {
163:                return new CreateFeatureCommand(coordinates);
164:            }
165:
166:            /**
167:             * Create a delete layer command
168:             * 
169:             * @param map the map containing the layer
170:             * @param layer the layer to delete
171:             * @return a new {@linkplain DeleteLayerCommand}object that deletes the layer.
172:             * @see DeleteLayerCommand
173:             */
174:            public UndoableMapCommand createDeleteLayer(Layer layer) {
175:                return new DeleteLayerCommand(layer);
176:            }
177:
178:            /**
179:             * Create a Delete Feature command
180:             * 
181:             * @param layer the layer containing the feature
182:             * @param feature the feature to delete
183:             * @return a new {@linkplain DeleteFeatureCommand}object that deletes the feature.
184:             * @see DeleteFeatureCommand
185:             */
186:            public UndoableMapCommand createDeleteFeature(Feature feature,
187:                    ILayer layer) {
188:                return new DeleteFeatureCommand(
189:                        new StaticBlockingProvider<Feature>(feature),
190:                        new StaticBlockingProvider<ILayer>(layer));
191:            }
192:
193:            /**
194:             * Create a {@linkplain WriteEditFeatureCommand} command
195:             * 
196:             * @return a new {@linkplain WriteEditFeatureCommand} object that deletes the feature.
197:             * @see WriteEditFeatureCommand
198:             */
199:            public UndoableMapCommand createWriteEditFeatureCommand() {
200:                return new WriteEditFeatureCommand();
201:            }
202:
203:            /**
204:             * Create a {@linkplain CreateLayerCommand}
205:             * 
206:             * @see CreateLayerCommand
207:             */
208:            public UndoableMapCommand createCreateLayerCommand(URL resourceId) {
209:                return new CreateLayerCommand(resourceId);
210:            }
211:
212:            /**
213:             * Create a {@linkplain CreateLayerCommand}
214:             * 
215:             * @see CreateLayerCommand
216:             */
217:            public UndoableMapCommand createCreateLayerCommand(
218:                    IGeoResource resource) {
219:                return new CreateLayerCommand(resource);
220:            }
221:
222:            /**
223:             * Create a {@linkplain ResetEditFeatureCommand} command
224:             * 
225:             * @return a new {@linkplain ResetEditFeatureCommand} object that deletes the feature.
226:             * @see ResetEditFeatureCommand
227:             */
228:            public UndoableMapCommand createResetEditFeatureCommand() {
229:                return new ResetEditFeatureCommand();
230:            }
231:
232:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.