All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class w3c.jigsaw.pics.DataBaseBureau

java.lang.Object
   |
   +----w3c.jigsaw.pics.DataBaseBureau

public class DataBaseBureau
extends Object
implements LabelBureauInterface
This class implements a label bureau. The database for labels is provided by a real database. The organisation is as follows:

The LabelBureau is attached to some directory D.db, the db extension is used to make difference between SampleLabelBureau and DataBaseBureau. For each DataBaseBureau, you have to create a properties file, D.db/dbs.props and D.db/dbd.props containing information about the services database and the bureaux database .

the properties in dbs.props must be:

the properties in dbs.props must be:

If a database doesn't exists, you have to create it and you must have some jdbc drivers to access it.


Variable Index

 o DB_BUREAU_FIELD_P
The property key relative to the name of the bureau field.
 o DB_NAME_P
The property key relative to the name of the database.
 o DB_SERVICE_FIELD_P
The property key relative to the name of the service field.

Constructor Index

 o DataBaseBureau(File)
Create a new DataBaseBureau.

Method Index

 o createService(String)
Create a new service in this bureau.
 o getIdentifier()
Get this label bureau directory.
 o getLabelService(String)
Lookup for the given service in this bureau.
 o getLabelServicesNames()
Get the list of all services available in this bureau.
 o isAService(String)
Test the service existence
 o removeService(String)
Remove a service from this bureau

Variables

 o DB_NAME_P
 public static final String DB_NAME_P
The property key relative to the name of the database.

 o DB_SERVICE_FIELD_P
 public static final String DB_SERVICE_FIELD_P
The property key relative to the name of the service field.

 o DB_BUREAU_FIELD_P
 public static final String DB_BUREAU_FIELD_P
The property key relative to the name of the bureau field.

Constructors

 o DataBaseBureau
 public DataBaseBureau(File directory)
Create a new DataBaseBureau. The configuration file from the label bureau (the place were it takes information about the services database), is given by the provided directory.

Parameters:
directory - This bureau root directory.
See Also:
DataBaseService

Methods

 o getIdentifier
 public String getIdentifier()
Get this label bureau directory.

 o createService
 public boolean createService(String service)
Create a new service in this bureau.

Parameters:
service - The service url
Returns:
True if the service is create
 o removeService
 public boolean removeService(String service)
Remove a service from this bureau

Parameters:
service - The service url
Returns:
True if removed
 o isAService
 public boolean isAService(String service)
Test the service existence

Parameters:
service - The service url
Returns:
True if the given service exists in this bureau
 o getLabelServicesNames
 public String[] getLabelServicesNames()
Get the list of all services available in this bureau.

Returns:
String[] The services list.
 o getLabelService
 public LabelServiceInterface getLabelService(String url)
Lookup for the given service in this bureau.

Parameters:
name - The service name.
Returns:
A dataBaseService instance, or null if none was found.

All Packages  Class Hierarchy  This Package  Previous  Next  Index