8.4.2 Property types
A property type has the same attributes as non-property types,
but a different set of sub-elements specifying the data type and dialog widget
for values of this property:
<property
description=""
id="Property_Name_sysadmin_3150525691"
type="Property_Name_sysadmin_3150525691"
typeName="Name [Watch]">
<dataType>
<simpleType>String</simpleType>
</dataType>
<widget>Input Field</widget>
</property>Data Type values can be either simple
or complex. The simple values are those that can be seen directly in the Data
Type pull-down list in the Property Tool: String, Text, Number, Boolean,
Creation Timestamp, or Collection. These are enclosed as XML text within a
simpleType tag.
If the data type is a simple String, you can optionally
supply a <widget> used to edit
values of that type. The default value is Input Field, but you can supply any of
the values shown in the Widget choice dialog of the Property Tool (except SOAP
Fixed List). If you supply one of the List widgets or a Radio Button Set widget,
you must also supply a defaultValue and
a set of listValues:
<property typeName="TestRadioButtons">
<dataType>
<simpleType>String</simpleType>
</dataType>
<defaultValue>
<string>a</string>
</defaultValue>
<widget>Radio Button Set</widget>
<listValues>
<string>a</string>
<string>b</string>
<string>c</string>
</listValues>
</property>For the SOAP Fixed List property types
we must provide a soapSource and its soapServer in MXT. All elements and
attributes are mandatory:
<soapSource>
<soapServer name="ValueListServer"
serverUrl=http://localhost:4242/valuelistserver
wsdlUrl="file:///./stringlists.wsdl"></soapServer>
<method>ValueList1</method>
</soapSource>A soapServer is referred to with href
by types using it later in the same file. Importing thus creates each SOAP
server only once, although repeated imports will create a new one each
time.
If the dataType
is Collection, an extra
contentsDataType element must be
supplied. Its content is either a
simpleType element containing String,
or a graph, object, relationship, role or port element defining the contents
type (or referring to it with
href).
<property typeName="TestStringCollection">
<dataType>
<simpleType>Collection</simpleType>
</dataType>
<contentsDataType>
<simpleType>String</simpleType>
</contentsDataType>
</property>
<property typeName="TestGraphCollection">
<dataType>
<simpleType>Collection</simpleType>
</dataType>
<contentsDataType>
<graph href="#MyGraph1"></graph>
</contentsDataType>
</property>Properties whose values are objects are
represented directly with an object element inside the
dataType element; similarly for other
non-properties:
<property typeName="TestGraphProperty">
<dataType>
<graph href="#MyGraph1"></graph>
</dataType>
</property>If a data type or a content data type
has subtypes, they can be included as well, with a subtype coming before its
sub-subtypes:
<property...>
<dataType><object.../></dataType>
<dataTypeSubtype><object.../></dataTypeSubtype>
<dataTypeSubtype><object.../></dataTypeSubtype>...