com.esri.arcgis.geodatabase
Class JSONConverterGdb

java.lang.Object
  extended by com.esri.arcgis.geodatabase.JSONConverterGdb
All Implemented Interfaces:
IExternalDeserializerGdb, IExternalSerializerGdb, IJSONConverterGdb, com.esri.arcgis.interop.RemoteObjRef, IExternalDeserializer, IExternalSerializer, IJSONDeserializer, IJSONSerializer, ISupportErrorInfo, java.io.Serializable

public class JSONConverterGdb
extends java.lang.Object
implements com.esri.arcgis.interop.RemoteObjRef, IJSONSerializer, IJSONDeserializer, IExternalSerializerGdb, IExternalDeserializerGdb, IJSONConverterGdb, ISupportErrorInfo

COM Class 'JSONConverterGdb'. Generated 3/19/2015 1:20:43 PM from 'C:\ArcGIS\COM\esriGeoDatabase.olb'

Description 'All-in-one JSON conversion for the GeoDatabase library. Supports all previous JSON interfaces in the GeoDatabase, namely IJSONSerializer, IJSONDeserializer, IExternalSerializerGdb, IExternalDeserializerGdb' Generator Options: PromptForTypeLibraries = False ClashPrefix = esri_ LowerCaseMemberNames = True IDispatchOnly = False RetryOnReject = False AwtForOcxs = True ArraysAsObjects = False DontRenameSameMethods = False ImplementConflictingInterfaces = True ReuseMethods = True RenameConflictingInterfaceMethods = True GenBeanInfo = True GenerateJavadoc =

See Also:
Serialized Form

Field Summary
 
Fields inherited from interface com.esri.arcgis.system.IJSONSerializer
IID, IIDab718cdf_0c06_4d18_9aa4_a6c54b2bc28c, xxDummy
 
Fields inherited from interface com.esri.arcgis.system.IExternalSerializer
IIDe760e960_f144_4b30_930b_5f8056e4e305
 
Fields inherited from interface com.esri.arcgis.system.IJSONDeserializer
IID, IID1e6dc0eb_5c8a_4401_a8af_bb5602ddfb7e, xxDummy
 
Fields inherited from interface com.esri.arcgis.system.IExternalDeserializer
IID09134de8_4147_4564_82bd_6cc18414c389
 
Fields inherited from interface com.esri.arcgis.geodatabase.IExternalSerializerGdb
IID, IIDeed3eea0_a5a5_49e8_b23c_ba29ae21d3da, xxDummy
 
Fields inherited from interface com.esri.arcgis.geodatabase.IExternalDeserializerGdb
IID, IIDb3021be9_c152_4df8_aa79_3d834190da67, xxDummy
 
Fields inherited from interface com.esri.arcgis.geodatabase.IJSONConverterGdb
IID, IIDf28d230e_0f29_4022_b84f_e7e955a9a873, xxDummy
 
Fields inherited from interface com.esri.arcgis.system.ISupportErrorInfo
IID, IIDdf0b3d60_548f_101b_8e65_08002b2bd119, xxDummy
 
Constructor Summary
JSONConverterGdb()
          Constructs a JSONConverterGdb using ArcGIS Engine.
JSONConverterGdb(java.lang.Object obj)
          Deprecated. As of ArcGIS 9.2, replaced by normal Java casts.
JSONConverterGdb theJSONConverterGdb = (JSONConverterGdb) obj;
 
Method Summary
 boolean equals(java.lang.Object o)
          Compare this object with another
