class DefinitionsConverter {

    public Definitions toDefinitions() {
        Definitions definitions = bpmn2.createDefinitions();
        DefinitionsPropertyWriter p = propertyWriterFactory.of(definitions);

        ProcessPropertyWriter pp = processConverter.convertProcess();
        Node<Definition<BPMNDiagram>, ?> node = converterFactory.context.firstNode();
        BPMNDiagram definition = node.getContent().getDefinition();
        BaseDiagramSet diagramSet = definition.getDiagramSet();

        p.setExporter("jBPM Process Modeler");
        p.setExporterVersion("2.0");
        p.setProcess(pp.getProcess());
        p.setDiagram(pp.getBpmnDiagram());
        p.setRelationship(pp.getRelationship());
        p.setWSDLImports(diagramSet.getImports().getValue().getWSDLImports());
        p.addAllRootElements(pp.getItemDefinitions());
        p.addAllRootElements(pp.getRootElements());
        p.addAllRootElements(pp.getInterfaces());
        return definitions;
    }

    public  DefinitionsConverter(ConverterFactory converterFactory, PropertyWriterFactory propertyWriterFactory);
    public  DefinitionsConverter(Graph graph);

}