microsoft.exchange.webservices.data
Class TimeZoneDefinition

java.lang.Object
  extended by microsoft.exchange.webservices.data.ComplexProperty
      extended by microsoft.exchange.webservices.data.TimeZoneDefinition
All Implemented Interfaces:
java.util.Comparator<microsoft.exchange.webservices.data.TimeZoneTransition>

public class TimeZoneDefinition
extends ComplexProperty
implements java.util.Comparator<microsoft.exchange.webservices.data.TimeZoneTransition>

Represents a time zone as defined by the EWS schema.


Field Summary
protected  java.lang.String DaylightPeriodId
          The Daylight period id.
protected  java.lang.String DaylightPeriodName
          The Daylight period name.
protected  java.lang.String id
          The id.
protected  java.lang.String name
          The name.
protected  java.lang.String StandardPeriodId
          The Standard period id.
protected  java.lang.String StandardPeriodName
          The Standard period name.
 
Constructor Summary
protected TimeZoneDefinition()
          Initializes a new instance of the TimeZoneDefinition class.
 
Method Summary
 int compare(microsoft.exchange.webservices.data.TimeZoneTransition x, microsoft.exchange.webservices.data.TimeZoneTransition y)
          Compares the transitions.
 java.lang.String getId()
          Gets the Id of this time zone definition.
 java.lang.String getName()
          Gets the name of this time zone definition.
protected  java.util.Map<java.lang.String,microsoft.exchange.webservices.data.TimeZonePeriod> getPeriods()
          Adds a transition group with a single transition to the specified period.
protected  java.util.Map<java.lang.String,microsoft.exchange.webservices.data.TimeZoneTransitionGroup> getTransitionGroups()
          Gets the transition groups associated with this time zone definition, indexed by Id.
protected  void loadFromXml(microsoft.exchange.webservices.data.EwsServiceXmlReader reader)
          Loads from XML.
protected  void readAttributesFromXml(microsoft.exchange.webservices.data.EwsServiceXmlReader reader)
          Reads the attributes from XML.
protected  void setId(java.lang.String id)
          Sets the id.
protected  void setName(java.lang.String name)
          Sets the name.
protected  boolean tryReadElementFromXml(microsoft.exchange.webservices.data.EwsServiceXmlReader reader)
          Tries to read element from XML.
 void validate()
          Validates this time zone definition.
protected  void writeAttributesToXml(microsoft.exchange.webservices.data.EwsServiceXmlWriter writer)
          Writes the attributes to XML.
protected  void writeElementsToXml(microsoft.exchange.webservices.data.EwsServiceXmlWriter writer)
          Writes elements to XML.
protected  void writeToXml(microsoft.exchange.webservices.data.EwsServiceXmlWriter writer)
          Writes to XML.
protected  void writeToXml(microsoft.exchange.webservices.data.EwsServiceXmlWriter writer, java.lang.String xmlElementName)
          Writes to XML.
 
Methods inherited from class microsoft.exchange.webservices.data.ComplexProperty
addOnChangeEvent, canSetFieldValue, changed, clearChangeEvents, clearChangeLog, func, getNamespace, internalValidate, loadFromXml, loadFromXml, readTextValueFromXml, removeChangeEvent, setNamespace, tryReadElementFromXmlToPatch, updateFromXml, updateFromXml, writeToXml
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface java.util.Comparator
equals
 

Field Detail

StandardPeriodId

protected final java.lang.String StandardPeriodId
The Standard period id.

See Also:
Constant Field Values

StandardPeriodName

protected final java.lang.String StandardPeriodName
The Standard period name.

See Also:
Constant Field Values

DaylightPeriodId

protected final java.lang.String DaylightPeriodId
The Daylight period id.

See Also:
Constant Field Values

DaylightPeriodName

protected final java.lang.String DaylightPeriodName
The Daylight period name.

See Also:
Constant Field Values

name

protected java.lang.String name
The name.


id

protected java.lang.String id
The id.

