com.esri.arcgis.system
Class Time

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

public class Time
extends Object
implements com.esri.arcgis.interop.RemoteObjRef, ITime, ITimeOffsetOperator, IXMLSerialize, IXMLVersionSupport, IClone, IPersistStream, IDocumentVersionSupportGEN, Externalizable

An object that represents a date and time value.

Product Availability

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

See Also:
Serialized Form

Constructor Summary
Time()
          Constructs a Time using ArcGIS Engine.
Time(Object obj)
          Deprecated. As of ArcGIS 9.2, replaced by normal Java casts.
Time theTime = (Time) obj;
 
Method Summary
 void addDays(double value)
          Adds the input amount of days.
 void addDuration(ITimeDuration timeDuration)
          Adds a time duration.
 void addHours(double value)
          Adds the input amount of hours.
 void addMilliseconds(double value)
          Adds the input amount of milliseconds.
 void addMinutes(double value)
          Adds the input amount of minutes.
 boolean addMonths(double value, boolean preserveEndOfMonth, boolean goForwardOnInvalidDate)
          Adds the input amount of months.
 void addNanoseconds(long value)
          Adds the input amount of nanoseconds.
 void addSeconds(double value)
          Adds the input amount of seconds.
 void addWeeks(double value)
          Adds the input amount of weeks.
 boolean addYears(double value, boolean preserveEndOfMonth, boolean goForwardOnInvalidDate)
          Adds the input amount of years.
 void assign(IClone src)
          Assigns the properties of src to the receiver.
 int compare(ITime otherTime)
          Compares this time to the other time.
 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.
 short getDay()
          The time's gregorian day.
 short getHour()
          The time's hour.
 String getMinNamespaceSupported()
          The minimum namespace the class can serialize to (eg the 90 namespace).
 short getMinute()
          The time's minute.
 short getMonth()
          The time's gregorian month.
 int getNanoseconds()
          The time's nanoseconds.
 short getSecond()
          The time's second.
 void getSizeMax(_ULARGE_INTEGER[] pcbSize)
          getSizeMax
 short getYear()
          The time's gregorian year.
 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
 double queryDayFraction()
          The time's time portion as a day fraction.
 _WKSDateTime queryGregorianTime()
          Obtains the time as a gregorian date and time.
 long queryIntegerTime(int integerTimeFormat)
          Obtains the time as an integer time.
 int queryJulianDayNumber()
          The Time's date portion as a julian (Julius Scaliger) day number.
 long queryNanosecondsSinceMidnight()
          The time's time portion as the number of nanoseconds elapsed since midnight.
 Date queryOleTime()
          Obtains the time as an OLE automation date object.
 long queryTicks()
          Obtains the time as the number of ticks since January 1, 0001 AD (Anno Domini).
 String queryTimeString(int timeStringFormat)
          Obtains the time as a string, based on the given time string format.
 String queryTimeStringCurrentLocale(int timeLocaleFormat)
          Obtains the time as a string, based on the current locale.
 String queryTimeStringCustom(String timeStringFormat, int localeID, String amSymbol, String pmSymbol)
          Obtains the time as a string, based on the given custom time string format, and locale properties.
 String queryXMLTimeString(ITimeReference timeReference)
          Obtains the time as an XML time string.
 void readExternal(ObjectInput in)
           
 void save(IStream pstm, int fClearDirty)
          save
 void serialize(IXMLSerializeData data)
          Serializes an object to XML.
 void setDay(short day)
          The time's gregorian day.
 void setDayFraction(double dayFraction)
          The time's time portion as a day fraction.
 void setFromCurrentLocalTime()
          Writes the time to the current date and time on this machine, expressed as the local time.
 void setFromCurrentUtcTime()
          Writes the time to the current date and time on this machine, expressed as the Coordinated Universal Time (UTC).
 void setFromGregorianTime(_WKSDateTime gregorianTime)
          Obtains the time from a given gregorian date and time value.
 void setFromIntegerTime(int integerTimeFormat, long integerTime)
          Writes the time from an integer time.
 void setFromObject(Object object)
          Writes the time from a variant object.
 void setFromOleTime(Date oleTime)
          Writes the time from an OLE automation date object.
 void setFromTicks(long ticks)
          Writes the time from a given number of ticks since January 1, 0001 AD (Anno Domini) value.
 void setFromTimeString(int timeStringFormat, String timeString)
          Writes the time from a string, based on the given time string format.
 void setFromTimeStringCurrentLocale(int timeLocaleFormat, String timeString)
          Obtains the time from a string, based on the current locale.
 void setFromTimeStringCustom(String timeStringFormat, int localeID, String amSymbol, String pmSymbol, String timeString)
          Writes the time from a string, based on the given custom time string formats, and locale properties.
 int setFromXMLTimeString(String xmlTimeString)
          Writes the time from an XML time string.
 void setHour(short hour)
          The time's hour.
 void setJulianDayNumber(int julianDayNumber)
          The Time's date portion as a julian (Julius Scaliger) day number.
 void setMinute(short minute)
          The time's minute.
 void setMonth(short month)
          The time's gregorian month.
 void setNanoseconds(int nanoseconds)
          The time's nanoseconds.
 void setNanosecondsSinceMidnight(long nanosecondsSinceMidnight)
          The time's time portion as the number of nanoseconds elapsed since midnight.
 void setSecond(short second)
          The time's second.
 void setYear(short year)
          The time's gregorian year.
 void snapToEndOfMonth()
          Adjust the day value, to the last day in the current month and year.
 void subtractDuration(ITimeDuration timeDuration)
          Subtracts a time duration.
 ITimeDuration subtractTime(ITime time)
          Subtracts a given time, and returns the time duration result.
 void toLocal()
          Converts the time from Coordinated Universal Time (UTC) value to local (to this machine) time.
 void toUTC()
          Converts the time from local (to this machine) time value to Coordinated Universal Time (UTC).
 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

Time

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

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

Time

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

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

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

getYear

public short getYear()
              throws IOException,
                     AutomationException
The time's gregorian year.

Product Availability

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

Specified by:
getYear in interface ITime
Returns:
The year
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

setYear

public void setYear(short year)
             throws IOException,
                    AutomationException
The time's gregorian year.

Product Availability

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

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

getMonth

public short getMonth()
               throws IOException,
                      AutomationException
The time's gregorian month.

Product Availability

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

Specified by:
getMonth in interface ITime
Returns:
The month
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

setMonth

public void setMonth(short month)
              throws IOException,
                     AutomationException
The time's gregorian month.

Product Availability

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

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

getDay

public short getDay()
             throws IOException,
                    AutomationException
The time's gregorian day.

Product Availability

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

Specified by:
getDay in interface ITime
Returns:
The day
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

setDay

public void setDay(short day)
            throws IOException,
                   AutomationException
The time's gregorian day.

Product Availability

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

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

getHour

public short getHour()
              throws IOException,
                     AutomationException
The time's hour.

Product Availability

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

Specified by:
getHour in interface ITime
Returns:
The hour
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

setHour

public void setHour(short hour)
             throws IOException,
                    AutomationException
The time's hour.

Product Availability

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

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

getMinute

public short getMinute()
                throws IOException,
                       AutomationException
The time's minute.

Product Availability

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

Specified by:
getMinute in interface ITime
Returns:
The minute
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

setMinute

public void setMinute(short minute)
               throws IOException,
                      AutomationException
The time's minute.

Product Availability

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

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

getSecond

public short getSecond()
                throws IOException,
                       AutomationException
The time's second.

Product Availability

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

Specified by:
getSecond in interface ITime
Returns:
The second
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

setSecond

public void setSecond(short second)
               throws IOException,
                      AutomationException
The time's second.

Product Availability

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

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

getNanoseconds

public int getNanoseconds()
                   throws IOException,
                          AutomationException
The time's nanoseconds.

Product Availability

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

Specified by:
getNanoseconds in interface ITime
Returns:
The nanoseconds
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

setNanoseconds

public void setNanoseconds(int nanoseconds)
                    throws IOException,
                           AutomationException
The time's nanoseconds.

Product Availability

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

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

queryJulianDayNumber

public int queryJulianDayNumber()
                         throws IOException,
                                AutomationException
The Time's date portion as a julian (Julius Scaliger) day number. Corresponds to the Year, Month, and Day properties.

Product Availability

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

Specified by:
queryJulianDayNumber in interface ITime
Returns:
The julianDayNumber
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

setJulianDayNumber

public void setJulianDayNumber(int julianDayNumber)
                        throws IOException,
                               AutomationException
The Time's date portion as a julian (Julius Scaliger) day number. Corresponds to the Year, Month, and Day properties.

Product Availability

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

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

queryDayFraction

public double queryDayFraction()
                        throws IOException,
                               AutomationException
