class DataLaboratoryPersistenceProvider implements WorkspaceXMLPersistenceProvider {

    private static final String AVAILABLE_COLUMNS = "availablecolumns";
    private static final String NODE_COLUMN = "nodecolumn";
    private static final String EDGE_COLUMN = "edgecolumn";

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

    @Override
    public void readXML(XMLStreamReader reader, Workspace workspace) {
        try {
            readDataTablesModel(reader, workspace);
        } catch (XMLStreamException ex) {
            throw new RuntimeException(ex);
        }
    }

    @Override
    public String getIdentifier() {
        return AVAILABLE_COLUMNS;
    }

    private void writeDataTablesModel(XMLStreamWriter writer, DataTablesModel dataTablesModel)
        throws XMLStreamException {
        for (Column column : dataTablesModel.getNodeAvailableColumnsModel().getAvailableColumns()) {
            writer.writeStartElement(NODE_COLUMN);
            writer.writeAttribute("id", String.valueOf(column.getIndex()));
            writer.writeEndElement();
        }

        for (Column column : dataTablesModel.getEdgeAvailableColumnsModel().getAvailableColumns()) {
            writer.writeStartElement(EDGE_COLUMN);
            writer.writeAttribute("id", String.valueOf(column.getIndex()));
            writer.writeEndElement();
        }
    }

    private void readDataTablesModel(XMLStreamReader reader, Workspace workspace) throws XMLStreamException {<FILL_FUNCTION_BODY>}
}

        GraphModel graphModel = workspace.getLookup().lookup(GraphModel.class);
        Table nodesTable = graphModel.getNodeTable();
        Table edgesTable = graphModel.getEdgeTable();
        DataTablesModel dataTablesModel = workspace.getLookup().lookup(DataTablesModel.class);
        if (dataTablesModel == null) {
            workspace.add(dataTablesModel = new DataTablesModel(workspace));
        }
        AvailableColumnsModel nodeColumns = dataTablesModel.getNodeAvailableColumnsModel();
        nodeColumns.removeAllColumns();
        AvailableColumnsModel edgeColumns = dataTablesModel.getEdgeAvailableColumnsModel();
        edgeColumns.removeAllColumns();

        boolean end = false;
        while (reader.hasNext() && !end) {
            Integer eventType = reader.next();
            if (eventType.equals(XMLEvent.START_ELEMENT)) {
                String name = reader.getLocalName();
                if (NODE_COLUMN.equalsIgnoreCase(name)) {
                    Integer id = Integer.parseInt(reader.getAttributeValue(null, "id"));
                    Column column = nodesTable.getColumn(id);
                    if (column != null) {
                        nodeColumns.addAvailableColumn(column);
                    }
                } else if (EDGE_COLUMN.equalsIgnoreCase(name)) {
                    Integer id = Integer.parseInt(reader.getAttributeValue(null, "id"));
                    Column column = edgesTable.getColumn(id);
                    if (column != null) {
                        edgeColumns.addAvailableColumn(column);
                    }
                }
            } else if (eventType.equals(XMLStreamReader.END_ELEMENT)) {
                if (AVAILABLE_COLUMNS.equalsIgnoreCase(reader.getLocalName())) {
                    end = true;
                }
            }
        }
    
<no_super_class>