Class EntityContainerExporter

java.lang.Object
com.dna.jopt.io.exporting.container.EntityContainerExporter
All Implemented Interfaces:
IEntityExporter, IJOptExporter<IEntityContainer>, Serializable

@Deprecated(since="7.6.0", forRemoval=false) public class EntityContainerExporter extends Object implements IEntityExporter
Deprecated.
The Java container format is replaced by the JSON snapshot. Write a snapshot with OptimizationJSONExporter ( export(IOptimization, OutputStream)) and read it with OptimizationJSONImporter.read(java.io.InputStream). This class still works as before; each call of an export method logs one warning.
Writes the Java container format: an IEntityContainer written with Java serialization, which EntityContainerImporter reads.
See Also:
  • Constructor Details

    • EntityContainerExporter

      public EntityContainerExporter()
      Deprecated.
  • Method Details

    • export

      @Deprecated(since="7.6.0", forRemoval=false) public boolean export(IEntityContainer enc, OutputStream fileOutputStream)
      Deprecated.
      The Java container format is replaced by the JSON snapshot: use OptimizationJSONExporter (export(IOptimization, OutputStream)) instead.
      Writes the container with Java serialization. Each call logs one warning that the Java container format is deprecated.
      Specified by:
      export in interface IEntityExporter
      Parameters:
      enc - the container
      fileOutputStream - the stream
      Returns:
      true if the container was written, false if writing failed
      Throws:
      IllegalStateException - if the container is null or does not pass validation
    • export

      @Deprecated(since="7.6.0", forRemoval=false) public boolean export(IEntityContainer enc, OutputStream fileOutputStream, com.dna.jopt.config.types.AbstractOptimizationConfig.AbstractOptimizationStatus.ResultKindTag tag)
      Deprecated.
      The Java container format is replaced by the JSON snapshot: use OptimizationJSONExporter (export(IOptimization, OutputStream, ResultKindTag)) instead.
      Writes the container with Java serialization; the tag is not used. Each call logs one warning that the Java container format is deprecated.
      Specified by:
      export in interface IEntityExporter
      Specified by:
      export in interface IJOptExporter<IEntityContainer>
      Parameters:
      enc - the container
      fileOutputStream - the stream
      tag - the tag, not used
      Returns:
      true if the container was written, false if writing failed
      Throws:
      IllegalStateException - if the container is null or does not pass validation
    • setTitle

      public void setTitle(String exportTitle)
      Deprecated.
      Description copied from interface: IEntityExporter
      Sets the input as the EntityKMLExporter.exportTitle.
      Specified by:
      setTitle in interface IEntityExporter
      Parameters:
      exportTitle - the export title