Gephi Toolkit Javadoc

org.gephi.io.importer.api
Interface Container

All Known Implementing Classes:
ImportContainerImpl

public interface Container

A container is created each time data are imported by importers. Its role is to host all data collected by importers during import process. After pushing data in the container, its content can be analysed to verify its validity and then be processed by processors. Thus containers are loaded by importers and unloaded by processors.

See ContainerLoader for how to push graph and attributes data in the container and see ContainerUnloader for how to retrieve data in the container.

Author:
Mathieu Bastian
See Also:
Importer, Processor

Method Summary
 void closeLoader()
          Close the current loading and clean content before unloading.
 ContainerLoader getLoader()
          Get containers loading interface.
 Report getReport()
          Returns the report associated to this container, if exists.
 java.lang.String getSource()
          If exists, returns the source of the data.
 ContainerUnloader getUnloader()
          Get containers unloading interface.
 boolean isAutoScale()
           
 boolean isDynamicGraph()
           
 boolean isHierarchicalGraph()
           
 void setAllowAutoNode(boolean value)
           
 void setAllowParallelEdge(boolean value)
           
 void setAllowSelfLoop(boolean value)
           
 void setAutoScale(boolean autoscale)
           
 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 setUndirectedSumDirectedEdgesWeight(boolean value)
           
 boolean verify()
          This method must be called after the loading is complete and before unloading.
 

Method Detail

setSource

void setSource(java.lang.String source)
Set the source of the data put in the container. Could be a file name.

Parameters:
source - the original source of data.
Throws:
java.lang.NullPointerException - if source is null

getSource

java.lang.String getSource()
If exists, returns the source of the data.

Returns:
the source of the data, or null if source is not defined.

getLoader

ContainerLoader getLoader()
Get containers loading interface. The loader is used by modules which put data in the container, whereas the unloader interface is used by modules which read containers content.

Returns:
the containers loading interface

getUnloader

ContainerUnloader getUnloader()
Get containers unloading interface. The unloader interface is used by modules which read containers content, whereas the loader is used for pushing data in the container.

Returns:
the container unloading interface

setAutoScale

void setAutoScale(boolean autoscale)

isAutoScale

boolean isAutoScale()

setAllowSelfLoop

void setAllowSelfLoop(boolean value)

setAllowAutoNode

void setAllowAutoNode(boolean value)

setAllowParallelEdge

void setAllowParallelEdge(boolean value)

setUndirectedSumDirectedEdgesWeight

void setUndirectedSumDirectedEdgesWeight(boolean value)

setReport

void setReport(Report report)
Set a report this container can use to report issues detected when loading the container. Report are used to log info and issues during import process. Only one report can be associated to a container.

Parameters:
report - set report as the default report for this container
Throws:
java.lang.NullPointerException - if report is null

getReport

Report getReport()
Returns the report associated to this container, if exists.

Returns:
the report set for this container or null if no report is defined

verify

boolean verify()
This method must be called after the loading is complete and before unloading. Its aim is to verify data consistency as a whole.

Returns:
true if container data is consistent, false otherwise

closeLoader

void closeLoader()
Close the current loading and clean content before unloading.


isDynamicGraph

boolean isDynamicGraph()

isHierarchicalGraph

boolean isHierarchicalGraph()

Gephi Toolkit Javadoc