class PreviewPersistenceProvider implements WorkspaceXMLPersistenceProvider {

    @Override
    public void writeXML(XMLStreamWriter writer, Workspace workspace) {
        PreviewModelImpl model = workspace.getLookup().lookup(PreviewModelImpl.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 "previewmodel";
    }
}

        PreviewModelImpl model =
            (PreviewModelImpl) Lookup.getDefault().lookup(PreviewController.class).getModel(workspace);
        try {
            model.readXML(reader);
        } catch (XMLStreamException ex) {
            throw new RuntimeException(ex);
        }
    
<no_super_class>