static java.lang.String getClsid()
          getClsid.
 byte[] getErrorObject(java.lang.String propname, int code, java.lang.String message, IStringArray details)
          Convenience method.
 com.esri.arcgis.interop.Dispatch getJintegraDispatch()
          Deprecated. Internal use only.
 IJSONReader getReader()
          Obtains JSON Reader.
 IJSONWriter getWriter()
          Obtains JSON Writer.
 int hashCode()
          the hashcode for this object
 void initDeserializer(IJSONReader pReader, IPropertySet pProps)
          Write deserialization options.
 void initSerializer(IJSONWriter pWriter, IPropertySet pProps)
          Writes serialization options.
 void interfaceSupportsErrorInfo(GUID riid)
          interfaceSupportsErrorInfo
 void queryJSONDomain(IDomain pDomain, IJSONObject pDomainJO)
          Query domain info from IDomain and populate IJSONObject.
 IGeometry readGeometry(int geomType)
          Reads geometry object.
 java.lang.Object readObject(GUID riid, IPropertySet pProps)
          Deserialize an object.
 void readRecordSet(IJSONReader pReader, IFields pDefaultSchema, IPropertySet pConversionProps, IRecordSet[] ppRecordset, IPropertySet[] ppOriginalToNewFieldMap)
          Reads RecordSet object from IJSONReader.
 ISpatialReference readSpatialReference()
          Reads spatial reference object.
 void release()
          Release a JSONConverterGdb.
 void toRecordSet(IJSONObject pObj, IFields pDefaultSchema, IPropertySet pConversionProps, IRecordSet[] ppRecordset, IPropertySet[] ppOriginalToNewFieldMap)
          Reads RecordSet object from IJSONObject.
 void writeErrorObject(java.lang.String propname, int code, java.lang.String message, IStringArray details)
          Writes error object.
 void writeGeometry(java.lang.String propname, IGeometry pGeom)
          Writes geometry object.
 void writeObject(java.lang.Object pUnk, IPropertySet pProps)
          Serializes an object.
 void writeRecordSet(IJSONWriter pWriter, IJSONConverterGeometry pGeomConv, IPropertySet pProps, java.lang.String propname, IRecordSet pRecordset, IGeometryResultOptions pGeomOpt, boolean bWriteEndOfObj)
          Writes RecordSet to IJSONWriter.
 void writeRecordSet(java.lang.String propname, IRecordSet pRecordset, IGeometryResultOptions pGeomOpt)
          Writes feature recordset.
 void writeRow(java.lang.String propname, IRow pRow, IFields pFields, int[] rowFieldIndexes, IGeometryResultOptions pGeomOpt)
          Writes feature row object
 void writeSpatialReference(java.lang.String propname, ISpatialReference pSR)
          Writes spatial reference object.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JSONConverterGdb

public JSONConverterGdb()
                 throws java.io.IOException,
                        java.net.UnknownHostException
Constructs a JSONConverterGdb using ArcGIS Engine.

Throws:
java.io.IOException - if there are interop problems
java.net.UnknownHostException - if there are interop problems

JSONConverterGdb

public JSONConverterGdb(java.lang.Object obj)
                 throws java.io.IOException
Deprecated. As of ArcGIS 9.2, replaced by normal Java casts.
JSONConverterGdb theJSONConverterGdb = (JSONConverterGdb) obj;

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

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

getClsid

public static java.lang.String getClsid()
getClsid.


equals

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

Overrides:
equals in class java.lang.Object

hashCode

public int hashCode()
the hashcode for this object

Overrides:
hashCode in class java.lang.Object

getJintegraDispatch

public com.esri.arcgis.interop.Dispatch getJintegraDispatch()
Deprecated. Internal use only.

Specified by:
getJintegraDispatch in interface com.esri.arcgis.interop.RemoteObjRef

release

public void release()
Release a JSONConverterGdb.

Specified by:
release in interface com.esri.arcgis.interop.RemoteObjRef

getWriter

public IJSONWriter getWriter()
                      throws java.io.IOException,
                             AutomationException
Obtains JSON Writer.

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

initSerializer

public void initSerializer(IJSONWriter pWriter,
                           IPropertySet pProps)
                    throws java.io.IOException,
                           AutomationException
Writes serialization options.

Specified by:
initSerializer in interface IJSONSerializer
Parameters:
pWriter - A reference to a com.esri.arcgis.system.IJSONWriter (in)
pProps - A reference to a com.esri.arcgis.system.IPropertySet (in)
Throws:
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

writeObject

public void writeObject(java.lang.Object pUnk,
                        IPropertySet pProps)
                 throws java.io.IOException,
                        AutomationException
Serializes an object.

Specified by:
writeObject in interface IExternalSerializer
Parameters:
pUnk - A reference to another Object (IUnknown) (in)
pProps - A reference to a com.esri.arcgis.system.IPropertySet (in)
Throws:
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getReader

public IJSONReader getReader()
                      throws java.io.IOException,
                             AutomationException
Obtains JSON Reader.

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

initDeserializer

public void initDeserializer(IJSONReader pReader,
                             IPropertySet pProps)
                      throws java.io.IOException,
                             AutomationException
