Interface ProCAKEWriter
- All Superinterfaces:
IO
- All Known Implementing Classes:
AbstractXMLWriter
,DependencyWriter
,ModelWriter
,NESTGraphWriter
,NESTSequentialWorkflowWriter
,NESTWorkflowWriter
,ObjectPoolWriter
,ObjectWriter
,SimilarityModelWriter
,TrainingPoolWriter
,WorkflowGraphMLYWriter
,WorkflowWriter
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) writer.store(value); }
The ProCAKEWriter has to guarantee that store(Object)
is able to write the object for that
IO.isHandlerFor(Class)
is true
.
- Author:
- Rainer Maximini
-
Field Summary
Fields inherited from interface de.uni_trier.wi2.procake.utils.io.IO
DEFAULT_ENCODING, LOG_FILE_NOT_FOUND, LOG_IO_EXCEPTION, LOG_READER_NOT_FOUND, LOG_SAX_EXCEPTION, LOG_UNKNOWN_PARAMETER, LOG_WRONG_PARAMATER_TYPE, RESOURCE_XML
-
Method Summary
Modifier and TypeMethodDescriptionvoid
setFilename
(String filename) Each writer must be able to write a file to the local filesystem.void
setOutputStream
(OutputStream output) Each writer must be able to store the object into an OutputStream.void
The store command writes the given value.
-
Field Details
-
LOG_CANNOT_WRITE
- See Also:
-
-
Method Details
-
setFilename
Each writer must be able to write a file to the local filesystem. The filename should be an absolute path.- Parameters:
filename
- The filename into which the object should be stored.
-
setOutputStream
Each writer must be able to store the object into an OutputStream.- Parameters:
output
- TheOutputStream
into that the object should be stored.
-
store
The store command writes the given value.- Parameters:
value
- The object that should be stored- Throws:
CAKEIOException
-