Previous Table of Contents Next


3.4.3 Resource Identifier Service


   Resource identifiers and the resource identification service are defined by the following IDL.

   module DAFIdentifiers

   { // the uniform resource identifier from IETF RFC 2396 typedef string URI; typedef sequence< URI > URISequence;

   // the resource identifier struct ResourceID{

   unsigned long long container;

   unsigned long long fragment; }; typedef sequence < ResourceID > ResourceIDSequence;

   // service for translating and managing resource identifiers exception LookupError { string reason; };

   interface ResourceIDService{

   ResourceIDSequence get_resource_ids( in URISequence uris ) raises( LookupError );

   URISequence get_uris( in ResourceIDSequence ids ) raises( LookupError );

   };};

   URI, URISequence

   A URI is a Uniform Resource Identifier with an optional fragment identifier as defined in [3]. This combination is more properly called a URI-reference. In order to clarify the following discussion, the syntax of a URI-reference is:

   <scheme-name> ’:’ <opaque-part> ’#’ <fragment-identifier>

   The opaque-part represents the main body of the URI and (depending on the scheme) it may include a domain name and a pathname.

   In principle, anything that can be named can be given a unique URI. Moreover, any existing naming scheme can be subsumed into this universal system by, for example, assigning it a scheme-name. In the DAF it is assumed that all objects in a UMS, both concrete and abstract, population and schema, have unique URIs.

   A DAF implementation is not required to use the protocol implied by the scheme-name of the URIs it employs. For example, if the URI for the class of Transformers was http://iec.ch/TC57/2000/CIM-schema-cimu09a#Transformer, it would not imply that a DAF implementation needs to use the http protocol, nor contact a host in the IEC domain (iec.ch). In this example, the URI is merely the agreed designation of a commonly understood concept.

   However, the DAF does require URIs to be in absolute, canonical form so that they may be consistently compared and translated into DAF resource identifiers. In addition, the DAF treats the fragment separately from the rest of the URI-reference, as explained below.

   ResourceID, ResourceID

   A ResourceID is a compact, fixed length substitute for a URI. It is introduced to enable high performance implementations of the DAF where repeated URI parsing, comparison, and lookups would be too expensive. The ResourceID may also simplify some DAF implementations.

   A ResourceID is divided into two 64-bit fields to further improve the performance of implementations when dealing with large groups of related resources and multiple data providers. The container and fragment fields correspond to equivalent fields in a URI-reference and support a similar division of responsibility for allocation and resolution of the identifier (see below).

   ResourceIDService

   This interface enables translation of resource identifiers to and from URI-references. From a client’s perspective there is always exactly one resource identifier service in a given context. (The section on proxies describes how multiple data providers are handled. The section on service location defines what is meant by a context.)

   Each data provider implements this interface and most must be prepared to use this interface as a client of another data provider. The latter is required of data providers that use shared resources, such as the EPRI CIM schema.

   get_resource_ids()

   This operation accepts a sequence of URI-references and returns the corresponding resource identifiers. The returned sequence is the same length as the input sequence and in the same order. If the data provider does not recognize a particular URI or is not responsible for its translation, a null resource identifier is returned for that position.

   If the data provider needs a resource identifier for a resource it does not control, it invokes this operation as a client of the responsible data provider or the proxy data provider. For example, a data provider might manage a population of UMS data but not the schema for that population. It would then need to obtain schema resource identifiers from another data provider.

   get_uris()

   This operation accepts a sequence of resource identifiers and returns the corresponding URI-references. The returned sequence is the same length as the input sequence and in the same order. If the data provider does not recognize a particular resource identifier or is not responsible for its translation, an empty string is returned for that position.

   As with the get_resource_ids() method, a data provider may need to invoke get_uris() acting as a client of another data provider.