org.dvb.tvanytime.metadata
Class IPDatabase

java.lang.Object
  extended by org.dvb.tvanytime.metadata.IPDatabase
All Implemented Interfaces:
Database

public abstract class IPDatabase
extends java.lang.Object
implements Database

Class providing access a TV Anytime server over IP. A new instance of this class is required for each of the remote databases that a client wishes to access.


Constructor Summary
IPDatabase()
          This constructor is provided for implementations and should not be used by GEM applications.
 
Method Summary
static IPDatabase[] getAvailableDatabases(DatabaseScope scope)
          Get an array of IPDatabases that can provide metadata for the specified scope.
 void getCapabilityDescriptions(CapabilityDescriptionsListener listener)
          Request the capability descriptions for this IPDatabase.
 Locator getURL()
          Get the URL of the host providing this IPDatabase.
static IPDatabase newInstance(CRID crid)
          Get an instance of a IPDatabase where the platform chooses a server that can provide metadata for the given CRID authority.
static IPDatabase newInstance(java.lang.String path)
          Get an instance of an IPDatabase where the caller chooses the server.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.dvb.tvanytime.metadata.Database
getDiscoveryRecord, getMetadata, getMetadata, getOptimisedQueryFields, query, query
 

Constructor Detail

IPDatabase

public IPDatabase()
This constructor is provided for implementations and should not be used by GEM applications.

Method Detail

newInstance

public static IPDatabase newInstance(java.lang.String path)
Get an instance of an IPDatabase where the caller chooses the server.

Parameters:
path - a URL that points to the metadata server.
Returns:
an IPDatabase

newInstance

public static IPDatabase newInstance(CRID crid)
                              throws DatabaseException
Get an instance of a IPDatabase where the platform chooses a server that can provide metadata for the given CRID authority.

Parameters:
crid - The authority field from the supplied CRID is used to decide which metadata server to use.
Returns:
an IPDatabase
Throws:
DatabaseException - if a metadata service cannot be found

getAvailableDatabases

public static IPDatabase[] getAvailableDatabases(DatabaseScope scope)
                                          throws DatabaseException
Get an array of IPDatabases that can provide metadata for the specified scope. This method may block for some time whilst accessing DVB-SI tables.

Parameters:
scope - the required scope of the IPDatabases
Returns:
an array of IPDatabases
Throws:
DatabaseException - if no metadata services can be found for the specified scope

getURL

public Locator getURL()
Get the URL of the host providing this IPDatabase.

Returns:
the URL

getCapabilityDescriptions

public void getCapabilityDescriptions(CapabilityDescriptionsListener listener)
Request the capability descriptions for this IPDatabase.

Parameters:
listener - a CapabilityDescriptionsListener