TIP Soap Generator Mapping Rules - Part II

Mapping Rules for Association

Association end; isNavigable

Related to issue #53 in Mantis Association end: isNavigable

Mapping Rule

• Navigable association end will be mapped to a sub-element in Entity XSD complex type.

refer to TIP Soap Generator Mapping Rules - Part I

• Non-navigable association ends will be ignored

Example (isNavigable=true, tipAttribute:passedById=true)

In SPM model, the entity Problem has an association ProblemHasAffectedLocations which has following ends:

• z-end: name = problem, type = org.tmforum.tip.cbe.problem.Problem

• a-end: name = affectedLocations, type = org.tmforum.tip.cbe.location.geo.GeographicPlace, isNavigable= true, multiplicity = *, tipAttribute:passedById = true

The navigable a-end will be mapped to a sub-element of Problem XSD type:

<xsd:complexType name="Problem" abstract="true">
    <xsd:complexContent>
        <xsd:extension base="entity:EntityBase">
           <xsd:sequence>
              <!—many elements correspond to attrubutes or association ends-->

              <xsd:element name="affectedLocations" type="entity:ArrayOfEntityIdentifier" minOccurs="0">
	          <xsd:annotation>
		      <xsd:documentation>
                         List of affected locations.
                         Either the list of affected services or the list of affected resources or 
                         the list of affected  locations should at least be present. Both cannot be absent.
                      </xsd:documentation>
		  </xsd:annotation>
	      </xsd:element>

	    </xsd:sequence>
        </xsd:extension>
    </xsd:complexContent>
</xsd:complexType>

Example (isNavigable=true, tipAttribute:passedById=false)

In previous example, for the end affectedLocations, if we change the value of tipAttribute:passedById to 'false', then in Problem XSD type, we will see

<xsd:complexType name="Problem" abstract="true">
    <xsd:complexContent>
        <xsd:extension base="entity:EntityBase">
           <xsd:sequence>
              <!—many elements correspond to attrubutes or association ends-->

                  <xsd:element name="affectedLocations" type="geo:ArrayOfGeographicPlace" minOccurs="0">
		      <xsd:annotation>
		          <xsd:documentation>
                              List of affected locations.
                              Either the list of affected services or the list of affected resources 
                              or the list of affected locations should at least be present. Both cannot be absent.
                          </xsd:documentation>
		      </xsd:annotation>
		  </xsd:element>

	    </xsd:sequence>
        </xsd:extension>
    </xsd:complexContent>
</xsd:complexType>

Example (both ends have isNavigable=true and of the same type)

In SPM model, the association org.tmforum.tip.cbe.problem.ProblemHasUnderlyingProblems has following ends:

• z-end: name = parentProblems, type = org.tmforum.tip.cbe.problem.Problem, isNavigable = true, multiplicity = *, tipAttribute:passedById=true

• a-end: name = underlyingProblems, type = org.tmforum.tip.cbe.problem.Problem, isNavigable= true, multiplicity = *, tipAttribute:passedById = true

both ends are of the same type and are navigable, they will be mapped to elements of Problem XSD type:

<xsd:complexType name="Problem" abstract="true">
    <xsd:complexContent>
        <xsd:extension base="entity:EntityBase">
           <xsd:sequence>
              <!—many elements correspond to attrubutes or association ends-->

              <xsd:element name="underlyingProblems" type="entity:ArrayOfEntityIdentifier" minOccurs="0">
		  <xsd:annotation>
		      <xsd:documentation>
                          References to the underlying service problems. Only if this problem is derived 
                          from other problems.
                      </xsd:documentation>
		  </xsd:annotation>
	       </xsd:element>
               <xsd:element name="parentProblems" type="entity:ArrayOfEntityIdentifier" minOccurs="0">
	          <xsd:annotation>
		      <xsd:documentation>
                           The parent problem to which this problem is attached.
                      </xsd:documentation>
		  </xsd:annotation>
	        </xsd:element>

	    </xsd:sequence>
        </xsd:extension>
    </xsd:complexContent>
</xsd:complexType>

Association end; support of tipAttribute stereotype; passedById

Related to issue #54 in Mantis Association end: support of tipAttribute stereotype

tipAttribute stereotype is applicable for navigable association end.

Mapping Rule

refer to   TIP Soap Generator Mapping Rules - Part I#Mapping Rule for Attributes, Association Ends, and Parameters

Example

In SPM model, the association org.tmforum.tip.cbe.problem.ProblemHasAffectedServices has following ends:

• z-end: name=problem, type=org.tmforum.tip.cbe.problem.Problem, tipAttribute:passedbyId=false, isNavigable=false

• a-end: name=affectedServices, type=org.tmforum.tip.service.service.Service,tipAttribute:passedById=true, isNavigable=true

Because the aEnd is Navigable, it must be mapped to a sub-element of Problem XSD type. The aEnd has 'passedById=true', and has multiplicity * so the generated sub-element is of type ArrayOfEntityIdentifier, with multiplicity 'minOccurs=0 maxOccurs=1'.

Example

Please refer to example in previous sections.

Association end; support of tipAttribute stereotype; notificationDefinition

Related to issue #54 in Mantis Association end: support of tipAttribute stereotype

Mapping Rule

Refer to   TIP Soap Generator Mapping Rules - Part I#Attribute; NotificationDefinition

Example

In TIP Test1 model, the association class org.tmforum.tip.cbe.test.TestAssociatedWithTestProblem is AVC-enabled because it has at least one AVC-enabled attribute, say, attribute1. We have an XSD complex type TestAssociatedWithTestProblem in the name space http://www.tmforum.org/xml/tip/cbe/test. An AVC notification type and a global element are generated in the same namespace with following structures:

	<xsd:complexType name="TestAssociatedWithTestProblemAVCN">
	    <xsd:complexContent>
		<xsd:extension base="notifications:AVCNotification">
		    <xsd:sequence>
			<xsd:element name="attribute1" type="xsd:string"></xsd:element>
			<xsd:element name="attribute3" type="entity:EntityIdentifier"></xsd:element>
		    </xsd:sequence>
		</xsd:extension>
	    </xsd:complexContent>
	</xsd:complexType>

	<xsd:element name="testAssociatedWithTestProblemAVCNotification" type="tns:TestAssociatedWithTestProblemAVCNotification">
	    <xsd:annotation>
		<xsd:documentation>
		   TestAssociatedWithTestProblem Attribute Value Change Event. Event that is sent when the attribute values of a TestAssociatedWithTestProblem have changed. 
                </xsd:documentation>
	    </xsd:annotation>
	</xsd:element>

Association end; support of tipAttribute stereotype; isInvariant

Related to issue #54 in Mantis Association end: support of tipAttribute stereotype

show the value of isInvariant in XSD documentation.

Association end; isUnique

Related to issue #55 in Mantis Association end: isUnique

show the value of isUnique in XSD documentation element.

Association end; isOrdered

Related to issue #73 in Mantis Association end: isOrdered

This covers the use of isOrdered property on Association end.

show value of isOrdered in XSD docuementation element.

Association end; entity is in external reference

Related to issue #74 in Mantis Association end: entity is in external reference

This covers the case of an association end pointing to an Entity that is in an external reference (module).
The generator calculates and generates the referenced XSD files on fly.

Mapping Rule

If an entity has a navigable association end,

  • if the end refers to an external entity and has "tipAttribute:passedById=true", then the end will be mapped to a sub-element in entity XSD type, and the type of this sub-element is EntityIdentifier or ArrayOfEntityIdentifier, depending on muliplicity of the end.
  • if the end refers to an external type (e.g. entity, datatype) and has "tipAttribute:passedById=false", then the end will be mapped to a sub-element in
    entity XSD type, and the type of this sub-element is external XSD type or ArrayOf<external XSD type>, depending on muliplicity of the end.

Example (end refers to external entity, multiplicity=1, and passedById=false)

In Test1 models, for test, we change the A-end of the association org.tmforum.tip.service.test.ServiceTestProblemHasAffectedServices to:

• A-end: name=affectedService, type=org.tmforum.tip.service.service.Service (external!) multiplicity=1, is Navigable, passedById=false

Then the generated XSD content is:

    <xsd:complexType name="ServiceTestProblem">
	<xsd:annotation>
	    <xsd:documentation>
             A Service Problem is an indication that a service is no longer functioning according to the agreement with its client s .
            </xsd:documentation>
	</xsd:annotation>
	<xsd:complexContent>
	    <xsd:extension base="test:TestProblem">
		<xsd:sequence>
		    <xsd:element>some elements omitted … </xsd:element>

  		    <xsd:element name="affectedService" type="service:Service" nillable="true">
			<xsd:annotation>
			    <xsd:documentation>
      Provides the list of affected services for a given problem. Optional
Either the list of affected services or the list of affected locations should at least be present. Both cannot be absent.
                            </xsd:documentation>
			</xsd:annotation>
		    </xsd:element>

		</xsd:sequence>
	    </xsd:extension>
	</xsd:complexContent>
    </xsd:complexType>

Example (array of external entity, and passedById=true)

In Test1 models, the association org.tmforum.tip.service.test.ServiceTestProblemHasAffectedServices has following ends:

• A-end: name=affectedServices, type=org.tmforum.tip.service.service.Service (external!) multiplicity=*, is Navigable, passedById=true

• Z-end: name=problems, type=org.tmforum.tip.service.test.ServiceTestProblem, multiplicity=*

When we map entity ServiceTestProblem to XSD, the a-end is mapped to a sub-element.

Its XSD content:

    <xsd:complexType name="ServiceTestProblem">
	<xsd:annotation>
	    <xsd:documentation>
      A Service Problem is an indication that a service is no longer functioning according to the agreement with its client s .
            </xsd:documentation>
	</xsd:annotation>
	<xsd:complexContent>
	    <xsd:extension base="test:TestProblem">
		<xsd:sequence>
		    <xsd:element>some elements omitted … </xsd:element>

		    <xsd:element name="affectedServices" type="entity:ArrayOfEntityIdentifier" nillable="true">
 		        <xsd:annotation>
			    <xsd:documentation>
      Provides the list of affected services for a given problem. Optional
Either the list of affected services or the list of affected locations should at least be present. Both cannot be absent.
                            </xsd:documentation>
			</xsd:annotation>
		    </xsd:element>

		</xsd:sequence>
	    </xsd:extension>
	</xsd:complexContent>
    </xsd:complexType>

Example (end refers to external datatype, multiplicity=*, pasedById=false)

to be added

Association end; default value

Related to issue #331 in Mantis Association end: default value

In Tigerstripe, an association end has no default value.

Association end; multiplicity

Mapping Rule

refer to mapping rule   TIP Soap Generator Mapping Rules - Part I#Mapping Rule for Attributes, Association Ends, and Parameters  

Example

refer to Association end; isNavigable  , and Association end; support of tipAttribute stereotype; passedById

Mapping Rules for Association Classes

Here we only give mapping rules and examples about association classes. For those about association end, please refer to section about entity mapping rules.

Association class; support of tipClass stereotype; objectCreationNotification

Related to issue #59 in Mantis Association class: support of tipClass stereotype

Mapping Rule

Same mapping with  TIP Soap Generator Mapping Rules - Part I#tipClass; objectCreationNotification 

Example

