org.n52.wps.io.datahandler.binary
Class GTBinZippedSHPGenerator

java.lang.Object
  extended by org.n52.wps.io.datahandler.xml.AbstractXMLGenerator
      extended by org.n52.wps.io.datahandler.binary.GTBinZippedSHPGenerator
All Implemented Interfaces:
IGenerator, IOHandler, IStreamableGenerator

public class GTBinZippedSHPGenerator
extends AbstractXMLGenerator
implements IStreamableGenerator

Generator to create a zipped shapefile by using GDMS drivers: GeotoolsFeatureCollectionDriver and ShapefileDriver

Author:
victorzinho

Field Summary
 
Fields inherited from class org.n52.wps.io.datahandler.xml.AbstractXMLGenerator
properties, supportedEncodings, supportedFormats, supportedSchemas
 
Fields inherited from interface org.n52.wps.io.IOHandler
DEFAULT_ENCODING, DEFAULT_MIMETYPE, ENCODING_BASE64, MIME_TYPE_ZIPPED_SHP
 
Constructor Summary
GTBinZippedSHPGenerator()
           
 
Method Summary
 java.io.OutputStream generate(IData coll)
           
 org.w3c.dom.Node generateXML(IData data, java.lang.String schema)
           
 java.lang.Class<?>[] getSupportedInternalInputDataType()
           
 java.lang.String[] getSupportedSchemas()
          Returns an array having the supported schemas.
 boolean isSupportedSchema(java.lang.String schema)
          Returns true if the given schema is supported, else false.
 void writeToStream(IData data, java.io.OutputStream os)
           
 
Methods inherited from class org.n52.wps.io.datahandler.xml.AbstractXMLGenerator
getSupportedEncodings, getSupportedFormats, isSupportedEncoding, isSupportedFormat
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GTBinZippedSHPGenerator

public GTBinZippedSHPGenerator()
Method Detail

generateXML

public org.w3c.dom.Node generateXML(IData data,
                                    java.lang.String schema)
                             throws java.lang.IllegalArgumentException,
                                    java.lang.RuntimeException
Specified by:
generateXML in class AbstractXMLGenerator
Throws:
java.lang.IllegalArgumentException - If the data paramater is not a GTVectorDataBinding
java.lang.RuntimeException
See Also:
AbstractXMLGenerator.generateXML(org.n52.wps.io.data.IData, java.lang.String)

writeToStream

public void writeToStream(IData data,
                          java.io.OutputStream os)
                   throws java.lang.IllegalArgumentException,
                          java.lang.RuntimeException
Specified by:
writeToStream in interface IStreamableGenerator
Throws:
java.lang.IllegalArgumentException - If the data parameter is not a GTVectorDataBinding
java.lang.RuntimeException - If an error occurs while copying the underlying file into the given OutputStream
See Also:
IStreamableGenerator.writeToStream(org.n52.wps.io.data.IData, java.io.OutputStream)

generate

public java.io.OutputStream generate(IData coll)
Specified by:
generate in interface IGenerator

getSupportedInternalInputDataType

public java.lang.Class<?>[] getSupportedInternalInputDataType()
Specified by:
getSupportedInternalInputDataType in interface IGenerator

getSupportedSchemas

public java.lang.String[] getSupportedSchemas()
Description copied from class: AbstractXMLGenerator
Returns an array having the supported schemas.

Specified by:
getSupportedSchemas in interface IOHandler
Overrides:
getSupportedSchemas in class AbstractXMLGenerator

isSupportedSchema

public boolean isSupportedSchema(java.lang.String schema)
Description copied from class: AbstractXMLGenerator
Returns true if the given schema is supported, else false.

Specified by:
isSupportedSchema in interface IOHandler
Overrides:
isSupportedSchema in class AbstractXMLGenerator


Copyright © 2007-2011 52north.org. All Rights Reserved.