Interface ProCAKEWriter

All Superinterfaces:
All Known Implementing Classes:
AbstractXMLWriter, DependencyWriter, ModelWriter, NESTGraphWriter, NESTSequentialWorkflowWriter, NESTWorkflowWriter, ObjectPoolWriter, ObjectWriter, SimilarityModelWriter, TrainingPoolWriter, WorkflowGraphMLYWriter, WorkflowWriter

public interface ProCAKEWriter extends IO
The ProCAKEWriter interface provides some common constants and methods for all io writers. The usage of a writer is quite simple:
 public void writeMyObject(Object value) {
        ProCAKEWriter writer = (ProCAKEWriter) IOFactory.newIO(value.getClass());
        writer.setFilename("..."); // or use writer.setOutputStream(os);

The ProCAKEWriter has to guarantee that store(Object) is able to write the object for that IO.isHandlerFor(Class) is true.

Rainer Maximini
  • Field Details

  • Method Details

    • setFilename

      void setFilename(String filename)
      Each writer must be able to write a file to the local filesystem. The filename should be an absolute path.
      filename - The filename into which the object should be stored.
    • setOutputStream

      void setOutputStream(OutputStream output)
      Each writer must be able to store the object into an OutputStream.
      output - The OutputStream into that the object should be stored.
    • store

      void store(Object value) throws CAKEIOException
      The store command writes the given value.
      value - The object that should be stored