//File: DAFIdentifiers.idl #ifndef _DAF_IDENTIFIERS_IDL_ #define _DAF_IDENTIFIERS_IDL_ #pragma prefix "omg.org" 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 ); }; }; #endif // _DAF_IDENTIFIERS_IDL_ //File: DAFDescriptions.idl #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; }; // SimpleValue's can take on the following types. typedef short SimpleValueType; 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; // 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; }; //++ // Resource Descriptions //-- // properties are represented by their resource identifiers typedef ResourceID PropertyID; // 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_ //File: DAFQuery.idl #ifndef _DAF_QUERY_IDL_ #define _DAF_QUERY_IDL_ #include #pragma prefix "omg.org" module DAFQuery { // properties and classes are represented by resource identifiers // imported from the identifiers module. typedef DAFIdentifiers::ResourceID ResourceID; typedef DAFIdentifiers::ResourceID ClassID; typedef DAFIdentifiers::ResourceID PropertyID; typedef DAFIdentifiers::ResourceIDSequence PropertySequence; // results are resource descriptions from the descriptions module typedef DAFDescriptions::ResourceDescription ResourceDescription; typedef DAFDescriptions::ResourceDescriptionIterator ResourceDescriptionIterator; // queries that perform navigation use the association concept struct Association { PropertyID property; ClassID type; boolean inverse; }; typedef sequence AssociationSequence; // exceptions generated by queries exception UnknownAssociation { string reason; }; exception UnknownResource { string reason; }; exception QueryError { string reason; }; // the query service interface ResourceQueryService { ResourceDescription get_values( in ResourceID resource, in PropertySequence properties) raises( UnknownResource, QueryError ); ResourceDescriptionIterator get_extent_values( in PropertySequence properties, in ClassID class_id ) raises (UnknownResource, QueryError); ResourceDescriptionIterator get_related_values( in PropertySequence properties, in Association association, in ResourceID source ) raises ( UnknownResource, UnknownAssociation, QueryError ); ResourceDescriptionIterator get_descendent_values( in PropertySequence properties, in AssociationSequence path, in ResourceIDSequence sources, out AssociationSequence tail ) raises ( UnknownResource, QueryError ); }; }; #endif // _DAF_QUERY_IDL_ //File: DAFEvents.idl #ifndef _DAF_EVENTS_IDL_ #define _DAF_EVENTS_IDL_ #include #include #pragma prefix "omg.org" module DAFEvents { // event emitted by data provider after data changes struct ResourceChangeEvent { DAFIdentifiers::ResourceIDSequence affected; }; // interface for connection an event push consumer interface ResourceEventSource { CosEventChannelAdmin::ProxyPushSupplier obtain_push_supplier(); unsigned long long current_version(); }; }; #endif // _DAF_EVENTS_IDL_