org.geotools.data.coverage.grid.stream
Class StreamGridCoverageExchange

java.lang.Object
  extended byorg.geotools.data.coverage.grid.stream.StreamGridCoverageExchange
All Implemented Interfaces:
org.opengis.coverage.grid.GridCoverageExchange

public class StreamGridCoverageExchange
extends java.lang.Object
implements org.opengis.coverage.grid.GridCoverageExchange

A simple stateless GridCoverageExchange that will write/read to/from files and streams

Author:
jeichar, Simone Giannecchini (simboss)

Constructor Summary
StreamGridCoverageExchange()
           
 
Method Summary
 void dispose()
          This is a stateless GridCoverageExchange therefore nothing needs to be done
 org.opengis.coverage.grid.Format[] getFormats()
           
 org.opengis.coverage.grid.GridCoverageReader getReader(java.lang.Object arg0)
           
 org.opengis.coverage.grid.GridCoverageWriter getWriter(java.lang.Object destination, org.opengis.coverage.grid.Format format)
           
 boolean isAvailable()
           
 boolean isLegalDestination(java.lang.Object destination)
          Checks the source Object and ensures that it is legal for this type of GridCoverageExchange This method is basic and can easily be fooled at this point
 boolean isLegalSource(java.lang.Object source)
          Checks the source Object and ensures that it is legal for this type of GridCoverageExchange This method is basic and can easily be fooled at this point
 boolean setDataSource(java.lang.Object datasource)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

StreamGridCoverageExchange

public StreamGridCoverageExchange()
Method Detail

isLegalSource

public boolean isLegalSource(java.lang.Object source)
Checks the source Object and ensures that it is legal for this type of GridCoverageExchange This method is basic and can easily be fooled at this point

Parameters:
source - the source object to check
Returns:
true if source is an object understood by StreamGridCoverageExchange
See Also:
org.opengis.coverage.grid.GridCoverageExchange#getReader(java.lang.Object, org.opengis.coverage.grid.Format)

getWriter

public org.opengis.coverage.grid.GridCoverageWriter getWriter(java.lang.Object destination,
                                                              org.opengis.coverage.grid.Format format)
                                                       throws java.io.IOException
Specified by:
getWriter in interface org.opengis.coverage.grid.GridCoverageExchange
Throws:
java.io.IOException
See Also:
GridCoverageExchange.getWriter(java.lang.Object, org.opengis.coverage.grid.Format)

isLegalDestination

public boolean isLegalDestination(java.lang.Object destination)
Checks the source Object and ensures that it is legal for this type of GridCoverageExchange This method is basic and can easily be fooled at this point

Parameters:
destination - the source object to check
Returns:
true if destination is an object understood by StreamGridCoverageExchange
See Also:
org.opengis.coverage.grid.GridCoverageExchange#getReader(java.lang.Object, org.opengis.coverage.grid.Format)

getFormats

public org.opengis.coverage.grid.Format[] getFormats()
Specified by:
getFormats in interface org.opengis.coverage.grid.GridCoverageExchange
See Also:
GridCoverageExchange.getFormats()

getReader

public org.opengis.coverage.grid.GridCoverageReader getReader(java.lang.Object arg0)
                                                       throws java.io.IOException
Specified by:
getReader in interface org.opengis.coverage.grid.GridCoverageExchange
Throws:
java.io.IOException
See Also:
GridCoverageExchange.getReader(java.lang.Object)

dispose

public void dispose()
             throws java.io.IOException
This is a stateless GridCoverageExchange therefore nothing needs to be done

Specified by:
dispose in interface org.opengis.coverage.grid.GridCoverageExchange
Throws:
java.io.IOException
See Also:
GridCoverageExchange.dispose()

isAvailable

public boolean isAvailable()

setDataSource

public boolean setDataSource(java.lang.Object datasource)
See Also:
org.geotools.data.coverage.grid.GridCoverageExchange#accepts(java.net.URL)


Copyright © GeoTools. All Rights Reserved.