Model Generation

This generator, developed by Optare Solutions to the TMForum, is used to the ontology generation for data models.

Web Ontology Language (OWL) was chosen to generate the semantic description of the data model. This ontology is a knowledge representation, thus, it is capable of adding semantic capacity to the data model. Also, this language enables us to describe all artifacts from the model and all the corresponding links or relationships between them.

The ontologies created by this generator have as starting point the definitions of the outcomes of the European project IP-SUPER. Nevertheless, these ontology descriptions are in WSML and the project was focused in an old version of the Frameworx. Actually, this project was finished on March 2009.

Generation

As a result, the OWL generator will produce one OWL file. To generate this file we use two global rules:

To perform this generation, both rules need access to helper classes.

Mapping rules

In this section we will explain the design guidelines for the model generation.

Mapping rules for Entities, Datatypes, Enumerations, Events and Exceptions

Mapping rule for artifacts

 

 

Figure 1: Example artifacts.

 

<owl:Class rdf:ID="Granularity"/>
<owl:Class rdf:ID="MeasurementJob"/>

Mapping rules for inheritance

 

 

 

 

 

 

 

 

 

Figure 2: Agreement artifact definition.

 

<owl:Class rdf:ID="Agreement"> 
	<rdfs:subClassOf rdf:resource="#BusinessInteraction"/>
</owl:Class>

 

 

 

 

 

 

 

 

 

 

Figure 3: BusinessInteractionRole definition.

 

<owl:Class rdf:ID="BusinessInteractionRole">
	<rdfs:subClassOf rdf:resource="#SIDEntity"/>
</owl:Class>

Mapping rules for attributes

 

 

 

 

 

Figure 4: CapacityDemand attributes.

 

<rdfs:subClassOf>
	<owl:Restriction>
		<owl:onProperty rdf:resource="#priority"/>
		<owl:onDataRange rdf:resource="&xsd;string"/>
		<owl:cardinality rdf:datatype="&xsd;nonNegativeInteger">1</owl:cardinality>
	</owl:Restriction>
</rdfs:subClassOf>
<rdfs:subClassOf>
	<owl:Restriction>
		<owl:onProperty rdf:resource="#capacityDemandAmountTo"/>
		<owl:onClass rdf:resource="#Quantity"/>
		<owl:cardinality rdf:datatype="&xsd:nonNegativeInteger">1</owl:cardinality>
	</owl:Restriction>
</rdfs:subClassOf>

 

 

<owl:ObjectProperty rdf:ID="quantity">
	<rdfs:domain rdf:resource="#BusinessInteractionItem"/>
	<rdfs:range rdf:resource="#Quantity"/>
</owl:ObjectProperty>

 

 

<owl:DatatypeProperty rdf:ID="action">
	<rdfs:domain rdf:resource="#BusinessInteractionItem"/>
	<rdfs:range rdf:resource="&xsd;string"/>
</owl:DatatypeProperty>

 

   If  an attribute definition has multiplicity “0..*”, “1..*” or “*”, then property type is mapped as “ArrayOf + attribute type” and type multiplicity is mapped as “0..1”.

   In any other case multiplicity is mapped as it is defined in the attribute.

 

<rdfs:subClassOf>
	<owl:Restriction>
		<owl:onProperty rdf:resource="#transmissionParameterList"/>
		<owl:onClass rdf:resource="#ArrayOfTransmissionParameterList"/>
		<owl:minCardinality rdf:datatype="&xsd;nonNegativeInteger">0</owl:minCardinality>
	</owl:Restriction>
</rdfs:subClassOf>
<rdfs:subClassOf>
	<owl:Restriction>
		<owl:onProperty rdf:resource="#transmissionParameterList"/>
		<owl:onClass rdf:resource="#ArrayOfTransmissionParameterList"/>
		<owl:maxCardinality rdf:datatype="&xsd;nonNegativeInteger">1</owl:maxCardinality>
	</owl:Restriction>
</rdfs:subClassOf>

 

   This property is mapped as “ObjectProperty”.

 

 

 

 

 

Figure 5: Domain definition.

 

Property definition:

 

<owl:ObjectProperty rdf:ID="belongsToDomain">
	<rdfs:domain rdf:resource="#BusinessInteraction"/>
	<rdfs:range rdf:resource="#BusinessInteractionABE"/>
</owl:ObjectProperty>

 

Reference in class:

 

