Configuring Structural Properties
Structural properties in OData are the attributes that define a business object or entity. Windchill REST Services reads the properties of attributes, which is a JSON array, from the <Entity JSON> file. Each entry in the attribute defines one structural property for the entity being configured. The structural property comprises of the following parameters:
• name—Name of the structural property. Property name is always defined in camel case.
• internalName—Internal name of the Windchill property that corresponds to the structural property being configured.
• type—Framework data type for the structural property being configured. Framework data type is same as the OData primitive type without the Edm prefix. For example, the framework data type corresponding to OData Edm.Double is Double.
• required—Specifies if the attribute is required. Set the parameter value as true or false.
• readOnly—Specifies if the attribute is read-only. Set the parameter value as true or false.
• driver—Specifies if the attribute is a driver attribute. Set the parameter value astrue or false.
• nonFilterable—Specifies if the attribute can be queried using a $filter expression. Set the parameter value as true or false.
When you set the parameter value as true, the attribute does not support $filter expressions. The attribute is added to the FilterRestrictions annotation in the entity set of the entity. The FilterRestrictions annotation is defined in the Capabilities Vocabulary of OData, which specifies properties and attributes that do support $filter expressions.
If such an attribute is used in a $filter expression, the server returns an error message.
• isCollection—Specifies if the property supports multivalued attributes. Set the parameter value as true or false.
When you set the parameter as true, the property supports multivalued attributes, such as, complex types.
• common—Specifies if the parameter is a Windchill attribute that is common for objects and can be edited. Set the parameter value as true to make the attribute editable.
• immutable—Specifies that the attribute is immutable. Set the parameter value as true. The framework then allows to set the initial value of the attribute while creating the entity, but does not allow to update the value, thereafter.
• rbInfoForDisplayName—This property must be set to return a custom display name for an entity property. It is defined as:
"rbInfoForDisplayName": "<rbinfo_ClassName>|<key>"