In TIP Test1 model, the association class org.tmforum.tip.cbe.test.TestAssociatedWithTestProblem is OC-enabled. TestAssociatedWithTestProblem is mapped to an XSD complex type with the same name in the name space http://www.tmforum.org/xml/tip/cbe/test. A subtype of TIP Common ObjectCreationNotification and a global element will be generated with following structures:

	<xsd:complexType name="TestAssociatedWithTestProblemOCN">
	    <xsd:complexContent>
		<xsd:extension base="notifications:OCNotification">
		    <xsd:sequence>
			<xsd:element name="object" type="tns:TestAssociatedWithTestProblem" minOccurs="0"/>
		    </xsd:sequence>
		</xsd:extension>
	    </xsd:complexContent>
	</xsd:complexType>

	<xsd:element name="testAssociatedWithTestProblemOCN" type="tns:TestAssociatedWithTestProblemOCN">
	    <xsd:annotation>
		<xsd:documentation>
                  Event that is sent if an TestAssociatedWithTestProblem instance has been created.</xsd:documentation>
		</xsd:annotation>
	</xsd:element>

Association class; support of tipClass stereotype; objectDeletionNotification

Related to issue #59 in Mantis Association class: support of tipClass stereotype

Mapping Rule

same with the mapping rule defined in   TIP Soap Generator Mapping Rules - Part I#tipClass; objectDeletionNotification 

Example (tipClass:objectDeletionNotification=YES)

In TIP Test1 model, if the association class org.tmforum.tip.cbe.test.TestAssociatedWithTestProblem is ODel-enabled, an Object Deletion notification type and a global element will be generated in the same name space with TestAssociatedWithTestProblem XSD type. Their structures are:

	<xsd:complexType name="TestAssociatedWithTestProblemODelN">
		<xsd:complexContent>
			<xsd:extension base="notifications:ODelNotification">
				<xsd:sequence>
					<xsd:element name="object" type="tns:TestAssociatedWithTestProblem " minOccurs="0"/>
				</xsd:sequence>
			</xsd:extension>
		</xsd:complexContent>
	</xsd:complexType>

	<xsd:element name="testAssociatedWithTestProblemODelN" type="tns:TestAssociatedWithTestProblemODelN">
		<xsd:annotation>
			<xsd:documentation>
                                  Event that is sent if a TestAssociatedWithTestProblem instance has been deleted.
                        </xsd:documentation>
		</xsd:annotation>
	</xsd:element>

Association class; support of tipClass stereotype; objectDiscoveryNotification

Related to issue #59 in Mantis Association class: support of tipClass stereotype

Mapping Rule

same with the mapping rule defined in    TIP Soap Generator Mapping Rules - Part I#tipClass; objectDiscoveryNotification    

Example (tipClass:objectDiscoveryNotification=YES)

In TIP Test1 model, if the association class org.tmforum.tip.cbe.test.TestAssociatedWithTestProblem is ODisc-enabled, an Object Discovery notification type and a global element will be generated in the same name space with TestAssociatedWithTestProblem XSD type. Their structures are:

	<xsd:complexType name="TestAssociatedWithTestProblemODisN">
		<xsd:complexContent>
			<xsd:extension base="notifications:ODisNotification">
				<xsd:sequence>
					<xsd:element name="object" type="tns:TestAssociatedWithTestProblem " minOccurs="0"/>
				</xsd:sequence>
			</xsd:extension>
		</xsd:complexContent>
	</xsd:complexType>

	<xsd:element name="testAssociatedWithTestProblemODisN" type="tns:TestAssociatedWithTestProblemODisN">
		<xsd:annotation>
			<xsd:documentation>
                                  Event that is sent if a TestAssociatedWithTestProblem instance has been discovered.
                        </xsd:documentation>
		</xsd:annotation>
	</xsd:element>

Association class; abstract

Related to issue #60 in Mantis Association class: abstract

Mapping Rule

Map abstract association class artifact to an abstract XSD type.

Association class; inheritance

Related to issue #61 in Mantis Association class: inheritance

Mapping Rule

Map inheritance of artifacts to extension of XSD types. Note that in TIP model, it is no 'multiple inheritance' is allowed.

Example

