001: /* uDig - User Friendly Desktop Internet GIS client
002: * http://udig.refractions.net
003: * (C) 2004, Refractions Research Inc.
004: *
005: * This library is free software; you can redistribute it and/or
006: * modify it under the terms of the GNU Lesser General Public
007: * License as published by the Free Software Foundation;
008: * version 2.1 of the License.
009: *
010: * This library is distributed in the hope that it will be useful,
011: * but WITHOUT ANY WARRANTY; without even the implied warranty of
012: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
013: * Lesser General Public License for more details.
014: */
015: package net.refractions.udig.project;
016:
017: import net.refractions.udig.project.interceptor.ShowViewInterceptor;
018: import net.refractions.udig.project.internal.impl.UDIGFeatureStore;
019: import net.refractions.udig.project.internal.render.RendererCreator;
020:
021: import org.geotools.data.DataStore;
022: import org.geotools.data.Query;
023:
024: /**
025: * Lists the keys of common items that are put on the Map blackboard and the Layer blackboard
026: *
027: * @author Jesse
028: * @since 1.1.0
029: */
030: public interface ProjectBlackboardConstants {
031:
032: /**
033: * Provides a way to influence the choice of renderers. The value of a blackboard entry must a string which is the
034: * id of the Renderer as declared in the Extension definition. For example "BasicFeatureRenderer".
035: * <p>If an entry is on the Map's blackboard with this key then that renderer will be preferred over other renderers unless
036: * there is also an entry on a layer. In that case the layer's renderer still has precidence.</p>
037: * <p><b>IMPORTANT:</b> don't forget to append the plugin ID to the id entered into the id field.</p>
038: * @see #LAYER__PREFERRED_RENDERER
039: * @see #MAP__LAST_RESORT_RENDERER
040: */
041: String MAP__PREFERRED_RENDERER = RendererCreator.PREFERRED_RENDERER_ID;
042:
043: /**
044: * Provides a way to influence the choice of renderers. The value of a blackboard entry must a string which is the
045: * id of the Renderer as declared in the Extension definition. For example "BasicFeatureRenderer".
046: * <p>If an entry is on the Map's blackboard with this key then that renderer will
047: * be negatively weighted compared to other renderers.<p>
048: * <p><b>IMPORTANT:</b> don't forget to append the plugin ID to the id entered into the id field.</p>
049: * @see #LAYER__LAST_RESORT_RENDERER
050: * @see #MAP__PREFERRED_RENDERER
051: */
052: String MAP__LAST_RESORT_RENDERER = RendererCreator.LAST_RESORT_RENDERER_ID;
053:
054: /**
055: * The key to the map's background color on the blackboard.
056: */
057: String MAP__BACKGROUND_COLOR = "mapBackgroundColor"; //$NON-NLS-1$
058: /**
059: * If a filter or a query is on the map blackboard under the key: the {@link #MAP__DATA_QUERY} then the
060: * interceptor {@link ShowViewInterceptor} will return the "view" see {@link DataStore#getView(Query)}.
061: * In addition Renderers should attempt to use the query to filter what is displayed.
062: * <p>If a filter is on the map blackboard then it will apply to all layers.</p>
063: * <p>If a query is on the Map blackboard then it will be applied only those layers who's typename is the same as that in the query.</p>
064: * <p>If there is a filter or query on both the Map blackboard and
065: * the layer blackboard then the item on the layer blackboard will take precedence.</p>
066: * @see #LAYER__DATA_QUERY
067: */
068: String MAP__DATA_QUERY = "DATA__QUERY"; //$NON-NLS-1$
069: /**
070: * Any filter in this entry will be used to filter out features from the rendering. For example if a fid filter is here that feature
071: * <b>WILL NOT</b> be rendered.
072: */
073: String MAP__RENDERING_FILTER = "EDIT_FILTER_CACHE"; //$NON-NLS-1$
074:
075: /**
076: * Provides a way to influence the choice of renderers. The value of a blackboard entry must a string which is the
077: * id of the Renderer as declared in the Extension definition. For example "BasicFeatureRenderer".
078: * <p>If an entry is on a Layer's blackboard with this key then that renderer will be preferred over other renderers.</p>
079: * <p><b>IMPORTANT:</b> don't forget to append the plugin ID to the id entered into the id field.</p>
080: * @see #MAP__PREFERRED_RENDERER
081: * @see #LAYER__LAST_RESORT_RENDERER
082: */
083: String LAYER__PREFERRED_RENDERER = RendererCreator.PREFERRED_RENDERER_ID;
084:
085: /**
086: * Provides a way to influence the choice of renderers. The value of a blackboard entry must a string which is the
087: * id of the Renderer as declared in the Extension definition. For example "BasicFeatureRenderer".
088: * <p>If an entry is on a Layer's blackboard with this key then that renderer will
089: * be negatively weighted compared to other renderers.<p>
090: * <p><b>IMPORTANT:</b> don't forget to append the plugin ID to the id entered into the id field.</p>
091: * @see #MAP__LAST_RESORT_RENDERER
092: * @see #LAYER__PREFERRED_RENDERER
093: */
094: String LAYER__LAST_RESORT_RENDERER = RendererCreator.LAST_RESORT_RENDERER_ID;
095: /**
096: * If a filter or a query is on a layer's blackboard under the key: the {@link #LAYER__DATA_QUERY} then the
097: * interceptor {@link ShowViewInterceptor} will return the "view" see {@link DataStore#getView(Query)}.
098: * In addition Renderers should attempt to use the query to filter what is displayed.
099: * <p>If a filter is in the layer blackboard then the filter will only apply to that layer. </p>
100: * <p>If a query is in the Layer blackboard then it will be applied to the layer only if the type name is correct</p>
101: * <p>If there is a filter or query on both the Map blackboard and
102: * the layer blackboard then the item on the layer blackboard will take precedence.</p>
103: * @see #MAP__DATA_QUERY
104: */
105: String LAYER__DATA_QUERY = "DATA__QUERY"; //$NON-NLS-1$
106:
107: /**
108: * Key to indicate a layer may be edited.
109: *
110: * @see UDIGFeatureStore
111: */
112: String LAYER__EDIT_APPLICABILITY = "net.refractions.udig.edit"; //$NON-NLS-1$
113: }
|