Interface ProCAKEReader

All Superinterfaces:
IO
All Known Implementing Classes:
AbstractXMLReader, AdaptationConfigReader, DependencyReader, ModelReader, NESTGraphReader, NESTSequentialWorkflowReader, NESTWorkflowReader, ObjectPoolReader, ObjectReader, PrologGraphReader, SimilarityModelReader, TrainingObjectPoolReader, TransformationConfigReaderImpl

public interface ProCAKEReader extends IO
The ProCAKEReader interface provides some common constants and methods for all io readers. The usage of a reader is quite simple:
 ProCAKEReader reader = (ProCAKEReader) IOFactory.newIO("..."); // change reader name
 reader.setFilename("..."); // or reader.setInputSource(is);
 Object model = reader.read();
 

The ProCAKEReader has to guarantee that the object that is returned by read() can be casted to the object for that IO.isHandlerFor(Class) is true.

Author:
Rainer Maximini
  • Field Details

  • Method Details

    • read

      Object read() throws CAKEIOException
      Reads the give filename or input source and returns the parsed object.
      Returns:
      Returns the parsed object.
      Throws:
      CAKEIOException
    • setFilename

      void setFilename(String filename)
      Each reader must be able to read a file from a specified path.
      Parameters:
      filename - The filename that should be read.
    • setInputStream

      void setInputStream(InputStream inputStream)
      Each reader must be able to read from an input stream.
      Parameters:
      inputStream - The that should be read.