class PreviewUIPersistenceProvider implements WorkspaceXMLPersistenceProvider {

    @Override
    public void writeXML(XMLStreamWriter writer, Workspace workspace) {
        PreviewUIModelImpl model = workspace.getLookup().lookup(PreviewUIModelImpl.class);
        if (model != null) {
            try {
                model.writeXML(writer);
            } catch (XMLStreamException ex) {
                throw new RuntimeException(ex);
            }
        }
    }

    @Override
    public void readXML(XMLStreamReader reader, Workspace workspace) {<FILL_FUNCTION_BODY>}

    @Override
    public String getIdentifier() {
        return "previewuimodel";
    }
}

        PreviewUIModelImpl model = workspace.getLookup().lookup(PreviewUIModelImpl.class);
        PreviewModel previewModel = workspace.getLookup().lookup(PreviewModel.class);
        if (previewModel == null) {
            PreviewController previewController = Lookup.getDefault().lookup(PreviewController.class);
            previewModel = previewController.getModel(workspace);
        }
        if (model == null) {
            model = new PreviewUIModelImpl(previewModel);
            workspace.add(model);
        }
        try {
            model.readXML(reader);
        } catch (XMLStreamException ex) {
            throw new RuntimeException(ex);
        }
    
<no_super_class>