[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
gnue/geas/doc odmg.txt
From: |
Daniel E. Baumann |
Subject: |
gnue/geas/doc odmg.txt |
Date: |
Mon, 25 Feb 2002 01:41:55 -0500 |
CVSROOT: /cvsroot/gnue
Module name: gnue
Changes by: Daniel E. Baumann <address@hidden> 02/02/25 01:41:54
Modified files:
geas/doc : odmg.txt
Log message:
Add structured objects definitions, notes on literals, and the full
built-in
type heirarchy.
CVSWeb URLs:
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/gnue/geas/doc/odmg.txt.diff?tr1=1.7&tr2=1.8&r1=text&r2=text
Patches:
Index: gnue/geas/doc/odmg.txt
diff -c gnue/geas/doc/odmg.txt:1.7 gnue/geas/doc/odmg.txt:1.8
*** gnue/geas/doc/odmg.txt:1.7 Sun Feb 17 14:55:31 2002
--- gnue/geas/doc/odmg.txt Mon Feb 25 01:41:54 2002
***************
*** 666,669 ****
locate a particular entry in the Dictionary object. A boolean is
returned specifying whether the key-value pair exists in the
Dictionary.
!
\ No newline at end of file
--- 666,1173 ----
locate a particular entry in the Dictionary object. A boolean is
returned specifying whether the key-value pair exists in the
Dictionary.
!
! Structured Objects
! ==================
! - all structured objects support Object ODL interface
! - ODMG Object Model support the following types:
!
! * Date
! * Interval
! * Time
! * Timestamp
!
! - these types are defined as in INCITS SQL specification by the
! following interfaces.
!
! Date
! ====
! - factory interface for creating Date objects:
!
! interface DateFactory: ObjectFactory
! {
! exception InvalidDate{};
!
! Date julian_date(in unsigned short year,
! in unsigned short julian_day)
! raises(InvalidDate);
!
! Date calendar_date(in unsigned short year,
! in unsigned short month,
! in unsigned short day)
! raises(InvalidDate);
!
! boolean is_leap_year(in unsigned short year);
!
! boolean is_valid_date(in unsigned short year,
! in unsigned short month,
! in unsigned short day);
!
! unsigned short days_in_year(in unsigned short year);
!
! unsigned short days_in_month(in unsigned short year,
! in Date::Month month);
!
! Date current();
! };
!
! - following interface defines the operations on Date objects:
!
! class Date: Object
! {
! enum Weekday{Sunday, Monday, Tuesday, Wednesday,
! Thursday, Friday, Saturday};
!
! enum Month{January, February, March, April, May,
! June, July, August, September, October,
! November, December};
!
! attribute date value;
!
! unsigned short year();
!
! unsigned short month();
!
! unsigned short day();
!
! unsigned short day_of_year();
!
! Month month_of_year();
!
! Weekday day_of_weeks();
!
! boolean is_leap_year();
!
! boolean is_equal(in Date a_date);
!
! boolean is_greater(in Date a_date);
!
! boolean is_greater_or_equal(in Date a_date);
!
! boolean is_less(in Date a_date);
!
! boolean is_less_or_equal(in Date a_date);
!
! boolean is_between(in Date a_date, in Date b_date);
!
! Date next(in Weekday day);
!
! Date previous(in Weekday day);
!
! Date add_days(in long days);
!
! Date subtract_days(in long days);
!
! Date subtract_date(in Date a_date);
! };
!
! Interval
! ========
! - intervals represent a duration of time and are used to perform
! some operations on Time and Timestamp objects, Intervals are
! created using the 'subtract_time' operation defined in the Time
! interface
!
! class Interval: Object
! {
! attribute interval value;
!
! unsigned short day();
!
! unsigned short hour();
!
! unsigned short minute();
!
! unsigned short second();
!
! unsigned short millisecond();
!
! boolean is_zero();
!
! Interval plus(in Interval an_interval);
!
! Interval minus(in Interval an_interval);
!
! Interval product(in long val);
!
! Interval quotient(in long val);
!
! boolean is_equal(in Interval an_interval);
!
! boolean is_greater(in Interval an_interval);
!
! boolean is_greater_or_equal(in Interval an_interval);
!
! boolean is_less(in Interval an_interval);
!
! boolean is_less_or_equal(in Interval an_interval);
! };
!
! Time
! ====
! - Times denote specific world tiems which are interbally stored
! as GMT, timezones specified as number of hours to subtract form
! local time to get GMT.
!
! - Time factory interface:
!
! interface TimeFactory: ObjectFactory
! {
! void set_default_time_zone(in TimeZone a_time_zone);
!
! TimeZone default_time_zone();
!
! TimeZone time_zone();
!
! Time from_hmsm(in unsigned short hour,
! in unsigned short minute,
! in unsigned short second,
! in unsigned short millisecond);
!
! Time from_hmsmtz(in unsigned short hour,
! in unsigned short minute,
! in unsigned short second,
! in unsigned short millisecond,
! in short tzhour,
! in short tzminute);
!
! Time current();
! };
!
! - Time interface:
!
! class Time: Object
! {
! attribute time value;
!
! typedef short TimeZone;
!
! const TimeZone GMT = 0;
! const TimeZone GMT1 = 1;
! const TimeZone GMT2 = 2;
! const TimeZone GMT3 = 3;
! const TimeZone GMT4 = 4;
! const TimeZone GMT5 = 5;
! const TimeZone GMT6 = 6;
! const TimeZone GMT7 = 7;
! const TimeZone GMT8 = 8;
! const TimeZone GMT9 = 9;
! const TimeZone GMT10 = 10;
! const TimeZone GMT11 = 11;
! const TimeZone GMT12 = 12;
! const TimeZone GMT_1 = -1;
! const TimeZone GMT_2 = -2;
! const TimeZone GMT_3 = -3;
! const TimeZone GMT_4 = -4;
! const TimeZone GMT_5 = -5;
! const TimeZone GMT_6 = -6;
! const TimeZone GMT_7 = -7;
! const TimeZone GMT_8 = -8;
! const TimeZone GMT_9 = -9;
! const TimeZone GMT_10 = -10;
! const TimeZone GMT_11 = -11;
! const TimeZone GMT_12 = -12;
! const TimeZone USeastern = -5;
! const TimeZone UScentral = -6;
! const TimeZone USmountain = -7;
! const TimeZone USpacific = -8;
!
! unsigned short hour();
!
! unsigned short minute();
!
! unsigned short second();
!
! unsigned short millisecond();
!
! short tz_hour();
!
! short tz_minute();
!
! boolean is_equal(in Time a_time);
!
! boolean is_greater(in Time a_time);
!
! boolean is_greater_or_equal(in Time a_time);
!
! boolean is_less(in Time a_time);
!
! boolean is_less_or_equal(in Time a_time);
!
! boolean is_between(in Time a_time, in Time b_time);
!
! Time add_interval(in Interval an_interval);
!
! Time subtract_interval(in Interval an_interval);
!
! Time subtract_time(in Time a_time);
! };
!
! Timestamp
! =========
! - Timestamp consists of encapsulated Date and Time
! - Timestamp factory interface:
!
! interface TimestampFactory: ObjectFactory
! {
! exception InvalidTimestamp{Date a_date, Time a_time; };
!
! Timestamp current();
!
! Timestamp create(in Date a_date, in Time a_time)
! raises(InvaildTimestamp);
! };
!
! - Timestamp interface
!
! class Timestamp: Object
! {
! attribute timestamp value;
!
! Date get_date();
!
! Date get_time();
!
! unsigned short year();
!
! unsigned short month();
!
! unsigned short day();
!
! unsigned short hour();
!
! unsigned short minute();
!
! unsigned short second();
!
! unsigned short millisecond();
!
! short tz_hour();
!
! short tz_minute();
!
! Timestamp plus(in Interval an_interval);
!
! Timestamp substract(in Interval an_interval);
!
! boolean is_equal(in Timestamp a_timestamp);
!
! boolean is_greater(in Timestamp a_timestamp);
!
! boolean is_greater_or_equal(in Timestamp a_timestamp);
!
! boolean is_less(in Timestamp a_timestamp);
!
! boolean is_less_or_equal(in Timestamp a_timestamp);
!
! boolean is_between(in Timestamp a_timestamp,
! in Timestamp b_timestamp);
! };
!
! Literals
! ========
! - standard considers each of the following aspects of literals
!
! * types
! * copying
! * comparing
! * equivalence
!
! Literal Types
! =============
! - Object Model supports:
!
! * atomic literal
! * collection literal
! * structured literal
!
! Atomic Literals
! ===============
! - numbers and characters are examples
! - instances of these types are not explicitly created by
! applications, but implicitly exist
! - ODMG Object Model supports the following types of atomic
! literals:
!
! * long
! * long long
! * short
! * unsigned long
! * unsigned short
! * float
! * double
! * boolean
! * octet
! * char (character)
! * string
! * enum (enumeration)
!
! - these types are also supported by OMG IDL
!
! Collection Literals
! ===================
! - ODMG Object Model supports the following collection literals:
!
! * set<t>
! * bag<t>
! * list<t>
! * array<t>
! * dictionary<t,v>
!
! - these type generators are analagous of their collection objects
! except they do not have OIDs
! - their elements can be of literal or object type
!
! Structured Literals
! ===================
! - structred literal or structure has fixed numeber of elements,
! each of which ahs a variable name and can contain either literal
! or an object.
! - Structure types supported by ODMG Object Model include:
!
! * date
! * interval
! * time
! * timestamp
!
! User-Defined Structures
! =======================
! - because object model is extensible, you can define you own structs
like:
!
! struct Address
! {
! string dorm_name;
! string room_no;
! };
!
! - structures may be freely composed, Object Model supports sets
! of structures, structures of sets, arrays of structures, etc.
! - e.g.,
!
! struct Degree {...};
!
! typedef list<Degree> degrees;
!
! Copying Literals
! ================
! - literals do not have OIDs and therefore cannot be shared,
! literals do have copy semantics
! - when iterating through a collection of literals, copies of the
! elements are returned
! - when trturning a literal-valued attribute of an object, a copy
! of the literal value is returned
!
! Comparing Literals
! ==================
! - since literals do not have OIDs (not objects) they cannot be
! compared by identity (same_as operation)
! - they are compared using the 'equals' equivalence operation
! - this becomes inportant for collection management, e.g., when
! inserting, removing, or testing for membership in a collection of
! literals the 'equals' operations is used rather than the identity
! operation 'same_as'
!
! Literal Equivalence
! ===================
! - two literals, x and y, are equivalent if they have the same
! literal type and
!
! * are both atomic and contain the same value
!
! * are both sets, have the same parameter type 't', and
!
! * if 't' is a literal type, then for each element in 'x',
! there is an element 'y' that is equivalent to it, and for each
! element 'y', there is an element 'x' that is equivalent to
! it
!
! * if 't' is an Object type, then both 'x' and 'y' contain the
! same set of OIDs
!
! * are both bags, have the same parameter type 't', and
!
! * if 't' is a literal type, then for each element 'x', there
! is an element in 'y' that is equivalent to it, and for each
! element in 'y' there is an element in 'x' that is equivalent
! to it. In addition, for each literal appearing more than
! once in 'x', there is an equivalent literal occurring the same
! number of times in 'y'
!
! * if 't' is an Object type, then both 'x' and 'y' contian the
! same set of oids, In addition, for each oid appearing more
! than once in 'x', there is an identical oid appearing the same
! number of times in 'y'
!
! * are both arrays or lists, have the same parameter type 't',
! and for each entry 'i'
!
! * if 't' is a literal type, then x[i] is equivalent to y[i]
! (equal)
!
! * if t is an object type, then x[i] is identical to y[i]
! (same_as)
!
! * are both dictionary literals, and when considering sets of
! associations, the two sets are equivalent
!
! * are both structs of the same type, and for each element 'j'
!
! * if the element is a literal type, then x.j and y.j are
! equivalent (equal)
!
! * if the element is an object type, then x.j and y.j are
! identical (same_as)
!
! The Full Built-in Type Hierarchy
! ================================
! - type generators signified by angle brackets (e.g., Set<>)
! - ODMG Object Model is strongly typed
! - 2 objects or literals are the same type if they have been declared
! to be instances of the same named type
! - Type compatibility follows the subtyping relationships defined by
! the type heirarchy (i.e, a derived type can be assigned to a variable
! of the parent type, but no the reverse)
! - No implicit conversions between types are provided by the Object
! Model
!
! NOTE: <<type>> denotes and abstract type
!
! <<Literal_type>>
! <<Atomic_literal>>
! long
! long long
! short
! unsigned long
! unsigned short
! float
! double
! boolean
! octet
! char
! string
! enum<>
! <<Collection_literal>>
! set<>
! bag<>
! list<>
! array<>
! dictionary<>
! <<Structured_literal>>
! date
! time
! timestamp
! Interval
! structure<>
! <<Object_type>>
! <<Atomic_object>>
! <<Collection_object>>
! Set<>
! Bag<>
! List<>
! Array<>
! Dictionary<>
! <<Structured_object>>
! Date
! Time
! Timestamp
! Interval
\ No newline at end of file
- gnue/geas/doc odmg.txt, Daniel E. Baumann, 2002/02/08
- gnue/geas/doc odmg.txt, Daniel E. Baumann, 2002/02/08
- gnue/geas/doc odmg.txt, Daniel E. Baumann, 2002/02/08
- gnue/geas/doc odmg.txt, Daniel E. Baumann, 2002/02/08
- gnue/geas/doc odmg.txt, Daniel E. Baumann, 2002/02/12
- gnue/geas/doc odmg.txt, Daniel E. Baumann, 2002/02/17
- gnue/geas/doc odmg.txt,
Daniel E. Baumann <=
- gnue/geas/doc odmg.txt, Daniel E. Baumann, 2002/02/26