Lor
ita
t-
IMS
S.
nt
‚te
ng
nd
ry
me
nd
ed
t-
an
at
ng
OP
In
2
1S
3,
n
&
id
4.2.3 Method A method corresponds to a
function or a procedure. A method is the code in
an object that tells the object how to react when
it receives a message with the same name as the
method. In HyperTalk, the handlers correspond
closely to OOP method. A Handler is associated
with each type of message the object can receive.
But a message is different from a method, besides
the handler descriptions, the message also
includes other scripts, such as card name, card
fields, etc.
4.2.4 Class The concept of class is the same
as classification in object-oriented data models.
The most important thing objects in class have in
common is the way they react to one or more
messages. When we define a class, each object we
create as a member of that class is contained.
That means that it is not necessary to send the
messages to each single object. In HyperTalk,
there is no strong analogue to OOP’s concept of
classes. For example, there is no class called a
button class to which all buttons belong and
which has individual instances of buttons. The
concept of card backgrounds however, comes close
to emulating an OOP class. All cards in a stack
with the same backgrounds have many common
characteristics.
4,2.5 Inheritance In a true object-oriented
world, objects inherit behavior from their
ancestors in an ever-expanding and descending
chain of heredity. That implies that an object of
a subclass reacts to the messages not only from
the same class but also from its ancestors. There
is also no true inheritance in HyperTalk. An
object does not inherit behavior from its
ancestors. But like the class in HyperTalk, we
can copy new cards with the same backgrounds
which can react to the same operations or have
the same properties. When we define some
backgrounds for a class in a stack, all objects
in this class and its subclasses have the same
backgrounds. However, this is not inheritance
because the new cards of the same backgrounds are
not the descendants of the original; both are on
the same level of the hierarchy. According to
inheritance in object-oriented programming, the
operations defined specifically for a subclass
are not applicable for objects of the
superclasses. But in HyperTalk, if a background
is modified or added in the card of the subclass,
the cards of its superclasses in the same stack
will be affected.
4.3 Object-oriented Models in attribute database
Geographical information systems are employed to
store and describe the complex information and
phenomena in the real world. The object-oriented
data model can serve as a conceptual model. The
classification, generalization, association and
aggregation are used to define the classes of
objects, to describe the relationship of the
classes and to compose the complex objects. The
object-oriented language such as HyperTalk
provides an environment to encapsulate data and
operation in a modular, and the mechanism of
inheritance and propagation. In technique, it has
provided a seamless combination between Oracle
and HyperTalk.
4.3.1 Classification in GIS The features in
GIS can be classified according to the
classification criteria of GIS. Some ideas of the
classification in object-oriented models are
proposed here. A class corresponds to a table in
the relational database and uses a card in
777
HyperTalk. The card includes some operation
‘icons’ like select, insert, delete, etc., some
property ’containers’ and some classification
icons’. A column in a table corresponds to a
container in a card. A row in a table represents
an object (an instance).The features in GIS can
be classified as road, building, park, water-
system, vegetation, phone-line and so on. Fig. 8
Shows the classifications of the features. Every
subclass in the card GIS can be classified
further. For example, the class building can be
classified into residence, hotel, supermarket,
factory, bank and so on (see Fig.9).
Sequentially, for instance, the hotel can be
decomposed into the classes of employer and
room&bed are not the subclasses of the class
hotel, and the relationship between the employees
or room bed and the hotel is the part_of
relation. So the properties and the operations of
the class hotel and class building do not inherit
them. However, the class hotel can derive the
values from the tables of employees and room&bed.
Fig. 10 shows the classifications of the features
and their relationship.
4.3.2 Generalization in GIS Several classes of
objects with common properties and operations are
organized to form a more general superclass. For
example, factories, farms, supermarkets, hotels
and restaurants have the common properties income
and tax. They are formed into a higher level
class business, and use a table which has the
columns business name, income and tax.
4.3.3 Inheritance and Propagation in GIS The
mechanisms of inheritance and propagation are
important in GIS. Some simple tables are
established in an attribute database. But the
user sometimes needs to query the detailed
information of an object such as a hotel. A table
of the hotel only includes the fields identifier,
hotel name, manager name and phone number.
However, the user needs its more detailed
information like its address, income, employees,
beds and so on. Therefore, the user must
manipulate several tables. The Oracle system has
the function of querying multiple tables. In card
hotel, the properties of its superclass building
and business are inherited to it, and several
fields that represent the properties in the hotel
table are built singly. Sequentially, a field
employees and two fields rooms and beds are used
for propagation which aggregate the values in the
table employee and room&bed. The button select
holds the handlers of querying multiple tables
and adding sum. When the user uses the command
select, the select "icon" receives the message
and sends it into the handler, and then
manipulates the tables building, business, hotel,
employee and room&bed. The information is put
into the corresponding fields (see Fig.
11).Actually, the query is divided into two
steps. The first, querying multiple tables hotel,
building and business gets the information of
hotel and its superclass building and business.
The second, according to the name of the hotel
shown in the field, querying the tables employee
and room&bed of this hotel, gets the sums of the
corresponding columns. If HyperTalk were not used
we could not do the second step. Here HyperTalk
send a message name, which is obtained from the
first step, to the field of hotel name, then
query the tables corresponding to this hotel name
because each hotel use an employee table and a
room bed table. This is an advantage of
HyperTalk, because an object or "icon" can hold
several handlers.