|
Copyright 2008 Motorola Inc. and Nokia Corporation. All Rights Reserved. Specification License |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface ServiceGuideData
ServiceGuideData
represents an abstract object in an
Electronic Service Guide (ESG).
,
ProgramEvent
,
Service
and
ServiceComponent
extend from
it to provide the information on an ESG.
PurchaseObject
ServiceGuideData
provides the basic accessor methods to
access at different typed attributes.
Some attributes may return multiple matching values. Two
versions of most of the accessor methods are provided to
access one or multiple matching values:
get<type>Value
and
get<type>Values
.
If get<type>Value
is used on an attribute
that specifies multiple values, only one value (the "default") will
be returned. Due to the nature of object garbage collection in Java,
it is preferrable to use
get<type>Value
if the attribute is known to
only return one value. This is to avoid too many temporary array objects
being generated as a result of the accesses.
ServiceComponent
differs from ProgramEvent
and Service
in that
instances of it can be get only via ServiceContext
while the broadcast is on. ServiceComponent
is indirectly visible in
ServiceGuide
since
CommonMetadataSet.SERVICE_COMPONENT_*
attributes can be used to query
ProgramEvent
s and Service
s. It is possible that that ServiceComponent
data
visible in ServiceGuide
differs from the data get from ServiceComponent
instances from
ServiceContext
. In those cases the application should rely on the data from ServiceComponent
instances.
If the given attribute is not applicable to the particular broadcast
specifications the current service guide is based or the whole service guide data attached to the used
ServiceGuideData
instance is not available the accessor method will throw an
IllegalArgumentException
. If the attribute is applicable but there is no data for the given attribute then
the accessor method throws an DataUnavailableException
.
For instance, application makes a query to the ESG to find services and then changes the platform provider causing the old
ESG to be deleted and a completely one to be downloaded. Now, quering data for the services from the original ESG will
result into IllegalArgumentException
to be thrown even if the used attribute would have been valid for the original
ESG.
Notice that it is implementation specific if the old ESG data is deleted when, for example, the
platform provider is changed. In addition, if the platform provider is changed back to the original and the original ESG
is downloaded again it is not guaranteed that the ServiceGuideData
instances fetched before the
platform provider changes can be used any longer. Applications are advised to make new queries to the ESG
in these kind of situations.
Method Summary | |
---|---|
boolean |
equals(java.lang.Object data)
Compares two ServiceGuideData objects to see if they represent the same service guide information. |
MetadataSet[] |
getAvailableMetadataSets()
Get the list of MetadataSet specs currently available for this
ServiceGuideData instance. |
boolean |
getBooleanValue(BooleanAttribute attribute)
Get the value of a boolean attribute. |
boolean[] |
getBooleanValues(BooleanAttribute attribute)
Get one or more values of a boolean attribute. |
java.util.Date |
getDateValue(DateAttribute attribute)
Get the value of a date attribute. |
java.util.Date[] |
getDateValues(DateAttribute attribute)
Get one or more values of a date attribute. |
double |
getDoubleValue(NumericAttribute attribute)
Get the double value of a numeric attribute. |
double[] |
getDoubleValues(NumericAttribute attribute)
Get one or more values of a double attribute. |
long |
getLongValue(NumericAttribute attribute)
Get the long value of a numeric attribute. |
long[] |
getLongValues(NumericAttribute attribute)
Get one or more long values of a numeric attribute. |
java.lang.Object |
getObjectValue(ObjectAttribute attribute)
Get the value of a generic attribute. |
java.lang.Object[] |
getObjectValues(ObjectAttribute attribute)
Get one or more values of a generic attribute. |
java.lang.String |
getStringValue(StringAttribute attribute)
Get the value of a string attribute. |
java.lang.String[] |
getStringValues(StringAttribute attribute)
Get one or more values of a string attribute. |
Method Detail |
---|
boolean equals(java.lang.Object data)
equals
in class java.lang.Object
true
if the given ServiceGuideData represents the same
service guide information as this object.MetadataSet[] getAvailableMetadataSets()
MetadataSet
specs currently available for this
ServiceGuideData
instance. Available MetadataSet
s
may vary depending on the availability of the associated ServiceGuide
.
MetadataSet
s. An empty array is returned if the
service guide associated to this ServiceGuideData
is not available.boolean getBooleanValue(BooleanAttribute attribute) throws java.lang.IllegalArgumentException, DataUnavailableException
attribute
- boolean attribute to query the data for.
java.lang.NullPointerException
- Thrown if the given attribute is
null
.
java.lang.IllegalArgumentException
- Thrown if the given attribute is not valid
or the ServiceGuideData
is deleted.
DataUnavailableException
- Thrown if there is no data for the given attribute.boolean[] getBooleanValues(BooleanAttribute attribute) throws java.lang.IllegalArgumentException, DataUnavailableException
attribute
- boolean attribute to query the data for.
java.lang.NullPointerException
- Thrown if the given attribute is
null
.
java.lang.IllegalArgumentException
- Thrown if the given attribute is not valid
or the ServiceGuideData
is deleted.
DataUnavailableException
- Thrown if there is no data for the given attribute.java.util.Date getDateValue(DateAttribute attribute) throws java.lang.IllegalArgumentException, DataUnavailableException
attribute
- date attribute to query the data for.
getDateValues(DateAttribute attribute)
method.
java.lang.NullPointerException
- Thrown if the given attribute is
null
.
java.lang.IllegalArgumentException
- Thrown if the given attribute is not valid
or the ServiceGuideData
is deleted.
DataUnavailableException
- Thrown if there is no data for the given attribute.java.util.Date[] getDateValues(DateAttribute attribute) throws java.lang.IllegalArgumentException, DataUnavailableException
attribute
- date attribute to query the data for.
Date
.
java.lang.NullPointerException
- Thrown if the given attribute is
null
.
java.lang.IllegalArgumentException
- Thrown if the given attribute is not valid
or the ServiceGuideData
is deleted.
DataUnavailableException
- Thrown if there is no data for the given attribute.double getDoubleValue(NumericAttribute attribute) throws java.lang.IllegalArgumentException, DataUnavailableException
attribute
- numeric attribute to query the data for.
getDoubleValues(NumericAttribute attribute)
method.
java.lang.NullPointerException
- Thrown if the given attribute is
null
.
java.lang.IllegalArgumentException
- Thrown if the given attribute is not valid
or the ServiceGuideData
is deleted.
DataUnavailableException
- Thrown if there is no data for the given attribute.double[] getDoubleValues(NumericAttribute attribute) throws java.lang.IllegalArgumentException, DataUnavailableException
attribute
- numeric attribute to query the data for.
java.lang.NullPointerException
- Thrown if the given attribute is
null
.
java.lang.IllegalArgumentException
- Thrown if the given attribute is not valid
or the ServiceGuideData
is deleted.
DataUnavailableException
- Thrown if there is no data for the given attribute.long getLongValue(NumericAttribute attribute) throws java.lang.IllegalArgumentException, DataUnavailableException
attribute
- numeric attribute to query the data for.
getLongValues(NumericAttribute attribute)
method.
If NumericAttribute
is referring to double
the return value is changed to
long
by casting.
java.lang.NullPointerException
- Thrown if the given attribute is
null
.
java.lang.IllegalArgumentException
- Thrown if the given attribute is not valid
or the ServiceGuideData
is deleted.
DataUnavailableException
- Thrown if there is no data for the given attribute.long[] getLongValues(NumericAttribute attribute) throws java.lang.IllegalArgumentException, DataUnavailableException
attribute
- numeric attribute to query the data for.
long
value.
If NumericAttribute
is referring to double
the return values are changed to
long
by casting.
java.lang.NullPointerException
- Thrown if the given attribute is
null
.
java.lang.IllegalArgumentException
- Thrown if the given attribute is not valid
or the ServiceGuideData
is deleted.
DataUnavailableException
- Thrown if there is no data for the given attribute.java.lang.Object getObjectValue(ObjectAttribute attribute) throws java.lang.IllegalArgumentException, DataUnavailableException
java.lang.Object
. It's up to the application
to determine its type by using instanceof
, for
example.
attribute
- object attribute to query the data for.
getObjectValues(ObjectAttribute attribute)
method.
java.lang.NullPointerException
- Thrown if the given attribute is
null
.
java.lang.IllegalArgumentException
- Thrown if the given attribute is not valid
or the ServiceGuideData
is deleted.
DataUnavailableException
- Thrown if there is no data for the given attribute.java.lang.Object[] getObjectValues(ObjectAttribute attribute) throws java.lang.IllegalArgumentException, DataUnavailableException
java.lang.Object
. It's up to the application
to determine its type by using instanceof
, for
example.
attribute
- object attribute to query the data for.
Object
.
java.lang.NullPointerException
- Thrown if the given attribute is
null
.
java.lang.IllegalArgumentException
- Thrown if the given attribute is not valid
or the ServiceGuideData
is deleted.
DataUnavailableException
- Thrown if there is no data for the given attribute.java.lang.String getStringValue(StringAttribute attribute) throws java.lang.IllegalArgumentException, DataUnavailableException
attribute
- string attribute to query the data for.
getStringValues(StringAttribute attribute)
method.
java.lang.NullPointerException
- Thrown if the given attribute is
null
.
java.lang.IllegalArgumentException
- Thrown if the given attribute is not valid
or the ServiceGuideData
is deleted.
DataUnavailableException
- Thrown if there is no data for the given attribute.java.lang.String[] getStringValues(StringAttribute attribute) throws java.lang.IllegalArgumentException, DataUnavailableException
attribute
- string attribute to query the data for.
String
.
java.lang.NullPointerException
- Thrown if the given attribute is
null
.
java.lang.IllegalArgumentException
- Thrown if the given attribute is not valid
or the ServiceGuideData
is deleted.
DataUnavailableException
- Thrown if there is no data for the given attribute.
|
Copyright 2008 Motorola Inc. and Nokia Corporation. All Rights Reserved. Specification License |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |