NPCL Meta Types

Meta-types are special NPCL-defined topics that are used to specify that a topic can be used to type other topics, associations, association roles or occurrences in a topic map. This is done by adding the meta-type topic as a type to the typing topic. The following meta-types are defined by NPCL:

Table 11.1. NPCL Meta Types

Meta TypeRelative PSIDescription
Topic Typemeta-types/topic-typeA topic typed by this meta-type topic can be used as the type of other topics in the topic map.
Association Typemeta-types/association-typeA topic typed by this meta-type topic can be used to specify the type of one or more associations in the topic map.
Association Role Typemeta-types/role-typeA topic typed by this meta-type topic can be used to specify the type of one or more association roles in the topic map.
Occurrence Typemeta-types/occurrence-typeA topic typed by this meta-type topic can be used as the type of one or more occurrences in the topic map.
Scoping Topictypes/scoping-topicA topic typed by this meta-type topic can be used as a scoping topic in the scope of an association, occurrence, name or variant name in the topic map.

The Relative PSI column shows the PSI for the meta-type relative to the base PSI http://www.networkedplanet.com/psi/npcl/. The full PSI must be present as a subject identifier for the meta-type topic. For example, to create a "Topic Type" meta-type, you must create a topic which has a subject identifier with the URI http://www.networkedplanet.com/psi/npcl/meta-types/topic-type.

Example 11.1. XTM For A Topic Type

The following example shows how a topic type meta-type is defined in XTM syntax.

<xtm:topicMap xmlns:xtm="..." xmlns:xlink="...">
  <!-- 'person' can be used as a topic type -->
  <xtm:topic id="person">
    <xtm:instanceOf>
      <xtm:subjectIndicatorRef 
xlink:href="http://www.networkedplanet.com/psi/npcl/meta-types/topic-type"/>
    </xtm:instanceOf>
    ...
  </xtm:topic>
</xtm:topicMap>

Alternatively you could create a full topic for the meta-type and reuse it throughout the topic map e.g.

<xtm:topicMap xmlns:xtm="..." xmlns:xlink="...">

  <!-- Topic type meta-type -->
  <xtm:topic id="topic-type">
    <xtm:subjectIdentity>
      <xtm:subjectIndicatorRef
xlink:href="http://www.networkedplanet.com/psi/npcl/meta-types/topic-type"/>
    </xtm:subjectIdentity>
    ...
  </xtm:topic>

  <xtm:topic id="person">
    <xtm:instanceOf>
      <xtm:topicRef xlink:href="#topic-type"/>
    </xtm:instanceOf>
  </xtm:topic>

  <xtm:topic id="company">
    <xtm:instanceOf>
      <xtm:topicRef xlink:href="#topic-type"/>
    </xtm:instanceOf>
  </xtm:topic>
</xtm:topicMap>

Is Abstract Facet

The Is Abstract Facet is represented as an occurrence of a special NPCL-defined type that can be added to a type topic. The PSI for this type is http://www.networkedplanet.com/psi/npcl/facets/is-abstract-facet. The value of the occurrence should be the string "true" if the type is abstract. Any other value for this occurrence will mark the type as NOT abstract (i.e. all other values of the occurrence are treated as "false").

Example 11.2. An Abstract Topic Type

<xtm:topicMap xmlns:xtm="..." xmlns:xlink="...">

  <!-- Legal Entity is an abstract Topic Type -->
  <xtm:topic id="legal-entity">
    <xtm:instanceOf>
      <xtm:subjectIndicatorRef
xlink:href="http://www.networkedplanet.com/psi/npcl/meta-types/topic-type"/>
    </xtm:instanceOf>
    <!-- Is Abstract Facet = true -->
    <xtm:occurrence>
      <xtm:instanceOf>
        <xtm:subjectIndicatorRef
xlink:href="http://www.networkedplanet.com/psi/npcl/facets/is-abstract-facet"/>
      </xtm:instanceOf>
      <xtm:resourceData>true</xtm:resourceData>
    </xtm:occurrence>
  </xtm:topic>

</xtm:topicMap>

Occurrence Type Value Facets

The set of values allowed as resource data in an occurrence of a specific type can be defined by adding Value Facets to the occurrence type topic. These facets are added as occurrences of special NPCL-defined types that can be added to an occurrence type topic. The facets are described in the following table.

