org.deegree.feature.persistence.sql.blob
Class BlobCodec

java.lang.Object
  extended by org.deegree.feature.persistence.sql.blob.BlobCodec

public class BlobCodec
extends Object

Provides methods for storing / retrieving GMLObject instances in binary form, e.g. in BLOBs. TODO improve namespace handling (should not be done for every single blob) TODO get FAST_INFOSET to work TODO FAST_INFOSET with external vocabulary

Version:
$Revision: 31641 $, $Date: 2011-08-24 21:24:55 +0200 (Wed, 24 Aug 2011) $
Author:
Markus Schneider, last edited by: $Author: mschneider $

Nested Class Summary
static class BlobCodec.Compression
           
 
Constructor Summary
BlobCodec(GMLVersion gmlVersion, BlobCodec.Compression compression)
          Creates a new BlobCodec instance.
 
Method Summary
 GMLObject decode(InputStream is, Map<String,String> nsContext, AppSchema schema, ICRS crs, GMLReferenceResolver idResolver)
          Decodes the given GMLObject from the specified input stream.
 void encode(GMLObject object, Map<String,String> nsContext, OutputStream os, ICRS crs)
          Encodes the given GMLObject to the specified output stream.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BlobCodec

public BlobCodec(GMLVersion gmlVersion,
                 BlobCodec.Compression compression)
Creates a new BlobCodec instance.

Parameters:
gmlVersion - gml version to use, must not be null
compression - compression method to use, must not be null
Method Detail

encode

public void encode(GMLObject object,
                   Map<String,String> nsContext,
                   OutputStream os,
                   ICRS crs)
            throws FeatureStoreException,
                   XMLStreamException,
                   FactoryConfigurationError,
                   UnknownCRSException,
                   TransformationException,
                   IOException
Encodes the given GMLObject to the specified output stream.

Parameters:
object - object to be encoded, must not be null
nsContext -
os - output stream to write to, must not be null
crs -
Throws:
FeatureStoreException
XMLStreamException
FactoryConfigurationError
UnknownCRSException
TransformationException
IOException

decode

public GMLObject decode(InputStream is,
                        Map<String,String> nsContext,
                        AppSchema schema,
                        ICRS crs,
                        GMLReferenceResolver idResolver)
                 throws XMLParsingException,
                        XMLStreamException,
                        UnknownCRSException,
                        FactoryConfigurationError,
                        IOException
Decodes the given GMLObject from the specified input stream.

Parameters:
is - input stream to read from, must not be null
nsContext -
schema - application schema, must not be null
crs -
idResolver -
Returns:
Throws:
XMLParsingException
XMLStreamException
UnknownCRSException
FactoryConfigurationError
IOException


Copyright © 2011. All Rights Reserved.