org.intuitel.merger
public class SerializerFactory extends Object
The SerializerFactory class defines a single (overloaded) method, which results in the creation of serializer objects.
Serializer is an abstract class that simply defines the interface for the actual serializer implementations. The SerializerFactory creates objects of the Serializer subclasses and return them shaped as Serializer
That means, developers should use this class in order to obtain Serializer objects. As a good practice, developers who extend the merger functionality by supporting more formats are encouraged to extend the SerializerFactory clas.
Serializer
Constructor and Description |
---|
SerializerFactory() |
Modifier and Type | Method and Description |
---|---|
static Serializer |
getSerializer()
Creates a SLOM Serializer object.
|
static Serializer |
getSerializer(String format)
Creates a Serializer object.
|
public static Serializer getSerializer() throws InvalidParameterException
As default configuration, the getSerializer method with no parameters returns a SLOMSerializer object. To obtain serializers from and to other formats, use Serializer getSerializer(String inputFormat)
InvalidParameterException
getSerializer(String inputFormat)
public static Serializer getSerializer(String format) throws InvalidParameterException
Creates and returns a Serializer object, whose working format can be specified as a parameter. Allowed formats are:
format
- The translation format that this Serializer will translateInvalidParameterException
getSerializer(String inputFormat)
Copyright © 2014. All rights reserved.