com.esri.arcgis.system
Interface IPropertySet

All Superinterfaces:
Serializable
All Known Subinterfaces:
IPropertySet2
All Known Implementing Classes:
GenericLocatorStyle, PropertySet, XmlPropertySet

public interface IPropertySet
extends Serializable

Provides access to members for managing a PropertySet.

Superseded By

IPropertySet2

Description

The IPropertySet interface contains methods to set and retrieve the collection of named value pairs in the PropertySet.

Remarks

PropertySet is a generic class that is used to hold a set of properties for anything. One example for the use of a property set is to hold the properties required for opening up an SDE workspace as is shown in the example code.
Typically a property set can be thought of as a set of keys (strings) and values (variants/objects). One notable exception to this is when using the IPropertySet interface on an XmlPropertySet object. An XML document can contain multiple elements with the same name (i.e. "property/child") and different values. Because of this, the values returned by this interface from an XmlPropertySet may be jagged two-dimensional arrays (arrays containing other arrays). See the XmlPropertySet coclass' documentation in the Geodatabase library for more details and code examples.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux


Method Summary
 void getAllProperties(Object[] names, Object[] values)
          The name and value of all the properties in the property set.
 int getCount()
          The number of properties contained in the property set.
 void getProperties(Object names, Object[] values)
          The values of the specified properties.
 Object getProperty(String name)
          The value of the specified property.
 boolean isEqual(IPropertySet propertySet)
          True if the property set is the same as the input property set.
 void removeProperty(String name)
          Removes a property from the set.
 void setProperties(Object names, Object values)
          The values of the specified properties.
 void setProperty(String name, Object value)
          The value of the specified property.
 

Method Detail

getCount

int getCount()
             throws IOException,
                    AutomationException
The number of properties contained in the property set.

Remarks

The Count value will always be one when used with the esriGeodatabase.XmlPropertySet coclass. For more information, see the remarks for the XmlPropertySet coclass.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Returns:
The count
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.
See Also:
com.esri.arcgis.system.IXmlPropertySet, com.esri.arcgis.system.IXmlPropertySet2

getProperty

Object getProperty(String name)
                   throws IOException,
                          AutomationException
The value of the specified property.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Parameters:
name - The name (in)
Returns:
A Variant
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.
See Also:
IPropertySet.getProperties(java.lang.Object, Object[]), IPropertySet.getAllProperties(Object[], Object[])

getProperties

void getProperties(Object names,
                   Object[] values)
                   throws IOException,
                          AutomationException
The values of the specified properties.

Remarks

The GetProperties method returns values from a PropertySet CoClass.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Parameters:
names - A Variant (in)
values - A Variant (out: use single element array)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.
See Also:
IPropertySet.getAllProperties(Object[], Object[]), IPropertySet.getProperty(String)

getAllProperties

void getAllProperties(Object[] names,
                      Object[] values)
                      throws IOException,
                             AutomationException
The name and value of all the properties in the property set.

Remarks

The GetAllProperties retrieves all names and values in the property set.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Parameters:
names - A Variant (out: use single element array)
values - A Variant (out: use single element array)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.
See Also:
IPropertySet.getProperties(java.lang.Object, Object[]), IPropertySet.getProperty(String)

setProperty

void setProperty(String name,
                 Object value)
                 throws IOException,
                        AutomationException
The value of the specified property.

Remarks

The Name parameter uses XSL Patterns to specify metadata elements. Additional information on XSL can be found in the the IXmlPropertySet documentation.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Parameters:
name - The name (in)
value - A Variant (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.
See Also:
com.esri.arcgis.system.IXmlPropertySet, com.esri.arcgis.system.IXmlPropertySet2, IPropertySet.setProperties(java.lang.Object, java.lang.Object)

setProperties

void setProperties(Object names,
                   Object values)
                   throws IOException,
                          AutomationException
The values of the specified properties.

Remarks

Using the Name parameter to locate the specified element, the SetProperties method populates the elements, or adds an new element if it already exists, and sets the value to the coorseponding Values parameter.

The Name parameter uses XSL Patterns to specify metadata elements. Additional information on XSL can be found in the the IXmlPropertySet documentation.

esriXmlSetPropertyAction constants are NOT available to handle situations where an element value already exists. Upon encountering elements that already have values, the new values will replace or add values to existing elements. For more control dealing with elements the IXmlPropertySet::SetPropertyX should be used.

In order to populated nodes further along in the Xml tree, nodes necessary to navigate must first be established. For instance in order to populate the "idinfo/ptcontact/cntinfo/cntperp/cntorg" node each subsequent nodes, "idinfo", "idinfo/ptcontact", "idinfo/ptcontact/cntinfo" and "idinfo/ptcontact/cntinfo/cntperp" must already be in place.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Parameters:
names - A Variant (in)
values - A Variant (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.
See Also:
IPropertySet.setProperty(String, java.lang.Object), com.esri.arcgis.system.IXmlPropertySet,

This method is not interop compliant and hence unsupported in Java. Use setProperty() instead.


isEqual

boolean isEqual(IPropertySet propertySet)
                throws IOException,
                       AutomationException
True if the property set is the same as the input property set.

Remarks

This method indicates whether two property sets are equal.

Note that it will always return false if the property set is an esriGeodatabase.XmlPropertySet (for metadata). See the XmlPropertySet coclass' documentation for more information.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

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

removeProperty

void removeProperty(String name)
                    throws IOException,
                           AutomationException
Removes a property from the set.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Parameters:
name - The name (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.
See Also:
com.esri.arcgis.system.IXmlPropertySet