|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface DataConversionService
A service for converting data to different formats. This service should
utilize the pool of AlgorithmFactory
services which have registered
with the OSGi service registry and specified in its service dictionary that
they are a converter. A converter will specify what data format it takes in
('in_data'), what it converts it to ('out_data'), and whether any information
will be lost in the conversion ('conversion'='lossless'|'lossy'). Using this
and other standard algorithm properties, a DataConversionService will try and
find the fastest, most efficient way to convert from one format to another.
Method Summary | |
---|---|
Data |
convert(Data data,
String outFormat)
Tries to convert a given Data object to the specified output format |
Converter[] |
findConverters(Data data,
String outFormat)
Tries to find all the converters that can be used to transform the given Data object to the specified output format |
Converter[] |
findConverters(String inFormat,
String outFormat)
Finds converters from one format to another if at all possible. |
Method Detail |
---|
Converter[] findConverters(String inFormat, String outFormat)
Converter
s, which may be a composite of multiple
algorithms, will take a Data
object of the specified
inFormat
and convert it to a Data object of type
outFormat
.
inFormat
- The type of Data object to be converted. This String
should be formatted in the same way as an algorithm's
AlgorithmProperty.IN_DATA
.outFormat
- The type of Data object that should be produced. This
String should be formatted in the same way as an
algorithm's AlgorithmProperty.OUT_DATA
.
Converter
s that can convert a Data object of
the given inFormat to the specified outFormatConverter[] findConverters(Data data, String outFormat)
data
- The Data object to convertoutFormat
- The output format to convert to
Converter
s that can convert the
given Data object to the specified output formatData convert(Data data, String outFormat) throws ConversionException
data
- The Data to convertoutFormat
- The format of the Data object to be returned
ConversionException
- If the data conversion fails while converting
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |