// // ogis-feature.idl // // Feature definitions from the OpenGIS Simple Features // Specification for CORBA. // // // Taken from the PDF document _OpenGIS(R) Simple Features // Specification For CORBA_, Revision 1.1, dated June 2, 1999. // // Separated major sections into separate files in order to support // greater flexibility in the use of the module. // // Minor modifications made to restore readability after extraction // from the PDF document and to satisfy the TAO 1.4.6 IDL compiler. // // The aforementioned specification contains the following copyright // claims: // // Copyright 1997, 1998, 1999 Bentley Systems, Inc. // Copyright 1997, 1998, 1999 Environmental Systems Research Institute // Copyright 1997, 1998, 1999 Genasys II, Inc. // Copyright 1997, 1998, 1999 Oracle Corporation // Copyright 1997, 1998, 1999 University of California, Los Angeles. // Copyright 1997, 1998, 1999 Sun Microsystems, Inc. // // See the aforementioned specification for disclaimers and more // information. // // // Chuck Taylor, September 20, 2005. // // #ifndef _OGIS_FEATURE_IDL_ #define _OGIS_FEATURE_IDL_ #include "ogis-struct.idl" module OGIS { //---------------------------------------------------------------------- // Forward declarations of interfaces //---------------------------------------------------------------------- interface Geometry; interface FeaturePropertySetIterator; interface PropertyDefIterator; interface FeatureIterator; typedef sequence FeatureTypeSeq; //---------------------------------------------------------------------- // Feature Interface //---------------------------------------------------------------------- interface Feature { exception InvalidParams {string why;}; exception PropertyNotSet {}; // Property does not exist. exception InvalidProperty {}; // Not a valid property for the given // feature. exception InvalidValue {}; // value is not valid for property exception InvalidConversion {}; exception RequiredProperty {}; // property is required for the given // feature // feature type readonly attribute FeatureType feature_type; // geometry Geometry get_geometry (in NVPairSeq geometry_context) raises (InvalidParams); // generic property methods to get/set property values boolean property_exists(in Istring name) raises(InvalidProperty); any get_property(in Istring name) raises (PropertyNotSet,InvalidProperty); void set_property(in Istring name, in any value) raises(InvalidProperty, InvalidValue); void delete_property(in Istring name) raises (PropertyNotSet, InvalidProperty, RequiredProperty); // accessing property values by property names string get_string_by_name(in Istring propertyName) raises (PropertyNotSet, InvalidProperty); float get_float_by_name(in Istring propertyName) raises (PropertyNotSet, InvalidProperty); double get_double_by_name(in Istring propertyName) raises (PropertyNotSet, InvalidProperty); long get_long_by_name(in Istring propertyName) raises (PropertyNotSet, InvalidProperty); short get_short_by_name(in Istring propertyName) raises (PropertyNotSet, InvalidProperty); boolean get_boolean_by_name(in Istring propertyName) raises (PropertyNotSet, InvalidProperty); Decimal get_decimal_by_name(in Istring propertyName) raises (InvalidConversion, InvalidProperty); OctetSeq get_byte_stream_by_name(in Istring propertyName) raises (InvalidConversion, InvalidProperty); Geometry get_geometry_by_name(in Istring propertyName) raises (PropertyNotSet, InvalidProperty); WKSGeometry get_wksgeometry_by_name(in Istring propertyName) raises (InvalidConversion, InvalidProperty); OctetSeq get_wkbgeometry_by_name(in Istring propertyName) raises (InvalidConversion, InvalidProperty); NVPairSeq get_property_sequence(in unsigned long n); FeaturePropertySetIterator get_property_iterator(); void destroy(); }; typedef sequence FeatureSeq; //---------------------------------------------------------------------- // FeaturePrepertySetIterator Interface //---------------------------------------------------------------------- interface FeaturePropertySetIterator { exception IteratorInvalid {}; // Get next NVPair structure boolean next(out NVPair the_pair) raises (IteratorInvalid); // Get next "n" NVPair structures. boolean next_n(in unsigned long n, out NVPairSeq n_pairs) raises (IteratorInvalid); // Discard the iterator void destroy(); // reset the iterator void reset() raises (IteratorInvalid); }; //---------------------------------------------------------------------- // FeatureFactory Interface //---------------------------------------------------------------------- interface FeatureFactory { exception FeatureTypeInvalid {string why;}; exception PropertiesInvalid {string why;}; Feature create_feature(in FeatureType type, in NVPairSeq properties) raises (FeatureTypeInvalid, PropertiesInvalid); FeatureSeq create_features(in FeatureDataSeq features) raises (FeatureTypeInvalid, PropertiesInvalid); }; //---------------------------------------------------------------------- // FeatureType Interface //---------------------------------------------------------------------- interface FeatureType { exception InheritanceUnsupported {}; exception PropertyDefInvalid {}; // feature type name readonly attribute Istring name; // feature type parents FeatureTypeSeq get_parents() raises (InheritanceUnsupported); // feature type children FeatureTypeSeq get_children() raises (InheritanceUnsupported); // definition of properties for this feature type boolean property_def_exists(in Istring name); PropertyDef get_property_def(in Istring name) raises(PropertyDefInvalid); PropertyDefSeq get_property_def_sequence(in long levels, in unsigned long n); PropertyDefIterator get_property_def_iterator (in long levels); void destroy(); }; // (Already defined above) // typedef sequence FeatureTypeSeq; //---------------------------------------------------------------------- // FeatureTypeFactory Interface //---------------------------------------------------------------------- interface FeatureTypeFactory { exception InvalidParams {string why;}; FeatureType create(in string name, in PropertyDefSeq schema, in FeatureTypeSeq parents) raises(InvalidParams); }; //---------------------------------------------------------------------- // PropertyDefIterator Interface //---------------------------------------------------------------------- interface PropertyDefIterator { exception IteratorInvalid {}; // Get next PropertyDef structure boolean next(out PropertyDef schema_property) raises (IteratorInvalid); // Get next "n" PropertyDef structures boolean next_n(in unsigned long n, out PropertyDefSeq schema_properties) raises (IteratorInvalid); // Discard the iterator void destroy(); // reset the iterator void reset() raises (IteratorInvalid); }; //---------------------------------------------------------------------- // FeatureCollection Interface //---------------------------------------------------------------------- interface FeatureCollection : Feature { exception IteratorInvalid {}; exception PositionInvalid {}; exception FeatureInvalid {string why;}; exception PropertiesInvalid {string why;}; readonly attribute long number_features; FeatureTypeSeq supported_feature_types(); void add_element (in Feature element) raises (FeatureInvalid); void merge (in FeatureCollection elements) raises (FeatureInvalid); void insert_element_at (in Feature element, in FeatureIterator where) raises (FeatureInvalid, IteratorInvalid); void replace_element_at (in Feature element, in FeatureIterator where) raises (FeatureInvalid, IteratorInvalid, PositionInvalid); void remove_element_at (in FeatureIterator where) raises (IteratorInvalid, PositionInvalid); void remove_all_elements (); Feature retrieve_element_at (in FeatureIterator where) raises (IteratorInvalid, PositionInvalid); FeatureIterator create_iterator(); }; //---------------------------------------------------------------------- // FeatureCollectionFactory Interface //---------------------------------------------------------------------- interface FeatureCollectionFactory { exception FeatureTypeInvalid {string why;}; exception PropertyInvalid {string why;}; exception FeatureInvalid {string why;}; FeatureCollection create(in FeatureType collection_type, in NVPairSeq collection_properties, in FeatureTypeSeq supported_feature_types) raises (FeatureTypeInvalid, PropertyInvalid); FeatureCollection createFromCollection(in FeatureType collection_type, in NVPairSeq collection_properties, in FeatureTypeSeq supported_feature_types, in FeatureCollection collection) raises (FeatureTypeInvalid,PropertyInvalid,FeatureInvalid); FeatureCollection createFromSequence(in FeatureType collection_type, in NVPairSeq collection_properties, in FeatureTypeSeq supported_feature_types, in FeatureSeq list) raises (FeatureTypeInvalid,PropertyInvalid,FeatureInvalid); }; //---------------------------------------------------------------------- // FeatureIterator Interface //---------------------------------------------------------------------- interface FeatureIterator { exception IteratorInvalid {}; exception PositionInvalid {}; exception FeatureNotAvailable {}; exception InvalidConversion {}; exception InvalidProperty {}; exception PropertyNotSet {}; exception InvalidParameters {}; // iterating over features boolean next (out Feature the_feature) raises (IteratorInvalid, PositionInvalid, FeatureNotAvailable); boolean next_n (in short n, out FeatureSeq the_features) raises (IteratorInvalid, PositionInvalid, FeatureNotAvailable); void advance () raises (IteratorInvalid, PositionInvalid); Feature current () raises (IteratorInvalid, PositionInvalid, FeatureNotAvailable); // accessing current feature via ‘Feature’-like methods FeatureType get_feature_type(); Geometry get_geometry(in NVPairSeq geometry_context) raises (InvalidParameters); boolean property_exists(in Istring name) raises(InvalidProperty); any get_property(in Istring name) raises (PropertyNotSet, InvalidProperty); string get_string_by_name(in Istring propertyName) raises (PropertyNotSet, InvalidProperty); float get_float_by_name(in Istring propertyName) raises (PropertyNotSet, InvalidProperty); double get_double_by_name(in Istring propertyName) raises (PropertyNotSet, InvalidProperty); long get_long_by_name(in Istring propertyName) raises (PropertyNotSet, InvalidProperty); short get_short_by_name(in Istring propertyName) raises (PropertyNotSet, InvalidProperty); boolean get_boolean_by_name(in Istring propertyName) raises (PropertyNotSet, InvalidProperty); Decimal get_decimal_by_name(in Istring propertyName) raises (InvalidConversion, InvalidProperty); OctetSeq get_byte_stream_by_name(in Istring propertyName) raises (InvalidConversion, InvalidProperty); Geometry get_geometry_by_name(in Istring propertyName) raises (PropertyNotSet, InvalidProperty); WKSGeometry get_wksgeometry_by_name(in Istring propertyName) raises (InvalidConversion, InvalidProperty); OctetSeq get_wkbgeometry_by_name(in Istring propertyName) raises (InvalidConversion, InvalidProperty); NVPairSeq get_property_sequence(in unsigned long n); FeaturePropertySetIterator get_property_iterator(); void reset() raises (IteratorInvalid); boolean more(); void destroy(); }; //---------------------------------------------------------------------- // ContainerFeatureCollection Interface //---------------------------------------------------------------------- interface ContainerFeatureCollection : FeatureCollection, FeatureFactory { }; //---------------------------------------------------------------------- // ContainerFeatureCollectionFactory Interface //---------------------------------------------------------------------- interface ContainerFeatureCollectionFactory { exception FeatureTypeInvalid {string why;}; exception PropertyInvalid {string why;}; exception FeatureInvalid {string why;}; ContainerFeatureCollection create(in FeatureType collection_type, in NVPairSeq collection_properties) raises (FeatureTypeInvalid, PropertyInvalid); ContainerFeatureCollection createFromCollection( in FeatureType collection_type, in NVPairSeq collection_properties, in FeatureCollection collection) raises (FeatureTypeInvalid,PropertyInvalid,FeatureInvalid); ContainerFeatureCollection createFromSequence( in FeatureType collection_type, in NVPairSeq collection_properties, in FeatureSeq list) raises (FeatureTypeInvalid,PropertyInvalid,FeatureInvalid); ContainerFeatureCollection createFromFeatureData( in FeatureType collection_type, in NVPairSeq collection_properties, in FeatureDataSeq list) raises (FeatureTypeInvalid,PropertyInvalid,FeatureInvalid); }; }; // End OGIS Module #endif // _OGIS_FEATURE_IDL_