Interface Container
-
public interface ContainerA 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 into the container, its content can be analyzed to verify its validity and then be processed by processors. Thus, containers are loaded by importers and unloaded by processors.See
ContainerLoaderfor how to push graph and attributes data in the container and seeContainerUnloaderfor how to retrieve data in the container.
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static interfaceContainer.FactoryContainer factory.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidcloseLoader()Close the current loading and clean content before unloading.ContainerLoadergetLoader()Gets the container loading interface.ReportgetReport()Returns the report associated to this container, if it exists.StringgetSource()If exists, returns the source of the data.ContainerUnloadergetUnloader()Get the container unloading interface.booleanhasDynamicAttributes()Returns true if this container contains elements that have dynamic attributes.booleanhasSelfLoops()Returns true if edges in this container are self-loops.booleanisDynamicGraph()Returns true if this container contains a dynamic graph.booleanisMultiGraph()Returns true if this container contains a multigraph.voidsetReport(Report report)Sets a report this container can use to report issues detected when loading the container.voidsetSource(String source)Sets the source of the data put in the container.booleanverify()This method must be called after the loading is complete and before unloading.
-
-
-
Method Detail
-
getSource
String getSource()
If exists, returns the source of the data.- Returns:
- source of the data, or
nullif source is not defined.
-
setSource
void setSource(String source)
Sets the source of the data put in the container. Could be a file name.- Parameters:
source- original source of data.- Throws:
NullPointerException- ifsourceisnull
-
getLoader
ContainerLoader getLoader()
Gets the container 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:
- containers loading interface
-
getUnloader
ContainerUnloader getUnloader()
Get the container 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:
- container unloading interface
-
getReport
Report getReport()
Returns the report associated to this container, if it exists.- Returns:
- report set for this container or
nullif no report is defined
-
setReport
void setReport(Report report)
Sets 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- setreportas the default report for this container- Throws:
NullPointerException- ifreportisnull
-
verify
boolean verify()
This method must be called after the loading is complete and before unloading.It aims to verify data consistency as a whole.
- Returns:
trueif container data is consistent,falseotherwise
-
closeLoader
void closeLoader()
Close the current loading and clean content before unloading.
-
isDynamicGraph
boolean isDynamicGraph()
Returns true if this container contains a dynamic graph.A dynamic graph has elements that appear or disappear over time.
- Returns:
- true if dynamic, false otherwise
-
hasDynamicAttributes
boolean hasDynamicAttributes()
Returns true if this container contains elements that have dynamic attributes.Dynamic attributes are attributes with different values over time.
- Returns:
- true if dynamic attributes, false otherwise
-
hasSelfLoops
boolean hasSelfLoops()
Returns true if edges in this container are self-loops.- Returns:
- true if presence of self-loops, false otherwise
-
isMultiGraph
boolean isMultiGraph()
Returns true if this container contains a multigraph.A multi-graph is a graph that has several types of edges (i.e. edges with different labels).
- Returns:
- true if multigraph, false otherwise
-
-