Table 11.2. Occurrence Type Value Facets

Facet NameRelative PSIDescription
Value Data-Typefacets/value-datatype-facetSpecifies the datatype that the occurrence value should match. The value of this facet occurrence must be a datatype URI. It is strongly recommended to only use the W3C Schema data type URIs, but applications may define their own data type URIs if needed.
Minimum Valuefacets/minimum-value-facetSpecifies the minimum value that occurrence resource data must evaluate to. This facet is only consulted if the occurrence type also has a Value Data-Type facet and the data-type specified is a ranged data type (e.g. integer, float, date-time etc. but not string, ID etc.).
Maximum Valuefacets/maximum-value-facetSpecifies the minimum value that occurrence resource data must evaluate to. This facet is only consulted if the occurrence type also has a Value Data-Type facet and the data-type specified is a ranged data type.
Value Patternfacets/value-pattern-facetSpecifies a regular expression pattern that the occurrence resource data must match.

Example 11.3. Occurrence Type Value Facets In XTM

The following example shows an occurrence type "Age" which is restricted to integer values between 0 and 125.

<xtm:topicMap xmlns:xtm="..." xmlns:xlink="...">

  <xtm:topic id="age">
    <xtm:instanceOf>
      <xtm:subjectIndicatorRef xlink:href="htttp://www.networkedplanet.com/psi/npcl/meta-types/occurrence-type"/>
    <xtm:instanceOf>
    <xtm:baseName>
      <xtm:baseNameString>Age (in years)</xtm:baseName>
    </xtm:baseName>

    <!-- data-type is integer -->
    <xtm:occurrence>
      <xtm:instanceOf>
        <xtm:subjectIndicatorRef xlink:href="htttp://www.networkedplanet.com/psi/npcl/facets/value-datatype-facet"/>
      </xtm:instanceOf>
      <xtm:resourceData>http://www.w3.org/2001/XMLSchema#int</xtm:resourceData>
    </xtm:occurrence>

    <!-- minimum value is 0 -->
    <xtm:occurrence>
      <xtm:instanceOf>
        <xtm:subjectIndicatorRef xlink:href="htttp://www.networkedplanet.com/psi/npcl/facets/minimum-value-facet"/>
      </xtm:instanceOf>
      <xtm:resourceData>0</xtm:resourceData>
    </xtm:occurrence>

    <!-- maximum value is 125 -->
    <xtm:occurrence>
      <xtm:instanceOf>
        <xtm:subjectIndicatorRef xlink:href="htttp://www.networkedplanet.com/psi/npcl/facets/maximum-value-facet"/>
      </xtm:instanceOf>
      <xtm:resourceData>125</xtm:resourceData>
    </xtm:occurrence>
  </xtm:topic>

</xtm:topicMap>

Topic Type Scoping Facet

The topics of a particular type can be flagged for use in scopes using the Scoping Facet on the Topic Type topic. This facet is added as an occurrence of a special NPCL-defined type that can be added to a Topic Type topic. The PSI for this occurrence type is http://www.networkedplanet.com/npcl/facets/scoping-facet.

Example 11.4. Topic Type Scoping Facets In XTM

The following example shows an Topic Type "Language" which is restricted to scoping names and occurrence only.

<xtm:topicMap xmlns:xtm="..." xmlns:xlink="...">

  <xtm:topic id="language">
    <xtm:instanceOf>
      <xtm:subjectIndicatorRef xlink:href="htttp://www.networkedplanet.com/psi/npcl/meta-types/topic-type"/>
    <xtm:instanceOf>
    <xtm:baseName>
      <xtm:baseNameString>Language</xtm:baseName>
    </xtm:baseName>

    <!-- Language topics can scope topic names and occurrences -->
    <xtm:occurrence>
      <xtm:instanceOf>
        <xtm:subjectIndicatorRef xlink:href="htttp://www.networkedplanet.com/psi/npcl/facets/scoping-facet"/>
      </xtm:instanceOf>
      <xtm:resourceData>NAME OCCURRENCE</xtm:resourceData>
    </xtm:occurrence>

  </xtm:topic>

</xtm:topicMap>