class DataObjectConverter {

    public PropertyWriter toElement(Node<View<DataObject>, ?> node) {
        final DataObject def = node.getContent().getDefinition();
        if (def != null) {
            DataObjectReference element = bpmn2.createDataObjectReference();
            element.setId(node.getUUID());

            DataObjectPropertyWriter writer = propertyWriterFactory.of(element);

            DataObject definition = node.getContent().getDefinition();
            writer.setName(StringUtils.replaceIllegalCharsAttribute(StringUtils.replaceIllegalCharsForDataObjects(definition.getName().getValue())));
            writer.setType(definition.getType().getValue().getType());
            writer.setAbsoluteBounds(node);
            return writer;
        }
        return ConverterUtils.notSupported(def);
    }

    public  DataObjectConverter(PropertyWriterFactory propertyWriterFactory);

}