All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.backendless.persistence.BackendlessGeometryWriter Maven / Gradle / Ivy

The newest version!
package com.backendless.persistence;

import weborb.writer.IProtocolFormatter;
import weborb.writer.ITypeWriter;
import weborb.writer.MessageWriter;

import java.io.IOException;


public class BackendlessGeometryWriter implements ITypeWriter
{
  @Override
  public void write( Object o, IProtocolFormatter iProtocolFormatter ) throws IOException
  {
    Geometry geometry = (Geometry) o;
    GeometryDTO geometryDTO = new GeometryDTO(geometry.getClass().getName(), geometry.getSRS().getSRSId(), geometry.asGeoJSON());
    MessageWriter.writeObject(geometryDTO, iProtocolFormatter);
  }

  @Override
  public boolean isReferenceableType()
  {
    return false;
  }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy