Subclasses will override the {@link #fromDomain(java.lang.Object) } and {@link #fromDomain(java.lang.Object) } methods to convert the value portion of a {@code RiakObject} to a domain object.
@author Brian RoachSee {@link Conversion} for more information.
@see com.sleepycat.persist.evolve Class Evolution @author Mark HayesEach implementation knows how to deal with a specific type (version) of a real feed.
Implementations must be thread safe.
TODO: explain how developers can plugin their own implementations.
@author Alejandro Abdelnur
If an exception occurs during processing, a {@link ConversionException} should be thrown.
If working with the high level {@link com.thoughtworks.xstream.XStream} facade, you can register new converters usingthe XStream.registerConverter() method.
If working with the lower level API, the {@link com.thoughtworks.xstream.converters.ConverterLookup} implementationis responsible for looking up the appropriate converter.
Converters for object that can store all information in a single value should implement {@link com.thoughtworks.xstream.converters.SingleValueConverter}. {@link com.thoughtworks.xstream.converters.basic.AbstractSingleValueConverter} provides a starting point.
{@link com.thoughtworks.xstream.converters.collections.AbstractCollectionConverter} provides a starting point forobjects that hold a collection of other objects (such as Lists and Maps).
@author Joe Walnes @see com.thoughtworks.xstream.XStream @see com.thoughtworks.xstream.converters.ConverterLookup @see com.thoughtworks.xstream.converters.basic.AbstractSingleValueConverter @see com.thoughtworks.xstream.converters.collections.AbstractCollectionConverterTypically {@link #convertToPresentation(Object,Class,Locale)} and{@link #convertToModel(Object,Class,Locale)} should be symmetric so thatchaining these together returns the original result for all input but this is not a requirement.
Converters must not have any side effects (never update UI from inside a converter).
All Converters must be stateless and thread safe.
If conversion of a value fails, a {@link ConversionException} is thrown.
@param < PRESENTATION> The presentation type. Must be compatible with what {@link #getPresentationType()} returns. @param < MODEL> The model type. Must be compatible with what {@link #getModelType()} returns. @author Vaadin Ltd. @since 7.0If on the other hand you need to programatically decide when and how you do video processing, or process only parts of files, or do transcoding live within a Java server without calling out to another process, then by all means use Xuggler and use this class as an example of how to do conversion. But please recognize you will likely need to implement code specific to your application. This class is no substitute for actually understanding the how to use the Xuggler API within your specific use-case
And if you haven't gotten the impression, please stop asking us to support ffmpeg
options like "-re" in this class. This class is only meant as a teaching-aide for the underlying Xuggler API.
Instead implement your own Java class based off of this that does real-time playback yourself. Really. Please. We'd appreciate it very much.
Now, all that said, here's how to create a main class that uses this Converter class:
public static void main(String[] args) { Converter converter = new Converter(); try { // first define options Options options = converter.defineOptions(); // And then parse them. CommandLine cmdLine = converter.parseOptions(options, args); // Finally, run the converter. converter.run(cmdLine); } catch (Exception exception) { System.err.printf("Error: %s\n", exception.getMessage()); } }
Pass "--help" to your main class as the argument to see the list of accepted options.
@author aclarkeBasic interface for all converters.
A CharstreamConverter operates on Character streams. You can use it to define Conversions between record or document formats.
It is possible to pipe multiple Converters using the setPreConverter and setPostConverter methods.Any {@link Converter} has to provide a {@link ConverterContext} object. Thisis used to access converter specific details or properties.
General purpose data type converter that can be registered and used within the BeanUtils package to manage the conversion of objects from one type to another.
Converter subclasses bundled with the BeanUtils library are required to be thread-safe, as users of the library may call conversion methods from more than one thread simultaneously.
Custom converter subclasses created by users of the library can be non-thread-safe if the application using them is single-threaded. However it is recommended that they be written in a thread-safe manner anyway.
@author Craig McClanahan @author Paulo Gaspar @version $Revision: 555824 $ $Date: 2007-07-13 01:27:15 +0100 (Fri, 13 Jul 2007) $ @since 1.3source
and destination
types.
This configuration and delegate class specifies the class and methods that convert a single datatype and also calls the print and parse methods of that class.
Created: Feb 26, 2004
Copyright: Copyright (c) 2004
Assumptions: none
Requires: nothing
Required by: nothing
Revision History:
Example:
Conventions:
Purpose: Conversion interface to allow conversion between object and data types. This can be used in any mapping to convert between the object and data types without requiring code placed in the object model. TopLink provides several common converters, but the application can also define it own. @see DirectToFieldMapping#setConverter(Converter) @see DirectCollectionMapping#setConverter(Converter) @see ObjectTypeConverter @see TypeConversionConverter @author James Sutherland @since OracleAS TopLink 10g (10.0.3)
For many Java classes (Date, Color, etc), an instance may be represented in a variety of string formats, hence both conversion methods take an optional format
parameter for specifying an unambiguous string format to use during conversion. A Converter class must document the format classes it supports and must also accept a null
value for the format
parameter, in which case a suitable and well-documented default should be used. Converters should support standard formats whenever possible.
Implementations of this interface are thread-safe and can be shared.
@author Keith DonaldImplementations may additionally implement {@link ConditionalConverter}. @author Keith Donald @since 3.0 @see ConditionalConverter @param < S> The source type @param < T> The target type
General purpose data type converter that can be registered and used within the SwingEngine package to manage the conversion of objects from one type to another.
@author Wolf Paulus @version $Revision: 1.2 $
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|