001: /*
002: * GeoTools - OpenSource mapping toolkit
003: * http://geotools.org
004: * (C) 2002-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:
022: /**
023: * Provides metadata information about a service.
024: * <p>
025: * Information is provided in the form of a single, simple, Java bean.
026: * You can treat this bean as a "view" on more complete metadata information
027: * that may be accessable via a subclass (or other resolve target). This
028: * bean offers up service metadata information to the the GeoTools catalog
029: * implementations for searching.
030: * </p>
031: * <p>
032: * Much of the names and motivation have been taken from Dublin Code
033: * and it's application profile for RDF.
034: * </p>
035: *
036: * @author David Zwiers, Refractions Research
037: * @author Justin Deoliveira, The Open Planning Project
038: * @since 0.6
039: * @source $URL: http://svn.geotools.org/geotools/tags/2.4.1/modules/library/api/src/main/java/org/geotools/catalog/ServiceInfo.java $
040: */
041: public interface ServiceInfo {
042: /**
043: * Returns the service title, may be empty or null if unsupported.
044: * <p>
045: * Note this is always metadata, and is in user terms.
046: * </p>
047: *
048: * @return title, may be empty, null if unsupported.
049: */
050: String getTitle();
051:
052: /**
053: * Returns the service keywords. Maps to the Dublin Core Subject element.
054: *
055: */
056: String[] getKeywords();
057:
058: /**
059: * Returns the service description.
060: *
061: * This use is understood to be in agreement with "dublin-core",
062: * implementors may use either abstract or description as needed.
063: * <p>
064: * Dublin Core:
065: * <quote>
066: * A textual description of the content of the resource, including
067: * abstracts in the case of document-like objects or content
068: * descriptions in the case of visual resources.
069: * </quote>
070: *
071: * When providing actual dublin-core metadata you can gather up
072: * all the description information into a single string for
073: * searching.
074: *
075: * @return Description of visual contents
076: */
077: String getDescription();
078:
079: /**
080: * Return the service abstract.
081: *
082: * This use is understood to be in agreement with OGC Open Web Services,
083: * implementors may use either abstract or description as needed.
084: * <p>
085: * When working with an Open Web Service this method is a direct match,
086: * you may also choose it when providing actual dublin-core information
087: * if the description element is specifically an abstract.
088: * </p>
089: *
090: * @return text Abstract of document-like services
091: */
092: String getAbstract();
093:
094: /**
095: * Return the service publisher
096: *
097: */
098: URI getPublisher();
099:
100: /**
101: * Returns the xml schema namespace for this service type. Maps to the Dublin Code Format
102: * element
103: *
104: */
105: URI getSchema();
106:
107: /**
108: * Returns the service source. Maps to the Dublin Core Server Element
109: *
110: */
111: URI getSource();
112:
113: /**
114: * Base symbology (with out decorators) representing this IService.
115: * <p>
116: * The Icon returned should conform the the Eclipse User Interface Guidelines (16x16
117: * image with a 16x15 glyph centered).
118: * </p>
119: * <p>
120: * This plug-in provides default images based on service type:
121: *
122: * <pre><code>
123: * <b>return</b> ISharedImages.getImagesDescriptor( IService );
124: * </code></pre>
125: *
126: * <ul>
127: * <p>
128: * Any LabelProvider should use the default image, a label decorator should be used to pick up
129: * these images in a separate thread. This allows services like WFS make blocking request to
130: * pick up the image from their GetCapabilities.
131: * </p>
132: *
133: * @return Icon symbolizing this IService.
134: */
135: Icon getIcon();
136: }
|