DBVIEW
org.dbview.input_addons.InputCatalog Class Reference
Inheritance diagram for org.dbview.input_addons.InputCatalog:
Collaboration diagram for org.dbview.input_addons.InputCatalog:

List of all members.

Public Member Functions

 InputCatalog () throws Exception
String toString ()
Enumeration< String > getTargets () throws Exception
String getPackage (String in_add_on_name) throws AddOnCatalogException
Object getAdaptor (String in_target_name, String in_adaptor_name) throws AddOnCatalogException

Static Public Member Functions

static String fromCli (String in_cli_name)
static String toCli (String in_real_name)

Static Private Attributes

static final String ADAPTOR_RESOURCE_NAME = "inputAddons"
static final Pattern ADD_ON_PATTERN = Pattern.compile("^(.+\\.addons\\.input\\.([^\\.]+))\\.([^\\.]+)\\.class$")
static final ArrayList< String > ADAPTORS = new ArrayList<String>() {{ add("Cli"); add("Configuration"); add("Description"); add("Loader"); }}

Detailed Description

This class loads all the resources that contain input adapters' implementations and creates a catalog of available add-ons.

Remarks:
Right now, there is only one resource that contains input adaptors. This is a JAR file, create by the ANT script.
Author:
Denis BEURIVE

Definition at line 33 of file InputCatalog.java.


Constructor & Destructor Documentation

org.dbview.input_addons.InputCatalog.InputCatalog ( ) throws Exception

Constructor.

Exceptions:
Exception

Definition at line 67 of file InputCatalog.java.


Member Function Documentation

static String org.dbview.addons.AddOnCatalog.fromCli ( String  in_cli_name) [static, inherited]

This method converts an add-on name, given from the command line interface, into its internal representation.

Parameters:
in_cli_nameName of the add-on, as given by the command line.
Returns:
The method returns the internal name of the add-on.

Definition at line 293 of file AddOnCatalog.java.

Referenced by org.dbview.addons.AddOnCatalog.getAdaptor().

Object org.dbview.addons.AddOnCatalog.getAdaptor ( String  in_target_name,
String  in_adaptor_name 
) throws AddOnCatalogException [inherited]

This method returns an instance of a given adaptor's, for a given add-on.

Parameters:
in_target_nameName of the add-on to which the adaptor belongs. Please note that this name may contain dashes. This string will be converted into "Lower Camel Case".
in_adaptor_nameName of the adaptor to create.
Returns:
The method returns a new instance of the required adaptor.
Exceptions:
AddOnCatalogException

Definition at line 242 of file AddOnCatalog.java.

Referenced by org.dbview.input_addons.ProfilesRepository.getProfileInstance().

String org.dbview.addons.AddOnCatalog.getPackage ( String  in_add_on_name) throws AddOnCatalogException [inherited]

This method returns the name of the package that contains adaptors' implementations for a given add-on (that is: the add-on's package).

Parameters:
in_add_on_nameName of the add-on.
Returns:
This method returns the name of the package that contains adaptors' implementations for the given add-on.
Exceptions:
Exception

Definition at line 221 of file AddOnCatalog.java.

Enumeration<String> org.dbview.addons.AddOnCatalog.getTargets ( ) throws Exception [inherited]

This method returns the list of all add-ons found in the catalog.

Returns:
This method returns the list of all add-ons found in the catalog.
Exceptions:
Exception

Definition at line 184 of file AddOnCatalog.java.

Referenced by org.dbview.addons.AddOnCatalog.toString().

static String org.dbview.addons.AddOnCatalog.toCli ( String  in_real_name) [static, inherited]

This method converts an add-on name into its CLI name.

Parameters:
in_real_name"Internal" name of the add-on.
Returns:
The method returns the CLI name of the add-on.

Definition at line 303 of file AddOnCatalog.java.

String org.dbview.addons.AddOnCatalog.toString ( ) [inherited]

The method produces a string that represents the catalogue.

Note:
This method is used to debug the application.
Returns:
The method returns a string that represents the catalogue.

Definition at line 148 of file AddOnCatalog.java.


Member Data Documentation

final String org.dbview.input_addons.InputCatalog.ADAPTOR_RESOURCE_NAME = "inputAddons" [static, private]

Name of the property that references the JAR file that contains all the adaptors to list.

Remarks:
This property is defined in the configuration file of the software. The software's configuration file is a "property file" (see file "resources.properties").

Definition at line 40 of file InputCatalog.java.

Referenced by org.dbview.input_addons.InputCatalog.InputCatalog().

final ArrayList<String> org.dbview.input_addons.InputCatalog.ADAPTORS = new ArrayList<String>() {{ add("Cli"); add("Configuration"); add("Description"); add("Loader"); }} [static, private]

This array contains the expected list of adaptors' names.

Remarks:
If you plan to add a new adapter, then you must declare the new adaptor in the list below.

Definition at line 61 of file InputCatalog.java.

Referenced by org.dbview.input_addons.InputCatalog.InputCatalog().

final Pattern org.dbview.input_addons.InputCatalog.ADD_ON_PATTERN = Pattern.compile("^(.+\\.addons\\.input\\.([^\\.]+))\\.([^\\.]+)\\.class$") [static, private]

Regular expression that is used to recognize an adaptor for an input add-on.

Remarks:
There is a relation between the following line and the ANT script (build.xml) <property name="dir.pkg.input.addons" value="org/dbview/addons/input"/>

example toto.titi.tata.addons.input.addon_name.adaptor_name.class

The important point is: "addons.input.<name of the add-on>.<name of the adaptor>.class".

Warning:
Make sure that the regular expression has 3 pairs of brackets.
  • First pair of bracket: the full name of the package that represents the add-on.
  • Second pair: the name of the add-on.
  • Third pair: The name of the adaptor.

Definition at line 55 of file InputCatalog.java.

Referenced by org.dbview.input_addons.InputCatalog.InputCatalog().


The documentation for this class was generated from the following file: