Package org.daisy.dotify.api.table
Class TableCatalog
- java.lang.Object
-
- org.daisy.dotify.api.table.TableCatalog
-
- All Implemented Interfaces:
FactoryCatalog<Table>
,TableCatalogService
public class TableCatalog extends Object implements FactoryCatalog<Table>, TableCatalogService
Provides a catalog of Table factories.
-
-
Constructor Summary
Constructors Constructor Description TableCatalog()
Creates a new empty instance.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addFactory(TableProvider factory)
Adds a factory (intended for use by the OSGi framework)Table
get(String identifier)
Gets the Factory with this identifierCollection<FactoryProperties>
list()
Lists the tablesCollection<FactoryProperties>
list(TableFilter filter)
Lists the tables that matches the specified filterstatic TableCatalog
newInstance()
Creates a new TableCatalog and populates it using the SPI (java service provider interface).Table
newTable(String identifier)
Creates a new table with the specified identifier.void
removeFactory(TableProvider factory)
Removes a factory (intended for use by the OSGi framework)
-
-
-
Method Detail
-
newInstance
public static TableCatalog newInstance()
Creates a new TableCatalog and populates it using the SPI (java service provider interface).
In an OSGi context, an instance should be retrieved using the service registry. It will be registered under the TableCatalogService interface.
- Returns:
- returns a new TableCatalog
-
addFactory
public void addFactory(TableProvider factory)
Adds a factory (intended for use by the OSGi framework)- Parameters:
factory
- the factory to add
-
removeFactory
public void removeFactory(TableProvider factory)
Removes a factory (intended for use by the OSGi framework)- Parameters:
factory
- the factory to remove
-
get
public Table get(String identifier)
Description copied from interface:FactoryCatalog
Gets the Factory with this identifier- Specified by:
get
in interfaceFactoryCatalog<Table>
- Parameters:
identifier
- the identifier for the requested Factory- Returns:
- returns the Factory with this identifier, or null if none is found
-
newTable
public Table newTable(String identifier)
Description copied from interface:TableCatalogService
Creates a new table with the specified identifier.- Specified by:
newTable
in interfaceTableCatalogService
- Parameters:
identifier
- the identifier- Returns:
- returns a new table
-
list
public Collection<FactoryProperties> list()
Description copied from interface:TableCatalogService
Lists the tables- Specified by:
list
in interfaceTableCatalogService
- Returns:
- returns a collection of table properties
-
list
public Collection<FactoryProperties> list(TableFilter filter)
Description copied from interface:TableCatalogService
Lists the tables that matches the specified filter- Specified by:
list
in interfaceTableCatalogService
- Parameters:
filter
- the filter- Returns:
- returns a collection fo table properties
-
-