Home

MS Concept

  • prefix: msc:
  • schema: b:

Categories:

collections:

 
 

Schema element "c:collection"

Definitions

<element name="collection" type="c:Collection"
   substitutionGroup="b:native" />

<complexType name="Collection">
  <complexContent>
    <extension base="b:Native">
      <sequence>
        <element ref="c:path_split" [0..∞] />
        <element ref="c:unit_set"   [0..∞] />
      </sequence>
    </extension>
  </complexContent>
</complexType>

Description

The Collection is a b:unit which groups (large numbers of) Units. It may also be a wrapping sub-collections: sub-groups of its units.

The collection may have sub-collections.

element path_split

The element explains how the relative c:UnitRef path is to be interpreted. This path is either

  • a name within this Collection, or
  • a name of a Unit which refers to a sub-collection, followed by a path inside that sub-collection.

See c:path_split for the full details.

element unit_set

This describes how a set of Units within this collection behaves.

See c:unit_set for full details.

Examples

Tying the Collection into the Namespace

<!-- namespace cc -->
<b:unit b:id="">    <!-- cc: -->
  <b:type>ms:Type/Namespace</b:type>
  <b:namespace>
    <b:fetch    b:base="s3:crawl-data" />
    <b:fetch    b:base="https://aws/crawl-data" />
    <b:manager>collector</b:manager>
    <b:subspace b:path="crawl-data" />
  </b:namespace>
</b:unit>

<b:unit b:id="/crawl-data">
  <b:type>ms:Type/Namespace</b:type>
  <b:namespace>
    <b:subspace b:path="2020nov-crawl" />
    <b:subspace b:path="2020dec-crawl" />
    <!-- and hundreds more -->
  </b:namespace>
</b:unit>

<b:unit b:id="/crawl-data/2020dec-crawl">
  <b:type>ms:Type/Namespace</b:type>
  <b:namespace>
     <b:manager>./collector</b:manager>
  </b:namespace>
</b:unit>

The final Unit has address cc:crawl-data/2020dec-crawl and organizes the Units below it. Namespaces cc and cc:crawl-data use the same collector configuration in Unit cc:collector. The last one uses collector cc:crawl-data/2020dec-crawl/collector

Discussion

Where to put the Collection definition

You may put all your Namespace and Collection Units in a separate part of your namespace, but the it is cleaner to put the Collection configuration inside the Collection itself. Of course, you need to be more carefull about accidental collisions with the ids in the Collection content and the permissions on the administrative Units.


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