Source Code Cross Referenced for IGeoResourceInfo.java in  » GIS » udig-1.1 » net » refractions » udig » catalog » 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.catalog 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        /*
002:         *    uDig - User Friendly Desktop Internet GIS client
003:         *    http://udig.refractions.net
004:         *    (C) 2004, Refractions Research Inc.
005:         *
006:         *    This library is free software; you can redistribute it and/or
007:         *    modify it under the terms of the GNU Lesser General Public
008:         *    License as published by the Free Software Foundation;
009:         *    version 2.1 of the License.
010:         *
011:         *    This library is distributed in the hope that it will be useful,
012:         *    but WITHOUT ANY WARRANTY; without even the implied warranty of
013:         *    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
014:         *    Lesser General Public License for more details.
015:         *
016:         */
017:        package net.refractions.udig.catalog;
018:
019:        import java.net.URI;
020:
021:        import org.eclipse.jface.resource.ImageDescriptor;
022:        import org.geotools.geometry.jts.ReferencedEnvelope;
023:        import org.opengis.referencing.crs.CoordinateReferenceSystem;
024:
025:        import com.vividsolutions.jts.geom.Envelope;
026:
027:        /**
028:         * Represents a bean style metadata accessor for metadata about a geoResource.
029:         * <p>
030:         * The methods within this class must be non-blocking. This class, and sub-classes represent cached
031:         * versions of the metadata about a particular service.
032:         * </p>
033:         * <p>
034:         * Much of this interface is based on Dublin Core and the RDF application profile.
035:         * </p>
036:         * <p>
037:         * Any changes to this content will be communicate by an event by the assocaited GeoResource.
038:         * </p>
039:         * 
040:         * @author David Zwiers, Refractions Research
041:         * @since 0.6
042:         */
043:        public class IGeoResourceInfo {
044:
045:            protected String title, description, name;
046:            protected String[] keywords;
047:            protected URI schema;
048:            protected ImageDescriptor icon;
049:            protected ReferencedEnvelope bounds;
050:
051:            protected IGeoResourceInfo() {
052:                // for over-riding
053:            }
054:
055:            public IGeoResourceInfo(String title, String name,
056:                    String description, URI schema, Envelope bounds,
057:                    CoordinateReferenceSystem crs, String[] keywords,
058:                    ImageDescriptor icon) {
059:                this .title = title;
060:                this .description = description;
061:                this .name = name;
062:                int i = 0;
063:                if (keywords != null)
064:                    i = keywords.length;
065:                String[] k = new String[i];
066:                if (keywords != null)
067:                    System.arraycopy(keywords, 0, k, 0, k.length);
068:                this .keywords = k;
069:                this .schema = schema;
070:                this .icon = icon;
071:                this .bounds = new ReferencedEnvelope(bounds, crs);
072:            }
073:
074:            /**
075:             * Returns the resource's title
076:             * 
077:             * @return Readble title (in current local)
078:             */
079:            public String getTitle() {
080:                return title;
081:            }
082:
083:            /**
084:             * Returns the keywords assocaited with this resource
085:             * <p>
086:             * Known Mappings:
087:             * <ul>
088:             * <li> Maps to Dublin Core's Subject element
089:             * </ul>
090:             * </p>
091:             * 
092:             * @return Keywords for use with search, or <code>null</code> unavailable.
093:             */
094:            public String[] getKeywords() { // aka Subject
095:                int i = 0;
096:                if (keywords != null)
097:                    i = keywords.length;
098:                String[] k = new String[i];
099:                if (keywords != null)
100:                    System.arraycopy(keywords, 0, k, 0, k.length);
101:                return k;
102:            }
103:
104:            /**
105:             * Returns the resource's description.
106:             * <p>
107:             * Known Mappings:
108:             * <ul>
109:             * <li>WFS GetCapabilities description
110:             * <li>WMS GetCapabilities description
111:             * </ul>
112:             * </p>
113:             * 
114:             * @return description of resource, or <code>null</code> if unavailable
115:             */
116:            public String getDescription() {
117:                return description;
118:            }
119:
120:            /**
121:             * Returns the xml schema namespace for this resource type.
122:             * <p>
123:             * Known Mappings:
124:             * <ul>
125:             * <li>Dublin Code Format element
126:             * </ul>
127:             * </p>
128:             * 
129:             * @return namespace, used with getName() to identify resource
130:             */
131:            public URI getSchema() { // aka namespace
132:                return schema;
133:            }
134:
135:            /**
136:             * Returns the name of the data ... such as the typeName or LayerName.
137:             * <p>
138:             * Known Mappings:
139:             * <ul>
140:             * <li>WFS typeName
141:             * <li>Database table name
142:             * <li>WMS layer name
143:             * </ul>
144:             * </p>
145:             * 
146:             * @return name of the data, used with getSchema() to identify resource
147:             */
148:            public String getName() { // aka layer/type name
149:                return name;
150:            }
151:
152:            /**
153:             * Base symbology (with out decorators) representing this resource.
154:             * <p>
155:             * The ImageDescriptor returned should conform the the Eclipse User Interface Guidelines (16x16
156:             * image with a 16x15 glyph centered).
157:             * </p>
158:             * <p>
159:             * This plug-in provides default based on resource type:
160:             * 
161:             * <pre><code>
162:             *  &lt;b&gt;return&lt;/b&gt; ISharedImages.getImagesDescriptor( IGeoResoruce );
163:             * </code></pre>
164:             * 
165:             * <ul>
166:             * <p>
167:             * Any LabelProvider should use the default image, a label decorator should be used to pick up
168:             * these images in a separate thread. This allows resources like WMS to make blocking request of
169:             * an external service.
170:             * </p>
171:             * 
172:             * @return ImageDescriptor symbolizing this resource
173:             */
174:            public ImageDescriptor getIcon() {
175:                return icon;
176:            }
177:
178:            /**
179:             * Returns the BBox of the resource if one exists, The null envelope otherwise.
180:             * <p>
181:             * The bounds are returned in (ie should be reprojected to) Lat Long:
182:             * <ul>
183:             * <li>DefaultGeographicCRS.WGS84
184:             * <li>EPSG:4369 (LatLong NAD83)
185:             * <li>ESPG 4326 (another LatLong)
186:             * </ul>
187:             * </p>
188:             * <p>
189:             * Known Mappings:
190:             * <ul>
191:             * <li>1st part of the Dublin Core Coverage
192:             * </ul>
193:             * </p>
194:             * <p>
195:             * </p>
196:             * 
197:             * @return Lat Long bounding box of the resource
198:             */
199:            public ReferencedEnvelope getBounds() { // part of Coverage
200:                return bounds;
201:            }
202:
203:            /**
204:             * Returns the CRS of the resource if one exists, null otherwise.
205:             * <p>
206:             * Known Mappings:
207:             * <ul>
208:             * <li>2nd part of the Dublin Core Coverage
209:             * </ul>
210:             * </p>
211:             * 
212:             * @return CRS of the resource, or <code>null</code> if unknown.
213:             */
214:            public CoordinateReferenceSystem getCRS() { // part of Coverage
215:                return getBounds().getCoordinateReferenceSystem();
216:            }
217:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.