<rdfs:subClassOf>
	<owl:Restriction>
		<owl:onProperty rdf:resource="#belongsToDomain"/>
		<owl:onClass rdf:resource="#BusinessInteractionABE"/>
		<owl:cardinality rdf:datatype="&xsd;nonNegativeInteger">1 </owl:cardinality>
	</owl:Restriction>
</rdfs:subClassOf>

Mapping rules for Associations

 

 

 

 

Figure 6: AgreementAcceptedVia association.

 

   In Agreement class definition, “AgreementAcceptedVia” is defined as “ObjectProperty” with AgreementApproval type.

 

Property definition:

 

<owl:ObjectProperty rdf:ID="AgreementAcceptedVia">
	<rdfs:domain rdf:resource="#Agreement"/>
	<rdfs:range rdf:resource="#AgreementApproval"/>
</owl:ObjectProperty>

 

Reference in class:

 

<rdfs:subClassOf>
	<owl:Restriction>
		<owl:onProperty rdf:resource="#AgreementAcceptedVia"/>
		<owl:onClass rdf:resource="#ArrayOfAgreementApproval"/>
		<owl:minCardinality rdf:datatype="&xsd;nonNegativeInteger">0 </owl:minCardinality>
	</owl:Restriction>
</rdfs:subClassOf>
<rdfs:subClassOf> 
	<owl:Restriction>
		<owl:onProperty rdf:resource="#AgreementAcceptedVia"/>
		<owl:onClass rdf:resource="#ArrayOfAgreementApproval"/>
		<owl:maxCardinality rdf:datatype="&xsd;nonNegativeInteger">1 </owl:maxCardinality>
	</owl:Restriction>
</rdfs:subClassOf>

 

 

Property definition:

 

<owl:ObjectProperty rdf:ID="ServiceProblemHasAffectedResources">
	<rdfs:domain rdf:resource="#ServiceProblem"/>
	<rdfs:range rdf:resource="#EntityIdentifier"/>
</owl:ObjectProperty>

 

Reference in class:

 

<rdfs:subClassOf>
	<owl:Restriction>
		<owl:onProperty rdf:resource="#ServiceProblemHasAffectedResources"/>
		<owl:onClass rdf:resource="#ArrayOfEntityIdentifier"/>
		<owl:minCardinality rdf:datatype="&xsd;nonNegativeInteger">0</owl:minCardinality>
	</owl:Restriction>
</rdfs:subClassOf>
<rdfs:subClassOf>
	<owl:Restriction>
		<owl:onProperty rdf:resource="#ServiceProblemHasAffectedResources"/>
		<owl:onClass rdf:resource="#ArrayOfEntityIdentifier"/>
		<owl:maxCardinality rdf:datatype="&xsd;nonNegativeInteger">1</owl:maxCardinality>
	</owl:Restriction>
</rdfs:subClassOf>

 

   If end definition has multiplicity “0..*”, “1..*” or “*”, then property type is mapped as “ArrayOf + end type” and type multiplicity is mapped as “0..1”.

   In any other case multiplicity is mapped as it is defined in the end.

 

<rdfs:subClassOf>
	<owl:Restriction>
		<owl:onProperty rdf:resource="#BusinessInteractionItemInvolves"/>
		<owl:onClass rdf:resource="#ArrayOfBusinessInteractionRole"/>
		<owl:minCardinality rdf:datatype="&xsd;nonNegativeInteger">0</owl:minCardinality>
	</owl:Restriction>
</rdfs:subClassOf>
<rdfs:subClassOf>
	<owl:Restriction>
		<owl:onProperty rdf:resource="#BusinessInteractionItemInvolves"/>
		<owl:onClass rdf:resource="#ArrayOfBusinessInteractionRole"/>
		<owl:maxCardinality rdf:datatype="&xsd;nonNegativeInteger">1</owl:maxCardinality>
	</owl:Restriction>
</rdfs:subClassOf>

Mapping rules for AssociationClasses

Association class artifacts are mapped as Entities, Datatypes… (as in section 1.2.1.3). The singularity is that these artifacts can also define an association. This association is treated as in the case of Association artifacts (section 1.2.2).

Mapping new types

The definition of certain stereotypes on artifacts and other variables generates some new classes in the OWL model file. These artifacts are not defined in the model.

Interface Generation

To generate interface ontologies we have chosen Web Ontology Language for Services (OWL-S) given its simplicity and strength.

