class FieldConverter implements Converter {

    @Override
    public Object unmarshal(HierarchicalStreamReader reader, UnmarshallingContext context) {
        String id = reader.getAttribute(metadata.xmlFieldAttributeId);
        // The start value from XML is 1-indexed and needs to be adjusted for
        // the Field class which expects a zero-indexed start value.
        int start = Integer.valueOf(reader.getAttribute(metadata.xmlFieldAttributeStart)) - 1;
        int length = Integer.valueOf(reader.getAttribute(metadata.xmlFieldAttributeLength));
        boolean isComposite = metadata.xmlFieldValueCompositeType
                .equalsIgnoreCase(reader.getAttribute(metadata.xmlFieldAttributeType));
        boolean isInput = "true".equalsIgnoreCase(reader.getAttribute(metadata.xmlFieldAttributeInput));
        String alias = reader.getAttribute(metadata.xmlFieldAttributeAlias);
        boolean whitespace = "true".equalsIgnoreCase(reader.getAttribute(metadata.xmlFieldAttributeWhitespace));
        Field field = new Field(id, start, length, isComposite, isInput, alias, whitespace);
        log.debug("Created {}", field);
        return field;
    }

    public  FieldConverter(Metadata metadata);

}