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.internal;
010:
011: import java.io.IOException;
012:
013: import net.refractions.udig.project.IEditManager;
014:
015: import org.eclipse.emf.ecore.EObject;
016: import org.geotools.data.Transaction;
017: import org.geotools.feature.Feature;
018: import org.geotools.feature.IllegalAttributeException;
019:
020: /**
021: * TODO Purpose of net.refractions.udig.project.internal
022: * <p>
023: * </p>
024: *
025: * @author Jesse
026: * @since 1.0.0
027: * @model
028: */
029: public interface EditManager extends EObject, IEditManager {
030: /**
031: * <!-- begin-user-doc --> <!-- end-user-doc -->
032: * @generated
033: */
034: String copyright = "uDig - User Friendly Desktop Internet GIS client http://udig.refractions.net (C) 2004, Refractions Research Inc. This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; version 2.1 of the License. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details."; //$NON-NLS-1$
035:
036: /**
037: * returns the map this LayerManager is associated with
038: *
039: * @return the map this LayerManager is associated with
040: * @model opposite="editManagerInternal" many="false"
041: */
042: public Map getMapInternal();
043:
044: /**
045: * Sets the value of the '{@link net.refractions.udig.project.internal.EditManager#getMapInternal <em>Map Internal</em>}' container reference.
046: * <!-- begin-user-doc --> <!-- end-user-doc -->
047: * @param value the new value of the '<em>Map Internal</em>' container reference.
048: * @see #getMapInternal()
049: * @generated
050: */
051: void setMapInternal(Map value);
052:
053: /**
054: * Gets the Feature that that is currently being edited.
055: *
056: * @return the Feature that that is currently being edited.
057: * @model changeable="false" transient="true"
058: */
059: public Feature getEditFeature();
060:
061: /**
062: * Sets the value of the '{@link net.refractions.udig.project.internal.EditManager#getEditFeature <em>Edit Feature</em>}'
063: * attribute. The Layer indicates which Layer the feature is part of. If the layer is
064: * isEditLayerLocked() returns true then an exception will be thrown if the value of layer is
065: * not null or equal to the current editlayer.
066: *
067: * @param value the new value of the '<em>Edit Feature</em>' attribute.
068: * @param layer A layer that the feature is part of.
069: * @see #getEditFeature()
070: * @model
071: */
072: void setEditFeature(Feature value, Layer layer)
073: throws IllegalArgumentException;
074:
075: /**
076: * <!-- begin-user-doc --> <!-- end-user-doc -->
077: * @model
078: * @generated
079: */
080: void startTransaction();
081:
082: /**
083: * Commits the transaction if possible otherwise rollsback the transaction.
084: *
085: * @throws IOException throws IoException if there is a problem committing.
086: * @model
087: */
088: public void commitTransaction() throws IOException;
089:
090: /**
091: * Rollsback the current transaction.
092: *
093: * @throws IOException
094: * @model
095: */
096: public void rollbackTransaction() throws IOException;
097:
098: /**
099: * Returns a layer that contains the edit feature in its feature store.
100: *
101: * @return a layer that contains the edit feature in its feature store.
102: * @model changeable="false" transient="true" resolveProxies="false"
103: */
104: public Layer getEditLayerInternal();
105:
106: /**
107: * Returns the value of the '<em><b>Transaction Type</b></em>' attribute. <!--
108: * begin-user-doc -->
109: * <p>
110: * If the meaning of the '<em>Transaction Type</em>' attribute isn't clear, there really
111: * should be more of a description here...
112: * </p>
113: * <!-- end-user-doc -->
114: *
115: * @return the value of the '<em>Transaction Type</em>' attribute.
116: * @see net.refractions.udig.project.internal.ProjectPackage#getEditManager_TransactionType()
117: * @model transient="true" changeable="false" volatile="true"
118: * @generated
119: */
120: Class getTransactionType();
121:
122: /**
123: * Adds a feature to the layer and sets the current edit feature to be the newly added feature.
124: * The layer becomes the new Edit layer.
125: *
126: * @param feature the feature to be added.
127: * @throws IOException
128: * @throws IllegalAttributeException
129: * @throws IllegalAttributeException
130: */
131: public void addFeature(Feature feature, Layer layer)
132: throws IOException, IllegalAttributeException,
133: IllegalAttributeException;
134:
135: /**
136: * Reobtains the edit feature from the datastore to ensure that the currently stored feature
137: * matches the datastore's copy.
138: */
139: public void refreshEditFeature();
140:
141: /**
142: * Returns the currently selected Layer
143: *
144: * @return the currently selected Layer
145: * @model
146: */
147: public Layer getSelectedLayer();
148:
149: /**
150: * Sets the value of the '{@link net.refractions.udig.project.internal.EditManager#getSelectedLayer <em>Selected Layer</em>}' reference.
151: * <!-- begin-user-doc -->
152: * <!-- end-user-doc -->
153: * @param value the new value of the '<em>Selected Layer</em>' reference.
154: * @see #getSelectedLayer()
155: * @generated
156: */
157: void setSelectedLayer(Layer value);
158:
159: /**
160: * Sets the value of the '{@link net.refractions.udig.project.internal.EditManager#isEditLayerLocked <em>Edit Layer Locked</em>}' attribute.
161: * <!-- begin-user-doc --> <!-- end-user-doc -->
162: * @param value the new value of the '<em>Edit Layer Locked</em>' attribute.
163: * @see #isEditLayerLocked()
164: * @generated
165: */
166: void setEditLayerLocked(boolean value);
167:
168: /**
169: * Gets the Map's transaction object.
170: */
171: public Transaction getTransaction();
172:
173: }
|