Package org.gephi.desktop.datalab

Examples of org.gephi.desktop.datalab.DataTablesModel


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

    public void writeXML(XMLStreamWriter writer, Workspace workspace) {
        AttributeModel attributeModel = workspace.getLookup().lookup(AttributeModel.class);
        DataTablesModel dataTablesModel = workspace.getLookup().lookup(DataTablesModel.class);
        if (dataTablesModel == null) {
            workspace.add(dataTablesModel = new DataTablesModel(attributeModel.getNodeTable(), attributeModel.getEdgeTable()));
        }
        try {
            writeDataTablesModel(writer, dataTablesModel);
        } catch (XMLStreamException ex) {
            throw new RuntimeException(ex);
View Full Code Here


    private void readDataTablesModel(XMLStreamReader reader, Workspace workspace) throws XMLStreamException {
        AttributeModel attributeModel = workspace.getLookup().lookup(AttributeModel.class);
        AttributeTable nodesTable = attributeModel.getNodeTable();
        AttributeTable edgesTable = attributeModel.getEdgeTable();
        DataTablesModel dataTablesModel = workspace.getLookup().lookup(DataTablesModel.class);
        if (dataTablesModel == null) {
            workspace.add(dataTablesModel = new DataTablesModel());
        }
        AvailableColumnsModel nodeColumns = dataTablesModel.getNodeAvailableColumnsModel();
        nodeColumns.removeAllColumns();
        AvailableColumnsModel edgeColumns = dataTablesModel.getEdgeAvailableColumnsModel();
        edgeColumns.removeAllColumns();

        boolean end = false;
        while (reader.hasNext() && !end) {
            Integer eventType = reader.next();
View Full Code Here

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

    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);
View Full Code Here

    private void readDataTablesModel(XMLStreamReader reader, Workspace workspace) throws XMLStreamException {
        AttributeModel attributeModel = workspace.getLookup().lookup(AttributeModel.class);
        AttributeTable nodesTable = attributeModel.getNodeTable();
        AttributeTable edgesTable = attributeModel.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();
View Full Code Here

TOP

Related Classes of org.gephi.desktop.datalab.DataTablesModel

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.