Search in sources :

Example 31 with NodeDraft

use of org.gephi.io.importer.api.NodeDraft in project gephi by gephi.

the class ImporterDOT method getOrCreateNode.

protected NodeDraft getOrCreateNode(String id) {
    if (!container.nodeExists(id)) {
        NodeDraft nodeDraft = container.factory().newNodeDraft(id);
        container.addNode(nodeDraft);
        return nodeDraft;
    }
    return container.getNode(id);
}
Also used : NodeDraft(org.gephi.io.importer.api.NodeDraft)

Aggregations

NodeDraft (org.gephi.io.importer.api.NodeDraft)31 EdgeDraft (org.gephi.io.importer.api.EdgeDraft)15 Issue (org.gephi.io.importer.api.Issue)14 IOException (java.io.IOException)5 StringTokenizer (java.util.StringTokenizer)5 Random (java.util.Random)4 SQLException (java.sql.SQLException)2 ColumnDraft (org.gephi.io.importer.api.ColumnDraft)2 ResultSet (java.sql.ResultSet)1 ResultSetMetaData (java.sql.ResultSetMetaData)1 Statement (java.sql.Statement)1 Matcher (java.util.regex.Matcher)1 Pattern (java.util.regex.Pattern)1 Edge (org.gephi.graph.api.Edge)1 Graph (org.gephi.graph.api.Graph)1 GraphController (org.gephi.graph.api.GraphController)1 GraphFactory (org.gephi.graph.api.GraphFactory)1 Node (org.gephi.graph.api.Node)1 ContainerUnloader (org.gephi.io.importer.api.ContainerUnloader)1 ElementDraft (org.gephi.io.importer.api.ElementDraft)1