Source Code Cross Referenced for ReferencingFactory.java in  » GIS » GeoTools-2.4.1 » org » geotools » referencing » factory » 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.referencing.factory 
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.referencing.factory;
021:
022:        // J2SE dependencies
023:        import java.util.Collection;
024:        import java.util.Collections;
025:        import java.util.logging.Logger;
026:
027:        // OpenGIS dependencies
028:        import org.opengis.metadata.citation.Citation;
029:        import org.opengis.parameter.InvalidParameterValueException;
030:        import org.opengis.referencing.AuthorityFactory;
031:        import org.opengis.referencing.Factory;
032:        import org.opengis.referencing.ObjectFactory;
033:
034:        // Geotools dependencies
035:        import org.geotools.factory.AbstractFactory;
036:        import org.geotools.metadata.iso.citation.Citations;
037:        import org.geotools.metadata.iso.citation.CitationImpl;
038:        import org.geotools.util.logging.Logging;
039:        import org.geotools.resources.i18n.Errors;
040:        import org.geotools.resources.i18n.ErrorKeys;
041:        import org.geotools.resources.i18n.Vocabulary;
042:        import org.geotools.resources.i18n.VocabularyKeys;
043:
044:        /**
045:         * Base class for all factories in the referencing module.
046:         * Factories can be grouped in two categories:
047:         *
048:         * <ul>
049:         *   <li><p>{@linkplain AuthorityFactory Authority factories} creates objects from
050:         *       a compact string defined by an authority.
051:         *   <br><em>These classes are working as "builders": they hold the definition or recipie
052:         *       used to construct an objet.</em></p></li>
053:         *
054:         *   <li><p>{@linkplain ObjectFactory Object factories} allows applications
055:         *       to make objects that cannot be created by an authority factory.
056:         *       This factory is very flexible, whereas the authority factory is
057:         *       easier to use.
058:         *   <br><em>These classes are working as "Factories": they provide a series of
059:         *       {@code create} methods that can be used like a constructor.</em></p></li>
060:         * </ul>
061:         *
062:         * @since 2.1
063:         * @source $URL: http://svn.geotools.org/geotools/tags/2.4.1/modules/library/referencing/src/main/java/org/geotools/referencing/factory/ReferencingFactory.java $
064:         * @version $Id: ReferencingFactory.java 27862 2007-11-12 19:51:19Z desruisseaux $
065:         * @author Martin Desruisseaux
066:         */
067:        public class ReferencingFactory extends AbstractFactory implements 
068:                Factory {
069:            /**
070:             * The logger for event related to Geotools's factories.
071:             */
072:            public static final Logger LOGGER = Logging
073:                    .getLogger("org.geotools.referencing.factory");
074:
075:            /**
076:             * A citation which contains only the title "All" in localized language. Used
077:             * as a pseudoèauthority name for {@link AllAuthoritiesFactory}. Declared here
078:             * because processed specially by {@link IdentifiedObjectFinder}, since it is
079:             * not a valid authority name (not declared in {@link AllAuthoritiesFactory}
080:             * because we want to avoid this dependency in {@link IdentifiedObjectFinder}).
081:             */
082:            static final Citation ALL;
083:            static {
084:                final CitationImpl citation = new CitationImpl(Vocabulary
085:                        .format(VocabularyKeys.ALL));
086:                citation.freeze();
087:                ALL = citation;
088:            }
089:
090:            /**
091:             * Constructs a factory with the default priority.
092:             */
093:            protected ReferencingFactory() {
094:                super ();
095:            }
096:
097:            /**
098:             * Constructs a factory with the specified priority.
099:             *
100:             * @param priority The priority for this factory, as a number between
101:             *        {@link #MINIMUM_PRIORITY MINIMUM_PRIORITY} and
102:             *        {@link #MAXIMUM_PRIORITY MAXIMUM_PRIORITY} inclusive.
103:             */
104:            protected ReferencingFactory(final int priority) {
105:                super (priority);
106:            }
107:
108:            /**
109:             * Returns the vendor responsible for creating this factory implementation. Many implementations
110:             * may be available for the same factory interface. The default implementation returns
111:             * {@linkplain Citations#GEOTOOLS Geotools}.
112:             *
113:             * @return The vendor for this factory implementation.
114:             */
115:            public Citation getVendor() {
116:                return Citations.GEOTOOLS;
117:            }
118:
119:            /**
120:             * Makes sure that an argument is non-null. This is a
121:             * convenience method for subclass methods.
122:             *
123:             * @param  name   Argument name.
124:             * @param  object User argument.
125:             * @throws InvalidParameterValueException if {@code object} is null.
126:             */
127:            protected static void ensureNonNull(final String name,
128:                    final Object object) throws InvalidParameterValueException {
129:                if (object == null) {
130:                    throw new InvalidParameterValueException(Errors.format(
131:                            ErrorKeys.NULL_ARGUMENT_$1, name), name, object);
132:                }
133:            }
134:
135:            /**
136:             * Returns the direct {@linkplain Factory factory} dependencies, which may be {@code null}.
137:             * This method should not returns indirect dependencies. Elements should be instance of
138:             * {@link Factory} or {@link FactoryException} if a particular dependency can't be obtained.
139:             * <p>
140:             * The default implementation always returns an empty set.
141:             */
142:            Collection/*<?>*/dependencies() {
143:                return Collections.EMPTY_SET;
144:            }
145:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.