001: /*
002: * GeoTools - OpenSource mapping toolkit
003: * http://geotools.org
004: * (C) 2005-2006, GeoTools Project Managment Committee (PMC)
005: * (C) 2005, Refractions Research Inc.
006: *
007: * This library is free software; you can redistribute it and/or
008: * modify it under the terms of the GNU Lesser General Public
009: * License as published by the Free Software Foundation;
010: * version 2.1 of the License.
011: *
012: * This library is distributed in the hope that it will be useful,
013: * but WITHOUT ANY WARRANTY; without even the implied warranty of
014: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
015: * Lesser General Public License for more details.
016: */
017: package org.geotools.catalog;
018:
019: import java.net.URI;
020: import javax.swing.Icon;
021: import com.vividsolutions.jts.geom.Envelope;
022: import org.opengis.referencing.crs.CoordinateReferenceSystem;
023:
024: /**
025: * Represents a bean style metadata accessor for metadata about a geoResource.
026: * <p>
027: * The methods within this class must be non-blocking. This class, and sub-classes represent cached
028: * versions of the metadata about a particular service.
029: * </p>
030: * <p>
031: * Much of this interface is based on Dublin Core and the RDF application profile.
032: * </p>
033: * <p>
034: * Any changes to this content will be communicate by an event by the assocaited GeoResource.
035: * </p>
036: *
037: * @author David Zwiers, Refractions Research
038: * @author Justin Deoliveira, The Open Planning Project
039: * @since 0.6
040: * @source $URL: http://svn.geotools.org/geotools/tags/2.4.1/modules/library/api/src/main/java/org/geotools/catalog/GeoResourceInfo.java $
041: */
042: public interface GeoResourceInfo {
043: /**
044: * Returns the resource's title
045: *
046: */
047: String getTitle();
048:
049: /**
050: * Returns the keywords assocaited with this resource
051: * <p>
052: * Known Mappings:
053: * <ul>
054: * <li> Maps to Dublin Core's Subject element
055: * </ul>
056: * </p>
057: *
058: * @return Keywords for use with search, or <code>null</code> unavailable.
059: */
060: String[] getKeywords();
061:
062: /**
063: * Returns the resource's description.
064: * <p>
065: * Known Mappings:
066: * <ul>
067: * <li>WFS GetCapabilities description
068: * <li>WMS GetCapabilities description
069: * </ul>
070: * </p>
071: *
072: * @return description of resource, or <code>null</code> if unavailable
073: */
074: String getDescription();
075:
076: /**
077: * Returns the xml schema namespace for this resource type.
078: * <p>
079: * Known Mappings:
080: * <ul>
081: * <li>Dublin Code Format element
082: * </ul>
083: * </p>
084: *
085: * @return namespace, used with getName() to identify resource
086: */
087: URI getSchema();
088:
089: /**
090: * Returns the name of the data ... such as the typeName or LayerName.
091: * <p>
092: * Known Mappings:
093: * <ul>
094: * <li>WFS typeName
095: * <li>Database table name
096: * <li>WMS layer name
097: * </ul>
098: * </p>
099: *
100: * @return name of the data, used with getSchema() to identify resource
101: */
102: String getName();
103:
104: /**
105: * Base symbology (with out decorators) representing this resource.
106: * <p>
107: * The Icon returned should conform the the Eclipse User Interface Guidelines (16x16
108: * image with a 16x15 glyph centered).
109: * </p>
110: * <p>
111: * This plug-in provides default based on resource type:
112: *
113: * <pre><code>
114: * <b>return</b> ISharedImages.getImagesDescriptor( IGeoResoruce );
115: * </code></pre>
116: *
117: * <ul>
118: * <p>
119: * Any LabelProvider should use the default image, a label decorator should be used to pick up
120: * these images in a separate thread. This allows resources like WMS to make blocking request of
121: * an external service.
122: * </p>
123: *
124: * @return Icon symbolizing this resource
125: */
126: Icon getIcon();
127:
128: /**
129: * Returns the BBox of the resource if one exists, The null envelope otherwise.
130: * <p>
131: * The bounds are returned in (ie should be reprojected to) Lat Long:
132: * <ul>
133: * <li>DefaultGeographicCRS.WGS84
134: * <li>EPSG:4369 (LatLong NAD83)
135: * <li>ESPG 4326 (another LatLong)
136: * </ul>
137: * </p>
138: * <p>
139: * Known Mappings:
140: * <ul>
141: * <li>1st part of the Dublin Core Coverage
142: * </ul>
143: * </p>
144: * <p>
145: * </p>
146: *
147: * @return Lat Long bounding box of the resource
148: */
149: Envelope getBounds();
150:
151: /**
152: * Returns the CRS of the resource if one exists, null otherwise.
153: * <p>
154: * Known Mappings:
155: * <ul>
156: * <li>2nd part of the Dublin Core Coverage
157: * </ul>
158: * </p>
159: *
160: * @return CRS of the resource, or <code>null</code> if unknown.
161: */
162: CoordinateReferenceSystem getCRS();
163: }
|