fipaos.parser.datamapping.properties
Class PropertiesBinder


public class PropertiesBinder

Class to enable binding between the Java properties file format & objects

When converting property-keys into method names when populating objects,
the following scheme is used to determine the property name:


  1. All keys are capitalised such that: fipaos.home.test => Fipaos.Home.Test
  2. All "." characters are removed: Fipaos.Home.Test => FipaosHomeTest

The reverse scheme is applied to regenerate the property names when serialising


Method Summary
 Stringmarshall(Object object)
          Serialises the given Object
 Objectunmarshall(String doc, String filename)
          Converts a serialised object back into an Object

Method Detail

marshall

public String marshall(Object object)
throws fipaos.parser.ParserException
Serialises the given Object
Parameters:
object - - Object to be serialized.
Returns: String - Serialized String representation of the given object
Throws:
ParserException - Thrown if there is any problems serialising the object

unmarshall

public Object unmarshall(String doc, String filename)
throws fipaos.parser.ParserException
Converts a serialised object back into an Object
Parameters:
doc - Document containing the serialised object
Returns: The deserialised Object
Throws:
ParserException - Thrown if there is some problem deserialising the object

Association Links

to Class java.util.Map

Map between filenames and object instances

to Class java.util.List

Properties of this DataMapper implementation

to Class fipaos.parser.datamapping.properties.PropertiesBinder

Singleton instance of PropertiesBinder