Introduction Enumerations Structures and unions

Table 50 — General Model to CORBA protocol binding operations mapping and obligation General model operation CORBA protocol binding equivalent Obligation Session.initialize OGC_StatefulService.initSession Conditional, if session used Session.close OGC_StatefulService.terminateSession 2 Conditional, if session used OGC_Service.getCapabilities OGC_Service.explainServer Mandatory Session.status OGC_StatefulService.status Optional Session.cancel OGC_StatefulService.cancel Optional Discovery.query CG_Discovery.query 3 Mandatory Discovery.present CG_Discovery .present Mandatory Discovery.describeRecordType CG_Discovery.explainCollection Conditional, if service supports Explain Discovery.getDomain CG_Discovery.getDomain Conditional, if service supports getDomain Manager.transaction CG_Manager.transaction Optional Manager.harvestRecords -- -- BrokeredAccess.order CG_Access.brokeredAccess Optional 2 Although the CORBA protocol binding permits both the client and server to initiate a terminateSession request, for conformance with the general model, only the client is permitted to initiate a terminateSession request. In practice, a server may terminate a session after a reasonable amount of idle client activity. 3 Note that the ResultType values “results”, “hits”, “resultSetID” and “validate” are supported in this protocol binding.

9.6 Interface definition - IDL

9.6.1 Introduction

This subclause describes the CORBA IDL. It first describes enumerations and then structures, unions, and messages, respectively. It concludes with a description of the CatalogServices interface, the core of the profile, and other interfaces. All enumerations, structures, unions, messages and interfaces are part of the OGC_CatalogService module. Module names have to be harmonized across all OGC CORBA specifications and have to be prefixed by opengis.org. pragma prefix opengis.org module OGC_CatalogService { ... }; 88 Copyright © 2007 Open Geospatial Consortium, Inc. All Rights Reserved. Throughout the module OGC_CatalogService the IDL types wstring and wchar are used instead of string and char to allow usage of different character codesets other than Unicode for internationalization i18n. In CORBA IDL type definitions for sequences containing different element datatypes are used to avoid anonymous sequences in IDL mappings for some programming languages.

9.6.2 Enumerations

Enumerations can be modelled by a direct translation of all code-lists of the General Model. The following enumerations are borrowed literally: enum AttributeCategory {queriable, presentable, both}; enum CatalogEntryType {product, collection, service}; enum CharacterSet {ASCII, UniCode, ShiftJIS}; enum PredefinedPresentationType {full, summary, brief}; enum QueryLanguage {OGC_Common, OGC_Filter, Z3950_TypeOne SQL3_SimpleFeature }; enum QueryScope {distributed, locale}; enum ResultType {validate, resultSetID, hits, results}; enum SortOrder {ascending, descending}; enum Status {success, successResultsAvailable, processingNormal, processingQueued, processingPausedOrSuspended, failure, failureAccessDenied}; Additional, the CORBA profile adds an NV entry to the message format enumeration see Subclause 9.4.2: enum MessageFormat {XML, HTML, TXT, NV};

9.6.3 Structures and unions

Most of the structures and unions from the General Model can be translated directly into CORBA structs and unions. Here the collectionID of the general model is translated as follows: union CollectionName switchlong { case 1 : wstring collectionID; case 2 : wstring collectionName; }; A special capability is present in QueryExpression in the CORBA Profile that allows passing of parameters that cant be converted to strings but shall be bound to variables in string theQuery e.g. ? in JDBC. For example, references or handles for metadata retrieved from related collections in previous queries. queryParameters might contain a NameValuePairSeq or non ASCII XML Data. The additional member aligns Catalogue Services query facilities with respective Simple Feature Access for CORBA query facilities. Copyright © 2007 Open Geospatial Consortium, Inc. All Rights Reserved. 89 struct QueryExpression { wstring theQuery; wstring theNamespace; QueryLanguage theLanguage; any queryParameters; }; To allow for globally unique sessionID a long long Long is used as datatype instead of long Integer. struct RequestID { long long sessionID; long counter; }; struct SortField { wstring attributeName; SortOrder sortOrder; }; The CORBA protocol binding specifies an any structure member for the retrievedData in a way that strings e.g. xml or name-value pairs or sequences can be stored. struct ReturnData { MessageFormat encoding; any payload; }; The responseElements in the general model specify a set name or a list of metadata elements to be returned in the context of a specific metadata structure. In CORBA IDL this is specified by a union which can represent a sequence of attribute names or alternative a PredefinedPresentationType. typedef sequencewstring StringSeq; union PresentationDescription switchlong { case 1 : StringSeq attributes; TupleType in GM case 2 : PredefinedPresentationType presentationType; }; The SchemeID structure uses a structure member Schema. This is in the CORBA profile defined as a sequence of name-value pairs from the OMG CORBA 2.3 DynamicAny module. All names, types, and used sequences can be specified in name-value pairs. A schema, tuple-type or a dictionary is not needed here. typedef DynamicAny::NameValuePairSeq Schema; struct SchemaID { wstring schemeName; Schema schema; 90 Copyright © 2007 Open Geospatial Consortium, Inc. All Rights Reserved. }; The getDomain operation in the general model specifies descriptions of domains of one or more requested metadata properties or requested parameters in their responseElements which are implemented as follows: Enumeration for the type of the metadata property or request parameter enum DomainType { domainTypeString, domainTypeDate, domainTypeInteger, domainTypeReal, domainTypeSpatial }; Enumeration for the type how valid values can be described enum DomainValuesType { valueRef, valueRange }; valid range, composed of lower and upper boundary value struct ValueRange { wstring lowerValue; wstring upperValue; }; typedef sequenceValueRange ValueRangeSeq; Definition of the real type by totalDigits and fractionDigits struct RealTypeDef { long totalDigits; long fractionDigits; }; type definition of the metadata property or request parameter union DomainDef switchDomainType { case domainTypeString : long length; case domainTypeDate : wstring dateFormat; case domainTypeInteger : long totalDigits; case domainTypeReal : CG_RealTypeDef realTypeDef; case domainTypeSpatial : long dimensions; }; definition of valid values range, value list of the type union DomainValueDef switchDomainValuesType { case valueRef : StringSeq valueList; case valueRange : ValueRangeSeq rangeList; }; definition of domain values typical value, valid values, value name, value description of the type struct DomainValue { Copyright © 2007 Open Geospatial Consortium, Inc. All Rights Reserved. 91 wstring value; DomainValueDef valuesDef; wstring title; wstring description; wstring metadataURL; }; typedef sequenceDomainValue DomainValueSeq; Descriptions of domain of one requested metadata properties or request parameter struct Domain { wstring attributeName; DomainDef domainDef; DomainValueSeq domainValue; }; typedef sequenceDomain DomainSeq;

9.6.4 Definitions for brokered access