public final class Importers extends Object
Modifier and Type | Method and Description |
---|---|
static Importer |
addPostProcessors(Importer importer,
ComputationManager computationManager,
String... names) |
static Importer |
addPostProcessors(ImportersLoader loader,
Importer importer,
ComputationManager computationManager,
String... names) |
static Importer |
addPostProcessors(Importer importer,
String... names) |
static DataSource |
createDataSource(Path file) |
static DataSource |
createDataSource(Path directory,
String fileNameOrBaseName) |
static Importer |
findImporter(ReadOnlyDataSource dataSource,
ComputationManager computationManager) |
static Importer |
findImporter(ReadOnlyDataSource dataSource,
ImportersLoader loader,
ComputationManager computationManager,
ImportConfig config) |
static Collection<String> |
getFormats() |
static Collection<String> |
getFormats(ImportersLoader loader)
Get all supported import formats.
|
static Importer |
getImporter(ImportersLoader loader,
String format,
ComputationManager computationManager,
ImportConfig config)
Get an importer for the specified format name.
|
static Importer |
getImporter(String format)
Get an importer for the specified format name.
|
static Importer |
getImporter(String format,
ComputationManager computationManager)
Get an importer for the specified format name.
|
static Importer |
getImporter(String format,
ComputationManager computationManager,
ImportConfig config)
Get an importer for the specified format name.
|
static Collection<String> |
getPostProcessorNames() |
static Collection<String> |
getPostProcessorNames(ImportersLoader loader) |
static void |
importAll(Path dir,
Importer importer,
boolean parallel,
Consumer<Network> consumer) |
static void |
importAll(Path dir,
Importer importer,
boolean parallel,
Consumer<Network> consumer,
Consumer<ReadOnlyDataSource> listener) |
static void |
importAll(Path dir,
Importer importer,
boolean parallel,
Properties parameters,
Consumer<Network> consumer,
Consumer<ReadOnlyDataSource> listener) |
static Network |
importData(ImportersLoader loader,
String format,
ReadOnlyDataSource dataSource,
Properties parameters,
ComputationManager computationManager,
ImportConfig config)
A convenient method to create a model from data in a given format.
|
static Network |
importData(String format,
ReadOnlyDataSource dataSource,
Properties parameters) |
static Network |
importData(String format,
ReadOnlyDataSource dataSource,
Properties parameters,
ComputationManager computationManager) |
static Network |
importData(String format,
String directory,
String baseName,
Properties parameters)
A convenient method to create a model from data in a given format.
|
static Collection<Importer> |
list() |
static Collection<Importer> |
list(ComputationManager computationManager,
ImportConfig config) |
static Collection<Importer> |
list(ImportersLoader loader,
ComputationManager computationManager,
ImportConfig config) |
static Network |
loadNetwork(Path file)
Loads a network from the specified file, trying to guess its format,
and using importers and post processors defined as services.
|
static Network |
loadNetwork(Path file,
ComputationManager computationManager,
ImportConfig config,
Properties parameters)
Loads a network from the specified file, trying to guess its format,
and using importers and post processors defined as services.
|
static Network |
loadNetwork(Path file,
ComputationManager computationManager,
ImportConfig config,
Properties parameters,
ImportersLoader loader)
Loads a network from the specified file, trying to guess its format.
|
static Network |
loadNetwork(String file)
Loads a network from the specified file path, see
loadNetwork(Path) . |
static Network |
loadNetwork(String filename,
InputStream data)
Loads a network from a raw input stream, trying to guess the format from the specified filename,
and using importers and post processors defined as services.
|
static Network |
loadNetwork(String filename,
InputStream data,
ComputationManager computationManager)
Loads a network from a raw input stream, trying to guess the format from the specified filename,
and using importers and post processors defined as services.
|
static Network |
loadNetwork(String filename,
InputStream data,
ComputationManager computationManager,
ImportConfig config,
Properties parameters)
Loads a network from a raw input stream, trying to guess the format from the specified filename,
and using importers and post processors defined as services.
|
static Network |
loadNetwork(String filename,
InputStream data,
ComputationManager computationManager,
ImportConfig config,
Properties parameters,
ImportersLoader loader)
Loads a network from a raw input stream, trying to guess the format from the specified filename.
|
static void |
loadNetworks(Path dir,
boolean parallel,
ComputationManager computationManager,
ImportConfig config,
Consumer<Network> consumer) |
static void |
loadNetworks(Path dir,
boolean parallel,
ComputationManager computationManager,
ImportConfig config,
Consumer<Network> consumer,
Consumer<ReadOnlyDataSource> listener) |
static void |
loadNetworks(Path dir,
boolean parallel,
ComputationManager computationManager,
ImportConfig config,
Properties parameters,
Consumer<Network> consumer,
Consumer<ReadOnlyDataSource> listener) |
static void |
loadNetworks(Path dir,
boolean parallel,
Consumer<Network> consumer) |
static void |
loadNetworks(Path dir,
boolean parallel,
Consumer<Network> consumer,
Consumer<ReadOnlyDataSource> listener) |
static void |
loadNetworks(Path dir,
boolean parallel,
ImportersLoader loader,
ComputationManager computationManager,
ImportConfig config,
Consumer<Network> consumer,
Consumer<ReadOnlyDataSource> listener) |
static void |
loadNetworks(Path dir,
boolean parallel,
ImportersLoader loader,
ComputationManager computationManager,
ImportConfig config,
Properties parameters,
Consumer<Network> consumer,
Consumer<ReadOnlyDataSource> listener) |
static void |
loadNetworks(Path dir,
Consumer<Network> consumer) |
static Object |
readParameter(String format,
Properties parameters,
Parameter configuredParameter)
Deprecated.
|
static Object |
readParameter(String format,
Properties parameters,
Parameter configuredParameter,
ParameterDefaultValueConfig defaultValueConfig)
Deprecated.
|
static Importer |
removePostProcessors(Importer importer) |
static Importer |
setPostProcessors(Importer importer,
ComputationManager computationManager,
String... names) |
static Importer |
setPostProcessors(ImportersLoader loader,
Importer importer,
ComputationManager computationManager,
String... names) |
static Importer |
setPostProcessors(Importer importer,
String... names) |
public static Collection<String> getFormats(ImportersLoader loader)
public static Collection<String> getFormats()
public static Collection<Importer> list(ImportersLoader loader, ComputationManager computationManager, ImportConfig config)
public static Collection<Importer> list(ComputationManager computationManager, ImportConfig config)
public static Collection<Importer> list()
public static Importer getImporter(ImportersLoader loader, String format, @Nullable ComputationManager computationManager, ImportConfig config)
ImportPostProcessor
s on imported networks.loader
- the loader responsible for providing the list of available importers and post processorsformat
- the import formatcomputationManager
- a computation manager which may be used by configured ImportPostProcessor
sconfig
- the import configurationnull
otherwise.public static Importer getImporter(String format, @Nullable ComputationManager computationManager, ImportConfig config)
ImportPostProcessor
s on imported networks.
All declared services implementing the Importer
interface are available.
format
- the import formatcomputationManager
- a computation manager which may be used by configured ImportPostProcessor
sconfig
- the import configurationnull
otherwise.public static Importer getImporter(String format, @Nullable ComputationManager computationManager)
ImportPostProcessor
s on imported networks.
All declared services implementing the Importer
interface are available.
The import configuration is loaded from default platform config.
format
- the import formatcomputationManager
- a computation manager which may be used by configured ImportPostProcessor
snull
otherwise.public static Importer getImporter(String format)
ImportPostProcessor
s on imported networks.
All declared services implementing the Importer
interface are available.
The import configuration is loaded from default platform config.
Import post processors will use the default instance of LocalComputationManager
,
as configured in default platform config.
format
- the import formatnull
otherwise.public static Collection<String> getPostProcessorNames(ImportersLoader loader)
public static Collection<String> getPostProcessorNames()
public static Importer addPostProcessors(ImportersLoader loader, Importer importer, ComputationManager computationManager, String... names)
public static Importer addPostProcessors(Importer importer, ComputationManager computationManager, String... names)
public static Importer setPostProcessors(ImportersLoader loader, Importer importer, ComputationManager computationManager, String... names)
public static Importer setPostProcessors(Importer importer, ComputationManager computationManager, String... names)
public static Network importData(ImportersLoader loader, String format, ReadOnlyDataSource dataSource, Properties parameters, ComputationManager computationManager, ImportConfig config)
format
- the import formatdataSource
- data sourceparameters
- some properties to configure the importcomputationManager
- computation manager to use for default post processorspublic static Network importData(String format, ReadOnlyDataSource dataSource, Properties parameters, ComputationManager computationManager)
public static Network importData(String format, ReadOnlyDataSource dataSource, Properties parameters)
public static Network importData(String format, String directory, String baseName, Properties parameters)
format
- the import formatdirectory
- the directory where input files arebaseName
- a base name for all input filesparameters
- some properties to configure the importpublic static void importAll(Path dir, Importer importer, boolean parallel, Properties parameters, Consumer<Network> consumer, Consumer<ReadOnlyDataSource> listener) throws IOException, InterruptedException, ExecutionException
public static void importAll(Path dir, Importer importer, boolean parallel, Consumer<Network> consumer, Consumer<ReadOnlyDataSource> listener) throws IOException, InterruptedException, ExecutionException
public static void importAll(Path dir, Importer importer, boolean parallel, Consumer<Network> consumer) throws IOException, InterruptedException, ExecutionException
@Deprecated public static Object readParameter(String format, Properties parameters, Parameter configuredParameter)
ConversionParameters.readParameter(String, Properties, Parameter)
instead@Deprecated public static Object readParameter(String format, Properties parameters, Parameter configuredParameter, ParameterDefaultValueConfig defaultValueConfig)
ConversionParameters.readParameter(String, Properties, Parameter, ParameterDefaultValueConfig)
insteadpublic static DataSource createDataSource(Path file)
public static DataSource createDataSource(Path directory, String fileNameOrBaseName)
public static Importer findImporter(ReadOnlyDataSource dataSource, ImportersLoader loader, ComputationManager computationManager, ImportConfig config)
public static Importer findImporter(ReadOnlyDataSource dataSource, ComputationManager computationManager)
public static Network loadNetwork(Path file, ComputationManager computationManager, ImportConfig config, Properties parameters, ImportersLoader loader)
file
- The file to be loaded.computationManager
- A computation manager which may be used by import post-processorsconfig
- The import config, in particular definition of post processorsparameters
- Import-specific parametersloader
- Provides the list of available importers and post-processorspublic static Network loadNetwork(Path file, ComputationManager computationManager, ImportConfig config, Properties parameters)
file
- The file to be loaded.computationManager
- A computation manager which may be used by import post-processorsconfig
- The import config, in particular definition of post processorsparameters
- Import-specific parameterspublic static Network loadNetwork(Path file)
LocalComputationManager
, as defined in
default platform config.file
- The file to be loaded.public static Network loadNetwork(String file)
loadNetwork(Path)
.file
- The file to be loaded.public static Network loadNetwork(String filename, InputStream data, ComputationManager computationManager, ImportConfig config, Properties parameters, ImportersLoader loader)
filename
- The name of the file to be imported.data
- The raw data from which the network should be loadedcomputationManager
- A computation manager which may be used by import post-processorsconfig
- The import config, in particular definition of post processorsparameters
- Import-specific parametersloader
- Provides the list of available importers and post-processorspublic static Network loadNetwork(String filename, InputStream data, ComputationManager computationManager, ImportConfig config, Properties parameters)
filename
- The name of the file to be imported.data
- The raw data from which the network should be loadedcomputationManager
- A computation manager which may be used by import post-processorsconfig
- The import config, in particular definition of post processorsparameters
- Import-specific parameterspublic static Network loadNetwork(String filename, InputStream data, ComputationManager computationManager)
filename
- The name of the file to be imported.data
- The raw data from which the network should be loadedcomputationManager
- A computation manager which may be used by import post-processorspublic static Network loadNetwork(String filename, InputStream data)
LocalComputationManager
, as defined in
default platform config.filename
- The name of the file to be imported.data
- The raw data from which the network should be loadedpublic static void loadNetworks(Path dir, boolean parallel, ImportersLoader loader, ComputationManager computationManager, ImportConfig config, Properties parameters, Consumer<Network> consumer, Consumer<ReadOnlyDataSource> listener) throws IOException, InterruptedException, ExecutionException
public static void loadNetworks(Path dir, boolean parallel, ImportersLoader loader, ComputationManager computationManager, ImportConfig config, Consumer<Network> consumer, Consumer<ReadOnlyDataSource> listener) throws IOException, InterruptedException, ExecutionException
public static void loadNetworks(Path dir, boolean parallel, ComputationManager computationManager, ImportConfig config, Properties parameters, Consumer<Network> consumer, Consumer<ReadOnlyDataSource> listener) throws IOException, InterruptedException, ExecutionException
public static void loadNetworks(Path dir, boolean parallel, ComputationManager computationManager, ImportConfig config, Consumer<Network> consumer, Consumer<ReadOnlyDataSource> listener) throws IOException, InterruptedException, ExecutionException
public static void loadNetworks(Path dir, boolean parallel, ComputationManager computationManager, ImportConfig config, Consumer<Network> consumer) throws IOException, InterruptedException, ExecutionException
public static void loadNetworks(Path dir, boolean parallel, Consumer<Network> consumer) throws IOException, InterruptedException, ExecutionException
public static void loadNetworks(Path dir, boolean parallel, Consumer<Network> consumer, Consumer<ReadOnlyDataSource> listener) throws IOException, InterruptedException, ExecutionException
public static void loadNetworks(Path dir, Consumer<Network> consumer) throws IOException, InterruptedException, ExecutionException
Copyright © 2020. All rights reserved.