DBVIEW
org.dbview.output_addons.OutputCatalog Class Reference
Inheritance diagram for org.dbview.output_addons.OutputCatalog:
Collaboration diagram for org.dbview.output_addons.OutputCatalog:

List of all members.

Public Member Functions

 OutputCatalog () 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 = "outputTableAddons"
static final Pattern ADD_ON_PATTERN = Pattern.compile("^(.+\\.addons\\.output\\.[^\\.]+\\.([^\\.]+))\\.([^\\.]+)\\.class$")
static final ArrayList< String > ADAPTORS = new ArrayList<String>() {{ add("Cli"); add("Description"); add("Exporter"); }}

Detailed Description

This class loads all the resources that contain output 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 OutputCatalog.java.


Constructor & Destructor Documentation

org.dbview.output_addons.OutputCatalog.OutputCatalog ( ) throws Exception

Constructor.

Exceptions:
Exception

Definition at line 67 of file OutputCatalog.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.output_addons.OutputCatalog.ADAPTOR_RESOURCE_NAME = "outputTableAddons" [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 OutputCatalog.java.

Referenced by org.dbview.output_addons.OutputCatalog.OutputCatalog().

final ArrayList<String> org.dbview.output_addons.OutputCatalog.ADAPTORS = new ArrayList<String>() {{ add("Cli"); add("Description"); add("Exporter"); }} [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 OutputCatalog.java.

Referenced by org.dbview.output_addons.OutputCatalog.OutputCatalog().

final Pattern org.dbview.output_addons.OutputCatalog.ADD_ON_PATTERN = Pattern.compile("^(.+\\.addons\\.output\\.[^\\.]+\\.([^\\.]+))\\.([^\\.]+)\\.class$") [static, private]

Regular expression that is used to recognize an adaptor, for an add-on specialized in the rendering of tables.

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

example: toto.titi.tata.addons.output_type.addon_name.adaptor_name.class The important point is: "addons.output.<type of the output>.<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 OutputCatalog.java.

Referenced by org.dbview.output_addons.OutputCatalog.OutputCatalog().


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