|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.esri.arcgis.system.JSONArray
public class JSONArray
Simplified JSON API coclass
Constructor Summary | |
---|---|
JSONArray()
Constructs a JSONArray using ArcGIS Engine. |
|
JSONArray(Object obj)
Deprecated. As of ArcGIS 9.2, replaced by normal Java casts. JSONArray theJSONArray = (JSONArray) obj; |
Method Summary | |
---|---|
void |
add(Object value)
Adds new variant value to the array. |
void |
addBoolean(boolean value)
Adds new boolean value to the array. |
void |
addDate(Date value)
Adds new DATE value to the array. |
void |
addDouble(double value)
Adds new double value to the array. |
void |
addDoubleEx(double value,
int precision)
Adds new double value to the array. |
void |
addJSONArray(IJSONArray value)
Adds new nested array to the array. |
void |
addJSONObject(IJSONObject value)
Adds new nested object to the array. |
void |
addLong(int value)
Adds new long value to the array. |
void |
addNull()
Adds new null value to the array. |
void |
addString(String value)
Adds new string value to the array. |
void |
clearAll()
Removes all values. |
void |
createMemberArray(IJSONArray[] value)
Creates and adds new member to the member collection. |
void |
createMemberObject(IJSONObject[] value)
Creates and adds new member to the member collection. |
boolean |
equals(Object o)
Compare this object with another |
static String |
getClsid()
getClsid. |
int |
getCount()
Returns an array size. |
Object |
getValue(int index)
Returns an array value at a given index. |
int |
hashCode()
the hashcode for this object |
void |
interfaceSupportsErrorInfo(GUID riid)
interfaceSupportsErrorInfo |
boolean |
isValueNull(int index)
Checks if an array value at a given index is NULL. |
void |
parseJSON(IJSONReader pReader)
Parses JSON array from IJSONReader into memory. |
void |
parseString(String json)
Parses JSON array from string into memory. |
void |
removeValue(int index)
Remove a value from the member collection. |
void |
toJSON(String objectName,
IJSONWriter pWriter)
Converts IJSONArray to JSON representation using provided IJSONWriter. |
String |
toJSONString(IPropertySet props)
Converts IJSONArray to JSON representation using IJSONWriter internally. |
boolean |
tryGetValueAsArray(int index,
IJSONArray[] value)
Returns array value at a given index as IJSONArray. |
boolean |
tryGetValueAsBoolean(int index,
boolean[] value)
Returns array value at a given index as boolean. |
boolean |
tryGetValueAsDate(int index,
Date[] value)
Returns array value at a given index as DATE. |
boolean |
tryGetValueAsDouble(int index,
double[] value)
Returns array value at a given index as double. |
boolean |
tryGetValueAsLong(int index,
int[] value)
Returns array value at a given index as long. |
boolean |
tryGetValueAsObject(int index,
IJSONObject[] value)
Returns array value at a given index as IJSONObject. |
boolean |
tryGetValueAsString(int index,
String[] value)
Returns array value at a given index as string. |
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 |
---|
public JSONArray() throws IOException, UnknownHostException
IOException
- if there are interop problems
UnknownHostException
- if there are interop problemspublic JSONArray(Object obj) throws IOException
JSONArray theJSONArray = (JSONArray) obj;
obj
to JSONArray
.
obj
- an object returned from ArcGIS Engine or Server
IOException
- if there are interop problemsMethod Detail |
---|
public static String getClsid()
public boolean equals(Object o)
equals
in class Object
public int hashCode()
hashCode
in class Object
public void parseString(String json) throws IOException, AutomationException
parseString
in interface IJSONArray
json
- The json (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void parseJSON(IJSONReader pReader) throws IOException, AutomationException
parseJSON
in interface IJSONArray
pReader
- A reference to a com.esri.arcgis.system.IJSONReader (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public int getCount() throws IOException, AutomationException
getCount
in interface IJSONArray
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public Object getValue(int index) throws IOException, AutomationException
getValue
in interface IJSONArray
index
- The index (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public boolean isValueNull(int index) throws IOException, AutomationException
isValueNull
in interface IJSONArray
index
- The index (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public boolean tryGetValueAsDate(int index, Date[] value) throws IOException, AutomationException
tryGetValueAsDate
in interface IJSONArray
index
- The index (in)value
- The value (out: use single element array)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public boolean tryGetValueAsBoolean(int index, boolean[] value) throws IOException, AutomationException
tryGetValueAsBoolean
in interface IJSONArray
index
- The index (in)value
- The value (out: use single element array)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public boolean tryGetValueAsLong(int index, int[] value) throws IOException, AutomationException
tryGetValueAsLong
in interface IJSONArray
index
- The index (in)value
- The value (out: use single element array)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public boolean tryGetValueAsDouble(int index, double[] value) throws IOException, AutomationException
tryGetValueAsDouble
in interface IJSONArray
index
- The index (in)value
- The value (out: use single element array)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public boolean tryGetValueAsString(int index, String[] value) throws IOException, AutomationException
tryGetValueAsString
in interface IJSONArray
index
- The index (in)value
- The value (out: use single element array)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public boolean tryGetValueAsObject(int index, IJSONObject[] value) throws IOException, AutomationException
tryGetValueAsObject
in interface IJSONArray
index
- The index (in)value
- A reference to a com.esri.arcgis.system.IJSONObject (out: use single element array)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public boolean tryGetValueAsArray(int index, IJSONArray[] value) throws IOException, AutomationException
tryGetValueAsArray
in interface IJSONArray
index
- The index (in)value
- A reference to a com.esri.arcgis.system.IJSONArray (out: use single element array)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void add(Object value) throws IOException, AutomationException
add
in interface IJSONArray
value
- A Variant (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void addDate(Date value) throws IOException, AutomationException
addDate
in interface IJSONArray
value
- The value (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void addBoolean(boolean value) throws IOException, AutomationException
addBoolean
in interface IJSONArray
value
- The value (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void addLong(int value) throws IOException, AutomationException
addLong
in interface IJSONArray
value
- The value (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void addDouble(double value) throws IOException, AutomationException
addDouble
in interface IJSONArray
value
- The value (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void addString(String value) throws IOException, AutomationException
addString
in interface IJSONArray
value
- The value (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void addNull() throws IOException, AutomationException
addNull
in interface IJSONArray
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void addJSONObject(IJSONObject value) throws IOException, AutomationException
addJSONObject
in interface IJSONArray
value
- A reference to a com.esri.arcgis.system.IJSONObject (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void addJSONArray(IJSONArray value) throws IOException, AutomationException
addJSONArray
in interface IJSONArray
value
- A reference to a com.esri.arcgis.system.IJSONArray (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void createMemberObject(IJSONObject[] value) throws IOException, AutomationException
createMemberObject
in interface IJSONArray
value
- A reference to a com.esri.arcgis.system.IJSONObject (out: use single element array)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void createMemberArray(IJSONArray[] value) throws IOException, AutomationException
createMemberArray
in interface IJSONArray
value
- A reference to a com.esri.arcgis.system.IJSONArray (out: use single element array)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public String toJSONString(IPropertySet props) throws IOException, AutomationException
toJSONString
in interface IJSONArray
props
- A reference to a com.esri.arcgis.system.IPropertySet (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void toJSON(String objectName, IJSONWriter pWriter) throws IOException, AutomationException
toJSON
in interface IJSONArray
objectName
- The objectName (in)pWriter
- A reference to a com.esri.arcgis.system.IJSONWriter (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void removeValue(int index) throws IOException, AutomationException
removeValue
in interface IJSONArray
index
- The index (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void clearAll() throws IOException, AutomationException
clearAll
in interface IJSONArray
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void addDoubleEx(double value, int precision) throws IOException, AutomationException
addDoubleEx
in interface IJSONArray
value
- The value (in)precision
- The precision (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void interfaceSupportsErrorInfo(GUID riid) throws IOException, AutomationException
Indicates whether the interface supports IErrorInfo.
interfaceSupportsErrorInfo
in interface ISupportErrorInfo
riid
- A Structure: com.esri.arcgis.support.ms.stdole.GUID (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |