|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
ObjectGridFormatFinder
public final class GridFormatFinder
Enable programs to find all available grid format implementations.
In order to be located by this finder datasources must provide an
implementation of the GridFormatFactorySpi
interface.
In addition to implementing this interface datasouces should have a services
file:META-INF/services/org.geotools.data.GridFormatFactorySpi
The file should contain a single line which gives the full name of the implementing class.
Example:org.geotools.data.mytype.MyTypeDataStoreFacotry
Method Summary | |
---|---|
static AbstractGridFormat |
findFormat(Object o)
Returns a Format that is able to read a certain object. |
static AbstractGridFormat |
findFormat(Object o,
Hints hints)
Returns a Format that is able to read a certain object. |
static Set<AbstractGridFormat> |
findFormats(Object o)
Returns all the Format s that can read the supplied Object
o. |
static Set<AbstractGridFormat> |
findFormats(Object o,
Hints hints)
Returns all the Format s that can read the supplied
Object o. |
static Set<GridFormatFactorySpi> |
getAvailableFormats()
Finds all avalaible implementations of GridFormatFactorySpi which
have registered using the services mechanism, and that have the
appropriate libraries on the classpath. |
static Format[] |
getFormatArray()
Returns an array with all available GridFormatFactorySpi
implementations. |
static void |
scanForPlugins()
Scans for factory plug-ins on the application class path. |
Methods inherited from class Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static Set<GridFormatFactorySpi> getAvailableFormats()
GridFormatFactorySpi
which
have registered using the services mechanism, and that have the
appropriate libraries on the classpath.
Set
of all discovered datastores which
have registered factories, and whose available method returns
true.public static void scanForPlugins()
public static Format[] getFormatArray()
GridFormatFactorySpi
implementations.
It can be used toget basic information about all the available
GridCoverage
plugins. Note that this method finds all the
implemented plugins but returns only the availaible one.
A plugin could be implemented but not availaible due to missing dependencies.
GridFormatFactorySpi
implementations.public static Set<AbstractGridFormat> findFormats(Object o)
Format
s that can read the supplied Object
o.
o
- is the object to search a Format
that is able to read
Set
comprising all the Format
that can read the Object
o.public static Set<AbstractGridFormat> findFormats(Object o, Hints hints)
Format
s that can read the supplied
Object
o.
o
- is the object to search a Format
that is able to readhints
- the Hints
to control the format search.
Set
comprising all the Format
that can read the Object
o.public static AbstractGridFormat findFormat(Object o)
Format
that is able to read a certain object. If no
Format
is able to read such an Object
we return an
UnknownFormat
object.
It is worth to point out that this method will try to convert each format
implementation to AbstractGridFormat
because the original
Format
interface did not allow for an accept method hence we had
to subclass the interface to add such method and we did so by the
AbstractGridFormat
abstract class.
o
- the object to check for acceptance.
AbstractGridFormat
that has stated to accept this
Object
o or null
in no plugins was able to
accept it.public static AbstractGridFormat findFormat(Object o, Hints hints)
Format
that is able to read a certain object. If no
Format
is able to read such an Object
we return an
UnknownFormat
object.
It is worth to point out that this method will try to convert each format
implementation to AbstractGridFormat
because the original
Format
interface did not allow for an accept method hence we had
to subclass the interface to add such method and we did so by the
AbstractGridFormat
abstract class.
o
- the object to check for acceptance.hints
- the Hints
to control the format search.
AbstractGridFormat
that has stated to accept this
Object
o or null
in no plugins was able to
accept it.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |