Interface IO
-
- All Known Subinterfaces:
ContentHandler,DependencyParser,Reader,Writer
- All Known Implementing Classes:
AdaptationConfigHandler,AdaptationConfigParser,DependencyHandler,DependencyParserImpl,DependencyWriterImpl,Deserializer,IOImpl,ModelHandler,ModelParserImpl,ModelWriterImpl,NESTAbstractWorkflowHandler,NESTGraphHandler,NESTGraphParser,NESTGraphWriterImpl,NESTSequentialWorkflowHandler,NESTSequentialWorkflowParser,NESTSequentialWorkflowWriterImpl,NESTWorkflowHandler,NESTWorkflowParser,NESTWorkflowWriterImpl,ObjectHandler,ObjectParser,ObjectPoolHandler,ObjectPoolParser,ObjectPoolWriterImpl,ObjectWriterImpl,PrologGraphParser,Serializer,SimilarityModelHandler,SimilarityModelParserImpl,SimilarityModelWriterImpl,StringReader,StringWriter,TrainingObjectPoolParser,TrainingPoolHandler,TrainingPoolWriter,TransformationConfigHandler,TransformationConfigReaderImpl,WorkflowGraphMLYWriterImpl,WorkflowHandler,WorkflowWriterImpl,XMLReaderImpl,XMLReadHandlerImpl,XMLWriterImpl
public interface IOThe IO interace summarises constants and methods for all io components.All io components can be created using the
IOFactory.newIO(String). The name of the io component must be either known or requested with one of the methodsIOFactory.getContentHandlerNamesFor(Class),IOFactory.getReaderNamesFor(Class), orIOFactory.getWriterNamesFor(Class).- Author:
- Rainer Maximini
- See Also:
IOFactory.newIO(String),Reader,Writer,ContentHandler
-
-
Field Summary
Fields Modifier and Type Field Description static StringCOMPONENTComponent: "cake.io" (LogComponentIdentifier.COMPONENT)static StringCOMPONENT_KEYComponent-Key: "00" (LogComponentIdentifier.COMPONENT_KEY_IO)static StringDEFAULT_ENCODINGstatic StringLOG_CONTENTHANDLER_NOT_FOUNDCould not locate a content-handler for the specified object.static StringLOG_FILE_NOT_FOUNDThe specified file was not found.static StringLOG_IO_EXCEPTIONUnexpected IO-Exception.static StringLOG_READER_NOT_FOUNDCould not locate a reader for the specified object.static StringLOG_SAX_EXCEPTIONUnexpected SAX-Parser-Exception.static StringLOG_UNKNOWN_PARAMETERUnknown parameter.static StringLOG_WRITER_NOT_FOUNDCould not locate a writer for the specified object.static StringLOG_WRONG_PARAMATER_TYPECan not handle object for the specified parameter.static StringRESOURCE_XMLThe location where all xml related files are stored, e.g.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description IOcopy()overwritten copy-method from Object; use it to copy a complete operatorStringgetDescription()A description of the io component.StringgetFamily()Returns the IO-family of this operatorStringgetName()Each io component must have a name that is used inIOFactory.newIO(String).booleanisHandlerFor(Class value)Checks if the io component is capable to perform the operation for objects of this class.voidsetFamily(String familyName)Sets the IO-family of this operator
-
-
-
Field Detail
-
COMPONENT
static final String COMPONENT
Component: "cake.io" (LogComponentIdentifier.COMPONENT)- See Also:
- Constant Field Values
-
COMPONENT_KEY
static final String COMPONENT_KEY
Component-Key: "00" (LogComponentIdentifier.COMPONENT_KEY_IO)- See Also:
- Constant Field Values
-
DEFAULT_ENCODING
static final String DEFAULT_ENCODING
-
LOG_IO_EXCEPTION
static final String LOG_IO_EXCEPTION
Unexpected IO-Exception.- Component:
COMPONENT - Key: "0002"
- this
- Exception
- See Also:
- Constant Field Values
- Component:
-
LOG_SAX_EXCEPTION
static final String LOG_SAX_EXCEPTION
Unexpected SAX-Parser-Exception.- Component:
COMPONENT - Key: "0003"
- this
- Exception
- See Also:
- Constant Field Values
- Component:
-
LOG_UNKNOWN_PARAMETER
static final String LOG_UNKNOWN_PARAMETER
Unknown parameter.- Component:
COMPONENT - Key: "0001"
- this
- Parameter
- See Also:
- Constant Field Values
- Component:
-
LOG_WRONG_PARAMATER_TYPE
static final String LOG_WRONG_PARAMATER_TYPE
Can not handle object for the specified parameter.- Component:
COMPONENT - Key: "0000"
- this
- Parameter
- Object
- See Also:
- Constant Field Values
- Component:
-
LOG_CONTENTHANDLER_NOT_FOUND
static final String LOG_CONTENTHANDLER_NOT_FOUND
Could not locate a content-handler for the specified object.- Component:
COMPONENT - Key: "0010"
- this
- Requested class/object.
- See Also:
- Constant Field Values
- Component:
-
LOG_READER_NOT_FOUND
static final String LOG_READER_NOT_FOUND
Could not locate a reader for the specified object.- Component:
COMPONENT - Key: "0011"
- this
- Requested class/object
- See Also:
- Constant Field Values
- Component:
-
LOG_WRITER_NOT_FOUND
static final String LOG_WRITER_NOT_FOUND
Could not locate a writer for the specified object.- Component:
COMPONENT - Key: "0012"
- this
- Requested class/object
- See Also:
- Constant Field Values
- Component:
-
LOG_FILE_NOT_FOUND
static final String LOG_FILE_NOT_FOUND
The specified file was not found.- Component:
COMPONENT - Key: "0013"
- this
- Requested class/object
- See Also:
- Constant Field Values
- Component:
-
RESOURCE_XML
static final String RESOURCE_XML
The location where all xml related files are stored, e.g. all grammars like XML Schema or DTD. The value is "/de/uni_trier/wi2/procake/schema/" .- See Also:
- Constant Field Values
-
-
Method Detail
-
getDescription
String getDescription()
A description of the io component. The description should contain the file format and the classes that can be managed.- Returns:
- a description of the io component
-
getName
String getName()
Each io component must have a name that is used inIOFactory.newIO(String). The name must be unique thus it is usefull to use a short description or to the class name (this.getClass().getName()).- Returns:
- Returns the name of the io component.
-
isHandlerFor
boolean isHandlerFor(Class value)
Checks if the io component is capable to perform the operation for objects of this class.A typical implementation looks like:
public boolean isHandlerFor(Class value) { if (DataObject.class.isAssignableFrom(value)) return true; return false; }- Parameters:
value- The class that has to be checked.- Returns:
- Results
trueif the class can oeprate with the given class.
-
getFamily
String getFamily()
Returns the IO-family of this operator- Returns:
-
setFamily
void setFamily(String familyName)
Sets the IO-family of this operator- Parameters:
familyName-
-
copy
IO copy()
overwritten copy-method from Object; use it to copy a complete operator- Returns:
-
-