com.esri.arcgis.system
Class TimeZoneInfo

java.lang.Object
  extended by com.esri.arcgis.system.TimeZoneInfo
All Implemented Interfaces:
com.esri.arcgis.interop.RemoteObjRef, IClone, IDocumentVersionSupportGEN, IPersist, IPersistStream, ITimeZoneInfo, IXMLSerialize, IXMLVersionSupport, Externalizable, Serializable

public class TimeZoneInfo
extends Object
implements com.esri.arcgis.interop.RemoteObjRef, ITimeZoneInfo, IXMLSerialize, IXMLVersionSupport, IClone, IPersistStream, IDocumentVersionSupportGEN, Externalizable

An object that represents a time zone information.

Description

The TimeZoneInfo is a class that has details about the time zone and the rules used to determine the beginning and ending for daylight savings time. It also contains details such as the number of hours difference between this particular time zone and Coordinated Universal Time (UTC). The class can include several instances of the TimeZoneRule class which contains all of the daylight savings time rules for a single year. In this manner, the TimeZoneInfo class can contain all of the historical daylight savings time rules that were used in a region throughout history.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

See Also:
Serialized Form

Constructor Summary
TimeZoneInfo()
          Constructs a TimeZoneInfo using ArcGIS Engine.
TimeZoneInfo(Object obj)
          Deprecated. As of ArcGIS 9.2, replaced by normal Java casts.
TimeZoneInfo theTimeZoneInfo = (TimeZoneInfo) obj;
 
Method Summary
 void addDynamicRule(ITimeZoneRule dynamicRule)
          Adds a dynamic adjustment to the time zone.
 void assign(IClone src)
          Assigns the properties of src to the receiver.
 Object convertToSupportedObject(int docVersion)
          Convert the object to another object that is supported.
 void deserialize(IXMLSerializeData data)
          Deserializes an object from XML.
 boolean equals(Object o)
          Compare this object with another
 IClone esri_clone()
          Clones the receiver and assigns the result to *clone.
 void getClassID(GUID[] pClassID)
          getClassID
static String getClsid()
          getClsid.
 String getCustomDescription()
          Custom description for the time zone.
 String getDaylightTimeName()
          The time zone name during daylight time.
 ITimeZoneRule getDefaultRule()
          The default time zone adjustment rule.
 String getDisplayName()
          Descriptive display name of the time zone.
 ITimeZoneRule getDynamicRule(int year)
          The dynamic adjustment rule for a specific year.
 int getDynamicRulesCount()
          Number of dynamic adjustment rules for the time zone.
 int getFirstDynamicRuleYear()
          The first dynamic adjustment rule year.
 int getLastDynamicRuleYear()
          The last dynamic adjustment rule year.
 String getMinNamespaceSupported()
          The minimum namespace the class can serialize to (eg the 90 namespace).
 int getNextDynamicRuleYear(int currentDynamicRuleYear)
          The next dynamic adjustment rule year that cyclicly proceeds the given dynamic adjustment rule year.
 void getSizeMax(_ULARGE_INTEGER[] pcbSize)
          getSizeMax
 String getStandardTimeName()
          The time zone name during standard time.
 String getWindowsID()
          Time zone Windows ID name.
 int hashCode()
          the hashcode for this object
 void isDirty()
          isDirty
 boolean isEqual(IClone other)
          Indicates if the receiver and other have the same properties.
 boolean isIdentical(IClone other)
          Indicates if the receiver and other are the same object.
 boolean isSupportedAtVersion(int docVersion)
          Is this object valid at the given document version.
 void load(IStream pstm)
          load
 void readExternal(ObjectInput in)
           
 void save(IStream pstm, int fClearDirty)
          save
 void serialize(IXMLSerializeData data)
          Serializes an object to XML.
 void setCustomDescription(String displayName)
          Custom description for the time zone.
 void setDaylightTimeName(String daylightTimeName)
          The time zone name during daylight time.
 void setDefaultRule(ITimeZoneRule defaultTimeZoneRule)
          The default time zone adjustment rule.
 void setDisplayName(String displayName)
          Descriptive display name of the time zone.
 void setStandardTimeName(String standardTimeName)
          The time zone name during standard time.
 void setWindowsID(String windowsID)
          Time zone Windows ID name.
 void writeExternal(ObjectOutput out)
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.esri.arcgis.interop.RemoteObjRef
getJintegraDispatch, release
 