In Test1 model, org.tmforum.tip.service.test.TestAssociatedWithServiceTestProblem extends org.tmforum.tip.cbe.test.TestAssociatedWithTestProblem. We map this relationship to XSD:

    <xsd:complexType name="TestAssociatedWithServiceTestProblem">
		<xsd:annotation>
			<xsd:documentation>      </xsd:documentation>
		</xsd:annotation>
		<xsd:complexContent>
			<xsd:extension base="test:TestAssociatedWithTestProblem">
				<xsd:sequence>
					<xsd:element name="attribute0" type="xsd:string">
						<xsd:annotation>
							<xsd:documentation>
      
                                                        </xsd:documentation>
						</xsd:annotation>
					</xsd:element>
					<xsd:element name="attribute1" type="xsd:string">
						<xsd:annotation>
							<xsd:documentation>
      
                                                        </xsd:documentation>
						</xsd:annotation>
					</xsd:element>
				</xsd:sequence>
			</xsd:extension>
		</xsd:complexContent>
	</xsd:complexType>

Association class; association support

Related to issue #62 in Mantis Association class: association support

Mapping Rule

Map navigable end to sub-element of entity XSD type. Refer to related mapping rules about association end: TIP Soap Generator Mapping Rules - Part I#Mapping Rules for Association  

Example

We see in Test1 model, the association class org.tmforum.tip.service.test.TestAssociatedWithServiceTestProblem has a navigable end – the a-end. Its z-end is of type org.tmforum.cbe.test.Test which is an entity artifact. So in Test XSD, we have a sub-element which comes from the navigable association end.

In Test XSD, we see:

    <xsd:complexType name="Test">
		<xsd:annotation>
			<xsd:documentation>
                            Test class for use in the test model
                        </xsd:documentation>
		</xsd:annotation>
		<xsd:complexContent>
			<xsd:extension base="entity:EntityBase">
				<xsd:sequence>
					<xsd:element name="testProblem" type="entity:ArrayOfEntityIdentifier" minOccurs="0" maxOccurs="1">
						<xsd:annotation>
							<xsd:documentation>
      
                                                        </xsd:documentation>
						</xsd:annotation>
					</xsd:element>
					<xsd:element name="serviceTestProblem" type="entity:EntityIdentifier" minOccurs="0" maxOccurs="1">
						<xsd:annotation>
							<xsd:documentation>
      
                                                        </xsd:documentation>
						</xsd:annotation>
					</xsd:element>
				</xsd:sequence>
			</xsd:extension>
		</xsd:complexContent>
</xsd:complexType>

Association class; attribute support

Related to issue #63 in Mantis Association class: attribute support

Mapping Rule

When an association class artifact is mapped to XSD complex type, its attributes are mapped to subelements of the XSD complex type.

refer to mapping rules in   TIP Soap Generator Mapping Rules - Part I#Mapping Rule for Attributes, Association Ends, and Parameters

Example

In Test1 model, we have org.tmforum.tip.cbe.test.TestAssociatedWithTestProblem

It is mapped to a XSD complex type:

    <xsd:complexType name="TestAssociatedWithTestProblem">
	<xsd:annotation>
	    <xsd:documentation>
              association class for use in the test model
            </xsd:documentation>
	</xsd:annotation>
	<xsd:sequence>
	    <xsd:element name="attribute1" type="xsd:string">
		<xsd:annotation>
		    <xsd:documentation>
                      dummy attribute 1
                    </xsd:documentation>
		</xsd:annotation>
	    </xsd:element>
	    <xsd:element name="attribute2" type="xsd:boolean">
		<xsd:annotation>
		    <xsd:documentation>
                     dummy attribute 2
                    </xsd:documentation>
		</xsd:annotation>
	    </xsd:element>
	    <xsd:element name="attribute3" type="entity:EntityIdentifier">
		<xsd:annotation>
		    <xsd:documentation>
      
                    </xsd:documentation>
		</xsd:annotation>
	    </xsd:element>
	</xsd:sequence>
    </xsd:complexType>