Write deserialization options.

Specified by:
initDeserializer in interface IJSONDeserializer
Parameters:
pReader - A reference to a com.esri.arcgis.system.IJSONReader (in)
pProps - A reference to a com.esri.arcgis.system.IPropertySet (in)
Throws:
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

readObject

public java.lang.Object readObject(GUID riid,
                                   IPropertySet pProps)
                            throws java.io.IOException,
                                   AutomationException
Deserialize an object. riid references an interface to use. If interface is not supported, E_NOTIMPL is returned.

Specified by:
readObject in interface IExternalDeserializer
Parameters:
riid - A Structure: com.esri.arcgis.support.ms.stdole.GUID (in)
pProps - A reference to a com.esri.arcgis.system.IPropertySet (in)
Returns:
A reference to another Object (IUnknown)
Throws:
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

writeSpatialReference

public void writeSpatialReference(java.lang.String propname,
                                  ISpatialReference pSR)
                           throws java.io.IOException,
                                  AutomationException
Writes spatial reference object. Pass NULL as propname to write standalone JSON object.

Specified by:
writeSpatialReference in interface IExternalSerializerGdb
Parameters:
propname - The propname (in)
pSR - A reference to a com.esri.arcgis.geometry.ISpatialReference (in)
Throws:
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

writeGeometry

public void writeGeometry(java.lang.String propname,
                          IGeometry pGeom)
                   throws java.io.IOException,
                          AutomationException
Writes geometry object.

Specified by:
writeGeometry in interface IExternalSerializerGdb
Parameters:
propname - The propname (in)
pGeom - A reference to a com.esri.arcgis.geometry.IGeometry (in)
Throws:
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

writeRow

public void writeRow(java.lang.String propname,
                     IRow pRow,
                     IFields pFields,
                     int[] rowFieldIndexes,
                     IGeometryResultOptions pGeomOpt)
              throws java.io.IOException,
                     AutomationException
Writes feature row object

Specified by:
writeRow in interface IExternalSerializerGdb
Parameters:
propname - The propname (in)
pRow - A reference to a com.esri.arcgis.geodatabase.IRow (in)
pFields - A reference to a com.esri.arcgis.geodatabase.IFields (in)
rowFieldIndexes - The rowFieldIndexes (in)
pGeomOpt - A reference to a com.esri.arcgis.geodatabase.IGeometryResultOptions (in)
Throws:
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

writeRecordSet

public void writeRecordSet(java.lang.String propname,
                           IRecordSet pRecordset,
                           IGeometryResultOptions pGeomOpt)
                    throws java.io.IOException,
                           AutomationException
Writes feature recordset.

Specified by:
writeRecordSet in interface IExternalSerializerGdb
Parameters:
propname - The propname (in)
pRecordset - A reference to a com.esri.arcgis.geodatabase.IRecordSet (in)
pGeomOpt - A reference to a com.esri.arcgis.geodatabase.IGeometryResultOptions (in)
Throws:
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

writeErrorObject

public void writeErrorObject(java.lang.String propname,
                             int code,
                             java.lang.String message,
                             IStringArray details)
                      throws java.io.IOException,
                             AutomationException
Writes error object.

Specified by:
writeErrorObject in interface IExternalSerializerGdb
Parameters:
propname - The propname (in)
code - The code (in)
message - The message (in)
details - A reference to a com.esri.arcgis.system.IStringArray (in)
Throws:
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getErrorObject

public byte[] getErrorObject(java.lang.String propname,
                             int code,
                             java.lang.String message,
                             IStringArray details)
                      throws java.io.IOException,
                             AutomationException
Convenience method. Creates and returns error object as byte SAFEARRAY.

Specified by:
getErrorObject in interface IExternalSerializerGdb
Parameters:
propname - The propname (in)
code - The code (in)
message - The message (in)
details - A reference to a com.esri.arcgis.system.IStringArray (in)
Returns:
An unsigned byte
Throws:
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

readSpatialReference

public ISpatialReference readSpatialReference()
                                       throws java.io.IOException,
                                              AutomationException
Reads spatial reference object.

Specified by:
readSpatialReference in interface IExternalDeserializerGdb
Returns:
A reference to a com.esri.arcgis.geometry.ISpatialReference
Throws:
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

readGeometry

public IGeometry readGeometry(int geomType)
                       throws java.io.IOException,
                              AutomationException
