com.esri.arcgis.system
Class XMLTypeMapper

java.lang.Object
  extended by com.esri.arcgis.system.XMLTypeMapper
All Implemented Interfaces:
com.esri.arcgis.interop.RemoteObjRef, ISupportErrorInfo, IXMLTypeMapper, Serializable

public class XMLTypeMapper
extends Object
implements com.esri.arcgis.interop.RemoteObjRef, IXMLTypeMapper, ISupportErrorInfo

A type converter for XML and native types.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Singleton:

This type is a singleton.

See Also:
Serialized Form

Constructor Summary
XMLTypeMapper()
          Constructs a XMLTypeMapper using ArcGIS Engine.
XMLTypeMapper(Object obj)
          Deprecated. As of ArcGIS 9.2, replaced by normal Java casts.
XMLTypeMapper theXMLTypeMapper = (XMLTypeMapper) obj;
 
Method Summary
 boolean equals(Object o)
          Compare this object with another
 String fromBinary(byte[] value)
          Converts a byte array to an XML byte array.
 String fromBoolean(boolean value)
          Converts a boolean to an XML boolean.
 String fromByte(byte value)
          Converts a byte to an XML byte.
 String fromDate(Date value)
          Converts a date to an XML date.
 String fromDouble(double value)
          Converts a double to an XML double.
 String fromFloat(float value)
          Converts a float to an XML float.
 String fromInteger(int value)
          Converts a long to an XML integer.
 String fromShort(short value)
          Converts a short to an XML short.
static String getClsid()
          getClsid.
 int hashCode()
          the hashcode for this object
 void interfaceSupportsErrorInfo(GUID riid)
          interfaceSupportsErrorInfo
 byte[] toBinary(String text)
          Converts an XML byte array to a byte array.
 boolean toBoolean(String text)
          Converts an XML boolean to a boolean.
 byte toByte(String text)
          Converts an XML byte to a byte.
 Date toDate(String text)
          Converts an XML date to a date.
 double toDouble(String text)
          Converts an XML double to a double.
 float toFloat(String text)
          Converts an XML float to a float.
 int toInteger(String text)
          Converts an XML integer to a long.
 Object toObject(String namespaceURI, String typeName)
          Creates an object based on XML type information.
 short toShort(String text)
          Converts an XML short to a short.
 
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

XMLTypeMapper

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

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

XMLTypeMapper

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

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

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

toObject

public Object toObject(String namespaceURI,
                       String typeName)
                throws IOException,
                       AutomationException
Creates an object based on XML type information.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
toObject in interface IXMLTypeMapper
Parameters:
namespaceURI - The namespaceURI (in)
typeName - The typeName (in)
Returns:
A reference to another Object (IUnknown)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

toInteger

public int toInteger(String text)
              throws IOException,
                     AutomationException
Converts an XML integer to a long.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

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

toBoolean

public boolean toBoolean(String text)
                  throws IOException,
                         AutomationException
Converts an XML boolean to a boolean.

Remarks


For proper conversion the text string for boolean value must be all lowercase.

For example,

Dim pXMLTypeMapper as IXMLTypeMapper
Set pXMLTypeMapper = new XMLTypeMapper

Dim strValue as String
Dim boolValue as Boolean

strValue = "true"
boolValue = pXMLTypeMapper.ToBoolean(strValue)

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

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

toShort

public short toShort(String text)
              throws IOException,
                     AutomationException
Converts an XML short to a short.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

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

toByte

public byte toByte(String text)
            throws IOException,
                   AutomationException
Converts an XML byte to a byte.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
toByte in interface IXMLTypeMapper
Parameters:
text - The text (in)
Returns:
An unsigned byte
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

toFloat

public float toFloat(String text)
              throws IOException,
                     AutomationException
Converts an XML float to a float.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

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

toDouble

public double toDouble(String text)
                throws IOException,
                       AutomationException
Converts an XML double to a double.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

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

toDate

public Date toDate(String text)
            throws IOException,
                   AutomationException
Converts an XML date to a date.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

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

toBinary

public byte[] toBinary(String text)
                throws IOException,
                       AutomationException
Converts an XML byte array to a byte array.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
toBinary in interface IXMLTypeMapper
Parameters:
text - The text (in)
Returns:
An unsigned byte
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

fromInteger

public String fromInteger(int value)
                   throws IOException,
                          AutomationException
Converts a long to an XML integer.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

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

fromBoolean

public String fromBoolean(boolean value)
                   throws IOException,
                          AutomationException
Converts a boolean to an XML boolean.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

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

fromShort

public String fromShort(short value)
                 throws IOException,
                        AutomationException
Converts a short to an XML short.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

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

fromByte

public String fromByte(byte value)
                throws IOException,
                       AutomationException
Converts a byte to an XML byte.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
fromByte in interface IXMLTypeMapper
Parameters:
value - An unsigned byte (in)
Returns:
The text
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

fromFloat

public String fromFloat(float value)
                 throws IOException,
                        AutomationException
Converts a float to an XML float.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

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

fromDouble

public String fromDouble(double value)
                  throws IOException,
                         AutomationException
Converts a double to an XML double.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

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

fromDate

public String fromDate(Date value)
                throws IOException,
                       AutomationException
Converts a date to an XML date.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

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

fromBinary

public String fromBinary(byte[] value)
                  throws IOException,
                         AutomationException
Converts a byte array to an XML byte array.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
fromBinary in interface IXMLTypeMapper
Parameters:
value - An unsigned byte (in)
Returns:
The text
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

interfaceSupportsErrorInfo

public void interfaceSupportsErrorInfo(GUID riid)
                                throws IOException,
                                       AutomationException
interfaceSupportsErrorInfo

Description

Indicates whether the interface supports IErrorInfo.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
interfaceSupportsErrorInfo in interface ISupportErrorInfo
Parameters:
riid - A Structure: com.esri.arcgis.support.ms.stdole.GUID (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.