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 voidaddFactory(TableProvider factory)Adds a factory (intended for use by the OSGi framework)Tableget(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 TableCatalognewInstance()Creates a new TableCatalog and populates it using the SPI (java service provider interface).TablenewTable(String identifier)Creates a new table with the specified identifier.voidremoveFactory(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:FactoryCatalogGets the Factory with this identifier- Specified by:
getin 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:TableCatalogServiceCreates a new table with the specified identifier.- Specified by:
newTablein interfaceTableCatalogService- Parameters:
identifier- the identifier- Returns:
- returns a new table
-
list
public Collection<FactoryProperties> list()
Description copied from interface:TableCatalogServiceLists the tables- Specified by:
listin interfaceTableCatalogService- Returns:
- returns a collection of table properties
-
list
public Collection<FactoryProperties> list(TableFilter filter)
Description copied from interface:TableCatalogServiceLists the tables that matches the specified filter- Specified by:
listin interfaceTableCatalogService- Parameters:
filter- the filter- Returns:
- returns a collection fo table properties
-
-