This ontology language is based in OWL but it is used to describe semantic web services, thus being appropriate to describe interfaces. This semantic definition allows automating web service discovery, execution, composition and interoperation.

Generation

For each interface that exists in the model six files are generated to complete the OWL-S schema (Figure 7: OWL-S schema.). These files are:

   Grounding definition involves complementary use of the OWL and WSDL languages. These two languages are required for the full specification of grounding, because the two languages do not cover the same conceptual space.

 

 

 

 

 

 

 

 

 

 

 

Figure 7: OWL-S schema.

 

To generate these files we need one rule per file. All the needed rules are artifact rules, which will be executed once for each interface in the project. The results will contain one new file for each rule execution (six files for each model interface).

Mapping rules

In this section we are going to explain the design guidelines followed for the generation of different files. These guidelines are based on the W3C specification for OWL-S.

Generic mapping rules

If an interface operation has “tipOperation” stereotype defined with “isOneWay” property checked, only Resquest message is defined for this operation.

Mapping rules for Grounding OWL file

 

<grounding:WsdlGrounding rdf:ID="groupResourceAlarms_ServiceGrounding">
	<service:supportedBy rdf:resource="&ResourceAlarmHandlingService_Service;#groupResourceAlarmsService"/>
	<grounding:hasAtomicProcessGrounding rdf:resource="#groupResourceAlarmsGrounding"/>
</grounding:WsdlGrounding>

 

 

<grounding:WsdlAtomicProcessGrounding rdf:ID="groupResourceAlarmsGrounding">
	<grounding:owlsProcess rdf:resource="&ResourceAlarmHandlingService_Process; #groupResourceAlarms"/>
	<grounding:wsdlOperation>
		<grounding:WsdlOperationRef>
			<grounding:portType>
				<xsd:uriReference rdf:value="&ResourceAlarmHandlingService_Wsdl; #ResourceAlarmHandlingService"/>
			</grounding:portType>
			<grounding:operation>
				<xsd:uriReference rdf:value="&ResourceAlarmHandlingService_Wsdl; #groupResourceAlarms"/>
			</grounding:operation>
		</grounding:WsdlOperationRef>
	</grounding:wsdlOperation>
  
	<grounding:wsdlInputMessage rdf:resource="&ResourceAlarmHandlingService_Wsdl; #groupResourceAlarmsRequest"/>
	<grounding:wsdlInputs rdf:parseType="Collection">
		<grounding:WsdlInputMessageMap>
			<grounding:owlsParameter rdf:resource="&ResourceAlarmHandlingService_Process;#groupResourceAlarmsRequest"/>
			<grounding:wsdlMessagePart>
				<xsd:uriReference rdf:value="&ResourceAlarmHandlingService_Wsdl; #body"/>
			</grounding:wsdlMessagePart>
		</grounding:WsdlInputMessageMap>
	</grounding:wsdlInputs>
 
	<grounding:wsdlOutputMessage rdf:resource="&ResourceAlarmHandlingService_Wsdl; #groupResourceAlarmsResponse"/>
	<grounding:wsdlOutputs rdf:parseType="Collection">
		<grounding:WsdlOutputMessageMap>
			<grounding:owlsParameter rdf:resource="&ResourceAlarmHandlingService_Process;#groupResourceAlarmsResponse"/>
			<grounding:wsdlMessagePart>
				<xsd:uriReference rdf:value="&ResourceAlarmHandlingService_Wsdl; #body"/>
			</grounding:wsdlMessagePart>
		</grounding:WsdlOutputMessageMap>
	</grounding:wsdlOutputs>
</grounding:WsdlAtomicProcessGrounding>

 

Mapping rules for Messages OWL file

One OWL file is generated for each interface in the model.

 

<owl:Class rdf:ID="groupResourceAlarmsRequest">
<owl:Class rdf:ID="groupResourceAlarmsResponse">
<owl:Class rdf:ID="groupResourceAlarmsException">

 

   IN arguments are defined in Request message classes and OUT arguments in Response message classes.

 

Property definition:

 

<owl:ObjectProperty rdf:ID="failingAlarms">
	<rdfs:domain rdf:resource="#groupResourceAlarmsResponse"/>
	<rdfs:range rdf:resource="&model;#ArrayOfBadAlarmReference"/>
</owl:ObjectProperty>

 

Reference in class:

 

