Creates an agent-metadata object.
Syntax
public AgentMetaData(ODKAgentBase2 ODAobject);
public AgentProperty(ODKAgentBase2 ODAobject, String version);
Parameters
- ODAobject
- Is a reference to the ODA object that represents the ODA. The
constructor queries this object to initialize the
supportedContent member variable of the
AgentMetaData object (supportedContent).
- version
- Specifies the version of the ODA; the
value of this parameter initializes the agentVersion
member variable of the AgentMetaData object (agentVersion).
Return values
A newly instantiated AgentMetaData object.
Notes
The AgentMetaData() method queries the ODAobject
ODA for its supported content. This constructor provides the
following forms for instantiating a new AgentMetaData
object:
- The first form defines a new AgentMetaData object and
only initializes its supported content. This form assumes that the
ODA does not have a version.
- The second form defines a new AgentMetaData object and
initializes it with both its supported content and version.
Both of these forms of the constructor use the ODAobject
reference to query the ODA for its supported content. Using this
information, the constructor initialize the
supportedContent member variable.
- Note:
- The AgentMetaData() constructor does not
initialize the member variables that support the search-pattern
feature. For your ODA to support search patterns, you must
explicitly initialize the searchableNodes and
searchPatternDesc member variables after the
AgentMetaData object is instantiated. If you do not
initialize searchableNodes, it defaults to a value of
false.
