|
Gephi Toolkit Javadoc | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
public interface ContainerLoader
Interface for a loading a Container with graph and attributes data from an importers.
Data pushed to a container are not appended directly to the main data structure, Processor
are doing this job.
Use the draft factory for getting NodeDraft and EdgeDraft instances.
For pushing columns associated to nodes and edges, retrieve attribute model by
calling getAttributeModel().
//Add a URL column to nodes, must be done once only before importing nodes
AttributeColumn col = getAttributeModel().getNodeTable().addColumn("url", AttributeType.STRING);
//Write the URL value to a node draft
nodeDraft.addAttributeValue(col, "http://gephi.org");
Importer,
AttributeModel| Nested Class Summary | |
|---|---|
static interface |
ContainerLoader.DraftFactory
Node and edge draft factory. |
| Method Summary | |
|---|---|
void |
addEdge(EdgeDraft edgeDraft)
Adds an edge to the container. |
void |
addNode(NodeDraft nodeDraft)
Adds a node to the container. |
boolean |
edgeExists(NodeDraft source,
NodeDraft target)
Returns true if an edge exists from source to
target. |
boolean |
edgeExists(java.lang.String id)
Returns true if an edge exists with the given id. |
ContainerLoader.DraftFactory |
factory()
Returns the factory for building nodes and edges instances. |
AttributeModel |
getAttributeModel()
Returns the attribute model for this container. |
EdgeDraft |
getEdge(NodeDraft source,
NodeDraft target)
Returns the edge with the given source and target
or null if not found. |
EdgeDraft |
getEdge(java.lang.String id)
Returns the edge with the given id, or null if
not found. |
NodeDraft |
getNode(java.lang.String id)
Returns the node with the given id, or create a new node
with this id if not found. |
boolean |
nodeExists(java.lang.String id)
Returns true if a node exists with the given id. |
void |
removeEdge(EdgeDraft edgeDraft)
Removes an edge from the container. |
void |
setEdgeDefault(EdgeDefault edgeDefault)
Set edge default type: DIRECTED, UNDIRECTED or MIXED. |
void |
setTimeFormat(DynamicModel.TimeFormat timeFormat)
Sets the current Time Format for dynamic data, either DATE
of DOUBLE. |
void |
setTimeIntervalMax(java.lang.String max)
Sets the time value where the interval ends. |
void |
setTimeIntervalMin(java.lang.String min)
Sets the time value where the interval starts. |
| Method Detail |
|---|
void addEdge(EdgeDraft edgeDraft)
edgeDraft.
edgeDraft - the edge that is to be pushed to the containervoid addNode(NodeDraft nodeDraft)
nodeDraft - the node that is to be pushed to the containervoid removeEdge(EdgeDraft edgeDraft)
edgeDraft - the edge that is to be removed from the containerNodeDraft getNode(java.lang.String id)
id, or create a new node
with this id if not found.
id - a node identifier
boolean nodeExists(java.lang.String id)
true if a node exists with the given id.
id - a node identifier
true if node exists, false
otherwiseEdgeDraft getEdge(java.lang.String id)
id, or null if
not found.
id - an edge identifier
id as an identifier, or
null if not found
EdgeDraft getEdge(NodeDraft source,
NodeDraft target)
source and target
or null if not found.
source - the edge source nodetarget - the edge target node
source to
target or null if not foundboolean edgeExists(java.lang.String id)
true if an edge exists with the given id.
id - an edge identifier
true if edge exists, false
otherwise
boolean edgeExists(NodeDraft source,
NodeDraft target)
true if an edge exists from source to
target.
source - the edge source nodetarget - the edge target node
true if edges exists, false
otherwisevoid setEdgeDefault(EdgeDefault edgeDefault)
edgeDefault - the edge default type valueAttributeModel getAttributeModel()
ContainerLoader.DraftFactory factory()
void setTimeIntervalMin(java.lang.String min)
min - the lower time interval boundvoid setTimeIntervalMax(java.lang.String max)
max - the upper time interval boundvoid setTimeFormat(DynamicModel.TimeFormat timeFormat)
DATE
of DOUBLE. Says how the dates are formatted.
timeFormat - the current time format
|
Gephi Toolkit Javadoc | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||