|
Gephi Toolkit Javadoc | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.gephi.io.importer.impl.ImportContainerImpl
public class ImportContainerImpl
Nested Class Summary | |
---|---|
class |
ImportContainerImpl.FactoryImpl
Factory for draft objects |
Nested classes/interfaces inherited from interface org.gephi.io.importer.api.ContainerLoader |
---|
ContainerLoader.DraftFactory |
Constructor Summary | |
---|---|
ImportContainerImpl()
|
Method Summary | |
---|---|
void |
addEdge(EdgeDraft edgeDraft)
Adds an edge to the container. |
void |
addNode(NodeDraft nodeDraft)
Adds a node to the container. |
boolean |
allowAutoNode()
|
boolean |
allowParallelEdges()
|
boolean |
allowSelfLoop()
|
void |
closeLoader()
Close the current loading and clean content before unloading. |
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. |
EdgeDraftGetter |
getEdge(NodeDraftGetter source,
NodeDraftGetter target)
|
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. |
EdgeDefault |
getEdgeDefault()
|
java.util.Collection<? extends EdgeDraftGetter> |
getEdges()
|
AttributeValueFactory |
getFactory()
|
ContainerLoader |
getLoader()
Get containers loading interface. |
NodeDraftImpl |
getNode(java.lang.String id)
Returns the node with the given id , or create a new node
with this id if not found. |
java.util.Collection<? extends NodeDraftGetter> |
getNodes()
|
Report |
getReport()
Returns the report associated to this container, if exists. |
java.lang.String |
getSource()
If exists, returns the source of the data. |
DynamicModel.TimeFormat |
getTimeFormat()
|
java.lang.Double |
getTimeIntervalMax()
|
java.lang.Double |
getTimeIntervalMin()
|
ContainerUnloader |
getUnloader()
Get containers unloading interface. |
boolean |
isAutoScale()
|
boolean |
isDynamicGraph()
|
boolean |
isHierarchicalGraph()
|
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 |
setAllowAutoNode(boolean value)
|
void |
setAllowParallelEdge(boolean value)
|
void |
setAllowSelfLoop(boolean value)
|
void |
setAutoScale(boolean autoscale)
|
void |
setDynamicGraph(boolean dynamicGraph)
|
void |
setEdgeDefault(EdgeDefault edgeDefault)
Set edge default type: DIRECTED, UNDIRECTED or MIXED. |
void |
setHierarchicalGraph(boolean hierarchicalGraph)
|
void |
setReport(Report report)
Set a report this container can use to report issues detected when loading the container. |
void |
setSource(java.lang.String source)
Set the source of the data put in the container. |
void |
setTimeFormat(DynamicModel.TimeFormat timeFormat)
Sets the current Time Format for dynamic data, either DATE
of DOUBLE . |
void |
setTimeIntervalMax(java.lang.String timeIntervalMax)
Sets the time value where the interval ends. |
void |
setTimeIntervalMin(java.lang.String timeIntervalMin)
Sets the time value where the interval starts. |
void |
setUndirectedSumDirectedEdgesWeight(boolean value)
|
boolean |
verify()
This method must be called after the loading is complete and before unloading. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ImportContainerImpl()
Method Detail |
---|
public ContainerLoader getLoader()
Container
getLoader
in interface Container
public ContainerUnloader getUnloader()
Container
getUnloader
in interface Container
public ContainerLoader.DraftFactory factory()
ContainerLoader
factory
in interface ContainerLoader
public void setSource(java.lang.String source)
Container
setSource
in interface Container
source
- the original source of data.public java.lang.String getSource()
Container
getSource
in interface Container
getSource
in interface ContainerUnloader
null
if source is not defined.public void addNode(NodeDraft nodeDraft)
ContainerLoader
addNode
in interface ContainerLoader
nodeDraft
- the node that is to be pushed to the containerpublic NodeDraftImpl getNode(java.lang.String id)
ContainerLoader
id
, or create a new node
with this id if not found.
getNode
in interface ContainerLoader
id
- a node identifier
public boolean nodeExists(java.lang.String id)
ContainerLoader
true
if a node exists with the given id
.
nodeExists
in interface ContainerLoader
id
- a node identifier
true
if node exists, false
otherwisepublic void addEdge(EdgeDraft edgeDraft)
ContainerLoader
edgeDraft
.
addEdge
in interface ContainerLoader
edgeDraft
- the edge that is to be pushed to the containerpublic void removeEdge(EdgeDraft edgeDraft)
ContainerLoader
removeEdge
in interface ContainerLoader
edgeDraft
- the edge that is to be removed from the containerpublic boolean edgeExists(java.lang.String id)
ContainerLoader
true
if an edge exists with the given id
.
edgeExists
in interface ContainerLoader
id
- an edge identifier
true
if edge exists, false
otherwisepublic boolean edgeExists(NodeDraft source, NodeDraft target)
ContainerLoader
true
if an edge exists from source
to
target
.
edgeExists
in interface ContainerLoader
source
- the edge source nodetarget
- the edge target node
true
if edges exists, false
otherwisepublic EdgeDraft getEdge(java.lang.String id)
ContainerLoader
id
, or null
if
not found.
getEdge
in interface ContainerLoader
id
- an edge identifier
id
as an identifier, or
null
if not foundpublic EdgeDraft getEdge(NodeDraft source, NodeDraft target)
ContainerLoader
source
and target
or null
if not found.
getEdge
in interface ContainerLoader
source
- the edge source nodetarget
- the edge target node
source
to
target
or null
if not foundpublic EdgeDraftGetter getEdge(NodeDraftGetter source, NodeDraftGetter target)
getEdge
in interface ContainerUnloader
public java.util.Collection<? extends NodeDraftGetter> getNodes()
getNodes
in interface ContainerUnloader
public java.util.Collection<? extends EdgeDraftGetter> getEdges()
getEdges
in interface ContainerUnloader
public AttributeModel getAttributeModel()
ContainerLoader
getAttributeModel
in interface ContainerLoader
getAttributeModel
in interface ContainerUnloader
public AttributeValueFactory getFactory()
public java.lang.Double getTimeIntervalMin()
getTimeIntervalMin
in interface ContainerUnloader
public java.lang.Double getTimeIntervalMax()
getTimeIntervalMax
in interface ContainerUnloader
public DynamicModel.TimeFormat getTimeFormat()
getTimeFormat
in interface ContainerUnloader
public void setTimeIntervalMax(java.lang.String timeIntervalMax)
ContainerLoader
setTimeIntervalMax
in interface ContainerLoader
timeIntervalMax
- the upper time interval boundpublic void setTimeIntervalMin(java.lang.String timeIntervalMin)
ContainerLoader
setTimeIntervalMin
in interface ContainerLoader
timeIntervalMin
- the lower time interval boundpublic void setTimeFormat(DynamicModel.TimeFormat timeFormat)
ContainerLoader
DATE
of DOUBLE
. Says how the dates are formatted.
setTimeFormat
in interface ContainerLoader
timeFormat
- the current time formatpublic boolean verify()
Container
verify
in interface Container
true
if container data is consistent, false
otherwisepublic void closeLoader()
Container
closeLoader
in interface Container
public boolean isDynamicGraph()
isDynamicGraph
in interface Container
public boolean isHierarchicalGraph()
isHierarchicalGraph
in interface Container
public void setDynamicGraph(boolean dynamicGraph)
public void setHierarchicalGraph(boolean hierarchicalGraph)
public Report getReport()
Container
getReport
in interface Container
null
if no report is definedpublic void setReport(Report report)
Container
setReport
in interface Container
report
- set report
as the default report for this containerpublic void setAllowAutoNode(boolean value)
setAllowAutoNode
in interface Container
public void setAllowParallelEdge(boolean value)
setAllowParallelEdge
in interface Container
public void setAllowSelfLoop(boolean value)
setAllowSelfLoop
in interface Container
public void setEdgeDefault(EdgeDefault edgeDefault)
ContainerLoader
setEdgeDefault
in interface ContainerLoader
edgeDefault
- the edge default type valuepublic void setUndirectedSumDirectedEdgesWeight(boolean value)
setUndirectedSumDirectedEdgesWeight
in interface Container
public boolean allowAutoNode()
allowAutoNode
in interface ContainerUnloader
public boolean allowParallelEdges()
allowParallelEdges
in interface ContainerUnloader
public boolean allowSelfLoop()
allowSelfLoop
in interface ContainerUnloader
public EdgeDefault getEdgeDefault()
getEdgeDefault
in interface ContainerUnloader
public boolean isAutoScale()
isAutoScale
in interface Container
public void setAutoScale(boolean autoscale)
setAutoScale
in interface Container
|
Gephi Toolkit Javadoc | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |