| |
|
| org.geotools.referencing.factory.ReferencingFactory org.geotools.referencing.factory.AbstractAuthorityFactory org.geotools.referencing.factory.AuthorityFactoryAdapter org.geotools.referencing.factory.ManyAuthoritiesFactory
All known Subclasses: org.geotools.referencing.factory.AllAuthoritiesFactory,
ManyAuthoritiesFactory | public class ManyAuthoritiesFactory extends AuthorityFactoryAdapter implements CRSAuthorityFactory,CSAuthorityFactory,DatumAuthorityFactory,CoordinateOperationAuthorityFactory(Code) | | An authority factory that delegates the object creation to an other factory determined from the
authority name in the code. This factory requires that every codes given to a
createFoo method are prefixed by the authority name, for example
"EPSG:4326" . This is different
from using a factory from a known authority, in which case the authority part was optional (for
example when using the
,
the
"EPSG:" part in
"EPSG:4326" is optional).
This class parses the authority name and delegates the work the corresponding factory. For
example if any
createFoo(...) method in this class is invoked with a code starting
by
"EPSG:" , then this class delegates the object creation to one of the authority
factories provided to the constructor.
This class is not registered in
ReferencingFactoryFinder , because it is not a real
authority factory. There is not a single authority name associated to this factory, but rather
a set of names determined from all available authority factories.
since: 2.4 version: $Id: ManyAuthoritiesFactory.java 29058 2008-02-03 17:47:07Z desruisseaux $ author: Martin Desruisseaux |
ManyAuthoritiesFactory | public ManyAuthoritiesFactory(Collection factories)(Code) | | Creates a new factory using the specified set of user factories. Any call to a
createFoo(code) method will scan the supplied factories in their iteration
order. The first factory implementing the appropriate interface and having the expected
will be used.
If the
factories collection contains more than one factory for the same authority
and interface, then all additional factories will be
, to be tried in iteration order only if the first acceptable factory failed to
create the requested object.
Parameters: factories - A set of user-specified factories to try before to delegateto GeometryFactoryFinder. |
ManyAuthoritiesFactory | public ManyAuthoritiesFactory(Hints userHints, Collection factories)(Code) | | Creates a new factory using the specified hints and a set of user factories.
Parameters: userHints - An optional set of hints, or null if none. Parameters: factories - A set of user-specified factories to try before to delegateto ReferencingFactoryFinder.ManyAuthoritiesFactory.ManyAuthoritiesFactory(Collection) |
dependencies | Collection dependencies()(Code) | | Returns the direct dependencies. Current implementation returns the internal structure
because we know that this package will not modifies it. But if the method become public,
we will need to returns a unmodifiable view.
|
fromFactoryRegistry | AuthorityFactory fromFactoryRegistry(String authority, Class type) throws FactoryRegistryException(Code) | | Returns a factory for the specified authority, or
null if none.
To be overriden by
AllAuthoritiesFactory in order to search among
factories registered on a system-wide basis.
Parameters: authority - The authority to query. Parameters: type - The interface to be implemented. The factory. throws: FactoryRegistryException - if there is no factory registered for the suppliedauthority and hints. |
getAuthority | public Citation getAuthority()(Code) | | Returns the organization or party responsible for definition and maintenance of the
database. The default implementation returns a citation with title "All".
|
getAuthorityCodes | public Set getAuthorityCodes(Class type) throws FactoryException(Code) | | Returns the set of authority codes of the given type.
Parameters: type - The spatial reference objects type (may be IdentifiedObject.class ). The set of authority codes for spatial reference objects of the given type.If this factory doesn't contains any object of the given type, then this methodreturns an . throws: FactoryException - if access to the underlying database failed. |
getAuthorityFactory | final AuthorityFactory getAuthorityFactory(Class type, String code) throws NoSuchAuthorityCodeException(Code) | | Searchs for a factory of the given type. This method first search in user-supplied
factories. If no user factory is found, then this method request for a factory using
ReferencingFactoryFinder . The authority name is inferred from the specified code.
Parameters: type - The interface to be implemented. Parameters: code - The code of the object to create. The factory. throws: NoSuchAuthorityCodeException - if no suitable factory were found. |
getAuthorityFactory | protected AuthorityFactory getAuthorityFactory(String code) throws NoSuchAuthorityCodeException(Code) | | Returns a generic object authority factory for the specified
"AUTHORITY:NUMBER" code.
Parameters: code - The code to parse. The authority factory. throws: NoSuchAuthorityCodeException - if no authority name has been found. |
getAuthorityNames | public Set getAuthorityNames()(Code) | | Returns the authority names of every factories given at construction time.
|
getBackingStoreDescription | public String getBackingStoreDescription() throws FactoryException(Code) | | Returns a description of the underlying backing store, or
null if unknow.
throws: FactoryException - if a failure occured while fetching the engine description. |
getCRSAuthorityFactory | protected CRSAuthorityFactory getCRSAuthorityFactory(String code) throws NoSuchAuthorityCodeException(Code) | | Returns the CRS authority factory for the specified
"AUTHORITY:NUMBER" code.
Parameters: code - The code to parse. The authority factory. throws: NoSuchAuthorityCodeException - if no authority name has been found. |
getCSAuthorityFactory | protected CSAuthorityFactory getCSAuthorityFactory(String code) throws NoSuchAuthorityCodeException(Code) | | Returns the CS authority factory for the specified
"AUTHORITY:NUMBER" code.
Parameters: code - The code to parse. The authority factory. throws: NoSuchAuthorityCodeException - if no authority name has been found. |
getCoordinateOperationAuthorityFactory | protected CoordinateOperationAuthorityFactory getCoordinateOperationAuthorityFactory(String code) throws NoSuchAuthorityCodeException(Code) | | Returns the operation authority factory for the specified
"AUTHORITY:NUMBER" code.
Parameters: code - The code to parse. The authority factory. throws: NoSuchAuthorityCodeException - if no authority name has been found. |
getDatumAuthorityFactory | protected DatumAuthorityFactory getDatumAuthorityFactory(String code) throws NoSuchAuthorityCodeException(Code) | | Returns the datum authority factory for the specified
"AUTHORITY:NUMBER" code.
Parameters: code - The code to parse. The authority factory. throws: NoSuchAuthorityCodeException - if no authority name has been found. |
getDescriptionText | public InternationalString getDescriptionText(String code) throws FactoryException(Code) | | Gets a description of the object corresponding to a code.
Parameters: code - Value allocated by authority. A description of the object, or null if the objectcorresponding to the specified code has no description. throws: NoSuchAuthorityCodeException - if the specified code was not found. throws: FactoryException - if the query failed for some other reason. |
getFactories | Collection getFactories()(Code) | | Returns the factories. This method should not be public since it returns directly the
internal instance. This method is to be overriden by
AllAuthoritiesFactory only.
|
getIdentifiedObjectFinder | public IdentifiedObjectFinder getIdentifiedObjectFinder(Class type) throws FactoryException(Code) | | Returns a finder which can be used for looking up unidentified objects.
The default implementation delegates the lookups to the underlying factories.
|
getSeparator | protected char getSeparator(String code)(Code) | | Returns the character separator for the specified code. The default implementation returns
the
':' , except
if the code looks like a URL (e.g.
"http://www.opengis.net/" ), in which case this
method returns
'/' .
In the current implementation, "looks like a URL" means that the first
non-
characters
are
"://" . But this heuristic rule may change in future implementations.
|
getVendor | public Citation getVendor()(Code) | | Returns the vendor responsible for creating this factory implementation.
The default implementation returns
.
|
sameAuthorityCodes | boolean sameAuthorityCodes(AuthorityFactory factory)(Code) | | If this factory is a wrapper for the specified factory that do not add any additional
, returns
true . This method is
for
FallbackAuthorityFactory internal use only.
|
setFactories | final void setFactories(Collection factories)(Code) | | Sets the factories. This method is invoked by the
AllAuthoritiesFactory subclass
only. No one else should invoke this method, since factories should be immutable.
|
Fields inherited from org.geotools.referencing.factory.AuthorityFactoryAdapter | final protected CRSAuthorityFactory crsFactory(Code)(Java Doc) final protected CSAuthorityFactory csFactory(Code)(Java Doc) final protected DatumAuthorityFactory datumFactory(Code)(Java Doc) final protected CoordinateOperationAuthorityFactory operationFactory(Code)(Java Doc)
|
|
|
|