NIST-SIP: The Reference Implementation for JAIN-SIP 1.2

gov.nist.javax.sdp.fields
Class ZoneField

java.lang.Object
  extended by gov.nist.core.GenericObject
      extended by gov.nist.javax.sdp.fields.SDPObject
          extended by gov.nist.javax.sdp.fields.SDPField
              extended by gov.nist.javax.sdp.fields.ZoneField
All Implemented Interfaces:
SDPFieldNames, Serializable, Cloneable, Field, TimeZoneAdjustment

public class ZoneField
extends SDPField
implements TimeZoneAdjustment

Z= SDP field.

Version:
JSR141-PUBLIC-REVIEW (subject to change).
Author:
Olivier Deruelle , M. Ranganathan
See Also:
Serialized Form

Field Summary
 
Fields inherited from interface gov.nist.javax.sdp.fields.SDPFieldNames
ATTRIBUTE_FIELD, BANDWIDTH_FIELD, CONNECTION_FIELD, EMAIL_FIELD, INFORMATION_FIELD, KEY_FIELD, MEDIA_FIELD, ORIGIN_FIELD, PHONE_FIELD, PROTO_VERSION_FIELD, REPEAT_FIELD, SESSION_NAME_FIELD, TIME_FIELD, URI_FIELD, ZONE_FIELD
 
Constructor Summary
ZoneField()
          Constructor.
 
Method Summary
 void addZoneAdjustment(ZoneAdjustment za)
          Add an element to the zone adjustment list.
 Object clone()
          Clones this object.
 String encode()
          Encode this structure into a canonical form.
 boolean getTypedTime()
          Returns whether the field will be output as a typed time or a integer value.
 SDPObjectList getZoneAdjustments()
          Get the zone adjustment list.
 Hashtable getZoneAdjustments(boolean create)
          Returns a Hashtable of adjustment times, where: key = Date.
 void setTypedTime(boolean typedTime)
          Sets whether the field will be output as a typed time or a integer value.
 void setZoneAdjustments(Hashtable map)
          Sets the Hashtable of adjustment times, where: key = Date.
 
Methods inherited from class gov.nist.javax.sdp.fields.SDPField
getFieldName, getTypeChar, toString
 
Methods inherited from class gov.nist.javax.sdp.fields.SDPObject
dbgPrint, debugDump, equals, match
 
Methods inherited from class gov.nist.core.GenericObject
debugDump, encode, getClassFromName, getMatcher, isMySubclass, makeClone, merge, setMatcher
 
Methods inherited from class java.lang.Object
getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface javax.sdp.Field
getTypeChar
 

Constructor Detail

ZoneField

public ZoneField()
Constructor.

Method Detail

addZoneAdjustment

public void addZoneAdjustment(ZoneAdjustment za)
Add an element to the zone adjustment list.

Parameters:
za - zone adjustment to add.

getZoneAdjustments

public SDPObjectList getZoneAdjustments()
Get the zone adjustment list.

Returns:
the list of zone adjustments.

encode

public String encode()
Encode this structure into a canonical form.

Specified by:
encode in class SDPField

getZoneAdjustments

public Hashtable getZoneAdjustments(boolean create)
                             throws SdpParseException
Returns a Hashtable of adjustment times, where: key = Date. This is the equivalent of the decimal NTP time value. value = Int Adjustment. This is a relative time value in seconds.

Specified by:
getZoneAdjustments in interface TimeZoneAdjustment
Parameters:
create - to set
Returns:
create - when true, an empty Hashtable is created, if it is null.
Throws:
SdpParseException

setZoneAdjustments

public void setZoneAdjustments(Hashtable map)
                        throws SdpException
Sets the Hashtable of adjustment times, where: key = Date. This is the equivalent of the decimal NTP time value. value = Int Adjustment. This is a relative time value in seconds.

Specified by:
setZoneAdjustments in interface TimeZoneAdjustment
Parameters:
map - Hashtable to set
Throws:
SdpException - if the parameter is null

setTypedTime

public void setTypedTime(boolean typedTime)
Sets whether the field will be output as a typed time or a integer value. Typed time is formatted as an integer followed by a unit character. The unit indicates an appropriate multiplier for the integer. The following unit types are allowed. d - days (86400 seconds) h - hours (3600 seconds) m - minutes (60 seconds) s - seconds ( 1 seconds)

Specified by:
setTypedTime in interface TimeZoneAdjustment
Parameters:
typedTime - typedTime - if set true, the start and stop times will be output in an optimal typed time format; if false, the times will be output as integers.

getTypedTime

public boolean getTypedTime()
Returns whether the field will be output as a typed time or a integer value. Typed time is formatted as an integer followed by a unit character. The unit indicates an appropriate multiplier for the integer. The following unit types are allowed. d - days (86400 seconds) h - hours (3600 seconds) m - minutes (60 seconds) s - seconds ( 1 seconds)

Specified by:
getTypedTime in interface TimeZoneAdjustment
Returns:
true, if the field will be output as a typed time; false, if as an integer value.

clone

public Object clone()
Description copied from class: gov.nist.core.GenericObject
Clones this object.

Specified by:
clone in interface Field
Overrides:
clone in class gov.nist.core.GenericObject
Returns:
a clone of this field.

NIST-SIP: The Reference Implementation for JAIN-SIP 1.2

A product of the NIST/ITL Advanced Networking Technologies Division.
See conditions of use.
Submit a bug report or feature request.