The time's time portion as a day fraction. Corresponds to the Hour, Minute, Second, and Nanoseconds properties.

Product Availability

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

Specified by:
queryDayFraction in interface ITime
Returns:
The dayFraction
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

setDayFraction

public void setDayFraction(double dayFraction)
                    throws IOException,
                           AutomationException
The time's time portion as a day fraction. Corresponds to the Hour, Minute, Second, and Nanoseconds properties.

Product Availability

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

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

queryNanosecondsSinceMidnight

public long queryNanosecondsSinceMidnight()
                                   throws IOException,
                                          AutomationException
The time's time portion as the number of nanoseconds elapsed since midnight. Corresponds to the Hour, Minute, Second, and Nanoseconds properties.

Product Availability

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

Specified by:
queryNanosecondsSinceMidnight in interface ITime
Returns:
Signed 64-bit int
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

setNanosecondsSinceMidnight

public void setNanosecondsSinceMidnight(long nanosecondsSinceMidnight)
                                 throws IOException,
                                        AutomationException
The time's time portion as the number of nanoseconds elapsed since midnight. Corresponds to the Hour, Minute, Second, and Nanoseconds properties.

Product Availability

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

Specified by:
setNanosecondsSinceMidnight in interface ITime
Parameters:
nanosecondsSinceMidnight - Signed 64-bit int (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

subtractTime

public ITimeDuration subtractTime(ITime time)
                           throws IOException,
                                  AutomationException
Subtracts a given time, and returns the time duration result.

Description

This function subtracts the passed time value from the current time, and returns the difference in the TimeDuration parameter. If the passed time value is before the current time value, then the result will be positive. If the passed time value is after the current time value, then the result will be negative.

Product Availability

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

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

snapToEndOfMonth

public void snapToEndOfMonth()
                      throws IOException,
                             AutomationException
Adjust the day value, to the last day in the current month and year.

Description

SnapToEndOfMonth changes the current date of the Time object, but not the hours, minutes, or seconds. It changes the date to the last day of the month. If the current month is February, then the resulting date will depend on if the current year is a leap year.

Product Availability

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

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

toUTC

public void toUTC()
           throws IOException,
                  AutomationException
Converts the time from local (to this machine) time value to Coordinated Universal Time (UTC).

Product Availability

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

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

toLocal

public void toLocal()
             throws IOException,
                    AutomationException
Converts the time from Coordinated Universal Time (UTC) value to local (to this machine) time.

Product Availability

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

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

queryTimeString

public String queryTimeString(int timeStringFormat)
                       throws IOException,
                              AutomationException
Obtains the time as a string, based on the given time string format.

Product Availability

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

Specified by:
queryTimeString in interface ITime
Parameters:
timeStringFormat - A com.esri.arcgis.system.esriTimeStringFormat constant (in)
Returns:
The timeString
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

setFromTimeString

public void setFromTimeString(int timeStringFormat,
                              String timeString)
                       throws IOException,
                              AutomationException
Writes the time from a string, based on the given time string format.

Product Availability

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

Specified by:
setFromTimeString in interface ITime
Parameters:
timeStringFormat - A com.esri.arcgis.system.esriTimeStringFormat constant (in)
timeString - The timeString (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

queryTimeStringCurrentLocale

public String queryTimeStringCurrentLocale(int timeLocaleFormat)
                                    throws IOException,
                                           AutomationException
Obtains the time as a string, based on the current locale.

Product Availability

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

Specified by:
queryTimeStringCurrentLocale in interface ITime
Parameters:
timeLocaleFormat - A com.esri.arcgis.system.esriTimeLocaleFormat constant (in)
Returns:
The timeString
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

setFromTimeStringCurrentLocale

public void setFromTimeStringCurrentLocale(int timeLocaleFormat,
                                           String timeString)
                                    throws IOException,
                                           AutomationException
Obtains the time from a string, based on the current locale.

Product Availability

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

Specified by:
setFromTimeStringCurrentLocale in interface ITime
Parameters:
timeLocaleFormat - A com.esri.arcgis.system.esriTimeLocaleFormat constant (in)
timeString - The timeString (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

queryTimeStringCustom

public String queryTimeStringCustom(String timeStringFormat,
                                    int localeID,
                                    String amSymbol,
                                    String pmSymbol)
                             throws IOException,
                                    AutomationException
Obtains the time as a string, based on the given custom time string format, and locale properties.

Description

This function will provide a time/date string in a format specified by the time format string, date format string, and using the AM/PM designators. The time format string uses the following symbols:

h = hour (12 hour clock)

H = hour (24 hour clock)

m = minute

s = second

t = am/pm designator

hh,mm,ss indicate that there is a leading zero for values less than 10

h,m,s indicate that there is no leading zero

Note that the am/pm designator should not be present when the time is measured using a 24-hour clock

the AM/PM designators will only be used if the time string contains the "t" value

The date format string uses the following symbols:

M = month of the year

d = day of the month

y = year

MM and dd indicate that there is a leading zero when the month/day is less than 10

M and d indicate that there is no leading zero

yy indicates a 2 digit year

yyyy indicates a 4 digit year

Product Availability

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

Specified by:
queryTimeStringCustom in interface ITime
Parameters:
timeStringFormat - The timeStringFormat (in)
localeID - The localeID (in)
amSymbol - The amSymbol (in)
pmSymbol - The pmSymbol (in)
Returns:
The timeString
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

setFromTimeStringCustom

public void setFromTimeStringCustom(String timeStringFormat,
                                    int localeID,
                                    String amSymbol,
                                    String pmSymbol,
                                    String timeString)
                             throws IOException,
                                    AutomationException
Writes the time from a string, based on the given custom time string formats, and locale properties.

Description

The passed time string is assumed to be in a format specified by the time format string, date format string, and using the AM/PM designators. The time format string uses the following symbols:

h = hour (12 hour clock)

H = hour (24 hour clock)

m = minute

s = second

t = am/pm designator

hh,mm,ss indicate that there is a leading zero for values less than 10

h,m,s indicate that there is no leading zero

Note that the am/pm designator should not be present when the time is measured using a 24-hour clock

the AM/PM designators will only be used if the time string contains the "t" value

The date format string uses the following symbols:

M = month of the year

d = day of the month

y = year

MM and dd indicate that there is a leading zero when the month/day is less than 10

M and d indicate that there is no leading zero

yy indicates a 2 digit year

yyyy indicates a 4 digit year

Product Availability

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

Specified by:
setFromTimeStringCustom in interface ITime
Parameters:
timeStringFormat - The timeStringFormat (in)
localeID - The localeID (in)
amSymbol - The amSymbol (in)
pmSymbol - The pmSymbol (in)
timeString - The timeString (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

queryXMLTimeString

public String queryXMLTimeString(ITimeReference timeReference)
                          throws IOException,
                                 AutomationException
Obtains the time as an XML time string.

Product Availability

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

Specified by:
queryXMLTimeString in interface ITime
Parameters:
timeReference - A reference to a com.esri.arcgis.system.ITimeReference (in)
Returns:
The xmlTimeString
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

setFromXMLTimeString

public int setFromXMLTimeString(String xmlTimeString)
                         throws IOException,
                                AutomationException
Writes the time from an XML time string.

Product Availability

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

Specified by:
setFromXMLTimeString in interface ITime
Parameters:
xmlTimeString - The xmlTimeString (in)
Returns:
The timeZoneBiasFromUTC
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

queryIntegerTime

public long queryIntegerTime(int integerTimeFormat)
                      throws IOException,
                             AutomationException
Obtains the time as an integer time.

Product Availability

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

Specified by:
queryIntegerTime in interface ITime
Parameters:
integerTimeFormat - A com.esri.arcgis.system.esriIntegerTimeFormat constant (in)
Returns:
Signed 64-bit int
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

setFromIntegerTime

public void setFromIntegerTime(int integerTimeFormat,
                               long integerTime)
                        throws IOException,
                               AutomationException
Writes the time from an integer time.

Product Availability

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

Specified by:
setFromIntegerTime in interface ITime
Parameters:
integerTimeFormat - A com.esri.arcgis.system.esriIntegerTimeFormat constant (in)
integerTime - Signed 64-bit int (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

setFromObject

public void setFromObject(Object object)
                   throws IOException,
                          AutomationException
Writes the time from a variant object.

Product Availability

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

Specified by:
setFromObject in interface ITime
Parameters:
object - A Variant (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

queryOleTime

public Date queryOleTime()
                  throws IOException,
                         AutomationException
Obtains the time as an OLE automation date object.

Product Availability

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

Specified by:
queryOleTime in interface ITime
Returns:
The oleTime
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

setFromOleTime

public void setFromOleTime(Date oleTime)
                    throws IOException,
                           AutomationException
Writes the time from an OLE automation date object.

Product Availability

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

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

queryGregorianTime

public _WKSDateTime queryGregorianTime()
                                throws IOException,
                                       AutomationException
Obtains the time as a gregorian date and time.

Product Availability

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

Specified by:
queryGregorianTime in interface ITime
Returns:
A Structure: com.esri.arcgis.system._WKSDateTime (A com.esri.arcgis.system._WKSDateTime COM typedef)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

setFromGregorianTime

public void setFromGregorianTime(_WKSDateTime gregorianTime)
                          throws IOException,
                                 AutomationException
Obtains the time from a given gregorian date and time value.

Product Availability

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

Specified by:
setFromGregorianTime in interface ITime
Parameters:
gregorianTime - A Structure: com.esri.arcgis.system._WKSDateTime (A com.esri.arcgis.system._WKSDateTime COM typedef) (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

queryTicks

public long queryTicks()
                throws IOException,
                       AutomationException
Obtains the time as the number of ticks since January 1, 0001 AD (Anno Domini).

Product Availability

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

Specified by:
queryTicks in interface ITime
Returns:
Signed 64-bit int
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

setFromTicks

public void setFromTicks(long ticks)
                  throws IOException,
                         AutomationException
Writes the time from a given number of ticks since January 1, 0001 AD (Anno Domini) value.

Product Availability

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

Specified by:
setFromTicks in interface ITime
Parameters:
ticks - Signed 64-bit int (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

setFromCurrentLocalTime

public void setFromCurrentLocalTime()
                             throws IOException,
                                    AutomationException
Writes the time to the current date and time on this machine, expressed as the local time.

Product Availability

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

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

setFromCurrentUtcTime

public void setFromCurrentUtcTime()
                           throws IOException,
                                  AutomationException
Writes the time to the current date and time on this machine, expressed as the Coordinated Universal Time (UTC).

Product Availability

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

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

compare

public int compare(ITime otherTime)
            throws IOException,
                   AutomationException
Compares this time to the other time. Returns -1 if this time's value is less, 1 if greater, and 0 otherwise.

Product Availability

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

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

addDuration

public void addDuration(ITimeDuration timeDuration)
                 throws IOException,
                        AutomationException
Adds a time duration.

Product Availability

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

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

subtractDuration

public void subtractDuration(ITimeDuration timeDuration)
                      throws IOException,
                             AutomationException
Subtracts a time duration.

Product Availability

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

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

addYears

public boolean addYears(double value,
                        boolean preserveEndOfMonth,
                        boolean goForwardOnInvalidDate)
                 throws IOException,
                        AutomationException
Adds the input amount of years.

Product Availability

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

Specified by:
addYears in interface ITimeOffsetOperator
Parameters:
value - The value (in)
preserveEndOfMonth - The preserveEndOfMonth (in)
goForwardOnInvalidDate - The goForwardOnInvalidDate (in)
Returns:
The dateWasAdjusted
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

addMonths

public boolean addMonths(double value,
                         boolean preserveEndOfMonth,
                         boolean goForwardOnInvalidDate)
                  throws IOException,
                         AutomationException
Adds the input amount of months.

Product Availability

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

Specified by:
addMonths in interface ITimeOffsetOperator
Parameters:
value - The value (in)
preserveEndOfMonth - The preserveEndOfMonth (in)
goForwardOnInvalidDate - The goForwardOnInvalidDate (in)
Returns:
The dateWasAdjusted
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

addWeeks

public void addWeeks(double value)
              throws IOException,
                     AutomationException
Adds the input amount of weeks.

Product Availability

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

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

addDays

public void addDays(double value)
             throws IOException,
                    AutomationException
Adds the input amount of days.

Product Availability

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

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

addHours

public void addHours(double value)
              throws IOException,
                     AutomationException
Adds the input amount of hours.

Product Availability

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

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

addMinutes

public void addMinutes(double value)
                throws IOException,
                       AutomationException
Adds the input amount of minutes.

Product Availability

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

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

addSeconds

public void addSeconds(double value)
                throws IOException,
                       AutomationException
Adds the input amount of seconds.

Product Availability

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

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

addMilliseconds

public void addMilliseconds(double value)
                     throws IOException,
                            AutomationException
Adds the input amount of milliseconds.

Product Availability

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

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

addNanoseconds

public void addNanoseconds(long value)
                    throws IOException,
                           AutomationException
Adds the input amount of nanoseconds.

Product Availability

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

Specified by:
addNanoseconds in interface ITimeOffsetOperator
Parameters:
value - Signed 64-bit int (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