|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface MonitoredDatabase
Sources of metadata conforming to this interface can be continuously monitored for changes.
Queries are constructed using a DatabaseQuery
object, which is then passed to
different database instances depending on the required source.
Results are returned inside a DatabaseQueryResult
object which is initially empty.
An application can receive a sequence of events as each element is added by providing an instance
of ResultListener
.
The scope of the metadata that is returned by a query can be restricted by the use of
QueryConstraints
.
An application can receive notification of metadata changes that affect the DatabaseQueryResult
by providing an instance of MetadataChangedListener
.
Database
,
DatabaseQuery
,
ResultListener
,
MetadataChangedListener
,
QueryConstraints
,
DatabaseQueryResult
Method Summary | |
---|---|
DatabaseQueryResult |
getMetadata(CRID crid,
ResultListener resultListener,
MetadataChangedListener changeListener)
Get all available metadata on a specific CRID. |
DatabaseQueryResult |
getMetadata(CRID crid,
ResultListener resultListener,
MetadataChangedListener changeListener,
QueryConstraints constraints)
Get all available metadata on a specific CRID. |
DatabaseQueryResult |
query(DatabaseQuery query,
ResultListener resultListener,
MetadataChangedListener changeListener)
Make a metadata query to the database. |
DatabaseQueryResult |
query(DatabaseQuery query,
ResultListener resultListener,
MetadataChangedListener changeListener,
QueryConstraints constraints)
Make a metadata query to the database. |
Methods inherited from interface org.dvb.tvanytime.metadata.Database |
---|
getDiscoveryRecord, getMetadata, getMetadata, getOptimisedQueryFields, query, query |
Method Detail |
---|
DatabaseQueryResult getMetadata(CRID crid, ResultListener resultListener, MetadataChangedListener changeListener) throws DatabaseException
crid
- The CRID to look upresultListener
- an instance of ResultListener or nullchangeListener
- an instance of a metadataChangedListener
DatabaseQueryResult.getAvailableTables()
method can be used to see if this
contains a ProgramInformation or GroupInformation table, which can be used to decide
if this is a group or programme CRID. If the CRID cannot be found, an empty document
will be returned.
Implementations can choose whether or not to inline credits information directly, or to reference a fragment in the CreditsInformationTable.
DatabaseException
- if the CRID is invalid or if there is an error
accessing the database.DatabaseQueryResult getMetadata(CRID crid, ResultListener resultListener, MetadataChangedListener changeListener, QueryConstraints constraints) throws DatabaseException
crid
- The CRID to look upresultListener
- an instance of ResultListener or nullchangeListener
- an instance of a metadataChangedListenerconstraints
- the constraints to apply to this metadata request
DatabaseQueryResult.getAvailableTables()
method can be used to see if this
contains a ProgramInformation or GroupInformation table, which can be used to decide
if this is a group or programme CRID. If the CRID cannot be found, an empty document
will be returned.
Implementations can choose whether or not to inline credits information directly, or to reference a fragment in the CreditsInformationTable. Specifying the CreditsInformationTable in the QueryConstraints determines if the server returns credits information at all, but does not impact the above choice on how to include the credits information. The implementation will not return credits information if the CreditsInformationTable is not specified in the QueryConstraints.
DatabaseException
- if the CRID is invalid or if there is an error
accessing the database.DatabaseQueryResult query(DatabaseQuery query, ResultListener resultListener, MetadataChangedListener changeListener) throws DatabaseException
query
- The query to perform on the databaseresultListener
- an instance of ResultListener or nullchangeListener
- an instance of a metadataChangedListener
Implementations can choose whether or not to inline credits information directly, or to reference a fragment in the CreditsInformationTable.
A ServiceInformationTable will always be included in the response if a ServiceInformation entry is being referenced (using a serviceIDRef) from a ProgramLocationTable.
DatabaseException
- if the CRID is invalid or if there is an error
accessing the database.DatabaseQueryResult query(DatabaseQuery query, ResultListener resultListener, MetadataChangedListener changeListener, QueryConstraints constraints) throws DatabaseException
query
- The query to perform on the databaseresultListener
- an instance of ResultListener or nullchangeListener
- an instance of a metadataChangedListenerconstraints
- the constraints to apply to this metadata request
Implementations can choose whether or not to inline credits information directly, or to reference a fragment in the CreditsInformationTable. Specifying the CreditsInformationTable in the QueryConstraints determines if the server returns credits information at all, but does not impact the above choice on how to include the credits information. The implementation will not return credits information if the CreditsInformationTable is not specified in the QueryConstraints.
A ServiceInformationTable will always be included in the response if a ServiceInformation entry is being referenced (using a serviceIDRef) from a ProgramLocationTable. Thus, specifying the ServiceInformationTable in the QueryConstraints will have no effect if a ProgramLocationTable is being returned.
DatabaseException
- if the CRID is invalid or if there is an error
accessing the database.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |