Interface ProCAKEReader
- All Superinterfaces:
IO
- All Known Implementing Classes:
AbstractXMLReader
,AdaptationConfigReader
,DependencyReader
,ModelReader
,NESTGraphReader
,NESTSequentialWorkflowReader
,NESTWorkflowReader
,ObjectPoolReader
,ObjectReader
,PrologGraphReader
,SimilarityModelReader
,TrainingObjectPoolReader
,TransformationConfigReaderImpl
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 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 TypeMethodDescriptionread()
Reads the give filename or input source and returns the parsed object.void
setFilename
(String filename) Each reader must be able to read a file from a specified path.void
setInputStream
(InputStream inputStream) Each reader must be able to read from an input stream.
-
Field Details
-
LOG_ENTITY_NOT_FOUND
- See Also:
-
LOG_UNKNOWN_ATTRIBUTE_IN_TAG
- See Also:
-
-
Method Details
-
read
Reads the give filename or input source and returns the parsed object.- Returns:
- Returns the parsed object.
- Throws:
CAKEIOException
-
setFilename
Each reader must be able to read a file from a specified path.- Parameters:
filename
- The filename that should be read.
-
setInputStream
Each reader must be able to read from an input stream.- Parameters:
inputStream
- Thethat should be read
.
-