Source Code Cross Referenced for OnLineResourceImpl.java in  » GIS » GeoTools-2.4.1 » org » geotools » metadata » iso » citation » 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 » GeoTools 2.4.1 » org.geotools.metadata.iso.citation 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        /*
002:         *    GeoTools - OpenSource mapping toolkit
003:         *    http://geotools.org
004:         *    (C) 2004-2006, GeoTools Project Managment Committee (PMC)
005:         *    (C) 2004, Institut de Recherche pour le Développement
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:         *    This package contains documentation from OpenGIS specifications.
018:         *    OpenGIS consortium's work is fully acknowledged here.
019:         */
020:        package org.geotools.metadata.iso.citation;
021:
022:        // J2SE direct dependencies
023:        import java.net.URI;
024:        import java.net.URISyntaxException;
025:
026:        // OpenGIS dependencies
027:        import org.opengis.metadata.citation.OnLineFunction;
028:        import org.opengis.metadata.citation.OnLineResource;
029:        import org.opengis.util.InternationalString;
030:
031:        // Geotools dependencies
032:        import org.geotools.metadata.iso.MetadataEntity;
033:
034:        /**
035:         * Information about on-line sources from which the dataset, specification, or
036:         * community profile name and extended metadata elements can be obtained.
037:         *
038:         * @since 2.1
039:         * @source $URL: http://svn.geotools.org/geotools/tags/2.4.1/modules/library/metadata/src/main/java/org/geotools/metadata/iso/citation/OnLineResourceImpl.java $
040:         * @version $Id: OnLineResourceImpl.java 27523 2007-10-17 09:14:21Z desruisseaux $
041:         * @author Martin Desruisseaux
042:         * @author Touraïvane
043:         */
044:        public class OnLineResourceImpl extends MetadataEntity implements 
045:                OnLineResource {
046:            /**
047:             * Serial number for interoperability with different versions.
048:             */
049:            private static final long serialVersionUID = 5412370008274334799L;
050:
051:            /**
052:             * The online resources for the <A HREF="http://www.opengeospatial.org">Open Geospatial Consortium</A>.
053:             * "Open Geospatial consortium" is the new name for "OpenGIS consortium".
054:             *
055:             * @see #OPEN_GIS
056:             */
057:            public static final OnLineResource OGC;
058:            static {
059:                final OnLineResourceImpl r;
060:                OGC = r = new OnLineResourceImpl(
061:                        "http://www.opengeospatial.org/");
062:                r.freeze();
063:            }
064:
065:            /**
066:             * The online resources for the <A HREF="http://www.opengis.org">OpenGIS consortium</A>.
067:             * "OpenGIS consortium" is the old name for "Open Geospatial consortium".
068:             *
069:             * @see #OGC
070:             */
071:            public static final OnLineResource OPEN_GIS;
072:            static {
073:                final OnLineResourceImpl r;
074:                OPEN_GIS = r = new OnLineResourceImpl("http://www.opengis.org");
075:                r.freeze();
076:            }
077:
078:            /**
079:             * The online resources for the
080:             * <A HREF="http://www.epsg.org">European Petroleum Survey Group</A>.
081:             */
082:            public static final OnLineResource EPSG;
083:            static {
084:                final OnLineResourceImpl r;
085:                EPSG = r = new OnLineResourceImpl("http://www.epsg.org");
086:                r.freeze();
087:            }
088:
089:            /**
090:             * The online resources for the
091:             * <A HREF="http://www.remotesensing.org/geotiff/geotiff.html">GeoTIFF</A> group.
092:             */
093:            public static final OnLineResource GEOTIFF;
094:            static {
095:                final OnLineResourceImpl r;
096:                GEOTIFF = r = new OnLineResourceImpl(
097:                        "http://www.remotesensing.org/geotiff");
098:                r.freeze();
099:            }
100:
101:            /**
102:             * The online resources for <A HREF="http://www.esri.com">ESRI</A>.
103:             */
104:            public static final OnLineResource ESRI;
105:            static {
106:                final OnLineResourceImpl r;
107:                ESRI = r = new OnLineResourceImpl("http://www.esri.com");
108:                r.freeze();
109:            }
110:
111:            /**
112:             * The online resources for <A HREF="http://www.oracle.com">Oracle</A>.
113:             */
114:            public static final OnLineResource ORACLE;
115:            static {
116:                final OnLineResourceImpl r;
117:                ORACLE = r = new OnLineResourceImpl("http://www.oracle.com");
118:                r.freeze();
119:            }
120:
121:            /**
122:             * The online resources for <A HREF="http://postgis.refractions.net">PostGIS</A>.
123:             *
124:             * @since 2.4
125:             */
126:            public static final OnLineResource POSTGIS;
127:            static {
128:                final OnLineResourceImpl r;
129:                POSTGIS = r = new OnLineResourceImpl(
130:                        "http://postgis.refractions.net");
131:                r.freeze();
132:            }
133:
134:            /**
135:             * The online resources for <A HREF="http://java.sun.com/">Sun Microsystems</A>.
136:             * This online resources point to the Java developper site.
137:             *
138:             * @since 2.2
139:             */
140:            public static final OnLineResource SUN_MICROSYSTEMS;
141:            static {
142:                final OnLineResourceImpl r;
143:                SUN_MICROSYSTEMS = r = new OnLineResourceImpl(
144:                        "http://java.sun.com");
145:                r.freeze();
146:            }
147:
148:            /**
149:             * The online resources for the <A HREF="http://www.geotools.org">Geotools</A> project.
150:             */
151:            public static final OnLineResource GEOTOOLS;
152:            static {
153:                final OnLineResourceImpl r;
154:                GEOTOOLS = r = new OnLineResourceImpl("http://www.geotools.org");
155:                r.freeze();
156:            }
157:
158:            /**
159:             * The download link for <A HREF="http://portal.opengis.org/files/?artifact_id=5316">Web Map
160:             * Service</A> specification. The download link may change in future Geotools versions in
161:             * order to point toward the latest specification.
162:             *
163:             * @since 2.2
164:             */
165:            public static final OnLineResource WMS;
166:            static {
167:                final OnLineResourceImpl r;
168:                WMS = r = new OnLineResourceImpl(
169:                        "http://portal.opengis.org/files/?artifact_id=5316");
170:                r.setFunction(OnLineFunction.DOWNLOAD);
171:                r.freeze();
172:            }
173:
174:            /**
175:             * Name of an application profile that can be used with the online resource.
176:             */
177:            private String applicationProfile;
178:
179:            /**
180:             * Detailed text description of what the online resource is/does.
181:             */
182:            private InternationalString description;
183:
184:            /**
185:             * Code for function performed by the online resource.
186:             */
187:            private OnLineFunction function;
188:
189:            /**
190:             * Location (address) for on-line access using a Uniform Resource Locator address or
191:             * similar addressing scheme such as http://www.statkart.no/isotc211.
192:             */
193:            private URI linkage;
194:
195:            /**
196:             * Name of the online resources.
197:             */
198:            private String name;
199:
200:            /**
201:             * Creates an initially empty on line resource.
202:             */
203:            public OnLineResourceImpl() {
204:            }
205:
206:            /**
207:             * Constructs a metadata entity initialized with the values from the specified metadata.
208:             *
209:             * @since 2.4
210:             */
211:            public OnLineResourceImpl(final OnLineResource source) {
212:                super (source);
213:            }
214:
215:            /**
216:             * Creates an on line resource initialized to the given URI.
217:             * This method is private for now since, if this constructor was public, some
218:             * users may expect a string argument to be for the description text instead.
219:             * Furthermore, a public method should not catch the {@link URISyntaxException}
220:             * and should not set a function.
221:             */
222:            private OnLineResourceImpl(final String linkage) {
223:                try {
224:                    setLinkage(new URI(linkage));
225:                } catch (URISyntaxException exception) {
226:                    // Should never happen. TODO: chain the exception in J2SE 1.5.
227:                    throw new IllegalArgumentException(/*exception*/);
228:                }
229:                setFunction(OnLineFunction.INFORMATION);
230:            }
231:
232:            /**
233:             * Creates an on line resource initialized to the given URI.
234:             */
235:            public OnLineResourceImpl(final URI linkage) {
236:                setLinkage(linkage);
237:            }
238:
239:            /**
240:             * Returns the name of an application profile that can be used with the online resource.
241:             * Returns {@code null} if none.
242:             */
243:            public String getApplicationProfile() {
244:                return applicationProfile;
245:            }
246:
247:            /**
248:             * Set the name of an application profile that can be used with the online resource.
249:             */
250:            public synchronized void setApplicationProfile(final String newValue) {
251:                checkWritePermission();
252:                applicationProfile = newValue;
253:            }
254:
255:            /**
256:             * Name of the online resource. Returns {@code null} if none.
257:             *
258:             * @since 2.4
259:             */
260:            public String getName() {
261:                return name;
262:            }
263:
264:            /**
265:             * Set the name of the online resource.
266:             *
267:             * @since 2.4
268:             */
269:            public synchronized void setName(final String newValue) {
270:                checkWritePermission();
271:                name = newValue;
272:            }
273:
274:            /**
275:             * Returns the detailed text description of what the online resource is/does.
276:             * Returns {@code null} if none.
277:             */
278:            public InternationalString getDescription() {
279:                return description;
280:            }
281:
282:            /**
283:             * Set the detailed text description of what the online resource is/does.
284:             */
285:            public synchronized void setDescription(
286:                    final InternationalString newValue) {
287:                checkWritePermission();
288:                description = newValue;
289:            }
290:
291:            /**
292:             * Returns the code for function performed by the online resource.
293:             * Returns {@code null} if unspecified.
294:             */
295:            public OnLineFunction getFunction() {
296:                return function;
297:            }
298:
299:            /**
300:             * Set the code for function performed by the online resource.
301:             */
302:            public synchronized void setFunction(final OnLineFunction newValue) {
303:                checkWritePermission();
304:                function = newValue;
305:            }
306:
307:            /**
308:             * Returns the location (address) for on-line access using a Uniform Resource Locator address or
309:             * similar addressing scheme such as http://www.statkart.no/isotc211.
310:             */
311:            public URI getLinkage() {
312:                return linkage;
313:            }
314:
315:            /**
316:             * Set the location (address) for on-line access using a Uniform Resource Locator address or
317:             * similar addressing scheme such as http://www.statkart.no/isotc211.
318:             */
319:            public synchronized void setLinkage(final URI newValue) {
320:                checkWritePermission();
321:                linkage = newValue;
322:            }
323:
324:            /**
325:             * Returns the connection protocol to be used.
326:             * Returns {@code null} if none.
327:             */
328:            public String getProtocol() {
329:                final URI linkage = this.linkage;
330:                return (linkage != null) ? linkage.getScheme() : null;
331:            }
332:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.