public interface ContainerLoader
Container with graph and attributes data from
an importer.
Data pushed to a container are not directly appended to the main graph
structure and Processor are doing this job.
Use the draft factory for getting NodeDraft and
EdgeDraft instances.
Importer| Modifier and Type | Method and Description |
|---|---|
void |
addEdge(EdgeDraft edgeDraft)
Adds an edge to this container.
|
ColumnDraft |
addEdgeColumn(String key,
Class typeClass)
Adds a new edge column to this container.
|
ColumnDraft |
addEdgeColumn(String key,
Class typeClass,
boolean dynamic)
Adds a new dynamic edge column to this container.
|
void |
addNode(NodeDraft nodeDraft)
Adds a node to this container.
|
ColumnDraft |
addNodeColumn(String key,
Class typeClass)
Adds a new node column to this container.
|
ColumnDraft |
addNodeColumn(String key,
Class typeClass,
boolean dynamic)
Adds a new dynamic node column to this container.
|
boolean |
edgeExists(String id)
Returns
true if an edge exists with the given
id. |
boolean |
edgeExists(String source,
String target)
Returns
true if an edge exists from source to
target. |
ElementDraft.Factory |
factory()
Returns the factory for building nodes and edges instances.
|
EdgeDraft |
getEdge(String id)
Returns the edge with the given
id, or null if
not found. |
ColumnDraft |
getEdgeColumn(String key)
Returns the edge column draft with
key as identifier. |
NodeDraft |
getNode(String id)
Returns the node with the given
id, or create a new node
with this id if not found. |
ColumnDraft |
getNodeColumn(String key)
Returns the node column draft with
key as identifier. |
org.gephi.graph.api.TimeRepresentation |
getTimeRepresentation()
Gets the current time representation, either
TIMESTAMP or
INTERVAL. |
boolean |
nodeExists(String id)
Returns
true if a node exists with the given
id. |
void |
removeEdge(EdgeDraft edgeDraft)
Removes an edge from this container.
|
void |
setAllowAutoNode(boolean value) |
void |
setAllowParallelEdge(boolean value) |
void |
setAllowSelfLoop(boolean value) |
void |
setAutoScale(boolean autoscale) |
void |
setEdgeDefault(EdgeDirectionDefault edgeDefault)
Set edge default type: DIRECTED, UNDIRECTED or
MIXED.
|
void |
setEdgesMergeStrategy(EdgeMergeStrategy edgesMergeStrategy) |
void |
setElementIdType(ElementIdType type)
Sets the type of the id for elements.
|
void |
setFillLabelWithId(boolean value) |
void |
setInterval(String start,
String end)
Sets the interval for the entire graph.
|
void |
setTimeFormat(org.gephi.graph.api.TimeFormat timeFormat)
Sets the current Time Format for dynamic data, either
DATE,
DATETIME or DOUBLE. |
void |
setTimeRepresentation(org.gephi.graph.api.TimeRepresentation timeRepresentation)
Sets the current time representation, either
TIMESTAMP or
INTERVAL. |
void |
setTimestamp(String timestamp)
Sets the timestamp for the entire graph.
|
void |
setTimeZone(org.joda.time.DateTimeZone timeZone)
Sets the time zone that is used to parse date and time.
|
void addEdge(EdgeDraft edgeDraft)
edgeDraft.edgeDraft - edge that is to be pushed to this containervoid addNode(NodeDraft nodeDraft)
nodeDraft - node that is to be pushed to this containervoid removeEdge(EdgeDraft edgeDraft)
edgeDraft - edge that is to be removed from this containerNodeDraft getNode(String id)
id, or create a new node
with this id if not found.id - node identifierboolean nodeExists(String id)
true if a node exists with the given
id.id - node identifiertrue if node exists, false otherwiseEdgeDraft getEdge(String id)
id, or null if
not found.id - edge identifierid as an identifier, or null
if not foundboolean edgeExists(String id)
true if an edge exists with the given
id.id - an edge identifiertrue if edge exists, false otherwiseboolean edgeExists(String source, String target)
true if an edge exists from source to
target.source - edge source nodetarget - edge target nodetrue if edges exists, false otherwisevoid setEdgeDefault(EdgeDirectionDefault edgeDefault)
edgeDefault - edge default type valueColumnDraft getNodeColumn(String key)
key as identifier.key - node column keyColumnDraft getEdgeColumn(String key)
key as identifier.key - edge column keyColumnDraft addNodeColumn(String key, Class typeClass)
If a column with this key already exists, it is ignored and return the existing column.
key - node column identifiertypeClass - node column typeColumnDraft addEdgeColumn(String key, Class typeClass)
If a column with this key already exists, it is ignored and return the existing column.
key - edge column identifiertypeClass - edge column typeColumnDraft addNodeColumn(String key, Class typeClass, boolean dynamic)
Dynamic attributes have values over time.
If a column with this key already exists, it is ignored and return the existing column.
key - node column identifiertypeClass - node column typedynamic - true if the column needs to be dynamic, false otherwiseColumnDraft addEdgeColumn(String key, Class typeClass, boolean dynamic)
Dynamic attributes have values over time.
If a column with this key already exists, it is ignored and return the existing column.
key - edge column identifiertypeClass - edge column typedynamic - true if the column needs to be dynamic, false otherwiseElementDraft.Factory factory()
void setTimeFormat(org.gephi.graph.api.TimeFormat timeFormat)
DATE,
DATETIME or DOUBLE. It configures how the dates
are formatted.
The default value is DOUBLE.
timeFormat - time formatvoid setTimestamp(String timestamp)
timestamp - timestampvoid setInterval(String start, String end)
start - interval startend - interval endvoid setElementIdType(ElementIdType type)
type - id typevoid setTimeRepresentation(org.gephi.graph.api.TimeRepresentation timeRepresentation)
TIMESTAMP or
INTERVAL.
The default value is INTERVAL.
timeRepresentation - time representationorg.gephi.graph.api.TimeRepresentation getTimeRepresentation()
TIMESTAMP or
INTERVAL.
void setTimeZone(org.joda.time.DateTimeZone timeZone)
If not set, the local time zone is used.
timeZone - time zonevoid setAllowSelfLoop(boolean value)
void setAllowAutoNode(boolean value)
void setAllowParallelEdge(boolean value)
void setAutoScale(boolean autoscale)
void setFillLabelWithId(boolean value)
void setEdgesMergeStrategy(EdgeMergeStrategy edgesMergeStrategy)
Copyright © 2007–2017. All rights reserved.