Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance. Project price only 1 $
You can buy this project and download/modify it how often you want.
/*
Copyright 2008-2010 Gephi
Authors : Eduardo Ramos
Website : http://www.gephi.org
This file is part of Gephi.
DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
Copyright 2011 Gephi Consortium. All rights reserved.
The contents of this file are subject to the terms of either the GNU
General Public License Version 3 only ("GPL") or the Common
Development and Distribution License("CDDL") (collectively, the
"License"). You may not use this file except in compliance with the
License. You can obtain a copy of the License at
http://gephi.org/about/legal/license-notice/
or /cddl-1.0.txt and /gpl-3.0.txt. See the License for the
specific language governing permissions and limitations under the
License. When distributing the software, include this License Header
Notice in each file and include the License files at
/cddl-1.0.txt and /gpl-3.0.txt. If applicable, add the following below the
License Header, with the fields enclosed by brackets [] replaced by
your own identifying information:
"Portions Copyrighted [year] [name of copyright owner]"
If you wish your version of this file to be governed by only the CDDL
or only the GPL Version 3, indicate your decision by adding
"[Contributor] elects to include this software in this distribution
under the [CDDL or GPL Version 3] license." If you do not indicate a
single choice of license, a recipient has the option to distribute
your version of this file under either the CDDL, the GPL Version 3 or
to extend the choice of license to its licensees as provided above.
However, if you add GPL Version 3 code and therefore, elected the GPL
Version 3 license, then the option applies only if the new code is
made subject to such option by the copyright holder.
Contributor(s):
Portions Copyrighted 2011 Gephi Consortium.
*/
package org.gephi.datalab.api;
import java.io.File;
import java.math.BigDecimal;
import java.nio.charset.Charset;
import java.util.List;
import java.util.Map;
import java.util.regex.Pattern;
import org.gephi.datalab.spi.rows.merge.AttributeRowsMergeStrategy;
import org.gephi.graph.api.Column;
import org.gephi.graph.api.Edge;
import org.gephi.graph.api.Element;
import org.gephi.graph.api.Graph;
import org.gephi.graph.api.Node;
import org.gephi.graph.api.Table;
import org.gephi.graph.api.TimeRepresentation;
/**
*
This interface defines part of the Data Laboratory API basic actions.
*
It contains methods for manipulating the attributes and properties of nodes and edges.
Sets a value to the given row,column pair (cell). If the class of the value is not the column type class,
* it will try to parse the toString representation of the value.
*
Takes care to avoid parsing exceptions of the target column type.
*
Also, this will not set a null value to a column that can't have null values (see canClearColumnData method) if the given object is null or the parsing fails.
* @param value Value to set, can be null
* @param row Row
* @param column Column
* @return True if the value was set, false otherwise
*/
boolean setAttributeValue(Object value, Element row, Column column);
/**
*
Adds a new column to the specified table with the given title and type of column.
*
The title for the new column can't be repeated in the table, null or an empty string.
.
*
The id of the column will be set to the same as the title,
* but if the first TimeInterval column of the table is created
* it will be given the default dynamic time interval id to be able to use dynamic filters.
*
The AttributeOrigin of the column will be set to DATA.
*
Default column value will be set to null.
* @param table Table to add the column
* @param title Title for the new column, can't be repeated in the table, null or empty string
* @param type Type for the new column
* @return The created column or null if the column could not be created
*/
Column addAttributeColumn(Table table, String title, Class type);
/**
*
Duplicates a given column of a table and copies al row values.
*
If the Class for the new column is different from the old column type, it will try to parse each value. If it is not possible, the value will be set to null.
*
The title for the new column can't be repeated in the table, null or an empty string.
.
*
The id of the column will be set to the title.
*
The AttributeOrigin of the column will be set to DATA.
*
Default column value will be set to null.
* @param table Table of the column to duplicate
* @param column Column to duplicate
* @param title Title for the new column
* @param type Class for the new column
* @return The created column or null if the column could not be created
*/
Column duplicateColumn(Table table, Column column, String title, Class type);
/**
*
Copies all row values of a column to another column.
*
If the Class for the target is different from the source column type, it will try to parse each value. If it is not possible, the value will be set to null.
Deletes the specified column from a table if the table has the column and data laboratory behaviour allows to delete it (see canDeleteColumn method).
* @param table Table to delete the column
* @param column Column to delete
*/
void deleteAttributeColumn(Table table, Column column);
/**
*
Converts and replaces a table column with a dynamic column preserving original column values.
*
This should be used only in columns where the canConvertColumnToDynamic returns true
*
For graphs with {@code INTERVAL} {@link TimeRepresentation}, the new values have a default interval that uses the {@code low} and {@code high} parameters.
*
For graphs with {@code TIMESTAMP} {@link TimeRepresentation}, the new values have a default timestamp that uses the {@code low} parameter, {@code high} parameter is ignored.
* @param table Table of the column
* @param column Column to convert and replace
* @param low Low bound for default interval or default timestamp
* @param high High bound for default interval or ignored for timestamps
* @return The new column
*/
Column convertAttributeColumnToDynamic(Table table, Column column, double low, double high);
/**
*
Converts a table column into a new dynamic column preserving original column values. The original column is kept intact
*
For graphs with {@code INTERVAL} {@link TimeRepresentation}, the new values have a default interval that uses the {@code low} and {@code high} parameters.
*
For graphs with {@code TIMESTAMP} {@link TimeRepresentation}, the new values have a default timestamp that uses the {@code low} parameter, {@code high} parameter is ignored.
* @param table Table of the column
* @param column Column to convert to dynamic
* @param low Low bound for default interval or default timestamp
* @param high High bound for default interval or ignored for timestamps
* @param newColumnTitle Title for the new dynamic column
* @return The new column
*/
Column convertAttributeColumnToNewDynamicColumn(Table table, Column column, double low, double high, String newColumnTitle);
/**
*
Fills the data values of a given column of a table with a value as a String,
* parsing it for the Class of the column. If it is not possible to parse,
* the value will be set to null.
* @param table Table of the column
* @param column Column to fill
* @param value String representation of the value for each row of the column
*/
void fillColumnWithValue(Table table, Column column, String value);
/**
*
Fills the data values of a given column of the indicated nodes with a value as a String,
* parsing it for the Class of the column. If it is not possible to parse,
* the value will be set to null.
* @param nodes Nodes to fill
* @param column Column to fill
* @param value String representation of the value for the column for each node
*/
void fillNodesColumnWithValue(Node[] nodes, Column column, String value);
/**
*
Fills the data values of a given column of the indicated edges with a value as a String,
* parsing it for the Class of the column. If it is not possible to parse,
* the value will be set to null.
* @param edges Edges to fill
* @param column Column to fill
* @param value String representation of the value for the column for each edge
*/
void fillEdgesColumnWithValue(Edge[] edges, Column column, String value);
/**
*
Clears all rows data for a given column of a table (nodes table or edges table)
* @param table Table to clear column data
* @param column Column to clear data
*/
void clearColumnData(Table table, Column column);
/**
*
Calculates the absolute frequency of appearance of each value of the given column and returns a Map containing each different value mapped to its frequency of appearance.
* @param table Table of the column
* @param column Column to calculate values frequencies
* @return Map containing each different value mapped to its frequency of appearance
*/
Map