org.opengis.test
Class FactoryFilter.ByAuthority

Show UML class diagram
Object
  extended by FactoryFilter.ByAuthority
All Implemented Interfaces:
FactoryFilter
Enclosing interface:
FactoryFilter

public static class FactoryFilter.ByAuthority
extends Object
implements FactoryFilter

Filters AuthorityFactory by their authority name. This filter accepts any factory meeting at least one of the following conditions:

The string comparisons are case-insensitive and ignore leading and trailing spaces.

Since:
3.1

Nested Class Summary
 
Nested classes/interfaces inherited from interface FactoryFilter
FactoryFilter.ByAuthority
 
Field Summary
static FactoryFilter EPSG
          Convenience constant for a frequently used factory filter.
 
Constructor Summary
FactoryFilter.ByAuthority(String... names)
          Creates a new filter for the given authority names.
 
Method Summary
<T extends Factory>
boolean
filter(Class<T> category, T factory)
          Returns true, unless the given factory is an instance of AuthorityFactory and the authority name is not the expected one.
 
Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

EPSG

public static final FactoryFilter EPSG
Convenience constant for a frequently used factory filter.

Constructor Detail

FactoryFilter.ByAuthority

public FactoryFilter.ByAuthority(String... names)
Creates a new filter for the given authority names.

Parameters:
names - The authority names (typically "EPSG").
Method Detail

filter

public <T extends Factory> boolean filter(Class<T> category,
                                          T factory)
Returns true, unless the given factory is an instance of AuthorityFactory and the authority name is not the expected one. See class-javadoc for more details.

Specified by:
filter in interface FactoryFilter
Type Parameters:
T - The compile-time type of the category argument.
Parameters:
category - The factory interface (NameFactory, CRSFactory, etc.).
factory - The factory instance.
Returns:
false if the given factory should be excluded from the tests, or true otherwise.


Copyright © 1994-2013 Open Geospatial Consortium. All Rights Reserved.