Previous Table of Contents Next


3.1 Simple Values

   The basic types, from which resource descriptions are constructed, are defined below.

   module DAFDescriptions

   { // imported from identifiers module. typedef DAFIdentifiers::ResourceID ResourceID; typedef DAFIdentifiers::URI URI;

   // absolute time stamps in 100 nanosecond units // base time is 15 October 1582 00:00 UTC // as per Time Service specification typedef TimeBase::TimeT DateTime; // SimpleValue's can take on the following types. typedef short SimpleValueType; const SimpleValueType UNSPECIFIED_TYPE = 0; const SimpleValueType RESOURCE_TYPE = 1; const SimpleValueType URI_TYPE = 2; const SimpleValueType STRING_TYPE = 3; const SimpleValueType BOOLEAN_TYPE = 4; const SimpleValueType INT_TYPE = 5; const SimpleValueType UNSIGNED_TYPE = 6; const SimpleValueType DOUBLE_TYPE = 7; const SimpleValueType COMPLEX_TYPE = 8; const SimpleValueType DATE_TIME_TYPE = 9; const SimpleValueType ULONG_LONG_TYPE = 10; const SimpleValueType BLOB_TYPE = 11; const SimpleValueType RESOURCES_TYPE = 101; const SimpleValueType URIS_TYPE = 102; const SimpleValueType STRINGS_TYPE = 103; const SimpleValueType BOOLEANS_TYPE = 104; const SimpleValueType INTS_TYPE = 105; const SimpleValueType UNSIGNEDS_TYPE = 106; const SimpleValueType DOUBLES_TYPE = 107; const SimpleValueType COMPLEXES_TYPE = 108; const SimpleValueType DATE_TIMES_TYPE = 109; const SimpleValueType ULONG_LONGS_TYPE = 110; const SimpleValueType BLOBS_TYPE = 111;

// a complex number struct Complex { double real; double imaginary; };

// a blob typedef string

struct Blob

{ };

Comment:

FileExtension;
any FileExtension blob_data; blob_data_type;
Issue 7084

   // a SimpleValue is the object of a resource description. union SimpleValue switch( SimpleValueType ) case COMPLEX_TYPE : Complex complex_value;

{

case RESOURCE_TYPE : ResourceID resource_value;
case URI_TYPE : URI uri_value;
case STRING_TYPE : string string_value;
case BOOLEAN_TYPE : boolean boolean_value;
case INT_TYPE : long int_value;
case UNSIGNED_TYPE : unsigned long unsigned_value;
case DOUBLE_TYPE : double double_value;

   case DATE_TIME_TYPE : DateTime date_time_value;

   case ULONG_LONG_TYPE : unsigned long long ulong_long_value;

   case BLOB_TYPE : Blob blob_value;

   case RESOURCES_TYPE : sequence<ResourceID> resource_values;

   case URIS_TYPE : sequence<URI> uri_values;

   case STRINGS_TYPE : sequence<string> string_values;

   case BOOLEANS_TYPE : sequence<boolean> boolean_values;

   case INTS_TYPE : sequence<long> int_values;

   case UNSIGNEDS_TYPE : sequence<unsigned long> unsigned_values;

   case DOUBLES_TYPE : sequence<double> double_values;

   case COMPLEXES_TYPE : sequence<Complex> complex_values;

   case DATE_TIMES_TYPE : sequence<DateTime> date_time_values;

   case ULONG_LONGS_TYPE : sequence<unsigned long long> ulong_long_values; };

   ULongLong, ResourceID and URI

   These types are imported from the DAFIdentifiers module. Property values can refer to other resources through ResourceIDs.

   DateTime

   Time is expressed by a 64 bit unsigned number (a ULongLong), which counts the number of 100 nanosecond units passed since 15 October 1582 00:00 UTC (the date of Gregorian reform to the Christian calendar). This convention is adopted from the CORBA Time Service, which in turn takes it from the X/Open DCE Time Service.

   Complex

   Complex numbers are used in a range of scientific applications and especially in power system analysis. In the DAF, complex numbers are expressed in Cartesian form.

   FileExtensions

   FileExtensions is a sequence of file extensions according to the MIME standard [13]. File extensions for Microsoft Office applications are also included, e.g. DOC, XLS, PPT, etc.

   Blob

   The Blob contains MIME data as described by the MIME standard [13].

   SimpleValue, SimpleValueType

   SimpleValues are the object of properties; their role in the resource description framework was outlined in the previous section. The DAF defines a SimpleValue as a discriminated union, where SimpleValueType is the discriminant. Fundamentally, a SimpleValue can be a resource identifier, a literal, or a sequence of these. The basic type of literal is a string to which the DAF adds explicit representation of the types defined above and (the largest variant of) each CORBA intrinsic type. Nesting of SimpleValues is intentionally avoided such that complex data structures are navigated with the DAFQuery methods rather than with nesting of SimpleValues.