Top>Projects>CoSMoS

CoSMoS:
Component Service Model with Semantics
  Overview
  Model Spec.
  Description
    XML
    WSDL
    RDFS
  Downloads
  Demo



Component Service Model with Semantics:
XML style ver.1.0


Abstract

This document specifies a representation of Component Service Model with Semantics using XML.

Table of Contents

1. Introduction
2. Namespace
3. Elements
  3.1. General elements
  3.2. Data type elements
  3.3. Semantics elements
  3.4. Logic elements
  3.5. Component elements

4. Examples
5. XML Schema of CoSMoS/XML
@

1. Introduction

Component Service Model with Semantics (CoSMoS) is a component model that can be used to represent information about components. The abstract model specification of CoSMoS is available here.

CoSMoS in XML Style, or CoSMoS/XML, is designed to describe a component, or components, using XML. This document specifies the structure of CoSMoS/XML. Some examples of CoSMoS/XML are available here.

2. Namespace


Namespace: http://netresearch.ics.uci.edu/bionet/cosmos#

Unless specified, all the XML elements defined in this document has the above namespace.

3. Elements

3.1. General elements

CoSMoS

<cosmos targetNamespace=hURIh [targetComponent="String"]>
  <import/>*
  <datatype/>*
  <concept/>*
  <link/>*
  <component/>*
</cosmos>

This is a root element of CoSMoS/XML. Every CoSMoS/XML document must have this element. 'targetNamespace' attribute specifies the target namespace of the component defined in this document. 'targetComponent' attribute specifies the name of the class that the component defined in this document implements.

Import

<import URL=hURLh/>

This element is used to import another CoSMoS document.

3.2. Data type elements

Primitive

<primitive name="String" type=hStringh>
   [<invariant xpath=hXPathh/>]
</primitive>
|
<{primitive name} name="String">
   [<invariant xpath="XPath"/>]
</{primitive name}>

This element represents a primitive data type, such as integer or string.  CoSMoS/XML supports the data types defined in XML Schema: Datatypes. A default value of this element can be specified by using a default attribute.

 An invariant element in this element specifies a Boolean condition that must be always satisfied by this primitive element.  For example, one can specify that the value of gpriceh integer element must be always positive.  XPath is used to describe an invariant.

Structure

<structure name="String" [schema=hURLh]>
  [<member name="String" type="String"/> ]+
</structure>

This element is used to define a data structure that consists of multiple classes. A structure element can be defined by listing its members, by describing its structure using XML Schema, or by specifying the URL of a XML Schema file in 'schema' property..

Array

<array name="String" type="String" size=hinth>
|
<array size=hinth>
    <component/>
</array>

This element is used to define an array. The size attribute specifies the size of the array. Multidimensional array can be defined by nesting array elements.

Binary

<binary MIME=hStringh />

This element is used to define a binary data. The MIME attribute specifies the MIME type of the binary data.

3.3. Semantics elements

Concept

<concept name="URI" [wildcard="true|false"]>
  <subConceptOf URI="URI"/>*
  <equivalentTo URI="URI"/>*
</concept>

This element is used to define a concept. A 'name' attribute specifies the name of the concept. This element may have zero or more <subConceptOf> element(s), which defines that this concept is a subconcept of the concept specified by <subConceptOf> element. (This is similar to what rdfs:subClassOf defines in RDF Schema.)  This element also may have zero or more <equivalentTo> element(s), which defines that this concept is equivalent to the concept specified by <equivalentTo> element. (This is similar to what owl:equivalentTo defines in OWL.) 

Predicate

<predicate name="URI"  [wildcard="true|false"]/>

This element is used to define a predicate, which is a subtype of concept. A 'name' attribute specifies the name of the predicate. Similarly as <concept>, this element may have zero or more <subConceptOf> element(s) and zero or more <equivalentTo> elements. 

Noun

<noun name="URI"  [wildcard="true|false"]/>

This element is used to define a noun, which is a subtype of concept. A 'name' attribute specifies the name of the predicate. Similarly as <concept>, this element may have zero or more <subConceptOf> element(s) and zero or more <equivalentTo> elements. 

3.4. Logic elements

Link

<link [name=hStringh] represents="URI" [source=hURIh] target=hURIh/>

This element is used to define a link to connect two nodes (instances/elements) defined in this document or defined in other documents.  A link must have its name. 'source' and 'target' attributes specify the source and target nodes that this link connects.  The source attribute can be omitted when the link is specified in another element such as <component> or <operation>.

Logic

<implies [name="String"] source="URI" target="URI"/>
<and [name="String"] source="URI" target="URI"/>
<or [name="String"] source="URI" target="URI"/>

Those elements define a special type of link to represent a predicate logic.

3.5. Component elements

Component

<component name="String"  [type="URI"] represents="URI">
  [<datatype/>]
  <operation/>*
  <property/>*
</component>
|
<"Data type name"
name="String"  represents="URI">
  <operation/>*
  <property/>*
</"Data type name>

This element is used to define a component. A 'name' attribute specifies the name of the component. A 'type' attribute specifies the URI of the class representing the type of this component. A 'represents' attribute specified the URI of the concept representing the semantics of this component.

Operation

<operation name="String" [performs=hURIh]>
   <input/>
   <output/>
</operation>

This element is used to define an operation, which is a set of inputs, outputs, precondition and postcondition. A perform attribute may be used to indicate the predicate of this operation (See CoSMoS model specification about predicate). <precondition> and <postcondition> of this operation are specified by using XPath.

Input

<input>
  <component>+

</input>

This element is used to define a set of inputs for an operation.

Output

<output>
  <component>+

</output>

This element is used to define a set of outputs for an operation.

Property

<property ref="URI"/>
|
<property>
  <component/>
</property>

This element is used to define a property of a component. A 'ref' attribute specifies the URI of the component. Either 'ref' attribute or the child <component/> node must be specified.

The following elements, Literal, Choice, Option and RealObject are subelements of Component. Thus, they inherit the attributes of Component. 

Literal

<literal value="String"/>

This element is used to define a literal value. 

Choice

<choice min="number" max="number">
    <literal/>+
</choice>

This element is used to define a group of literal values. It represents that either of the defined literals can substitute this element. For instance, the following example shows that either of the two primitive elements, gCaliforniah or gFloridah, can substitute the choice element gdestinationh.

 Example:

<choice name=hdestinationh>
   <literal value=hCaliforniah>
   <literal value=hFloridah>
</choice>

@

Option

<option value="string"/>

This element is used to define a group of literal values. It represents that either of the defined literals can substitute this element. For instance, the following example shows that either of the two primitive elements, gCaliforniah or gFloridah, can substitute the choice element gdestinationh.

RealObject

<real/>

This element is used to define an object in the real world.

4. Examples of CoSMoS/XML

Name CoSMoS/XML CoSMoS graph (click image to enlarge)
Restaurant Restaurant.xml, Location.xml
Direction Generator DirectionGenerator.xml
Color Printer ColorPrinter.xml

5. XML Schema of CoSMoS/XML

XML Schema definition of CoSMoS/XML is available here.

@

(c) Keita Fujii (kfujii@ics.uci.edu)
Netgroup, School of Information and Computer Science, UC Irvine