Constructor Detail

TimeZoneInfo

public TimeZoneInfo()
             throws IOException,
                    UnknownHostException
Constructs a TimeZoneInfo using ArcGIS Engine.

Throws:
IOException - if there are interop problems
UnknownHostException - if there are interop problems

TimeZoneInfo

public TimeZoneInfo(Object obj)
             throws IOException
Deprecated. As of ArcGIS 9.2, replaced by normal Java casts.
TimeZoneInfo theTimeZoneInfo = (TimeZoneInfo) obj;

Construct a TimeZoneInfo using a reference to such an object returned from ArcGIS Engine or Server. This is semantically equivalent to casting obj to TimeZoneInfo.

Parameters:
obj - an object returned from ArcGIS Engine or Server
Throws:
IOException - if there are interop problems
Method Detail

getClsid

public static String getClsid()
getClsid.


equals

public boolean equals(Object o)
Compare this object with another

Overrides:
equals in class Object

hashCode

public int hashCode()
the hashcode for this object

Overrides:
hashCode in class Object

getWindowsID

public String getWindowsID()
                    throws IOException,
                           AutomationException
Time zone Windows ID name.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Specified by:
getWindowsID in interface ITimeZoneInfo
Returns:
The windowsID
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

setWindowsID

public void setWindowsID(String windowsID)
                  throws IOException,
                         AutomationException
