TIP Soap Generator Mapping Rules - Part VII
JOSIF Main Page | JOSIF Framework | TIP Soap Generator | TIP Soap Generator Mapping Rules - Part VII
Operations requiring selection of entities based on attribute values may
provide a filter construct.
This filter construct may be based on primitive.filter or be associated
via common operations stereotypes (see common operations).
A common operation stereotype may define a filter as being a template
or a combination of a template and a query filter.
A query filter is mapped to an element with an XPATH expression.
A template filter is mapped to a sequence of attribute matching filters
(using associative lookup).
When both template and query filters are specified then a choice construct
is being generated.
Operation using primitive filters as input arguments are mapped to operations
using query filters which are XPATH expressions.
For example in the RAM interface the getResourceAlarms operation is modeled using a common
operation stereotype with both template and query options being set. This does translate into the
generation of the following schema elements and types.
<xsd:element name="getResourceAlarmsRequest"> <xsd:annotation> <xsd:documentation> <p>The getResourceAlarms request message XML schema.</p> </xsd:documentation> </xsd:annotation> <xsd:complexType> <xsd:complexContent> <xsd:extension base="iterator:CommonRequest"> <xsd:sequence> <xsd:element name="filter" type="tns:ResourceAlarmFilterChoice" minOccurs="0" maxOccurs="1"> <xsd:annotation> <xsd:documentation> <p>Template or XPATH filter</p> <p>This parameter is input parameter</p> <p>This parameter has multiplicity 1</p> <p>This parameter is unique</p> <p>This parameter is mandatory</p> </xsd:documentation> </xsd:annotation> </xsd:element> <xsd:element name="attributeSelector" type="primitives:ArrayOfString" minOccurs="0" maxOccurs="1"> <xsd:annotation> <xsd:documentation> <p>Allow to specify which attributes to return. It allows to return only a subset of the object instead of the full object. If empty, the full object is returned.</p> <p>This parameter is input parameter</p> <p>This parameter has multiplicity 0..*</p> <p>This parameter is unique</p> <p>This parameter is optional</p> </xsd:documentation> </xsd:annotation> </xsd:element> <xsd:element name="extensionInfo" minOccurs="0"> <xsd:annotation> <xsd:documentation> a generic list of any type of elements. Used for vendor extensions or loose element encapsulation from other namespaces. </xsd:documentation> </xsd:annotation> <xsd:complexType> <xsd:sequence> <xsd:any namespace="##any" processContents="lax" minOccurs="0" maxOccurs="unbounded"/> </xsd:sequence> </xsd:complexType> </xsd:element> </xsd:sequence> </xsd:extension> </xsd:complexContent> </xsd:complexType> </xsd:element>
<xsd:complexType name="ResourceAlarmFilterChoice"> <xsd:choice> <xsd:element name="templateFilter" type="tns:ResourceAlarmTemplateFilter" minOccurs="0" maxOccurs="1"/> <xsd:element name="queryFilter" type="tns:XPathQueryFilter" minOccurs="0" maxOccurs="1"/> </xsd:choice> </xsd:complexType>
<xsd:element name="templateFilter" type="tns:ResourceAlarmTemplateFilter"/> <xsd:complexType name="ResourceAlarmTemplateFilter"> <xsd:complexContent> <xsd:extension base="filter:TemplateFilter"> <xsd:sequence> <xsd:element name="templates" type="tns:ArrayOfResourceAlarmTemplate" minOccurs="0" maxOccurs="1"/> </xsd:sequence> </xsd:extension> </xsd:complexContent> </xsd:complexType>
<xsd:complexType name="XPathQueryFilter"> <xsd:complexContent> <xsd:extension base="filter:QueryFilter"> <xsd:sequence> <xsd:element name="xpathExpression" type="xsd:string" minOccurs="0" maxOccurs="1"/> </xsd:sequence> </xsd:extension> </xsd:complexContent> </xsd:complexType>
<xsd:complexType name="ArrayOfResourceAlarmTemplate"> <xsd:sequence> <xsd:element name="item" type="tns:ResourceAlarmTemplate" minOccurs="0" maxOccurs="unbounded"/> </xsd:sequence> </xsd:complexType>
where the ResourceAlarmTemplate contains all the attributes of the ResourceAlarm.