com.esri.arcgis.system
Interface IPropertySet

All Superinterfaces:
java.io.Serializable
All Known Subinterfaces:
IPropertySet2
All Known Implementing Classes:
GenericLocatorStyle, IPropertySet2Proxy, IPropertySetProxy, PropertySet, XmlPropertySet

public interface IPropertySet
extends java.io.Serializable

Provides access to members for managing a PropertySet.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

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.


Method Summary
 void getAllProperties(java.lang.Object[] names, java.lang.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(java.lang.Object names, java.lang.Object[] values)
          The values of the specified properties.
 java.lang.Object getProperty(java.lang.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(java.lang.String name)
          Removes a property from the set.
 void setProperties(java.lang.Object names, java.lang.Object values)
          The values of the specified properties.
 void setProperty(java.lang.String name, java.lang.Object value)
          The value of the specified property.
 

Method Detail

getCount

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

Supported Platforms

Windows, Solaris, Linux

Remarks

The Count value will always be one when used with the XmlPropertySet CoClass.  To determine the number of occurances of a metadata element use IXmlPropertySet::CountX

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

getProperty

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

Supported Platforms

Windows, Solaris, Linux

Remarks

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


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

getProperties

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

Supported Platforms

Windows, Solaris, Linux

Remarks

The GetProperties method returns values from a PropertySet CoClass. 

The Name parameter for the GetProperties method uses XSL Patterns. More information is available through the IXmlPropertySet documentation.

Parameters:
names - A Variant (in)
values - A Variant (out: use single element array)
Throws:
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.
See Also:
getProperty(java.lang.String), com.esri.arcgis.system.IPropertySet#getAllProperties([Ljava.lang.Object;, [Ljava.lang.Object;)

getAllProperties

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

Supported Platforms

Windows, Solaris, Linux

Remarks

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

The Name parameter for the GetAllProperties method uses XSL Patterns. More information is available through the IXmlPropertySet documentation.

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

setProperty

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

Parameters:
name - The name (in)
value - A Variant (in)
Throws:
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

setProperties

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

Parameters:
names - A Variant (in)
values - A Variant (in)
Throws:
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

isEqual

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

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

removeProperty

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

Supported Platforms

Windows, Solaris, Linux

Remarks

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

If the Name parameter specifies an node that contains several elements, all sub-nodes will also be removed.  In the image below setting the Name parameter equal to "metainfo/metc/cntinfo" will remove all the ESRI contact information between the highlighted elements.

Parameters:
name - The name (in)
Throws:
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.
See Also:
IXmlPropertySet.deletePropertyByAttribute(java.lang.String, java.lang.String, boolean)