Time zone Windows ID name.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Specified by:
setWindowsID in interface ITimeZoneInfo
Parameters:
windowsID - The windowsID (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getDisplayName

public String getDisplayName()
                      throws IOException,
                             AutomationException
Descriptive display name of the time zone.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Specified by:
getDisplayName in interface ITimeZoneInfo
Returns:
The displayName
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

setDisplayName

public void setDisplayName(String displayName)
                    throws IOException,
                           AutomationException
Descriptive display name of the time zone.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Specified by:
setDisplayName in interface ITimeZoneInfo
Parameters:
displayName - The displayName (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getCustomDescription

public String getCustomDescription()
                            throws IOException,
                                   AutomationException
Custom description for the time zone.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Specified by:
getCustomDescription in interface ITimeZoneInfo
Returns:
The displayName
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

setCustomDescription

public void setCustomDescription(String displayName)
                          throws IOException,
                                 AutomationException
Custom description for the time zone.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Specified by:
setCustomDescription in interface ITimeZoneInfo
Parameters:
displayName - The displayName (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getDaylightTimeName

public String getDaylightTimeName()
                           throws IOException,
                                  AutomationException
The time zone name during daylight time.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Specified by:
getDaylightTimeName in interface ITimeZoneInfo
Returns:
The daylightTimeName
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

setDaylightTimeName

public void setDaylightTimeName(String daylightTimeName)
                         throws IOException,
                                AutomationException
The time zone name during daylight time.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Specified by:
setDaylightTimeName in interface ITimeZoneInfo
Parameters:
daylightTimeName - The daylightTimeName (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getStandardTimeName

public String getStandardTimeName()
                           throws IOException,
                                  AutomationException
The time zone name during standard time.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Specified by:
getStandardTimeName in interface ITimeZoneInfo
Returns:
The standardTimeName
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

setStandardTimeName

public void setStandardTimeName(String standardTimeName)
                         throws IOException,
                                AutomationException
The time zone name during standard time.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Specified by:
setStandardTimeName in interface ITimeZoneInfo
Parameters:
standardTimeName - The standardTimeName (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getDefaultRule

public ITimeZoneRule getDefaultRule()
                             throws IOException,
                                    AutomationException
The default time zone adjustment rule.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Specified by:
getDefaultRule in interface ITimeZoneInfo
Returns:
A reference to a com.esri.arcgis.system.ITimeZoneRule
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

setDefaultRule

public void setDefaultRule(ITimeZoneRule defaultTimeZoneRule)
                    throws IOException,
                           AutomationException
The default time zone adjustment rule.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Specified by:
setDefaultRule in interface ITimeZoneInfo
Parameters:
defaultTimeZoneRule - A reference to a com.esri.arcgis.system.ITimeZoneRule (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getDynamicRulesCount

public int getDynamicRulesCount()
                         throws IOException,
                                AutomationException
Number of dynamic adjustment rules for the time zone.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Specified by:
getDynamicRulesCount in interface ITimeZoneInfo
Returns:
The dynamicRulesCount
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getFirstDynamicRuleYear

public int getFirstDynamicRuleYear()
                            throws IOException,
                                   AutomationException
The first dynamic adjustment rule year.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Specified by:
getFirstDynamicRuleYear in interface ITimeZoneInfo
Returns:
The firstDynamicRuleYear
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getLastDynamicRuleYear

public int getLastDynamicRuleYear()
                           throws IOException,
                                  AutomationException
The last dynamic adjustment rule year.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Specified by:
getLastDynamicRuleYear in interface ITimeZoneInfo
Returns:
The lastDynamicRuleYear
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getNextDynamicRuleYear

public int getNextDynamicRuleYear(int currentDynamicRuleYear)
                           throws IOException,
                                  AutomationException
The next dynamic adjustment rule year that cyclicly proceeds the given dynamic adjustment rule year.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Specified by:
getNextDynamicRuleYear in interface ITimeZoneInfo
Parameters:
currentDynamicRuleYear - The currentDynamicRuleYear (in)
Returns:
The nextDynamicRuleYear
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getDynamicRule

public ITimeZoneRule getDynamicRule(int year)
                             throws IOException,
                                    AutomationException
The dynamic adjustment rule for a specific year.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Specified by:
getDynamicRule in interface ITimeZoneInfo
Parameters:
year - The year (in)
Returns:
A reference to a com.esri.arcgis.system.ITimeZoneRule
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

addDynamicRule

public void addDynamicRule(ITimeZoneRule dynamicRule)
                    throws IOException,
                           AutomationException
Adds a dynamic adjustment to the time zone.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Specified by:
addDynamicRule in interface ITimeZoneInfo
Parameters:
dynamicRule - A reference to a com.esri.arcgis.system.ITimeZoneRule (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

serialize

public void serialize(IXMLSerializeData data)
               throws IOException,
                      AutomationException
Serializes an object to XML.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Supported Platforms

Windows, Solaris, Linux

Specified by:
serialize in interface IXMLSerialize
Parameters:
data - A reference to a com.esri.arcgis.system.IXMLSerializeData (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

deserialize

public void deserialize(IXMLSerializeData data)
                 throws IOException,
                        AutomationException
Deserializes an object from XML.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Supported Platforms

Windows, Solaris, Linux

Specified by:
deserialize in interface IXMLSerialize
Parameters:
data - A reference to a com.esri.arcgis.system.IXMLSerializeData (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getMinNamespaceSupported

public String getMinNamespaceSupported()
                                throws IOException,
                                       AutomationException
The minimum namespace the class can serialize to (eg the 90 namespace).

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Specified by:
getMinNamespaceSupported in interface IXMLVersionSupport
Returns:
The namespaceURI
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

esri_clone

public IClone esri_clone()
                  throws IOException,
                         AutomationException
Clones the receiver and assigns the result to *clone.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Specified by:
esri_clone in interface IClone
Returns:
A reference to a com.esri.arcgis.system.IClone
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

assign

public void assign(IClone src)
            throws IOException,
                   AutomationException
Assigns the properties of src to the receiver.

Description

Use Assign method to assign the properties of source object to receiver object. Both objects need to have the same CLSIDs. Both source and receiver objects need to be instantiated.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Supported Platforms

Windows, Solaris, Linux

Specified by:
assign in interface IClone
Parameters:
src - A reference to a com.esri.arcgis.system.IClone (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

isEqual

public boolean isEqual(IClone other)
                throws IOException,
                       AutomationException
Indicates if the receiver and other have the same properties.

Description

IsEqual returns True if the receiver and the source have the same properties. Note, this does not imply that the receiver and the source reference the same object.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Supported Platforms

Windows, Solaris, Linux

Specified by:
isEqual in interface IClone
Parameters:
other - A reference to a com.esri.arcgis.system.IClone (in)
Returns:
The equal
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

isIdentical

public boolean isIdentical(IClone other)
                    throws IOException,
                           AutomationException
Indicates if the receiver and other are the same object.

Description

IsIdentical returns true if the receiver and the source reference the same object.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Supported Platforms

Windows, Solaris, Linux

Specified by:
isIdentical in interface IClone
Parameters:
other - A reference to a com.esri.arcgis.system.IClone (in)
Returns:
The identical
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

isDirty

public void isDirty()
             throws IOException,
                    AutomationException
isDirty

Description

IPersistStream is a Microsoft interface. Please refer to MSDN for information about this interface.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Supported Platforms

Windows, Solaris, Linux

Specified by:
isDirty in interface IPersistStream
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

load

public void load(IStream pstm)
          throws IOException,
                 AutomationException
load

Description

IPersistStream is a Microsoft interface. Please refer to MSDN for information about this interface.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Supported Platforms

Windows, Solaris, Linux

Specified by:
load in interface IPersistStream
Parameters:
pstm - A reference to a com.esri.arcgis.system.IStream (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

save

public void save(IStream pstm,
                 int fClearDirty)
          throws IOException,
                 AutomationException
save

Description

IPersistStream is a Microsoft interface. Please refer to MSDN for information about this interface.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Supported Platforms

Windows, Solaris, Linux

Specified by:
save in interface IPersistStream
Parameters:
pstm - A reference to a com.esri.arcgis.system.IStream (in)
fClearDirty - The fClearDirty (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getSizeMax

public void getSizeMax(_ULARGE_INTEGER[] pcbSize)
                throws IOException,
                       AutomationException
getSizeMax

Description

IPersistStream is a Microsoft interface. Please refer to MSDN for information about this interface.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Supported Platforms

Windows, Solaris, Linux

Specified by:
getSizeMax in interface IPersistStream
Parameters:
pcbSize - A Structure: com.esri.arcgis.system._ULARGE_INTEGER (out: use single element array)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getClassID

public void getClassID(GUID[] pClassID)
                throws IOException,
                       AutomationException
getClassID

Description

IPersist is a Microsoft interface. Please refer to MSDN for information about this interface.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Supported Platforms

Windows, Solaris, Linux

Specified by:
getClassID in interface IPersist
Parameters:
pClassID - A Structure: com.esri.arcgis.support.ms.stdole.GUID (out: use single element array)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

isSupportedAtVersion

public boolean isSupportedAtVersion(int docVersion)
                             throws IOException,
                                    AutomationException
Is this object valid at the given document version.

Remarks

Use IsSupportedAtVersion to identify if a particular object should be saved to the ObjectStream. This result is based on the esriArcGISVersion enumeration. In some instances, if the object is not supported at a particular ArcGIS version, the object may support conversion to another similar object; use IDocumentVersionSupportGEN::ConvertToSupportedObject to accomplish this.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Specified by:
isSupportedAtVersion in interface IDocumentVersionSupportGEN
Parameters:
docVersion - A com.esri.arcgis.system.esriArcGISVersion constant (in)
Returns:
The supported
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

convertToSupportedObject

public Object convertToSupportedObject(int docVersion)
                                throws IOException,
                                       AutomationException
Convert the object to another object that is supported.

Remarks

This method should be used when IDocumentVersionSupportGEN::IsSupportedAtVersion returns FALSE. Calling ConvertToSupportedObject will return an IUnknown pointer to a relevant object supported at the particular ArcGIS version. Not all objects will return a supported object; in these cases a null pointer will be returned.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Specified by:
convertToSupportedObject in interface IDocumentVersionSupportGEN
Parameters:
docVersion - A com.esri.arcgis.system.esriArcGISVersion constant (in)
Returns:
A Variant
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

writeExternal

public void writeExternal(ObjectOutput out)
                   throws IOException
Specified by:
writeExternal in interface Externalizable
Throws:
IOException

readExternal

public void readExternal(ObjectInput in)
                  throws IOException,
                         ClassNotFoundException
Specified by:
readExternal in interface Externalizable
Throws:
IOException
ClassNotFoundException