Home

MS Base

  • prefix: ms:
  • schema: b:

Categories (Data):

Categories (Governance):

units:

 
 

Schema element "b:has"

A unit has references to another unit for a certain reason.

Definitions

<element name="has" type="b:Has" />

<complexType name="Has">
  <complexContent>
    <extension base="b:Reusable">
      <sequence />
      <attribute name="ref"   type="b:UnitRef"    use! />
      <attribute name="type"  type="b:Constant"  />
      <attribute name="is"    type="b:Constant"   default="b:Role/Unknown" />
      <attribute name="seqnr" type="unsignedLong" default="1" />
    </extension>
  </complexContent>
</complexType>

Description

We can think of many reasons for relations. The reason is expressed via the b:is attribute, which contains a name-spaced constant. The attributes are typical selectors to find the right relation to follow, the elements are informational.

attribute is

The b:is attribute explains the b:has relation. When the relation unknown, the client may need to collect the related unit to inspect its content, but that is expensive so should be avoided.

The relation (constant) may also be unknown to the client. In that case, the client is RECOMMENDED to ignore the relation. The client MAY warn its user that there is information which is not understood.

When you download a unit, you can specify the namespaces and relations of the related (b:has) units to be downloaded in the same go as well. For instance, within the Meshy Space Concept, a request for a certain msc:Role/Collection will ask to include the related units with relation msc:Role/Rules. Or more general, probably request for all msc:Role/ Units.

attribute ref

This required attribute tells the Unit where we describe the relation with. This Unit could be a Namespace, but usually it is a simple data unit in a collection.

attribute seqnr

When there are multiple relations which are of the same kind (same b:is), they may need to be ordered like an array.

attribute type

The type of the content of Unit where this relation refers to, which MAY optimize some processes. This is indicative only: the processors SHALL check whether is field is correct, and MAY cast a warning on mistakes.

Usually, this element is not really useful: the processor can better retreive the Unit and then check whether it is able to handle it.

Many relations support different object types. For instance, the Identity of the owner of the Unit can be a single person, a group, and so on. Which kind of Identity it is, does not really matter in the main code of the processor.

Examples

in the Meshy Space Concept frame

Not all inter-unit relations are the same: some are generic enough to be defined by MSI, where others have a looser or non-standardized relation. It may also be smart to put lesser-used information about a unit into a separate unit: for instance the history of the unit.

<b:unit b:id="MarkOv">               <!-- in dist:User/ -->
  <b:type>msc:Role/Identity</b:type>
  <c:indentity />
</b:unit>
<b:unit b:id="Sources">              <!-- in dist: -->
  <b:type>msc:Role/Collection</b:type>    <!-- is a Subspace -->
  <b:has b:is="dist:Role/Source" b:ref="puppy-src-3.14.rpm" />
  <b:has b:is="dist:Role/Source" b:ref="wolf-src-12.2.rpm" />
</b:unit>
<b:unit b:id="puppy-src-3.14.rpm" /> <!-- in dist:Sources/ -->
  <b:name>puppy 3.14 sources</b:name>
  <b:type>ms:Mime/application/rpm</b:type>
  <b:extern />
</b:unit>
<b:unit b:id="puppy-3.14.rpm">      <!-- in dist:Package/ -->
  <b:name>puppy 3.14</b:name>
  <b:type>ms:Mime/application/rpm</b:type>
  <b:owner>dist:User/MarkOv</b:owner>
  <b:extern />
  <b:has b:ref="dist:Sources/puppy" b:is="dist:Role/Source" />
</b:unit>
"b:unit" : {
  "b:id" : "MarkOv",               // in dist:User/
  "b:type" : "msc:Role/Identity"
  "c:identity" : {}
},
"b:unit" : {
  "b:id": "Sources",               // in dist:
  "b:type" : "msc:Role/Collection",     // is a Subspace
  "b:has" : [ {
    "b:is" : "dist:Role/Source",
    "b:ref" : "puppy-src-3.14.rpm"
  }, {
    "b:is" : "dist:Role/Source",
    "b:ref" : "wolf-src-12.2.rpm"
  } ]
},
"b:unit" : {
  "b:id" : "puppy-src-3.14.rpm",   // in dist:Sources/
  "b:name": "puppy 3.14 sources",
  "b:type": "ms:Mime/application/rpm"
  "b:extern" : {}
},
"b:unit" : {
  "b:id" : "puppy-3.14.rpm",       // in dist:Package/
  "b:name" : "puppy 3.14",
  "b:type" : "ms:Mime/application/rpm",
  "b:owner" : "dist:User/MarkOv"
  "b:extern" : {},
  "b:has" : [ {
     "b:ref" : "dist:Sources/puppy",
     "b:is" : "dist:Role/Source"
  } ]
}

mark@overmeer.net      Web-pages generated on 2023-12-19