<rdfs:subClassOf>
	<owl:Restriction>
		<owl:onProperty rdf:resource="#failingAlarms"/>
		<owl:onClass rdf:resource="&model;#ArrayOfBadAlarmReference"/>
		<owl:minCardinality rdf:datatype="&xsd;nonNegativeInteger">0</owl:minCardinality>
	</owl:Restriction>
</rdfs:subClassOf>
<rdfs:subClassOf>
	<owl:Restriction>
		<owl:onProperty rdf:resource="#failingAlarms"/>
		<owl:onClass rdf:resource="&model;#ArrayOfBadAlarmReference"/>
		<owl:maxCardinality rdf:datatype="&xsd;nonNegativeInteger">1</owl:maxCardinality>
	</owl:Restriction>
</rdfs:subClassOf>

 

   To do this, exceptions have to be disjoint between them. Once this is done, exception message class is defined with the union of all of the interface exceptions.

          Example of interface exception definition, disjoint with other exceptions:

 

<owl:ObjectProperty rdf:ID="entityNotFound">
	<rdfs:domain rdf:resource="#entityNotFound_groupResourceAlarmsException"/>
	<rdfs:range rdf:resource="&model;#EntityNotFound"/>
</owl:ObjectProperty>
 
<owl:Class rdf:ID="entityNotFound_groupResourceAlarmsException">
	<rdfs:subClassOf rdf:resource="#groupResourceAlarmsException"/>
	<owl:equivalentClass>
		<owl:Restriction>
			<owl:onProperty rdf:resource="#entityNotFound"/>
			<owl:onClass rdf:resource="&model;#EntityNotFound"/>
			<owl:cardinality rdf:datatype="&xsd;nonNegativeInteger">1</owl:cardinality>
		</owl:Restriction>
	</owl:equivalentClass>
	<owl:disjointWith rdf:resource="#notImplemented_groupResourceAlarmsException" />
	<owl:disjointWith rdf:resource="#communicationLoss_groupResourceAlarmsException" />
	<owl:disjointWith rdf:resource="#invalidInput_groupResourceAlarmsException" />
	<owl:disjointWith rdf:resource="#unableToComply_groupResourceAlarmsException" />
	<owl:disjointWith rdf:resource="#accessDenied_groupResourceAlarmsException" />
	<owl:disjointWith rdf:resource="#internalError_groupResourceAlarmsException" />
</owl:Class>

 

   Union of all interface exceptions definitions:

 

<owl:Class rdf:ID="groupResourceAlarmsException">
	<dc:title>groupResourceAlarmsException</dc:title>
	<rdfs:subClassOf rdf:resource="#SIDOperation"/>
	<owl:unionOf rdf:parseType="Collection">
		<owl:Class rdf:about="#entityNotFound_groupResourceAlarmsException"/>
		<owl:Class rdf:about="#notImplemented_groupResourceAlarmsException"/>
		<owl:Class rdf:about="#communicationLoss_groupResourceAlarmsException"/>
		<owl:Class rdf:about="#invalidInput_groupResourceAlarmsException"/>
		<owl:Class rdf:about="#unableToComply_groupResourceAlarmsException"/>
		<owl:Class rdf:about="#accessDenied_groupResourceAlarmsException"/>
		<owl:Class rdf:about="#internalError_groupResourceAlarmsException"/>
	</owl:unionOf>
</owl:Class>

Mapping rules for Process Model OWL file

 

<process:ProcessModel rdf:ID="groupResourceAlarmsProcessModel">
	<process:describes rdf:resource="&ResourceAlarmHandlingService_Service;#groupResourceAlarmsService"/>
	<process:hasProcess rdf:resource="#groupResourceAlarms"/>
</process:ProcessModel>

 

 

<process:AtomicProcess rdf:ID="groupResourceAlarms">
	<process:hasInput>
		<process:Input rdf:ID="groupResourceAlarmsRequest">
			<process:parameterType rdf:resource="&tns;#groupResourceAlarmsRequest"/>
		</process:Input>
	</process:hasInput>
	<process:hasOutput>
		<process:UnConditionalOutput rdf:ID="groupResourceAlarmsResponse">
			<process:parameterType rdf:resource="&tns;#groupResourceAlarmsResponse"/>
		</process:UnConditionalOutput>
	</process:hasOutput>
	<process:hasEffect>
		<process:UnConditionalEffect rdf:ID="groupResourceAlarmsException">
			<process:ceEffect rdf:resource="&tns;#groupResourceAlarmsException"/>
		</process:UnConditionalEffect>
	</process:hasEffect>