Reads geometry object.

Specified by:
readGeometry in interface IExternalDeserializerGdb
Parameters:
geomType - A com.esri.arcgis.geometry.esriGeometryType constant (in)
Returns:
A reference to a com.esri.arcgis.geometry.IGeometry
Throws:
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

readRecordSet

public void readRecordSet(IJSONReader pReader,
                          IFields pDefaultSchema,
                          IPropertySet pConversionProps,
                          IRecordSet[] ppRecordset,
                          IPropertySet[] ppOriginalToNewFieldMap)
                   throws java.io.IOException,
                          AutomationException
Reads RecordSet object from IJSONReader.

Specified by:
readRecordSet in interface IJSONConverterGdb
Parameters:
pReader - A reference to a com.esri.arcgis.system.IJSONReader (in)
pDefaultSchema - A reference to a com.esri.arcgis.geodatabase.IFields (in)
pConversionProps - A reference to a com.esri.arcgis.system.IPropertySet (in)
ppRecordset - A reference to a com.esri.arcgis.geodatabase.IRecordSet (out: use single element array)
ppOriginalToNewFieldMap - A reference to a com.esri.arcgis.system.IPropertySet (out: use single element array)
Throws:
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

toRecordSet

public void toRecordSet(IJSONObject pObj,
                        IFields pDefaultSchema,
                        IPropertySet pConversionProps,
                        IRecordSet[] ppRecordset,
                        IPropertySet[] ppOriginalToNewFieldMap)
                 throws java.io.IOException,
                        AutomationException
Reads RecordSet object from IJSONObject. pDefaultSchema is used only when input JSON has no 'fields' attribute. Pass NULL if not needed. Also, sometimes field names are corrected by the GeoDatabase, use ppOriginalToNewFieldMap to find new field names.

Specified by:
toRecordSet in interface IJSONConverterGdb
Parameters:
pObj - A reference to a com.esri.arcgis.system.IJSONObject (in)
pDefaultSchema - A reference to a com.esri.arcgis.geodatabase.IFields (in)
pConversionProps - A reference to a com.esri.arcgis.system.IPropertySet (in)
ppRecordset - A reference to a com.esri.arcgis.geodatabase.IRecordSet (out: use single element array)
ppOriginalToNewFieldMap - A reference to a com.esri.arcgis.system.IPropertySet (out: use single element array)
Throws:
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

writeRecordSet

public void writeRecordSet(IJSONWriter pWriter,
                           IJSONConverterGeometry pGeomConv,
                           IPropertySet pProps,
                           java.lang.String propname,
                           IRecordSet pRecordset,
                           IGeometryResultOptions pGeomOpt,
                           boolean bWriteEndOfObj)
                    throws java.io.IOException,
                           AutomationException
Writes RecordSet to IJSONWriter. Writes closing bracked if bWriteEndOfObj is VARIANT_TRUE. Set bWriteEndOfObj to VARIANT_FALSE if you want to append additional JSON before closing object.

Specified by:
writeRecordSet in interface IJSONConverterGdb
Parameters:
pWriter - A reference to a com.esri.arcgis.system.IJSONWriter (in)
pGeomConv - A reference to a com.esri.arcgis.geometry.IJSONConverterGeometry (in)
pProps - A reference to a com.esri.arcgis.system.IPropertySet (in)
propname - The propname (in)
pRecordset - A reference to a com.esri.arcgis.geodatabase.IRecordSet (in)
pGeomOpt - A reference to a com.esri.arcgis.geodatabase.IGeometryResultOptions (in)
bWriteEndOfObj - The bWriteEndOfObj (in)
Throws:
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

queryJSONDomain

public void queryJSONDomain(IDomain pDomain,
                            IJSONObject pDomainJO)
                     throws java.io.IOException,
                            AutomationException
Query domain info from IDomain and populate IJSONObject.

Specified by:
queryJSONDomain in interface IJSONConverterGdb
Parameters:
pDomain - A reference to a com.esri.arcgis.geodatabase.IDomain (in)
pDomainJO - A reference to a com.esri.arcgis.system.IJSONObject (in)
Throws:
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

interfaceSupportsErrorInfo

public void interfaceSupportsErrorInfo(GUID riid)
                                throws java.io.IOException,
                                       AutomationException
interfaceSupportsErrorInfo

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