//File: DAFDescriptions.idl // Change history // DAIS RTF 1.0 7084 2004-09-09 Unspecified data type added #ifndef _DAF_DESCRIPTIONS_IDL_ #define _DAF_DESCRIPTIONS_IDL_ #include #include #pragma prefix "omg.org" module DAFDescriptions { //++ // Simple Types used as property values. //-- // 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; // a complex number struct Complex { double real; double imaginary; }; // a blob typedef string FileExtension; struct Blob { any blob_data; FileExtension blob_data_type; }; //++ // Resource Descriptions //-- // properties are represented by their resource identifiers typedef ResourceID PropertyID; // SimpleValue's can take on the following types. typedef short SimpleValueType; const SimpleValueType UNSPECIFIED_TYPE = 0; //7084 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 PROPERTYID_TYPE = 12; 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; const SimpleValueType PROPERTYIDS_TYPE = 112; // a SimpleValue is the object of a resource description. union SimpleValue switch( SimpleValueType ) { 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 COMPLEX_TYPE : Complex complex_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 PROPERTYID_TYPE : PropertyID propertyid_value; case RESOURCES_TYPE : sequence resource_values; case URIS_TYPE : sequence uri_values; case STRINGS_TYPE : sequence string_values; case BOOLEANS_TYPE : sequence boolean_values; case INTS_TYPE : sequence int_values; case UNSIGNEDS_TYPE : sequence unsigned_values; case DOUBLES_TYPE : sequence double_values; case COMPLEXES_TYPE : sequence complex_values; case DATE_TIMES_TYPE: sequence date_time_values; case ULONG_LONGS_TYPE : sequence ulong_long_values; case PROPERTYIDS_TYPE : sequence propertyid_values; }; // predicate and object for a resource description struct PropertyValue { PropertyID property; SimpleValue value; }; typedef sequence PropertyValueSequence; // resource description with one subject, multiple predicates struct ResourceDescription { ResourceID id; PropertyValueSequence values; }; typedef sequence ResourceDescriptionSequence; // iterator for handling large numbers of resource descriptions interface ResourceDescriptionIterator { unsigned long max_left(); boolean next_n( in unsigned long n, out ResourceDescriptionSequence descriptions ); void destroy(); }; }; #endif // _DAF_DESCRIPTIONS_IDL_