com.univocity.api
Class Univocity

java.lang.Object
  extended by com.univocity.api.Univocity

public final class Univocity
extends Object

This is the entry point to the uniVocity data integration engine. It connects the resources in this API to their actual implementations in univocity.jar.

uniVocity abstracts the specifics of any source of data. It works with the concepts of data stores, data entities and queries.

In some circumstances, you might need to configure the class loader before being able to obtain instances of UnivocityFactoryProvider from univocity.jar. If that is the case, use the setClassLoader(ClassLoader) method before calling the engineFactory() and datasetFactory() method.

Author:
uniVocity Software Pty Ltd - dev@univocity.com
See Also:
EngineConfiguration, DataIntegrationEngineFactory

Constructor Summary
Univocity()
           
 
Method Summary
static DatasetFactory datasetFactory()
          Loads and returns the DatasetFactory that provides convenient implementations of Dataset.
static DataIntegrationEngine getEngine(String engineName)
          Obtains the DataIntegrationEngine instance which was configured using registerEngine(com.univocity.api.config.EngineConfiguration).
static String getLicensePath()
          Obtains the configured path to the uniVocity license file.
static boolean isActive(String engineName)
          Is the data integration engine with the given name active?
static void registerEngine(EngineConfiguration engineConfiguration)
          Registers a uniVocity engine configuration.
static void setClassLoader(ClassLoader classLoader)
          Defines the class loader to be used to load uniVocity implementation classes (from univocity.jar)
static void setLicensePath(String path)
          Sets the path to the uniVocity license file.
static void shutdown(String engineName)
          Shuts down the DataIntegrationEngine associated with the given engine name.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Univocity

public Univocity()
Method Detail

setClassLoader

public static final void setClassLoader(ClassLoader classLoader)
Defines the class loader to be used to load uniVocity implementation classes (from univocity.jar)

Parameters:
classLoader - The class loader to be used to load provider classes, or null if the system class loader is to be used.

getLicensePath

public static final String getLicensePath()
Obtains the configured path to the uniVocity license file. The path can be either relative or absolute.

By default, uniVocity will look for a file named "license.zip" on the classpath.

To request a license, execute the licenseRequest script that comes with univocity.jar.

Returns:
the path to the license file.

setLicensePath

public static final void setLicensePath(String path)
Sets the path to the uniVocity license file. The path can be either relative or absolute.

By default, uniVocity will look for a file named "license.zip" on the classpath.

To request a license, execute the licenseRequest script that comes with univocity.jar

Parameters:
path - the path to the license file.

registerEngine

public static final void registerEngine(EngineConfiguration engineConfiguration)
Registers a uniVocity engine configuration. Once the engine configuration is registered, the DataIntegrationEngine instance can be initialized and obtained via getEngine(String).

Parameters:
engineConfiguration - the new engine configuration.

datasetFactory

public static final DatasetFactory datasetFactory()
Loads and returns the DatasetFactory that provides convenient implementations of Dataset.

Returns:
the singleton instance of DatasetFactory provided by the implementation of the uniVocity API (from univocity.jar)

getEngine

public static final DataIntegrationEngine getEngine(String engineName)
Obtains the DataIntegrationEngine instance which was configured using registerEngine(com.univocity.api.config.EngineConfiguration).

Parameters:
engineName - the name of the data integration engine
Returns:
the DataIntegrationEngine associated with the given engine name

shutdown

public static final void shutdown(String engineName)
Shuts down the DataIntegrationEngine associated with the given engine name. All resources allocated by this engine will be released.
If the engine was started using an in-memory database to store metadata information, its values will be lost.

A new engine instance can be started with getEngine(String).

Parameters:
engineName - the name of the engine to be stopped.

isActive

public static final boolean isActive(String engineName)
Is the data integration engine with the given name active?

An active engine is one that has been instantiated through getEngine(String) and has yet to be shut down.

Parameters:
engineName - the name of the engine to be verfied.
Returns:
true if the DataIntegrationEngine associated with the given engine name is active, otherwise false


Copyright © 2015 uniVocity Software Pty Ltd. All rights reserved.