org.dvb.tvanytime.metadata
Class DatabaseScope

java.lang.Object
  extended by org.dvb.tvanytime.metadata.DatabaseScope

public class DatabaseScope
extends java.lang.Object

Class representing the desired scope of a metadata database. In DVB systems the scope of a metadata service is defined by the locations in which a Metadata Pointer Descriptor can be found. Optionally, it is possible to restrict the scope to a specific set of fragment types.


Field Summary
static int BOUQUET_ID
          The value of contextIdType when the contextId is a bouquet_id.
static int NETWORK_ID
          The value of contextIdType when the contextId is a network_id.
static int ORIG_NET_ID
          The value of contextIdType when the contextId is an original_network_id.
 
Constructor Summary
DatabaseScope(CRID crid)
          Create a DatabaseScope that encompasses a specified CRID authority.
DatabaseScope(org.davic.net.dvb.DvbLocator service)
          Create a DatabaseScope that encompasses a specified DVB service.
DatabaseScope(int contextId, int contextIdType)
          Create a DatabaseScope that encompasses a specified contextId and contextIdType.
DatabaseScope(java.lang.String resolutionProvider)
          Create a DatabaseScope that encompasses a specified resolution provider.
 
Method Summary
 int[] getFragmentTypes()
          Get the required fragment types of this DatabaseScope.
 void setFragmentTypes(int[] fragmentTypes)
          Set the required fragment types.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

BOUQUET_ID

public static final int BOUQUET_ID
The value of contextIdType when the contextId is a bouquet_id.

See Also:
Constant Field Values

ORIG_NET_ID

public static final int ORIG_NET_ID
The value of contextIdType when the contextId is an original_network_id.

See Also:
Constant Field Values

NETWORK_ID

public static final int NETWORK_ID
The value of contextIdType when the contextId is a network_id.

See Also:
Constant Field Values
Constructor Detail

DatabaseScope

public DatabaseScope(CRID crid)
Create a DatabaseScope that encompasses a specified CRID authority.

Parameters:
crid - the authority field is taken from the supplied CRID

DatabaseScope

public DatabaseScope(java.lang.String resolutionProvider)
Create a DatabaseScope that encompasses a specified resolution provider.

Parameters:
resolutionProvider - the name of the resolutionProvider

DatabaseScope

public DatabaseScope(org.davic.net.dvb.DvbLocator service)
Create a DatabaseScope that encompasses a specified DVB service.

Parameters:
service - a DVB locator that identifies the DVB service

DatabaseScope

public DatabaseScope(int contextId,
                     int contextIdType)
Create a DatabaseScope that encompasses a specified contextId and contextIdType. These fields are used in the Resolution Notification Table defined in ETSI TS 102 323 where appropriate metadata services may be identified by a Metadata Pointer Descriptor. In the case where the contextId is network_id or a bouquet_id appropriate metadata services may also be identified by a Metadata Pointer Descriptor in the NIT or BAT respectively.

Parameters:
contextId - the contextId
contextIdType - a value selected from NETWORK_ID, ORIG_NET_ID and BOUQUET_ID.
Method Detail

setFragmentTypes

public void setFragmentTypes(int[] fragmentTypes)
Set the required fragment types. The supplied values are compared against the optional list of fragment_type values that may be carried in a Metadata Pointer Descriptor. If none of the required values are present, or if this list is not available (i.e. the fragment_types_flag of the descriptor is set to '0') then a DVBDatabase will be considered to be out of scope.

Parameters:
fragmentTypes - an array of fragment_type values, as specified in ETSI TS 102 323.

getFragmentTypes

public int[] getFragmentTypes()
Get the required fragment types of this DatabaseScope.

Returns:
an array of fragment_type values, as specified in ETSI TS 102 323.