</process:AtomicProcess>

 

Mapping rules for Profile OWL file

 

<profile:Profile rdf:ID="groupResourceAlarmsProfile">
	<service:presentedBy rdf:resource="&ResourceAlarmHandlingService_Service;#groupResourceAlarmsService"/>
	<profile:has_process rdf:resource="&ResourceAlarmHandlingService_Process; #groupResourceAlarmsProcessModel"/> 
	<profile:hasInput rdf:resource="&ResourceAlarmHandlingService_Process;#groupResourceAlarmsRequest"/>
	<profile:hasOutput rdf:resource="&ResourceAlarmHandlingService_Process; #groupResourceAlarmsResponse"/>
	<profile:hasEffect rdf:resource="&ResourceAlarmHandlingService_Process;#groupResourceAlarmsException"/>
</profile:Profile>

 

Mapping rules for Service OWL file

 

<service:Service rdf:ID="groupResourceAlarmsService">
	<service:presents rdf:resource="&ResourceAlarmHandlingService_Profile;#groupResourceAlarmsProfile"/>
	<service:describedBy rdf:resource="&ResourceAlarmHandlingService_Process; #groupResourceAlarmsProcessModel"/>
	<service:supports rdf:resource="&ResourceAlarmHandlingService_Grounding; #groupResourceAlarms_ServiceGrounding"/>
</service:Service>

Mapping rules for WSDL file

 

<wsdl:message name="groupResourceAlarmsRequest">
	<wsdl:documentation>
		<p>The groupResourceAlarms request message.</p>
	</wsdl:documentation>
	<wsdl:part name="body" owl-s-wsdl:owl-s-parameter="ResourceAlarmHandlingService_Process:#groupResourceAlarmsRequest" />
</wsdl:message>
<wsdl:message name="groupResourceAlarmsResponse">
	<wsdl:documentation>
		<p>The groupResourceAlarms response message.</p>
	</wsdl:documentation>
	<wsdl:part name="body" owl-s-wsdl:owl-s-parameter="ResourceAlarmHandlingService_Process:#groupResourceAlarmsResponse" />
</wsdl:message>
<wsdl:message name="groupResourceAlarmsException">
	<wsdl:documentation>
		<p>The groupResourceAlarms exception message.</p>
	</wsdl:documentation>
	<wsdl:part name="body" owl-s-wsdl:owl-s-parameter="ResourceAlarmHandlingService_Process:#groupResourceAlarmsException" />
</wsdl:message>

 

 

<wsdl:portType name="ResourceAlarmHandlingService">
	<wsdl:documentation>
		<p>Service Interface containing all the control operations offered on Resource Alarms. It includes common set and create operations.</p>
	</wsdl:documentation>
	<wsdl:operation name="groupResourceAlarms" owl-s-wsdl:owl-s-parameter="ResourceAlarmHandlingService_Process:#groupResourceAlarms">                                  
		<wsdl:documentation>
			<p>This is a request-response operation.</p>
			<p>Group one or more underlying alarms to a parent alarm. The parent alarm can be marked at the same time as potential root cause indication. This operation is not supported in the Simple Alarm Reporting and Standard 		profiles and optional in Enhanced profile.</p>
		</wsdl:documentation>
		<wsdl:input name="groupResourceAlarmsRequest" message="tns:groupResourceAlarmsRequest" />
		<wsdl:output name="groupResourceAlarmsResponse" message="tns:groupResourceAlarmsResponse"/>
		<wsdl:fault name="groupResourceAlarmsException" message="tns:groupResourceAlarmsException" />
	</wsdl:operation>
</wsdl:portType>

Mapping rules for stereotypes

Stereotype definitions can generate operations, in addition to those already generated from the model interfaces. In this section, we explain what operations are generated from each stereotype. These operations are generated in all of the interface OWL files.

To generate common operations interface managed entities should have the stereotype definition.

Next, we will describe the equivalency between defined stereotypes and generated operations.

To generate generic operations it is necessary to define the stereotypes in the interface.

To generate update operations it is necessary to define the stereotypes in the interface.

How to use the OWL Generator

The way you use the created OWL generator is very similar to that used in the Soap Generator. The steps required before using the generator are:

 

Figure 8: ts-plugin.xml file.

 

 

Figure 9: "Generator Settings" tab.

 

 

Figure 10: Toolbar.


Attached to this description we have included some generator results.OWL Generator results.zip