Constructor Detail

TimeZoneDefinition

protected TimeZoneDefinition()
Initializes a new instance of the TimeZoneDefinition class.

Method Detail

compare

public int compare(microsoft.exchange.webservices.data.TimeZoneTransition x,
                   microsoft.exchange.webservices.data.TimeZoneTransition y)
Compares the transitions.

Specified by:
compare in interface java.util.Comparator<microsoft.exchange.webservices.data.TimeZoneTransition>
Parameters:
x - The first transition.
y - The second transition.
Returns:
A negative number if x is less than y, 0 if x and y are equal, a positive number if x is greater than y.

readAttributesFromXml

protected void readAttributesFromXml(microsoft.exchange.webservices.data.EwsServiceXmlReader reader)
                              throws java.lang.Exception
Reads the attributes from XML.

Overrides:
readAttributesFromXml in class ComplexProperty
Parameters:
reader - the reader
Throws:
java.lang.Exception - the exception

writeAttributesToXml

protected void writeAttributesToXml(microsoft.exchange.webservices.data.EwsServiceXmlWriter writer)
                             throws ServiceXmlSerializationException
Writes the attributes to XML.

Overrides:
writeAttributesToXml in class ComplexProperty
Parameters:
writer - the writer
Throws:
ServiceXmlSerializationException - the service xml serialization exception

tryReadElementFromXml

protected boolean tryReadElementFromXml(microsoft.exchange.webservices.data.EwsServiceXmlReader reader)
                                 throws java.lang.Exception
Tries to read element from XML.

Overrides:
tryReadElementFromXml in class ComplexProperty
Parameters:
reader - the reader
Returns:
True if element was read.
Throws:
java.lang.Exception - the exception

loadFromXml

protected void loadFromXml(microsoft.exchange.webservices.data.EwsServiceXmlReader reader)
                    throws java.lang.Exception
Loads from XML.

Parameters:
reader - the reader
Throws:
java.lang.Exception - the exception

writeElementsToXml

protected void writeElementsToXml(microsoft.exchange.webservices.data.EwsServiceXmlWriter writer)
                           throws java.lang.Exception
Writes elements to XML.

Overrides:
writeElementsToXml in class ComplexProperty
Parameters:
writer - the writer
Throws:
java.lang.Exception - the exception

writeToXml

protected void writeToXml(microsoft.exchange.webservices.data.EwsServiceXmlWriter writer)
                   throws java.lang.Exception
Writes to XML.

Parameters:
writer - The writer.
Throws:
java.lang.Exception - the exception

validate

public void validate()
              throws ServiceLocalException
Validates this time zone definition.

Overrides:
validate in class ComplexProperty
Throws:
ServiceLocalException - the service local exception

getName

public java.lang.String getName()
Gets the name of this time zone definition.

Returns:
the name

setName

protected void setName(java.lang.String name)
Sets the name.

Parameters:
name - the new name

getId

public java.lang.String getId()
Gets the Id of this time zone definition.

Returns:
the id

setId

protected void setId(java.lang.String id)
Sets the id.

Parameters:
id - the new id

getPeriods

protected java.util.Map<java.lang.String,microsoft.exchange.webservices.data.TimeZonePeriod> getPeriods()
Adds a transition group with a single transition to the specified period.

Returns:
A TimeZoneTransitionGroup.

getTransitionGroups

protected java.util.Map<java.lang.String,microsoft.exchange.webservices.data.TimeZoneTransitionGroup> getTransitionGroups()
Gets the transition groups associated with this time zone definition, indexed by Id.

Returns:
the transition groups

writeToXml

protected void writeToXml(microsoft.exchange.webservices.data.EwsServiceXmlWriter writer,
                          java.lang.String xmlElementName)
                   throws java.lang.Exception
Writes to XML.

Overrides:
writeToXml in class ComplexProperty
Parameters:
writer - accepts EwsServiceXmlWriter
xmlElementName - accepts String
Throws:
java.lang.Exception - throws Exception