summaryrefslogtreecommitdiff
path: root/noncore/apps/tableviewer
Unidiff
Diffstat (limited to 'noncore/apps/tableviewer') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/apps/tableviewer/.cvsignore5
-rw-r--r--noncore/apps/tableviewer/Makefile.in330
-rw-r--r--noncore/apps/tableviewer/README29
-rw-r--r--noncore/apps/tableviewer/browsekeyentry.cpp242
-rw-r--r--noncore/apps/tableviewer/db.xmlt6279
-rw-r--r--noncore/apps/tableviewer/db/.cvsignore3
-rw-r--r--noncore/apps/tableviewer/db/common.cpp1470
-rw-r--r--noncore/apps/tableviewer/db/common.h285
-rw-r--r--noncore/apps/tableviewer/db/csvsource.cpp207
-rw-r--r--noncore/apps/tableviewer/db/csvsource.h53
-rw-r--r--noncore/apps/tableviewer/db/datacache.cpp293
-rw-r--r--noncore/apps/tableviewer/db/datacache.h130
-rw-r--r--noncore/apps/tableviewer/db/xmlsource.cpp295
-rw-r--r--noncore/apps/tableviewer/db/xmlsource.h119
-rw-r--r--noncore/apps/tableviewer/keyentry.cw55
-rw-r--r--noncore/apps/tableviewer/main.cpp32
-rw-r--r--noncore/apps/tableviewer/qpe-tableviewer.control10
-rw-r--r--noncore/apps/tableviewer/tableviewer.cpp455
-rw-r--r--noncore/apps/tableviewer/tableviewer.h109
-rw-r--r--noncore/apps/tableviewer/tableviewer.pro36
-rw-r--r--noncore/apps/tableviewer/ui/.cvsignore8
-rw-r--r--noncore/apps/tableviewer/ui/browsekeyentry.cpp206
-rw-r--r--noncore/apps/tableviewer/ui/browsekeyentry.h75
-rw-r--r--noncore/apps/tableviewer/ui/commonwidgets.cpp209
-rw-r--r--noncore/apps/tableviewer/ui/commonwidgets.h98
-rw-r--r--noncore/apps/tableviewer/ui/filterkeyentry.cpp208
-rw-r--r--noncore/apps/tableviewer/ui/filterkeyentry.h96
-rw-r--r--noncore/apps/tableviewer/ui/tvbrowseview.cpp122
-rw-r--r--noncore/apps/tableviewer/ui/tvbrowseview.h55
-rw-r--r--noncore/apps/tableviewer/ui/tveditview.cpp235
-rw-r--r--noncore/apps/tableviewer/ui/tveditview.h62
-rw-r--r--noncore/apps/tableviewer/ui/tvfilterview.cpp304
-rw-r--r--noncore/apps/tableviewer/ui/tvfilterview.h88
-rw-r--r--noncore/apps/tableviewer/ui/tvkeyedit.cpp254
-rw-r--r--noncore/apps/tableviewer/ui/tvkeyedit.h56
-rw-r--r--noncore/apps/tableviewer/ui/tvkeyedit_gen.ui239
-rw-r--r--noncore/apps/tableviewer/ui/tvlistview.cpp315
-rw-r--r--noncore/apps/tableviewer/ui/tvlistview.h92
38 files changed, 13159 insertions, 0 deletions
diff --git a/noncore/apps/tableviewer/.cvsignore b/noncore/apps/tableviewer/.cvsignore
new file mode 100644
index 0000000..93eb983
--- a/dev/null
+++ b/noncore/apps/tableviewer/.cvsignore
@@ -0,0 +1,5 @@
1moc_*
2Makefile
3tvbrowseview_gen.h
4tvfilterview_gen.h
5tvkeyedit_gen.h
diff --git a/noncore/apps/tableviewer/Makefile.in b/noncore/apps/tableviewer/Makefile.in
new file mode 100644
index 0000000..8c5dc26
--- a/dev/null
+++ b/noncore/apps/tableviewer/Makefile.in
@@ -0,0 +1,330 @@
1#############################################################################
2
3####### Compiler, tools and options
4
5 CXX =$(SYSCONF_CXX) $(QT_CXX_MT)
6 CXXFLAGS=$(SYSCONF_CXXFLAGS_QT) $(SYSCONF_CXXFLAGS)
7 CC =$(SYSCONF_CC) $(QT_C_MT)
8 CFLAGS =$(SYSCONF_CFLAGS)
9 INCPATH =-I../library
10 LFLAGS =$(SYSCONF_LFLAGS_QT) $(SYSCONF_RPATH_QT) $(SYSCONF_LFLAGS) $(QT_LFLAGS_MT)
11 LIBS =$(SUBLIBS) -lqpe $(SYSCONF_LIBS_QT) $(SYSCONF_LIBS) $(SYSCONF_LIBS_QTAPP)
12 MOC =$(SYSCONF_MOC)
13 UIC =$(SYSCONF_UIC)
14
15####### Target
16
17DESTDIR = ../bin/
18VER_MAJ = 1
19VER_MIN = 0
20VER_PATCH = 0
21 TARGET= tableviewer
22TARGET1 = lib$(TARGET).so.$(VER_MAJ)
23
24####### Files
25
26 HEADERS =tableviewer.h \
27 ui/commonwidgets.h \
28 ui/tvbrowseview.h \
29 ui/tvlistview.h \
30 ui/tvfilterview.h \
31 ui/tveditview.h \
32 ui/browsekeyentry.h \
33 ui/filterkeyentry.h \
34 ui/tvkeyedit.h \
35 db/datacache.h \
36 db/common.h \
37 db/xmlsource.h \
38 db/csvsource.h
39 SOURCES =main.cpp \
40 tableviewer.cpp \
41 ui/commonwidgets.cpp \
42 ui/tvbrowseview.cpp \
43 ui/tvfilterview.cpp \
44 ui/browsekeyentry.cpp \
45 ui/filterkeyentry.cpp \
46 ui/tvlistview.cpp \
47 ui/tveditview.cpp \
48 ui/tvkeyedit.cpp \
49 db/datacache.cpp \
50 db/xmlsource.cpp \
51 db/csvsource.cpp \
52 db/common.cpp
53 OBJECTS =main.o \
54 tableviewer.o \
55 ui/commonwidgets.o \
56 ui/tvbrowseview.o \
57 ui/tvfilterview.o \
58 ui/browsekeyentry.o \
59 ui/filterkeyentry.o \
60 ui/tvlistview.o \
61 ui/tveditview.o \
62 ui/tvkeyedit.o \
63 db/datacache.o \
64 db/xmlsource.o \
65 db/csvsource.o \
66 db/common.o \
67 ui/tvkeyedit_gen.o
68INTERFACES = ui/tvkeyedit_gen.ui
69UICDECLS = ui/tvkeyedit_gen.h
70UICIMPLS = ui/tvkeyedit_gen.cpp
71 SRCMOC =moc_tableviewer.cpp \
72 ui/moc_commonwidgets.cpp \
73 ui/moc_tvbrowseview.cpp \
74 ui/moc_tvlistview.cpp \
75 ui/moc_tvfilterview.cpp \
76 ui/moc_tveditview.cpp \
77 ui/moc_browsekeyentry.cpp \
78 ui/moc_filterkeyentry.cpp \
79 ui/moc_tvkeyedit.cpp \
80 ui/moc_tvkeyedit_gen.cpp
81 OBJMOC =moc_tableviewer.o \
82 ui/moc_commonwidgets.o \
83 ui/moc_tvbrowseview.o \
84 ui/moc_tvlistview.o \
85 ui/moc_tvfilterview.o \
86 ui/moc_tveditview.o \
87 ui/moc_browsekeyentry.o \
88 ui/moc_filterkeyentry.o \
89 ui/moc_tvkeyedit.o \
90 ui/moc_tvkeyedit_gen.o
91
92
93####### Implicit rules
94
95.SUFFIXES: .cpp .cxx .cc .C .c
96
97.cpp.o:
98 $(CXX) -c $(CXXFLAGS) $(INCPATH) -o $@ $<
99
100.cxx.o:
101 $(CXX) -c $(CXXFLAGS) $(INCPATH) -o $@ $<
102
103.cc.o:
104 $(CXX) -c $(CXXFLAGS) $(INCPATH) -o $@ $<
105
106.C.o:
107 $(CXX) -c $(CXXFLAGS) $(INCPATH) -o $@ $<
108
109.c.o:
110 $(CC) -c $(CFLAGS) $(INCPATH) -o $@ $<
111
112####### Build rules
113
114
115all: $(DESTDIR)$(TARGET)
116
117$(DESTDIR)$(TARGET): $(UICDECLS) $(OBJECTS) $(OBJMOC) $(SUBLIBS)
118 $(SYSCONF_LINK) $(LFLAGS) -o $(DESTDIR)$(TARGET) $(OBJECTS) $(OBJMOC) $(LIBS)
119
120moc: $(SRCMOC)
121
122tmake: Makefile.in
123
124Makefile.in: tableviewer.pro
125 tmake tableviewer.pro -o Makefile.in
126
127clean:
128 -rm -f $(OBJECTS) $(OBJMOC) $(SRCMOC) $(UICIMPLS) $(UICDECLS)
129 -rm -f *~ core
130 -rm -f allmoc.cpp
131
132####### Extension Modules
133
134listpromodules:
135 @echo
136
137listallmodules:
138 @echo
139
140listaddonpromodules:
141 @echo
142
143listaddonentmodules:
144 @echo
145
146
147REQUIRES=
148
149####### Sub-libraries
150
151
152###### Combined headers
153
154
155
156####### Compile
157
158main.o: main.cpp \
159 tableviewer.h \
160 db/common.h \
161 ../library/fileselector.h \
162 ../library/filemanager.h \
163 ../library/applnk.h \
164 ../library/qpeapplication.h \
165 ../library/qpedecoration_qws.h
166
167tableviewer.o: tableviewer.cpp \
168 tableviewer.h \
169 db/common.h \
170 ../library/fileselector.h \
171 ../library/filemanager.h \
172 ../library/applnk.h \
173 ui/tvbrowseview.h \
174 ui/tvfilterview.h \
175 ui/tvlistview.h \
176 ui/tveditview.h \
177 ui/tvkeyedit.h \
178 tvkeyedit_gen.h \
179 db/datacache.h \
180 ../library/resource.h
181
182ui/commonwidgets.o: ui/commonwidgets.cpp \
183 ../library/datebookmonth.h \
184 ../library/organizer.h \
185 ../library/xmlreader.h \
186 ../library/calendar.h \
187 ui/commonwidgets.h
188
189ui/tvbrowseview.o: ui/tvbrowseview.cpp \
190 ui/tvbrowseview.h \
191 ui/../db/common.h \
192 ui/browsekeyentry.h
193
194ui/tvfilterview.o: ui/tvfilterview.cpp \
195 ui/tvfilterview.h \
196 ui/filterkeyentry.h \
197 ui/../db/common.h
198
199ui/browsekeyentry.o: ui/browsekeyentry.cpp \
200 ui/browsekeyentry.h \
201 ui/../db/common.h \
202 ui/commonwidgets.h
203
204ui/filterkeyentry.o: ui/filterkeyentry.cpp \
205 ui/filterkeyentry.h \
206 ui/../db/common.h \
207 ui/commonwidgets.h
208
209ui/tvlistview.o: ui/tvlistview.cpp \
210 ui/tvlistview.h \
211 ui/../db/common.h
212
213ui/tveditview.o: ui/tveditview.cpp \
214 ui/tveditview.h \
215 ui/../db/common.h \
216 ui/commonwidgets.h
217
218ui/tvkeyedit.o: ui/tvkeyedit.cpp \
219 ui/tvkeyedit.h \
220 tvkeyedit_gen.h \
221 ui/../db/common.h
222
223db/datacache.o: db/datacache.cpp \
224 db/datacache.h \
225 db/common.h \
226 db/xmlsource.h \
227 db/csvsource.h
228
229db/xmlsource.o: db/xmlsource.cpp \
230 db/xmlsource.h \
231 db/datacache.h \
232 db/common.h
233
234db/csvsource.o: db/csvsource.cpp \
235 db/csvsource.h \
236 db/datacache.h \
237 db/common.h
238
239db/common.o: db/common.cpp \
240 ../library/timestring.h \
241 db/common.h \
242 db/datacache.h
243
244ui/tvkeyedit_gen.h: ui/tvkeyedit_gen.ui
245 $(UIC) ui/tvkeyedit_gen.ui -o $(INTERFACE_DECL_PATH)/ui/tvkeyedit_gen.h
246
247tvkeyedit_gen.h: ui/tvkeyedit_gen.ui
248 $(UIC) ui/tvkeyedit_gen.ui -o tvkeyedit_gen.h
249
250ui/tvkeyedit_gen.cpp: ui/tvkeyedit_gen.ui
251 $(UIC) ui/tvkeyedit_gen.ui -i tvkeyedit_gen.h -o ui/tvkeyedit_gen.cpp
252
253ui/tvkeyedit_gen.o: ui/tvkeyedit_gen.cpp \
254 ui/tvkeyedit_gen.h \
255 ui/tvkeyedit_gen.ui
256
257moc_tableviewer.o: moc_tableviewer.cpp \
258 tableviewer.h \
259 db/common.h \
260 ../library/fileselector.h \
261 ../library/filemanager.h \
262 ../library/applnk.h
263
264ui/moc_commonwidgets.o: ui/moc_commonwidgets.cpp \
265 ui/commonwidgets.h
266
267ui/moc_tvbrowseview.o: ui/moc_tvbrowseview.cpp \
268 ui/tvbrowseview.h \
269 ui/../db/common.h
270
271ui/moc_tvlistview.o: ui/moc_tvlistview.cpp \
272 ui/tvlistview.h \
273 ui/../db/common.h
274
275ui/moc_tvfilterview.o: ui/moc_tvfilterview.cpp \
276 ui/tvfilterview.h \
277 ui/filterkeyentry.h \
278 ui/../db/common.h
279
280ui/moc_tveditview.o: ui/moc_tveditview.cpp \
281 ui/tveditview.h \
282 ui/../db/common.h
283
284ui/moc_browsekeyentry.o: ui/moc_browsekeyentry.cpp \
285 ui/browsekeyentry.h \
286 ui/../db/common.h
287
288ui/moc_filterkeyentry.o: ui/moc_filterkeyentry.cpp \
289 ui/filterkeyentry.h \
290 ui/../db/common.h
291
292ui/moc_tvkeyedit.o: ui/moc_tvkeyedit.cpp \
293 ui/tvkeyedit.h \
294 tvkeyedit_gen.h \
295 ui/../db/common.h
296
297ui/moc_tvkeyedit_gen.o: ui/moc_tvkeyedit_gen.cpp \
298 ui/tvkeyedit_gen.h
299
300moc_tableviewer.cpp: tableviewer.h
301 $(MOC) tableviewer.h -o moc_tableviewer.cpp
302
303ui/moc_commonwidgets.cpp: ui/commonwidgets.h
304 $(MOC) ui/commonwidgets.h -o ui/moc_commonwidgets.cpp
305
306ui/moc_tvbrowseview.cpp: ui/tvbrowseview.h
307 $(MOC) ui/tvbrowseview.h -o ui/moc_tvbrowseview.cpp
308
309ui/moc_tvlistview.cpp: ui/tvlistview.h
310 $(MOC) ui/tvlistview.h -o ui/moc_tvlistview.cpp
311
312ui/moc_tvfilterview.cpp: ui/tvfilterview.h
313 $(MOC) ui/tvfilterview.h -o ui/moc_tvfilterview.cpp
314
315ui/moc_tveditview.cpp: ui/tveditview.h
316 $(MOC) ui/tveditview.h -o ui/moc_tveditview.cpp
317
318ui/moc_browsekeyentry.cpp: ui/browsekeyentry.h
319 $(MOC) ui/browsekeyentry.h -o ui/moc_browsekeyentry.cpp
320
321ui/moc_filterkeyentry.cpp: ui/filterkeyentry.h
322 $(MOC) ui/filterkeyentry.h -o ui/moc_filterkeyentry.cpp
323
324ui/moc_tvkeyedit.cpp: ui/tvkeyedit.h
325 $(MOC) ui/tvkeyedit.h -o ui/moc_tvkeyedit.cpp
326
327ui/moc_tvkeyedit_gen.cpp: ui/tvkeyedit_gen.h
328 $(MOC) ui/tvkeyedit_gen.h -o ui/moc_tvkeyedit_gen.cpp
329
330
diff --git a/noncore/apps/tableviewer/README b/noncore/apps/tableviewer/README
new file mode 100644
index 0000000..cd479e5
--- a/dev/null
+++ b/noncore/apps/tableviewer/README
@@ -0,0 +1,29 @@
1Table Viewer;
2
3This application is still in development, very buggy and leaks memory like
4a sieve. There are still a few major features/design work to be done. Once
5The app has settled (i.e. implementation of initial design completed) the
6focus will switch from features to making the code worthy of Trolltech.
7This means finding all the memory leaks, possibly some restructoring of code
8for future maintainability and ensuring that the code is readable
9(reasonable names for classes and vars.)
10
11For convenience there is a db.xml file included that is generated from the
12CIA World fact book, 11-May-01. The current version of this file should always work with the current version of the tableviewer application
13
14Major design work yet to be completed
15
16* ensure that only reasonable controls are enabled.
17* implement delete item & delete keys
18* loading dialogs
19* filterview -> dialog
20* only do sensible things if no keys set. includes;
21 No list view,
22 No filter view,
23 No edit item.
24* Tool bar in both 'views'
25* only build widgets as needed
26* click on scrollview to change key type, (remove key dialog)
27* fix navigate buttons
28
29This README will also be removed once the major design work is done.
diff --git a/noncore/apps/tableviewer/browsekeyentry.cpp b/noncore/apps/tableviewer/browsekeyentry.cpp
new file mode 100644
index 0000000..04e7902
--- a/dev/null
+++ b/noncore/apps/tableviewer/browsekeyentry.cpp
@@ -0,0 +1,242 @@
1/**********************************************************************
2** Copyright (C) 2000 Trolltech AS. All rights reserved.
3**
4** This file is part of Qtopia Environment.
5**
6** This file may be distributed and/or modified under the terms of the
7** GNU General Public License version 2 as published by the Free Software
8** Foundation and appearing in the file LICENSE.GPL included in the
9** packaging of this file.
10**
11** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
12** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
13**
14** See http://www.trolltech.com/gpl/ for GPL licensing information.
15**
16** Contact info@trolltech.com if any conditions of this licensing are
17** not clear to you.
18**
19**********************************************************************/
20#include "browsekeyentry.h"
21
22#include <qtoolbutton.h>
23#include <qwidgetstack.h>
24#include <qlayout.h>
25#include <qlineedit.h>
26#include <qpushbutton.h>
27#include <qpopupmenu.h>
28#include <qhbox.h>
29#include <qdatetime.h>
30
31//#include <iostream.h>
32#include <qheader.h>
33// For qWarning(const char *)
34
35/*!
36 \class TVBrowseKeyEntry
37 \brief a Widget used enter keys into the TVBrowseViewWidget
38
39 The TVBrowseKeyEntry Widget provides the facility to enter
40 various key types to be search on in the table. The key can be changed
41 and the entry field will update to the correct sort of widget appropriately
42*/
43
44/*!
45 Constructs the widget
46*/
47TVBrowseKeyEntry::TVBrowseKeyEntry(QWidget *parent, const char *name, WFlags f)
48 : QWidget(parent, name, f)
49{
50 int stack_elem = 0;
51 QHBoxLayout *h_layout = new QHBoxLayout(this);
52
53 textKey = new QLineEdit(this, 0);
54
55 dateKey = new QHBox(this, 0);
56 dayKey = new QLineEdit(dateKey, 0);
57 monthKey = new QLineEdit(dateKey, 0);
58 yearKey = new QLineEdit(dateKey, 0);
59
60 timeKey = new QHBox(this, 0);
61 hourKey = new QLineEdit(timeKey, 0);
62 minuteKey = new QLineEdit(timeKey, 0);
63 secondKey = new QLineEdit(timeKey, 0);
64
65 resetButton = new QPushButton(this, "reset");
66 resetButton->setMinimumSize(QSize(50, 0));
67 resetButton->setText(tr("Reset"));
68
69 changeKeyButton = new QToolButton(this, "changekey");
70 // TODO The icon stuff.
71 changeKeyButton->setText(tr("key"));
72
73 totalKeys = 0;
74 ts = 0;
75 keyMenu = new QPopupMenu(this, "keymenu");
76
77 ws = new QWidgetStack(this, 0);
78 ws->addWidget(textKey, stack_elem++);
79 ws->addWidget(timeKey, stack_elem++);
80 ws->addWidget(dateKey, stack_elem++);
81
82 ws->raiseWidget(0);
83
84 // TODO connect slots and signals....
85 connect(changeKeyButton, SIGNAL(clicked()),
86 this, SLOT(changeKeyMenuSlot()));
87 connect(resetButton, SIGNAL(clicked()),
88 this, SLOT(resetKeySlot()));
89
90 connect(textKey, SIGNAL(textChanged(const QString&)),
91 this, SLOT(searchOnText()));
92
93 connect(dayKey, SIGNAL(textChanged(const QString&)),
94 this, SLOT(searchOnText()));
95 connect(monthKey, SIGNAL(textChanged(const QString&)),
96 this, SLOT(searchOnText()));
97 connect(yearKey, SIGNAL(textChanged(const QString&)),
98 this, SLOT(searchOnText()));
99
100 connect(secondKey, SIGNAL(textChanged(const QString&)),
101 this, SLOT(searchOnText()));
102 connect(minuteKey, SIGNAL(textChanged(const QString&)),
103 this, SLOT(searchOnText()));
104 connect(hourKey, SIGNAL(textChanged(const QString&)),
105 this, SLOT(searchOnText()));
106
107 h_layout->addWidget(ws);
108 h_layout->addWidget(resetButton);
109 h_layout->addWidget(changeKeyButton);
110}
111
112/*!
113 Destructs the widget
114*/
115TVBrowseKeyEntry::~TVBrowseKeyEntry()
116{
117}
118
119/*!
120 Changes which key the user intends to search on
121
122 \param id_param the index of the key future searches should be base on
123*/
124void TVBrowseKeyEntry::changeKeySlot(int id_param)
125{
126 emit sortChanged(id_param);
127 switch(ts->kRep->getKeyType(ts->current_column)) {
128 /* work out what to raise */
129 case kt_string:
130 case kt_int:
131 ws->raiseWidget(0);
132 break;
133 case kt_time:
134 ws->raiseWidget(1);
135 break;
136 case kt_date:
137 ws->raiseWidget(2);
138 break;
139 default:
140 return;
141 }
142}
143
144/*!
145 Opens the change key menu
146*/
147void TVBrowseKeyEntry::changeKeyMenuSlot()
148{
149 if(ts)
150 keyMenu->exec(changeKeyButton->mapToGlobal(QPoint(0,0)));
151}
152/*!
153 Blanks the key entry widget
154 \TODO the actual implmentation
155*/
156void TVBrowseKeyEntry::resetKeySlot() {
157 ;
158}
159
160void TVBrowseKeyEntry::setTableState(TableState *t) {
161 int i;
162 ts = t;
163
164 /* clear the old */
165 keyMenu->clear();
166
167 for (i = 0; i < t->kRep->getNumFields(); i++) {
168 keyMenu->insertItem(ts->kRep->getKeyName(i), this,
169 SLOT(changeKeySlot(int)), 0, i);
170 keyMenu->setItemParameter(i, i);
171 }
172}
173
174/*!
175 Searches on the current value of the key entry provided that the
176 current key is of type text WARNING, TODO fix memory leaks
177*/
178void TVBrowseKeyEntry::searchOnText()
179{
180 void *sendkey;
181 int tmp;
182
183 switch(ts->kRep->getKeyType(ts->current_column)) {
184 /* work out what to raise */
185 case kt_string:
186 sendkey = (void *)new QString(textKey->text());
187 break;
188 case kt_int: {
189 bool ok;
190 tmp = textKey->text().toInt(&ok);
191 sendkey = &tmp;
192 if (!ok)
193 return;
194 break;
195 }
196 case kt_time: {
197 bool ok;
198 int s,m,h;
199 s = secondKey->text().toInt(&ok);
200 if (!ok)
201 return;
202 m = minuteKey->text().toInt(&ok);
203 if (!ok)
204 return;
205 h = hourKey->text().toInt(&ok);
206 if (!ok)
207 return;
208 if(!QTime::isValid(h, m, s))
209 return;
210 sendkey = (void *) new QTime(h, m, s);
211 break;
212 }
213 case kt_date: {
214 bool ok;
215 int d,m,y;
216 d = dayKey->text().toInt(&ok);
217 if (!ok)
218 return;
219 m = monthKey->text().toInt(&ok);
220 if (!ok)
221 return;
222 y = yearKey->text().toInt(&ok);
223 if (!ok)
224 return;
225 if(!QDate::isValid(y, m, d))
226 return;
227 sendkey = (void *) new QDate(y, m, d);
228 break;
229 }
230 default:
231 qWarning("TVBrowseKeyEntry::searchOnText() "
232 "cannot work out data type");
233 return;
234 }
235 emit searchOnKey(ts->current_column, sendkey);
236}
237
238/*! \fn void TVBrowseKeyEntry::searchOnKey(int currentKeyId, void *v)
239
240 This signal indicates that a search on key index currentKeyId should be
241 done searching for the value v.
242*/
diff --git a/noncore/apps/tableviewer/db.xmlt b/noncore/apps/tableviewer/db.xmlt
new file mode 100644
index 0000000..d7734f6
--- a/dev/null
+++ b/noncore/apps/tableviewer/db.xmlt
@@ -0,0 +1,6279 @@
1<database name="World fact book">
2<header>
3<key name="Location" type="String">Location</key>
4<key name="Geographiccoordinates" type="String">Geographic coordinates</key>
5<key name="Area" type="Int">Area</key>
6<key name="Climate" type="String">Climate</key>
7<key name="Naturalresources" type="String">Natural resources</key>
8<key name="Population" type="Int">Population</key>
9<key name="Populationgrowthrate" type="String">Population growth rate</key>
10<key name="Sexratio" type="String">Sex ratio</key>
11<key name="Religions" type="String">Religions</key>
12<key name="Countryname" type="String">Country name</key>
13<key name="Capital" type="String">Capital</key>
14<key name="Flagdescription" type="String">Flag description</key>
15<key name="GDP" type="String">GDP</key>
16<key name="Industries" type="String">Industries</key>
17<key name="Exports" type="String">Exports</key>
18<key name="Imports" type="String">Imports</key>
19<key name="Currency" type="String">Currency</key>
20<key name="Airports" type="String">Airports</key>
21<key name="Illicitdrugs" type="String">Illicit drugs</key>
22</header>
23<record>
24<Location>Caribbean, island in the Caribbean Sea, north of Venezuela</Location>
25<Geographiccoordinates>12 30 N, 69 58 W</Geographiccoordinates>
26<Area>193</Area>
27<Climate>tropical marine; little seasonal temperature variation</Climate>
28<Naturalresources>NEGL; white sandy beaches</Naturalresources>
29<Population>69539</Population>
30<Populationgrowthrate>0.7% (2000 est.)</Populationgrowthrate>
31<Sexratio>
32at birth: 1.05 male(s)/female
33under 15 years: 1.08 male(s)/female
3415-64 years: 0.92 male(s)/female
3565 years and over: 0.71 male(s)/female
36total population: 0.93 male(s)/female (2000 est.)</Sexratio>
37<Religions>Roman Catholic 82%, Protestant 8%, Hindu, Muslim, Confucian, Jewish</Religions>
38<Countryname>Aruba </Countryname>
39<Capital>Oranjestad</Capital>
40<Flagdescription>blue, with two narrow, horizontal, yellow stripes across the lower portion and a red, four-pointed star outlined in white in the upper hoist-side corner</Flagdescription>
41<GDP>purchasing power parity - $1.6 billion (1998 est.)</GDP>
42<Industries>tourism, transshipment facilities, oil refining</Industries>
43<Exports>$1.17 billion (including oil reexports)(1998)</Exports>
44<Imports>$1.52 billion (1998)</Imports>
45<Currency>1 Aruban florin (Af.) = 100 cents</Currency>
46<Airports>2 (1999 est.)</Airports>
47<Illicitdrugs>drug-money-laundering center and transit point for narcotics bound for the US and Europe</Illicitdrugs>
48</record>
49<record>
50<Location>Caribbean, islands between the Caribbean Sea and the North Atlantic Ocean, east-southeast of Puerto Rico</Location>
51<Geographiccoordinates>17 03 N, 61 48 W</Geographiccoordinates>
52<Area>442</Area>
53<Climate>tropical marine; little seasonal temperature variation</Climate>
54<Naturalresources>NEGL; pleasant climate fosters tourism</Naturalresources>
55<Population>66422</Population>
56<Populationgrowthrate>0.73% (2000 est.)</Populationgrowthrate>
57<Sexratio>
58at birth: 1.05 male(s)/female
59under 15 years: 1.03 male(s)/female
6015-64 years: 0.99 male(s)/female
6165 years and over: 0.73 male(s)/female
62total population: 0.99 male(s)/female (2000 est.)</Sexratio>
63<Religions>Anglican (predominant), other Protestant, some Roman Catholic</Religions>
64<Countryname>Antigua and Barbuda </Countryname>
65<Capital>Saint John's</Capital>
66<Flagdescription>red, with an inverted isosceles triangle based on the top edge of the flag; the triangle contains three horizontal bands of black (top), light blue, and white, with a yellow rising sun in the black band</Flagdescription>
67<GDP>purchasing power parity - $524 million (1999 est.)</GDP>
68<Industries>tourism, construction, light manufacturing (clothing, alcohol, household appliances)</Industries>
69<Exports>$38 million (1998)</Exports>
70<Imports>$330 million (1998)</Imports>
71<Currency>1 East Caribbean dollar (EC$) = 100 cents</Currency>
72<Airports>3 (1999 est.)</Airports>
73<Illicitdrugs>considered a minor transshipment point for narcotics bound for the US and Europe; more significant as a drug-money-laundering center</Illicitdrugs>
74</record>
75<record>
76<Location>Southern Asia, north and west of Pakistan, east of Iran</Location>
77<Geographiccoordinates>33 00 N, 65 00 E</Geographiccoordinates>
78<Area>652000</Area>
79<Climate>arid to semiarid; cold winters and hot summers</Climate>
80<Naturalresources>natural gas, petroleum, coal, copper, chromite, talc, barites, sulfur, lead, zinc, iron ore, salt, precious and semiprecious stones</Naturalresources>
81<Population>25838797</Population>
82<Populationgrowthrate>3.54% (2000 est.)
83note: this rate reflects the continued return of refugees from Iran</Populationgrowthrate>
84<Sexratio>
85at birth: 1.05 male(s)/female
86under 15 years: 1.04 male(s)/female
8715-64 years: 1.08 male(s)/female
8865 years and over: 1.12 male(s)/female
89total population: 1.06 male(s)/female (2000 est.)</Sexratio>
90<Religions>Sunni Muslim 84%, Shi'a Muslim 15%, other 1%</Religions>
91<Countryname>Afghanistan </Countryname>
92<Capital>Kabul</Capital>
93<Flagdescription>three equal horizontal bands of green (top), white, and black with a gold emblem centered on the three bands; the emblem features a temple-like structure with Islamic inscriptions above and below, encircled by a wreath on the left and right and by a bolder Islamic inscription above, all of which are encircled by two crossed scimitars
94note: the Taliban uses a plain white flag</Flagdescription>
95<GDP>purchasing power parity - $21 billion (1999 est.)</GDP>
96<Industries>small-scale production of textiles, soap, furniture, shoes, fertilizer, and cement; handwoven carpets; natural gas, oil, coal, copper</Industries>
97<Exports>$80 million (does not include opium) (1996 est.)</Exports>
98<Imports>$150 million (1996 est.)</Imports>
99<Currency>1 afghani (AF) = 100 puls</Currency>
100<Airports>46 (1999 est.)</Airports>
101<Illicitdrugs>world's largest illicit opium producer, surpassing Burma (potential production in 1999 - 1,670 metric tons; cultivation in 1999 - 51,500 hectares, a 23% increase over 1998); a major source of hashish; increasing number of heroin-processing laboratories being set up in the country; major political factions in the country profit from drug trade</Illicitdrugs>
102</record>
103<record>
104<Location>Northern Africa, bordering the Mediterranean Sea, between Morocco and Tunisia</Location>
105<Geographiccoordinates>28 00 N, 3 00 E</Geographiccoordinates>
106<Area>2381740</Area>
107<Climate>arid to semiarid; mild, wet winters with hot, dry summers along coast; drier with cold winters and hot summers on high plateau; sirocco is a hot, dust/sand-laden wind especially common in summer</Climate>
108<Naturalresources>petroleum, natural gas, iron ore, phosphates, uranium, lead, zinc</Naturalresources>
109<Population>31193917</Population>
110<Populationgrowthrate>1.74% (2000 est.)</Populationgrowthrate>
111<Sexratio>
112at birth: 1.04 male(s)/female
113under 15 years: 1.04 male(s)/female
11415-64 years: 1.02 male(s)/female
11565 years and over: 0.86 male(s)/female
116total population: 1.02 male(s)/female (2000 est.)</Sexratio>
117<Religions>Sunni Muslim (state religion) 99%, Christian and Jewish 1%</Religions>
118<Countryname>Algeria </Countryname>
119<Capital>Algiers</Capital>
120<Flagdescription>two equal vertical bands of green (hoist side) and white with a red, five-pointed star within a red crescent; the crescent, star, and color green are traditional symbols of Islam (the state religion)</Flagdescription>
121<GDP>purchasing power parity - $147.6 billion (1999 est.)</GDP>
122<Industries>petroleum, natural gas, light industries, mining, electrical, petrochemical, food processing</Industries>
123<Exports>$13.7 billion (f.o.b., 1999 est.)</Exports>
124<Imports>$9.3 billion (f.o.b., 1999 est.)</Imports>
125<Currency>1 Algerian dinar (DA) = 100 centimes</Currency>
126<Airports>137 (1999 est.)</Airports>
127</record>
128<record>
129<Location>Southwestern Asia, bordering the Caspian Sea, between Iran and Russia</Location>
130<Geographiccoordinates>40 30 N, 47 30 E</Geographiccoordinates>
131<Area>86600</Area>
132<Climate>dry, semiarid steppe</Climate>
133<Naturalresources>petroleum, natural gas, iron ore, nonferrous metals, alumina</Naturalresources>
134<Population>7748163</Population>
135<Populationgrowthrate>0.27% (2000 est.)</Populationgrowthrate>
136<Sexratio>
137at birth: 1.05 male(s)/female
138under 15 years: 1.04 male(s)/female
13915-64 years: 0.95 male(s)/female
14065 years and over: 0.65 male(s)/female
141total population: 0.95 male(s)/female (2000 est.)</Sexratio>
142<Religions>Muslim 93.4%, Russian Orthodox 2.5%, Armenian Orthodox 2.3%, other 1.8% (1995 est.)
143note: religious affiliation is still nominal in Azerbaijan; percentages for actual practicing adherents are much lower</Religions>
144<Countryname>Azerbaijan </Countryname>
145<Capital>Baku (Baki)</Capital>
146<Flagdescription>three equal horizontal bands of blue (top), red, and green; a crescent and eight-pointed star in white are centered in red band</Flagdescription>
147<GDP>purchasing power parity - $14 billion (1999 est.)</GDP>
148<Industries>petroleum and natural gas, petroleum products, oilfield equipment; steel, iron ore, cement; chemicals and petrochemicals; textiles</Industries>
149<Exports>$885 million (f.o.b., 1999 est.)</Exports>
150<Imports>$1.62 billion (c.i.f., 1999 est.)</Imports>
151<Currency>1 manat = 100 gopiks</Currency>
152<Airports>69 (1996 est.)</Airports>
153<Illicitdrugs>limited illicit cultivation of cannabis and opium poppy, mostly for CIS consumption; limited government eradication program; transshipment point for opiates via Iran, Central Asia, and Russia to Western Europe</Illicitdrugs>
154</record>
155<record>
156<Location>Southeastern Europe, bordering the Adriatic Sea and Ionian Sea, between Greece and Serbia and Montenegro</Location>
157<Geographiccoordinates>41 00 N, 20 00 E</Geographiccoordinates>
158<Area>28748</Area>
159<Climate>mild temperate; cool, cloudy, wet winters; hot, clear, dry summers; interior is cooler and wetter</Climate>
160<Naturalresources>petroleum, natural gas, coal, chromium, copper, timber, nickel, hydropower</Naturalresources>
161<Population>3490435</Population>
162<Populationgrowthrate>0.26% (2000 est.)</Populationgrowthrate>
163<Sexratio>
164at birth: 1.08 male(s)/female
165under 15 years: 1.07 male(s)/female
16615-64 years: 0.93 male(s)/female
16765 years and over: 0.77 male(s)/female
168total population: 0.96 male(s)/female (2000 est.)</Sexratio>
169<Religions>Muslim 70%, Albanian Orthodox 20%, Roman Catholic 10%
170note: all mosques and churches were closed in 1967 and religious observances prohibited; in November 1990, Albania began allowing private religious practice</Religions>
171<Countryname>Albania </Countryname>
172<Capital>Tirana</Capital>
173<Flagdescription>red with a black two-headed eagle in the center</Flagdescription>
174<GDP>purchasing power parity - $5.6 billion (1999 est.)</GDP>
175<Industries>food processing, textiles and clothing; lumber, oil, cement, chemicals, mining, basic metals, hydropower</Industries>
176<Exports>$242 million (f.o.b., 1999 est.)</Exports>
177<Imports>$925 million (f.o.b., 1999 est.)</Imports>
178<Currency>1 lek (L) = 100 qintars</Currency>
179<Airports>10 (1999 est.)</Airports>
180<Illicitdrugs>increasingly active transshipment point for Southwest Asian opiates, hashish, and cannabis transiting the Balkan route and - to a far lesser extent - cocaine from South America destined for Western Europe; limited opium and cannabis production; ethnic Albanian narcotrafficking organizations active and rapidly expanding in Europe</Illicitdrugs>
181</record>
182<record>
183<Location>Southwestern Asia, east of Turkey</Location>
184<Geographiccoordinates>40 00 N, 45 00 E</Geographiccoordinates>
185<Area>29800</Area>
186<Climate>highland continental, hot summers, cold winters</Climate>
187<Naturalresources>small deposits of gold, copper, molybdenum, zinc, alumina</Naturalresources>
188<Population>3344336</Population>
189<Populationgrowthrate>-0.28% (2000 est.)</Populationgrowthrate>
190<Sexratio>
191at birth: 1.05 male(s)/female
192under 15 years: 1.04 male(s)/female
19315-64 years: 0.96 male(s)/female
19465 years and over: 0.71 male(s)/female
195total population: 0.95 male(s)/female (2000 est.)</Sexratio>
196<Religions>Armenian Orthodox 94%</Religions>
197<Countryname>Armenia </Countryname>
198<Capital>Yerevan</Capital>
199<Flagdescription>three equal horizontal bands of red (top), blue, and orange</Flagdescription>
200<GDP>purchasing power parity - $9.9 billion (1999 est.)</GDP>
201<Industries>metal-cutting machine tools, forging-pressing machines, electric motors, tires, knitted wear, hosiery, shoes, silk fabric, washing machines, chemicals, trucks, watches, instruments, microelectronics</Industries>
202<Exports>$240 million (1999 est.)</Exports>
203<Imports>$782 million (1999 est.)</Imports>
204<Currency>1 dram = 100 luma</Currency>
205<Airports>11 (1996 est.)</Airports>
206<Illicitdrugs>illicit cultivator of cannabis mostly for domestic consumption; increasingly used as a transshipment point for illicit drugs - mostly opium and hashish - to Western Europe and the US via Iran, Central Asia, and Russia</Illicitdrugs>
207</record>
208<record>
209<Location>Southwestern Europe, between France and Spain</Location>
210<Geographiccoordinates>42 30 N, 1 30 E</Geographiccoordinates>
211<Area>468</Area>
212<Climate>temperate; snowy, cold winters and warm, dry summers</Climate>
213<Naturalresources>hydropower, mineral water, timber, iron ore, lead</Naturalresources>
214<Population>66824</Population>
215<Populationgrowthrate>1.22% (2000 est.)</Populationgrowthrate>
216<Sexratio>
217at birth: 1.06 male(s)/female
218under 15 years: 1.1 male(s)/female
21915-64 years: 1.11 male(s)/female
22065 years and over: 1.01 male(s)/female
221total population: 1.1 male(s)/female (2000 est.)</Sexratio>
222<Religions>Roman Catholic (predominant)</Religions>
223<Countryname>Andorra </Countryname>
224<Capital>Andorra la Vella</Capital>
225<Flagdescription>three equal vertical bands of blue (hoist side), yellow, and red with the national coat of arms centered in the yellow band; the coat of arms features a quartered shield; similar to the flags of Chad and Romania, which do not have a national coat of arms in the center, and the flag of Moldova, which does bear a national emblem</Flagdescription>
226<GDP>purchasing power parity - $1.2 billion (1996 est.)</GDP>
227<Industries>tourism (particularly skiing), cattle raising, timber, tobacco, banking</Industries>
228<Exports>$58 million (f.o.b., 1998)</Exports>
229<Imports>$1.077 billion (c.i.f., 1998)</Imports>
230<Currency>1 French franc (F) = 100 centimes; 1 peseta (Pta) = 100 centimos; the French and Spanish currencies are used</Currency>
231<Airports>none</Airports>
232</record>
233<record>
234<Location>Southern Africa, bordering the South Atlantic Ocean, between Namibia and Democratic Republic of the Congo</Location>
235<Geographiccoordinates>12 30 S, 18 30 E</Geographiccoordinates>
236<Area>1246700</Area>
237<Climate>semiarid in south and along coast to Luanda; north has cool, dry season (May to October) and hot, rainy season (November to April)</Climate>
238<Naturalresources>petroleum, diamonds, iron ore, phosphates, copper, feldspar, gold, bauxite, uranium</Naturalresources>
239<Population>10145267</Population>
240<Populationgrowthrate>2.15% (2000 est.)</Populationgrowthrate>
241<Sexratio>
242at birth: 1.05 male(s)/female
243under 15 years: 1.02 male(s)/female
24415-64 years: 1.04 male(s)/female
24565 years and over: 0.84 male(s)/female
246total population: 1.02 male(s)/female (2000 est.)</Sexratio>
247<Religions>indigenous beliefs 47%, Roman Catholic 38%, Protestant 15% (1998 est.)</Religions>
248<Countryname>Angola </Countryname>
249<Capital>Luanda</Capital>
250<Flagdescription>two equal horizontal bands of red (top) and black with a centered yellow emblem consisting of a five-pointed star within half a cogwheel crossed by a machete (in the style of a hammer and sickle)</Flagdescription>
251<GDP>purchasing power parity - $11.6 billion (1999 est.)</GDP>
252<Industries>petroleum; diamonds, iron ore, phosphates, feldspar, bauxite, uranium, and gold; cement; basic metal products; fish processing; food processing; brewing; tobacco products; sugar; textiles</Industries>
253<Exports>$5 billion (f.o.b., 1999 est.)</Exports>
254<Imports>$3 billion (f.o.b., 1999 est.)</Imports>
255<Currency>1 kwanza (NKz) = 100 lwei</Currency>
256<Airports>249 (1999 est.)</Airports>
257<Illicitdrugs>increasingly used as a transshipment point for cocaine and heroin destined for Western Europe and other African states</Illicitdrugs>
258</record>
259<record>
260<Location>Oceania, group of islands in the South Pacific Ocean, about one-half of the way from Hawaii to New Zealand</Location>
261<Geographiccoordinates>14 20 S, 170 00 W</Geographiccoordinates>
262<Area>199</Area>
263<Climate>tropical marine, moderated by southeast trade winds; annual rainfall averages about 3 m; rainy season from November to April, dry season from May to October; little seasonal temperature variation</Climate>
264<Naturalresources>pumice, pumicite</Naturalresources>
265<Population>65446</Population>
266<Populationgrowthrate>2.53% (2000 est.)</Populationgrowthrate>
267<Sexratio>
268at birth: 1.06 male(s)/female
269under 15 years: 1.06 male(s)/female
27015-64 years: 0.99 male(s)/female
27165 years and over: 1.1 male(s)/female
272total population: 1.02 male(s)/female (2000 est.)</Sexratio>
273<Religions>Christian Congregationalist 50%, Roman Catholic 20%, Protestant and other 30%</Religions>
274<Countryname>American Samoa </Countryname>
275<Capital>Pago Pago</Capital>
276<Flagdescription>blue, with a white triangle edged in red that is based on the outer side and extends to the hoist side; a brown and white American bald eagle flying toward the hoist side is carrying two traditional Samoan symbols of authority, a staff and a war club</Flagdescription>
277<GDP>purchasing power parity - $150 million (1995 est.)</GDP>
278<Industries>tuna canneries (largely dependent on foreign fishing vessels), handicrafts</Industries>
279<Exports>$313 million (1996)</Exports>
280<Imports>$471 million (1996)</Imports>
281<Currency>1 US dollar (US$) = 100 cents</Currency>
282<Airports>4 (1999 est.)</Airports>
283</record>
284<record>
285<Location>Southern South America, bordering the South Atlantic Ocean, between Chile and Uruguay</Location>
286<Geographiccoordinates>34 00 S, 64 00 W</Geographiccoordinates>
287<Area>2766890</Area>
288<Climate>mostly temperate; arid in southeast; subantarctic in southwest</Climate>
289<Naturalresources>fertile plains of the pampas, lead, zinc, tin, copper, iron ore, manganese, petroleum, uranium</Naturalresources>
290<Population>36955182</Population>
291<Populationgrowthrate>1.16% (2000 est.)</Populationgrowthrate>
292<Sexratio>
293at birth: 1.05 male(s)/female
294under 15 years: 1.05 male(s)/female
29515-64 years: 1 male(s)/female
29665 years and over: 0.71 male(s)/female
297total population: 0.98 male(s)/female (2000 est.)</Sexratio>
298<Religions>nominally Roman Catholic 92% (less than 20% practicing), Protestant 2%, Jewish 2%, other 4%</Religions>
299<Countryname>Argentina </Countryname>
300<Capital>Buenos Aires</Capital>
301<Flagdescription>three equal horizontal bands of light blue (top), white, and light blue; centered in the white band is a radiant yellow sun with a human face known as the Sun of May</Flagdescription>
302<GDP>purchasing power parity - $367 billion (1999 est.)</GDP>
303<Industries>food processing, motor vehicles, consumer durables, textiles, chemicals and petrochemicals, printing, metallurgy, steel</Industries>
304<Exports>$23 billion (f.o.b., 1999 est.)</Exports>
305<Imports>$25 billion (c.i.f., 1999 est.)</Imports>
306<Currency>1 peso = 100 centavos</Currency>
307<Airports>1,359 (1999 est.)</Airports>
308<Illicitdrugs>increasing use as a transshipment country for cocaine headed for Europe and the US; increasing use as a money-laundering center; domestic consumption of drugs has skyrocketed</Illicitdrugs>
309</record>
310<record>
311<Location>Oceania, continent between the Indian Ocean and the South Pacific Ocean</Location>
312<Geographiccoordinates>27 00 S, 133 00 E</Geographiccoordinates>
313<Area>7686850</Area>
314<Climate>generally arid to semiarid; temperate in south and east; tropical in north</Climate>
315<Naturalresources>bauxite, coal, iron ore, copper, tin, silver, uranium, nickel, tungsten, mineral sands, lead, zinc, diamonds, natural gas, petroleum</Naturalresources>
316<Population>19169083</Population>
317<Populationgrowthrate>1.02% (2000 est.)</Populationgrowthrate>
318<Sexratio>
319at birth: 1.06 male(s)/female
320under 15 years: 1.05 male(s)/female
32115-64 years: 1.02 male(s)/female
32265 years and over: 0.78 male(s)/female
323total population: 0.99 male(s)/female (2000 est.)</Sexratio>
324<Religions>Anglican 26.1%, Roman Catholic 26%, other Christian 24.3%, non-Christian 11%</Religions>
325<Countryname>Australia </Countryname>
326<Capital>Canberra</Capital>
327<Flagdescription>blue with the flag of the UK in the upper hoist-side quadrant and a large seven-pointed star in the lower hoist-side quadrant; the remaining half is a representation of the Southern Cross constellation in white with one small five-pointed star and four, larger, seven-pointed stars</Flagdescription>
328<GDP>purchasing power parity - $416.2 billion (1999 est.)</GDP>
329<Industries>mining, industrial and transportation equipment, food processing, chemicals, steel</Industries>
330<Exports>$58 billion (f.o.b., 1999 est.)</Exports>
331<Imports>$67 billion (f.o.b., 1999 est.)</Imports>
332<Currency>1 Australian dollar ($A) = 100 cents</Currency>
333<Airports>408 (1999 est.)</Airports>
334<Illicitdrugs>Tasmania is one of the world's major suppliers of licit opiate products; government maintains strict controls over areas of opium poppy cultivation and output of poppy straw concentrate</Illicitdrugs>
335</record>
336<record>
337<Location>Southeastern Asia, islands in the Indian Ocean, northwest of Australia</Location>
338<Geographiccoordinates>12 14 S, 123 05 E</Geographiccoordinates>
339<Area>5</Area>
340<Climate>tropical</Climate>
341<Naturalresources>fish</Naturalresources>
342<Population></Population>
343<Countryname>Ashmore and Cartier Islands </Countryname>
344<Flagdescription>the flag of Australia is used</Flagdescription>
345</record>
346<record>
347<Location>Central Europe, north of Italy and Slovenia</Location>
348<Geographiccoordinates>47 20 N, 13 20 E</Geographiccoordinates>
349<Area>83858</Area>
350<Climate>temperate; continental, cloudy; cold winters with frequent rain in lowlands and snow in mountains; cool summers with occasional showers</Climate>
351<Naturalresources>iron ore, oil, timber, magnesite, lead, coal, lignite, copper, hydropower</Naturalresources>
352<Population>8131111</Population>
353<Populationgrowthrate>0.25% (2000 est.)</Populationgrowthrate>
354<Sexratio>
355at birth: 1.05 male(s)/female
356under 15 years: 1.05 male(s)/female
35715-64 years: 1.02 male(s)/female
35865 years and over: 0.61 male(s)/female
359total population: 0.95 male(s)/female (2000 est.)</Sexratio>
360<Religions>Roman Catholic 78%, Protestant 5%, Muslim and other 17%</Religions>
361<Countryname>Austria </Countryname>
362<Capital>Vienna</Capital>
363<Flagdescription>three equal horizontal bands of red (top), white, and red</Flagdescription>
364<GDP>purchasing power parity - $190.6 billion (1999 est.)</GDP>
365<Industries>construction, machinery, vehicles and parts, food, chemicals, lumber and wood processing, paper and paperboard, communications equipment, tourism (1997)</Industries>
366<Exports>$62.9 billion (1999 est.)</Exports>
367<Imports>$69.9 billion (1999 est.)</Imports>
368<Currency>1 Austrian schilling (AS) = 100 groschen</Currency>
369<Airports>55 (1999 est.)</Airports>
370<Illicitdrugs>transshipment point for Southwest Asian heroin and South American cocaine destined for Western Europe</Illicitdrugs>
371</record>
372<record>
373<Location>Caribbean, island in the Caribbean Sea, east of Puerto Rico</Location>
374<Geographiccoordinates>18 15 N, 63 10 W</Geographiccoordinates>
375<Area>91</Area>
376<Climate>tropical; moderated by northeast trade winds</Climate>
377<Naturalresources>salt, fish, lobster</Naturalresources>
378<Population>11797</Population>
379<Populationgrowthrate>2.93% (2000 est.)</Populationgrowthrate>
380<Sexratio>
381at birth: 1.03 male(s)/female
382under 15 years: 1.03 male(s)/female
38315-64 years: 1.05 male(s)/female
38465 years and over: 0.79 male(s)/female
385total population: 1.03 male(s)/female (2000 est.)</Sexratio>
386<Religions>Anglican 40%, Methodist 33%, Seventh-Day Adventist 7%, Baptist 5%, Roman Catholic 3%, other 12%</Religions>
387<Countryname>Anguilla </Countryname>
388<Capital>The Valley</Capital>
389<Flagdescription>blue, with the flag of the UK in the upper hoist-side quadrant and the Anguillan coat of arms centered in the outer half of the flag; the coat of arms depicts three orange dolphins in an interlocking circular design on a white background with blue wavy water below</Flagdescription>
390<GDP>purchasing power parity - $88 million (1998 est.)</GDP>
391<Industries>tourism, boat building, offshore financial services</Industries>
392<Exports>$4.5 million (1998)</Exports>
393<Imports>$57.6 million (1998)</Imports>
394<Currency>1 East Caribbean dollar (EC$) = 100 cents</Currency>
395<Airports>3 (1999 est.)</Airports>
396</record>
397<record>
398<Location>continent mostly south of the Antarctic Circle</Location>
399<Geographiccoordinates>90 00 S, 0 00 E</Geographiccoordinates>
400<Area>14000000</Area>
401<Climate>severe low temperatures vary with latitude, elevation, and distance from the ocean; East Antarctica is colder than West Antarctica because of its higher elevation; Antarctic Peninsula has the most moderate climate; higher temperatures occur in January along the coast and average slightly below freezing</Climate>
402<Naturalresources>none presently exploited; iron ore, chromium, copper, gold, nickel, platinum and other minerals, and coal and hydrocarbons have been found in small, uncommercial quantities</Naturalresources>
403<Population></Population>
404<Countryname>Antarctica </Countryname>
405<Airports>18
406note: 27 stations, operated by 16 national governments party to the Antarctic Treaty, have landing facilities for either helicopters and/or fixed-wing aircraft; commercial enterprises operate two additional air facilities; helicopter pads are available at 27 stations; runways at 15 locations are gravel, sea-ice, blue-ice, or compacted snow suitable for landing wheeled, fixed-wing aircraft; of these, 1 is greater than 3 km in length, 6 are between 2 km and 3 km in length, 3 are between 1 km and 2 km in length, 3 are less than 1 km in length, and 2 are of unknown length; snow surface skiways, limited to use by ski-equipped, fixed-wing aircraft,are available at another 15 locations; of these, 4 are greater than 3 km in length, 3 are between 2 km and 3 km in length, 2 are between 1 km and 2 km in length, 2 are less than 1 km in length, and 4 are of unknown length; airports generally subject to severe restrictions and limitations resulting from extreme seasonal and geographic conditions; airports do not meet ICAO standards; advance approval from the respective governmental or nongovernmental operating organization required for landing (1999 est.)</Airports>
407</record>
408<record>
409<Location>Middle East, archipelago in the Persian Gulf, east of Saudi Arabia</Location>
410<Geographiccoordinates>26 00 N, 50 33 E</Geographiccoordinates>
411<Area>620</Area>
412<Climate>arid; mild, pleasant winters; very hot, humid summers</Climate>
413<Naturalresources>oil, associated and nonassociated natural gas, fish</Naturalresources>
414<Population>634137</Population>
415<Populationgrowthrate>1.78% (2000 est.)</Populationgrowthrate>
416<Sexratio>
417at birth: 1.03 male(s)/female
418under 15 years: 1.03 male(s)/female
41915-64 years: 1.46 male(s)/female
42065 years and over: 1.04 male(s)/female
421total population: 1.3 male(s)/female (2000 est.)</Sexratio>
422<Religions>Shi'a Muslim 75%, Sunni Muslim 25%</Religions>
423<Countryname>Bahrain </Countryname>
424<Capital>Manama</Capital>
425<Flagdescription>red with a white serrated band (eight white points) on the hoist side</Flagdescription>
426<GDP>purchasing power parity - $8.6 billion (1999 est.)</GDP>
427<Industries>petroleum processing and refining, aluminum smelting, offshore banking, ship repairing; tourism</Industries>
428<Exports>$3.3 billion (f.o.b., 1998)</Exports>
429<Imports>$3.5 billion (f.o.b., 1998)</Imports>
430<Currency>1 Bahraini dinar (BD) = 1,000 fils</Currency>
431<Airports>3 (1999 est.)</Airports>
432</record>
433<record>
434<Location>Caribbean, island between the Caribbean Sea and the North Atlantic Ocean, northeast of Venezuela</Location>
435<Geographiccoordinates>13 10 N, 59 32 W</Geographiccoordinates>
436<Area>430</Area>
437<Climate>tropical; rainy season (June to October)</Climate>
438<Naturalresources>petroleum, fish, natural gas</Naturalresources>
439<Population>274540</Population>
440<Populationgrowthrate>0.55% (2000 est.)</Populationgrowthrate>
441<Sexratio>
442at birth: 1.03 male(s)/female
443under 15 years: 1.02 male(s)/female
44415-64 years: 0.95 male(s)/female
44565 years and over: 0.63 male(s)/female
446total population: 0.93 male(s)/female (2000 est.)</Sexratio>
447<Religions>Protestant 67% (Anglican 40%, Pentecostal 8%, Methodist 7%, other 12%), Roman Catholic 4%, none 17%, other 12%</Religions>
448<Countryname>Barbados </Countryname>
449<Capital>Bridgetown</Capital>
450<Flagdescription>three equal vertical bands of blue (hoist side), gold, and blue with the head of a black trident centered on the gold band; the trident head represents independence and a break with the past (the colonial coat of arms contained a complete trident)</Flagdescription>
451<GDP>purchasing power parity - $2.9 billion (1998 est.)</GDP>
452<Industries>tourism, sugar, light manufacturing, component assembly for export</Industries>
453<Exports>$211.2 million (1998)</Exports>
454<Imports>$1.01 billion (1998)</Imports>
455<Currency>1 Barbadian dollar (Bds$) = 100 cents</Currency>
456<Airports>1 (1999 est.)</Airports>
457<Illicitdrugs>one of many Caribbean transshipment points for narcotics bound for the US and Europe</Illicitdrugs>
458</record>
459<record>
460<Location>Southern Africa, north of South Africa</Location>
461<Geographiccoordinates>22 00 S, 24 00 E</Geographiccoordinates>
462<Area>600370</Area>
463<Climate>semiarid; warm winters and hot summers</Climate>
464<Naturalresources>diamonds, copper, nickel, salt, soda ash, potash, coal, iron ore, silver</Naturalresources>
465<Population>1576470</Population>
466<Populationgrowthrate>0.76% (2000 est.)</Populationgrowthrate>
467<Sexratio>
468at birth: 1.03 male(s)/female
469under 15 years: 1.01 male(s)/female
47015-64 years: 0.92 male(s)/female
47165 years and over: 0.69 male(s)/female
472total population: 0.94 male(s)/female (2000 est.)</Sexratio>
473<Religions>indigenous beliefs 50%, Christian 50%</Religions>
474<Countryname>Botswana </Countryname>
475<Capital>Gaborone</Capital>
476<Flagdescription>light blue with a horizontal white-edged black stripe in the center</Flagdescription>
477<GDP>purchasing power parity - $5.7 billion (1999 est.)</GDP>
478<Industries>diamonds, copper, nickel, coal, salt, soda ash, potash; livestock processing</Industries>
479<Exports>$2.36 billion (f.o.b., 1999 est.)</Exports>
480<Imports>$2.05 billion (f.o.b., 1999 est.)</Imports>
481<Currency>1 pula (P) = 100 thebe</Currency>
482<Airports>92 (1999 est.)</Airports>
483</record>
484<record>
485<Location>North America, group of islands in the North Atlantic Ocean, east of North Carolina (US)</Location>
486<Geographiccoordinates>32 20 N, 64 45 W</Geographiccoordinates>
487<Area>58</Area>
488<Climate>subtropical; mild, humid; gales, strong winds common in winter</Climate>
489<Naturalresources>limestone, pleasant climate fostering tourism</Naturalresources>
490<Population>62997</Population>
491<Populationgrowthrate>0.75% (2000 est.)</Populationgrowthrate>
492<Sexratio>
493at birth: 1.05 male(s)/female
494under 15 years: 0.98 male(s)/female
49515-64 years: 0.98 male(s)/female
49665 years and over: 0.76 male(s)/female
497total population: 0.95 male(s)/female (2000 est.)</Sexratio>
498<Religions>non-Anglican Protestant 39%, Anglican 27%, Roman Catholic 15%, other 19%</Religions>
499<Countryname>Bermuda </Countryname>
500<Capital>Hamilton</Capital>
501<Flagdescription>red, with the flag of the UK in the upper hoist-side quadrant and the Bermudian coat of arms (white and blue shield with a red lion holding a scrolled shield showing the sinking of the ship Sea Venture off Bermuda in 1609) centered on the outer half of the flag</Flagdescription>
502<GDP>purchasing power parity - $2 billion (1999 est.)</GDP>
503<Industries>tourism, finance, insurance, structural concrete products, paints, perfumes, pharmaceuticals, ship repairing</Industries>
504<Exports>$32 million (1998 est.)</Exports>
505<Imports>$624 million (1998 est.)</Imports>
506<Currency>1 Bermudian dollar (Bd$) = 100 cents</Currency>
507<Airports>1 (1999 est.)</Airports>
508</record>
509<record>
510<Location>Western Europe, bordering the North Sea, between France and the Netherlands</Location>
511<Geographiccoordinates>50 50 N, 4 00 E</Geographiccoordinates>
512<Area>30510</Area>
513<Climate>temperate; mild winters, cool summers; rainy, humid, cloudy</Climate>
514<Naturalresources>coal, natural gas</Naturalresources>
515<Population>10241506</Population>
516<Populationgrowthrate>0.18% (2000 est.)</Populationgrowthrate>
517<Sexratio>
518at birth: 1.05 male(s)/female
519under 15 years: 1.05 male(s)/female
52015-64 years: 1.02 male(s)/female
52165 years and over: 0.69 male(s)/female
522total population: 0.96 male(s)/female (2000 est.)</Sexratio>
523<Religions>Roman Catholic 75%, Protestant or other 25%</Religions>
524<Countryname>Belgium </Countryname>
525<Capital>Brussels</Capital>
526<Flagdescription>three equal vertical bands of black (hoist side), yellow, and red; the design was based on the flag of France</Flagdescription>
527<GDP>purchasing power parity - $243.4 billion (1999 est.)</GDP>
528<Industries>engineering and metal products, motor vehicle assembly, processed food and beverages, chemicals, basic metals, textiles, glass, petroleum, coal</Industries>
529<Exports>$187.3 billion (f.o.b., 1999)</Exports>
530<Imports>$172.8 billion (f.o.b., 1999)</Imports>
531<Currency>1 Belgian franc (BF) = 100 centimes</Currency>
532<Airports>42 (1999 est.)</Airports>
533<Illicitdrugs>source of precursor chemicals for South American cocaine processors; transshipment point for cocaine, heroin, hashish, and marijuana entering Western Europe</Illicitdrugs>
534</record>
535<record>
536<Location>Caribbean, chain of islands in the North Atlantic Ocean, southeast of Florida</Location>
537<Geographiccoordinates>24 15 N, 76 00 W</Geographiccoordinates>
538<Area>13940</Area>
539<Climate>tropical marine; moderated by warm waters of Gulf Stream</Climate>
540<Naturalresources>salt, aragonite, timber</Naturalresources>
541<Population>294982</Population>
542<Populationgrowthrate>1.01% (2000 est.)</Populationgrowthrate>
543<Sexratio>
544at birth: 1.02 male(s)/female
545under 15 years: 1.02 male(s)/female
54615-64 years: 0.96 male(s)/female
54765 years and over: 0.72 male(s)/female
548total population: 0.96 male(s)/female (2000 est.)</Sexratio>
549<Religions>Baptist 32%, Anglican 20%, Roman Catholic 19%, Methodist 6%, Church of God 6%, other Protestant 12%, none or unknown 3%, other 2%</Religions>
550<Countryname>The Bahamas </Countryname>
551<Capital>Nassau</Capital>
552<Flagdescription>three equal horizontal bands of aquamarine (top), gold, and aquamarine, with a black equilateral triangle based on the hoist side</Flagdescription>
553<GDP>purchasing power parity - $5.58 billion (1998 est.)</GDP>
554<Industries>tourism, banking, cement, oil refining and transshipment, salt, rum, aragonite, pharmaceuticals, spiral-welded steel pipe</Industries>
555<Exports>$362.8 million (1998)</Exports>
556<Imports>$1.74 billion (1998)</Imports>
557<Currency>1 Bahamian dollar (B$) = 100 cents</Currency>
558<Airports>62 (1999 est.)</Airports>
559<Illicitdrugs>transshipment point for cocaine and marijuana bound for US and Europe; banking industry vulnerable to money laundering</Illicitdrugs>
560</record>
561<record>
562<Location>Southern Asia, bordering the Bay of Bengal, between Burma and India</Location>
563<Geographiccoordinates>24 00 N, 90 00 E</Geographiccoordinates>
564<Area>144000</Area>
565<Climate>tropical; cool, dry winter (October to March); hot, humid summer (March to June); cool, rainy monsoon (June to October)</Climate>
566<Naturalresources>natural gas, arable land, timber</Naturalresources>
567<Population>129194224</Population>
568<Populationgrowthrate>1.59% (2000 est.)</Populationgrowthrate>
569<Sexratio>
570at birth: 1.06 male(s)/female
571under 15 years: 1.05 male(s)/female
57215-64 years: 1.05 male(s)/female
57365 years and over: 1.19 male(s)/female
574total population: 1.05 male(s)/female (2000 est.)</Sexratio>
575<Religions>Muslim 88.3%, Hindu 10.5%, other 1.2%</Religions>
576<Countryname>Bangladesh </Countryname>
577<Capital>Dhaka</Capital>
578<Flagdescription>green with a large red disk slightly to the hoist side of center; the red sun of freedom represents the blood shed to achieve independence; the green field symbolizes the lush countryside, and secondarily, the traditional color of Islam</Flagdescription>
579<GDP>purchasing power parity - $187 billion (1999 est.)</GDP>
580<Industries>cotton textiles, jute, garments, tea processing, paper newsprint, cement, chemical fertilizer, light engineering, sugar</Industries>
581<Exports>$5.1 billion (1998)</Exports>
582<Imports>$8.01 billion (1998)</Imports>
583<Currency>1 taka (Tk) = 100 poisha</Currency>
584<Airports>16 (1999 est.)</Airports>
585<Illicitdrugs>transit country for illegal drugs produced in neighboring countries</Illicitdrugs>
586</record>
587<record>
588<Location>Middle America, bordering the Caribbean Sea, between Guatemala and Mexico</Location>
589<Geographiccoordinates>17 15 N, 88 45 W</Geographiccoordinates>
590<Area>22960</Area>
591<Climate>tropical; very hot and humid; rainy season (May to February)</Climate>
592<Naturalresources>arable land potential, timber, fish, hydropower</Naturalresources>
593<Population>249183</Population>
594<Populationgrowthrate>2.75% (2000 est.)</Populationgrowthrate>
595<Sexratio>
596at birth: 1.05 male(s)/female
597under 15 years: 1.04 male(s)/female
59815-64 years: 1.03 male(s)/female
59965 years and over: 0.95 male(s)/female
600total population: 1.03 male(s)/female (2000 est.)</Sexratio>
601<Religions>Roman Catholic 62%, Protestant 30% (Anglican 12%, Methodist 6%, Mennonite 4%, Seventh-Day Adventist 3%, Pentecostal 2%, Jehovah's Witnesses 1%, other 2%), none 2%, other 6% (1980)</Religions>
602<Countryname>Belize </Countryname>
603<Capital>Belmopan</Capital>
604<Flagdescription>blue with a narrow red stripe along the top and the bottom edges; centered is a large white disk bearing the coat of arms; the coat of arms features a shield flanked by two workers in front of a mahogany tree with the related motto SUB UMBRA FLOREO (I Flourish in the Shade) on a scroll at the bottom, all encircled by a green garland</Flagdescription>
605<GDP>purchasing power parity - $740 million (1999 est.)</GDP>
606<Industries>garment production, food processing, tourism, construction</Industries>
607<Exports>$150 million (f.o.b., 1998)</Exports>
608<Imports>$320 million (c.i.f., 1998)</Imports>
609<Currency>1 Belizean dollar (Bz$) = 100 cents</Currency>
610<Airports>44 (1999 est.)</Airports>
611<Illicitdrugs>transshipment point for cocaine; small-scale illicit producer of cannabis for the international drug trade; minor money-laundering center</Illicitdrugs>
612</record>
613<record>
614<Location>Southeastern Europe, bordering the Adriatic Sea and Croatia</Location>
615<Geographiccoordinates>44 00 N, 18 00 E</Geographiccoordinates>
616<Area>51129</Area>
617<Climate>hot summers and cold winters; areas of high elevation have short, cool summers and long, severe winters; mild, rainy winters along coast</Climate>
618<Naturalresources>coal, iron, bauxite, manganese, forests, copper, chromium, lead, zinc, hydropower</Naturalresources>
619<Population>3835777</Population>
620<Populationgrowthrate>3.1% (2000 est.)</Populationgrowthrate>
621<Sexratio>
622at birth: 1.07 male(s)/female
623under 15 years: 1.06 male(s)/female
62415-64 years: 1.06 male(s)/female
62565 years and over: 0.73 male(s)/female
626total population: 1.03 male(s)/female (2000 est.)</Sexratio>
627<Religions>Muslim 40%, Orthodox 31%, Roman Catholic 15%, Protestant 4%, other 10%</Religions>
628<Countryname>Bosnia and Herzegovina </Countryname>
629<Capital>Sarajevo</Capital>
630<Flagdescription>a wide medium blue vertical band on the fly side with a yellow isosceles triangle abutting the band and the top of the flag; the remainder of the flag is medium blue with seven full five-pointed white stars and two half stars top and bottom along the hypotenuse of the triangle</Flagdescription>
631<GDP>purchasing power parity - $6.2 billion (1999 est.)</GDP>
632<Industries>steel, coal, iron ore, lead, zinc, manganese, bauxite, vehicle assembly, textiles, tobacco products, wooden furniture, tank and aircraft assembly, domestic appliances, oil refining (much of capacity damaged or shut down) (1995)</Industries>
633<Exports>$450 million (1997 est.)</Exports>
634<Imports>$2.95 billion (1997 est.)</Imports>
635<Currency>1 convertible marka (KM) = 100 convertible pfenniga</Currency>
636<Airports>27 (1999 est.)</Airports>
637<Illicitdrugs>minor transit point for marijuana and opiate trafficking routes to Western Europe</Illicitdrugs>
638</record>
639<record>
640<Location>Central South America, southwest of Brazil</Location>
641<Geographiccoordinates>17 00 S, 65 00 W</Geographiccoordinates>
642<Area>1098580</Area>
643<Climate>varies with altitude; humid and tropical to cold and semiarid</Climate>
644<Naturalresources>tin, natural gas, petroleum, zinc, tungsten, antimony, silver, iron, lead, gold, timber, hydropower</Naturalresources>
645<Population>8152620</Population>
646<Populationgrowthrate>1.83% (2000 est.)</Populationgrowthrate>
647<Sexratio>
648at birth: 1.05 male(s)/female
649under 15 years: 1.04 male(s)/female
65015-64 years: 0.96 male(s)/female
65165 years and over: 0.82 male(s)/female
652total population: 0.98 male(s)/female (2000 est.)</Sexratio>
653<Religions>Roman Catholic 95%, Protestant (Evangelical Methodist)</Religions>
654<Countryname>Bolivia </Countryname>
655<Capital>La Paz (seat of government); Sucre (legal capital and seat of judiciary)</Capital>
656<Flagdescription>three equal horizontal bands of red (top), yellow, and green with the coat of arms centered on the yellow band; similar to the flag of Ghana, which has a large black five-pointed star centered in the yellow band</Flagdescription>
657<GDP>purchasing power parity - $24.2 billion (1999 est.)</GDP>
658<Industries>mining, smelting, petroleum, food and beverages, tobacco, handicrafts, clothing</Industries>
659<Exports>$1.1 billion (f.o.b., 1999 est.)</Exports>
660<Imports>$1.6 billion (c.i.f., 1999 est.)</Imports>
661<Currency>1 boliviano ($B) = 100 centavos</Currency>
662<Airports>1,109 (1999 est.)</Airports>
663<Illicitdrugs>world's third-largest cultivator of coca (after Peru and Colombia) with an estimated 21,800 hectares under cultivation in 1999, a 45% decrease in overall cultivation of coca from 1998 levels; intermediate coca products and cocaine exported to or through Colombia, Brazil, Argentina, and Chile to the US and other international drug markets; alternative crop program aims to reduce illicit coca cultivation</Illicitdrugs>
664</record>
665<record>
666<Location>Southeastern Asia, bordering the Andaman Sea and the Bay of Bengal, between Bangladesh and Thailand</Location>
667<Geographiccoordinates>22 00 N, 98 00 E</Geographiccoordinates>
668<Area>678500</Area>
669<Climate>tropical monsoon; cloudy, rainy, hot, humid summers (southwest monsoon, June to September); less cloudy, scant rainfall, mild temperatures, lower humidity during winter (northeast monsoon, December to April)</Climate>
670<Naturalresources>petroleum, timber, tin, antimony, zinc, copper, tungsten, lead, coal, some marble, limestone, precious stones, natural gas, hydropower</Naturalresources>
671<Population>41734853</Population>
672<Populationgrowthrate>0.64% (2000 est.)</Populationgrowthrate>
673<Sexratio>
674at birth: 1.06 male(s)/female
675under 15 years: 1.04 male(s)/female
67615-64 years: 0.99 male(s)/female
67765 years and over: 0.81 male(s)/female
678total population: 0.99 male(s)/female (2000 est.)</Sexratio>
679<Religions>Buddhist 89%, Christian 4% (Baptist 3%, Roman Catholic 1%), Muslim 4%, animist 1%, other 2%</Religions>
680<Countryname>Burma </Countryname>
681<Capital>Rangoon (regime refers to the capital as Yangon)</Capital>
682<Flagdescription>red with a blue rectangle in the upper hoist-side corner bearing, all in white, 14 five-pointed stars encircling a cogwheel containing a stalk of rice; the 14 stars represent the 14 administrative divisions</Flagdescription>
683<GDP>purchasing power parity - $59.4 billion (1999 est.)</GDP>
684<Industries>agricultural processing; textiles and footwear; wood and wood products; copper, tin, tungsten, iron; construction materials; pharmaceuticals; fertilizer</Industries>
685<Exports>$1.2 billion (1998)</Exports>
686<Imports>$2.5 billion (1998)</Imports>
687<Currency>1 kyat (K) = 100 pyas</Currency>
688<Airports>80 (1999 est.)</Airports>
689<Illicitdrugs>world's second largest producer of illicit opium, after Afghanistan (potential production in 1999 - 1,090 metric tons, down 38% due to drought; cultivation in 1999 - 89,500 hectares, a 31% decline from 1998); surrender of drug warlord KHUN SA's Mong Tai Army in January 1996 was hailed by Rangoon as a major counternarcotics success, but lack of government will and ability to take on major narcotrafficking groups and lack of serious commitment against money laundering continues to hinder the overall antidrug effort; becoming a major source of methamphetamines for regional consumption</Illicitdrugs>
690</record>
691<record>
692<Location>Western Africa, bordering the North Atlantic Ocean, between Nigeria and Togo</Location>
693<Geographiccoordinates>9 30 N, 2 15 E</Geographiccoordinates>
694<Area>112620</Area>
695<Climate>tropical; hot, humid in south; semiarid in north</Climate>
696<Naturalresources>small offshore oil deposits, limestone, marble, timber</Naturalresources>
697<Population>6395919</Population>
698<Populationgrowthrate>3.03% (2000 est.)</Populationgrowthrate>
699<Sexratio>
700at birth: 1.03 male(s)/female
701under 15 years: 1.02 male(s)/female
70215-64 years: 0.93 male(s)/female
70365 years and over: 0.76 male(s)/female
704total population: 0.97 male(s)/female (2000 est.)</Sexratio>
705<Religions>indigenous beliefs 70%, Muslim 15%, Christian 15%</Religions>
706<Countryname>Benin </Countryname>
707<Capital>Porto-Novo is the official capital; Cotonou is the seat of government</Capital>
708<Flagdescription>two equal horizontal bands of yellow (top) and red with a vertical green band on the hoist side</Flagdescription>
709<GDP>purchasing power parity - $8.1 billion (1999 est.)</GDP>
710<Industries>textiles, cigarettes; beverages, food; construction materials, petroleum</Industries>
711<Exports>$396 million (f.o.b., 1999)</Exports>
712<Imports>$566 million (f.o.b., 1999)</Imports>
713<Currency>1 Communaute Financiere Africaine franc (CFAF) = 100 centimes</Currency>
714<Airports>5 (1999 est.)</Airports>
715<Illicitdrugs>transshipment point for narcotics associated with Nigerian trafficking organizations and most commonly destined for Western Europe and the US</Illicitdrugs>
716</record>
717<record>
718<Location>Eastern Europe, east of Poland</Location>
719<Geographiccoordinates>53 00 N, 28 00 E</Geographiccoordinates>
720<Area>207600</Area>
721<Climate>cold winters, cool and moist summers; transitional between continental and maritime</Climate>
722<Naturalresources>forests, peat deposits, small quantities of oil and natural gas</Naturalresources>
723<Population>10366719</Population>
724<Populationgrowthrate>-0.17% (2000 est.)</Populationgrowthrate>
725<Sexratio>
726at birth: 1.05 male(s)/female
727under 15 years: 1.04 male(s)/female
72815-64 years: 0.94 male(s)/female
72965 years and over: 0.49 male(s)/female
730total population: 0.88 male(s)/female (2000 est.)</Sexratio>
731<Religions>Eastern Orthodox 80%, other (including Roman Catholic, Protestant, Jewish, and Muslim) 20% (1997 est.)</Religions>
732<Countryname>Belarus </Countryname>
733<Capital>Minsk</Capital>
734<Flagdescription>red horizontal band (top) and green horizontal band one-half the width of the red band; a white vertical stripe on the hoist side bears the Belarusian national ornament in red</Flagdescription>
735<GDP>purchasing power parity - $55.2 billion (1999 est.)</GDP>
736<Industries>metal-cutting machine tools, tractors, trucks, earth movers, motorcycles, TV sets, chemical fibers, fertilizer, textiles, radios, refrigerators</Industries>
737<Exports>$6 billion (f.o.b., 1999)</Exports>
738<Imports>$6.4 billion (c.i.f., 1999)</Imports>
739<Currency>Belarusian rubel (BR)</Currency>
740<Airports>118 (1996 est.)</Airports>
741<Illicitdrugs>limited cultivation of opium poppy and cannabis, mostly for the domestic market; transshipment point for illicit drugs to and via Russia, and to the Baltics and Western Europe</Illicitdrugs>
742</record>
743<record>
744<Location>Oceania, group of islands in the South Pacific Ocean, east of Papua New Guinea</Location>
745<Geographiccoordinates>8 00 S, 159 00 E</Geographiccoordinates>
746<Area>28450</Area>
747<Climate>tropical monsoon; few extremes of temperature and weather</Climate>
748<Naturalresources>fish, forests, gold, bauxite, phosphates, lead, zinc, nickel</Naturalresources>
749<Population>466194</Population>
750<Populationgrowthrate>3.04% (2000 est.)</Populationgrowthrate>
751<Sexratio>
752at birth: 1.05 male(s)/female
753under 15 years: 1.04 male(s)/female
75415-64 years: 1.03 male(s)/female
75565 years and over: 0.97 male(s)/female
756total population: 1.03 male(s)/female (2000 est.)</Sexratio>
757<Religions>Anglican 34%, Roman Catholic 19%, Baptist 17%, United (Methodist/Presbyterian) 11%, Seventh-Day Adventist 10%, other Protestant 5%, indigenous beliefs 4%</Religions>
758<Countryname>Solomon Islands </Countryname>
759<Capital>Honiara</Capital>
760<Flagdescription>divided diagonally by a thin yellow stripe from the lower hoist-side corner; the upper triangle (hoist side) is blue with five white five-pointed stars arranged in an X pattern; the lower triangle is green</Flagdescription>
761<GDP>purchasing power parity - $1.21 billion (1999 est.)</GDP>
762<Industries>fish (tuna), mining, timber</Industries>
763<Exports>$142 million (f.o.b., 1998 est.)</Exports>
764<Imports>$160 million (c.i.f., 1998 est.)</Imports>
765<Currency>1 Solomon Islands dollar (SI$) = 100 cents</Currency>
766<Airports>33 (1999 est.)</Airports>
767</record>
768<record>
769<Location>Caribbean, island in the Caribbean Sea, about one-fourth of the way from Haiti to Jamaica</Location>
770<Geographiccoordinates>18 25 N, 75 02 W</Geographiccoordinates>
771<Area>5</Area>
772<Climate>marine, tropical</Climate>
773<Naturalresources>guano</Naturalresources>
774<Population></Population>
775<Countryname>Navassa Island </Countryname>
776<Flagdescription>the flag of the US is used</Flagdescription>
777</record>
778<record>
779<Location>Eastern South America, bordering the Atlantic Ocean</Location>
780<Geographiccoordinates>10 00 S, 55 00 W</Geographiccoordinates>
781<Area>8511965</Area>
782<Climate>mostly tropical, but temperate in south</Climate>
783<Naturalresources>bauxite, gold, iron ore, manganese, nickel, phosphates, platinum, tin, uranium, petroleum, hydropower, timber</Naturalresources>
784<Population>172860370</Population>
785<Populationgrowthrate>0.94% (2000 est.)</Populationgrowthrate>
786<Sexratio>
787at birth: 1.05 male(s)/female
788under 15 years: 1.04 male(s)/female
78915-64 years: 0.97 male(s)/female
79065 years and over: 0.68 male(s)/female
791total population: 0.97 male(s)/female (2000 est.)</Sexratio>
792<Religions>Roman Catholic (nominal) 80%</Religions>
793<Countryname>Brazil </Countryname>
794<Capital>Brasilia</Capital>
795<Flagdescription>green with a large yellow diamond in the center bearing a blue celestial globe with 27 white five-pointed stars (one for each state and the Federal District) arranged in the same pattern as the night sky over Brazil; the globe has a white equatorial band with the motto ORDEM E PROGRESSO (Order and Progress)</Flagdescription>
796<GDP>purchasing power parity - $1.057 trillion (1999 est.)</GDP>
797<Industries>textiles, shoes, chemicals, cement, lumber, iron ore, tin, steel, aircraft, motor vehicles and parts, other machinery and equipment</Industries>
798<Exports>$46.9 billion (f.o.b., 1999)</Exports>
799<Imports>$48.7 billion (f.o.b., 1999)</Imports>
800<Currency>1 real (R$) = 100 centavos</Currency>
801<Airports>3,277 (1999 est.)</Airports>
802<Illicitdrugs>limited illicit producer of cannabis, minor coca cultivation in the Amazon region, mostly used for domestic consumption; government has a large-scale eradication program to control cannabis; important transshipment country for Bolivian, Colombian, and Peruvian cocaine headed for the US and Europe; increasingly used by traffickers as a way station for narcotics air transshipments between Peru and Colombia; upsurge in drug-related violence and weapons smuggling</Illicitdrugs>
803</record>
804<record>
805<Location>Southern Africa, islands in the southern Mozambique Channel, about one-half of the way from Madagascar to Mozambique</Location>
806<Geographiccoordinates>21 30 S, 39 50 E</Geographiccoordinates>
807<Area>0</Area>
808<Climate>tropical</Climate>
809<Naturalresources>none</Naturalresources>
810<Population></Population>
811<Countryname>Bassas da India </Countryname>
812<Flagdescription>the flag of France is used</Flagdescription>
813</record>
814<record>
815<Location>Southern Asia, between China and India</Location>
816<Geographiccoordinates>27 30 N, 90 30 E</Geographiccoordinates>
817<Area>47000</Area>
818<Climate>varies; tropical in southern plains; cool winters and hot summers in central valleys; severe winters and cool summers in Himalayas</Climate>
819<Naturalresources>timber, hydropower, gypsum, calcium carbide</Naturalresources>
820<Population>2005222</Population>
821<Populationgrowthrate>2.19% (2000 est.)</Populationgrowthrate>
822<Sexratio>
823at birth: 1.05 male(s)/female
824under 15 years: 1.08 male(s)/female
82515-64 years: 1.06 male(s)/female
82665 years and over: 1.03 male(s)/female
827total population: 1.07 male(s)/female (2000 est.)</Sexratio>
828<Religions>Lamaistic Buddhist 75%, Indian- and Nepalese-influenced Hinduism 25%</Religions>
829<Countryname>Bhutan </Countryname>
830<Capital>Thimphu</Capital>
831<Flagdescription>divided diagonally from the lower hoist side corner; the upper triangle is yellow and the lower triangle is orange; centered along the dividing line is a large black and white dragon facing away from the hoist side</Flagdescription>
832<GDP>purchasing power parity - $2.1 billion (1999 est.)</GDP>
833<Industries>cement, wood products, processed fruits, alcoholic beverages, calcium carbide</Industries>
834<Exports>$111 million (f.o.b., 1998)</Exports>
835<Imports>$136 million (c.i.f., 1998)</Imports>
836<Currency>1 ngultrum (Nu) = 100 chetrum; note - Indian currency is also legal tender</Currency>
837<Airports>2 (1999 est.)</Airports>
838</record>
839<record>
840<Location>Southeastern Europe, bordering the Black Sea, between Romania and Turkey</Location>
841<Geographiccoordinates>43 00 N, 25 00 E</Geographiccoordinates>
842<Area>110910</Area>
843<Climate>temperate; cold, damp winters; hot, dry summers</Climate>
844<Naturalresources>bauxite, copper, lead, zinc, coal, timber, arable land</Naturalresources>
845<Population>7796694</Population>
846<Populationgrowthrate>-1.16% (2000 est.)</Populationgrowthrate>
847<Sexratio>
848at birth: 1.06 male(s)/female
849under 15 years: 1.05 male(s)/female
85015-64 years: 0.97 male(s)/female
85165 years and over: 0.74 male(s)/female
852total population: 0.94 male(s)/female (2000 est.)</Sexratio>
853<Religions>Bulgarian Orthodox 83.5%, Muslim 13%, Roman Catholic 1.5%, Jewish 0.8%, Uniate Catholic 0.2%, Protestant, Gregorian-Armenian, and other 1% (1998)</Religions>
854<Countryname>Bulgaria </Countryname>
855<Capital>Sofia</Capital>
856<Flagdescription>three equal horizontal bands of white (top), green, and red; the national emblem formerly on the hoist side of the white stripe has been removed - it contained a rampant lion within a wreath of wheat ears below a red five-pointed star and above a ribbon bearing the dates 681 (first Bulgarian state established) and 1944 (liberation from Nazi control)</Flagdescription>
857<GDP>purchasing power parity - $34.9 billion (1999 est.)</GDP>
858<Industries>machine building and metal working, food processing, chemicals, construction materials, ferrous and nonferrous metals, nuclear fuel</Industries>
859<Exports>$3.8 billion (f.o.b., 1999 est.)</Exports>
860<Imports>$5.3 billion (f.o.b., 1999 est.)</Imports>
861<Currency>1 lev (Lv) = 100 stotinki</Currency>
862<Airports>216 (1999 est.)</Airports>
863<Illicitdrugs>major European transshipment point for Southwest Asian heroin and, to a lesser degree, South American cocaine for the European market; limited producer of precursor chemicals</Illicitdrugs>
864</record>
865<record>
866<Location>Southern Africa, island in the South Atlantic Ocean, south-southwest of the Cape of Good Hope (South Africa)</Location>
867<Geographiccoordinates>54 26 S, 3 24 E</Geographiccoordinates>
868<Area>58</Area>
869<Climate>antarctic</Climate>
870<Naturalresources>none</Naturalresources>
871<Population></Population>
872<Countryname>Bouvet Island </Countryname>
873<Flagdescription>the flag of Norway is used</Flagdescription>
874</record>
875<record>
876<Location>Southeastern Asia, bordering the South China Sea and Malaysia</Location>
877<Geographiccoordinates>4 30 N, 114 40 E</Geographiccoordinates>
878<Area>5770</Area>
879<Climate>tropical; hot, humid, rainy</Climate>
880<Naturalresources>petroleum, natural gas, timber</Naturalresources>
881<Population>336376</Population>
882<Populationgrowthrate>2.17% (2000 est.)</Populationgrowthrate>
883<Sexratio>
884at birth: 1.06 male(s)/female
885under 15 years: 1.04 male(s)/female
88615-64 years: 1.14 male(s)/female
88765 years and over: 0.94 male(s)/female
888total population: 1.1 male(s)/female (2000 est.)</Sexratio>
889<Religions>Muslim (official) 67%, Buddhist 13%, Christian 10%, indigenous beliefs and other 10%</Religions>
890<Countryname>Brunei </Countryname>
891<Capital>Bandar Seri Begawan</Capital>
892<Flagdescription>yellow with two diagonal bands of white (top, almost double width) and black starting from the upper hoist side; the national emblem in red is superimposed at the center; the emblem includes a swallow-tailed flag on top of a winged column within an upturned crescent above a scroll and flanked by two upraised hands</Flagdescription>
893<GDP>purchasing power parity - $5.6 billion (1999 est.)</GDP>
894<Industries>petroleum, petroleum refining, liquefied natural gas, construction</Industries>
895<Exports>$2.04 billion (f.o.b., 1998 est.)</Exports>
896<Imports>$1.38 billion (c.i.f., 1998 est.)</Imports>
897<Currency>1 Bruneian dollar (B$) = 100 cents</Currency>
898<Airports>2 (1999 est.)</Airports>
899</record>
900<record>
901<Location>Central Africa, east of Democratic Republic of the Congo</Location>
902<Geographiccoordinates>3 30 S, 30 00 E</Geographiccoordinates>
903<Area>27830</Area>
904<Climate>equatorial; high plateau with considerable altitude variation (772 m to 2,670 m); average annual temperature varies with altitude from 23 to 17 degrees centigrade but is generally moderate as the average altitude is about 1,700 m; average annual rainfall is about 150 cm; wet seasons from February to May and September to November, and dry seasons from June to August and December to January</Climate>
905<Naturalresources>nickel, uranium, rare earth oxides, peat, cobalt, copper, platinum (not yet exploited), vanadium, arable land, hydropower</Naturalresources>
906<Population>6054714</Population>
907<Populationgrowthrate>3.15% (2000 est.)</Populationgrowthrate>
908<Sexratio>
909at birth: 1.03 male(s)/female
910under 15 years: 1.02 male(s)/female
91115-64 years: 0.96 male(s)/female
91265 years and over: 0.71 male(s)/female
913total population: 0.98 male(s)/female (2000 est.)</Sexratio>
914<Religions>Christian 67% (Roman Catholic 62%, Protestant 5%), indigenous beliefs 23%, Muslim 10%</Religions>
915<Countryname>Burundi </Countryname>
916<Capital>Bujumbura</Capital>
917<Flagdescription>divided by a white diagonal cross into red panels (top and bottom) and green panels (hoist side and outer side) with a white disk superimposed at the center bearing three red six-pointed stars outlined in green arranged in a triangular design (one star above, two stars below)</Flagdescription>
918<GDP>purchasing power parity - $4.2 billion (1999 est.)</GDP>
919<Industries>light consumer goods such as blankets, shoes, soap; assembly of imported components; public works construction; food processing</Industries>
920<Exports>$56 million (f.o.b., 1999)</Exports>
921<Imports>$108 million (f.o.b., 1999)</Imports>
922<Currency>1 Burundi franc (FBu) = 100 centimes</Currency>
923<Airports>4 (1999 est.)</Airports>
924</record>
925<record>
926<Location>Northern North America, bordering the North Atlantic Ocean and North Pacific Ocean, north of the conterminous US</Location>
927<Geographiccoordinates>60 00 N, 95 00 W</Geographiccoordinates>
928<Area>9976140</Area>
929<Climate>varies from temperate in south to subarctic and arctic in north</Climate>
930<Naturalresources>iron ore, nickel, zinc, copper, gold, lead, molybdenum, potash, silver, fish, timber, wildlife, coal, petroleum, natural gas, hydropower</Naturalresources>
931<Population>31281092</Population>
932<Populationgrowthrate>1.02% (2000 est.)</Populationgrowthrate>
933<Sexratio>
934at birth: 1.05 male(s)/female
935under 15 years: 1.05 male(s)/female
93615-64 years: 1.01 male(s)/female
93765 years and over: 0.74 male(s)/female
938total population: 0.98 male(s)/female (2000 est.)</Sexratio>
939<Religions>Roman Catholic 42%, Protestant 40%, other 18%</Religions>
940<Countryname>Canada </Countryname>
941<Capital>Ottawa</Capital>
942<Flagdescription>three vertical bands of red (hoist side), white (double width, square), and red with a red maple leaf centered in the white band</Flagdescription>
943<GDP>purchasing power parity - $722.3 billion (1999 est.)</GDP>
944<Industries>processed and unprocessed minerals, food products, wood and paper products, transportation equipment, chemicals, fish products, petroleum and natural gas</Industries>
945<Exports>$277 billion (f.o.b., 1999 est.)</Exports>
946<Imports>$259.3 billion (f.o.b., 1999 est.)</Imports>
947<Currency>1 Canadian dollar (Can$) = 100 cents</Currency>
948<Airports>1,411 (1999 est.)</Airports>
949<Illicitdrugs>illicit producer of cannabis for the domestic drug market; use of hydroponics technology permits growers to plant large quantities of high-quality marijuana indoors; growing role as a transit point for heroin and cocaine entering the US market</Illicitdrugs>
950</record>
951<record>
952<Location>Southeastern Asia, bordering the Gulf of Thailand, between Thailand, Vietnam, and Laos</Location>
953<Geographiccoordinates>13 00 N, 105 00 E</Geographiccoordinates>
954<Area>181040</Area>
955<Climate>tropical; rainy, monsoon season (May to November); dry season (December to April); little seasonal temperature variation</Climate>
956<Naturalresources>timber, gemstones, some iron ore, manganese, phosphates, hydropower potential</Naturalresources>
957<Population>12212306</Population>
958<Populationgrowthrate>2.27% (2000 est.)</Populationgrowthrate>
959<Sexratio>
960at birth: 1.05 male(s)/female
961under 15 years: 1.04 male(s)/female
96215-64 years: 0.88 male(s)/female
96365 years and over: 0.7 male(s)/female
964total population: 0.94 male(s)/female (2000 est.)</Sexratio>
965<Religions>Theravada Buddhist 95%, other 5%</Religions>
966<Countryname>Cambodia </Countryname>
967<Capital>Phnom Penh</Capital>
968<Flagdescription>three horizontal bands of blue (top), red (double width), and blue with a white three-towered temple representing Angkor Wat outlined in black in the center of the red band</Flagdescription>
969<GDP>purchasing power parity - $8.2 billion (1999 est.)</GDP>
970<Industries>garments, rice milling, fishing, wood and wood products, rubber, cement, gem mining, textiles</Industries>
971<Exports>$821 million (f.o.b., 1999 est.)</Exports>
972<Imports>$1.2 billion (f.o.b., 1999 est.)</Imports>
973<Currency>1 new riel (CR) = 100 sen</Currency>
974<Airports>19 (1999 est.)</Airports>
975<Illicitdrugs>transshipment site for Golden Triangle heroin; possible money laundering; narcotics-related corruption reportedly involving some in the government, military, and police; possible small-scale opium, heroin, and amphetamine production; large producer of cannabis for the international market</Illicitdrugs>
976</record>
977<record>
978<Location>Central Africa, south of Libya</Location>
979<Geographiccoordinates>15 00 N, 19 00 E</Geographiccoordinates>
980<Area>1000000</Area>
981<Climate>tropical in south, desert in north</Climate>
982<Naturalresources>petroleum (unexploited but exploration under way), uranium, natron, kaolin, fish (Lake Chad)</Naturalresources>
983<Population>8424504</Population>
984<Populationgrowthrate>3.31% (2000 est.)</Populationgrowthrate>
985<Sexratio>
986at birth: 1.04 male(s)/female
987under 15 years: 1.01 male(s)/female
98815-64 years: 0.89 male(s)/female
98965 years and over: 0.72 male(s)/female
990total population: 0.94 male(s)/female (2000 est.)</Sexratio>
991<Religions>Muslim 50%, Christian 25%, indigenous beliefs (mostly animism) 25%</Religions>
992<Countryname>Chad </Countryname>
993<Capital>N'Djamena</Capital>
994<Flagdescription>three equal vertical bands of blue (hoist side), yellow, and red; similar to the flag of Romania; also similar to the flags of Andorra and Moldova, both of which have a national coat of arms centered in the yellow band; design was based on the flag of France</Flagdescription>
995<GDP>purchasing power parity - $7.6 billion (1999 est.)</GDP>
996<Industries>cotton textiles, meat packing, beer brewing, natron (sodium carbonate), soap, cigarettes, construction materials</Industries>
997<Exports>$288 million (f.o.b., 1999 est.)</Exports>
998<Imports>$359 million (f.o.b., 1999 est.)</Imports>
999<Currency>1 Communaute Financiere Africaine franc (CFAF) = 100 centimes</Currency>
1000<Airports>49 (1999 est.)</Airports>
1001</record>
1002<record>
1003<Location>Southern Asia, island in the Indian Ocean, south of India</Location>
1004<Geographiccoordinates>7 00 N, 81 00 E</Geographiccoordinates>
1005<Area>65610</Area>
1006<Climate>tropical monsoon; northeast monsoon (December to March); southwest monsoon (June to October)</Climate>
1007<Naturalresources>limestone, graphite, mineral sands, gems, phosphates, clay, hydropower</Naturalresources>
1008<Population>19238575</Population>
1009<Populationgrowthrate>0.89% (2000 est.)</Populationgrowthrate>
1010<Sexratio>
1011at birth: 1.05 male(s)/female
1012under 15 years: 1.05 male(s)/female
101315-64 years: 0.95 male(s)/female
101465 years and over: 0.93 male(s)/female
1015total population: 0.97 male(s)/female (2000 est.)</Sexratio>
1016<Religions>Buddhist 70%, Hindu 15%, Christian 8%, Muslim 7% (1999)</Religions>
1017<Countryname>Sri Lanka </Countryname>
1018<Capital>Colombo</Capital>
1019<Flagdescription>yellow with two panels; the smaller hoist-side panel has two equal vertical bands of green (hoist side) and orange; the other panel is a large dark red rectangle with a yellow lion holding a sword, and there is a yellow bo leaf in each corner; the yellow field appears as a border that goes around the entire flag and extends between the two panels</Flagdescription>
1020<GDP>purchasing power parity - $50.5 billion (1999 est.)</GDP>
1021<Industries>processing of rubber, tea, coconuts, and other agricultural commodities; clothing, cement, petroleum refining, textiles, tobacco</Industries>
1022<Exports>$4.7 billion (f.o.b., 1998)</Exports>
1023<Imports>$5.3 billion (f.o.b., 1998)</Imports>
1024<Currency>1 Sri Lankan rupee (SLRe) = 100 cents</Currency>
1025<Airports>14 (1999 est.)</Airports>
1026</record>
1027<record>
1028<Location>Western Africa, bordering the South Atlantic Ocean, between Angola and Gabon</Location>
1029<Geographiccoordinates>1 00 S, 15 00 E</Geographiccoordinates>
1030<Area>342000</Area>
1031<Climate>tropical; rainy season (March to June); dry season (June to October); constantly high temperatures and humidity; particularly enervating climate astride the Equator</Climate>
1032<Naturalresources>petroleum, timber, potash, lead, zinc, uranium, copper, phosphates, natural gas, hydropower</Naturalresources>
1033<Population>2830961</Population>
1034<Populationgrowthrate>2.23% (2000 est.)</Populationgrowthrate>
1035<Sexratio>
1036at birth: 1.03 male(s)/female
1037under 15 years: 1.01 male(s)/female
103815-64 years: 0.95 male(s)/female
103965 years and over: 0.67 male(s)/female
1040total population: 0.97 male(s)/female (2000 est.)</Sexratio>
1041<Religions>Christian 50%, animist 48%, Muslim 2%</Religions>
1042<Countryname>Republic of the Congo </Countryname>
1043<Capital>Brazzaville</Capital>
1044<Flagdescription>divided diagonally from the lower hoist side by a yellow band; the upper triangle (hoist side) is green and the lower triangle is red; uses the popular pan-African colors of Ethiopia</Flagdescription>
1045<GDP>purchasing power parity - $4.15 billion (1999 est.)</GDP>
1046<Industries>petroleum extraction, cement kilning, lumbering, brewing, sugar milling, palm oil, soap, cigarette making</Industries>
1047<Exports>$1.7 billion (f.o.b., 1999)</Exports>
1048<Imports>$770 million (f.o.b., 1999)</Imports>
1049<Currency>1 Communaute Financiere Africaine franc (CFAF) = 100 centimes</Currency>
1050<Airports>36 (1999 est.)</Airports>
1051</record>
1052<record>
1053<Location>Central Africa, northeast of Angola</Location>
1054<Geographiccoordinates>0 00 N, 25 00 E</Geographiccoordinates>
1055<Area>2345410</Area>
1056<Climate>tropical; hot and humid in equatorial river basin; cooler and drier in southern highlands; cooler and wetter in eastern highlands; north of Equator - wet season April to October, dry season December to February; south of Equator - wet season November to March, dry season April to October</Climate>
1057<Naturalresources>cobalt, copper, cadmium, petroleum, industrial and gem diamonds, gold, silver, zinc, manganese, tin, germanium, uranium, radium, bauxite, iron ore, coal, hydropower, timber</Naturalresources>
1058<Population>51964999</Population>
1059<Populationgrowthrate>3.19% (2000 est.)</Populationgrowthrate>
1060<Sexratio>
1061at birth: 1.03 male(s)/female
1062under 15 years: 1.01 male(s)/female
106315-64 years: 0.96 male(s)/female
106465 years and over: 0.74 male(s)/female
1065total population: 0.98 male(s)/female (2000 est.)</Sexratio>
1066<Religions>Roman Catholic 50%, Protestant 20%, Kimbanguist 10%, Muslim 10%, other syncretic sects and indigenous beliefs 10%</Religions>
1067<Countryname>Democratic Republic of the Congo </Countryname>
1068<Capital>Kinshasa</Capital>
1069<Flagdescription>light blue with a large yellow five-pointed star in the center and a columnar arrangement of six small yellow five-pointed stars along the hoist side</Flagdescription>
1070<GDP>purchasing power parity - $35.7 billion (1999 est.)</GDP>
1071<Industries>mining, mineral processing, consumer products (including textiles, footwear, cigarettes, processed foods and beverages), cement, diamonds</Industries>
1072<Exports>$530 million (f.o.b., 1998 est.)</Exports>
1073<Imports>$460 million (f.o.b., 1998 est.)</Imports>
1074<Currency>Congolese franc (CF)</Currency>
1075<Airports>232 (1999 est.)</Airports>
1076<Illicitdrugs>illicit producer of cannabis, mostly for domestic consumption</Illicitdrugs>
1077</record>
1078<record>
1079<Location>Eastern Asia, bordering the East China Sea, Korea Bay, Yellow Sea, and South China Sea, between North Korea and Vietnam</Location>
1080<Geographiccoordinates>35 00 N, 105 00 E</Geographiccoordinates>
1081<Area>9596960</Area>
1082<Climate>extremely diverse; tropical in south to subarctic in north</Climate>
1083<Naturalresources>coal, iron ore, petroleum, natural gas, mercury, tin, tungsten, antimony, manganese, molybdenum, vanadium, magnetite, aluminum, lead, zinc, uranium, hydropower potential (world's largest)</Naturalresources>
1084<Population>1261832482</Population>
1085<Populationgrowthrate>0.9% (2000 est.)</Populationgrowthrate>
1086<Sexratio>
1087at birth: 1.15 male(s)/female
1088under 15 years: 1.1 male(s)/female
108915-64 years: 1.06 male(s)/female
109065 years and over: 0.88 male(s)/female
1091total population: 1.06 male(s)/female (2000 est.)</Sexratio>
1092<Religions>Daoist (Taoist), Buddhist, Muslim 2%-3%, Christian 1% (est.)
1093note: officially atheist</Religions>
1094<Countryname>China </Countryname>
1095<Capital>Beijing</Capital>
1096<Flagdescription>red with a large yellow five-pointed star and four smaller yellow five-pointed stars (arranged in a vertical arc toward the middle of the flag) in the upper hoist-side corner</Flagdescription>
1097<GDP>purchasing power parity - $4.8 trillion (1999 est.)</GDP>
1098<Industries>iron and steel, coal, machine building, armaments, textiles and apparel, petroleum, cement, chemical fertilizers, footwear, toys, food processing, automobiles, consumer electronics, telecommunications</Industries>
1099<Exports>$194.9 billion (f.o.b., 1999)</Exports>
1100<Imports>$165.8 billion (c.i.f., 1999)</Imports>
1101<Currency>1 yuan = 10 jiao</Currency>
1102<Airports>206 (1996 est.)</Airports>
1103<Illicitdrugs>major transshipment point for heroin produced in the Golden Triangle; growing domestic drug abuse problem</Illicitdrugs>
1104</record>
1105<record>
1106<Location>Southern South America, bordering the South Atlantic Ocean and South Pacific Ocean, between Argentina and Peru</Location>
1107<Geographiccoordinates>30 00 S, 71 00 W</Geographiccoordinates>
1108<Area>756950</Area>
1109<Climate>temperate; desert in north; Mediterranean in central region; cool and damp in south</Climate>
1110<Naturalresources>copper, timber, iron ore, nitrates, precious metals, molybdenum, hydropower</Naturalresources>
1111<Population>15153797</Population>
1112<Populationgrowthrate>1.17% (2000 est.)</Populationgrowthrate>
1113<Sexratio>
1114at birth: 1.05 male(s)/female
1115under 15 years: 1.05 male(s)/female
111615-64 years: 0.99 male(s)/female
111765 years and over: 0.71 male(s)/female
1118total population: 0.98 male(s)/female (2000 est.)</Sexratio>
1119<Religions>Roman Catholic 89%, Protestant 11%, Jewish NEGL</Religions>
1120<Countryname>Chile </Countryname>
1121<Capital>Santiago</Capital>
1122<Flagdescription>two equal horizontal bands of white (top) and red; there is a blue square the same height as the white band at the hoist-side end of the white band; the square bears a white five-pointed star in the center; design was based on the US flag</Flagdescription>
1123<GDP>purchasing power parity - $185.1 billion (1999 est.)</GDP>
1124<Industries>copper, other minerals, foodstuffs, fish processing, iron and steel, wood and wood products, transport equipment, cement, textiles</Industries>
1125<Exports>$15.6 billion (f.o.b., 1999)</Exports>
1126<Imports>$13.9 billion (c.i.f., 1999)</Imports>
1127<Currency>1 Chilean peso (Ch$) = 100 centavos</Currency>
1128<Airports>370 (1999 est.)</Airports>
1129<Illicitdrugs>a growing transshipment country for cocaine destined for the US and Europe; economic prosperity has made Chile more attractive to traffickers seeking to launder drug profits; imported precursors passed on to Bolivia; domestic cocaine consumption is rising</Illicitdrugs>
1130</record>
1131<record>
1132<Location>Caribbean, island group in Caribbean Sea, nearly one-half of the way from Cuba to Honduras</Location>
1133<Geographiccoordinates>19 30 N, 80 30 W</Geographiccoordinates>
1134<Area>259</Area>
1135<Climate>tropical marine; warm, rainy summers (May to October) and cool, relatively dry winters (November to April)</Climate>
1136<Naturalresources>fish, climate and beaches that foster tourism</Naturalresources>
1137<Population>34763</Population>
1138<Populationgrowthrate>2.22% (2000 est.)</Populationgrowthrate>
1139<Sexratio>
1140at birth: 0.86 male(s)/female
1141under 15 years: 0.94 male(s)/female
114215-64 years: 0.96 male(s)/female
114365 years and over: 0.85 male(s)/female
1144total population: 0.94 male(s)/female (2000 est.)</Sexratio>
1145<Religions>United Church (Presbyterian and Congregational), Anglican, Baptist, Roman Catholic, Church of God, other Protestant</Religions>
1146<Countryname>Cayman Islands </Countryname>
1147<Capital>George Town</Capital>
1148<Flagdescription>blue, with the flag of the UK in the upper hoist-side quadrant and the Caymanian coat of arms on a white disk centered on the outer half of the flag; the coat of arms includes a pineapple and turtle above a shield with three stars (representing the three islands) and a scroll at the bottom bearing the motto HE HATH FOUNDED IT UPON THE SEAS</Flagdescription>
1149<GDP>purchasing power parity - $930 million (1997 est.)</GDP>
1150<Industries>tourism, banking, insurance and finance, construction, construction materials, furniture</Industries>
1151<Exports>$2.17 million (1997)</Exports>
1152<Imports>$432 million (1997)</Imports>
1153<Currency>1 Caymanian dollar (CI$) = 100 cents</Currency>
1154<Airports>3 (1999 est.)</Airports>
1155<Illicitdrugs>vulnerable to drug money laundering and drug transshipment</Illicitdrugs>
1156</record>
1157<record>
1158<Location>Southeastern Asia, group of islands in the Indian Ocean, south of Indonesia, about one-half of the way from Australia to Sri Lanka</Location>
1159<Geographiccoordinates>12 30 S, 96 50 E</Geographiccoordinates>
1160<Area>14</Area>
1161<Climate>pleasant, modified by the southeast trade winds for about nine months of the year; moderate rainfall</Climate>
1162<Naturalresources>fish</Naturalresources>
1163<Population>635</Population>
1164<Populationgrowthrate>-0.21% (2000 est.)</Populationgrowthrate>
1165<Religions>Sunni Muslim 57%, Christian 22%, other 21% (1981 est.)</Religions>
1166<Countryname>Cocos (Keeling) Islands </Countryname>
1167<Capital>West Island</Capital>
1168<Flagdescription>the flag of Australia is used</Flagdescription>
1169<GDP>purchasing power parity - $NA</GDP>
1170<Industries>copra products and tourism</Industries>
1171<Exports>$NA</Exports>
1172<Imports>$NA</Imports>
1173<Currency>1 Australian dollar ($A) = 100 cents</Currency>
1174<Airports>1 (1999 est.)</Airports>
1175</record>
1176<record>
1177<Location>Western Africa, bordering the Bight of Biafra, between Equatorial Guinea and Nigeria</Location>
1178<Geographiccoordinates>6 00 N, 12 00 E</Geographiccoordinates>
1179<Area>475440</Area>
1180<Climate>varies with terrain, from tropical along coast to semiarid and hot in north</Climate>
1181<Naturalresources>petroleum, bauxite, iron ore, timber, hydropower</Naturalresources>
1182<Population>15421937</Population>
1183<Populationgrowthrate>2.47% (2000 est.)</Populationgrowthrate>
1184<Sexratio>
1185at birth: 1.03 male(s)/female
1186under 15 years: 1.02 male(s)/female
118715-64 years: 1.01 male(s)/female
118865 years and over: 0.86 male(s)/female
1189total population: 1.01 male(s)/female (2000 est.)</Sexratio>
1190<Religions>indigenous beliefs 40%, Christian 40%, Muslim 20%</Religions>
1191<Countryname>Cameroon </Countryname>
1192<Capital>Yaounde</Capital>
1193<Flagdescription>three equal vertical bands of green (hoist side), red, and yellow with a yellow five-pointed star centered in the red band; uses the popular pan-African colors of Ethiopia</Flagdescription>
1194<GDP>purchasing power parity - $31.5 billion (1999 est.)</GDP>
1195<Industries>petroleum production and refining, food processing, light consumer goods, textiles, lumber</Industries>
1196<Exports>$2 billion (f.o.b., 1999)</Exports>
1197<Imports>$1.5 billion (f.o.b., 1999)</Imports>
1198<Currency>1 Communaute Financiere Africaine franc (CFAF) = 100 centimes</Currency>
1199<Airports>50 (1999 est.)</Airports>
1200</record>
1201<record>
1202<Location>Southern Africa, group of islands in the Mozambique Channel, about two-thirds of the way between northern Madagascar and northern Mozambique</Location>
1203<Geographiccoordinates>12 10 S, 44 15 E</Geographiccoordinates>
1204<Area>2170</Area>
1205<Climate>tropical marine; rainy season (November to May)</Climate>
1206<Naturalresources>NEGL</Naturalresources>
1207<Population>578400</Population>
1208<Populationgrowthrate>3.05% (2000 est.)</Populationgrowthrate>
1209<Sexratio>
1210at birth: 1.03 male(s)/female
1211under 15 years: 1.01 male(s)/female
121215-64 years: 0.97 male(s)/female
121365 years and over: 0.91 male(s)/female
1214total population: 0.99 male(s)/female (2000 est.)</Sexratio>
1215<Religions>Sunni Muslim 98%, Roman Catholic 2%</Religions>
1216<Countryname>Comoros </Countryname>
1217<Capital>Moroni</Capital>
1218<Flagdescription>green with a white crescent in the center of the field, its points facing downward; there are four white five-pointed stars placed in a line between the points of the crescent; the crescent, stars, and color green are traditional symbols of Islam; the four stars represent the four main islands of the archipelago - Mwali, Njazidja, Nzwani, and Mayotte (a territorial collectivity of France, but claimed by Comoros); the design, the most recent of several, is described in the constitution approved by referendum on 7 June 1992</Flagdescription>
1219<GDP>purchasing power parity - $410 million (1998 est.)</GDP>
1220<Industries>tourism, perfume distillation, textiles, furniture, jewelry, construction materials, soft drinks</Industries>
1221<Exports>$9.3 million (f.o.b., 1998 est.)</Exports>
1222<Imports>$49.5 million (f.o.b., 1998 est.)</Imports>
1223<Currency>1 Comoran franc (CF) = 100 centimes</Currency>
1224<Airports>4 (1999 est.)</Airports>
1225</record>
1226<record>
1227<Location>Northern South America, bordering the Caribbean Sea, between Panama and Venezuela, and bordering the North Pacific Ocean, between Ecuador and Panama</Location>
1228<Geographiccoordinates>4 00 N, 72 00 W</Geographiccoordinates>
1229<Area>1138910</Area>
1230<Climate>tropical along coast and eastern plains; cooler in highlands</Climate>
1231<Naturalresources>petroleum, natural gas, coal, iron ore, nickel, gold, copper, emeralds, hydropower</Naturalresources>
1232<Population>39685655</Population>
1233<Populationgrowthrate>1.68% (2000 est.)</Populationgrowthrate>
1234<Sexratio>
1235at birth: 1.03 male(s)/female
1236under 15 years: 1.02 male(s)/female
123715-64 years: 0.95 male(s)/female
123865 years and over: 0.82 male(s)/female
1239total population: 0.97 male(s)/female (2000 est.)</Sexratio>
1240<Religions>Roman Catholic 90%</Religions>
1241<Countryname>Colombia </Countryname>
1242<Capital>Bogota</Capital>
1243<Flagdescription>three horizontal bands of yellow (top, double-width), blue, and red; similar to the flag of Ecuador, which is longer and bears the Ecuadorian coat of arms superimposed in the center</Flagdescription>
1244<GDP>purchasing power parity - $245.1 billion (1999 est.)</GDP>
1245<Industries>textiles, food processing, oil, clothing and footwear, beverages, chemicals, cement; gold, coal, emeralds</Industries>
1246<Exports>$11.5 billion (f.o.b., 1999 est.)</Exports>
1247<Imports>$10 billion (f.o.b., 1999 est.)</Imports>
1248<Currency>1 Colombian peso (Col$) = 100 centavos</Currency>
1249<Airports>1,101 (1999 est.)</Airports>
1250<Illicitdrugs>illicit producer of coca, opium poppies, and cannabis; world's leading coca cultivator (cultivation of coca in 1998 - 101,500 hectares, a 28% increase over 1997); cultivation of opium in 1998 remained steady at 6,600 hectares; potential production of opium in 1997 - 66 metric tons, a 5% increase over 1996; the world's largest processor of coca derivatives into cocaine; supplier of cocaine to the US and other international drug markets, and an important supplier of heroin to the US market; active aerial eradication program</Illicitdrugs>
1251</record>
1252<record>
1253<Location>Oceania, islands in the North Pacific Ocean, about three-quarters of the way from Hawaii to the Philippines</Location>
1254<Geographiccoordinates>15 12 N, 145 45 E</Geographiccoordinates>
1255<Area>477</Area>
1256<Climate>tropical marine; moderated by northeast trade winds, little seasonal temperature variation; dry season December to June, rainy season July to October</Climate>
1257<Naturalresources>arable land, fish</Naturalresources>
1258<Population>71912</Population>
1259<Populationgrowthrate>3.75% (2000 est.)</Populationgrowthrate>
1260<Sexratio>
1261at birth: 1.06 male(s)/female
1262under 15 years: 1.03 male(s)/female
126315-64 years: 0.9 male(s)/female
126465 years and over: 0.96 male(s)/female
1265total population: 0.93 male(s)/female (2000 est.)</Sexratio>
1266<Religions>Christian (Roman Catholic majority, although traditional beliefs and taboos may still be found)</Religions>
1267<Countryname>Northern Mariana Islands </Countryname>
1268<Capital>Saipan</Capital>
1269<Flagdescription>blue, with a white, five-pointed star superimposed on the gray silhouette of a latte stone (a traditional foundation stone used in building) in the center, surrounded by a wreath</Flagdescription>
1270<GDP>purchasing power parity - $524 million (1996 est.)
1271note: GDP numbers reflect US spending</GDP>
1272<Industries>tourism, construction, garments, handicrafts</Industries>
1273<Exports>$1 billion (1998)</Exports>
1274<Imports>$NA</Imports>
1275<Currency>1 United States dollar (US$) = 100 cents</Currency>
1276<Airports>6 (1999 est.)</Airports>
1277</record>
1278<record>
1279<Location>Oceania, islands in the Coral Sea, northeast of Australia</Location>
1280<Geographiccoordinates>18 00 S, 152 00 E</Geographiccoordinates>
1281<Area></Area>
1282<Climate>tropical</Climate>
1283<Naturalresources>NEGL</Naturalresources>
1284<Population></Population>
1285<Countryname>Coral Sea Islands </Countryname>
1286<Flagdescription>the flag of Australia is used</Flagdescription>
1287</record>
1288<record>
1289<Location>Middle America, bordering both the Caribbean Sea and the North Pacific Ocean, between Nicaragua and Panama</Location>
1290<Geographiccoordinates>10 00 N, 84 00 W</Geographiccoordinates>
1291<Area>51100</Area>
1292<Climate>tropical and subtropical; dry season (December to April); rainy season (May to November); cooler in highlands</Climate>
1293<Naturalresources>hydropower</Naturalresources>
1294<Population>3710558</Population>
1295<Populationgrowthrate>1.69% (2000 est.)</Populationgrowthrate>
1296<Sexratio>
1297at birth: 1.05 male(s)/female
1298under 15 years: 1.05 male(s)/female
129915-64 years: 1.02 male(s)/female
130065 years and over: 0.87 male(s)/female
1301total population: 1.02 male(s)/female (2000 est.)</Sexratio>
1302<Religions>Roman Catholic 85%, Evangelical Protestant, approximately 14%, other less than 1%</Religions>
1303<Countryname>Costa Rica </Countryname>
1304<Capital>San Jose</Capital>
1305<Flagdescription>five horizontal bands of blue (top), white, red (double width), white, and blue, with the coat of arms in a white disk on the hoist side of the red band</Flagdescription>
1306<GDP>purchasing power parity - $26 billion (1999 est.)</GDP>
1307<Industries>microprocessors, food processing, textiles and clothing, construction materials, fertilizer, plastic products</Industries>
1308<Exports>$6.4 billion (f.o.b., 1999 est.)</Exports>
1309<Imports>$6.5 billion (c.i.f., 1999 est.)</Imports>
1310<Currency>1 Costa Rican colon (C) = 100 centimos</Currency>
1311<Airports>155 (1999 est.)</Airports>
1312<Illicitdrugs>transshipment country for cocaine and heroin from South America; illicit production of cannabis on small, scattered plots; domestic cocaine consumption has risen</Illicitdrugs>
1313</record>
1314<record>
1315<Location>Central Africa, north of Democratic Republic of the Congo</Location>
1316<Geographiccoordinates>7 00 N, 21 00 E</Geographiccoordinates>
1317<Area>622984</Area>
1318<Climate>tropical; hot, dry winters; mild to hot, wet summers</Climate>
1319<Naturalresources>diamonds, uranium, timber, gold, oil, hydropower</Naturalresources>
1320<Population>3512751</Population>
1321<Populationgrowthrate>1.77% (2000 est.)</Populationgrowthrate>
1322<Sexratio>
1323at birth: 1.03 male(s)/female
1324under 15 years: 1.01 male(s)/female
132515-64 years: 0.96 male(s)/female
132665 years and over: 0.8 male(s)/female
1327total population: 0.98 male(s)/female (2000 est.)</Sexratio>
1328<Religions>indigenous beliefs 24%, Protestant 25%, Roman Catholic 25%, Muslim 15%, other 11%
1329note: animistic beliefs and practices strongly influence the Christian majority</Religions>
1330<Countryname>Central African Republic </Countryname>
1331<Capital>Bangui</Capital>
1332<Flagdescription>four equal horizontal bands of blue (top), white, green, and yellow with a vertical red band in center; there is a yellow five-pointed star on the hoist side of the blue band</Flagdescription>
1333<GDP>purchasing power parity - $5.8 billion (1999 est.)</GDP>
1334<Industries>diamond mining, sawmills, breweries, textiles, footwear, assembly of bicycles and motorcycles</Industries>
1335<Exports>$195 million (f.o.b., 1999)</Exports>
1336<Imports>$170 million (f.o.b., 1999)</Imports>
1337<Currency>1 Communaute Financiere Africaine franc (CFAF) = 100 centimes</Currency>
1338<Airports>52 (1999 est.)</Airports>
1339</record>
1340<record>
1341<Location>Caribbean, island between the Caribbean Sea and the North Atlantic Ocean, south of Florida</Location>
1342<Geographiccoordinates>21 30 N, 80 00 W</Geographiccoordinates>
1343<Area>110860</Area>
1344<Climate>tropical; moderated by trade winds; dry season (November to April); rainy season (May to October)</Climate>
1345<Naturalresources>cobalt, nickel, iron ore, copper, manganese, salt, timber, silica, petroleum, arable land</Naturalresources>
1346<Population>11141997</Population>
1347<Populationgrowthrate>0.39% (2000 est.)</Populationgrowthrate>
1348<Sexratio>
1349at birth: 1.06 male(s)/female
1350under 15 years: 1.06 male(s)/female
135115-64 years: 1.01 male(s)/female
135265 years and over: 0.87 male(s)/female
1353total population: 1 male(s)/female (2000 est.)</Sexratio>
1354<Religions>nominally 85% Roman Catholic prior to CASTRO assuming power; Protestants, Jehovah's Witnesses, Jews, and Santeria are also represented</Religions>
1355<Countryname>Cuba </Countryname>
1356<Capital>Havana</Capital>
1357<Flagdescription>five equal horizontal bands of blue (top and bottom) alternating with white; a red equilateral triangle based on the hoist side bears a white, five-pointed star in the center</Flagdescription>
1358<GDP>purchasing power parity - $18.6 billion (1999 est.)</GDP>
1359<Industries>sugar, petroleum, food, tobacco, textiles, chemicals, paper and wood products, metals (particularly nickel), cement, fertilizers, consumer goods, agricultural machinery</Industries>
1360<Exports>$1.4 billion (f.o.b., 1999 est.)</Exports>
1361<Imports>$3.2 billion (c.i.f., 1999 est.)</Imports>
1362<Currency>1 Cuban peso (Cu$) = 100 centavos</Currency>
1363<Airports>170 (1999 est.)</Airports>
1364<Illicitdrugs>territorial waters and air space serve as transshipment zone for cocaine bound for the US and Europe; established the death penalty for certain drug-related crimes in 1999</Illicitdrugs>
1365</record>
1366<record>
1367<Location>Western Africa, group of islands in the North Atlantic Ocean, west of Senegal</Location>
1368<Geographiccoordinates>16 00 N, 24 00 W</Geographiccoordinates>
1369<Area>4033</Area>
1370<Climate>temperate; warm, dry summer; precipitation meager and very erratic</Climate>
1371<Naturalresources>salt, basalt rock, pozzuolana (a siliceous volcanic ash used to produce hydraulic cement), limestone, kaolin, fish</Naturalresources>
1372<Population>401343</Population>
1373<Populationgrowthrate>0.98% (2000 est.)</Populationgrowthrate>
1374<Sexratio>
1375at birth: 1.03 male(s)/female
1376under 15 years: 1.02 male(s)/female
137715-64 years: 0.9 male(s)/female
137865 years and over: 0.65 male(s)/female
1379total population: 0.93 male(s)/female (2000 est.)</Sexratio>
1380<Religions>Roman Catholic (infused with indigenous beliefs); Protestant (mostly Church of the Nazarene)</Religions>
1381<Countryname>Cape Verde </Countryname>
1382<Capital>Praia</Capital>
1383<Flagdescription>three horizontal bands of light blue (top, double width), white (with a horizontal red stripe in the middle third), and light blue; a circle of 10 yellow five-pointed stars is centered on the hoist end of the red stripe and extends into the upper and lower blue bands</Flagdescription>
1384<GDP>purchasing power parity - $618 million (1999 est.)</GDP>
1385<Industries>food and beverages, fish processing, shoes and garments, salt mining, ship repair</Industries>
1386<Exports>$38 million (f.o.b., 1999 est.)</Exports>
1387<Imports>$225 million (f.o.b., 1999 est.)</Imports>
1388<Currency>1 Cape Verdean escudo (CVEsc) = 100 centavos</Currency>
1389<Airports>6 (1999 est.)</Airports>
1390<Illicitdrugs>used as a transshipment point for illicit drugs moving from Latin America and Africa destined for Western Europe</Illicitdrugs>
1391</record>
1392<record>
1393<Location>Oceania, group of islands in the South Pacific Ocean, about one-half of the way from Hawaii to New Zealand</Location>
1394<Geographiccoordinates>21 14 S, 159 46 W</Geographiccoordinates>
1395<Area>240</Area>
1396<Climate>tropical; moderated by trade winds</Climate>
1397<Naturalresources>NEGL</Naturalresources>
1398<Population>20407</Population>
1399<Populationgrowthrate>1.6% (2000 est.)</Populationgrowthrate>
1400<Religions>Christian (majority of populace are members of the Cook Islands Christian Church)</Religions>
1401<Countryname>Cook Islands </Countryname>
1402<Capital>Avarua</Capital>
1403<Flagdescription>blue, with the flag of the UK in the upper hoist-side quadrant and a large circle of 15 white five-pointed stars (one for every island) centered in the outer half of the flag</Flagdescription>
1404<GDP>purchasing power parity - $112 million (1998 est.)</GDP>
1405<Industries>fruit processing, tourism</Industries>
1406<Exports>$4.2 million (f.o.b., 1994 est.)</Exports>
1407<Imports>$85 million (c.i.f., 1994)</Imports>
1408<Currency>1 New Zealand dollar (NZ$) = 100 cents</Currency>
1409<Airports>7 (1999 est.)</Airports>
1410</record>
1411<record>
1412<Location>Middle East, island in the Mediterranean Sea, south of Turkey</Location>
1413<Geographiccoordinates>35 00 N, 33 00 E</Geographiccoordinates>
1414<Area>9250</Area>
1415<Climate>temperate, Mediterranean with hot, dry summers and cool, winters</Climate>
1416<Naturalresources>copper, pyrites, asbestos, gypsum, timber, salt, marble, clay earth pigment</Naturalresources>
1417<Population>758363</Population>
1418<Populationgrowthrate>0.6% (2000 est.)</Populationgrowthrate>
1419<Sexratio>
1420at birth: 1.05 male(s)/female
1421under 15 years: 1.05 male(s)/female
142215-64 years: 1.02 male(s)/female
142365 years and over: 0.77 male(s)/female
1424total population: 1 male(s)/female (2000 est.)</Sexratio>
1425<Religions>Greek Orthodox 78%, Muslim 18%, Maronite, Armenian Apostolic, and other 4%</Religions>
1426<Countryname>Cyprus </Countryname>
1427<Capital>Nicosia
1428note: the Turkish Cypriot area's capital is Lefkosa (Nicosia)</Capital>
1429<Flagdescription>white with a copper-colored silhouette of the island (the name Cyprus is derived from the Greek word for copper) above two green crossed olive branches in the center of the flag; the branches symbolize the hope for peace and reconciliation between the Greek and Turkish communities
1430note: the Turkish Cypriot flag has a horizontal red stripe at the top and bottom between which is a red crescent and red star on a white field</Flagdescription>
1431<GDP>Greek Cypriot area: purchasing power parity - $9 billion; Turkish Cypriot area: purchasing power parity - $820 million (1998 est.)</GDP>
1432<Industries>food, beverages, textiles, chemicals, metal products, tourism, wood products</Industries>
1433<Exports>Greek Cypriot area: $1.1 billion (f.o.b., 1998 est.); Turkish Cypriot area: $63.9 million (f.o.b., 1998)</Exports>
1434<Imports>Greek Cypriot area: $3.5 billion (f.o.b., 1998 est.); Turkish Cypriot area: $374 million (f.o.b., 1997)</Imports>
1435<Currency>Greek Cypriot area: 1 Cypriot pound = 100 cents; Turkish Cypriot area: 1 Turkish lira (TL) = 100 kurus</Currency>
1436<Airports>15 (1999 est.)</Airports>
1437<Illicitdrugs>minor transit point for heroin and hashish via air routes and container traffic to Europe, especially from Lebanon and Turkey; some cocaine transits as well</Illicitdrugs>
1438</record>
1439<record>
1440<Location>Northern Europe, bordering the Baltic Sea and the North Sea, on a peninsula north of Germany</Location>
1441<Geographiccoordinates>56 00 N, 10 00 E</Geographiccoordinates>
1442<Area>43094</Area>
1443<Climate>temperate; humid and overcast; mild, windy winters and cool summers</Climate>
1444<Naturalresources>petroleum, natural gas, fish, salt, limestone, stone, gravel and sand</Naturalresources>
1445<Population>5336394</Population>
1446<Populationgrowthrate>0.31% (2000 est.)</Populationgrowthrate>
1447<Sexratio>
1448at birth: 1.05 male(s)/female
1449under 15 years: 1.05 male(s)/female
145015-64 years: 1.03 male(s)/female
145165 years and over: 0.71 male(s)/female
1452total population: 0.98 male(s)/female (2000 est.)</Sexratio>
1453<Religions>Evangelical Lutheran 97%, other Protestant and Roman Catholic, other</Religions>
1454<Countryname>Denmark </Countryname>
1455<Capital>Copenhagen</Capital>
1456<Flagdescription>red with a white cross that extends to the edges of the flag; the vertical part of the cross is shifted to the hoist side, and that design element of the Dannebrog (Danish flag) was subsequently adopted by the other Nordic countries of Finland, Iceland, Norway, and Sweden</Flagdescription>
1457<GDP>purchasing power parity - $127.7 billion (1999 est.)</GDP>
1458<Industries>food processing, machinery and equipment, textiles and clothing, chemical products, electronics, construction, furniture, and other wood products, shipbuilding</Industries>
1459<Exports>$49.5 billion (f.o.b., 1999)</Exports>
1460<Imports>$43.9 billion (f.o.b., 1999)</Imports>
1461<Currency>1 Danish krone (DKr) = 100 oere</Currency>
1462<Airports>118 (1999 est.)</Airports>
1463</record>
1464<record>
1465<Location>Eastern Africa, bordering the Gulf of Aden and the Red Sea, between Eritrea and Somalia</Location>
1466<Geographiccoordinates>11 30 N, 43 00 E</Geographiccoordinates>
1467<Area>22000</Area>
1468<Climate>desert; torrid, dry</Climate>
1469<Naturalresources>geothermal areas</Naturalresources>
1470<Population>451442</Population>
1471<Populationgrowthrate>1.45% (2000 est.)</Populationgrowthrate>
1472<Sexratio>
1473at birth: 1.03 male(s)/female
1474under 15 years: 1 male(s)/female
147515-64 years: 1.12 male(s)/female
147665 years and over: 1.08 male(s)/female
1477total population: 1.07 male(s)/female (2000 est.)</Sexratio>
1478<Religions>Muslim 94%, Christian 6%</Religions>
1479<Countryname>Djibouti </Countryname>
1480<Capital>Djibouti</Capital>
1481<Flagdescription>two equal horizontal bands of light blue (top) and light green with a white isosceles triangle based on the hoist side bearing a red five-pointed star in the center</Flagdescription>
1482<GDP>purchasing power parity - $550 million (1999 est.)</GDP>
1483<Industries>limited to a few small-scale enterprises, such as dairy products and mineral-water bottling</Industries>
1484<Exports>$260 million (f.o.b., 1999 est.)</Exports>
1485<Imports>$440 million (f.o.b., 1999 est.)</Imports>
1486<Currency>1 Djiboutian franc (DF) = 100 centimes</Currency>
1487<Airports>12 (1999 est.)</Airports>
1488</record>
1489<record>
1490<Location>Caribbean, island between the Caribbean Sea and the North Atlantic Ocean, about one-half of the way from Puerto Rico to Trinidad and Tobago</Location>
1491<Geographiccoordinates>15 25 N, 61 20 W</Geographiccoordinates>
1492<Area>754</Area>
1493<Climate>tropical; moderated by northeast trade winds; heavy rainfall</Climate>
1494<Naturalresources>timber, hydropower, arable land</Naturalresources>
1495<Population>71540</Population>
1496<Populationgrowthrate>-1.14% (2000 est.)</Populationgrowthrate>
1497<Sexratio>
1498at birth: 1.05 male(s)/female
1499under 15 years: 1.03 male(s)/female
150015-64 years: 1.05 male(s)/female
150165 years and over: 0.69 male(s)/female
1502total population: 1.01 male(s)/female (2000 est.)</Sexratio>
1503<Religions>Roman Catholic 77%, Protestant 15% (Methodist 5%, Pentecostal 3%, Seventh-Day Adventist 3%, Baptist 2%, other 2%), none 2%, other 6%</Religions>
1504<Countryname>Dominica </Countryname>
1505<Capital>Roseau</Capital>
1506<Flagdescription>green, with a centered cross of three equal bands - the vertical part is yellow (hoist side), black, and white and the horizontal part is yellow (top), black, and white; superimposed in the center of the cross is a red disk bearing a sisserou parrot encircled by 10 green, five-pointed stars edged in yellow; the 10 stars represent the 10 administrative divisions (parishes)</Flagdescription>
1507<GDP>purchasing power parity - $225 million (1998 est.)</GDP>
1508<Industries>soap, coconut oil, tourism, copra, furniture, cement blocks, shoes</Industries>
1509<Exports>$60.8 million (1998)</Exports>
1510<Imports>$120.4 million (1998)</Imports>
1511<Currency>1 East Caribbean dollar (EC$) = 100 cents</Currency>
1512<Airports>2 (1999 est.)</Airports>
1513<Illicitdrugs>transshipment point for narcotics bound for the US and Europe; minor cannabis producer; banking industry is vulnerable to money laundering</Illicitdrugs>
1514</record>
1515<record>
1516<Location>Oceania, island in the South Pacific Ocean, about one-half of the way from Hawaii to the Cook Islands</Location>
1517<Geographiccoordinates>0 22 S, 160 03 W</Geographiccoordinates>
1518<Area>4</Area>
1519<Climate>tropical; scant rainfall, constant wind, burning sun</Climate>
1520<Naturalresources>guano (deposits worked until late 1800s)</Naturalresources>
1521<Population></Population>
1522<Countryname>Jarvis Island </Countryname>
1523<Flagdescription>the flag of the US is used</Flagdescription>
1524</record>
1525<record>
1526<Location>Caribbean, eastern two-thirds of the island of Hispaniola, between the Caribbean Sea and the North Atlantic Ocean, east of Haiti</Location>
1527<Geographiccoordinates>19 00 N, 70 40 W</Geographiccoordinates>
1528<Area>48730</Area>
1529<Climate>tropical maritime; little seasonal temperature variation; seasonal variation in rainfall</Climate>
1530<Naturalresources>nickel, bauxite, gold, silver</Naturalresources>
1531<Population>8442533</Population>
1532<Populationgrowthrate>1.64% (2000 est.)</Populationgrowthrate>
1533<Sexratio>
1534at birth: 1.05 male(s)/female
1535under 15 years: 1.04 male(s)/female
153615-64 years: 1.04 male(s)/female
153765 years and over: 0.91 male(s)/female
1538total population: 1.03 male(s)/female (2000 est.)</Sexratio>
1539<Religions>Roman Catholic 95%</Religions>
1540<Countryname>Dominican Republic </Countryname>
1541<Capital>Santo Domingo</Capital>
1542<Flagdescription>a centered white cross that extends to the edges divides the flag into four rectangles - the top ones are blue (hoist side) and red, and the bottom ones are red (hoist side) and blue; a small coat of arms is at the center of the cross</Flagdescription>
1543<GDP>purchasing power parity - $43.7 billion (1999 est.)</GDP>
1544<Industries>tourism, sugar processing, ferronickel and gold mining, textiles, cement, tobacco</Industries>
1545<Exports>$5.1 billion (f.o.b., 1999)</Exports>
1546<Imports>$8.2 billion (f.o.b., 1999)</Imports>
1547<Currency>1 Dominican peso (RD$) = 100 centavos</Currency>
1548<Airports>28 (1999 est.)</Airports>
1549<Illicitdrugs>transshipment point for South American drugs destined for the US and Europe</Illicitdrugs>
1550</record>
1551<record>
1552<Location>Western South America, bordering the Pacific Ocean at the Equator, between Colombia and Peru</Location>
1553<Geographiccoordinates>2 00 S, 77 30 W</Geographiccoordinates>
1554<Area>283560</Area>
1555<Climate>tropical along coast, becoming cooler inland at higher elevations; tropical in Amazonian jungle lowlands</Climate>
1556<Naturalresources>petroleum, fish, timber, hydropower</Naturalresources>
1557<Population>12920092</Population>
1558<Populationgrowthrate>2.04% (2000 est.)</Populationgrowthrate>
1559<Sexratio>
1560at birth: 1.05 male(s)/female
1561under 15 years: 1.03 male(s)/female
156215-64 years: 0.98 male(s)/female
156365 years and over: 0.87 male(s)/female
1564total population: 0.99 male(s)/female (2000 est.)</Sexratio>
1565<Religions>Roman Catholic 95%</Religions>
1566<Countryname>Ecuador </Countryname>
1567<Capital>Quito</Capital>
1568<Flagdescription>three horizontal bands of yellow (top, double width), blue, and red with the coat of arms superimposed at the center of the flag; similar to the flag of Colombia which is shorter and does not bear a coat of arms</Flagdescription>
1569<GDP>purchasing power parity - $54.5 billion (1999 est.)</GDP>
1570<Industries>petroleum, food processing, textiles, metal work, paper products, wood products, chemicals, plastics, fishing, lumber</Industries>
1571<Exports>$4.1 billion (f.o.b., 1999)</Exports>
1572<Imports>$2.8 billion (c.i.f., 1999)</Imports>
1573<Currency>1 sucre (S/) = 100 centavos</Currency>
1574<Airports>182 (1999 est.)</Airports>
1575<Illicitdrugs>significant transit country for cocaine and derivatives of coca originating in Colombia and Peru; importer of precursor chemicals used in production of illicit narcotics; important money-laundering hub; increased activity on frontiers by trafficking groups and Colombian insurgents</Illicitdrugs>
1576</record>
1577<record>
1578<Location>Northern Africa, bordering the Mediterranean Sea, between Libya and the Gaza Strip</Location>
1579<Geographiccoordinates>27 00 N, 30 00 E</Geographiccoordinates>
1580<Area>1001450</Area>
1581<Climate>desert; hot, dry summers with moderate winters</Climate>
1582<Naturalresources>petroleum, natural gas, iron ore, phosphates, manganese, limestone, gypsum, talc, asbestos, lead, zinc</Naturalresources>
1583<Population>68359979</Population>
1584<Populationgrowthrate>1.72% (2000 est.)</Populationgrowthrate>
1585<Sexratio>
1586at birth: 1.05 male(s)/female
1587under 15 years: 1.05 male(s)/female
158815-64 years: 1.02 male(s)/female
158965 years and over: 0.79 male(s)/female
1590total population: 1.02 male(s)/female (2000 est.)</Sexratio>
1591<Religions>Muslim (mostly Sunni) 94%, Coptic Christian and other 6%</Religions>
1592<Countryname>Egypt </Countryname>
1593<Capital>Cairo</Capital>
1594<Flagdescription>three equal horizontal bands of red (top), white, and black with the national emblem (a shield superimposed on a golden eagle facing the hoist side above a scroll bearing the name of the country in Arabic) centered in the white band; similar to the flag of Yemen, which has a plain white band; also similar to the flag of Syria, which has two green stars, and to the flag of Iraq, which has three green stars (plus an Arabic inscription) in a horizontal line centered in the white band</Flagdescription>
1595<GDP>purchasing power parity - $200 billion (1999 est.)</GDP>
1596<Industries>textiles, food processing, tourism, chemicals, petroleum, construction, cement, metals</Industries>
1597<Exports>$4.6 billion (f.o.b., 1999 est.)</Exports>
1598<Imports>$15.8 billion (f.o.b., 1999 est.)</Imports>
1599<Currency>1 Egyptian pound = 100 piasters</Currency>
1600<Airports>90 (1999 est.)</Airports>
1601<Illicitdrugs>a transit point for Southwest Asian and Southeast Asian heroin and opium moving to Europe, Africa, and the US; popular transit stop for Nigerian couriers</Illicitdrugs>
1602</record>
1603<record>
1604<Location>Western Europe, occupying five-sixths of the island of Ireland in the North Atlantic Ocean, west of Great Britain</Location>
1605<Geographiccoordinates>53 00 N, 8 00 W</Geographiccoordinates>
1606<Area>70280</Area>
1607<Climate>temperate maritime; modified by North Atlantic Current; mild winters, cool summers; consistently humid; overcast about half the time</Climate>
1608<Naturalresources>zinc, lead, natural gas, barite, copper, gypsum, limestone, dolomite, peat, silver</Naturalresources>
1609<Population>3797257</Population>
1610<Populationgrowthrate>1.16% (2000 est.)</Populationgrowthrate>
1611<Sexratio>
1612at birth: 1.07 male(s)/female
1613under 15 years: 1.06 male(s)/female
161415-64 years: 1 male(s)/female
161565 years and over: 0.76 male(s)/female
1616total population: 0.98 male(s)/female (2000 est.)</Sexratio>
1617<Religions>Roman Catholic 91.6%, Church of Ireland 2.5%, other 5.9% (1998)</Religions>
1618<Countryname>Ireland </Countryname>
1619<Capital>Dublin</Capital>
1620<Flagdescription>three equal vertical bands of green (hoist side), white, and orange; similar to the flag of Cote d'Ivoire, which is shorter and has the colors reversed - orange (hoist side), white, and green; also similar to the flag of Italy, which is shorter and has colors of green (hoist side), white, and red</Flagdescription>
1621<GDP>purchasing power parity - $73.7 billion (1999 est.)</GDP>
1622<Industries>food products, brewing, textiles, clothing; chemicals, pharmaceuticals, machinery, transportation equipment, glass and crystal; software</Industries>
1623<Exports>$66 billion (f.o.b., 1999 est.)</Exports>
1624<Imports>$44 billion (c.i.f., 1999 est.)</Imports>
1625<Currency>1 Irish pound = 100 pence</Currency>
1626<Airports>44 (1999 est.)</Airports>
1627<Illicitdrugs>transshipment point for and consumer of hashish from North Africa to the UK and Netherlands and of European-produced synthetic drugs; minor transshipment point for heroin and cocaine destined for Western Europe</Illicitdrugs>
1628</record>
1629<record>
1630<Location>Western Africa, bordering the Bight of Biafra, between Cameroon and Gabon</Location>
1631<Geographiccoordinates>2 00 N, 10 00 E</Geographiccoordinates>
1632<Area>28051</Area>
1633<Climate>tropical; always hot, humid</Climate>
1634<Naturalresources>oil, petroleum, timber, small unexploited deposits of gold, manganese, uranium</Naturalresources>
1635<Population>474214</Population>
1636<Populationgrowthrate>2.47% (2000 est.)</Populationgrowthrate>
1637<Sexratio>
1638at birth: 1.03 male(s)/female
1639under 15 years: 1.01 male(s)/female
164015-64 years: 0.91 male(s)/female
164165 years and over: 0.81 male(s)/female
1642total population: 0.95 male(s)/female (2000 est.)</Sexratio>
1643<Religions>nominally Christian and predominantly Roman Catholic, pagan practices</Religions>
1644<Countryname>Equatorial Guinea </Countryname>
1645<Capital>Malabo</Capital>
1646<Flagdescription>three equal horizontal bands of green (top), white, and red with a blue isosceles triangle based on the hoist side and the coat of arms centered in the white band; the coat of arms has six yellow six-pointed stars (representing the mainland and five offshore islands) above a gray shield bearing a silk-cotton tree and below which is a scroll with the motto UNIDAD, PAZ, JUSTICIA (Unity, Peace, Justice)</Flagdescription>
1647<GDP>purchasing power parity - $960 million (1999 est.)</GDP>
1648<Industries>petroleum, fishing, sawmilling, natural gas</Industries>
1649<Exports>$555 million (f.o.b., 1999)</Exports>
1650<Imports>$300 million (f.o.b., 1999)</Imports>
1651<Currency>1 Communaute Financiere Africaine franc (CFAF) = 100 centimes</Currency>
1652<Airports>3 (1999 est.)</Airports>
1653</record>
1654<record>
1655<Location>Eastern Europe, bordering the Baltic Sea and Gulf of Finland, between Latvia and Russia</Location>
1656<Geographiccoordinates>59 00 N, 26 00 E</Geographiccoordinates>
1657<Area>45226</Area>
1658<Climate>maritime, wet, moderate winters, cool summers</Climate>
1659<Naturalresources>shale oil (kukersite), peat, phosphorite, amber, cambrian blue clay, limestone, dolomite, arable land</Naturalresources>
1660<Population>1431471</Population>
1661<Populationgrowthrate>-0.59% (2000 est.)</Populationgrowthrate>
1662<Sexratio>
1663at birth: 1.05 male(s)/female
1664under 15 years: 1.04 male(s)/female
166515-64 years: 0.93 male(s)/female
166665 years and over: 0.48 male(s)/female
1667total population: 0.87 male(s)/female (2000 est.)</Sexratio>
1668<Religions>Evangelical Lutheran, Russian Orthodox, Estonian Orthodox, Baptist, Methodist, Seventh-Day Adventist, Roman Catholic, Pentecostal, Word of Life, Jewish</Religions>
1669<Countryname>Estonia </Countryname>
1670<Capital>Tallinn</Capital>
1671<Flagdescription>pre-1940 flag restored by Supreme Soviet in May 1990 - three equal horizontal bands of blue (top), black, and white</Flagdescription>
1672<GDP>purchasing power parity - $7.9 billion (1999 est.)</GDP>
1673<Industries>oil shale, shipbuilding, phosphates, electric motors, excavators, cement, furniture, clothing, textiles, paper, shoes, apparel</Industries>
1674<Exports>$2.5 billion (f.o.b., 1999)</Exports>
1675<Imports>$3.4 billion (f.o.b., 1999)</Imports>
1676<Currency>1 Estonian kroon (EEK) = 100 sents</Currency>
1677<Airports>5 (1997 est.)</Airports>
1678<Illicitdrugs>transshipment point for opiates and cannabis from Southwest Asia and the Caucasus via Russia, cocaine from Latin America to Western Europe and Scandinavia, and synthetic drugs from Western Europe to Scandinavia; possible precursor manufacturing and/or trafficking</Illicitdrugs>
1679</record>
1680<record>
1681<Location>Eastern Africa, bordering the Red Sea, between Djibouti and Sudan</Location>
1682<Geographiccoordinates>15 00 N, 39 00 E</Geographiccoordinates>
1683<Area>121320</Area>
1684<Climate>hot, dry desert strip along Red Sea coast; cooler and wetter in the central highlands (up to 61 cm of rainfall annually); semiarid in western hills and lowlands; rainfall heaviest during June-September except in coastal desert</Climate>
1685<Naturalresources>gold, potash, zinc, copper, salt, possibly oil and natural gas, fish</Naturalresources>
1686<Population>4135933</Population>
1687<Populationgrowthrate>3.86% (2000 est.)</Populationgrowthrate>
1688<Sexratio>
1689at birth: 1.03 male(s)/female
1690under 15 years: 1.01 male(s)/female
169115-64 years: 0.98 male(s)/female
169265 years and over: 1.04 male(s)/female
1693total population: 0.99 male(s)/female (2000 est.)</Sexratio>
1694<Religions>Muslim, Coptic Christian, Roman Catholic, Protestant</Religions>
1695<Countryname>Eritrea </Countryname>
1696<Capital>Asmara (formerly Asmera)</Capital>
1697<Flagdescription>red isosceles triangle (based on the hoist side) dividing the flag into two right triangles; the upper triangle is green, the lower one is blue; a gold wreath encircling a gold olive branch is centered on the hoist side of the red triangle</Flagdescription>
1698<GDP>purchasing power parity - $2.9 billion (1999 est.)</GDP>
1699<Industries>food processing, beverages, clothing and textiles</Industries>
1700<Exports>$52.9 million (f.o.b., 1997)</Exports>
1701<Imports>$489.4 million (c.i.f., 1997)</Imports>
1702<Currency>1 nafka = 100 cents</Currency>
1703<Airports>21 (1999 est.)</Airports>
1704</record>
1705<record>
1706<Location>Middle America, bordering the North Pacific Ocean, between Guatemala and Honduras</Location>
1707<Geographiccoordinates>13 50 N, 88 55 W</Geographiccoordinates>
1708<Area>21040</Area>
1709<Climate>tropical; rainy season (May to October); dry season (November to April); tropical on coast; temperate in uplands</Climate>
1710<Naturalresources>hydropower, geothermal power, petroleum, arable land</Naturalresources>
1711<Population>6122515</Population>
1712<Populationgrowthrate>1.87% (2000 est.)</Populationgrowthrate>
1713<Sexratio>
1714at birth: 1.05 male(s)/female
1715under 15 years: 1.04 male(s)/female
171615-64 years: 0.9 male(s)/female
171765 years and over: 0.83 male(s)/female
1718total population: 0.95 male(s)/female (2000 est.)</Sexratio>
1719<Religions>Roman Catholic 86%
1720note: there is extensive activity by Protestant groups throughout the country; by the end of 1992, there were an estimated 1 million Protestant evangelicals in El Salvador</Religions>
1721<Countryname>El Salvador </Countryname>
1722<Capital>San Salvador</Capital>
1723<Flagdescription>three equal horizontal bands of blue (top), white, and blue with the national coat of arms centered in the white band; the coat of arms features a round emblem encircled by the words REPUBLICA DE EL SALVADOR EN LA AMERICA CENTRAL; similar to the flag of Nicaragua, which has a different coat of arms centered in the white band - it features a triangle encircled by the words REPUBLICA DE NICARAGUA on top and AMERICA CENTRAL on the bottom; also similar to the flag of Honduras, which has five blue stars arranged in an X pattern centered in the white band</Flagdescription>
1724<GDP>purchasing power parity - $18.1 billion (1999 est.)</GDP>
1725<Industries>food processing, beverages, petroleum, chemicals, fertilizer, textiles, furniture, light metals</Industries>
1726<Exports>$2.5 billion (f.o.b., 1999)</Exports>
1727<Imports>$4.15 billion (c.i.f., 1999)</Imports>
1728<Currency>1 Salvadoran colon (C) = 100 centavos</Currency>
1729<Airports>85 (1999 est.)</Airports>
1730<Illicitdrugs>transshipment point for cocaine; marijuana produced for local consumption; domestic drug abuse on the rise</Illicitdrugs>
1731</record>
1732<record>
1733<Location>Eastern Africa, west of Somalia</Location>
1734<Geographiccoordinates>8 00 N, 38 00 E</Geographiccoordinates>
1735<Area>1127127</Area>
1736<Climate>tropical monsoon with wide topographic-induced variation</Climate>
1737<Naturalresources>small reserves of gold, platinum, copper, potash, natural gas, hydropower</Naturalresources>
1738<Population>64117452</Population>
1739<Populationgrowthrate>2.76% (2000 est.)</Populationgrowthrate>
1740<Sexratio>
1741at birth: 1.03 male(s)/female
1742under 15 years: 1.01 male(s)/female
174315-64 years: 1.01 male(s)/female
174465 years and over: 0.84 male(s)/female
1745total population: 1.01 male(s)/female (2000 est.)</Sexratio>
1746<Religions>Muslim 45%-50%, Ethiopian Orthodox 35%-40%, animist 12%, other 3%-8%</Religions>
1747<Countryname>Ethiopia </Countryname>
1748<Capital>Addis Ababa</Capital>
1749<Flagdescription>three equal horizontal bands of green (top), yellow, and red with a yellow pentagram and single yellow rays emanating from the angles between the points on a light blue disk centered on the three bands; Ethiopia is the oldest independent country in Africa, and the colors of her flag were so often adopted by other African countries upon independence that they became known as the pan-African colors</Flagdescription>
1750<GDP>purchasing power parity - $33.3 billion (1999 est.)</GDP>
1751<Industries>food processing, beverages, textiles, chemicals, metals processing, cement</Industries>
1752<Exports>$420 million (f.o.b., 1998)</Exports>
1753<Imports>$1.25 billion (f.o.b., 1998 est.)</Imports>
1754<Currency>1 birr (Br) = 100 cents</Currency>
1755<Airports>85 (1999 est.)</Airports>
1756<Illicitdrugs>transit hub for heroin originating in Southwest and Southeast Asia and destined for Europe and North America as well as cocaine destined for markets in southern Africa; cultivates qat (chat) for local use and regional export, principally to Djibouti and Somalia</Illicitdrugs>
1757</record>
1758<record>
1759<Location>Southern Africa, island in the Mozambique Channel, about one-half of the way from southern Madagascar to southern Mozambique</Location>
1760<Geographiccoordinates>22 20 S, 40 22 E</Geographiccoordinates>
1761<Area>28</Area>
1762<Climate>tropical</Climate>
1763<Naturalresources>NEGL</Naturalresources>
1764<Population></Population>
1765<Countryname>Europa Island </Countryname>
1766<Flagdescription>the flag of France is used</Flagdescription>
1767<Airports>1 (1999 est.)</Airports>
1768</record>
1769<record>
1770<Location>Central Europe, southeast of Germany</Location>
1771<Geographiccoordinates>49 45 N, 15 30 E</Geographiccoordinates>
1772<Area>78866</Area>
1773<Climate>temperate; cool summers; cold, cloudy, humid winters</Climate>
1774<Naturalresources>hard coal, soft coal, kaolin, clay, graphite, timber</Naturalresources>
1775<Population>10272179</Population>
1776<Populationgrowthrate>-0.08% (2000 est.)</Populationgrowthrate>
1777<Sexratio>
1778at birth: 1.05 male(s)/female
1779under 15 years: 1.05 male(s)/female
178015-64 years: 1 male(s)/female
178165 years and over: 0.62 male(s)/female
1782total population: 0.95 male(s)/female (2000 est.)</Sexratio>
1783<Religions>atheist 39.8%, Roman Catholic 39.2%, Protestant 4.6%, Orthodox 3%, other 13.4%</Religions>
1784<Countryname>Czech Republic </Countryname>
1785<Capital>Prague</Capital>
1786<Flagdescription>two equal horizontal bands of white (top) and red with a blue isosceles triangle based on the hoist side (almost identical to the flag of the former Czechoslovakia)</Flagdescription>
1787<GDP>purchasing power parity - $120.8 billion (1999 est.)</GDP>
1788<Industries>fuels, ferrous metallurgy, machinery and equipment, coal, motor vehicles, glass, armaments</Industries>
1789<Exports>$26.9 billion (f.o.b., 1999)</Exports>
1790<Imports>$29 billion (f.o.b., 1999)</Imports>
1791<Currency>1 koruna (Kc) = 100 haleru</Currency>
1792<Airports>114 (1999 est.)</Airports>
1793<Illicitdrugs>major transshipment point for Southwest Asian heroin and minor transit point for Latin American cocaine to Western Europe; domestic consumption - especially of locally produced synthetic drugs - on the rise</Illicitdrugs>
1794</record>
1795<record>
1796<Location>Southern South America, islands in the South Atlantic Ocean, east of southern Argentina</Location>
1797<Geographiccoordinates>51 45 S, 59 00 W</Geographiccoordinates>
1798<Area>12173</Area>
1799<Climate>cold marine; strong westerly winds, cloudy, humid; rain occurs on more than half of days in year; occasional snow all year, except in January and February, but does not accumulate</Climate>
1800<Naturalresources>fish, wildlife</Naturalresources>
1801<Population>2826</Population>
1802<Populationgrowthrate>2.44% (2000 est.)</Populationgrowthrate>
1803<Religions>primarily Anglican, Roman Catholic, United Free Church, Evangelist Church, Jehovah's Witnesses, Lutheran, Seventh-Day Adventist</Religions>
1804<Countryname>Falkland Islands (Islas Malvinas) </Countryname>
1805<Capital>Stanley</Capital>
1806<Flagdescription>blue with the flag of the UK in the upper hoist-side quadrant and the Falkland Island coat of arms in a white disk centered on the outer half of the flag; the coat of arms contains a white ram (sheep raising is the major economic activity) above the sailing ship Desire (whose crew discovered the islands) with a scroll at the bottom bearing the motto DESIRE THE RIGHT</Flagdescription>
1807<GDP>purchasing power parity - $NA</GDP>
1808<Industries>wool and fish processing; sale of stamps and coins</Industries>
1809<Exports>$7.6 million (1995)</Exports>
1810<Imports>$24.7 million (1995)</Imports>
1811<Currency>1 Falkland pound = 100 pence</Currency>
1812<Airports>5 (1999 est.)</Airports>
1813</record>
1814<record>
1815<Location>Northern South America, bordering the North Atlantic Ocean, between Brazil and Suriname</Location>
1816<Geographiccoordinates>4 00 N, 53 00 W</Geographiccoordinates>
1817<Area>91000</Area>
1818<Climate>tropical; hot, humid; little seasonal temperature variation</Climate>
1819<Naturalresources>bauxite, timber, gold (widely scattered), cinnabar, kaolin, fish</Naturalresources>
1820<Population>172605</Population>
1821<Populationgrowthrate>2.93% (2000 est.)</Populationgrowthrate>
1822<Sexratio>
1823at birth: 1.05 male(s)/female
1824under 15 years: 1.05 male(s)/female
182515-64 years: 1.18 male(s)/female
182665 years and over: 1.02 male(s)/female
1827total population: 1.13 male(s)/female (2000 est.)</Sexratio>
1828<Religions>Roman Catholic</Religions>
1829<Countryname>French Guiana </Countryname>
1830<Capital>Cayenne</Capital>
1831<Flagdescription>the flag of France is used</Flagdescription>
1832<GDP>purchasing power parity - $1 billion (1998 est.)</GDP>
1833<Industries>construction, shrimp processing, forestry products, rum, gold mining</Industries>
1834<Exports>$155 million (f.o.b., 1997)</Exports>
1835<Imports>$625 million (c.i.f., 1997)</Imports>
1836<Currency>1 French franc (F) = 100 centimes</Currency>
1837<Airports>11 (1999 est.)</Airports>
1838<Illicitdrugs>small amount of marijuana grown for local consumption; minor transshipment point to Europe</Illicitdrugs>
1839</record>
1840<record>
1841<Location>Northern Europe, bordering the Baltic Sea, Gulf of Bothnia, and Gulf of Finland, between Sweden and Russia</Location>
1842<Geographiccoordinates>64 00 N, 26 00 E</Geographiccoordinates>
1843<Area>337030</Area>
1844<Climate>cold temperate; potentially subarctic, but comparatively mild because of moderating influence of the North Atlantic Current, Baltic Sea, and more than 60,000 lakes</Climate>
1845<Naturalresources>timber, copper, zinc, iron ore, silver</Naturalresources>
1846<Population>5167486</Population>
1847<Populationgrowthrate>0.17% (2000 est.)</Populationgrowthrate>
1848<Sexratio>
1849at birth: 1.04 male(s)/female
1850under 15 years: 1.04 male(s)/female
185115-64 years: 1.02 male(s)/female
185265 years and over: 0.62 male(s)/female
1853total population: 0.95 male(s)/female (2000 est.)</Sexratio>
1854<Religions>Evangelical Lutheran 89%, Greek Orthodox 1%, none 9%, other 1%</Religions>
1855<Countryname>Finland </Countryname>
1856<Capital>Helsinki</Capital>
1857<Flagdescription>white with a blue cross that extends to the edges of the flag; the vertical part of the cross is shifted to the hoist side in the style of the Dannebrog (Danish flag)</Flagdescription>
1858<GDP>purchasing power parity - $108.6 billion (1999 est.)</GDP>
1859<Industries>metal products, shipbuilding, pulp and paper, copper refining, foodstuffs, chemicals, textiles, clothing</Industries>
1860<Exports>$43 billion (f.o.b., 1998)</Exports>
1861<Imports>$30.7 billion (f.o.b., 1998)</Imports>
1862<Currency>1 markka (FMk) or Finmark = 100 pennia</Currency>
1863<Airports>157 (1999 est.)</Airports>
1864</record>
1865<record>
1866<Location>Oceania, island group in the South Pacific Ocean, about two-thirds of the way from Hawaii to New Zealand</Location>
1867<Geographiccoordinates>18 00 S, 175 00 E</Geographiccoordinates>
1868<Area>18270</Area>
1869<Climate>tropical marine; only slight seasonal temperature variation</Climate>
1870<Naturalresources>timber, fish, gold, copper, offshore oil potential, hydropower</Naturalresources>
1871<Population>832494</Population>
1872<Populationgrowthrate>1.41% (2000 est.)</Populationgrowthrate>
1873<Sexratio>
1874at birth: 1.05 male(s)/female
1875under 15 years: 1.04 male(s)/female
187615-64 years: 1 male(s)/female
187765 years and over: 0.88 male(s)/female
1878total population: 1.01 male(s)/female (2000 est.)</Sexratio>
1879<Religions>Christian 52% (Methodist 37%, Roman Catholic 9%), Hindu 38%, Muslim 8%, other 2%
1880note: Fijians are mainly Christian, Indians are Hindu, and there is a Muslim minority (1986)</Religions>
1881<Countryname>Fiji </Countryname>
1882<Capital>Suva</Capital>
1883<Flagdescription>light blue with the flag of the UK in the upper hoist-side quadrant and the Fijian shield centered on the outer half of the flag; the shield depicts a yellow lion above a white field quartered by the cross of Saint George featuring stalks of sugarcane, a palm tree, bananas, and a white dove</Flagdescription>
1884<GDP>purchasing power parity - $5.9 billion (1999 est.)</GDP>
1885<Industries>tourism, sugar, clothing, copra, gold, silver, lumber, small cottage industries</Industries>
1886<Exports>$393 million (f.o.b., 1998)</Exports>
1887<Imports>$612 million (f.o.b., 1998)</Imports>
1888<Currency>1 Fijian dollar (F$) = 100 cents</Currency>
1889<Airports>25 (1999 est.)</Airports>
1890</record>
1891<record>
1892<Location>Oceania, island group in the North Pacific Ocean, about three-quarters of the way from Hawaii to Indonesia</Location>
1893<Geographiccoordinates>6 55 N, 158 15 E</Geographiccoordinates>
1894<Area>702</Area>
1895<Climate>tropical; heavy year-round rainfall, especially in the eastern islands; located on southern edge of the typhoon belt with occasionally severe damage</Climate>
1896<Naturalresources>forests, marine products, deep-seabed minerals</Naturalresources>
1897<Population>133144</Population>
1898<Populationgrowthrate>3.28% (2000 est.)</Populationgrowthrate>
1899<Religions>Roman Catholic 50%, Protestant 47%, other and none 3%</Religions>
1900<Countryname>Federated States of Micronesia </Countryname>
1901<Capital>Palikir</Capital>
1902<Flagdescription>light blue with four white five-pointed stars centered; the stars are arranged in a diamond pattern</Flagdescription>
1903<GDP>purchasing power parity - $240 million (1997 est.)
1904note: GDP is supplemented by grant aid, averaging perhaps $100 million annually</GDP>
1905<Industries>tourism, construction, fish processing, craft items from shell, wood, and pearls</Industries>
1906<Exports>$73 million (f.o.b., 1996 est.)</Exports>
1907<Imports>$168 million (c.i.f., 1996 est.)</Imports>
1908<Currency>1 United States dollar (US$) = 100 cents</Currency>
1909<Airports>6 (1999 est.)</Airports>
1910</record>
1911<record>
1912<Location>Northern Europe, island group between the Norwegian Sea and the north Atlantic Ocean, about one-half of the way from Iceland to Norway</Location>
1913<Geographiccoordinates>62 00 N, 7 00 W</Geographiccoordinates>
1914<Area>1399</Area>
1915<Climate>mild winters, cool summers; usually overcast; foggy, windy</Climate>
1916<Naturalresources>fish, whales, hydropower</Naturalresources>
1917<Population>45296</Population>
1918<Populationgrowthrate>0.83% (2000 est.)</Populationgrowthrate>
1919<Sexratio>
1920at birth: 1.05 male(s)/female
1921under 15 years: 1.01 male(s)/female
192215-64 years: 1.14 male(s)/female
192365 years and over: 0.81 male(s)/female
1924total population: 1.06 male(s)/female (2000 est.)</Sexratio>
1925<Religions>Evangelical Lutheran</Religions>
1926<Countryname>Faroe Islands </Countryname>
1927<Capital>Torshavn</Capital>
1928<Flagdescription>white with a red cross outlined in blue that extends to the edges of the flag; the vertical part of the cross is shifted to the hoist side in the style of the Dannebrog (Danish flag)</Flagdescription>
1929<GDP>purchasing power parity - $700 million (1996 est.)</GDP>
1930<Industries>fishing, shipbuilding, construction, handicrafts</Industries>
1931<Exports>$362 million (f.o.b., 1995)</Exports>
1932<Imports>$315.6 million (c.i.f., 1995)</Imports>
1933<Currency>1 Danish krone (DKr) = 100 oere</Currency>
1934<Airports>1 (1999 est.)</Airports>
1935</record>
1936<record>
1937<Location>Oceania, archipelago in the South Pacific Ocean, about one-half of the way from South America to Australia</Location>
1938<Geographiccoordinates>15 00 S, 140 00 W</Geographiccoordinates>
1939<Area>4167</Area>
1940<Climate>tropical, but moderate</Climate>
1941<Naturalresources>timber, fish, cobalt, hydropower</Naturalresources>
1942<Population>249110</Population>
1943<Populationgrowthrate>1.78% (2000 est.)</Populationgrowthrate>
1944<Sexratio>
1945at birth: 1.05 male(s)/female
1946under 15 years: 1.04 male(s)/female
194715-64 years: 1.09 male(s)/female
194865 years and over: 1.01 male(s)/female
1949total population: 1.07 male(s)/female (2000 est.)</Sexratio>
1950<Religions>Protestant 54%, Roman Catholic 30%, other 16%</Religions>
1951<Countryname>French Polynesia </Countryname>
1952<Capital>Papeete</Capital>
1953<Flagdescription>two narrow red horizontal bands encase a wide white band; centered on the white band is a disk with blue and white wave pattern on the lower half and gold and white ray pattern on the upper half; a stylized red, blue and white ship rides on the wave pattern; the French flag is used for official occasions</Flagdescription>
1954<GDP>purchasing power parity - $2.6 billion (1997 est.)</GDP>
1955<Industries>tourism, pearls, agricultural processing, handicrafts</Industries>
1956<Exports>$212 million (f.o.b., 1996)</Exports>
1957<Imports>$860 million (c.i.f., 1996)</Imports>
1958<Currency>1 Comptoirs Francais du Pacifique franc (CFPF) = 100 centimes</Currency>
1959<Airports>45 (1999 est.)</Airports>
1960</record>
1961<record>
1962<Location>Oceania, atoll in the North Pacific Ocean, about one-half of the way from Hawaii to Australia</Location>
1963<Geographiccoordinates>0 13 N, 176 31 W</Geographiccoordinates>
1964<Area>1</Area>
1965<Climate>equatorial; scant rainfall, constant wind, burning sun</Climate>
1966<Naturalresources>guano (deposits worked until 1891)</Naturalresources>
1967<Population></Population>
1968<Countryname>Baker Island </Countryname>
1969<Flagdescription>the flag of the US is used</Flagdescription>
1970<Airports>1 abandoned World War II runway of 1,665 m, completely covered with vegetation and unusable</Airports>
1971</record>
1972<record>
1973<Location>Western Europe, bordering the Bay of Biscay and English Channel, between Belgium and Spain, southeast of the UK; bordering the Mediterranean Sea, between Italy and Spain</Location>
1974<Geographiccoordinates>46 00 N, 2 00 E</Geographiccoordinates>
1975<Area>547030</Area>
1976<Climate>generally cool winters and mild summers, but mild winters and hot summers along the Mediterranean</Climate>
1977<Naturalresources>coal, iron ore, bauxite, fish, timber, zinc, potash</Naturalresources>
1978<Population>59329691</Population>
1979<Populationgrowthrate>0.38% (2000 est.)</Populationgrowthrate>
1980<Sexratio>
1981at birth: 1.05 male(s)/female
1982under 15 years: 1.05 male(s)/female
198315-64 years: 1 male(s)/female
198465 years and over: 0.68 male(s)/female
1985total population: 0.95 male(s)/female (2000 est.)</Sexratio>
1986<Religions>Roman Catholic 90%, Protestant 2%, Jewish 1%, Muslim (North African workers) 1%, unaffiliated 6%</Religions>
1987<Countryname>France </Countryname>
1988<Capital>Paris</Capital>
1989<Flagdescription>three equal vertical bands of blue (hoist side), white, and red; known as the French Tricouleur (Tricolor); the design and colors are similar to a number of other flags, including those of Belgium, Chad, Ireland, Cote d'Ivoire, and Luxembourg; the official flag for all French dependent areas</Flagdescription>
1990<GDP>purchasing power parity - $1.373 trillion (1999 est.)</GDP>
1991<Industries>steel, machinery, chemicals, automobiles, metallurgy, aircraft, electronics, mining; textiles, food processing; tourism</Industries>
1992<Exports>$304.7 billion (f.o.b., 1999)</Exports>
1993<Imports>$280.8 billion (f.o.b., 1999)</Imports>
1994<Currency>1 French franc (F) = 100 centimes</Currency>
1995<Airports>474 (1999 est.)</Airports>
1996<Illicitdrugs>transshipment point for and consumer of South American cocaine and Southwest Asian heroin</Illicitdrugs>
1997</record>
1998<record>
1999<Location>south of Africa, islands in the southern Indian Ocean, about equidistant between Africa, Antarctica, and Australia; note - French Southern and Antarctic Lands includes Ile Amsterdam, Ile Saint-Paul, Iles Crozet, and Iles Kerguelen in the southern Indian Ocean, along with the French-claimed sector of Antarctica, "Adelie Land"; the US does not recognize the French claim to "Adelie Land"</Location>
2000<Geographiccoordinates>43 00 S, 67 00 E</Geographiccoordinates>
2001<Area>7781</Area>
2002<Climate>antarctic</Climate>
2003<Naturalresources>fish, crayfish</Naturalresources>
2004<Population></Population>
2005<Countryname>French Southern and Antarctic Lands </Countryname>
2006<Flagdescription>the flag of France is used</Flagdescription>
2007<Airports>none</Airports>
2008</record>
2009<record>
2010<Location>Western Africa, bordering the North Atlantic Ocean and Senegal</Location>
2011<Geographiccoordinates>13 28 N, 16 34 W</Geographiccoordinates>
2012<Area>11300</Area>
2013<Climate>tropical; hot, rainy season (June to November); cooler, dry season (November to May)</Climate>
2014<Naturalresources>fish</Naturalresources>
2015<Population>1367124</Population>
2016<Populationgrowthrate>3.2% (2000 est.)</Populationgrowthrate>
2017<Sexratio>
2018at birth: 1.03 male(s)/female
2019under 15 years: 1.01 male(s)/female
202015-64 years: 0.98 male(s)/female
202165 years and over: 1.11 male(s)/female
2022total population: 1 male(s)/female (2000 est.)</Sexratio>
2023<Religions>Muslim 90%, Christian 9%, indigenous beliefs 1%</Religions>
2024<Countryname>The Gambia </Countryname>
2025<Capital>Banjul</Capital>
2026<Flagdescription>three equal horizontal bands of red (top), blue with white edges, and green</Flagdescription>
2027<GDP>purchasing power parity - $1.4 billion (1999 est.)</GDP>
2028<Industries>processing peanuts, fish, and hides; tourism; beverages; agricultural machinery assembly, woodworking, metalworking; clothing</Industries>
2029<Exports>$132 million (f.o.b., 1998)</Exports>
2030<Imports>$201 million (f.o.b., 1998)</Imports>
2031<Currency>1 dalasi (D) = 100 butut</Currency>
2032<Airports>1 (1999 est.)</Airports>
2033</record>
2034<record>
2035<Location>Western Africa, bordering the Atlantic Ocean at the Equator, between Republic of the Congo and Equatorial Guinea</Location>
2036<Geographiccoordinates>1 00 S, 11 45 E</Geographiccoordinates>
2037<Area>267667</Area>
2038<Climate>tropical; always hot, humid</Climate>
2039<Naturalresources>petroleum, manganese, uranium, gold, timber, iron ore, hydropower</Naturalresources>
2040<Population>1208436</Population>
2041<Populationgrowthrate>1.08% (2000 est.)</Populationgrowthrate>
2042<Sexratio>
2043at birth: 1.03 male(s)/female
2044under 15 years: 1 male(s)/female
204515-64 years: 1.02 male(s)/female
204665 years and over: 0.98 male(s)/female
2047total population: 1.01 male(s)/female (2000 est.)</Sexratio>
2048<Religions>Christian 55%-75%, Muslim less than 1%, animist</Religions>
2049<Countryname>Gabon </Countryname>
2050<Capital>Libreville</Capital>
2051<Flagdescription>three equal horizontal bands of green (top), yellow, and blue</Flagdescription>
2052<GDP>purchasing power parity - $7.9 billion (1999 est.)</GDP>
2053<Industries>food and beverage; textile; lumbering and plywood; cement; petroleum extraction and refining; manganese, uranium, and gold mining; chemicals; ship repair</Industries>
2054<Exports>$2.4 billion (f.o.b., 1999 est.)</Exports>
2055<Imports>$1.2 billion (f.o.b., 1999 est.)</Imports>
2056<Currency>1 Communaute Financiere Africaine franc (CFAF) = 100 centimes</Currency>
2057<Airports>61 (1999 est.)</Airports>
2058</record>
2059<record>
2060<Location>Southwestern Asia, bordering the Black Sea, between Turkey and Russia</Location>
2061<Geographiccoordinates>42 00 N, 43 30 E</Geographiccoordinates>
2062<Area>69700</Area>
2063<Climate>warm and pleasant; Mediterranean-like on Black Sea coast</Climate>
2064<Naturalresources>forests, hydropower, manganese deposits, iron ore, copper, minor coal and oil deposits; coastal climate and soils allow for important tea and citrus growth</Naturalresources>
2065<Population>5019538</Population>
2066<Populationgrowthrate>-0.62% (2000 est.)</Populationgrowthrate>
2067<Sexratio>
2068at birth: 1.05 male(s)/female
2069under 15 years: 1.04 male(s)/female
207015-64 years: 0.93 male(s)/female
207165 years and over: 0.63 male(s)/female
2072total population: 0.91 male(s)/female (2000 est.)</Sexratio>
2073<Religions>Georgian Orthodox 65%, Muslim 11%, Russian Orthodox 10%, Armenian Apostolic 8%, unknown 6%</Religions>
2074<Countryname>Georgia </Countryname>
2075<Capital>T'bilisi</Capital>
2076<Flagdescription>maroon field with small rectangle in upper hoist side corner; rectangle divided horizontally with black on top, white below</Flagdescription>
2077<GDP>purchasing power parity - $11.7 billion (1999 est.)</GDP>
2078<Industries>steel, aircraft, machine tools, electric locomotives, trucks, tractors, textiles, shoes, chemicals, wood products, wine</Industries>
2079<Exports>$330 million (1999 est.)</Exports>
2080<Imports>$840 million (1999 est.)</Imports>
2081<Currency>1 lari (GEL) = 100 tetri</Currency>
2082<Airports>28 (1994 est.)</Airports>
2083<Illicitdrugs>limited cultivation of cannabis and opium poppy, mostly for domestic consumption; used as transshipment point for opiates via Central Asia to Western Europe and Russia</Illicitdrugs>
2084</record>
2085<record>
2086<Location>Western Africa, bordering the Gulf of Guinea, between Cote d'Ivoire and Togo</Location>
2087<Geographiccoordinates>8 00 N, 2 00 W</Geographiccoordinates>
2088<Area>238540</Area>
2089<Climate>tropical; warm and comparatively dry along southeast coast; hot and humid in southwest; hot and dry in north</Climate>
2090<Naturalresources>gold, timber, industrial diamonds, bauxite, manganese, fish, rubber, hydropower</Naturalresources>
2091<Population>19533560</Population>
2092<Populationgrowthrate>1.87% (2000 est.)</Populationgrowthrate>
2093<Sexratio>
2094at birth: 1.03 male(s)/female
2095under 15 years: 1.01 male(s)/female
209615-64 years: 0.98 male(s)/female
209765 years and over: 0.91 male(s)/female
2098total population: 0.99 male(s)/female (2000 est.)</Sexratio>
2099<Religions>indigenous beliefs 38%, Muslim 30%, Christian 24%, other 8%</Religions>
2100<Countryname>Ghana </Countryname>
2101<Capital>Accra</Capital>
2102<Flagdescription>three equal horizontal bands of red (top), yellow, and green with a large black five-pointed star centered in the yellow band; uses the popular pan-African colors of Ethiopia; similar to the flag of Bolivia, which has a coat of arms centered in the yellow band</Flagdescription>
2103<GDP>purchasing power parity - $35.5 billion (1999 est.)</GDP>
2104<Industries>mining, lumbering, light manufacturing, aluminum smelting, food processing</Industries>
2105<Exports>$1.7 billion (f.o.b., 1999)</Exports>
2106<Imports>$2.5 billion (f.o.b., 1999)</Imports>
2107<Currency>1 new cedi (C) = 100 pesewas</Currency>
2108<Airports>12 (1999 est.)</Airports>
2109<Illicitdrugs>illicit producer of cannabis for the international drug trade; transit hub for Southwest and Southeast Asian heroin and South American cocaine destined for Europe and the US</Illicitdrugs>
2110</record>
2111<record>
2112<Location>Southwestern Europe, bordering the Strait of Gibraltar, which links the Mediterranean Sea and the North Atlantic Ocean, on the southern coast of Spain</Location>
2113<Geographiccoordinates>36 11 N, 5 22 W</Geographiccoordinates>
2114<Area>6</Area>
2115<Climate>Mediterranean with mild winters and warm summers</Climate>
2116<Naturalresources>NEGL</Naturalresources>
2117<Population>29481</Population>
2118<Populationgrowthrate>0.91% (2000 est.)</Populationgrowthrate>
2119<Sexratio>
2120at birth: 1.05 male(s)/female
2121under 15 years: 1.05 male(s)/female
212215-64 years: 1.14 male(s)/female
212365 years and over: 0.72 male(s)/female
2124total population: 1.05 male(s)/female (2000 est.)</Sexratio>
2125<Religions>Roman Catholic 76.9%, Church of England 6.9%, Muslim 6.9%, Jewish 2.3%, none or other 7% (1991)</Religions>
2126<Countryname>Gibraltar </Countryname>
2127<Capital>Gibraltar</Capital>
2128<Flagdescription>two horizontal bands of white (top, double width) and red with a three-towered red castle in the center of the white band; hanging from the castle gate is a gold key centered in the red band</Flagdescription>
2129<GDP>purchasing power parity - $500 million (1997 est.)</GDP>
2130<Industries>tourism, banking and finance, ship-building and repairing; support to large UK naval and air bases; tobacco, mineral water, beer, canned fish</Industries>
2131<Exports>$81.1 million (f.o.b., 1997)</Exports>
2132<Imports>$492 million (c.i.f., 1997)</Imports>
2133<Currency>1 Gibraltar pound = 100 pence</Currency>
2134<Airports>1 (1999 est.)</Airports>
2135</record>
2136<record>
2137<Location>Caribbean, island between the Caribbean Sea and Atlantic Ocean, north of Trinidad and Tobago</Location>
2138<Geographiccoordinates>12 07 N, 61 40 W</Geographiccoordinates>
2139<Area>340</Area>
2140<Climate>tropical; tempered by northeast trade winds</Climate>
2141<Naturalresources>timber, tropical fruit, deepwater harbors</Naturalresources>
2142<Population>89018</Population>
2143<Populationgrowthrate>-0.36% (2000 est.)</Populationgrowthrate>
2144<Sexratio>
2145at birth: 1.02 male(s)/female
2146under 15 years: 1.03 male(s)/female
214715-64 years: 1.12 male(s)/female
214865 years and over: 0.83 male(s)/female
2149total population: 1.07 male(s)/female (2000 est.)</Sexratio>
2150<Religions>Roman Catholic 53%, Anglican 13.8%, other Protestant 33.2%</Religions>
2151<Countryname>Grenada </Countryname>
2152<Capital>Saint George's</Capital>
2153<Flagdescription>a rectangle divided diagonally into yellow triangles (top and bottom) and green triangles (hoist side and outer side), with a red border around the flag; there are seven yellow, five-pointed stars with three centered in the top red border, three centered in the bottom red border, and one on a red disk superimposed at the center of the flag; there is also a symbolic nutmeg pod on the hoist-side triangle (Grenada is the world's second-largest producer of nutmeg, after Indonesia); the seven stars represent the seven administrative divisions</Flagdescription>
2154<GDP>purchasing power parity - $360 million (1999 est.)</GDP>
2155<Industries>food and beverages, textiles, light assembly operations, tourism, construction</Industries>
2156<Exports>$26.8 million (1998)</Exports>
2157<Imports>$200 million (1998)</Imports>
2158<Currency>1 East Caribbean dollar (EC$) = 100 cents</Currency>
2159<Airports>3 (1999 est.)</Airports>
2160<Illicitdrugs>small-scale cannabis cultivation; lesser transshipment point for marijuana and cocaine to US</Illicitdrugs>
2161</record>
2162<record>
2163<Location>Western Europe, islands in the English Channel, northwest of France</Location>
2164<Geographiccoordinates>49 28 N, 2 35 W</Geographiccoordinates>
2165<Area>194</Area>
2166<Climate>temperate with mild winters and cool summers; about 50% of days are overcast</Climate>
2167<Naturalresources>cropland</Naturalresources>
2168<Population>64080</Population>
2169<Populationgrowthrate>0.42% (2000 est.)</Populationgrowthrate>
2170<Sexratio>
2171at birth: 1.04 male(s)/female
2172under 15 years: 1.03 male(s)/female
217315-64 years: 0.98 male(s)/female
217465 years and over: 0.7 male(s)/female
2175total population: 0.93 male(s)/female (2000 est.)</Sexratio>
2176<Religions>Anglican, Roman Catholic, Presbyterian, Baptist, Congregational, Methodist</Religions>
2177<Countryname>Guernsey </Countryname>
2178<Capital>Saint Peter Port</Capital>
2179<Flagdescription>white with the red cross of Saint George (patron saint of England) extending to the edges of the flag and a yellow equal-armed cross of William the Conqueror superimposed on the Saint George cross</Flagdescription>
2180<GDP>purchasing power parity - $1.15 billion (1997 est.)</GDP>
2181<Industries>tourism, banking</Industries>
2182<Exports>$NA</Exports>
2183<Imports>$NA</Imports>
2184<Currency>1 Guernsey pound = 100 pence</Currency>
2185<Airports>2 (1999 est.)</Airports>
2186</record>
2187<record>
2188<Location>Northern North America, island between the Arctic Ocean and the North Atlantic Ocean, northeast of Canada</Location>
2189<Geographiccoordinates>72 00 N, 40 00 W</Geographiccoordinates>
2190<Area>2175600</Area>
2191<Climate>arctic to subarctic; cool summers, cold winters</Climate>
2192<Naturalresources>zinc, lead, iron ore, coal, molybdenum, gold, platinum, uranium, fish, seals, whales</Naturalresources>
2193<Population>56309</Population>
2194<Populationgrowthrate>0.09% (2000 est.)</Populationgrowthrate>
2195<Sexratio>
2196at birth: 1 male(s)/female
2197under 15 years: 1.03 male(s)/female
219815-64 years: 1.21 male(s)/female
219965 years and over: 0.81 male(s)/female
2200total population: 1.13 male(s)/female (2000 est.)</Sexratio>
2201<Religions>Evangelical Lutheran</Religions>
2202<Countryname>Greenland </Countryname>
2203<Capital>Nuuk (Godthab)</Capital>
2204<Flagdescription>two equal horizontal bands of white (top) and red with a large disk slightly to the hoist side of center - the top half of the disk is red, the bottom half is white</Flagdescription>
2205<GDP>purchasing power parity - $945 million (1997 est.)</GDP>
2206<Industries>fish processing (mainly shrimp), handicrafts, furs, small shipyards</Industries>
2207<Exports>$363.4 million (f.o.b., 1995)</Exports>
2208<Imports>$421 million (c.i.f., 1995)</Imports>
2209<Currency>1 Danish krone (DKr) = 100 oere</Currency>
2210<Airports>14 (1999 est.)</Airports>
2211</record>
2212<record>
2213<Location>Central Europe, bordering the Baltic Sea and the North Sea, between the Netherlands and Poland, south of Denmark</Location>
2214<Geographiccoordinates>51 00 N, 9 00 E</Geographiccoordinates>
2215<Area>357021</Area>
2216<Climate>temperate and marine; cool, cloudy, wet winters and summers; occasional warm foehn wind</Climate>
2217<Naturalresources>iron ore, coal, potash, timber, lignite, uranium, copper, natural gas, salt, nickel, arable land</Naturalresources>
2218<Population>82797408</Population>
2219<Populationgrowthrate>0.29% (2000 est.)</Populationgrowthrate>
2220<Sexratio>
2221at birth: 1.06 male(s)/female
2222under 15 years: 1.05 male(s)/female
222315-64 years: 1.03 male(s)/female
222465 years and over: 0.62 male(s)/female
2225total population: 0.96 male(s)/female (2000 est.)</Sexratio>
2226<Religions>Protestant 38%, Roman Catholic 34%, Muslim 1.7%, unaffiliated or other 26.3%</Religions>
2227<Countryname>Germany </Countryname>
2228<Capital>Berlin</Capital>
2229<Flagdescription>three equal horizontal bands of black (top), red, and gold</Flagdescription>
2230<GDP>purchasing power parity - $1.864 trillion (1999 est.)</GDP>
2231<Industries>among world's largest and technologically advanced producers of iron, steel, coal, cement, chemicals, machinery, vehicles, machine tools, electronics, food and beverages; shipbuilding; textiles</Industries>
2232<Exports>$610 billion (f.o.b., 1999 est.)</Exports>
2233<Imports>$587 billion (f.o.b., 1999 est.)</Imports>
2234<Currency>1 deutsche mark (DM) = 100 pfennige</Currency>
2235<Airports>615 (1999 est.)</Airports>
2236<Illicitdrugs>source of precursor chemicals for South American cocaine processors; transshipment point for and consumer of Southwest Asian heroin, Latin American cocaine, and European-produced synthetic drugs</Illicitdrugs>
2237</record>
2238<record>
2239<Location>Southern Africa, group of islands in the Indian Ocean, northwest of Madagascar</Location>
2240<Geographiccoordinates>11 30 S, 47 20 E</Geographiccoordinates>
2241<Area>5</Area>
2242<Climate>tropical</Climate>
2243<Naturalresources>guano, coconuts</Naturalresources>
2244<Population></Population>
2245<Countryname>Glorioso Islands </Countryname>
2246<Flagdescription>the flag of France is used</Flagdescription>
2247<Airports>1 (1999 est.)</Airports>
2248</record>
2249<record>
2250<Location>Caribbean, islands in the eastern Caribbean Sea, southeast of Puerto Rico</Location>
2251<Geographiccoordinates>16 15 N, 61 35 W</Geographiccoordinates>
2252<Area>1780</Area>
2253<Climate>subtropical tempered by trade winds; moderately high humidity</Climate>
2254<Naturalresources>cultivable land, beaches and climate that foster tourism</Naturalresources>
2255<Population>426493</Population>
2256<Populationgrowthrate>1.11% (2000 est.)</Populationgrowthrate>
2257<Sexratio>
2258at birth: 1.05 male(s)/female
2259under 15 years: 1.04 male(s)/female
226015-64 years: 0.98 male(s)/female
226165 years and over: 0.73 male(s)/female
2262total population: 0.97 male(s)/female (2000 est.)</Sexratio>
2263<Religions>Roman Catholic 95%, Hindu and pagan African 4%, Protestant 1%</Religions>
2264<Countryname>Guadeloupe </Countryname>
2265<Capital>Basse-Terre</Capital>
2266<Flagdescription>three horizontal bands, a narrow green band (top), a wide red band, and a narrow green band; the green bands are separated from the red band by two narrow white stripes; a gold five-pointed star is centered in the red band toward the hoist side; the flag of France is used for official occasions</Flagdescription>
2267<GDP>purchasing power parity - $3.7 billion (1996 est.)</GDP>
2268<Industries>construction, cement, rum, sugar, tourism</Industries>
2269<Exports>$140 million (f.o.b., 1997)</Exports>
2270<Imports>$1.7 billion (c.i.f., 1997)</Imports>
2271<Currency>1 French franc (F) = 100 centimes</Currency>
2272<Airports>9 (1999 est.)</Airports>
2273</record>
2274<record>
2275<Location>Oceania, island in the North Pacific Ocean, about three-quarters of the way from Hawaii to the Philippines</Location>
2276<Geographiccoordinates>13 28 N, 144 47 E</Geographiccoordinates>
2277<Area>541</Area>
2278<Climate>tropical marine; generally warm and humid, moderated by northeast trade winds; dry season from January to June, rainy season from July to December; little seasonal temperature variation</Climate>
2279<Naturalresources>fishing (largely undeveloped), tourism (especially from Japan)</Naturalresources>
2280<Population>154623</Population>
2281<Populationgrowthrate>1.67% (2000 est.)</Populationgrowthrate>
2282<Sexratio>
2283at birth: 1.14 male(s)/female
2284under 15 years: 1.1 male(s)/female
228515-64 years: 1.11 male(s)/female
228665 years and over: 1.01 male(s)/female
2287total population: 1.1 male(s)/female (2000 est.)</Sexratio>
2288<Religions>Roman Catholic 85%, other 15% (1999 est.)</Religions>
2289<Countryname>Guam </Countryname>
2290<Capital>Hagatna (Agana)</Capital>
2291<Flagdescription>territorial flag is dark blue with a narrow red border on all four sides; centered is a red-bordered, pointed, vertical ellipse containing a beach scene, outrigger canoe with sail, and a palm tree with the word GUAM superimposed in bold red letters; US flag is the national flag</Flagdescription>
2292<GDP>purchasing power parity - $3 billion (1996 est.)</GDP>
2293<Industries>US military, tourism, construction, transshipment services, concrete products, printing and publishing, food processing, textiles</Industries>
2294<Exports>$86.1 million (f.o.b., 1992)</Exports>
2295<Imports>$202.4 million (c.i.f., 1992)</Imports>
2296<Currency>1 United States dollar (US$) = 100 cents</Currency>
2297<Airports>5 (1999 est.)</Airports>
2298</record>
2299<record>
2300<Location>Southern Europe, bordering the Aegean Sea, Ionian Sea, and the Mediterranean Sea, between Albania and Turkey</Location>
2301<Geographiccoordinates>39 00 N, 22 00 E</Geographiccoordinates>
2302<Area>131940</Area>
2303<Climate>temperate; mild, wet winters; hot, dry summers</Climate>
2304<Naturalresources>bauxite, lignite, magnesite, petroleum, marble, hydropower</Naturalresources>
2305<Population>10601527</Population>
2306<Populationgrowthrate>0.21% (2000 est.)</Populationgrowthrate>
2307<Sexratio>
2308at birth: 1.07 male(s)/female
2309under 15 years: 1.06 male(s)/female
231015-64 years: 1 male(s)/female
231165 years and over: 0.8 male(s)/female
2312total population: 0.97 male(s)/female (2000 est.)</Sexratio>
2313<Religions>Greek Orthodox 98%, Muslim 1.3%, other 0.7%</Religions>
2314<Countryname>Greece </Countryname>
2315<Capital>Athens</Capital>
2316<Flagdescription>nine equal horizontal stripes of blue alternating with white; there is a blue square in the upper hoist-side corner bearing a white cross; the cross symbolizes Greek Orthodoxy, the established religion of the country</Flagdescription>
2317<GDP>purchasing power parity - $149.2 billion (1999 est.)</GDP>
2318<Industries>tourism; food and tobacco processing, textiles; chemicals, metal products; mining, petroleum</Industries>
2319<Exports>$12.4 billion (f.o.b., 1998)</Exports>
2320<Imports>$27.7 billion (c.i.f., 1998)</Imports>
2321<Currency>1 drachma (Dr) = 100 lepta</Currency>
2322<Airports>80 (1999 est.)</Airports>
2323<Illicitdrugs>a gateway to Europe for traffickers smuggling cannabis and heroin from the Middle East and Southwest Asia to the West and precursor chemicals to the East; some South American cocaine transits or is consumed in Greece</Illicitdrugs>
2324</record>
2325<record>
2326<Location>Middle America, bordering the Caribbean Sea, between Honduras and Belize and bordering the North Pacific Ocean, between El Salvador and Mexico</Location>
2327<Geographiccoordinates>15 30 N, 90 15 W</Geographiccoordinates>
2328<Area>108890</Area>
2329<Climate>tropical; hot, humid in lowlands; cooler in highlands</Climate>
2330<Naturalresources>petroleum, nickel, rare woods, fish, chicle, hydropower</Naturalresources>
2331<Population>12639939</Population>
2332<Populationgrowthrate>2.63% (2000 est.)</Populationgrowthrate>
2333<Sexratio>
2334at birth: 1.05 male(s)/female
2335under 15 years: 1.04 male(s)/female
233615-64 years: 1 male(s)/female
233765 years and over: 0.88 male(s)/female
2338total population: 1.01 male(s)/female (2000 est.)</Sexratio>
2339<Religions>Roman Catholic, Protestant, indigenous Mayan beliefs</Religions>
2340<Countryname>Guatemala </Countryname>
2341<Capital>Guatemala</Capital>
2342<Flagdescription>three equal vertical bands of light blue (hoist side), white, and light blue with the coat of arms centered in the white band; the coat of arms includes a green and red quetzal (the national bird) and a scroll bearing the inscription LIBERTAD 15 DE SEPTIEMBRE DE 1821 (the original date of independence from Spain) all superimposed on a pair of crossed rifles and a pair of crossed swords and framed by a wreath</Flagdescription>
2343<GDP>purchasing power parity - $47.9 billion (1999 est.)</GDP>
2344<Industries>sugar, textiles and clothing, furniture, chemicals, petroleum, metals, rubber, tourism</Industries>
2345<Exports>$2.4 billion (f.o.b., 1999)</Exports>
2346<Imports>$4.5 billion (c.i.f., 1999)</Imports>
2347<Currency>1 quetzal (Q) = 100 centavos</Currency>
2348<Airports>477 (1999 est.)</Airports>
2349<Illicitdrugs>transit country for cocaine shipments; minor producer of illicit opium poppy and cannabis for the international drug trade; active eradication program in 1996 effectively eliminated the cannabis crop; proximity to Mexico makes Guatemala a major staging area for drugs (cocaine shipments)</Illicitdrugs>
2350</record>
2351<record>
2352<Location>Western Africa, bordering the North Atlantic Ocean, between Guinea-Bissau and Sierra Leone</Location>
2353<Geographiccoordinates>11 00 N, 10 00 W</Geographiccoordinates>
2354<Area>245857</Area>
2355<Climate>generally hot and humid; monsoonal-type rainy season (June to November) with southwesterly winds; dry season (December to May) with northeasterly harmattan winds</Climate>
2356<Naturalresources>bauxite, iron ore, diamonds, gold, uranium, hydropower, fish</Naturalresources>
2357<Population>7466200</Population>
2358<Populationgrowthrate>1.95% (2000 est.)</Populationgrowthrate>
2359<Sexratio>
2360at birth: 1.03 male(s)/female
2361under 15 years: 1 male(s)/female
236215-64 years: 0.95 male(s)/female
236365 years and over: 0.7 male(s)/female
2364total population: 0.96 male(s)/female (2000 est.)</Sexratio>
2365<Religions>Muslim 85%, Christian 8%, indigenous beliefs 7%</Religions>
2366<Countryname>Guinea </Countryname>
2367<Capital>Conakry</Capital>
2368<Flagdescription>three equal vertical bands of red (hoist side), yellow, and green; uses the popular pan-African colors of Ethiopia; similar to the flag of Rwanda, which has a large black letter R centered in the yellow band</Flagdescription>
2369<GDP>purchasing power parity - $9.2 billion (1999 est.)</GDP>
2370<Industries>bauxite, gold, diamonds; alumina refining; light manufacturing and agricultural processing industries</Industries>
2371<Exports>$695 million (f.o.b., 1998 est.)</Exports>
2372<Imports>$560 million (f.o.b., 1998 est.)</Imports>
2373<Currency>1 Guinean franc (FG) = 100 centimes</Currency>
2374<Airports>15 (1999 est.)</Airports>
2375</record>
2376<record>
2377<Location>Northern South America, bordering the North Atlantic Ocean, between Suriname and Venezuela</Location>
2378<Geographiccoordinates>5 00 N, 59 00 W</Geographiccoordinates>
2379<Area>214970</Area>
2380<Climate>tropical; hot, humid, moderated by northeast trade winds; two rainy seasons (May to mid-August, mid-November to mid-January)</Climate>
2381<Naturalresources>bauxite, gold, diamonds, hardwood timber, shrimp, fish</Naturalresources>
2382<Population>697286</Population>
2383<Populationgrowthrate>-0.1% (2000 est.)</Populationgrowthrate>
2384<Sexratio>
2385at birth: 1.05 male(s)/female
2386under 15 years: 1.04 male(s)/female
238715-64 years: 1.01 male(s)/female
238865 years and over: 0.81 male(s)/female
2389total population: 1.01 male(s)/female (2000 est.)</Sexratio>
2390<Religions>Christian 50%, Hindu 33%, Muslim 9%, other 8%</Religions>
2391<Countryname>Guyana </Countryname>
2392<Capital>Georgetown</Capital>
2393<Flagdescription>green, with a red isosceles triangle (based on the hoist side) superimposed on a long, yellow arrowhead; there is a narrow, black border between the red and yellow, and a narrow, white border between the yellow and the green</Flagdescription>
2394<GDP>purchasing power parity - $1.86 billion (1999 est.)</GDP>
2395<Industries>bauxite, sugar, rice milling, timber, fishing (shrimp), textiles, gold mining</Industries>
2396<Exports>$574 million (f.o.b., 1999 est.)</Exports>
2397<Imports>$620 million (c.i.f., 1999 est.)</Imports>
2398<Currency>1 Guyanese dollar (G$) = 100 cents</Currency>
2399<Airports>51 (1999 est.)</Airports>
2400<Illicitdrugs>transshipment point for narcotics from South America - primarily Venezuela - to Europe and the US; producer of cannabis</Illicitdrugs>
2401</record>
2402<record>
2403<Location>Middle East, bordering the Mediterranean Sea, between Egypt and Israel</Location>
2404<Geographiccoordinates>31 25 N, 34 20 E</Geographiccoordinates>
2405<Area>360</Area>
2406<Climate>temperate, mild winters, dry and warm to hot summers</Climate>
2407<Naturalresources>arable land</Naturalresources>
2408<Population>1132063</Population>
2409<Populationgrowthrate>3.97% (2000 est.)</Populationgrowthrate>
2410<Sexratio>
2411at birth: 1.05 male(s)/female
2412under 15 years: 1.05 male(s)/female
241315-64 years: 1.03 male(s)/female
241465 years and over: 0.76 male(s)/female
2415total population: 1.03 male(s)/female (2000 est.)</Sexratio>
2416<Religions>Muslim (predominantly Sunni) 98.7%, Christian 0.7%, Jewish 0.6%</Religions>
2417<Countryname>Gaza Strip </Countryname>
2418<GDP>purchasing power parity - $1.17 billion (1999 est.)</GDP>
2419<Industries>generally small family businesses that produce textiles, soap, olive-wood carvings, and mother-of-pearl souvenirs; the Israelis have established some small-scale modern industries in an industrial center</Industries>
2420<Exports>$682 million (includes West Bank) (f.o.b., 1998 est.)</Exports>
2421<Imports>$2.5 billion (c.i.f., 1998 est.) (includes West Bank)</Imports>
2422<Currency>1 new Israeli shekel (NIS) = 100 new agorot</Currency>
2423<Airports>2 (1999 est.)
2424note: includes Gaza International Airport that opened on 24 November 1998 as part of agreements stipulated in the September 1995 Oslo II Accord and the 23 October 1998 Wye River Memorandum</Airports>
2425</record>
2426<record>
2427<Location>Caribbean, western one-third of the island of Hispaniola, between the Caribbean Sea and the North Atlantic Ocean, west of the Dominican Republic</Location>
2428<Geographiccoordinates>19 00 N, 72 25 W</Geographiccoordinates>
2429<Area>27750</Area>
2430<Climate>tropical; semiarid where mountains in east cut off trade winds</Climate>
2431<Naturalresources>bauxite, copper, calcium carbonate, gold, marble, hydropower</Naturalresources>
2432<Population>6867995</Population>
2433<Populationgrowthrate>1.39% (2000 est.)</Populationgrowthrate>
2434<Sexratio>
2435at birth: 1.05 male(s)/female
2436under 15 years: 1.03 male(s)/female
243715-64 years: 0.93 male(s)/female
243865 years and over: 0.95 male(s)/female
2439total population: 0.97 male(s)/female (2000 est.)</Sexratio>
2440<Religions>Roman Catholic 80%, Protestant 16% (Baptist 10%, Pentecostal 4%, Adventist 1%, other 1%), none 1%, other 3% (1982)
2441note: roughly one-half of the population also practices Voodoo</Religions>
2442<Countryname>Haiti </Countryname>
2443<Capital>Port-au-Prince</Capital>
2444<Flagdescription>two equal horizontal bands of blue (top) and red with a centered white rectangle bearing the coat of arms, which contains a palm tree flanked by flags and two cannons above a scroll bearing the motto L'UNION FAIT LA FORCE (Union Makes Strength)</Flagdescription>
2445<GDP>purchasing power parity - $9.2 billion (1999 est.)</GDP>
2446<Industries>sugar refining, flour milling, textiles, cement, tourism, light assembly industries based on imported parts</Industries>
2447<Exports>$322 million (f.o.b., 1999)</Exports>
2448<Imports>$762 million (c.i.f., 1999)</Imports>
2449<Currency>1 gourde (G) = 100 centimes</Currency>
2450<Airports>13 (1999 est.)</Airports>
2451<Illicitdrugs>major Caribbean transshipment point for cocaine en route to the US and Europe</Illicitdrugs>
2452</record>
2453<record>
2454<Location>Eastern Asia, bordering the South China Sea and China</Location>
2455<Geographiccoordinates>22 15 N, 114 10 E</Geographiccoordinates>
2456<Area>1092</Area>
2457<Climate>tropical monsoon; cool and humid in winter, hot and rainy from spring through summer, warm and sunny in fall</Climate>
2458<Naturalresources>outstanding deepwater harbor, feldspar</Naturalresources>
2459<Population>7116302</Population>
2460<Populationgrowthrate>1.35% (2000 est.)</Populationgrowthrate>
2461<Sexratio>
2462at birth: 1.07 male(s)/female
2463under 15 years: 1.12 male(s)/female
246415-64 years: 0.98 male(s)/female
246565 years and over: 0.84 male(s)/female
2466total population: 0.99 male(s)/female (2000 est.)</Sexratio>
2467<Religions>eclectic mixture of local religions 90%, Christian 10%</Religions>
2468<Countryname>Hong Kong </Countryname>
2469<Flagdescription>red with a stylized, white, five-petal bauhinia flower in the center</Flagdescription>
2470<GDP>purchasing power parity - $158.2 billion (1999 est.)</GDP>
2471<Industries>textiles, clothing, tourism, electronics, plastics, toys, watches, clocks</Industries>
2472<Exports>$169.98 billion (including reexports; f.o.b., 1999 est.)</Exports>
2473<Imports>$174.4 billion (c.i.f., 1999)</Imports>
2474<Currency>1 Hong Kong dollar (HK$) = 100 cents</Currency>
2475<Airports>3 (1999 est.)</Airports>
2476<Illicitdrugs>a hub for Southeast Asian heroin trade; transshipment and money-laundering center; increasing indigenous amphetamine abuse</Illicitdrugs>
2477</record>
2478<record>
2479<Location>Southern Africa, islands in the Indian Ocean, about two-thirds of the way from Madagascar to Antarctica</Location>
2480<Geographiccoordinates>53 06 S, 72 31 E</Geographiccoordinates>
2481<Area>412</Area>
2482<Climate>antarctic</Climate>
2483<Naturalresources>none</Naturalresources>
2484<Population></Population>
2485<Countryname>Heard Island and McDonald Islands </Countryname>
2486<Flagdescription>the flag of Australia is used</Flagdescription>
2487</record>
2488<record>
2489<Location>Middle America, bordering the Caribbean Sea, between Guatemala and Nicaragua and bordering the North Pacific Ocean, between El Salvador and Nicaragua</Location>
2490<Geographiccoordinates>15 00 N, 86 30 W</Geographiccoordinates>
2491<Area>112090</Area>
2492<Climate>subtropical in lowlands, temperate in mountains</Climate>
2493<Naturalresources>timber, gold, silver, copper, lead, zinc, iron ore, antimony, coal, fish, hydropower</Naturalresources>
2494<Population>6249598</Population>
2495<Populationgrowthrate>2.52% (2000 est.)</Populationgrowthrate>
2496<Sexratio>
2497at birth: 1.05 male(s)/female
2498under 15 years: 1.04 male(s)/female
249915-64 years: 0.98 male(s)/female
250065 years and over: 0.9 male(s)/female
2501total population: 1 male(s)/female (2000 est.)</Sexratio>
2502<Religions>Roman Catholic 97%, Protestant minority</Religions>
2503<Countryname>Honduras </Countryname>
2504<Capital>Tegucigalpa</Capital>
2505<Flagdescription>three equal horizontal bands of blue (top), white, and blue with five blue five-pointed stars arranged in an X pattern centered in the white band; the stars represent the members of the former Federal Republic of Central America - Costa Rica, El Salvador, Guatemala, Honduras, and Nicaragua; similar to the flag of El Salvador, which features a round emblem encircled by the words REPUBLICA DE EL SALVADOR EN LA AMERICA CENTRAL centered in the white band; also similar to the flag of Nicaragua, which features a triangle encircled by the word REPUBLICA DE NICARAGUA on top and AMERICA CENTRAL on the bottom, centered in the white band</Flagdescription>
2506<GDP>purchasing power parity - $14.1 billion (1999 est.)</GDP>
2507<Industries>sugar, coffee, textiles, clothing, wood products</Industries>
2508<Exports>$1.6 billion (f.o.b., 1999 est.)</Exports>
2509<Imports>$2.7 billion (f.o.b., 1999 est.)</Imports>
2510<Currency>1 lempira (L) = 100 centavos</Currency>
2511<Airports>119 (1999 est.)</Airports>
2512<Illicitdrugs>transshipment point for drugs and narcotics; illicit producer of cannabis, cultivated on small plots and used principally for local consumption; corruption is a major problem</Illicitdrugs>
2513</record>
2514<record>
2515<Location>Oceania, island in the North Pacific Ocean, about one-half of the way from Hawaii to Australia</Location>
2516<Geographiccoordinates>0 48 N, 176 38 W</Geographiccoordinates>
2517<Area>1</Area>
2518<Climate>equatorial; scant rainfall, constant wind, burning sun</Climate>
2519<Naturalresources>guano (deposits worked until late 1800s)</Naturalresources>
2520<Population></Population>
2521<Countryname>Howland Island </Countryname>
2522<Flagdescription>the flag of the US is used</Flagdescription>
2523<Airports>airstrip constructed in 1937 for scheduled refueling stop on the round-the-world flight of Amelia EARHART and Fred NOONAN - they left Lae, New Guinea, for Howland Island, but were never seen again; the airstrip is no longer serviceable</Airports>
2524</record>
2525<record>
2526<Location>Southeastern Europe, bordering the Adriatic Sea, between Bosnia and Herzegovina and Slovenia</Location>
2527<Geographiccoordinates>45 10 N, 15 30 E</Geographiccoordinates>
2528<Area>56538</Area>
2529<Climate>Mediterranean and continental; continental climate predominant with hot summers and cold winters; mild winters, dry summers along coast</Climate>
2530<Naturalresources>oil, some coal, bauxite, low-grade iron ore, calcium, natural asphalt, silica, mica, clays, salt, hydropower</Naturalresources>
2531<Population>4282216</Population>
2532<Populationgrowthrate>0.93% (2000 est.)</Populationgrowthrate>
2533<Sexratio>
2534at birth: 1.07 male(s)/female
2535under 15 years: 1.05 male(s)/female
253615-64 years: 1.02 male(s)/female
253765 years and over: 0.59 male(s)/female
2538total population: 0.94 male(s)/female (2000 est.)</Sexratio>
2539<Religions>Roman Catholic 76.5%, Orthodox 11.1%, Muslim 1.2%, Protestant 0.4%, others and unknown 10.8% (1991)</Religions>
2540<Countryname>Croatia </Countryname>
2541<Capital>Zagreb</Capital>
2542<Flagdescription>red, white, and blue horizontal bands with Croatian coat of arms (red and white checkered)</Flagdescription>
2543<GDP>purchasing power parity - $23.9 billion (1999 est.)</GDP>
2544<Industries>chemicals and plastics, machine tools, fabricated metal, electronics, pig iron and rolled steel products, aluminum, paper, wood products, construction materials, textiles, shipbuilding, petroleum and petroleum refining, food and beverages; tourism</Industries>
2545<Exports>$4.5 billion (f.o.b., 1998)</Exports>
2546<Imports>$8.4 billion (c.i.f., 1998)</Imports>
2547<Currency>1 Croatian kuna (HRK) = 100 lipas</Currency>
2548<Airports>67 (1999 est.)</Airports>
2549<Illicitdrugs>transit point along the Balkan route for Southwest Asian heroin to Western Europe; a minor transit point for maritime shipments of South American cocaine bound for Western Europe</Illicitdrugs>
2550</record>
2551<record>
2552<Location>Central Europe, northwest of Romania</Location>
2553<Geographiccoordinates>47 00 N, 20 00 E</Geographiccoordinates>
2554<Area>93030</Area>
2555<Climate>temperate; cold, cloudy, humid winters; warm summers</Climate>
2556<Naturalresources>bauxite, coal, natural gas, fertile soils, arable land</Naturalresources>
2557<Population>10138844</Population>
2558<Populationgrowthrate>-0.33% (2000 est.)</Populationgrowthrate>
2559<Sexratio>
2560at birth: 1.05 male(s)/female
2561under 15 years: 1.05 male(s)/female
256215-64 years: 0.96 male(s)/female
256365 years and over: 0.59 male(s)/female
2564total population: 0.91 male(s)/female (2000 est.)</Sexratio>
2565<Religions>Roman Catholic 67.5%, Calvinist 20%, Lutheran 5%, atheist and other 7.5%</Religions>
2566<Countryname>Hungary </Countryname>
2567<Capital>Budapest</Capital>
2568<Flagdescription>three equal horizontal bands of red (top), white, and green</Flagdescription>
2569<GDP>purchasing power parity - $79.4 billion (1999 est.)</GDP>
2570<Industries>mining, metallurgy, construction materials, processed foods, textiles, chemicals (especially pharmaceuticals), motor vehicles</Industries>
2571<Exports>$22.6 billion (f.o.b., 1999)</Exports>
2572<Imports>$25.1 billion (f.o.b., 1999)</Imports>
2573<Currency>1 forint (Ft) = 100 filler</Currency>
2574<Airports>43 (1999 est.)</Airports>
2575<Illicitdrugs>major transshipment point for Southwest Asian heroin and cannabis and transit point for South American cocaine destined for Western Europe; limited producer of precursor chemicals, particularly for amphetamines and methamphetamines</Illicitdrugs>
2576</record>
2577<record>
2578<Location>Northern Europe, island between the Greenland Sea and the North Atlantic Ocean, northwest of the UK</Location>
2579<Geographiccoordinates>65 00 N, 18 00 W</Geographiccoordinates>
2580<Area>103000</Area>
2581<Climate>temperate; moderated by North Atlantic Current; mild, windy winters; damp, cool summers</Climate>
2582<Naturalresources>fish, hydropower, geothermal power, diatomite</Naturalresources>
2583<Population>276365</Population>
2584<Populationgrowthrate>0.57% (2000 est.)</Populationgrowthrate>
2585<Sexratio>
2586at birth: 1.06 male(s)/female
2587under 15 years: 1.06 male(s)/female
258815-64 years: 1.02 male(s)/female
258965 years and over: 0.81 male(s)/female
2590total population: 1 male(s)/female (2000 est.)</Sexratio>
2591<Religions>Evangelical Lutheran 91%, other Protestant and Roman Catholic, none (1997)</Religions>
2592<Countryname>Iceland </Countryname>
2593<Capital>Reykjavik</Capital>
2594<Flagdescription>blue with a red cross outlined in white that extends to the edges of the flag; the vertical part of the cross is shifted to the hoist side in the style of the Dannebrog (Danish flag)</Flagdescription>
2595<GDP>purchasing power parity - $6.42 billion (1999 est.)</GDP>
2596<Industries>fish processing; aluminum smelting, ferrosilicon production, geothermal power; tourism</Industries>
2597<Exports>$1.9 billion (f.o.b., 1998)</Exports>
2598<Imports>$2.4 billion (f.o.b., 1998)</Imports>
2599<Currency>1 Icelandic krona (IKr) = 100 aurar</Currency>
2600<Airports>86 (1999 est.)</Airports>
2601</record>
2602<record>
2603<Location>Southeastern Asia, archipelago between the Indian Ocean and the Pacific Ocean</Location>
2604<Geographiccoordinates>5 00 S, 120 00 E</Geographiccoordinates>
2605<Area>1919440</Area>
2606<Climate>tropical; hot, humid; more moderate in highlands</Climate>
2607<Naturalresources>petroleum, tin, natural gas, nickel, timber, bauxite, copper, fertile soils, coal, gold, silver</Naturalresources>
2608<Population>224784210</Population>
2609<Populationgrowthrate>1.63% (2000 est.)</Populationgrowthrate>
2610<Sexratio>
2611at birth: 1.05 male(s)/female
2612under 15 years: 1.03 male(s)/female
261315-64 years: 1 male(s)/female
261465 years and over: 0.78 male(s)/female
2615total population: 1 male(s)/female (2000 est.)</Sexratio>
2616<Religions>Muslim 88%, Protestant 5%, Roman Catholic 3%, Hindu 2%, Buddhist 1%, other 1% (1998)</Religions>
2617<Countryname>Indonesia </Countryname>
2618<Capital>Jakarta</Capital>
2619<Flagdescription>two equal horizontal bands of red (top) and white; similar to the flag of Monaco, which is shorter; also similar to the flag of Poland, which is white (top) and red</Flagdescription>
2620<GDP>purchasing power parity - $610 billion (1999 est.)</GDP>
2621<Industries>petroleum and natural gas; textiles, apparel, and footwear; mining, cement, chemical fertilizers, plywood; rubber; food; tourism</Industries>
2622<Exports>$48 billion (f.o.b., 1999 est.)</Exports>
2623<Imports>$24 billion (c.i.f., 1999 est.)</Imports>
2624<Currency>Indonesian rupiah (Rp) = 100 sen</Currency>
2625<Airports>446 (1999 est.)</Airports>
2626<Illicitdrugs>illicit producer of cannabis largely for domestic use; possible growing role as transshipment point for Golden Triangle heroin</Illicitdrugs>
2627</record>
2628<record>
2629<Location>Western Europe, island in the Irish Sea, between Great Britain and Ireland</Location>
2630<Geographiccoordinates>54 15 N, 4 30 W</Geographiccoordinates>
2631<Area>572</Area>
2632<Climate>cool summers and mild winters; temperate; overcast about one-third of the time</Climate>
2633<Naturalresources>none</Naturalresources>
2634<Population>73117</Population>
2635<Populationgrowthrate>0.52% (2000 est.)</Populationgrowthrate>
2636<Sexratio>
2637at birth: 1.05 male(s)/female
2638under 15 years: 1.04 male(s)/female
263915-64 years: 1.01 male(s)/female
264065 years and over: 0.66 male(s)/female
2641total population: 0.94 male(s)/female (2000 est.)</Sexratio>
2642<Religions>Anglican, Roman Catholic, Methodist, Baptist, Presbyterian, Society of Friends</Religions>
2643<Countryname>Isle of Man </Countryname>
2644<Capital>Douglas</Capital>
2645<Flagdescription>red with the Three Legs of Man emblem (Trinacria), in the center; the three legs are joined at the thigh and bent at the knee; in order to have the toes pointing clockwise on both sides of the flag, a two-sided emblem is used</Flagdescription>
2646<GDP>purchasing power parity - $1.2 billion (1998 est.)</GDP>
2647<Industries>financial services, light manufacturing, tourism</Industries>
2648<Exports>$NA</Exports>
2649<Imports>$NA</Imports>
2650<Currency>1 Manx pound = 100 pence</Currency>
2651<Airports>1 (1999 est.)</Airports>
2652</record>
2653<record>
2654<Location>Southern Asia, bordering the Arabian Sea and the Bay of Bengal, between Burma and Pakistan</Location>
2655<Geographiccoordinates>20 00 N, 77 00 E</Geographiccoordinates>
2656<Area>3287590</Area>
2657<Climate>varies from tropical monsoon in south to temperate in north</Climate>
2658<Naturalresources>coal (fourth-largest reserves in the world), iron ore, manganese, mica, bauxite, titanium ore, chromite, natural gas, diamonds, petroleum, limestone, arable land</Naturalresources>
2659<Population>1014003817</Population>
2660<Populationgrowthrate>1.58% (2000 est.)</Populationgrowthrate>
2661<Sexratio>
2662at birth: 1.05 male(s)/female
2663under 15 years: 1.06 male(s)/female
266415-64 years: 1.08 male(s)/female
266565 years and over: 1.03 male(s)/female
2666total population: 1.07 male(s)/female (2000 est.)</Sexratio>
2667<Religions>Hindu 80%, Muslim 14%, Christian 2.4%, Sikh 2%, Buddhist 0.7%, Jains 0.5%, other 0.4%</Religions>
2668<Countryname>India </Countryname>
2669<Capital>New Delhi</Capital>
2670<Flagdescription>three equal horizontal bands of orange (top), white, and green with a blue chakra (24-spoked wheel) centered in the white band; similar to the flag of Niger, which has a small orange disk centered in the white band</Flagdescription>
2671<GDP>purchasing power parity - $1.805 trillion (1999 est.)</GDP>
2672<Industries>textiles, chemicals, food processing, steel, transportation equipment, cement, mining, petroleum, machinery</Industries>
2673<Exports>$36.3 billion (f.o.b., 1999 est.)</Exports>
2674<Imports>$50.2 billion (f.o.b., 1999 est.)</Imports>
2675<Currency>1 Indian rupee (Re) = 100 paise</Currency>
2676<Airports>346 (1999 est.)</Airports>
2677<Illicitdrugs>world's largest producer of licit opium for the pharmaceutical trade, but an undetermined quantity of opium is diverted to illicit international drug markets; major transit country for illicit narcotics produced in neighboring countries; illicit producer of hashish and methaqualone</Illicitdrugs>
2678</record>
2679<record>
2680<Location>Southern Asia, archipelago in the Indian Ocean, about one-half the way from Africa to Indonesia</Location>
2681<Geographiccoordinates>6 00 S, 71 30 E</Geographiccoordinates>
2682<Area>60</Area>
2683<Climate>tropical marine; hot, humid, moderated by trade winds</Climate>
2684<Naturalresources>coconuts, fish</Naturalresources>
2685<Population></Population>
2686<Countryname>British Indian Ocean Territory </Countryname>
2687<Flagdescription>white with six blue wavy horizontal stripes; the flag of the UK is in the upper hoist-side quadrant; the striped section bears a palm tree and yellow crown centered on the outer half of the flag</Flagdescription>
2688<Airports>1 (1999 est.)</Airports>
2689</record>
2690<record>
2691<Location>Middle America, atoll in the North Pacific Ocean, 1,120 km southwest of Mexico</Location>
2692<Geographiccoordinates>10 17 N, 109 13 W</Geographiccoordinates>
2693<Area>7</Area>
2694<Climate>tropical, humid, average temperature 20-32 degrees C, rains May-October</Climate>
2695<Naturalresources>none</Naturalresources>
2696<Population></Population>
2697<Countryname>Clipperton Island </Countryname>
2698<Flagdescription>the flag of France is used</Flagdescription>
2699</record>
2700<record>
2701<Location>Middle East, bordering the Gulf of Oman, the Persian Gulf, and the Caspian Sea, between Iraq and Pakistan</Location>
2702<Geographiccoordinates>32 00 N, 53 00 E</Geographiccoordinates>
2703<Area>1000000</Area>
2704<Climate>mostly arid or semiarid, subtropical along Caspian coast</Climate>
2705<Naturalresources>petroleum, natural gas, coal, chromium, copper, iron ore, lead, manganese, zinc, sulfur</Naturalresources>
2706<Population>65619636</Population>
2707<Populationgrowthrate>0.83% (2000 est.)</Populationgrowthrate>
2708<Sexratio>
2709at birth: 1.05 male(s)/female
2710under 15 years: 1.05 male(s)/female
271115-64 years: 1.01 male(s)/female
271265 years and over: 1.12 male(s)/female
2713total population: 1.03 male(s)/female (2000 est.)</Sexratio>
2714<Religions>Shi'a Muslim 89%, Sunni Muslim 10%, Zoroastrian, Jewish, Christian, and Baha'i 1%</Religions>
2715<Countryname>Iran </Countryname>
2716<Capital>Tehran</Capital>
2717<Flagdescription>three equal horizontal bands of green (top), white, and red; the national emblem (a stylized representation of the word Allah) in red is centered in the white band; ALLAH AKBAR (God is Great) in white Arabic script is repeated 11 times along the bottom edge of the green band and 11 times along the top edge of the red band</Flagdescription>
2718<GDP>purchasing power parity - $347.6 billion (1999 est.)</GDP>
2719<Industries>petroleum, petrochemicals, textiles, cement and other construction materials, food processing (particularly sugar refining and vegetable oil production), metal fabricating, armaments</Industries>
2720<Exports>$12.2 billion (f.o.b., 1998 est.)</Exports>
2721<Imports>$13.8 billion (f.o.b., 1998 est.)</Imports>
2722<Currency>10 Iranian rials (IR) = 1 toman; note - domestic figures are generally referred to in terms of the toman</Currency>
2723<Airports>288 (1999 est.)</Airports>
2724<Illicitdrugs>despite substantial interdiction efforts, Iran remains a key transshipment point for Southwest Asian heroin to Europe; domestic consumption of narcotics remains a persistent problem and Iranian press reports estimate that there are at least 1.2 million drug users in the country</Illicitdrugs>
2725</record>
2726<record>
2727<Location>Middle East, bordering the Mediterranean Sea, between Egypt and Lebanon</Location>
2728<Geographiccoordinates>31 30 N, 34 45 E</Geographiccoordinates>
2729<Area>20770</Area>
2730<Climate>temperate; hot and dry in southern and eastern desert areas</Climate>
2731<Naturalresources>copper, phosphates, bromide, potash, clay, sand, sulfur, asphalt, manganese, small amounts of natural gas and crude oil</Naturalresources>
2732<Population>5842454</Population>
2733<Populationgrowthrate>1.67% (2000 est.)</Populationgrowthrate>
2734<Sexratio>
2735at birth: 1.05 male(s)/female
2736under 15 years: 1.05 male(s)/female
273715-64 years: 1.01 male(s)/female
273865 years and over: 0.75 male(s)/female
2739total population: 0.99 male(s)/female (2000 est.)</Sexratio>
2740<Religions>Jewish 80.1%, Muslim 14.6% (mostly Sunni Muslim), Christian 2.1%, other 3.2% (1996 est.)</Religions>
2741<Countryname>Israel </Countryname>
2742<Capital>Jerusalem
2743note: Israel proclaimed Jerusalem as its capital in 1950, but the US, like nearly all other countries, maintains its Embassy in Tel Aviv</Capital>
2744<Flagdescription>white with a blue hexagram (six-pointed linear star) known as the Magen David (Shield of David) centered between two equal horizontal blue bands near the top and bottom edges of the flag</Flagdescription>
2745<GDP>purchasing power parity - $105.4 billion (1999 est.)</GDP>
2746<Industries>food processing, diamond cutting and polishing, textiles and apparel, chemicals, metal products, military equipment, transport equipment, electrical equipment, potash mining, high-technology electronics, tourism</Industries>
2747<Exports>$23.5 billion (f.o.b., 1999)</Exports>
2748<Imports>$30.6 billion (f.o.b., 1999)</Imports>
2749<Currency>1 new Israeli shekel (NIS) = 100 new agorot</Currency>
2750<Airports>58 (1999 est.)</Airports>
2751<Illicitdrugs>increasingly concerned about cocaine and heroin abuse; drugs arrive in country from Lebanon and increasingly Jordan</Illicitdrugs>
2752</record>
2753<record>
2754<Location>Southern Europe, a peninsula extending into the central Mediterranean Sea, northeast of Tunisia</Location>
2755<Geographiccoordinates>42 50 N, 12 50 E</Geographiccoordinates>
2756<Area>301230</Area>
2757<Climate>predominantly Mediterranean; Alpine in far north; hot, dry in south</Climate>
2758<Naturalresources>mercury, potash, marble, sulfur, dwindling natural gas and crude oil reserves, fish, coal, arable land</Naturalresources>
2759<Population>57634327</Population>
2760<Populationgrowthrate>0.09% (2000 est.)</Populationgrowthrate>
2761<Sexratio>
2762at birth: 1.06 male(s)/female
2763under 15 years: 1.06 male(s)/female
276415-64 years: 0.99 male(s)/female
276565 years and over: 0.7 male(s)/female
2766total population: 0.94 male(s)/female (2000 est.)</Sexratio>
2767<Religions>predominately Roman Catholic with mature Protestant and Jewish communities and a growing Muslim immigrant community</Religions>
2768<Countryname>Italy </Countryname>
2769<Capital>Rome</Capital>
2770<Flagdescription>three equal vertical bands of green (hoist side), white, and red; similar to the flag of Ireland, which is longer and is green (hoist side), white, and orange; also similar to the flag of the Cote d'Ivoire, which has the colors reversed - orange (hoist side), white, and green
2771note: inspired by the French flag brought to Italy by Napoleon in 1797</Flagdescription>
2772<GDP>purchasing power parity - $1.212 trillion (1999 est.)</GDP>
2773<Industries>tourism, machinery, iron and steel, chemicals, food processing, textiles, motor vehicles, clothing, footwear, ceramics</Industries>
2774<Exports>$242.6 billion (f.o.b., 1998)</Exports>
2775<Imports>$206.9 billion (f.o.b., 1998)</Imports>
2776<Currency>1 Italian lira (Lit) = 100 centesimi</Currency>
2777<Airports>136 (1999 est.)</Airports>
2778<Illicitdrugs>important gateway for and consumer of Latin American cocaine and Southwest Asian heroin entering the European market</Illicitdrugs>
2779</record>
2780<record>
2781<Location>Western Africa, bordering the North Atlantic Ocean, between Ghana and Liberia</Location>
2782<Geographiccoordinates>8 00 N, 5 00 W</Geographiccoordinates>
2783<Area>322460</Area>
2784<Climate>tropical along coast, semiarid in far north; three seasons - warm and dry (November to March), hot and dry (March to May), hot and wet (June to October)</Climate>
2785<Naturalresources>petroleum, diamonds, manganese, iron ore, cobalt, bauxite, copper, hydropower</Naturalresources>
2786<Population>15980950</Population>
2787<Populationgrowthrate>2.58% (2000 est.)</Populationgrowthrate>
2788<Sexratio>
2789at birth: 1.03 male(s)/female
2790under 15 years: 1.01 male(s)/female
279115-64 years: 1.06 male(s)/female
279265 years and over: 1 male(s)/female
2793total population: 1.03 male(s)/female (2000 est.)</Sexratio>
2794<Religions>Muslim 60%, Christian 22%, indigenous 18% (some of these are also numbered among the Christians and Muslims)</Religions>
2795<Countryname>Cote d'Ivoire </Countryname>
2796<Capital>Yamoussoukro
2797note: although Yamoussoukro has been the capital since 1983, Abidjan remains the administrative center; the US, like other countries, maintains its Embassy in Abidjan</Capital>
2798<Flagdescription>three equal vertical bands of orange (hoist side), white, and green; similar to the flag of Ireland, which is longer and has the colors reversed - green (hoist side), white, and orange; also similar to the flag of Italy, which is green (hoist side), white, and red; design was based on the flag of France</Flagdescription>
2799<GDP>purchasing power parity - $25.7 billion (1999 est.)</GDP>
2800<Industries>foodstuffs, beverages; wood products, oil refining, automobile assembly, textiles, fertilizer, construction materials, electricity</Industries>
2801<Exports>$3.9 billion (f.o.b., 1999 est.)</Exports>
2802<Imports>$2.6 billion (f.o.b., 1999 est.)</Imports>
2803<Currency>1 Communaute Financiere Africaine franc (CFAF) = 100 centimes</Currency>
2804<Airports>36 (1999 est.)</Airports>
2805<Illicitdrugs>illicit producer of cannabis, mostly for local consumption; minor transshipment point for Southwest and Southeast Asian heroin to Europe and occasionally to the US, and for Latin American cocaine destined for Europe</Illicitdrugs>
2806</record>
2807<record>
2808<Location>Middle East, bordering the Persian Gulf, between Iran and Kuwait</Location>
2809<Geographiccoordinates>33 00 N, 44 00 E</Geographiccoordinates>
2810<Area>437072</Area>
2811<Climate>mostly desert; mild to cool winters with dry, hot, cloudless summers; northern mountainous regions along Iranian and Turkish borders experience cold winters with occasionally heavy snows that melt in early spring, sometimes causing extensive flooding in central and southern Iraq</Climate>
2812<Naturalresources>petroleum, natural gas, phosphates, sulfur</Naturalresources>
2813<Population>22675617</Population>
2814<Populationgrowthrate>2.86% (2000 est.)</Populationgrowthrate>
2815<Sexratio>
2816at birth: 1.05 male(s)/female
2817under 15 years: 1.03 male(s)/female
281815-64 years: 1.02 male(s)/female
281965 years and over: 0.88 male(s)/female
2820total population: 1.02 male(s)/female (2000 est.)</Sexratio>
2821<Religions>Muslim 97% (Shi'a 60%-65%, Sunni 32%-37%), Christian or other 3%</Religions>
2822<Countryname>Iraq </Countryname>
2823<Capital>Baghdad</Capital>
2824<Flagdescription>three equal horizontal bands of red (top), white, and black with three green five-pointed stars in a horizontal line centered in the white band; the phrase ALLAHU AKBAR (God is Great) in green Arabic script - Allahu to the right of the middle star and Akbar to the left of the middle star - was added in January 1991 during the Persian Gulf crisis; similar to the flag of Syria which has two stars but no script and the flag of Yemen which has a plain white band; also similar to the flag of Egypt which has a symbolic eagle centered in the white band</Flagdescription>
2825<GDP>purchasing power parity - $59.9 billion (1999 est.)</GDP>
2826<Industries>petroleum, chemicals, textiles, construction materials, food processing</Industries>
2827<Exports>$12.7 billion (1999 est.)</Exports>
2828<Imports>$8.9 billion (1999 est.)</Imports>
2829<Currency>1 Iraqi dinar (ID) = 1,000 fils</Currency>
2830<Airports>113 (1999 est.)</Airports>
2831</record>
2832<record>
2833<Location>Eastern Asia, island chain between the North Pacific Ocean and the Sea of Japan, east of the Korean Peninsula</Location>
2834<Geographiccoordinates>36 00 N, 138 00 E</Geographiccoordinates>
2835<Area>377835</Area>
2836<Climate>varies from tropical in south to cool temperate in north</Climate>
2837<Naturalresources>negligible mineral resources, fish</Naturalresources>
2838<Population>126549976</Population>
2839<Populationgrowthrate>0.18% (2000 est.)</Populationgrowthrate>
2840<Sexratio>
2841at birth: 1.05 male(s)/female
2842under 15 years: 1.05 male(s)/female
284315-64 years: 1.01 male(s)/female
284465 years and over: 0.72 male(s)/female
2845total population: 0.96 male(s)/female (2000 est.)</Sexratio>
2846<Religions>observe both Shinto and Buddhist 84%, other 16% (including Christian 0.7%)</Religions>
2847<Countryname>Japan </Countryname>
2848<Capital>Tokyo</Capital>
2849<Flagdescription>white with a large red disk (representing the sun without rays) in the center</Flagdescription>
2850<GDP>purchasing power parity - $2.95 trillion (1999 est.)</GDP>
2851<Industries>among world's largest and technologically advanced producers of motor vehicles, electronic equipment, machine tools, steel and nonferrous metals, ships, chemicals; textiles, processed foods</Industries>
2852<Exports>$413 billion (f.o.b., 1999 est.)</Exports>
2853<Imports>$306 billion (c.i.f., 1999 est.)</Imports>
2854<Currency>yen</Currency>
2855<Airports>171 (1999 est.)</Airports>
2856</record>
2857<record>
2858<Location>Western Europe, island in the English Channel, northwest of France</Location>
2859<Geographiccoordinates>49 15 N, 2 10 W</Geographiccoordinates>
2860<Area>116</Area>
2861<Climate>temperate; mild winters and cool summers</Climate>
2862<Naturalresources>arable land</Naturalresources>
2863<Population>88915</Population>
2864<Populationgrowthrate>0.52% (2000 est.)</Populationgrowthrate>
2865<Sexratio>
2866at birth: 1.11 male(s)/female
2867under 15 years: 1.08 male(s)/female
286815-64 years: 0.99 male(s)/female
286965 years and over: 0.74 male(s)/female
2870total population: 0.96 male(s)/female (2000 est.)</Sexratio>
2871<Religions>Anglican, Roman Catholic, Baptist, Congregational New Church, Methodist, Presbyterian</Religions>
2872<Countryname>Jersey </Countryname>
2873<Capital>Saint Helier</Capital>
2874<Flagdescription>white with a diagonal red cross extending to the corners of the flag and in the upper quadrant, surmounted by a yellow crown, a red shield holding the three lions of England in yellow</Flagdescription>
2875<GDP>purchasing power parity - $2.2 billion (1999 est.)</GDP>
2876<Industries>tourism, banking and finance, dairy</Industries>
2877<Exports>$NA</Exports>
2878<Imports>$NA</Imports>
2879<Currency>1 Jersey pound = 100 pence</Currency>
2880<Airports>1 (1999 est.)</Airports>
2881</record>
2882<record>
2883<Location>Caribbean, island in the Caribbean Sea, south of Cuba</Location>
2884<Geographiccoordinates>18 15 N, 77 30 W</Geographiccoordinates>
2885<Area>10990</Area>
2886<Climate>tropical; hot, humid; temperate interior</Climate>
2887<Naturalresources>bauxite, gypsum, limestone</Naturalresources>
2888<Population>2652689</Population>
2889<Populationgrowthrate>0.46% (2000 est.)</Populationgrowthrate>
2890<Sexratio>
2891at birth: 1.05 male(s)/female
2892under 15 years: 1.05 male(s)/female
289315-64 years: 0.99 male(s)/female
289465 years and over: 0.81 male(s)/female
2895total population: 1 male(s)/female (2000 est.)</Sexratio>
2896<Religions>Protestant 61.3% (Church of God 21.2%, Baptist 8.8%, Anglican 5.5%, Seventh-Day Adventist 9%, Pentecostal 7.6%, Methodist 2.7%, United Church 2.7%, Brethren 1.1%, Jehovah's Witness 1.6%, Moravian 1.1%), Roman Catholic 4%, other, including some spiritual cults 34.7%</Religions>
2897<Countryname>Jamaica </Countryname>
2898<Capital>Kingston</Capital>
2899<Flagdescription>diagonal yellow cross divides the flag into four triangles - green (top and bottom) and black (hoist side and outer side)</Flagdescription>
2900<GDP>purchasing power parity - $8.8 billion (1999 est.)</GDP>
2901<Industries>tourism, bauxite, textiles, food processing, light manufactures, rum, cement, metal, paper, chemical products</Industries>
2902<Exports>$1.4 billion (f.o.b., 1999 est.)</Exports>
2903<Imports>$2.7 billion (f.o.b., 1999 est.)</Imports>
2904<Currency>1 Jamaican dollar (J$) = 100 cents</Currency>
2905<Airports>36 (1999 est.)</Airports>
2906<Illicitdrugs>transshipment point for cocaine from Central and South America to North America and Europe; illicit cultivation of cannabis; government has an active manual cannabis eradication program</Illicitdrugs>
2907</record>
2908<record>
2909<Location>Northern Europe, island between the Greenland Sea and the Norwegian Sea, northeast of Iceland</Location>
2910<Geographiccoordinates>71 00 N, 8 00 W</Geographiccoordinates>
2911<Area>373</Area>
2912<Climate>arctic maritime with frequent storms and persistent fog</Climate>
2913<Naturalresources>none</Naturalresources>
2914<Population></Population>
2915<Countryname>Jan Mayen </Countryname>
2916<Flagdescription>the flag of Norway is used</Flagdescription>
2917<Airports>1 (1999 est.)</Airports>
2918</record>
2919<record>
2920<Location>Middle East, northwest of Saudi Arabia</Location>
2921<Geographiccoordinates>31 00 N, 36 00 E</Geographiccoordinates>
2922<Area>89213</Area>
2923<Climate>mostly arid desert; rainy season in west (November to April)</Climate>
2924<Naturalresources>phosphates, potash, shale oil</Naturalresources>
2925<Population>4998564</Population>
2926<Populationgrowthrate>3.1% (2000 est.)</Populationgrowthrate>
2927<Sexratio>
2928at birth: 1.06 male(s)/female
2929under 15 years: 1.05 male(s)/female
293015-64 years: 1.14 male(s)/female
293165 years and over: 0.98 male(s)/female
2932total population: 1.1 male(s)/female (2000 est.)</Sexratio>
2933<Religions>Sunni Muslim 96%, Christian 4% (1997 est.)</Religions>
2934<Countryname>Jordan </Countryname>
2935<Capital>Amman</Capital>
2936<Flagdescription>three equal horizontal bands of black (top), white, and green with a red isosceles triangle based on the hoist side bearing a small white seven-pointed star; the seven points on the star represent the seven fundamental laws of the Koran</Flagdescription>
2937<GDP>purchasing power parity - $16 billion (1999 est.)</GDP>
2938<Industries>phosphate mining, petroleum refining, cement, potash, light manufacturing, tourism</Industries>
2939<Exports>$1.8 billion (f.o.b., 1999 est.)</Exports>
2940<Imports>$3.3 billion (c.i.f., 1999 est.)</Imports>
2941<Currency>1 Jordanian dinar (JD) = 1,000 fils</Currency>
2942<Airports>20 (1999 est.)</Airports>
2943</record>
2944<record>
2945<Location>Oceania, atoll in the North Pacific Ocean, about one-third of the way from Hawaii to the Marshall Islands</Location>
2946<Geographiccoordinates>16 45 N, 169 30 W</Geographiccoordinates>
2947<Area>2</Area>
2948<Climate>tropical, but generally dry; consistent northeast trade winds with little seasonal temperature variation</Climate>
2949<Naturalresources>NA; guano deposits worked until depletion about 1890</Naturalresources>
2950<Population></Population>
2951<Countryname>Johnston Atoll </Countryname>
2952<Flagdescription>the flag of the US is used</Flagdescription>
2953<Airports>1 (1999 est.)</Airports>
2954</record>
2955<record>
2956<Location>Southern Africa, island in the Mozambique Channel, about one-third of the way between Madagascar and Mozambique</Location>
2957<Geographiccoordinates>17 03 S, 42 45 E</Geographiccoordinates>
2958<Area>4</Area>
2959<Climate>tropical</Climate>
2960<Naturalresources>guano deposits and other fertilizers</Naturalresources>
2961<Population></Population>
2962<Countryname>Juan de Nova Island </Countryname>
2963<Flagdescription>the flag of France is used</Flagdescription>
2964<Airports>1 (1999 est.)</Airports>
2965</record>
2966<record>
2967<Location>Eastern Africa, bordering the Indian Ocean, between Somalia and Tanzania</Location>
2968<Geographiccoordinates>1 00 N, 38 00 E</Geographiccoordinates>
2969<Area>582650</Area>
2970<Climate>varies from tropical along coast to arid in interior</Climate>
2971<Naturalresources>gold, limestone, soda ash, salt barites, rubies, fluorspar, garnets, wildlife, hydropower</Naturalresources>
2972<Population>30339770</Population>
2973<Populationgrowthrate>1.53% (2000 est.)</Populationgrowthrate>
2974<Sexratio>
2975at birth: 1.03 male(s)/female
2976under 15 years: 1.02 male(s)/female
297715-64 years: 1.01 male(s)/female
297865 years and over: 0.79 male(s)/female
2979total population: 1.01 male(s)/female (2000 est.)</Sexratio>
2980<Religions>Protestant 38%, Roman Catholic 28%, indigenous beliefs 26%, Muslim 7%, other 1%</Religions>
2981<Countryname>Kenya </Countryname>
2982<Capital>Nairobi</Capital>
2983<Flagdescription>three equal horizontal bands of black (top), red, and green; the red band is edged in white; a large warrior's shield covering crossed spears is superimposed at the center</Flagdescription>
2984<GDP>purchasing power parity - $45.1 billion (1999 est.)</GDP>
2985<Industries>small-scale consumer goods (plastic, furniture, batteries, textiles, soap, cigarettes, flour), agricultural products processing; oil refining, cement; tourism</Industries>
2986<Exports>$2.2 billion (f.o.b., 1999 est.)</Exports>
2987<Imports>$3.3 billion (f.o.b., 1999 est.)</Imports>
2988<Currency>1 Kenyan shilling (KSh) = 100 cents</Currency>
2989<Airports>230 (1999 est.)</Airports>
2990<Illicitdrugs>widespread harvesting of small, wild plots of marijuana and qat (chat); transit country for South Asian heroin destined for Europe and, sometimes, North America; Indian methaqualone also transits on way to South Africa</Illicitdrugs>
2991</record>
2992<record>
2993<Location>Central Asia, west of China</Location>
2994<Geographiccoordinates>41 00 N, 75 00 E</Geographiccoordinates>
2995<Area>198500</Area>
2996<Climate>dry continental to polar in high Tien Shan; subtropical in southwest (Fergana Valley); temperate in northern foothill zone</Climate>
2997<Naturalresources>abundant hydropower; significant deposits of gold and rare earth metals; locally exploitable coal, oil, and natural gas; other deposits of nepheline, mercury, bismuth, lead, and zinc</Naturalresources>
2998<Population>4685230</Population>
2999<Populationgrowthrate>1.43% (2000 est.)</Populationgrowthrate>
3000<Sexratio>
3001at birth: 1.05 male(s)/female
3002under 15 years: 1.02 male(s)/female
300315-64 years: 0.96 male(s)/female
300465 years and over: 0.6 male(s)/female
3005total population: 0.95 male(s)/female (2000 est.)</Sexratio>
3006<Religions>Muslim 75%, Russian Orthodox 20%, other 5%</Religions>
3007<Countryname>Kyrgyzstan </Countryname>
3008<Capital>Bishkek</Capital>
3009<Flagdescription>red field with a yellow sun in the center having 40 rays representing the 40 Kirghiz tribes; on the obverse side the rays run counterclockwise, on the reverse, clockwise; in the center of the sun is a red ring crossed by two sets of three lines, a stylized representation of the roof of the traditional Kirghiz yurt</Flagdescription>
3010<GDP>purchasing power parity - $10.3 billion (1999 est.)</GDP>
3011<Industries>small machinery, textiles, food processing, cement, shoes, sawn logs, refrigerators, furniture, electric motors, gold, rare earth metals</Industries>
3012<Exports>$515 million (1999 est.)</Exports>
3013<Imports>$590 million (1999 est.)</Imports>
3014<Currency>1 Kyrgyzstani som (KGS) = 100 tyiyn</Currency>
3015<Airports>54 (1994 est.)</Airports>
3016<Illicitdrugs>limited illicit cultivator of cannabis and opium poppy, mostly for CIS consumption; limited government eradication program; increasingly used as transshipment point for illicit drugs to Russia and Western Europe from Southwest Asia</Illicitdrugs>
3017</record>
3018<record>
3019<Location>Eastern Asia, northern half of the Korean Peninsula bordering the Korea Bay and the Sea of Japan, between China and South Korea</Location>
3020<Geographiccoordinates>40 00 N, 127 00 E</Geographiccoordinates>
3021<Area>120540</Area>
3022<Climate>temperate with rainfall concentrated in summer</Climate>
3023<Naturalresources>coal, lead, tungsten, zinc, graphite, magnesite, iron ore, copper, gold, pyrites, salt, fluorspar, hydropower</Naturalresources>
3024<Population>21687550</Population>
3025<Populationgrowthrate>1.35% (2000 est.)</Populationgrowthrate>
3026<Sexratio>
3027at birth: 1.05 male(s)/female
3028under 15 years: 1.05 male(s)/female
302915-64 years: 0.96 male(s)/female
303065 years and over: 0.46 male(s)/female
3031total population: 0.94 male(s)/female (2000 est.)</Sexratio>
3032<Religions>traditionally Buddhist and Confucianist, some Christian and syncretic Chondogyo (Religion of the Heavenly Way)
3033note: autonomous religious activities now almost nonexistent; government-sponsored religious groups exist to provide illusion of religious freedom</Religions>
3034<Countryname>North Korea </Countryname>
3035<Capital>P'yongyang</Capital>
3036<Flagdescription>three horizontal bands of blue (top), red (triple width), and blue; the red band is edged in white; on the hoist side of the red band is a white disk with a red five-pointed star</Flagdescription>
3037<GDP>purchasing power parity - $22.6 billion (1999 est.)</GDP>
3038<Industries>military products; machine building, electric power, chemicals; mining (coal, iron ore, magnesite, graphite, copper, zinc, lead, and precious metals), metallurgy; textiles, food processing; tourism</Industries>
3039<Exports>$680 million (f.o.b., 1998 est.)</Exports>
3040<Imports>$954 million (c.i.f., 1998 est.)</Imports>
3041<Currency>1 North Korean won (Wn) = 100 chon</Currency>
3042<Airports>49 (1994 est.)</Airports>
3043</record>
3044<record>
3045<Location>Oceania, reef in the North Pacific Ocean, about one-half of the way from Hawaii to American Samoa</Location>
3046<Geographiccoordinates>6 24 N, 162 24 W</Geographiccoordinates>
3047<Area>1</Area>
3048<Climate>tropical, but moderated by prevailing winds</Climate>
3049<Naturalresources>none</Naturalresources>
3050<Population></Population>
3051<Countryname>Kingman Reef </Countryname>
3052<Flagdescription>the flag of the US is used</Flagdescription>
3053<Airports>lagoon was used as a halfway station between Hawaii and American Samoa by Pan American Airways for flying boats in 1937 and 1938</Airports>
3054</record>
3055<record>
3056<Location>Oceania, group of islands in the Pacific Ocean, straddling the equator, about one-half of the way from Hawaii to Australia; note - on 1 January 1995, Kiribati unilaterally moved the International Date Line from the middle of the country to include its easternmost islands and make it the same day throughout the country</Location>
3057<Geographiccoordinates>1 25 N, 173 00 E</Geographiccoordinates>
3058<Area>717</Area>
3059<Climate>tropical; marine, hot and humid, moderated by trade winds</Climate>
3060<Naturalresources>phosphate (production discontinued in 1979)</Naturalresources>
3061<Population>91985</Population>
3062<Populationgrowthrate>2.34% (2000 est.)</Populationgrowthrate>
3063<Sexratio>
3064at birth: 1.05 male(s)/female
3065under 15 years: 1.03 male(s)/female
306615-64 years: 0.97 male(s)/female
306765 years and over: 0.75 male(s)/female
3068total population: 0.99 male(s)/female (2000 est.)</Sexratio>
3069<Religions>Roman Catholic 53%, Protestant (Congregational) 41%, Seventh-Day Adventist, Baha'i, Church of God, Mormon 6% (1985 est.)</Religions>
3070<Countryname>Kiribati </Countryname>
3071<Capital>Tarawa</Capital>
3072<Flagdescription>the upper half is red with a yellow frigate bird flying over a yellow rising sun, and the lower half is blue with three horizontal wavy white stripes to represent the ocean</Flagdescription>
3073<GDP>purchasing power parity - $74 million (1999 est.), supplemented by a nearly equal amount from external sources</GDP>
3074<Industries>fishing, handicrafts</Industries>
3075<Exports>$6 million (f.o.b., 1998)</Exports>
3076<Imports>$37 million (c.i.f., 1998)</Imports>
3077<Currency>1 Australian dollar ($A) = 100 cents</Currency>
3078<Airports>21 (1999 est.)</Airports>
3079</record>
3080<record>
3081<Location>Eastern Asia, southern half of the Korean Peninsula bordering the Sea of Japan and the Yellow Sea</Location>
3082<Geographiccoordinates>37 00 N, 127 30 E</Geographiccoordinates>
3083<Area>98480</Area>
3084<Climate>temperate, with rainfall heavier in summer than winter</Climate>
3085<Naturalresources>coal, tungsten, graphite, molybdenum, lead, hydropower potential</Naturalresources>
3086<Population>47470969</Population>
3087<Populationgrowthrate>0.93% (2000 est.)</Populationgrowthrate>
3088<Sexratio>
3089at birth: 1.13 male(s)/female
3090under 15 years: 1.12 male(s)/female
309115-64 years: 1.03 male(s)/female
309265 years and over: 0.63 male(s)/female
3093total population: 1.01 male(s)/female (2000 est.)</Sexratio>
3094<Religions>Christian 49%, Buddhist 47%, Confucianist 3%, Shamanist, Chondogyo (Religion of the Heavenly Way), and other 1%</Religions>
3095<Countryname>South Korea </Countryname>
3096<Capital>Seoul</Capital>
3097<Flagdescription>white with a red (top) and blue yin-yang symbol in the center; there is a different black trigram from the ancient I Ching (Book of Changes) in each corner of the white field</Flagdescription>
3098<GDP>purchasing power parity - $625.7 billion (1999 est.)</GDP>
3099<Industries>electronics, automobile production, chemicals, shipbuilding, steel, textiles, clothing, footwear, food processing</Industries>
3100<Exports>$144 billion (f.o.b., 1999)</Exports>
3101<Imports>$116 billion (c.i.f., 1999)</Imports>
3102<Currency>1 South Korean won (W) = 100 chun (theoretical)</Currency>
3103<Airports>103 (1999 est.)</Airports>
3104</record>
3105<record>
3106<Location>Southeastern Asia, island in the Indian Ocean, south of Indonesia</Location>
3107<Geographiccoordinates>10 30 S, 105 40 E</Geographiccoordinates>
3108<Area>135</Area>
3109<Climate>tropical; heat and humidity moderated by trade winds</Climate>
3110<Naturalresources>phosphate</Naturalresources>
3111<Population>2564</Population>
3112<Populationgrowthrate>7.77% (2000 est.)</Populationgrowthrate>
3113<Religions>Buddhist 55%, Christian 15%, Muslim 10%, other 20% (1991)</Religions>
3114<Countryname>Christmas Island </Countryname>
3115<Capital>The Settlement</Capital>
3116<Flagdescription>the flag of Australia is used</Flagdescription>
3117<GDP>purchasing power parity - $NA</GDP>
3118<Industries>tourism, phosphate extraction (near depletion)</Industries>
3119<Exports>$NA</Exports>
3120<Imports>$NA</Imports>
3121<Currency>1 Australian dollar ($A) = 100 cents</Currency>
3122<Airports>1 (1999 est.)</Airports>
3123</record>
3124<record>
3125<Location>Middle East, bordering the Persian Gulf, between Iraq and Saudi Arabia</Location>
3126<Geographiccoordinates>29 30 N, 45 45 E</Geographiccoordinates>
3127<Area>17820</Area>
3128<Climate>dry desert; intensely hot summers; short, cool winters</Climate>
3129<Naturalresources>petroleum, fish, shrimp, natural gas</Naturalresources>
3130<Population>1973572</Population>
3131<Populationgrowthrate>3.44% (2000 est.)
3132note: this rate reflects a return to pre-Gulf crisis immigration of expatriates</Populationgrowthrate>
3133<Sexratio>
3134at birth: 1.04 male(s)/female
3135under 15 years: 1.04 male(s)/female
313615-64 years: 1.76 male(s)/female
313765 years and over: 1.82 male(s)/female
3138total population: 1.5 male(s)/female (2000 est.)</Sexratio>
3139<Religions>Muslim 85% (Sunni 45%, Shi'a 40%), Christian, Hindu, Parsi, and other 15%</Religions>
3140<Countryname>Kuwait </Countryname>
3141<Capital>Kuwait</Capital>
3142<Flagdescription>three equal horizontal bands of green (top), white, and red with a black trapezoid based on the hoist side</Flagdescription>
3143<GDP>purchasing power parity - $44.8 billion (1999 est.)</GDP>
3144<Industries>petroleum, petrochemicals, desalination, food processing, construction materials, salt, construction</Industries>
3145<Exports>$13.5 billion (f.o.b., 1999 est.)</Exports>
3146<Imports>$8.1 billion (f.o.b., 1999 est.)</Imports>
3147<Currency>1 Kuwaiti dinar (KD) = 1,000 fils</Currency>
3148<Airports>7 (1999 est.)</Airports>
3149</record>
3150<record>
3151<Location>Central Asia, northwest of China</Location>
3152<Geographiccoordinates>48 00 N, 68 00 E</Geographiccoordinates>
3153<Area>2717300</Area>
3154<Climate>continental, cold winters and hot summers, arid and semiarid</Climate>
3155<Naturalresources>major deposits of petroleum, natural gas, coal, iron ore, manganese, chrome ore, nickel, cobalt, copper, molybdenum, lead, zinc, bauxite, gold, uranium</Naturalresources>
3156<Population>16733227</Population>
3157<Populationgrowthrate>-0.05% (2000 est.)</Populationgrowthrate>
3158<Sexratio>
3159at birth: 1.05 male(s)/female
3160under 15 years: 1.03 male(s)/female
316115-64 years: 0.94 male(s)/female
316265 years and over: 0.51 male(s)/female
3163total population: 0.93 male(s)/female (2000 est.)</Sexratio>
3164<Religions>Muslim 47%, Russian Orthodox 44%, Protestant 2%, other 7%</Religions>
3165<Countryname>Kazakhstan </Countryname>
3166<Capital>Astana
3167note: the government moved from Almaty to Astana in December 1998</Capital>
3168<Flagdescription>sky blue background representing the endless sky and a gold sun with 32 rays soaring above a golden steppe eagle in the center; on the hoist side is a "national ornamentation" in gold</Flagdescription>
3169<GDP>purchasing power parity - $54.5 billion (1999 est.)</GDP>
3170<Industries>oil, coal, iron ore, manganese, chromite, lead, zinc, copper, titanium, bauxite, gold, silver, phosphates, sulfur, iron and steel, nonferrous metal, tractors and other agricultural machinery, electric motors, construction materials</Industries>
3171<Exports>$5.2 billion (1999 est.)</Exports>
3172<Imports>$4.8 billion (1999 est.)</Imports>
3173<Currency>1 Kazakhstani tenge = 100 tiyn</Currency>
3174<Airports>10 (1997 est.)</Airports>
3175<Illicitdrugs>significant illicit cultivation of cannabis and limited cultivation of opium poppy and ephedra (for the drug ephedrone); limited government eradication program; cannabis consumed largely in the CIS; used as transshipment point for illicit drugs to Russia, North America, and Western Europe from Southwest Asia</Illicitdrugs>
3176</record>
3177<record>
3178<Location>Southeastern Asia, northeast of Thailand, west of Vietnam</Location>
3179<Geographiccoordinates>18 00 N, 105 00 E</Geographiccoordinates>
3180<Area>236800</Area>
3181<Climate>tropical monsoon; rainy season (May to November); dry season (December to April)</Climate>
3182<Naturalresources>timber, hydropower, gypsum, tin, gold, gemstones</Naturalresources>
3183<Population>5497459</Population>
3184<Populationgrowthrate>2.5% (2000 est.)</Populationgrowthrate>
3185<Sexratio>
3186at birth: 1.05 male(s)/female
3187under 15 years: 1.02 male(s)/female
318815-64 years: 0.97 male(s)/female
318965 years and over: 0.85 male(s)/female
3190total population: 0.98 male(s)/female (2000 est.)</Sexratio>
3191<Religions>Buddhist 60% (in October 1999, the regime proposed a constitutional amendment making Buddhism the state religion; the National Assembly is expected to vote on the amendment sometime in 2000), animist and other 40%</Religions>
3192<Countryname>Laos </Countryname>
3193<Capital>Vientiane</Capital>
3194<Flagdescription>three horizontal bands of red (top), blue (double width), and red with a large white disk centered in the blue band</Flagdescription>
3195<GDP>purchasing power parity - $7 billion (1999 est.)</GDP>
3196<Industries>tin and gypsum mining, timber, electric power, agricultural processing, construction, garments</Industries>
3197<Exports>$271 million (f.o.b., 1999 est.)</Exports>
3198<Imports>$497 million (f.o.b., 1999 est.)</Imports>
3199<Currency>1 new kip (NK) = 100 at</Currency>
3200<Airports>52 (1999 est.)</Airports>
3201<Illicitdrugs>world's third-largest illicit opium producer (estimated cultivation in 1999 - 21,800 hectares, a 16% decrease over 1998; estimated potential production in 1999 - 140 metric tons, about the same as in 1998); potential heroin producer; transshipment point for heroin and methamphetamines produced in Burma; illicit producer of cannabis</Illicitdrugs>
3202</record>
3203<record>
3204<Location>Middle East, bordering the Mediterranean Sea, between Israel and Syria</Location>
3205<Geographiccoordinates>33 50 N, 35 50 E</Geographiccoordinates>
3206<Area>10400</Area>
3207<Climate>Mediterranean; mild to cool, wet winters with hot, dry summers; Lebanon mountains experience heavy winter snows</Climate>
3208<Naturalresources>limestone, iron ore, salt, water-surplus state in a water-deficit region, arable land</Naturalresources>
3209<Population>3578036</Population>
3210<Populationgrowthrate>1.38% (2000 est.)</Populationgrowthrate>
3211<Sexratio>
3212at birth: 1.05 male(s)/female
3213under 15 years: 1.04 male(s)/female
321415-64 years: 0.91 male(s)/female
321565 years and over: 0.84 male(s)/female
3216total population: 0.94 male(s)/female (2000 est.)</Sexratio>
3217<Religions>Muslim 70% (5 legally recognized Islamic groups - Shi'a, Sunni, Druze, Isma'ilite, Alawite or Nusayri), Christian 30% (11 legally recognized Christian groups - 4 Orthodox Christian, 6 Catholic, 1 Protestant), Jewish NEGL%</Religions>
3218<Countryname>Lebanon </Countryname>
3219<Capital>Beirut</Capital>
3220<Flagdescription>three horizontal bands of red (top), white (double width), and red with a green and brown cedar tree centered in the white band</Flagdescription>
3221<GDP>purchasing power parity - $16.2 billion (1999 est.)</GDP>
3222<Industries>banking; food processing; jewelry; cement; textiles; mineral and chemical products; wood and furniture products; oil refining; metal fabricating</Industries>
3223<Exports>$866 million (f.o.b., 1999 est.)</Exports>
3224<Imports>$5.7 billion (f.o.b., 1999 est.)</Imports>
3225<Currency>1 Lebanese pound = 100 piasters</Currency>
3226<Airports>9 (1999 est.)</Airports>
3227<Illicitdrugs>inconsequential producer of hashish; some heroin processing mostly in the Bekaa valley; a Lebanese/Syrian eradication campaign started in the early 1990s has practically eliminated the opium and cannabis crops</Illicitdrugs>
3228</record>
3229<record>
3230<Location>Eastern Europe, bordering the Baltic Sea, between Estonia and Lithuania</Location>
3231<Geographiccoordinates>57 00 N, 25 00 E</Geographiccoordinates>
3232<Area>64589</Area>
3233<Climate>maritime; wet, moderate winters</Climate>
3234<Naturalresources>minimal; amber, peat, limestone, dolomite, hydropower, arable land</Naturalresources>
3235<Population>2404926</Population>
3236<Populationgrowthrate>-0.84% (2000 est.)</Populationgrowthrate>
3237<Sexratio>
3238at birth: 1.05 male(s)/female
3239under 15 years: 1.04 male(s)/female
324015-64 years: 0.91 male(s)/female
324165 years and over: 0.48 male(s)/female
3242total population: 0.85 male(s)/female (2000 est.)</Sexratio>
3243<Religions>Lutheran, Roman Catholic, Russian Orthodox</Religions>
3244<Countryname>Latvia </Countryname>
3245<Capital>Riga</Capital>
3246<Flagdescription>three horizontal bands of maroon (top), white (half-width), and maroon</Flagdescription>
3247<GDP>purchasing power parity - $9.8 billion (1999 est.)</GDP>
3248<Industries>buses, vans, street and railroad cars, synthetic fibers, agricultural machinery, fertilizers, washing machines, radios, electronics, pharmaceuticals, processed foods, textiles; dependent on imports for energy, raw materials, and intermediate products</Industries>
3249<Exports>$1.9 billion (f.o.b., 1999)</Exports>
3250<Imports>$2.8 billion (f.o.b., 1998)</Imports>
3251<Currency>1 Latvian lat (LVL) = 100 santims</Currency>
3252<Airports>50 (1994 est.)</Airports>
3253<Illicitdrugs>transshipment point for opiates and cannabis from Central and Southwest Asia to Western Europe and Scandinavia and Latin American cocaine and some synthetics from Western Europe to CIS; limited production of illicit amphetamines, ephedrine, and ecstasy for export</Illicitdrugs>
3254</record>
3255<record>
3256<Location>Eastern Europe, bordering the Baltic Sea, between Latvia and Russia</Location>
3257<Geographiccoordinates>56 00 N, 24 00 E</Geographiccoordinates>
3258<Area>65200</Area>
3259<Climate>transitional, between maritime and continental; wet, moderate winters and summers</Climate>
3260<Naturalresources>peat, arable land</Naturalresources>
3261<Population>3620756</Population>
3262<Populationgrowthrate>-0.29% (2000 est.)</Populationgrowthrate>
3263<Sexratio>
3264at birth: 1.05 male(s)/female
3265under 15 years: 1.04 male(s)/female
326615-64 years: 0.93 male(s)/female
326765 years and over: 0.51 male(s)/female
3268total population: 0.88 male(s)/female (2000 est.)</Sexratio>
3269<Religions>Roman Catholic (primarily), Lutheran, Russian Orthodox, Protestant, evangelical Christian Baptist, Muslim, Jewish</Religions>
3270<Countryname>Lithuania </Countryname>
3271<Capital>Vilnius</Capital>
3272<Flagdescription>three equal horizontal bands of yellow (top), green, and red</Flagdescription>
3273<GDP>purchasing power parity - $17.3 billion (1999 est.)</GDP>
3274<Industries>metal-cutting machine tools, electric motors, television sets, refrigerators and freezers, petroleum refining, shipbuilding (small ships), furniture making, textiles, food processing, fertilizers, agricultural machinery, optical equipment, electronic components, computers, amber</Industries>
3275<Exports>$3.3 billion (f.o.b., 1999)</Exports>
3276<Imports>$4.5 billion (f.o.b., 1999)</Imports>
3277<Currency>1 Lithuanian litas = 100 centas</Currency>
3278<Airports>96 (1994 est.)</Airports>
3279<Illicitdrugs>transshipment point for opiates and other illicit drugs from Southwest Asia, Latin America, and Western Europe to Western Europe and Scandinavia</Illicitdrugs>
3280</record>
3281<record>
3282<Location>Western Africa, bordering the North Atlantic Ocean, between Cote d'Ivoire and Sierra Leone</Location>
3283<Geographiccoordinates>6 30 N, 9 30 W</Geographiccoordinates>
3284<Area>111370</Area>
3285<Climate>tropical; hot, humid; dry winters with hot days and cool to cold nights; wet, cloudy summers with frequent heavy showers</Climate>
3286<Naturalresources>iron ore, timber, diamonds, gold, hydropower</Naturalresources>
3287<Population>3164156</Population>
3288<Populationgrowthrate>1.94% (2000 est.)</Populationgrowthrate>
3289<Sexratio>
3290at birth: 1.03 male(s)/female
3291under 15 years: 1 male(s)/female
329215-64 years: 0.95 male(s)/female
329365 years and over: 1.01 male(s)/female
3294total population: 0.98 male(s)/female (2000 est.)</Sexratio>
3295<Religions>indigenous beliefs 40%, Christian 40%, Muslim 20%</Religions>
3296<Countryname>Liberia </Countryname>
3297<Capital>Monrovia</Capital>
3298<Flagdescription>11 equal horizontal stripes of red (top and bottom) alternating with white; there is a white five-pointed star on a blue square in the upper hoist-side corner; the design was based on the US flag</Flagdescription>
3299<GDP>purchasing power parity - $2.85 billion (1999 est.)</GDP>
3300<Industries>rubber processing, palm oil processing, diamonds</Industries>
3301<Exports>$39 million (f.o.b., 1998 est.)</Exports>
3302<Imports>$142 million (f.o.b., 1998 est.)</Imports>
3303<Currency>1 Liberian dollar (L$) = 100 cents</Currency>
3304<Airports>45 (1999 est.)</Airports>
3305<Illicitdrugs>increasingly a transshipment point for Southeast and Southwest Asian heroin and South American cocaine for the European and US markets</Illicitdrugs>
3306</record>
3307<record>
3308<Location>Central Europe, south of Poland</Location>
3309<Geographiccoordinates>48 40 N, 19 30 E</Geographiccoordinates>
3310<Area>48845</Area>
3311<Climate>temperate; cool summers; cold, cloudy, humid winters</Climate>
3312<Naturalresources>brown coal and lignite; small amounts of iron ore, copper and manganese ore; salt; arable land</Naturalresources>
3313<Population>5407956</Population>
3314<Populationgrowthrate>0.12% (2000 est.)</Populationgrowthrate>
3315<Sexratio>
3316at birth: 1.05 male(s)/female
3317under 15 years: 1.05 male(s)/female
331815-64 years: 0.99 male(s)/female
331965 years and over: 0.62 male(s)/female
3320total population: 0.95 male(s)/female (2000 est.)</Sexratio>
3321<Religions>Roman Catholic 60.3%, atheist 9.7%, Protestant 8.4%, Orthodox 4.1%, other 17.5%</Religions>
3322<Countryname>Slovakia </Countryname>
3323<Capital>Bratislava</Capital>
3324<Flagdescription>three equal horizontal bands of white (top), blue, and red superimposed with the Slovak cross in a shield centered on the hoist side; the cross is white centered on a background of red and blue</Flagdescription>
3325<GDP>purchasing power parity - $45.9 billion (1999 est.)</GDP>
3326<Industries>metal and metal products; food and beverages; electricity, gas, coke, oil, nuclear fuel; chemicals and manmade fibers; machinery; paper and printing; earthenware and ceramics; transport vehicles; textiles; electrical and optical apparatus; rubber products</Industries>
3327<Exports>$10.1 billion (f.o.b., 1999 est.)</Exports>
3328<Imports>$11.2 billion (f.o.b., 1999 est.)</Imports>
3329<Currency>1 koruna (Sk) = 100 halierov</Currency>
3330<Airports>36 (1999 est.)</Airports>
3331<Illicitdrugs>transshipment point for Southwest Asian heroin bound for Western Europe</Illicitdrugs>
3332</record>
3333<record>
3334<Location>Oceania, atoll in the North Pacific Ocean, about one-half of the way from Hawaii to American Samoa</Location>
3335<Geographiccoordinates>5 52 N, 162 06 W</Geographiccoordinates>
3336<Area>11</Area>
3337<Climate>equatorial, hot, and very rainy</Climate>
3338<Naturalresources>none</Naturalresources>
3339<Population></Population>
3340<Countryname>Palmyra Atoll </Countryname>
3341<Flagdescription>the flag of the US is used</Flagdescription>
3342<Airports>1 (1999 est.)</Airports>
3343</record>
3344<record>
3345<Location>Central Europe, between Austria and Switzerland</Location>
3346<Geographiccoordinates>47 10 N, 9 32 E</Geographiccoordinates>
3347<Area>160</Area>
3348<Climate>continental; cold, cloudy winters with frequent snow or rain; cool to moderately warm, cloudy, humid summers</Climate>
3349<Naturalresources>hydroelectric potential, arable land</Naturalresources>
3350<Population>32207</Population>
3351<Populationgrowthrate>1.02% (2000 est.)</Populationgrowthrate>
3352<Sexratio>
3353at birth: 1.04 male(s)/female
3354under 15 years: 0.99 male(s)/female
335515-64 years: 1 male(s)/female
335665 years and over: 0.66 male(s)/female
3357total population: 0.96 male(s)/female (2000 est.)</Sexratio>
3358<Religions>Roman Catholic 80%, Protestant 7.4%, unknown 7.7%, other 4.9% (1996)</Religions>
3359<Countryname>Liechtenstein </Countryname>
3360<Capital>Vaduz</Capital>
3361<Flagdescription>two equal horizontal bands of blue (top) and red with a gold crown on the hoist side of the blue band</Flagdescription>
3362<GDP>purchasing power parity - $730 million (1998 est.)</GDP>
3363<Industries>electronics, metal manufacturing, textiles, ceramics, pharmaceuticals, food products, precision instruments, tourism</Industries>
3364<Exports>$2.47 billion (1996)</Exports>
3365<Imports>$917.3 million (1996)</Imports>
3366<Currency>1 Swiss franc, franken, or franco (SFR) = 100 centimes, rappen, or centesimi</Currency>
3367<Airports>none</Airports>
3368</record>
3369<record>
3370<Location>Southern Africa, an enclave of South Africa</Location>
3371<Geographiccoordinates>29 30 S, 28 30 E</Geographiccoordinates>
3372<Area>30355</Area>
3373<Climate>temperate; cool to cold, dry winters; hot, wet summers</Climate>
3374<Naturalresources>water, agricultural and grazing land, some diamonds and other minerals</Naturalresources>
3375<Population>2143141</Population>
3376<Populationgrowthrate>1.65% (2000 est.)</Populationgrowthrate>
3377<Sexratio>
3378at birth: 1.03 male(s)/female
3379under 15 years: 1.01 male(s)/female
338015-64 years: 0.93 male(s)/female
338165 years and over: 0.73 male(s)/female
3382total population: 0.95 male(s)/female (2000 est.)</Sexratio>
3383<Religions>Christian 80%, indigenous beliefs 20%</Religions>
3384<Countryname>Lesotho </Countryname>
3385<Capital>Maseru</Capital>
3386<Flagdescription>divided diagonally from the lower hoist side corner; the upper half is white, bearing the brown silhouette of a large shield with crossed spear and club; the lower half is a diagonal blue band with a green triangle in the corner</Flagdescription>
3387<GDP>purchasing power parity - $4.7 billion (1998 est.)</GDP>
3388<Industries>food, beverages, textiles, handicrafts; construction; tourism</Industries>
3389<Exports>$235 million (f.o.b., 1998 est.)</Exports>
3390<Imports>$700 million (f.o.b., 1998 est.)</Imports>
3391<Currency>1 loti (L) = 100 lisente; note - maloti (M) is the plural form of loti</Currency>
3392<Airports>29 (1999 est.)</Airports>
3393</record>
3394<record>
3395<Location>Western Europe, between France and Germany</Location>
3396<Geographiccoordinates>49 45 N, 6 10 E</Geographiccoordinates>
3397<Area>2586</Area>
3398<Climate>modified continental with mild winters, cool summers</Climate>
3399<Naturalresources>iron ore (no longer exploited), arable land</Naturalresources>
3400<Population>437389</Population>
3401<Populationgrowthrate>1.27% (2000 est.)</Populationgrowthrate>
3402<Sexratio>
3403at birth: 1.03 male(s)/female
3404under 15 years: 1.06 male(s)/female
340515-64 years: 1.02 male(s)/female
340665 years and over: 0.66 male(s)/female
3407total population: 0.97 male(s)/female (2000 est.)</Sexratio>
3408<Religions>Roman Catholic 97%, Protestant and Jewish 3%</Religions>
3409<Countryname>Luxembourg </Countryname>
3410<Capital>Luxembourg</Capital>
3411<Flagdescription>three equal horizontal bands of red (top), white, and light blue; similar to the flag of the Netherlands, which uses a darker blue and is shorter; design was based on the flag of France</Flagdescription>
3412<GDP>purchasing power parity - $14.7 billion (1999 est.)</GDP>
3413<Industries>banking, iron and steel, food processing, chemicals, metal products, engineering, tires, glass, aluminum</Industries>
3414<Exports>$7.5 billion (f.o.b., 1998)</Exports>
3415<Imports>$9.6 billion (c.i.f., 1998)</Imports>
3416<Currency>1 Luxembourg franc (LuxF) = 100 centimes; note - centimes no longer in use</Currency>
3417<Airports>2 (1999 est.)</Airports>
3418</record>
3419<record>
3420<Location>Northern Africa, bordering the Mediterranean Sea, between Egypt and Tunisia</Location>
3421<Geographiccoordinates>25 00 N, 17 00 E</Geographiccoordinates>
3422<Area>1759540</Area>
3423<Climate>Mediterranean along coast; dry, extreme desert interior</Climate>
3424<Naturalresources>petroleum, natural gas, gypsum</Naturalresources>
3425<Population>5115450</Population>
3426<Populationgrowthrate>2.42% (2000 est.)</Populationgrowthrate>
3427<Sexratio>
3428at birth: 1.05 male(s)/female
3429under 15 years: 1.04 male(s)/female
343015-64 years: 1.07 male(s)/female
343165 years and over: 0.98 male(s)/female
3432total population: 1.06 male(s)/female (2000 est.)</Sexratio>
3433<Religions>Sunni Muslim 97%</Religions>
3434<Countryname>Libya </Countryname>
3435<Capital>Tripoli</Capital>
3436<Flagdescription>plain green; green is the traditional color of Islam (the state religion)</Flagdescription>
3437<GDP>purchasing power parity - $39.3 billion (1999 est.)</GDP>
3438<Industries>petroleum, food processing, textiles, handicrafts, cement</Industries>
3439<Exports>$6.6 billion (f.o.b., 1998 est.)</Exports>
3440<Imports>$7 billion (f.o.b., 1998 est.)</Imports>
3441<Currency>1 Libyan dinar (LD) = 1,000 dirhams</Currency>
3442<Airports>142 (1999 est.)</Airports>
3443</record>
3444<record>
3445<Location>Southern Africa, island in the Indian Ocean, east of Mozambique</Location>
3446<Geographiccoordinates>20 00 S, 47 00 E</Geographiccoordinates>
3447<Area>587040</Area>
3448<Climate>tropical along coast, temperate inland, arid in south</Climate>
3449<Naturalresources>graphite, chromite, coal, bauxite, salt, quartz, tar sands, semiprecious stones, mica, fish, hydropower</Naturalresources>
3450<Population>15506472</Population>
3451<Populationgrowthrate>3.02% (2000 est.)</Populationgrowthrate>
3452<Sexratio>
3453at birth: 1.03 male(s)/female
3454under 15 years: 1.01 male(s)/female
345515-64 years: 0.98 male(s)/female
345665 years and over: 0.89 male(s)/female
3457total population: 0.99 male(s)/female (2000 est.)</Sexratio>
3458<Religions>indigenous beliefs 52%, Christian 41%, Muslim 7%</Religions>
3459<Countryname>Madagascar </Countryname>
3460<Capital>Antananarivo</Capital>
3461<Flagdescription>two equal horizontal bands of red (top) and green with a vertical white band of the same width on hoist side</Flagdescription>
3462<GDP>purchasing power parity - $11.5 billion (1999 est.)</GDP>
3463<Industries>meat processing, soap, breweries, tanneries, sugar, textiles, glassware, cement, automobile assembly plant, paper, petroleum, tourism</Industries>
3464<Exports>$600 million (f.o.b., 1998 est.)</Exports>
3465<Imports>$881 million (c.i.f., 1998 est.)</Imports>
3466<Currency>1 Malagasy franc (FMG) = 100 centimes</Currency>
3467<Airports>133 (1999 est.)</Airports>
3468<Illicitdrugs>illicit producer of cannabis (cultivated and wild varieties) used mostly for domestic consumption; transshipment point for heroin</Illicitdrugs>
3469</record>
3470<record>
3471<Location>Caribbean, island in the Caribbean Sea, north of Trinidad and Tobago</Location>
3472<Geographiccoordinates>14 40 N, 61 00 W</Geographiccoordinates>
3473<Area>1100</Area>
3474<Climate>tropical; moderated by trade winds; rainy season (June to October); vulnerable to devastating cyclones (hurricanes) every eight years on average; average temperature 17.3 degrees C; humid</Climate>
3475<Naturalresources>coastal scenery and beaches, cultivable land</Naturalresources>
3476<Population>414516</Population>
3477<Populationgrowthrate>0.96% (2000 est.)</Populationgrowthrate>
3478<Sexratio>
3479at birth: 1.02 male(s)/female
3480under 15 years: 1.03 male(s)/female
348115-64 years: 0.99 male(s)/female
348265 years and over: 0.8 male(s)/female
3483total population: 0.98 male(s)/female (2000 est.)</Sexratio>
3484<Religions>Roman Catholic 95%, Hindu and pagan African 5%</Religions>
3485<Countryname>Martinique </Countryname>
3486<Capital>Fort-de-France</Capital>
3487<Flagdescription>a light blue background is divided into four quadrants by a white cross; in the center of each rectangle is a white snake; the flag of France is used for official occasions</Flagdescription>
3488<GDP>purchasing power parity - $4.24 billion (1996 est.)</GDP>
3489<Industries>construction, rum, cement, oil refining, sugar, tourism</Industries>
3490<Exports>$250 million (f.o.b., 1997)</Exports>
3491<Imports>$2 billion (c.i.f., 1997)</Imports>
3492<Currency>1 French franc (F) = 100 centimes</Currency>
3493<Airports>2 (1999 est.)</Airports>
3494<Illicitdrugs>transshipment point for cocaine and marijuana bound for the US and Europe</Illicitdrugs>
3495</record>
3496<record>
3497<Location>Eastern Asia, bordering the South China Sea and China</Location>
3498<Geographiccoordinates>22 10 N, 113 33 E</Geographiccoordinates>
3499<Area>21</Area>
3500<Climate>subtropical; marine with cool winters, warm summers</Climate>
3501<Naturalresources>NEGL</Naturalresources>
3502<Population>445594</Population>
3503<Populationgrowthrate>1.83% (2000 est.)</Populationgrowthrate>
3504<Sexratio>
3505at birth: 1.05 male(s)/female
3506under 15 years: 1.07 male(s)/female
350715-64 years: 0.9 male(s)/female
350865 years and over: 0.68 male(s)/female
3509total population: 0.92 male(s)/female (2000 est.)</Sexratio>
3510<Religions>Buddhist 50%, Roman Catholic 15%, none and other 35% (1997 est.)</Religions>
3511<Countryname>Macau </Countryname>
3512<Flagdescription>light green with a lotus flower above a stylized bridge and water in white, beneath an arc of five gold, five-pointed stars: one large in center of arc and four smaller</Flagdescription>
3513<GDP>purchasing power parity - $7.65 billion (1998 est.)</GDP>
3514<Industries>clothing, textiles, toys, electronics, footwear, tourism, gambling</Industries>
3515<Exports>$1.7 billion (f.o.b., 1999)</Exports>
3516<Imports>$1.5 billion (c.i.f., 1999)</Imports>
3517<Currency>1 pataca (P) = 100 avos</Currency>
3518<Airports>1 (1999 est.)</Airports>
3519</record>
3520<record>
3521<Location>Eastern Europe, northeast of Romania</Location>
3522<Geographiccoordinates>47 00 N, 29 00 E</Geographiccoordinates>
3523<Area>33843</Area>
3524<Climate>moderate winters, warm summers</Climate>
3525<Naturalresources>lignite, phosphorites, gypsum, arable land</Naturalresources>
3526<Population>4430654</Population>
3527<Populationgrowthrate>-0% (2000 est.)</Populationgrowthrate>
3528<Sexratio>
3529at birth: 1.05 male(s)/female
3530under 15 years: 1.04 male(s)/female
353115-64 years: 0.92 male(s)/female
353265 years and over: 0.59 male(s)/female
3533total population: 0.91 male(s)/female (2000 est.)</Sexratio>
3534<Religions>Eastern Orthodox 98.5%, Jewish 1.5%, Baptist (only about 1,000 members) (1991)</Religions>
3535<Countryname>Moldova </Countryname>
3536<Capital>Chisinau</Capital>
3537<Flagdescription>same color scheme as Romania - three equal vertical bands of blue (hoist side), yellow, and red; emblem in center of flag is of a Roman eagle of gold outlined in black with a red beak and talons carrying a yellow cross in its beak and a green olive branch in its right talons and a yellow scepter in its left talons; on its breast is a shield divided horizontally red over blue with a stylized ox head, star, rose, and crescent all in black-outlined yellow</Flagdescription>
3538<GDP>purchasing power parity - $9.7 billion (1999 est.)</GDP>
3539<Industries>food processing, agricultural machinery, foundry equipment, refrigerators and freezers, washing machines, hosiery, sugar, vegetable oil, shoes, textiles</Industries>
3540<Exports>$470 million (f.o.b., 1999)</Exports>
3541<Imports>$560 million (f.o.b., 1999)</Imports>
3542<Currency>Moldovan leu (MLD) (plural lei)</Currency>
3543<Airports>26 (1994 est.)</Airports>
3544<Illicitdrugs>limited cultivation of opium poppy and cannabis, mostly for CIS consumption; transshipment point for illicit drugs from Southwest Asia via Central Asia to Russia, Western Europe and possibly the US</Illicitdrugs>
3545</record>
3546<record>
3547<Location>Southern Africa, island in the Mozambique Channel, about one-half of the way from northern Madagascar to northern Mozambique</Location>
3548<Geographiccoordinates>12 50 S, 45 10 E</Geographiccoordinates>
3549<Area>374</Area>
3550<Climate>tropical; marine; hot, humid, rainy season during northeastern monsoon (November to May); dry season is cooler (May to November)</Climate>
3551<Naturalresources>NEGL</Naturalresources>
3552<Population>155911</Population>
3553<Populationgrowthrate>4.76% (2000 est.)</Populationgrowthrate>
3554<Sexratio>
3555at birth: 1.03 male(s)/female
3556under 15 years: 1.01 male(s)/female
355715-64 years: 1.2 male(s)/female
355865 years and over: 0.98 male(s)/female
3559total population: 1.1 male(s)/female (2000 est.)</Sexratio>
3560<Religions>Muslim 97%, Christian (mostly Roman Catholic)</Religions>
3561<Countryname>Mayotte </Countryname>
3562<Capital>Mamoutzou</Capital>
3563<Flagdescription>the flag of France is used</Flagdescription>
3564<GDP>purchasing power parity - $85 million (1998 est.)</GDP>
3565<Industries>newly created lobster and shrimp industry, construction</Industries>
3566<Exports>$3.44 million (f.o.b., 1997)</Exports>
3567<Imports>$141.3 million (f.o.b., 1997)</Imports>
3568<Currency>1 French franc (F) = 100 centimes</Currency>
3569<Airports>1 (1999 est.)</Airports>
3570</record>
3571<record>
3572<Location>Northern Asia, between China and Russia</Location>
3573<Geographiccoordinates>46 00 N, 105 00 E</Geographiccoordinates>
3574<Area>1000000</Area>
3575<Climate>desert; continental (large daily and seasonal temperature ranges)</Climate>
3576<Naturalresources>oil, coal, copper, molybdenum, tungsten, phosphates, tin, nickel, zinc, wolfram, fluorspar, gold</Naturalresources>
3577<Population>2650952</Population>
3578<Populationgrowthrate>1.54% (2000 est.)</Populationgrowthrate>
3579<Sexratio>
3580at birth: 1.05 male(s)/female
3581under 15 years: 1.03 male(s)/female
358215-64 years: 1 male(s)/female
358365 years and over: 0.76 male(s)/female
3584total population: 1 male(s)/female (2000 est.)</Sexratio>
3585<Religions>predominantly Tibetan Buddhist, Muslim 4%
3586note: previously limited religious activity because of communist regime</Religions>
3587<Countryname>Mongolia </Countryname>
3588<Capital>Ulaanbaatar</Capital>
3589<Flagdescription>three equal, vertical bands of red (hoist side), blue, and red; centered on the hoist-side red band in yellow is the national emblem ("soyombo" - a columnar arrangement of abstract and geometric representation for fire, sun, moon, earth, water, and the yin-yang symbol)</Flagdescription>
3590<GDP>purchasing power parity - $6.1 billion (1999 est.)</GDP>
3591<Industries>construction materials, mining (particularly coal and copper); food and beverages, processing of animal products</Industries>
3592<Exports>$316.8 million (f.o.b., 1998)</Exports>
3593<Imports>$472.4 million (f.o.b., 1998)</Imports>
3594<Currency>1 tughrik (Tug) = 100 mongos</Currency>
3595<Airports>34 (1994 est.)</Airports>
3596</record>
3597<record>
3598<Location>Caribbean, island in the Caribbean Sea, southeast of Puerto Rico</Location>
3599<Geographiccoordinates>16 45 N, 62 12 W</Geographiccoordinates>
3600<Area>100</Area>
3601<Climate>tropical; little daily or seasonal temperature variation</Climate>
3602<Naturalresources>NEGL</Naturalresources>
3603<Population>6409</Population>
3604<Populationgrowthrate>20.53% (2000 est.)</Populationgrowthrate>
3605<Sexratio>
3606at birth: 1.04 male(s)/female
3607under 15 years: 1 male(s)/female
360815-64 years: 0.92 male(s)/female
360965 years and over: 1.15 male(s)/female
3610total population: 0.96 male(s)/female (2000 est.)</Sexratio>
3611<Religions>Anglican, Methodist, Roman Catholic, Pentecostal, Seventh-Day Adventist, other Christian denominations</Religions>
3612<Countryname>Montserrat </Countryname>
3613<Capital>Plymouth (abandoned in 1997 due to volcanic activity; interim government buildings have been built at Brades, in the Carr's Bay/Little Bay vicinity at the northwest end of Montserrat)</Capital>
3614<Flagdescription>blue, with the flag of the UK in the upper hoist-side quadrant and the Montserratian coat of arms centered in the outer half of the flag; the coat of arms features a woman standing beside a yellow harp with her arm around a black cross</Flagdescription>
3615<GDP>purchasing power parity - $31 million (1998 est.)</GDP>
3616<Industries>tourism, rum, textiles, electronic appliances</Industries>
3617<Exports>$1.5 million (1998)</Exports>
3618<Imports>$26 million (1998)</Imports>
3619<Currency>1 East Caribbean dollar (EC$) = 100 cents</Currency>
3620<Airports>1 (1999 est.)</Airports>
3621</record>
3622<record>
3623<Location>Southern Africa, east of Zambia</Location>
3624<Geographiccoordinates>13 30 S, 34 00 E</Geographiccoordinates>
3625<Area>118480</Area>
3626<Climate>sub-tropical; rainy season (November to May); dry season (May to November)</Climate>
3627<Naturalresources>limestone, arable land, hydropower, unexploited deposits of uranium, coal, and bauxite</Naturalresources>
3628<Population>10385849</Population>
3629<Populationgrowthrate>1.61% (2000 est.)</Populationgrowthrate>
3630<Sexratio>
3631at birth: 1.03 male(s)/female
3632under 15 years: 1 male(s)/female
363315-64 years: 0.97 male(s)/female
363465 years and over: 0.69 male(s)/female
3635total population: 0.97 male(s)/female (2000 est.)</Sexratio>
3636<Religions>Protestant 55%, Roman Catholic 20%, Muslim 20%, indigenous beliefs</Religions>
3637<Countryname>Malawi </Countryname>
3638<Capital>Lilongwe</Capital>
3639<Flagdescription>three equal horizontal bands of black (top), red, and green with a radiant, rising, red sun centered in the black band</Flagdescription>
3640<GDP>purchasing power parity - $9.4 billion (1999 est.)</GDP>
3641<Industries>tobacco, tea, sugar, sawmill products, cement, consumer goods</Industries>
3642<Exports>$510 million (f.o.b., 1999)</Exports>
3643<Imports>$512 million (f.o.b., 1999)</Imports>
3644<Currency>1 Malawian kwacha (MK) = 100 tambala</Currency>
3645<Airports>44 (1999 est.)</Airports>
3646</record>
3647<record>
3648<Location>Southeastern Europe, north of Greece</Location>
3649<Geographiccoordinates>41 50 N, 22 00 E</Geographiccoordinates>
3650<Area>25333</Area>
3651<Climate>warm, dry summers and autumns and relatively cold winters with heavy snowfall</Climate>
3652<Naturalresources>chromium, lead, zinc, manganese, tungsten, nickel, low-grade iron ore, asbestos, sulfur, timber, arable land</Naturalresources>
3653<Population>2041467</Population>
3654<Populationgrowthrate>0.04% (2000 est.)</Populationgrowthrate>
3655<Sexratio>
3656at birth: 1.08 male(s)/female
3657under 15 years: 1.08 male(s)/female
365815-64 years: 1.01 male(s)/female
365965 years and over: 0.8 male(s)/female
3660total population: 1 male(s)/female (2000 est.)</Sexratio>
3661<Religions>Macedonian Orthodox 67%, Muslim 30%, other 3%</Religions>
3662<Countryname>The Former Yugoslav Republic of Macedonia </Countryname>
3663<Capital>Skopje</Capital>
3664<Flagdescription>a rising yellow sun with eight rays extending to the edges of the red field</Flagdescription>
3665<GDP>purchasing power parity - $7.6 billion (1999 est.)</GDP>
3666<Industries>coal, metallic chromium, lead, zinc, ferronickel, textiles, wood products, tobacco</Industries>
3667<Exports>$1.2 billion (f.o.b., 1999 est.)</Exports>
3668<Imports>$1.56 billion (f.o.b., 1999 est.)</Imports>
3669<Currency>1 Macedonian denar (MKD) = 100 deni</Currency>
3670<Airports>16 (1999 est.)</Airports>
3671<Illicitdrugs>increasing transshipment point for Southwest Asian heroin and hashish; minor transit point for South American cocaine destined for Europe</Illicitdrugs>
3672</record>
3673<record>
3674<Location>Western Africa, southwest of Algeria</Location>
3675<Geographiccoordinates>17 00 N, 4 00 W</Geographiccoordinates>
3676<Area>1000000</Area>
3677<Climate>subtropical to arid; hot and dry February to June; rainy, humid, and mild June to November; cool and dry November to February</Climate>
3678<Naturalresources>gold, phosphates, kaolin, salt, limestone, uranium, hydropower
3679note: bauxite, iron ore, manganese, tin, and copper deposits are known but not exploited</Naturalresources>
3680<Population>10685948</Population>
3681<Populationgrowthrate>2.98% (2000 est.)</Populationgrowthrate>
3682<Sexratio>
3683at birth: 1.03 male(s)/female
3684under 15 years: 1.01 male(s)/female
368515-64 years: 0.91 male(s)/female
368665 years and over: 0.89 male(s)/female
3687total population: 0.95 male(s)/female (2000 est.)</Sexratio>
3688<Religions>Muslim 90%, indigenous beliefs 9%, Christian 1%</Religions>
3689<Countryname>Mali </Countryname>
3690<Capital>Bamako</Capital>
3691<Flagdescription>three equal vertical bands of green (hoist side), yellow, and red; uses the popular pan-African colors of Ethiopia</Flagdescription>
3692<GDP>purchasing power parity - $8.5 billion (1999 est.)</GDP>
3693<Industries>minor local consumer goods production and food processing; construction; phosphate and gold mining</Industries>
3694<Exports>$640 million (f.o.b., 1999 est.)</Exports>
3695<Imports>$650 million (f.o.b., 1999 est.)</Imports>
3696<Currency>1 Communaute Financiere Africaine franc (CFAF) = 100 centimes</Currency>
3697<Airports>28 (1999 est.)</Airports>
3698</record>
3699<record>
3700<Location>Western Europe, bordering the Mediterranean Sea, on the southern coast of France, near the border with Italy</Location>
3701<Geographiccoordinates>43 44 N, 7 24 E</Geographiccoordinates>
3702<Area>1</Area>
3703<Climate>Mediterranean with mild, wet winters and hot, dry summers</Climate>
3704<Naturalresources>none</Naturalresources>
3705<Population>31693</Population>
3706<Populationgrowthrate>0.48% (2000 est.)</Populationgrowthrate>
3707<Sexratio>
3708at birth: 1.05 male(s)/female
3709under 15 years: 1.05 male(s)/female
371015-64 years: 0.97 male(s)/female
371165 years and over: 0.69 male(s)/female
3712total population: 0.91 male(s)/female (2000 est.)</Sexratio>
3713<Religions>Roman Catholic 90%</Religions>
3714<Countryname>Monaco </Countryname>
3715<Capital>Monaco</Capital>
3716<Flagdescription>two equal horizontal bands of red (top) and white; similar to the flag of Indonesia which is longer and the flag of Poland which is white (top) and red</Flagdescription>
3717<GDP>purchasing power parity - $870 million (1999 est.)</GDP>
3718<Industries>tourism, construction, small-scale industrial and consumer products</Industries>
3719<Exports>$NA; full customs integration with France, which collects and rebates Monegasque trade duties; also participates in EU market system through customs union with France</Exports>
3720<Imports>$NA; full customs integration with France, which collects and rebates Monegasque trade duties; also participates in EU market system through customs union with France</Imports>
3721<Currency>1 French franc (F) = 100 centimes</Currency>
3722<Airports>linked to airport in Nice, France, by helicopter service</Airports>
3723</record>
3724<record>
3725<Location>Northern Africa, bordering the North Atlantic Ocean and the Mediterranean Sea, between Algeria and Western Sahara</Location>
3726<Geographiccoordinates>32 00 N, 5 00 W</Geographiccoordinates>
3727<Area>446550</Area>
3728<Climate>Mediterranean, becoming more extreme in the interior</Climate>
3729<Naturalresources>phosphates, iron ore, manganese, lead, zinc, fish, salt</Naturalresources>
3730<Population>30122350</Population>
3731<Populationgrowthrate>1.74% (2000 est.)</Populationgrowthrate>
3732<Sexratio>
3733at birth: 1.05 male(s)/female
3734under 15 years: 1.04 male(s)/female
373515-64 years: 0.98 male(s)/female
373665 years and over: 0.84 male(s)/female
3737total population: 1 male(s)/female (2000 est.)</Sexratio>
3738<Religions>Muslim 98.7%, Christian 1.1%, Jewish 0.2%</Religions>
3739<Countryname>Morocco </Countryname>
3740<Capital>Rabat</Capital>
3741<Flagdescription>red with a green pentacle (five-pointed, linear star) known as Solomon's seal in the center of the flag; green is the traditional color of Islam</Flagdescription>
3742<GDP>purchasing power parity - $108 billion (1999 est.)</GDP>
3743<Industries>phosphate rock mining and processing, food processing, leather goods, textiles, construction, tourism</Industries>
3744<Exports>$7.1 billion (f.o.b., 1998)</Exports>
3745<Imports>$9.5 billion (f.o.b., 1998)</Imports>
3746<Currency>1 Moroccan dirham (DH) = 100 centimes</Currency>
3747<Airports>70 (1999 est.)</Airports>
3748<Illicitdrugs>illicit producer of hashish; trafficking on the increase for both domestic and international drug markets; shipments of hashish mostly directed to Western Europe; transit point for cocaine from South America destined for Western Europe</Illicitdrugs>
3749</record>
3750<record>
3751<Location>Southern Africa, island in the Indian Ocean, east of Madagascar</Location>
3752<Geographiccoordinates>20 17 S, 57 33 E</Geographiccoordinates>
3753<Area>1860</Area>
3754<Climate>tropical, modified by southeast trade winds; warm, dry winter (May to November); hot, wet, humid summer (November to May)</Climate>
3755<Naturalresources>arable land, fish</Naturalresources>
3756<Population>1179368</Population>
3757<Populationgrowthrate>0.89% (2000 est.)</Populationgrowthrate>
3758<Sexratio>
3759at birth: 1 male(s)/female
3760under 15 years: 1.03 male(s)/female
376115-64 years: 0.99 male(s)/female
376265 years and over: 0.67 male(s)/female
3763total population: 0.98 male(s)/female (2000 est.)</Sexratio>
3764<Religions>Hindu 52%, Christian 28.3% (Roman Catholic 26%, Protestant 2.3%), Muslim 16.6%, other 3.1%</Religions>
3765<Countryname>Mauritius </Countryname>
3766<Capital>Port Louis</Capital>
3767<Flagdescription>four equal horizontal bands of red (top), blue, yellow, and green</Flagdescription>
3768<GDP>purchasing power parity - $12.3 billion (1999 est.)</GDP>
3769<Industries>food processing (largely sugar milling), textiles, clothing; chemicals, metal products, transport equipment, nonelectrical machinery; tourism</Industries>
3770<Exports>$1.7 billion (f.o.b., 1999)</Exports>
3771<Imports>$2.1 billion (f.o.b., 1998)</Imports>
3772<Currency>1 Mauritian rupee (MauR) = 100 cents</Currency>
3773<Airports>5 (1999 est.)</Airports>
3774<Illicitdrugs>minor consumer and transshipment point for heroin from South Asia; small amounts of cannabis produced and consumed locally</Illicitdrugs>
3775</record>
3776<record>
3777<Location>Oceania, atoll in the North Pacific Ocean, about one-third of the way from Honolulu to Tokyo</Location>
3778<Geographiccoordinates>28 13 N, 177 22 W</Geographiccoordinates>
3779<Area>6</Area>
3780<Climate>subtropical, but moderated by prevailing easterly winds</Climate>
3781<Naturalresources>wildlife, terrestrial and aquatic</Naturalresources>
3782<Population></Population>
3783<Countryname>Midway Islands </Countryname>
3784<Capital>none; administered from Washington, DC</Capital>
3785<Flagdescription>the flag of the US is used</Flagdescription>
3786<Airports>3 (1999 est.)</Airports>
3787</record>
3788<record>
3789<Location>Northern Africa, bordering the North Atlantic Ocean, between Senegal and Western Sahara</Location>
3790<Geographiccoordinates>20 00 N, 12 00 W</Geographiccoordinates>
3791<Area>1030700</Area>
3792<Climate>desert; constantly hot, dry, dusty</Climate>
3793<Naturalresources>iron ore, gypsum, fish, copper, phosphate</Naturalresources>
3794<Population>2667859</Population>
3795<Populationgrowthrate>2.94% (2000 est.)</Populationgrowthrate>
3796<Sexratio>
3797at birth: 1.03 male(s)/female
3798under 15 years: 1 male(s)/female
379915-64 years: 0.97 male(s)/female
380065 years and over: 0.71 male(s)/female
3801total population: 0.98 male(s)/female (2000 est.)</Sexratio>
3802<Religions>Muslim 100%</Religions>
3803<Countryname>Mauritania </Countryname>
3804<Capital>Nouakchott</Capital>
3805<Flagdescription>green with a yellow five-pointed star above a yellow, horizontal crescent; the closed side of the crescent is down; the crescent, star, and color green are traditional symbols of Islam</Flagdescription>
3806<GDP>purchasing power parity - $4.9 billion (1999 est.)</GDP>
3807<Industries>fish processing, mining of iron ore and gypsum</Industries>
3808<Exports>$425 million (f.o.b., 1997)</Exports>
3809<Imports>$444 million (f.o.b., 1997)</Imports>
3810<Currency>1 ouguiya (UM) = 5 khoums</Currency>
3811<Airports>26 (1999 est.)</Airports>
3812</record>
3813<record>
3814<Location>Southern Europe, islands in the Mediterranean Sea, south of Sicily (Italy)</Location>
3815<Geographiccoordinates>35 50 N, 14 35 E</Geographiccoordinates>
3816<Area>316</Area>
3817<Climate>Mediterranean with mild, rainy winters and hot, dry summers</Climate>
3818<Naturalresources>limestone, salt, arable land</Naturalresources>
3819<Population>391670</Population>
3820<Populationgrowthrate>0.74% (2000 est.)</Populationgrowthrate>
3821<Sexratio>
3822at birth: 1.06 male(s)/female
3823under 15 years: 1.07 male(s)/female
382415-64 years: 1.01 male(s)/female
382565 years and over: 0.72 male(s)/female
3826total population: 0.98 male(s)/female (2000 est.)</Sexratio>
3827<Religions>Roman Catholic 91%</Religions>
3828<Countryname>Malta </Countryname>
3829<Capital>Valletta</Capital>
3830<Flagdescription>two equal vertical bands of white (hoist side) and red; in the upper hoist-side corner is a representation of the George Cross, edged in red</Flagdescription>
3831<GDP>purchasing power parity - $5.3 billion (1999 est.)</GDP>
3832<Industries>tourism; electronics, ship building and repair, construction; food and beverages, textiles, footwear, clothing, tobacco</Industries>
3833<Exports>$1.8 billion (f.o.b., 1998)</Exports>
3834<Imports>$2.7 billion (f.o.b., 1998)</Imports>
3835<Currency>1 Maltese lira (LM) = 100 cents</Currency>
3836<Airports>1 (1999 est.)</Airports>
3837<Illicitdrugs>minor transshipment point for hashish from North Africa to Western Europe</Illicitdrugs>
3838</record>
3839<record>
3840<Location>Middle East, bordering the Arabian Sea, Gulf of Oman, and Persian Gulf, between Yemen and UAE</Location>
3841<Geographiccoordinates>21 00 N, 57 00 E</Geographiccoordinates>
3842<Area>212460</Area>
3843<Climate>dry desert; hot, humid along coast; hot, dry interior; strong southwest summer monsoon (May to September) in far south</Climate>
3844<Naturalresources>petroleum, copper, asbestos, some marble, limestone, chromium, gypsum, natural gas</Naturalresources>
3845<Population>2533389</Population>
3846<Populationgrowthrate>3.46% (2000 est.)</Populationgrowthrate>
3847<Sexratio>
3848at birth: 1.05 male(s)/female
3849under 15 years: 1.04 male(s)/female
385015-64 years: 1.58 male(s)/female
385165 years and over: 1.11 male(s)/female
3852total population: 1.31 male(s)/female (2000 est.)</Sexratio>
3853<Religions>Ibadhi Muslim 75%, Sunni Muslim, Shi'a Muslim, Hindu</Religions>
3854<Countryname>Oman </Countryname>
3855<Capital>Muscat</Capital>
3856<Flagdescription>three horizontal bands of white, red, and green of equal width with a broad, vertical, red band on the hoist side; the national emblem (a khanjar dagger in its sheath superimposed on two crossed swords in scabbards) in white is centered at the top of the vertical band</Flagdescription>
3857<GDP>purchasing power parity - $19.6 billion (1999 est.)</GDP>
3858<Industries>crude oil production and refining, natural gas production, construction, cement, copper</Industries>
3859<Exports>$7.2 billion (f.o.b., 1999 est.)</Exports>
3860<Imports>$5.4 billion (f.o.b., 1999 est.)</Imports>
3861<Currency>1 Omani rial (RO) = 1,000 baiza</Currency>
3862<Airports>142 (1999 est.)</Airports>
3863</record>
3864<record>
3865<Location>Southern Asia, group of atolls in the Indian Ocean, south-southwest of India</Location>
3866<Geographiccoordinates>3 15 N, 73 00 E</Geographiccoordinates>
3867<Area>300</Area>
3868<Climate>tropical; hot, humid; dry, northeast monsoon (November to March); rainy, southwest monsoon (June to August)</Climate>
3869<Naturalresources>fish</Naturalresources>
3870<Population>301475</Population>
3871<Populationgrowthrate>3.06% (2000 est.)</Populationgrowthrate>
3872<Sexratio>
3873at birth: 1.05 male(s)/female
3874under 15 years: 1.06 male(s)/female
387515-64 years: 1.04 male(s)/female
387665 years and over: 1.09 male(s)/female
3877total population: 1.05 male(s)/female (2000 est.)</Sexratio>
3878<Religions>Sunni Muslim</Religions>
3879<Countryname>Maldives </Countryname>
3880<Capital>Male</Capital>
3881<Flagdescription>red with a large green rectangle in the center bearing a vertical white crescent; the closed side of the crescent is on the hoist side of the flag</Flagdescription>
3882<GDP>purchasing power parity - $540 million (1999 est.)</GDP>
3883<Industries>fish processing, tourism, shipping, boat building, coconut processing, garments, woven mats, rope, handicrafts, coral and sand mining</Industries>
3884<Exports>$98 million (f.o.b., 1998)</Exports>
3885<Imports>$312 million (f.o.b., 1998)</Imports>
3886<Currency>1 rufiyaa (Rf) = 100 laari</Currency>
3887<Airports>5 (1999 est.)</Airports>
3888</record>
3889<record>
3890<Location>Middle America, bordering the Caribbean Sea and the Gulf of Mexico, between Belize and the US and bordering the North Pacific Ocean, between Guatemala and the US</Location>
3891<Geographiccoordinates>23 00 N, 102 00 W</Geographiccoordinates>
3892<Area>1972550</Area>
3893<Climate>varies from tropical to desert</Climate>
3894<Naturalresources>petroleum, silver, copper, gold, lead, zinc, natural gas, timber</Naturalresources>
3895<Population>100349766</Population>
3896<Populationgrowthrate>1.53% (2000 est.)</Populationgrowthrate>
3897<Sexratio>
3898at birth: 1.05 male(s)/female
3899under 15 years: 1.04 male(s)/female
390015-64 years: 0.95 male(s)/female
390165 years and over: 0.81 male(s)/female
3902total population: 0.97 male(s)/female (2000 est.)</Sexratio>
3903<Religions>nominally Roman Catholic 89%, Protestant 6%, other 5%</Religions>
3904<Countryname>Mexico </Countryname>
3905<Capital>Mexico</Capital>
3906<Flagdescription>three equal vertical bands of green (hoist side), white, and red; the coat of arms (an eagle perched on a cactus with a snake in its beak) is centered in the white band</Flagdescription>
3907<GDP>purchasing power parity - $865.5 billion (1999 est.)</GDP>
3908<Industries>food and beverages, tobacco, chemicals, iron and steel, petroleum, mining, textiles, clothing, motor vehicles, consumer durables, tourism</Industries>
3909<Exports>$136.8 billion (f.o.b., 1999), includes in-bond industries (assembly plant operations with links to US companies)</Exports>
3910<Imports>$142.1 billion (f.o.b., 1999), includes in-bond industries (assembly plant operations with links to US companies)</Imports>
3911<Currency>1 New Mexican peso (Mex$) = 100 centavos</Currency>
3912<Airports>1,806 (1999 est.)</Airports>
3913<Illicitdrugs>illicit cultivation of opium poppy (cultivation in 1998 - 5,500 hectares; potential production - 60 metric tons) and cannabis cultivation in 1998 - 4,600 hectares; government eradication efforts have been key in keeping illicit crop levels low; major supplier of heroin and marijuana to the US market; continues as the primary transshipment country for US-bound cocaine from South America; involved in the production and distribution of methamphetamines; upsurge in drug-related violence and official corruption; major drug syndicates growing more powerful</Illicitdrugs>
3914</record>
3915<record>
3916<Location>Southeastern Asia, peninsula and northern one-third of the island of Borneo, bordering Indonesia and the South China Sea, south of Vietnam</Location>
3917<Geographiccoordinates>2 30 N, 112 30 E</Geographiccoordinates>
3918<Area>329750</Area>
3919<Climate>tropical; annual southwest (April to October) and northeast (October to February) monsoons</Climate>
3920<Naturalresources>tin, petroleum, timber, copper, iron ore, natural gas, bauxite</Naturalresources>
3921<Population>21793293</Population>
3922<Populationgrowthrate>2.01% (2000 est.)</Populationgrowthrate>
3923<Sexratio>
3924at birth: 1.06 male(s)/female
3925under 15 years: 1.06 male(s)/female
392615-64 years: 1 male(s)/female
392765 years and over: 0.78 male(s)/female
3928total population: 1.01 male(s)/female (2000 est.)</Sexratio>
3929<Religions>Islam, Buddhism, Daoism, Hinduism, Christianity, Sikhism; note - in addition, Shamanism is practiced in East Malaysia</Religions>
3930<Countryname>Malaysia </Countryname>
3931<Capital>Kuala Lumpur</Capital>
3932<Flagdescription>14 equal horizontal stripes of red (top) alternating with white (bottom); there is a blue rectangle in the upper hoist-side corner bearing a yellow crescent and a yellow fourteen-pointed star; the crescent and the star are traditional symbols of Islam; the design was based on the flag of the US</Flagdescription>
3933<GDP>purchasing power parity - $229.1 billion (1999 est.)</GDP>
3934<Industries>Peninsular Malaysia - rubber and oil palm processing and manufacturing, light manufacturing industry, electronics, tin mining and smelting, logging and processing timber; Sabah - logging, petroleum production; Sarawak - agriculture processing, petroleum production and refining, logging</Industries>
3935<Exports>$83.5 billion (1999 est.)</Exports>
3936<Imports>$61.5 billion (1999 est.)</Imports>
3937<Currency>1 ringgit (M$) = 100 sen</Currency>
3938<Airports>115 (1999 est.)</Airports>
3939<Illicitdrugs>transit point for some illicit drugs going to Western markets; drug trafficking prosecuted vigorously and carries severe penalties</Illicitdrugs>
3940</record>
3941<record>
3942<Location>Southern Africa, bordering the Mozambique Channel, between South Africa and Tanzania</Location>
3943<Geographiccoordinates>18 15 S, 35 00 E</Geographiccoordinates>
3944<Area>801590</Area>
3945<Climate>tropical to subtropical</Climate>
3946<Naturalresources>coal, titanium, natural gas, hydropower</Naturalresources>
3947<Population>19104696</Population>
3948<Populationgrowthrate>1.47% (2000 est.)</Populationgrowthrate>
3949<Sexratio>
3950at birth: 1.03 male(s)/female
3951under 15 years: 0.99 male(s)/female
395215-64 years: 0.97 male(s)/female
395365 years and over: 0.71 male(s)/female
3954total population: 0.97 male(s)/female (2000 est.)</Sexratio>
3955<Religions>indigenous beliefs 50%, Christian 30%, Muslim 20%</Religions>
3956<Countryname>Mozambique </Countryname>
3957<Capital>Maputo</Capital>
3958<Flagdescription>three equal horizontal bands of green (top), black, and yellow with a red isosceles triangle based on the hoist side; the black band is edged in white; centered in the triangle is a yellow five-pointed star bearing a crossed rifle and hoe in black superimposed on an open white book</Flagdescription>
3959<GDP>purchasing power parity - $18.7 billion (1999 est.)</GDP>
3960<Industries>food, beverages, chemicals (fertilizer, soap, paints), petroleum products, textiles, cement, glass, asbestos, tobacco</Industries>
3961<Exports>$300 million (f.o.b., 1999 est.)</Exports>
3962<Imports>$1.6 billion (c.i.f., 1999 est.)</Imports>
3963<Currency>1 metical (Mt) = 100 centavos</Currency>
3964<Airports>170 (1999 est.)</Airports>
3965<Illicitdrugs>Southern African transit hub for South American cocaine probably destined for the European and US markets; producer of hashish and methaqualone</Illicitdrugs>
3966</record>
3967<record>
3968<Location>Oceania, islands in the South Pacific Ocean, east of Australia</Location>
3969<Geographiccoordinates>21 30 S, 165 30 E</Geographiccoordinates>
3970<Area>19060</Area>
3971<Climate>tropical; modified by southeast trade winds; hot, humid</Climate>
3972<Naturalresources>nickel, chrome, iron, cobalt, manganese, silver, gold, lead, copper</Naturalresources>
3973<Population>201816</Population>
3974<Populationgrowthrate>1.52% (2000 est.)</Populationgrowthrate>
3975<Sexratio>
3976at birth: 1.05 male(s)/female
3977under 15 years: 1.04 male(s)/female
397815-64 years: 1.02 male(s)/female
397965 years and over: 0.9 male(s)/female
3980total population: 1.02 male(s)/female (2000 est.)</Sexratio>
3981<Religions>Roman Catholic 60%, Protestant 30%, other 10%</Religions>
3982<Countryname>New Caledonia </Countryname>
3983<Capital>Noumea</Capital>
3984<Flagdescription>the flag of France is used</Flagdescription>
3985<GDP>purchasing power parity - $3 billion (1998 est.)</GDP>
3986<Industries>nickel mining and smelting</Industries>
3987<Exports>$381 million (f.o.b., 1998)</Exports>
3988<Imports>$922 million (c.i.f., 1998)</Imports>
3989<Currency>1 Comptoirs Francais du Pacifique franc (CFPF) = 100 centimes</Currency>
3990<Airports>28 (1999 est.)</Airports>
3991</record>
3992<record>
3993<Location>Oceania, island in the South Pacific Ocean, east of Tonga</Location>
3994<Geographiccoordinates>19 02 S, 169 52 W</Geographiccoordinates>
3995<Area>260</Area>
3996<Climate>tropical; modified by southeast trade winds</Climate>
3997<Naturalresources>fish, arable land</Naturalresources>
3998<Population>2113</Population>
3999<Populationgrowthrate>0.47% (2000 est.)</Populationgrowthrate>
4000<Religions>Ekalesia Niue (Niuean Church - a Protestant church closely related to the London Missionary Society) 75%, Latter-Day Saints 10%, other 15% (mostly Roman Catholic, Jehovah's Witnesses, Seventh-Day Adventist)</Religions>
4001<Countryname>Niue </Countryname>
4002<Capital>Alofi</Capital>
4003<Flagdescription>yellow with the flag of the UK in the upper hoist-side quadrant; the flag of the UK bears five yellow five-pointed stars - a large one on a blue disk in the center and a smaller one on each arm of the bold red cross</Flagdescription>
4004<GDP>purchasing power parity - $4.5 million (1994 est.)</GDP>
4005<Industries>tourism, handicrafts, food processing</Industries>
4006<Exports>$117,500 (f.o.b., 1989)</Exports>
4007<Imports>$4.1 million (c.i.f., 1989)</Imports>
4008<Currency>1 New Zealand dollar (NZ$) = 100 cents</Currency>
4009<Airports>1 (1999 est.)</Airports>
4010</record>
4011<record>
4012<Location>Oceania, island in the South Pacific Ocean, east of Australia</Location>
4013<Geographiccoordinates>29 02 S, 167 57 E</Geographiccoordinates>
4014<Area>34</Area>
4015<Climate>subtropical, mild, little seasonal temperature variation</Climate>
4016<Naturalresources>fish</Naturalresources>
4017<Population>1892</Population>
4018<Populationgrowthrate>-0.68% (2000 est.)</Populationgrowthrate>
4019<Religions>Anglican 39%, Roman Catholic 11.7%, Uniting Church in Australia 16.4%, Seventh-Day Adventist 4.4%, none 9.2%, unknown 16.9%, other 2.4% (1986)</Religions>
4020<Countryname>Norfolk Island </Countryname>
4021<Capital>Kingston</Capital>
4022<Flagdescription>three vertical bands of green (hoist side), white, and green with a large green Norfolk Island pine tree centered in the slightly wider white band</Flagdescription>
4023<GDP>purchasing power parity - $NA</GDP>
4024<Industries>tourism</Industries>
4025<Exports>$1.5 million (f.o.b., FY91/92)</Exports>
4026<Imports>$17.9 million (c.i.f., FY91/92)</Imports>
4027<Currency>1 Australian dollar ($A) = 100 cents</Currency>
4028<Airports>1 (1999 est.)</Airports>
4029</record>
4030<record>
4031<Location>Western Africa, southeast of Algeria</Location>
4032<Geographiccoordinates>16 00 N, 8 00 E</Geographiccoordinates>
4033<Area>1000000</Area>
4034<Climate>desert; mostly hot, dry, dusty; tropical in extreme south</Climate>
4035<Naturalresources>uranium, coal, iron ore, tin, phosphates, gold, petroleum</Naturalresources>
4036<Population>10075511</Population>
4037<Populationgrowthrate>2.75% (2000 est.)</Populationgrowthrate>
4038<Sexratio>
4039at birth: 1.03 male(s)/female
4040under 15 years: 1.04 male(s)/female
404115-64 years: 0.95 male(s)/female
404265 years and over: 1.11 male(s)/female
4043total population: 1 male(s)/female (2000 est.)</Sexratio>
4044<Religions>Muslim 80%, remainder indigenous beliefs and Christians</Religions>
4045<Countryname>Niger </Countryname>
4046<Capital>Niamey</Capital>
4047<Flagdescription>three equal horizontal bands of orange (top), white, and green with a small orange disk (representing the sun) centered in the white band; similar to the flag of India, which has a blue spoked wheel centered in the white band</Flagdescription>
4048<GDP>purchasing power parity - $9.6 billion (1999 est.)</GDP>
4049<Industries>uranium mining, cement, brick, textiles, food processing, chemicals, slaughterhouses</Industries>
4050<Exports>$269 million (f.o.b., 1997)</Exports>
4051<Imports>$295 million (c.i.f., 1997)</Imports>
4052<Currency>1 Communaute Financiere Africaine franc (CFAF) = 100 centimes</Currency>
4053<Airports>27 (1999 est.)</Airports>
4054</record>
4055<record>
4056<Location>Oceania, group of islands in the South Pacific Ocean, about three-quarters of the way from Hawaii to Australia</Location>
4057<Geographiccoordinates>16 00 S, 167 00 E</Geographiccoordinates>
4058<Area>14760</Area>
4059<Climate>tropical; moderated by southeast trade winds</Climate>
4060<Naturalresources>manganese, hardwood forests, fish</Naturalresources>
4061<Population>189618</Population>
4062<Populationgrowthrate>1.74% (2000 est.)</Populationgrowthrate>
4063<Sexratio>
4064at birth: 1.05 male(s)/female
4065under 15 years: 1.04 male(s)/female
406615-64 years: 1.05 male(s)/female
406765 years and over: 1.18 male(s)/female
4068total population: 1.05 male(s)/female (2000 est.)</Sexratio>
4069<Religions>Presbyterian 36.7%, Anglican 15%, Roman Catholic 15%, indigenous beliefs 7.6%, Seventh-Day Adventist 6.2%, Church of Christ 3.8%, other 15.7%</Religions>
4070<Countryname>Vanuatu </Countryname>
4071<Capital>Port-Vila</Capital>
4072<Flagdescription>two equal horizontal bands of red (top) and green with a black isosceles triangle (based on the hoist side) all separated by a black-edged yellow stripe in the shape of a horizontal Y (the two points of the Y face the hoist side and enclose the triangle); centered in the triangle is a boar's tusk encircling two crossed namele leaves, all in yellow</Flagdescription>
4073<GDP>purchasing power parity - $245 million (1999 est.)</GDP>
4074<Industries>food and fish freezing, wood processing, meat canning</Industries>
4075<Exports>$33.8 million (f.o.b., 1998)</Exports>
4076<Imports>$76.2 million (f.o.b., 1998)</Imports>
4077<Currency>1 vatu (VT) = 100 centimes</Currency>
4078<Airports>32 (1999 est.)</Airports>
4079</record>
4080<record>
4081<Location>Western Africa, bordering the Gulf of Guinea, between Benin and Cameroon</Location>
4082<Geographiccoordinates>10 00 N, 8 00 E</Geographiccoordinates>
4083<Area>923768</Area>
4084<Climate>varies; equatorial in south, tropical in center, arid in north</Climate>
4085<Naturalresources>petroleum, tin, columbite, iron ore, coal, limestone, lead, zinc, natural gas, hydropower, arable land</Naturalresources>
4086<Population>123337822</Population>
4087<Populationgrowthrate>2.67% (2000 est.)</Populationgrowthrate>
4088<Sexratio>
4089at birth: 1.03 male(s)/female
4090under 15 years: 1.01 male(s)/female
409115-64 years: 1.04 male(s)/female
409265 years and over: 1 male(s)/female
4093total population: 1.02 male(s)/female (2000 est.)</Sexratio>
4094<Religions>Muslim 50%, Christian 40%, indigenous beliefs 10%</Religions>
4095<Countryname>Nigeria </Countryname>
4096<Capital>Abuja
4097note: on 12 December 1991 the capital was officially moved from Lagos to Abuja; many government offices remain in Lagos pending completion of facilities in Abuja</Capital>
4098<Flagdescription>three equal vertical bands of green (hoist side), white, and green</Flagdescription>
4099<GDP>purchasing power parity - $110.5 billion (1999 est.)</GDP>
4100<Industries>crude oil, coal, tin, columbite, palm oil, peanuts, cotton, rubber, wood, hides and skins, textiles, cement and other construction materials, food products, footwear, chemicals, fertilizer, printing, ceramics, steel</Industries>
4101<Exports>$13.1 billion (f.o.b., 1999)</Exports>
4102<Imports>$10 billion (f.o.b., 1999)</Imports>
4103<Currency>1 naira (N) = 100 kobo</Currency>
4104<Airports>71 (1999 est.)</Airports>
4105<Illicitdrugs>facilitates movement of heroin en route from Southeast and Southwest Asia to Western Europe and North America; increasingly a transit route for cocaine from South America intended for European, East Asian, and North American markets</Illicitdrugs>
4106</record>
4107<record>
4108<Location>Western Europe, bordering the North Sea, between Belgium and Germany</Location>
4109<Geographiccoordinates>52 30 N, 5 45 E</Geographiccoordinates>
4110<Area>41532</Area>
4111<Climate>temperate; marine; cool summers and mild winters</Climate>
4112<Naturalresources>natural gas, petroleum, arable land</Naturalresources>
4113<Population>15892237</Population>
4114<Populationgrowthrate>0.57% (2000 est.)</Populationgrowthrate>
4115<Sexratio>
4116at birth: 1.05 male(s)/female
4117under 15 years: 1.05 male(s)/female
411815-64 years: 1.03 male(s)/female
411965 years and over: 0.69 male(s)/female
4120total population: 0.98 male(s)/female (2000 est.)</Sexratio>
4121<Religions>Roman Catholic 34%, Protestant 25%, Muslim 3%, other 2%, unaffiliated 36% (1991)</Religions>
4122<Countryname>Netherlands </Countryname>
4123<Capital>Amsterdam; The Hague is the seat of government</Capital>
4124<Flagdescription>three equal horizontal bands of red (top), white, and blue; similar to the flag of Luxembourg, which uses a lighter blue and is longer</Flagdescription>
4125<GDP>purchasing power parity - $365.1 billion (1999 est.)</GDP>
4126<Industries>agroindustries, metal and engineering products, electrical machinery and equipment, chemicals, petroleum, construction, microelectronics, fishing</Industries>
4127<Exports>$169 billion (f.o.b., 1998)</Exports>
4128<Imports>$152 billion (f.o.b., 1998)</Imports>
4129<Currency>1 Netherlands guilder, gulden, or florin (f.) = 100 cents; note - to be replaced by the euro on 1 January 2002</Currency>
4130<Airports>28 (1999 est.)</Airports>
4131<Illicitdrugs>major European producer of illicit amphetamines and other synthetic drugs; important gateway for cocaine, heroin, and hashish entering Europe</Illicitdrugs>
4132</record>
4133<record>
4134<Location>Northern Europe, bordering the North Sea and the North Atlantic Ocean, west of Sweden</Location>
4135<Geographiccoordinates>62 00 N, 10 00 E</Geographiccoordinates>
4136<Area>324220</Area>
4137<Climate>temperate along coast, modified by North Atlantic Current; colder interior; rainy year-round on west coast</Climate>
4138<Naturalresources>petroleum, copper, natural gas, pyrites, nickel, iron ore, zinc, lead, fish, timber, hydropower</Naturalresources>
4139<Population>4481162</Population>
4140<Populationgrowthrate>0.5% (2000 est.)</Populationgrowthrate>
4141<Sexratio>
4142at birth: 1.06 male(s)/female
4143under 15 years: 1.06 male(s)/female
414415-64 years: 1.03 male(s)/female
414565 years and over: 0.71 male(s)/female
4146total population: 0.98 male(s)/female (2000 est.)</Sexratio>
4147<Religions>Evangelical Lutheran 86% (state church), other Protestant and Roman Catholic 3%, other 1%, none and unknown 10% (1997)</Religions>
4148<Countryname>Norway </Countryname>
4149<Capital>Oslo</Capital>
4150<Flagdescription>red with a blue cross outlined in white that extends to the edges of the flag; the vertical part of the cross is shifted to the hoist side in the style of the Dannebrog (Danish flag)</Flagdescription>
4151<GDP>purchasing power parity - $111.3 billion (1999 est.)</GDP>
4152<Industries>petroleum and gas, food processing, shipbuilding, pulp and paper products, metals, chemicals, timber, mining, textiles, fishing</Industries>
4153<Exports>$47.3 billion (f.o.b., 1999 est.)</Exports>
4154<Imports>$38.6 billion (f.o.b., 1999 est.)</Imports>
4155<Currency>1 Norwegian krone (NKr) = 100 oere</Currency>
4156<Airports>103 (1999 est.)</Airports>
4157</record>
4158<record>
4159<Location>Southern Asia, between China and India</Location>
4160<Geographiccoordinates>28 00 N, 84 00 E</Geographiccoordinates>
4161<Area>140800</Area>
4162<Climate>varies from cool summers and severe winters in north to subtropical summers and mild winters in south</Climate>
4163<Naturalresources>quartz, water, timber, hydropower, scenic beauty, small deposits of lignite, copper, cobalt, iron ore</Naturalresources>
4164<Population>24702119</Population>
4165<Populationgrowthrate>2.34% (2000 est.)</Populationgrowthrate>
4166<Sexratio>
4167at birth: 1.05 male(s)/female
4168under 15 years: 1.07 male(s)/female
416915-64 years: 1.05 male(s)/female
417065 years and over: 0.99 male(s)/female
4171total population: 1.05 male(s)/female (2000 est.)</Sexratio>
4172<Religions>Hindu 90%, Buddhist 5%, Muslim 3%, other 2% (1981)
4173note: only official Hindu state in the world</Religions>
4174<Countryname>Nepal </Countryname>
4175<Capital>Kathmandu</Capital>
4176<Flagdescription>red with a blue border around the unique shape of two overlapping right triangles; the smaller, upper triangle bears a white stylized moon and the larger, lower triangle bears a white 12-pointed sun</Flagdescription>
4177<GDP>purchasing power parity - $27.4 billion (1999 est.)</GDP>
4178<Industries>tourism, carpet, textile; small rice, jute, sugar, and oilseed mills; cigarette; cement and brick production</Industries>
4179<Exports>$485 million (f.o.b., 1998), but does not include unrecorded border trade with India</Exports>
4180<Imports>$1.2 billion (f.o.b., 1998)</Imports>
4181<Currency>1 Nepalese rupee (NR) = 100 paisa</Currency>
4182<Airports>45 (1999 est.)</Airports>
4183<Illicitdrugs>illicit producer of cannabis for the domestic and international drug markets; transit point for opiates from Southeast Asia to the West</Illicitdrugs>
4184</record>
4185<record>
4186<Location>Oceania, island in the South Pacific Ocean, south of the Marshall Islands</Location>
4187<Geographiccoordinates>0 32 S, 166 55 E</Geographiccoordinates>
4188<Area>21</Area>
4189<Climate>tropical; monsoonal; rainy season (November to February)</Climate>
4190<Naturalresources>phosphates</Naturalresources>
4191<Population>11845</Population>
4192<Populationgrowthrate>2.05% (2000 est.)</Populationgrowthrate>
4193<Sexratio>
4194at birth: 1.05 male(s)/female
4195under 15 years: 1.06 male(s)/female
419615-64 years: 0.99 male(s)/female
419765 years and over: 1 male(s)/female
4198total population: 1.02 male(s)/female (2000 est.)</Sexratio>
4199<Religions>Christian (two-thirds Protestant, one-third Roman Catholic)</Religions>
4200<Countryname>Nauru </Countryname>
4201<Capital>no official capital; government offices in Yaren District</Capital>
4202<Flagdescription>blue with a narrow, horizontal, yellow stripe across the center and a large white 12-pointed star below the stripe on the hoist side; the star indicates the country's location in relation to the Equator (the yellow stripe) and the 12 points symbolize the 12 original tribes of Nauru</Flagdescription>
4203<GDP>purchasing power parity - $100 million (1993 est.)</GDP>
4204<Industries>phosphate mining, financial services, coconut products</Industries>
4205<Exports>$25.3 million (f.o.b., 1991)</Exports>
4206<Imports>$21.1 million (c.i.f., 1991)</Imports>
4207<Currency>1 Australian dollar ($A) = 100 cents</Currency>
4208<Airports>1 (1999 est.)</Airports>
4209</record>
4210<record>
4211<Location>Northern South America, bordering the North Atlantic Ocean, between French Guiana and Guyana</Location>
4212<Geographiccoordinates>4 00 N, 56 00 W</Geographiccoordinates>
4213<Area>163270</Area>
4214<Climate>tropical; moderated by trade winds</Climate>
4215<Naturalresources>timber, hydropower, fish, kaolin, shrimp, bauxite, gold, and small amounts of nickel, copper, platinum, iron ore</Naturalresources>
4216<Population>431303</Population>
4217<Populationgrowthrate>0.65% (2000 est.)</Populationgrowthrate>
4218<Sexratio>
4219at birth: 1.05 male(s)/female
4220under 15 years: 1.05 male(s)/female
422115-64 years: 1.04 male(s)/female
422265 years and over: 0.84 male(s)/female
4223total population: 1.03 male(s)/female (2000 est.)</Sexratio>
4224<Religions>Hindu 27.4%, Muslim 19.6%, Roman Catholic 22.8%, Protestant 25.2% (predominantly Moravian), indigenous beliefs 5%</Religions>
4225<Countryname>Suriname </Countryname>
4226<Capital>Paramaribo</Capital>
4227<Flagdescription>five horizontal bands of green (top, double width), white, red (quadruple width), white, and green (double width); there is a large, yellow, five-pointed star centered in the red band</Flagdescription>
4228<GDP>purchasing power parity - $1.48 billion (1999 est.)</GDP>
4229<Industries>bauxite and gold mining, alumina and aluminum production, lumbering, food processing, fishing</Industries>
4230<Exports>$406.1 million (f.o.b., 1998)</Exports>
4231<Imports>$461.4 million (f.o.b., 1998)</Imports>
4232<Currency>1 Surinamese guilder, gulden, or florin (Sf.) = 100 cents</Currency>
4233<Airports>46 (1999 est.)</Airports>
4234<Illicitdrugs>transshipment point for South American drugs destined mostly for Europe</Illicitdrugs>
4235</record>
4236<record>
4237<Location>Caribbean, two island groups in the Caribbean Sea - one includes Curacao and Bonaire north of Venezuela and the other is east of the Virgin Islands</Location>
4238<Geographiccoordinates>12 15 N, 68 45 W</Geographiccoordinates>
4239<Area>960</Area>
4240<Climate>tropical; ameliorated by northeast trade winds</Climate>
4241<Naturalresources>phosphates (Curacao only), salt (Bonaire only)</Naturalresources>
4242<Population>210134</Population>
4243<Populationgrowthrate>1.01% (2000 est.)</Populationgrowthrate>
4244<Sexratio>
4245at birth: 1.05 male(s)/female
4246under 15 years: 1.04 male(s)/female
424715-64 years: 0.9 male(s)/female
424865 years and over: 0.71 male(s)/female
4249total population: 0.92 male(s)/female (2000 est.)</Sexratio>
4250<Religions>Roman Catholic, Protestant, Jewish, Seventh-Day Adventist</Religions>
4251<Countryname>Netherlands Antilles </Countryname>
4252<Capital>Willemstad</Capital>
4253<Flagdescription>white, with a horizontal blue stripe in the center superimposed on a vertical red band, also centered; five white, five-pointed stars are arranged in an oval pattern in the center of the blue band; the five stars represent the five main islands of Bonaire, Curacao, Saba, Sint Eustatius, and Sint Maarten</Flagdescription>
4254<GDP>purchasing power parity - $2.4 billion (1998 est.)</GDP>
4255<Industries>tourism (Curacao, Sint Maarten, and Bonaire), petroleum refining (Curacao), petroleum transshipment facilities (Curacao and Bonaire), light manufacturing (Curacao)</Industries>
4256<Exports>$303 million (f.o.b., 1998)</Exports>
4257<Imports>$1.3 billion (c.i.f., 1998)</Imports>
4258<Currency>1 Netherlands Antillean guilder, gulden, or florin (NAf.) = 100 cents</Currency>
4259<Airports>5 (1999 est.)</Airports>
4260<Illicitdrugs>money-laundering center; transshipment point for South American drugs bound for the US and Europe</Illicitdrugs>
4261</record>
4262<record>
4263<Location>Middle America, bordering both the Caribbean Sea and the North Pacific Ocean, between Costa Rica and Honduras</Location>
4264<Geographiccoordinates>13 00 N, 85 00 W</Geographiccoordinates>
4265<Area>129494</Area>
4266<Climate>tropical in lowlands, cooler in highlands</Climate>
4267<Naturalresources>gold, silver, copper, tungsten, lead, zinc, timber, fish</Naturalresources>
4268<Population>4812569</Population>
4269<Populationgrowthrate>2.2% (2000 est.)</Populationgrowthrate>
4270<Sexratio>
4271at birth: 1.04 male(s)/female
4272under 15 years: 1.04 male(s)/female
427315-64 years: 0.99 male(s)/female
427465 years and over: 0.77 male(s)/female
4275total population: 1 male(s)/female (2000 est.)</Sexratio>
4276<Religions>Roman Catholic 85%, Protestant</Religions>
4277<Countryname>Nicaragua </Countryname>
4278<Capital>Managua</Capital>
4279<Flagdescription>three equal horizontal bands of blue (top), white, and blue with the national coat of arms centered in the white band; the coat of arms features a triangle encircled by the words REPUBLICA DE NICARAGUA on the top and AMERICA CENTRAL on the bottom; similar to the flag of El Salvador, which features a round emblem encircled by the words REPUBLICA DE EL SALVADOR EN LA AMERICA CENTRAL centered in the white band; also similar to the flag of Honduras, which has five blue stars arranged in an X pattern centered in the white band</Flagdescription>
4280<GDP>purchasing power parity - $12.5 billion (1999 est.)</GDP>
4281<Industries>food processing, chemicals, machinery and metal products, textiles, clothing, petroleum refining and distribution, beverages, footwear, wood</Industries>
4282<Exports>$573 million (f.o.b., 1998 est.)</Exports>
4283<Imports>$1.5 billion (c.i.f., 1999 est.)</Imports>
4284<Currency>1 gold cordoba (C$) = 100 centavos</Currency>
4285<Airports>182 (1999 est.)</Airports>
4286<Illicitdrugs>transshipment point for cocaine destined for the US and transshipment point for arms-for-drugs dealing</Illicitdrugs>
4287</record>
4288<record>
4289<Location>Oceania, islands in the South Pacific Ocean, southeast of Australia</Location>
4290<Geographiccoordinates>41 00 S, 174 00 E</Geographiccoordinates>
4291<Area>268680</Area>
4292<Climate>temperate with sharp regional contrasts</Climate>
4293<Naturalresources>natural gas, iron ore, sand, coal, timber, hydropower, gold, limestone</Naturalresources>
4294<Population>3819762</Population>
4295<Populationgrowthrate>1.17% (2000 est.)</Populationgrowthrate>
4296<Sexratio>
4297at birth: 1.05 male(s)/female
4298under 15 years: 1.05 male(s)/female
429915-64 years: 1.01 male(s)/female
430065 years and over: 0.77 male(s)/female
4301total population: 0.99 male(s)/female (2000 est.)</Sexratio>
4302<Religions>Anglican 24%, Presbyterian 18%, Roman Catholic 15%, Methodist 5%, Baptist 2%, other Protestant 3%, unspecified or none 33% (1986)</Religions>
4303<Countryname>New Zealand </Countryname>
4304<Capital>Wellington</Capital>
4305<Flagdescription>blue with the flag of the UK in the upper hoist-side quadrant with four red five-pointed stars edged in white centered in the outer half of the flag; the stars represent the Southern Cross constellation</Flagdescription>
4306<GDP>purchasing power parity - $63.8 billion (1999 est.)</GDP>
4307<Industries>food processing, wood and paper products, textiles, machinery, transportation equipment, banking and insurance, tourism, mining</Industries>
4308<Exports>$12.2 billion (f.o.b., 1998 est.)</Exports>
4309<Imports>$11.2 billion (f.o.b., 1998 est.)</Imports>
4310<Currency>1 New Zealand dollar (NZ$) = 100 cents</Currency>
4311<Airports>111 (1999 est.)</Airports>
4312</record>
4313<record>
4314<Location>body of water between 60 degrees south latitude and Antarctica</Location>
4315<Geographiccoordinates>65 00 S, 0 00 E (nominally), but the Southern Ocean has the unique distinction of being a large circumpolar body of water totally encircling the continent of Antarctica; this ring of water lies between 60 degrees south latitude and the coast of Antarctica, and encompasses 360 degrees of longitude</Geographiccoordinates>
4316<Area>20000000</Area>
4317<Climate>sea temperatures vary from about 10 degrees Centigrade to -2 degrees Centigrade; cyclonic storms travel eastward around the continent and frequently are intense because of the temperature contrast between ice and open ocean; the ocean area from about latitude 40 south to the Antarctic Circle has the strongest average winds found anywhere on Earth; in winter the ocean freezes outward to 65 degrees south latitude in the Pacific sector and 55 degrees south latitude in the Atlantic sector, lowering surface temperatures well below 0 degrees Centigrade; at some coastal points intense persistent drainage winds from the interior keep the shoreline ice-free throughout the winter</Climate>
4318<Naturalresources>probable large and possible giant oil and gas fields on the continental margin, manganese nodules, possible placer deposits, sand and gravel, fresh water as icebergs, squid, whales, and seals - none exploited; krill, fishes</Naturalresources>
4319</record>
4320<record>
4321<Location>Central South America, northeast of Argentina</Location>
4322<Geographiccoordinates>23 00 S, 58 00 W</Geographiccoordinates>
4323<Area>406750</Area>
4324<Climate>subtropical to temperate; substantial rainfall in the eastern portions, becoming semiarid in the far west</Climate>
4325<Naturalresources>hydropower, timber, iron ore, manganese, limestone</Naturalresources>
4326<Population>5585828</Population>
4327<Populationgrowthrate>2.64% (2000 est.)</Populationgrowthrate>
4328<Sexratio>
4329at birth: 1.05 male(s)/female
4330under 15 years: 1.03 male(s)/female
433115-64 years: 1.01 male(s)/female
433265 years and over: 0.85 male(s)/female
4333total population: 1.01 male(s)/female (2000 est.)</Sexratio>
4334<Religions>Roman Catholic 90%, Mennonite, and other Protestant</Religions>
4335<Countryname>Paraguay </Countryname>
4336<Capital>Asuncion</Capital>
4337<Flagdescription>three equal, horizontal bands of red (top), white, and blue with an emblem centered in the white band; unusual flag in that the emblem is different on each side; the obverse (hoist side at the left) bears the national coat of arms (a yellow five-pointed star within a green wreath capped by the words REPUBLICA DEL PARAGUAY, all within two circles); the reverse (hoist side at the right) bears the seal of the treasury (a yellow lion below a red Cap of Liberty and the words Paz y Justicia (Peace and Justice) capped by the words REPUBLICA DEL PARAGUAY, all within two circles)</Flagdescription>
4338<GDP>purchasing power parity - $19.9 billion (1999 est.)</GDP>
4339<Industries>sugar, cement, textiles, beverages, wood products</Industries>
4340<Exports>$3.1 billion (f.o.b., 1999 est.)</Exports>
4341<Imports>$3.2 billion (f.o.b., 1999 est.)</Imports>
4342<Currency>1 guarani (G) = 100 centimos</Currency>
4343<Airports>937 (1999 est.)</Airports>
4344<Illicitdrugs>illicit producer of cannabis, most or all of which is consumed in South America; transshipment country for Bolivian cocaine headed for Southern Cone markets and Europe and a limited amount to the US</Illicitdrugs>
4345</record>
4346<record>
4347<Location>Oceania, islands in the South Pacific Ocean, about one-half of the way from Peru to New Zealand</Location>
4348<Geographiccoordinates>25 04 S, 130 06 W</Geographiccoordinates>
4349<Area>47</Area>
4350<Climate>tropical, hot, humid; modified by southeast trade winds; rainy season (November to March)</Climate>
4351<Naturalresources>miro trees (used for handicrafts), fish
4352note: manganese, iron, copper, gold, silver, and zinc have been discovered offshore</Naturalresources>
4353<Population>54</Population>
4354<Populationgrowthrate>-2.06% (2000 est.)</Populationgrowthrate>
4355<Religions>Seventh-Day Adventist 100%</Religions>
4356<Countryname>Pitcairn Islands </Countryname>
4357<Capital>Adamstown</Capital>
4358<Flagdescription>blue with the flag of the UK in the upper hoist-side quadrant and the Pitcairn Islander coat of arms centered on the outer half of the flag; the coat of arms is yellow, green, and light blue with a shield featuring a yellow anchor</Flagdescription>
4359<GDP>purchasing power parity - $NA</GDP>
4360<Industries>postage stamps, handicrafts</Industries>
4361<Exports>$NA</Exports>
4362<Imports>$NA</Imports>
4363<Currency>1 New Zealand dollar (NZ$) = 100 cents</Currency>
4364<Airports>none</Airports>
4365</record>
4366<record>
4367<Location>Western South America, bordering the South Pacific Ocean, between Chile and Ecuador</Location>
4368<Geographiccoordinates>10 00 S, 76 00 W</Geographiccoordinates>
4369<Area>1285220</Area>
4370<Climate>varies from tropical in east to dry desert in west; temperate to frigid in Andes</Climate>
4371<Naturalresources>copper, silver, gold, petroleum, timber, fish, iron ore, coal, phosphate, potash, hydropower</Naturalresources>
4372<Population>27012899</Population>
4373<Populationgrowthrate>1.75% (2000 est.)</Populationgrowthrate>
4374<Sexratio>
4375at birth: 1.05 male(s)/female
4376under 15 years: 1.03 male(s)/female
437715-64 years: 1.01 male(s)/female
437865 years and over: 0.85 male(s)/female
4379total population: 1.01 male(s)/female (2000 est.)</Sexratio>
4380<Religions>Roman Catholic 90%</Religions>
4381<Countryname>Peru </Countryname>
4382<Capital>Lima</Capital>
4383<Flagdescription>three equal, vertical bands of red (hoist side), white, and red with the coat of arms centered in the white band; the coat of arms features a shield bearing a llama, cinchona tree (the source of quinine), and a yellow cornucopia spilling out gold coins, all framed by a green wreath</Flagdescription>
4384<GDP>purchasing power parity - $116 billion (1999 est.)</GDP>
4385<Industries>mining of metals, petroleum, fishing, textiles, clothing, food processing, cement, auto assembly, steel, shipbuilding, metal fabrication</Industries>
4386<Exports>$5.9 billion (f.o.b., 1999 est.)</Exports>
4387<Imports>$8.4 billion (c.i.f., 1999 est.)</Imports>
4388<Currency>1 nuevo sol (S/.) = 100 centimos</Currency>
4389<Airports>234 (1999 est.)</Airports>
4390<Illicitdrugs>until recently the world's largest coca leaf producer, Peru has reduced the area of coca under cultivation by 24% to 38,700 hectares at the end of 1999; most of cocaine base is shipped to neighboring Colombia, Bolivia, and Brazil for processing into cocaine for the international drug market, but exports of finished cocaine are increasing by maritime conveyance to Mexico, US, and Europe</Illicitdrugs>
4391</record>
4392<record>
4393<Location>Southeastern Asia, group of small islands and reefs in the South China Sea, about one-third of the way from central Vietnam to the northern Philippines</Location>
4394<Geographiccoordinates>16 30 N, 112 00 E</Geographiccoordinates>
4395<Area></Area>
4396<Climate>tropical</Climate>
4397<Naturalresources>none</Naturalresources>
4398<Population></Population>
4399<Countryname>Paracel Islands </Countryname>
4400<Airports>1 (1999 est.)</Airports>
4401</record>
4402<record>
4403<Location>Southeastern Asia, group of reefs and islands in the South China Sea, about two-thirds of the way from southern Vietnam to the southern Philippines</Location>
4404<Geographiccoordinates>8 38 N, 111 55 E</Geographiccoordinates>
4405<Area></Area>
4406<Climate>tropical</Climate>
4407<Naturalresources>fish, guano, undetermined oil and natural gas potential</Naturalresources>
4408<Population></Population>
4409<Countryname>Spratly Islands </Countryname>
4410<Airports>4 (1999 est.)</Airports>
4411</record>
4412<record>
4413<Location>Southern Asia, bordering the Arabian Sea, between India on the east and Iran and Afghanistan on the west and China in the north</Location>
4414<Geographiccoordinates>30 00 N, 70 00 E</Geographiccoordinates>
4415<Area>803940</Area>
4416<Climate>mostly hot, dry desert; temperate in northwest; arctic in north</Climate>
4417<Naturalresources>land, extensive natural gas reserves, limited petroleum, poor quality coal, iron ore, copper, salt, limestone</Naturalresources>
4418<Population>141553775</Population>
4419<Populationgrowthrate>2.17% (2000 est.)</Populationgrowthrate>
4420<Sexratio>
4421at birth: 1.05 male(s)/female
4422under 15 years: 1.06 male(s)/female
442315-64 years: 1.05 male(s)/female
442465 years and over: 0.97 male(s)/female
4425total population: 1.05 male(s)/female (2000 est.)</Sexratio>
4426<Religions>Muslim 97% (Sunni 77%, Shi'a 20%), Christian, Hindu, and other 3%</Religions>
4427<Countryname>Pakistan </Countryname>
4428<Capital>Islamabad</Capital>
4429<Flagdescription>green with a vertical white band (symbolizing the role of religious minorities) on the hoist side; a large white crescent and star are centered in the green field; the crescent, star, and color green are traditional symbols of Islam</Flagdescription>
4430<GDP>purchasing power parity - $282 billion (1999 est.)</GDP>
4431<Industries>textiles, food processing, beverages, construction materials, clothing, paper products, shrimp</Industries>
4432<Exports>$8.4 billion (f.o.b., 1999)</Exports>
4433<Imports>$9.8 billion (f.o.b., 1999)</Imports>
4434<Currency>1 Pakistani rupee (PRe) = 100 paisa</Currency>
4435<Airports>118 (1999 est.)</Airports>
4436<Illicitdrugs>producer of illicit opium and hashish for the international drug trade (poppy cultivation in 1999 - 1,570 hectares, a 48% drop from 1998 because of eradication and alternative development); key transit area for Southwest Asian heroin moving to Western markets; narcotics still move from Afghanistan into Balochistan Province</Illicitdrugs>
4437</record>
4438<record>
4439<Location>Central Europe, east of Germany</Location>
4440<Geographiccoordinates>52 00 N, 20 00 E</Geographiccoordinates>
4441<Area>312685</Area>
4442<Climate>temperate with cold, cloudy, moderately severe winters with frequent precipitation; mild summers with frequent showers and thundershowers</Climate>
4443<Naturalresources>coal, sulfur, copper, natural gas, silver, lead, salt, arable land</Naturalresources>
4444<Population>38646023</Population>
4445<Populationgrowthrate>-0.04% (2000 est.)</Populationgrowthrate>
4446<Sexratio>
4447at birth: 1.06 male(s)/female
4448under 15 years: 1.05 male(s)/female
444915-64 years: 0.99 male(s)/female
445065 years and over: 0.62 male(s)/female
4451total population: 0.95 male(s)/female (2000 est.)</Sexratio>
4452<Religions>Roman Catholic 95% (about 75% practicing), Eastern Orthodox, Protestant, and other 5%</Religions>
4453<Countryname>Poland </Countryname>
4454<Capital>Warsaw</Capital>
4455<Flagdescription>two equal horizontal bands of white (top) and red; similar to the flags of Indonesia and Monaco which are red (top) and white</Flagdescription>
4456<GDP>purchasing power parity - $276.5 billion (1999 est.)</GDP>
4457<Industries>machine building, iron and steel, coal mining, chemicals, shipbuilding, food processing, glass, beverages, textiles</Industries>
4458<Exports>$27.8 billion (f.o.b., 1999)</Exports>
4459<Imports>$40.8 billion (f.o.b., 1999)</Imports>
4460<Currency>1 zloty (Zl) = 100 groszy</Currency>
4461<Airports>123 (1999 est.)</Airports>
4462<Illicitdrugs>major illicit producer of amphetamines for the international market; minor transshipment point for Asian and Latin American illicit drugs to Western Europe</Illicitdrugs>
4463</record>
4464<record>
4465<Location>Middle America, bordering both the Caribbean Sea and the North Pacific Ocean, between Colombia and Costa Rica</Location>
4466<Geographiccoordinates>9 00 N, 80 00 W</Geographiccoordinates>
4467<Area>78200</Area>
4468<Climate>tropical maritime; hot, humid, cloudy; prolonged rainy season (May to January), short dry season (January to May)</Climate>
4469<Naturalresources>copper, mahogany forests, shrimp, hydropower</Naturalresources>
4470<Population>2808268</Population>
4471<Populationgrowthrate>1.34% (2000 est.)</Populationgrowthrate>
4472<Sexratio>
4473at birth: 1.04 male(s)/female
4474under 15 years: 1.04 male(s)/female
447515-64 years: 1.03 male(s)/female
447665 years and over: 0.92 male(s)/female
4477total population: 1.02 male(s)/female (2000 est.)</Sexratio>
4478<Religions>Roman Catholic 85%, Protestant 15%</Religions>
4479<Countryname>Panama </Countryname>
4480<Capital>Panama</Capital>
4481<Flagdescription>divided into four, equal rectangles; the top quadrants are white (hoist side) with a blue five-pointed star in the center and plain red; the bottom quadrants are plain blue (hoist side) and white with a red five-pointed star in the center</Flagdescription>
4482<GDP>purchasing power parity - $21 billion (1999 est.)</GDP>
4483<Industries>construction, petroleum refining, brewing, cement and other construction materials, sugar milling</Industries>
4484<Exports>$4.7 billion (f.o.b., 1999 est.)</Exports>
4485<Imports>$6.4 billion (f.o.b., 1999 est.)</Imports>
4486<Currency>1 balboa (B) = 100 centesimos</Currency>
4487<Airports>105 (1999 est.)</Airports>
4488<Illicitdrugs>major cocaine transshipment point and major drug-money-laundering center; no recent signs of coca cultivation; monitoring of financial transactions is improving, yet Panama has failed to prosecute anyone for money laundering - official corruption remains a major problem</Illicitdrugs>
4489</record>
4490<record>
4491<Location>Southwestern Europe, bordering the North Atlantic Ocean, west of Spain</Location>
4492<Geographiccoordinates>39 30 N, 8 00 W</Geographiccoordinates>
4493<Area>92391</Area>
4494<Climate>maritime temperate; cool and rainy in north, warmer and drier in south</Climate>
4495<Naturalresources>fish, forests (cork), tungsten, iron ore, uranium ore, marble, arable land, hydro power</Naturalresources>
4496<Population>10048232</Population>
4497<Populationgrowthrate>0.18% (2000 est.)</Populationgrowthrate>
4498<Sexratio>
4499at birth: 1.06 male(s)/female
4500under 15 years: 1.06 male(s)/female
450115-64 years: 0.96 male(s)/female
450265 years and over: 0.68 male(s)/female
4503total population: 0.92 male(s)/female (2000 est.)</Sexratio>
4504<Religions>Roman Catholic 94%, Protestant (1995)</Religions>
4505<Countryname>Portugal </Countryname>
4506<Capital>Lisbon</Capital>
4507<Flagdescription>two vertical bands of green (hoist side, two-fifths) and red (three-fifths) with the Portuguese coat of arms centered on the dividing line</Flagdescription>
4508<GDP>purchasing power parity - $151.4 billion (1999 est.)</GDP>
4509<Industries>textiles and footwear; wood pulp, paper, and cork; metalworking; oil refining; chemicals; fish canning; wine; tourism</Industries>
4510<Exports>$25 billion (f.o.b., 1998)</Exports>
4511<Imports>$34.9 billion (f.o.b., 1998)</Imports>
4512<Currency>1 Portuguese escudo (Esc) = 100 centavos</Currency>
4513<Airports>66 (1999 est.)</Airports>
4514<Illicitdrugs>important gateway country for Latin American cocaine entering the European market; transshipment point for hashish from North Africa to Europe; consumer of Southwest Asian heroin</Illicitdrugs>
4515</record>
4516<record>
4517<Location>Southeastern Asia, group of islands including the eastern half of the island of New Guinea between the Coral Sea and the South Pacific Ocean, east of Indonesia</Location>
4518<Geographiccoordinates>6 00 S, 147 00 E</Geographiccoordinates>
4519<Area>462840</Area>
4520<Climate>tropical; northwest monsoon (December to March), southeast monsoon (May to October); slight seasonal temperature variation</Climate>
4521<Naturalresources>gold, copper, silver, natural gas, timber, oil, fisheries</Naturalresources>
4522<Population>4926984</Population>
4523<Populationgrowthrate>2.47% (2000 est.)</Populationgrowthrate>
4524<Sexratio>
4525at birth: 1.05 male(s)/female
4526under 15 years: 1.03 male(s)/female
452715-64 years: 1.08 male(s)/female
452865 years and over: 0.9 male(s)/female
4529total population: 1.05 male(s)/female (2000 est.)</Sexratio>
4530<Religions>Roman Catholic 22%, Lutheran 16%, Presbyterian/Methodist/London Missionary Society 8%, Anglican 5%, Evangelical Alliance 4%, Seventh-Day Adventist 1%, other Protestant 10%, indigenous beliefs 34%</Religions>
4531<Countryname>Papua New Guinea </Countryname>
4532<Capital>Port Moresby</Capital>
4533<Flagdescription>divided diagonally from upper hoist-side corner; the upper triangle is red with a soaring yellow bird of paradise centered; the lower triangle is black with five white five-pointed stars of the Southern Cross constellation centered</Flagdescription>
4534<GDP>purchasing power parity - $11.6 billion (1999 est.)</GDP>
4535<Industries>copra crushing, palm oil processing, plywood production, wood chip production; mining of gold, silver, and copper; crude oil production; construction, tourism</Industries>
4536<Exports>$1.9 billion (f.o.b., 1999 est.)</Exports>
4537<Imports>$1 billion (f.o.b., 1999 est.)</Imports>
4538<Currency>1 kina (K) = 100 toea</Currency>
4539<Airports>492 (1999 est.)</Airports>
4540</record>
4541<record>
4542<Location>Oceania, group of islands in the North Pacific Ocean, southeast of the Philippines</Location>
4543<Geographiccoordinates>7 30 N, 134 30 E</Geographiccoordinates>
4544<Area>458</Area>
4545<Climate>wet season May to November; hot and humid</Climate>
4546<Naturalresources>forests, minerals (especially gold), marine products, deep-seabed minerals</Naturalresources>
4547<Population>18766</Population>
4548<Populationgrowthrate>1.75% (2000 est.)</Populationgrowthrate>
4549<Sexratio>
4550at birth: 1.06 male(s)/female
4551under 15 years: 1.06 male(s)/female
455215-64 years: 1.21 male(s)/female
455365 years and over: 0.89 male(s)/female
4554total population: 1.15 male(s)/female (2000 est.)</Sexratio>
4555<Religions>Christian (Catholics, Seventh-Day Adventists, Jehovah's Witnesses, the Assembly of God, the Liebenzell Mission, and Latter-Day Saints), Modekngei religion (one-third of the population observes this religion which is indigenous to Palau)</Religions>
4556<Countryname>Palau </Countryname>
4557<Capital>Koror
4558note: a new capital is being built about 20 km northeast of Koror</Capital>
4559<Flagdescription>light blue with a large yellow disk (representing the moon) shifted slightly to the hoist side</Flagdescription>
4560<GDP>purchasing power parity - $160 million (1997 est.)
4561note: GDP numbers reflect US spending</GDP>
4562<Industries>tourism, craft items (from shell, wood, pearls), construction, garment making</Industries>
4563<Exports>$14.3 million (f.o.b., 1996)</Exports>
4564<Imports>$72.4 million (f.o.b., 1996)</Imports>
4565<Currency>1 United States dollar (US$) = 100 cents</Currency>
4566<Airports>3 (1999 est.)</Airports>
4567</record>
4568<record>
4569<Location>Western Africa, bordering the North Atlantic Ocean, between Guinea and Senegal</Location>
4570<Geographiccoordinates>12 00 N, 15 00 W</Geographiccoordinates>
4571<Area>36120</Area>
4572<Climate>tropical; generally hot and humid; monsoonal-type rainy season (June to November) with southwesterly winds; dry season (December to May) with northeasterly harmattan winds</Climate>
4573<Naturalresources>fish, timber, phosphates, bauxite, unexploited deposits of petroleum</Naturalresources>
4574<Population>1285715</Population>
4575<Populationgrowthrate>2.4% (2000 est.)</Populationgrowthrate>
4576<Sexratio>
4577at birth: 1.03 male(s)/female
4578under 15 years: 1 male(s)/female
457915-64 years: 0.9 male(s)/female
458065 years and over: 0.83 male(s)/female
4581total population: 0.94 male(s)/female (2000 est.)</Sexratio>
4582<Religions>indigenous beliefs 50%, Muslim 45%, Christian 5%</Religions>
4583<Countryname>Guinea-Bissau </Countryname>
4584<Capital>Bissau</Capital>
4585<Flagdescription>two equal horizontal bands of yellow (top) and green with a vertical red band on the hoist side; there is a black five-pointed star centered in the red band; uses the popular pan-African colors of Ethiopia</Flagdescription>
4586<GDP>purchasing power parity - $1.1 billion (1999 est.)</GDP>
4587<Industries>agricultural products processing, beer, soft drinks</Industries>
4588<Exports>$26.8 million (f.o.b., 1998)</Exports>
4589<Imports>$22.9 million (f.o.b., 1998)</Imports>
4590<Currency>1 Communaute Financiere Africaine franc (CFAF) = 100 centimes</Currency>
4591<Airports>30 (1999 est.)</Airports>
4592</record>
4593<record>
4594<Location>Middle East, peninsula bordering the Persian Gulf and Saudi Arabia</Location>
4595<Geographiccoordinates>25 30 N, 51 15 E</Geographiccoordinates>
4596<Area>11437</Area>
4597<Climate>desert; hot, dry; humid and sultry in summer</Climate>
4598<Naturalresources>petroleum, natural gas, fish</Naturalresources>
4599<Population>744483</Population>
4600<Populationgrowthrate>3.35% (2000 est.)</Populationgrowthrate>
4601<Sexratio>
4602at birth: 1.05 male(s)/female
4603under 15 years: 1.04 male(s)/female
460415-64 years: 2.48 male(s)/female
460565 years and over: 2.43 male(s)/female
4606total population: 1.93 male(s)/female (2000 est.)</Sexratio>
4607<Religions>Muslim 95%</Religions>
4608<Countryname>Qatar </Countryname>
4609<Capital>Doha</Capital>
4610<Flagdescription>maroon with a broad white serrated band (nine white points) on the hoist side</Flagdescription>
4611<GDP>purchasing power parity - $12.3 billion (1999 est.)</GDP>
4612<Industries>crude oil production and refining, fertilizers, petrochemicals, steel reinforcing bars, cement</Industries>
4613<Exports>$6.7 billion (f.o.b., 1999 est.)</Exports>
4614<Imports>$4.2 billion (f.o.b., 1999 est.)</Imports>
4615<Currency>1 Qatari riyal (QR) = 100 dirhams</Currency>
4616<Airports>4 (1999 est.)</Airports>
4617</record>
4618<record>
4619<Location>Southern Africa, island in the Indian Ocean, east of Madagascar</Location>
4620<Geographiccoordinates>21 06 S, 55 36 E</Geographiccoordinates>
4621<Area>2512</Area>
4622<Climate>tropical, but temperature moderates with elevation; cool and dry from May to November, hot and rainy from November to April</Climate>
4623<Naturalresources>fish, arable land, hydropower</Naturalresources>
4624<Population>720934</Population>
4625<Populationgrowthrate>1.63% (2000 est.)</Populationgrowthrate>
4626<Sexratio>
4627at birth: 1.05 male(s)/female
4628under 15 years: 1.05 male(s)/female
462915-64 years: 0.97 male(s)/female
463065 years and over: 0.68 male(s)/female
4631total population: 0.97 male(s)/female (2000 est.)</Sexratio>
4632<Religions>Roman Catholic 86%, Hindu, Muslim, Buddhist (1995)</Religions>
4633<Countryname>Reunion </Countryname>
4634<Capital>Saint-Denis</Capital>
4635<Flagdescription>the flag of France is used</Flagdescription>
4636<GDP>purchasing power parity - $3.4 billion (1998 est.)</GDP>
4637<Industries>sugar, rum, cigarettes, handicraft items, flower oil extraction</Industries>
4638<Exports>$214.162 million (f.o.b., 1997)</Exports>
4639<Imports>$2.5 billion (c.i.f., 1997)</Imports>
4640<Currency>1 French franc (F) = 100 centimes</Currency>
4641<Airports>2 (1999 est.)</Airports>
4642</record>
4643<record>
4644<Location>Oceania, group of atolls and reefs in the North Pacific Ocean, about one-half of the way from Hawaii to Papua New Guinea</Location>
4645<Geographiccoordinates>9 00 N, 168 00 E</Geographiccoordinates>
4646<Area>181</Area>
4647<Climate>wet season from May to November; hot and humid; islands border typhoon belt</Climate>
4648<Naturalresources>phosphate deposits, marine products, deep seabed minerals</Naturalresources>
4649<Population>68126</Population>
4650<Populationgrowthrate>3.88% (2000 est.)</Populationgrowthrate>
4651<Sexratio>
4652at birth: 1.05 male(s)/female
4653under 15 years: 1.04 male(s)/female
465415-64 years: 1.04 male(s)/female
465565 years and over: 0.9 male(s)/female
4656total population: 1.04 male(s)/female (2000 est.)</Sexratio>
4657<Religions>Christian (mostly Protestant)</Religions>
4658<Countryname>Marshall Islands </Countryname>
4659<Capital>Majuro</Capital>
4660<Flagdescription>blue with two stripes radiating from the lower hoist-side corner - orange (top) and white; there is a white star with four large rays and 20 small rays on the hoist side above the two stripes</Flagdescription>
4661<GDP>purchasing power parity - $105 million (1998 est.), supplemented by approximately $65 million annual US aid</GDP>
4662<Industries>copra, fish, tourism, craft items from shell, wood, and pearls, offshore banking (embryonic)</Industries>
4663<Exports>$28 million (f.o.b., 1997 est.)</Exports>
4664<Imports>$58 million (f.o.b., 1997 est.)</Imports>
4665<Currency>1 United States dollar (US$) = 100 cents</Currency>
4666<Airports>16 (1999 est.)</Airports>
4667</record>
4668<record>
4669<Location>Southeastern Europe, bordering the Black Sea, between Bulgaria and Ukraine</Location>
4670<Geographiccoordinates>46 00 N, 25 00 E</Geographiccoordinates>
4671<Area>237500</Area>
4672<Climate>temperate; cold, cloudy winters with frequent snow and fog; sunny summers with frequent showers and thunderstorms</Climate>
4673<Naturalresources>petroleum (reserves declining), timber, natural gas, coal, iron ore, salt, arable land, hydro power</Naturalresources>
4674<Population>22411121</Population>
4675<Populationgrowthrate>-0.21% (2000 est.)</Populationgrowthrate>
4676<Sexratio>
4677at birth: 1.05 male(s)/female
4678under 15 years: 1.05 male(s)/female
467915-64 years: 0.99 male(s)/female
468065 years and over: 0.71 male(s)/female
4681total population: 0.95 male(s)/female (2000 est.)</Sexratio>
4682<Religions>Romanian Orthodox 70%, Roman Catholic 6% (of which 3% are Uniate), Protestant 6%, unaffiliated 18%</Religions>
4683<Countryname>Romania </Countryname>
4684<Capital>Bucharest</Capital>
4685<Flagdescription>three equal vertical bands of blue (hoist side), yellow, and red; the national coat of arms that used to be centered in the yellow band has been removed; now similar to the flag of Chad, also resembles the flags of Andorra and Moldova</Flagdescription>
4686<GDP>purchasing power parity - $87.4 billion (1999 est.)</GDP>
4687<Industries>mining, timber, construction materials, metallurgy, chemicals, machine building, food processing, petroleum production and refining</Industries>
4688<Exports>$8.4 billion (f.o.b., 1999 est.)</Exports>
4689<Imports>$9.6 billion (f.o.b., 1999 est.)</Imports>
4690<Currency>1 leu (L) = 100 bani</Currency>
4691<Airports>62 (1999 est.)</Airports>
4692<Illicitdrugs>important transshipment point for Southwest Asian heroin transiting the Balkan route and small amounts of Latin American cocaine bound for Western Europe</Illicitdrugs>
4693</record>
4694<record>
4695<Location>Southeastern Asia, archipelago between the Philippine Sea and the South China Sea, east of Vietnam</Location>
4696<Geographiccoordinates>13 00 N, 122 00 E</Geographiccoordinates>
4697<Area>300000</Area>
4698<Climate>tropical marine; northeast monsoon (November to April); southwest monsoon (May to October)</Climate>
4699<Naturalresources>timber, petroleum, nickel, cobalt, silver, gold, salt, copper</Naturalresources>
4700<Population>81159644</Population>
4701<Populationgrowthrate>2.07% (2000 est.)</Populationgrowthrate>
4702<Sexratio>
4703at birth: 1.05 male(s)/female
4704under 15 years: 1.04 male(s)/female
470515-64 years: 0.98 male(s)/female
470665 years and over: 0.8 male(s)/female
4707total population: 0.99 male(s)/female (2000 est.)</Sexratio>
4708<Religions>Roman Catholic 83%, Protestant 9%, Muslim 5%, Buddhist and other 3%</Religions>
4709<Countryname>Philippines </Countryname>
4710<Capital>Manila</Capital>
4711<Flagdescription>two equal horizontal bands of blue (top) and red with a white equilateral triangle based on the hoist side; in the center of the triangle is a yellow sun with eight primary rays (each containing three individual rays) and in each corner of the triangle is a small yellow five-pointed star</Flagdescription>
4712<GDP>purchasing power parity - $282 billion (1999 est.)</GDP>
4713<Industries>textiles, pharmaceuticals, chemicals, wood products, food processing, electronics assembly, petroleum refining, fishing</Industries>
4714<Exports>$34.8 billion (f.o.b., 1999 est.)</Exports>
4715<Imports>$30.7 billion (f.o.b., 1999 est.)</Imports>
4716<Currency>1 Philippine peso (P) = 100 centavos</Currency>
4717<Airports>266 (1999 est.)</Airports>
4718<Illicitdrugs>exports locally produced marijuana and hashish to East Asia, the US, and other Western markets; serves as a transit point for heroin and crystal methamphetamine</Illicitdrugs>
4719</record>
4720<record>
4721<Location>Caribbean, island between the Caribbean Sea and the North Atlantic Ocean, east of the Dominican Republic</Location>
4722<Geographiccoordinates>18 15 N, 66 30 W</Geographiccoordinates>
4723<Area>9104</Area>
4724<Climate>tropical marine, mild; little seasonal temperature variation</Climate>
4725<Naturalresources>some copper and nickel; potential for onshore and offshore oil</Naturalresources>
4726<Population>3915798</Population>
4727<Populationgrowthrate>0.56% (2000 est.)</Populationgrowthrate>
4728<Sexratio>
4729at birth: 1.06 male(s)/female
4730under 15 years: 1.05 male(s)/female
473115-64 years: 0.92 male(s)/female
473265 years and over: 0.75 male(s)/female
4733total population: 0.93 male(s)/female (2000 est.)</Sexratio>
4734<Religions>Roman Catholic 85%, Protestant and other 15%</Religions>
4735<Countryname>Puerto Rico </Countryname>
4736<Capital>San Juan</Capital>
4737<Flagdescription>five equal horizontal bands of red (top and bottom) alternating with white; a blue isosceles triangle based on the hoist side bears a large, white, five-pointed star in the center; design based on the US flag</Flagdescription>
4738<GDP>purchasing power parity - $38.1 billion (1999 est.)</GDP>
4739<Industries>pharmaceuticals, electronics, apparel, food products; tourism</Industries>
4740<Exports>$34.9 billion (f.o.b., 1999)</Exports>
4741<Imports>$25.3 billion (c.i.f., 1999)</Imports>
4742<Currency>1 US dollar (US$) = 100 cents</Currency>
4743<Airports>30 (1999 est.)</Airports>
4744</record>
4745<record>
4746<Location>Northern Asia (that part west of the Urals is sometimes included with Europe), bordering the Arctic Ocean, between Europe and the North Pacific Ocean</Location>
4747<Geographiccoordinates>60 00 N, 100 00 E</Geographiccoordinates>
4748<Area>17075200</Area>
4749<Climate>ranges from steppes in the south through humid continental in much of European Russia; subarctic in Siberia to tundra climate in the polar north; winters vary from cool along Black Sea coast to frigid in Siberia; summers vary from warm in the steppes to cool along Arctic coast</Climate>
4750<Naturalresources>wide natural resource base including major deposits of oil, natural gas, coal, and many strategic minerals, timber
4751note: formidable obstacles of climate, terrain, and distance hinder exploitation of natural resources</Naturalresources>
4752<Population>146001176</Population>
4753<Populationgrowthrate>-0.38% (2000 est.)</Populationgrowthrate>
4754<Sexratio>
4755at birth: 1.05 male(s)/female
4756under 15 years: 1.04 male(s)/female
475715-64 years: 0.94 male(s)/female
475865 years and over: 0.46 male(s)/female
4759total population: 0.88 male(s)/female (2000 est.)</Sexratio>
4760<Religions>Russian Orthodox, Muslim, other</Religions>
4761<Countryname>Russia </Countryname>
4762<Capital>Moscow</Capital>
4763<Flagdescription>three equal horizontal bands of white (top), blue, and red</Flagdescription>
4764<GDP>purchasing power parity - $620.3 billion (1999 est.)</GDP>
4765<Industries>complete range of mining and extractive industries producing coal, oil, gas, chemicals, and metals; all forms of machine building from rolling mills to high-performance aircraft and space vehicles; shipbuilding; road and rail transportation equipment; communications equipment; agricultural machinery, tractors, and construction equipment; electric power generating and transmitting equipment; medical and scientific instruments; consumer durables, textiles, foodstuffs, handicrafts</Industries>
4766<Exports>$75.4 billion (1999 est.)</Exports>
4767<Imports>$48.2 billion (1999 est.)</Imports>
4768<Currency>1 ruble (R) = 100 kopeks</Currency>
4769<Airports>2,517 (1994 est.)</Airports>
4770<Illicitdrugs>limited cultivation of illicit cannabis and opium poppy and producer of amphetamines, mostly for domestic consumption; government has active eradication program; increasingly used as transshipment point for Southwest and Southeast Asian opiates and cannabis and Latin American cocaine to Western Europe, possibly to the US, and growing domestic market; major source of heroin precursor chemicals</Illicitdrugs>
4771</record>
4772<record>
4773<Location>Central Africa, east of Democratic Republic of the Congo</Location>
4774<Geographiccoordinates>2 00 S, 30 00 E</Geographiccoordinates>
4775<Area>26338</Area>
4776<Climate>temperate; two rainy seasons (February to April, November to January); mild in mountains with frost and snow possible</Climate>
4777<Naturalresources>gold, cassiterite (tin ore), wolframite (tungsten ore), methane, hydropower, arable land</Naturalresources>
4778<Population>7229129</Population>
4779<Populationgrowthrate>1.14% (2000 est.)</Populationgrowthrate>
4780<Sexratio>
4781at birth: 1.03 male(s)/female
4782under 15 years: 1.01 male(s)/female
478315-64 years: 0.99 male(s)/female
478465 years and over: 0.68 male(s)/female
4785total population: 0.98 male(s)/female (2000 est.)</Sexratio>
4786<Religions>Roman Catholic 65%, Protestant 9%, Muslim 1%, indigenous beliefs and other 25%</Religions>
4787<Countryname>Rwanda </Countryname>
4788<Capital>Kigali</Capital>
4789<Flagdescription>three equal vertical bands of red (hoist side), yellow, and green with a large black letter R centered in the yellow band; uses the popular pan-African colors of Ethiopia; similar to the flag of Guinea, which has a plain yellow band</Flagdescription>
4790<GDP>purchasing power parity - $5.9 billion (1999 est.)</GDP>
4791<Industries>cement, agricultural products, small-scale beverages, soap, furniture, shoes, plastic goods, textiles, cigarettes</Industries>
4792<Exports>$70.8 million (f.o.b., 1999 est.)</Exports>
4793<Imports>$242 million (f.o.b., 1999 est.)</Imports>
4794<Currency>1 Rwandan franc (RF) = 100 centimes</Currency>
4795<Airports>8 (1999 est.)</Airports>
4796</record>
4797<record>
4798<Location>Middle East, bordering the Persian Gulf and the Red Sea, north of Yemen</Location>
4799<Geographiccoordinates>25 00 N, 45 00 E</Geographiccoordinates>
4800<Area>1960582</Area>
4801<Climate>harsh, dry desert with great extremes of temperature</Climate>
4802<Naturalresources>petroleum, natural gas, iron ore, gold, copper</Naturalresources>
4803<Population>22023506</Population>
4804<Populationgrowthrate>3.28% (2000 est.)</Populationgrowthrate>
4805<Sexratio>
4806at birth: 1.05 male(s)/female
4807under 15 years: 1.04 male(s)/female
480815-64 years: 1.43 male(s)/female
480965 years and over: 1.18 male(s)/female
4810total population: 1.24 male(s)/female (2000 est.)</Sexratio>
4811<Religions>Muslim 100%</Religions>
4812<Countryname>Saudi Arabia </Countryname>
4813<Capital>Riyadh</Capital>
4814<Flagdescription>green with large white Arabic script (that may be translated as There is no God but God; Muhammad is the Messenger of God) above a white horizontal saber (the tip points to the hoist side); green is the traditional color of Islam</Flagdescription>
4815<GDP>purchasing power parity - $191 billion (1999 est.)</GDP>
4816<Industries>crude oil production, petroleum refining, basic petrochemicals, cement, construction, fertilizer, plastics</Industries>
4817<Exports>$48 billion (f.o.b., 1999)</Exports>
4818<Imports>$28 billion (f.o.b., 1999)</Imports>
4819<Currency>1 Saudi riyal (SR) = 100 halalah</Currency>
4820<Airports>205 (1999 est.)</Airports>
4821<Illicitdrugs>death penalty for traffickers; increasing consumption of heroin and cocaine</Illicitdrugs>
4822</record>
4823<record>
4824<Location>Northern North America, islands in the North Atlantic Ocean, south of Newfoundland (Canada)</Location>
4825<Geographiccoordinates>46 50 N, 56 20 W</Geographiccoordinates>
4826<Area>242</Area>
4827<Climate>cold and wet, with much mist and fog; spring and autumn are windy</Climate>
4828<Naturalresources>fish, deepwater ports</Naturalresources>
4829<Population>6896</Population>
4830<Populationgrowthrate>0.49% (2000 est.)</Populationgrowthrate>
4831<Sexratio>
4832at birth: 1.04 male(s)/female
4833under 15 years: 1.05 male(s)/female
483415-64 years: 1.04 male(s)/female
483565 years and over: 0.73 male(s)/female
4836total population: 1.01 male(s)/female (2000 est.)</Sexratio>
4837<Religions>Roman Catholic 99%</Religions>
4838<Countryname>Saint Pierre and Miquelon </Countryname>
4839<Capital>Saint-Pierre</Capital>
4840<Flagdescription>a yellow sailing ship facing the hoist side rides on a dark blue background with a black wave line under the ship; on the hoist side, a vertical band is divided into three parts: the top part is red with a green diagonal cross extending to the corners overlaid by a white cross dividing the square into four sections; the middle part has a white background with an ermine pattern; the third part has a red background with two stylized yellow lions outlined in black, one on top of the other; the flag of France is used for official occasions</Flagdescription>
4841<GDP>purchasing power parity - $74 million (1996 est.); supplemented by annual payments from France of about $65 million</GDP>
4842<Industries>fish processing and supply base for fishing fleets; tourism</Industries>
4843<Exports>$5 million (f.o.b., 1997)</Exports>
4844<Imports>$66 million (c.i.f., 1997 est.)</Imports>
4845<Currency>1 French franc (F) = 100 centimes</Currency>
4846<Airports>2 (1999 est.)</Airports>
4847</record>
4848<record>
4849<Location>Caribbean, islands in the Caribbean Sea, about one-third of the way from Puerto Rico to Trinidad and Tobago</Location>
4850<Geographiccoordinates>17 20 N, 62 45 W</Geographiccoordinates>
4851<Area>261</Area>
4852<Climate>tropical tempered by constant sea breezes; little seasonal temperature variation; rainy season (May to November)</Climate>
4853<Naturalresources>arable land</Naturalresources>
4854<Population>38819</Population>
4855<Populationgrowthrate>-0.22% (2000 est.)</Populationgrowthrate>
4856<Sexratio>
4857at birth: 1.06 male(s)/female
4858under 15 years: 1.04 male(s)/female
485915-64 years: 0.99 male(s)/female
486065 years and over: 0.7 male(s)/female
4861total population: 0.98 male(s)/female (2000 est.)</Sexratio>
4862<Religions>Anglican, other Protestant, Roman Catholic</Religions>
4863<Countryname>Saint Kitts and Nevis </Countryname>
4864<Capital>Basseterre</Capital>
4865<Flagdescription>divided diagonally from the lower hoist side by a broad black band bearing two white, five-pointed stars; the black band is edged in yellow; the upper triangle is green, the lower triangle is red</Flagdescription>
4866<GDP>purchasing power parity - $244 million (1998 est.)</GDP>
4867<Industries>sugar processing, tourism, cotton, salt, copra, clothing, footwear, beverages</Industries>
4868<Exports>$42 million (1998)</Exports>
4869<Imports>$160 million (1998)</Imports>
4870<Currency>1 East Caribbean dollar (EC$) = 100 cents</Currency>
4871<Airports>2 (1999 est.)</Airports>
4872<Illicitdrugs>transshipment point for South American drugs destined for the US and Europe</Illicitdrugs>
4873</record>
4874<record>
4875<Location>Eastern Africa, group of islands in the Indian Ocean, northeast of Madagascar</Location>
4876<Geographiccoordinates>4 35 S, 55 40 E</Geographiccoordinates>
4877<Area>455</Area>
4878<Climate>tropical marine; humid; cooler season during southeast monsoon (late May to September); warmer season during northwest monsoon (March to May)</Climate>
4879<Naturalresources>fish, copra, cinnamon trees</Naturalresources>
4880<Population>79326</Population>
4881<Populationgrowthrate>0.49% (2000 est.)</Populationgrowthrate>
4882<Sexratio>
4883at birth: 1.03 male(s)/female
4884under 15 years: 1.01 male(s)/female
488515-64 years: 0.95 male(s)/female
488665 years and over: 0.51 male(s)/female
4887total population: 0.93 male(s)/female (2000 est.)</Sexratio>
4888<Religions>Roman Catholic 90%, Anglican 8%, other 2%</Religions>
4889<Countryname>Seychelles </Countryname>
4890<Capital>Victoria</Capital>
4891<Flagdescription>five oblique bands of blue (hoist side), yellow, red, white, and green (bottom) radiating from the bottom of the hoist side</Flagdescription>
4892<GDP>purchasing power parity - $590 million (1999 est.)</GDP>
4893<Industries>fishing; tourism; processing of coconuts and vanilla, coir (coconut fiber) rope, boat building, printing, furniture; beverages</Industries>
4894<Exports>$91 million (f.o.b., 1998)</Exports>
4895<Imports>$403 million (c.i.f., 1998)</Imports>
4896<Currency>1 Seychelles rupee (SRe) = 100 cents</Currency>
4897<Airports>14 (1999 est.)</Airports>
4898</record>
4899<record>
4900<Location>Southern Africa, at the southern tip of the continent of Africa</Location>
4901<Geographiccoordinates>29 00 S, 24 00 E</Geographiccoordinates>
4902<Area>1219912</Area>
4903<Climate>mostly semiarid; subtropical along east coast; sunny days, cool nights</Climate>
4904<Naturalresources>gold, chromium, antimony, coal, iron ore, manganese, nickel, phosphates, tin, uranium, gem diamonds, platinum, copper, vanadium, salt, natural gas</Naturalresources>
4905<Population>43421021</Population>
4906<Populationgrowthrate>0.5% (2000 est.)</Populationgrowthrate>
4907<Sexratio>
4908at birth: 1.02 male(s)/female
4909under 15 years: 1.01 male(s)/female
491015-64 years: 0.93 male(s)/female
491165 years and over: 0.61 male(s)/female
4912total population: 0.94 male(s)/female (2000 est.)</Sexratio>
4913<Religions>Christian 68% (includes most whites and Coloreds, about 60% of blacks and about 40% of Indians), Muslim 2%, Hindu 1.5% (60% of Indians), indigenous beliefs and animist 28.5%</Religions>
4914<Countryname>South Africa </Countryname>
4915<Capital>Pretoria; note - Cape Town is the legislative center and Bloemfontein the judicial center</Capital>
4916<Flagdescription>two equal width horizontal bands of red (top) and blue separated by a central green band which splits into a horizontal Y, the arms of which end at the corners of the hoist side; the Y embraces a black isosceles triangle from which the arms are separated by narrow yellow bands; the red and blue bands are separated from the green band and its arms by narrow white stripes
4917note: prior to 26 April 1994, the flag was actually four flags in one - three miniature flags reproduced in the center of the white band of the former flag of the Netherlands, which has three equal horizontal bands of orange (top), white, and blue; the miniature flags are a vertically hanging flag of the old Orange Free State with a horizontal flag of the UK adjoining on the hoist side and a horizontal flag of the old Transvaal Republic adjoining on the other side</Flagdescription>
4918<GDP>purchasing power parity - $296.1 billion (1999 est.)</GDP>
4919<Industries>mining (world's largest producer of platinum, gold, chromium), automobile assembly, metalworking, machinery, textile, iron and steel, chemicals, fertilizer, foodstuffs</Industries>
4920<Exports>$28 billion (f.o.b., 1999 est.)</Exports>
4921<Imports>$26 billion (f.o.b., 1999 est.)</Imports>
4922<Currency>1 rand (R) = 100 cents</Currency>
4923<Airports>744 (1999 est.)</Airports>
4924<Illicitdrugs>transshipment center for heroin and cocaine; cocaine consumption on the rise; world's largest market for illicit methaqualone, usually imported illegally from India through various east African countries; illicit cultivation of marijuana</Illicitdrugs>
4925</record>
4926<record>
4927<Location>Western Africa, bordering the North Atlantic Ocean, between Guinea-Bissau and Mauritania</Location>
4928<Geographiccoordinates>14 00 N, 14 00 W</Geographiccoordinates>
4929<Area>196190</Area>
4930<Climate>tropical; hot, humid; rainy season (May to November) has strong southeast winds; dry season (December to April) dominated by hot, dry, harmattan wind</Climate>
4931<Naturalresources>fish, phosphates, iron ore</Naturalresources>
4932<Population>9987494</Population>
4933<Populationgrowthrate>2.94% (2000 est.)</Populationgrowthrate>
4934<Sexratio>
4935at birth: 1.03 male(s)/female
4936under 15 years: 1.01 male(s)/female
493715-64 years: 0.92 male(s)/female
493865 years and over: 1 male(s)/female
4939total population: 0.96 male(s)/female (2000 est.)</Sexratio>
4940<Religions>Muslim 92%, indigenous beliefs 6%, Christian 2% (mostly Roman Catholic)</Religions>
4941<Countryname>Senegal </Countryname>
4942<Capital>Dakar</Capital>
4943<Flagdescription>three equal vertical bands of green (hoist side), yellow, and red with a small green five-pointed star centered in the yellow band; uses the popular pan-African colors of Ethiopia</Flagdescription>
4944<GDP>purchasing power parity - $16.6 billion (1999 est.)</GDP>
4945<Industries>agricultural and fish processing, phosphate mining, fertilizer production, petroleum refining, construction materials</Industries>
4946<Exports>$925 million (f.o.b., 1998)</Exports>
4947<Imports>$1.2 billion (f.o.b., 1998)</Imports>
4948<Currency>1 Communaute Financiere Africaine franc (CFAF) = 100 centimes</Currency>
4949<Airports>20 (1999 est.)</Airports>
4950<Illicitdrugs>transshipment point for Southwest and Southeast Asian heroin moving to Europe and North America; illicit cultivator of cannabis</Illicitdrugs>
4951</record>
4952<record>
4953<Location>islands in the South Atlantic Ocean, about mid-way between South America and Africa</Location>
4954<Geographiccoordinates>15 56 S, 5 42 W</Geographiccoordinates>
4955<Area>410</Area>
4956<Climate>Saint Helena - tropical; marine; mild, tempered by trade winds; Tristan da Cunha - temperate; marine, mild, tempered by trade winds (tends to be cooler than Saint Helena)</Climate>
4957<Naturalresources>fish</Naturalresources>
4958<Population>7212</Population>
4959<Populationgrowthrate>0.76% (2000 est.)</Populationgrowthrate>
4960<Sexratio>
4961at birth: 1.06 male(s)/female
4962under 15 years: 1.02 male(s)/female
496315-64 years: 1.09 male(s)/female
496465 years and over: 0.72 male(s)/female
4965total population: 1.04 male(s)/female (2000 est.)</Sexratio>
4966<Religions>Anglican (majority), Baptist, Seventh-Day Adventist, Roman Catholic</Religions>
4967<Countryname>Saint Helena </Countryname>
4968<Capital>Jamestown</Capital>
4969<Flagdescription>blue with the flag of the UK in the upper hoist-side quadrant and the Saint Helenian shield centered on the outer half of the flag; the shield features a rocky coastline and three-masted sailing ship</Flagdescription>
4970<GDP>purchasing power parity - $13.9 million (FY94/95 est.)</GDP>
4971<Industries>construction, crafts (furniture, lacework, fancy woodwork), fishing</Industries>
4972<Exports>$704,000 (f.o.b., 1995)</Exports>
4973<Imports>$14.434 million (c.i.f., 1995)</Imports>
4974<Currency>1 Saint Helenian pound = 100 pence</Currency>
4975<Airports>1 (1999 est.)</Airports>
4976</record>
4977<record>
4978<Location>Southeastern Europe, eastern Alps bordering the Adriatic Sea, between Austria and Croatia</Location>
4979<Geographiccoordinates>46 00 N, 15 00 E</Geographiccoordinates>
4980<Area>20253</Area>
4981<Climate>Mediterranean climate on the coast, continental climate with mild to hot summers and cold winters in the plateaus and valleys to the east</Climate>
4982<Naturalresources>lignite coal, lead, zinc, mercury, uranium, silver, hydropower</Naturalresources>
4983<Population>1927593</Population>
4984<Populationgrowthrate>0.12% (2000 est.)</Populationgrowthrate>
4985<Sexratio>
4986at birth: 1.06 male(s)/female
4987under 15 years: 1.05 male(s)/female
498815-64 years: 1.03 male(s)/female
498965 years and over: 0.57 male(s)/female
4990total population: 0.95 male(s)/female (2000 est.)</Sexratio>
4991<Religions>Roman Catholic 70.8% (including Uniate 2%), Lutheran 1%, Muslim 1%, atheist 4.3%, other 22.9%</Religions>
4992<Countryname>Slovenia </Countryname>
4993<Capital>Ljubljana</Capital>
4994<Flagdescription>three equal horizontal bands of white (top), blue, and red, with the Slovenian seal (a shield with the image of Triglav, Slovenia's highest peak, in white against a blue background at the center; beneath it are two wavy blue lines depicting seas and rivers, and above it are three six-pointed stars arranged in an inverted triangle which are taken from the coat of arms of the Counts of Celje, the great Slovene dynastic house of the late 14th and early 15th centuries); the seal is located in the upper hoist side of the flag centered in the white and blue bands</Flagdescription>
4995<GDP>purchasing power parity - $21.4 billion (1999 est.)</GDP>
4996<Industries>ferrous metallurgy and rolling mill products, aluminum reduction and rolled products, lead and zinc smelting, electronics (including military electronics), trucks, electric power equipment, wood products, textiles, chemicals, machine tools</Industries>
4997<Exports>$8.4 billion (f.o.b., 1999)</Exports>
4998<Imports>$9.7 billion (f.o.b., 1999)</Imports>
4999<Currency>1 tolar (SlT) = 100 stotins</Currency>
5000<Airports>14 (1999 est.)</Airports>
5001<Illicitdrugs>minor transit point for Southwest Asian heroin bound for Western Europe, and for precursor chemicals</Illicitdrugs>
5002</record>
5003<record>
5004<Location>Western Africa, bordering the North Atlantic Ocean, between Guinea and Liberia</Location>
5005<Geographiccoordinates>8 30 N, 11 30 W</Geographiccoordinates>
5006<Area>71740</Area>
5007<Climate>tropical; hot, humid; summer rainy season (May to December); winter dry season (December to April)</Climate>
5008<Naturalresources>diamonds, titanium ore, bauxite, iron ore, gold, chromite</Naturalresources>
5009<Population>5232624</Population>
5010<Populationgrowthrate>3.67% (2000 est.)</Populationgrowthrate>
5011<Sexratio>
5012at birth: 1.03 male(s)/female
5013under 15 years: 0.96 male(s)/female
501415-64 years: 0.92 male(s)/female
501565 years and over: 1 male(s)/female
5016total population: 0.94 male(s)/female (2000 est.)</Sexratio>
5017<Religions>Muslim 60%, indigenous beliefs 30%, Christian 10%</Religions>
5018<Countryname>Sierra Leone </Countryname>
5019<Capital>Freetown</Capital>
5020<Flagdescription>three equal horizontal bands of light green (top), white, and light blue</Flagdescription>
5021<GDP>purchasing power parity - $2.5 billion (1999 est.)</GDP>
5022<Industries>mining (diamonds); small-scale manufacturing (beverages, textiles, cigarettes, footwear); petroleum refining</Industries>
5023<Exports>$41 million (f.o.b., 1998)</Exports>
5024<Imports>$166 million (f.o.b., 1998)</Imports>
5025<Currency>1 leone (Le) = 100 cents</Currency>
5026<Airports>10 (1999 est.)</Airports>
5027</record>
5028<record>
5029<Location>Southern Europe, an enclave in central Italy</Location>
5030<Geographiccoordinates>43 46 N, 12 25 E</Geographiccoordinates>
5031<Area>60</Area>
5032<Climate>Mediterranean; mild to cool winters; warm, sunny summers</Climate>
5033<Naturalresources>building stone</Naturalresources>
5034<Population>26937</Population>
5035<Populationgrowthrate>1.49% (2000 est.)</Populationgrowthrate>
5036<Sexratio>
5037at birth: 1 male(s)/female
5038under 15 years: 1.07 male(s)/female
503915-64 years: 0.95 male(s)/female
504065 years and over: 0.75 male(s)/female
5041total population: 0.94 male(s)/female (2000 est.)</Sexratio>
5042<Religions>Roman Catholic</Religions>
5043<Countryname>San Marino </Countryname>
5044<Capital>San Marino</Capital>
5045<Flagdescription>two equal horizontal bands of white (top) and light blue with the national coat of arms superimposed in the center; the coat of arms has a shield (featuring three towers on three peaks) flanked by a wreath, below a crown and above a scroll bearing the word LIBERTAS (Liberty)</Flagdescription>
5046<GDP>purchasing power parity - $500 million (1997 est.)</GDP>
5047<Industries>tourism, banking, textiles, electronics, ceramics, cement, wine</Industries>
5048<Exports>trade data are included with the statistics for Italy</Exports>
5049<Imports>trade data are included with the statistics for Italy</Imports>
5050<Currency>1 Italian lira (Lit) = 100 centesimi; note - also mints its own coins</Currency>
5051<Airports>none</Airports>
5052</record>
5053<record>
5054<Location>Southeastern Asia, islands between Malaysia and Indonesia</Location>
5055<Geographiccoordinates>1 22 N, 103 48 E</Geographiccoordinates>
5056<Area>647</Area>
5057<Climate>tropical; hot, humid, rainy; no pronounced rainy or dry seasons; thunderstorms occur on 40% of all days (67% of days in April)</Climate>
5058<Naturalresources>fish, deepwater ports</Naturalresources>
5059<Population>4151264</Population>
5060<Populationgrowthrate>3.54% (2000 est.)</Populationgrowthrate>
5061<Sexratio>
5062at birth: 1.08 male(s)/female
5063under 15 years: 1.07 male(s)/female
506415-64 years: 0.96 male(s)/female
506565 years and over: 0.78 male(s)/female
5066total population: 0.96 male(s)/female (2000 est.)</Sexratio>
5067<Religions>Buddhist (Chinese), Muslim (Malays), Christian, Hindu, Sikh, Taoist, Confucianist</Religions>
5068<Countryname>Singapore </Countryname>
5069<Capital>Singapore</Capital>
5070<Flagdescription>two equal horizontal bands of red (top) and white; near the hoist side of the red band, there is a vertical, white crescent (closed portion is toward the hoist side) partially enclosing five white five-pointed stars arranged in a circle</Flagdescription>
5071<GDP>purchasing power parity - $98 billion (1999 est.)</GDP>
5072<Industries>electronics, financial services, oil drilling equipment, petroleum refining, rubber processing and rubber products, processed food and beverages, ship repair, entrepot trade, biotechnology</Industries>
5073<Exports>$114 billion (1999)</Exports>
5074<Imports>$111 billion (1999)</Imports>
5075<Currency>1 Singapore dollar (S$) = 100 cents</Currency>
5076<Airports>9 (1999 est.)</Airports>
5077<Illicitdrugs>transit point for Golden Triangle heroin going to North America, Western Europe, and the Third World; also a money-laundering center</Illicitdrugs>
5078</record>
5079<record>
5080<Location>Eastern Africa, bordering the Gulf of Aden and the Indian Ocean, east of Ethiopia</Location>
5081<Geographiccoordinates>10 00 N, 49 00 E</Geographiccoordinates>
5082<Area>637657</Area>
5083<Climate>principally desert; December to February - northeast monsoon, moderate temperatures in north and very hot in south; May to October - southwest monsoon, torrid in the north and hot in the south, irregular rainfall, hot and humid periods (tangambili) between monsoons</Climate>
5084<Naturalresources>uranium and largely unexploited reserves of iron ore, tin, gypsum, bauxite, copper, salt</Naturalresources>
5085<Population>7253137</Population>
5086<Populationgrowthrate>2.9% (2000 est.)</Populationgrowthrate>
5087<Sexratio>
5088at birth: 1.03 male(s)/female
5089under 15 years: 1 male(s)/female
509015-64 years: 1.02 male(s)/female
509165 years and over: 0.81 male(s)/female
5092total population: 1.01 male(s)/female (2000 est.)</Sexratio>
5093<Religions>Sunni Muslim</Religions>
5094<Countryname>Somalia </Countryname>
5095<Capital>Mogadishu</Capital>
5096<Flagdescription>light blue with a large white five-pointed star in the center; design based on the flag of the UN (Italian Somaliland was a UN trust territory)</Flagdescription>
5097<GDP>purchasing power parity - $4.3 billion (1999 est.)</GDP>
5098<Industries>a few small industries, including sugar refining, textiles, petroleum refining (mostly shut down)</Industries>
5099<Exports>$187 million (f.o.b., 1998 est.)</Exports>
5100<Imports>$327 million (f.o.b., 1998 est.)</Imports>
5101<Currency>1 Somali shilling (So. Sh.) = 100 cents</Currency>
5102<Airports>61 (1999 est.)</Airports>
5103</record>
5104<record>
5105<Location>Southwestern Europe, bordering the Bay of Biscay, Mediterranean Sea, North Atlantic Ocean, and Pyrenees Mountains, southwest of France</Location>
5106<Geographiccoordinates>40 00 N, 4 00 W</Geographiccoordinates>
5107<Area>504782</Area>
5108<Climate>temperate; clear, hot summers in interior, more moderate and cloudy along coast; cloudy, cold winters in interior, partly cloudy and cool along coast</Climate>
5109<Naturalresources>coal, lignite, iron ore, uranium, mercury, pyrites, fluorspar, gypsum, zinc, lead, tungsten, copper, kaolin, potash, hydropower, arable land</Naturalresources>
5110<Population>39996671</Population>
5111<Populationgrowthrate>0.11% (2000 est.)</Populationgrowthrate>
5112<Sexratio>
5113at birth: 1.07 male(s)/female
5114under 15 years: 1.06 male(s)/female
511515-64 years: 1.01 male(s)/female
511665 years and over: 0.72 male(s)/female
5117total population: 0.96 male(s)/female (2000 est.)</Sexratio>
5118<Religions>Roman Catholic 99%, other 1%</Religions>
5119<Countryname>Spain </Countryname>
5120<Capital>Madrid</Capital>
5121<Flagdescription>three horizontal bands of red (top), yellow (double width), and red with the national coat of arms on the hoist side of the yellow band; the coat of arms includes the royal seal framed by the Pillars of Hercules, which are the two promontories (Gibraltar and Ceuta) on either side of the eastern end of the Strait of Gibraltar</Flagdescription>
5122<GDP>purchasing power parity - $677.5 billion (1999 est.)</GDP>
5123<Industries>textiles and apparel (including footwear), food and beverages, metals and metal manufactures, chemicals, shipbuilding, automobiles, machine tools, tourism</Industries>
5124<Exports>$112.3 billion (f.o.b., 1999 est.)</Exports>
5125<Imports>$137.5 billion (f.o.b., 1999 est.)</Imports>
5126<Currency>1 peseta (Pta) = 100 centimos</Currency>
5127<Airports>105 (1999 est.)</Airports>
5128<Illicitdrugs>key European gateway country for Latin American cocaine and North African hashish entering the European market; transshipment point for and consumer of Southwest Asian heroin</Illicitdrugs>
5129</record>
5130<record>
5131<Location>Southeastern Europe, bordering the Adriatic Sea, between Albania and Bosnia and Herzegovina</Location>
5132<Geographiccoordinates>44 00 N, 21 00 E</Geographiccoordinates>
5133<Area>102350</Area>
5134<Climate>in the north, continental climate (cold winters and hot, humid summers with well distributed rainfall); central portion, continental and Mediterranean climate; to the south, Adriatic climate along the coast, hot, dry summers and autumns and relatively cold winters with heavy snowfall inland</Climate>
5135<Naturalresources>oil, gas, coal, antimony, copper, lead, zinc, nickel, gold, pyrite, chrome, hydro power</Naturalresources>
5136<Population>10662087</Population>
5137<Populationgrowthrate>Serbia - 0.739%; Montenegro - -12.22% (2000 est.)</Populationgrowthrate>
5138<Sexratio>
5139at birth: Serbia - 1.08 male(s)/female; Montenegro - 1.09 male(s)/female
5140under 15 years: Serbia - 1.07 male(s)/female; Montenegro - 1.07 male(s)/female
514115-64 years: Serbia - 0.96 male(s)/female; Montenegro - 0.97 male(s)/female
514265 years and over: Serbia - 0.76 male(s)/female; Montenegro - 0.68 male(s)/female
5143total population: Serbia - 0.95 male(s)/female; Montenegro - 0.95 male(s)/female (2000 est.)</Sexratio>
5144<Religions>Orthodox 65%, Muslim 19%, Roman Catholic 4%, Protestant 1%, other 11%</Religions>
5145<Countryname>Serbia and Montenegro </Countryname>
5146<Capital>Belgrade (Serbia), Podgorica (Montenegro)</Capital>
5147<GDP>purchasing power parity - $20.6 billion (1999 est.)</GDP>
5148<Industries>machine building (aircraft, trucks, and automobiles; tanks and weapons; electrical equipment; agricultural machinery); metallurgy (steel, aluminum, copper, lead, zinc, chromium, antimony, bismuth, cadmium); mining (coal, bauxite, nonferrous ore, iron ore, limestone); consumer goods (textiles, footwear, foodstuffs, appliances); electronics, petroleum products, chemicals, and pharmaceuticals</Industries>
5149<Exports>$1.5 billion (1999)</Exports>
5150<Imports>$3.3 billion (1999)</Imports>
5151<Currency>1 Yugoslav New Dinar (YD) = 100 paras; Montenegro made the German deutsche mark (1 deutsche mark (DM) = 100 pfennige) legal tender alongside the Yugoslav dinar (1999)</Currency>
5152<Airports>48 (Serbia 43, Montenegro 5) (1999 est.)</Airports>
5153<Illicitdrugs>transshipment point for Southwest Asian heroin moving to Western Europe on the Balkan route</Illicitdrugs>
5154</record>
5155<record>
5156<Location>Caribbean, island between the Caribbean Sea and North Atlantic Ocean, north of Trinidad and Tobago</Location>
5157<Geographiccoordinates>13 53 N, 60 68 W</Geographiccoordinates>
5158<Area>620</Area>
5159<Climate>tropical, moderated by northeast trade winds; dry season from January to April, rainy season from May to August</Climate>
5160<Naturalresources>forests, sandy beaches, minerals (pumice), mineral springs, geothermal potential</Naturalresources>
5161<Population>156260</Population>
5162<Populationgrowthrate>1.21% (2000 est.)</Populationgrowthrate>
5163<Sexratio>
5164at birth: 1.07 male(s)/female
5165under 15 years: 1.04 male(s)/female
516615-64 years: 0.96 male(s)/female
516765 years and over: 0.6 male(s)/female
5168total population: 0.96 male(s)/female (2000 est.)</Sexratio>
5169<Religions>Roman Catholic 90%, Protestant 7%, Anglican 3%</Religions>
5170<Countryname>Saint Lucia </Countryname>
5171<Capital>Castries</Capital>
5172<Flagdescription>blue, with a gold isosceles triangle below a black arrowhead; the upper edges of the arrowhead have a white border</Flagdescription>
5173<GDP>purchasing power parity - $656 million (1998 est.)</GDP>
5174<Industries>clothing, assembly of electronic components, beverages, corrugated cardboard boxes, tourism, lime processing, coconut processing</Industries>
5175<Exports>$75 million (1998)</Exports>
5176<Imports>$290 million (1998)</Imports>
5177<Currency>1 East Caribbean dollar (EC$) = 100 cents</Currency>
5178<Airports>2 (1999 est.)</Airports>
5179<Illicitdrugs>transit point for South American drugs destined for the US and Europe</Illicitdrugs>
5180</record>
5181<record>
5182<Location>Northern Africa, bordering the Red Sea, between Egypt and Eritrea</Location>
5183<Geographiccoordinates>15 00 N, 30 00 E</Geographiccoordinates>
5184<Area>2505810</Area>
5185<Climate>tropical in south; arid desert in north; rainy season (April to October)</Climate>
5186<Naturalresources>petroleum; small reserves of iron ore, copper, chromium ore, zinc, tungsten, mica, silver, gold, hydropower</Naturalresources>
5187<Population>35079814</Population>
5188<Populationgrowthrate>2.84% (2000 est.)</Populationgrowthrate>
5189<Sexratio>
5190at birth: 1.05 male(s)/female
5191under 15 years: 1.05 male(s)/female
519215-64 years: 1 male(s)/female
519365 years and over: 1.33 male(s)/female
5194total population: 1.03 male(s)/female (2000 est.)</Sexratio>
5195<Religions>Sunni Muslim 70% (in north), indigenous beliefs 25%, Christian 5% (mostly in south and Khartoum)</Religions>
5196<Countryname>Sudan </Countryname>
5197<Capital>Khartoum</Capital>
5198<Flagdescription>three equal horizontal bands of red (top), white, and black with a green isosceles triangle based on the hoist side</Flagdescription>
5199<GDP>purchasing power parity - $32.6 billion (1999 est.)</GDP>
5200<Industries>cotton ginning, textiles, cement, edible oils, sugar, soap distilling, shoes, petroleum refining</Industries>
5201<Exports>$580 million (f.o.b., 1999 est.)</Exports>
5202<Imports>$1.4 billion (c.i.f., 1999 est.)</Imports>
5203<Currency>1 Sudanese dinar (SD) = 100 piastres; note - in July 1999 the Sudanese Central Bank made the formal declaration that all dealings with the Sudanese pound should stop</Currency>
5204<Airports>61 (1999 est.)</Airports>
5205</record>
5206<record>
5207<Location>Northern Europe, islands between the Arctic Ocean, Barents Sea, Greenland Sea, and Norwegian Sea, north of Norway</Location>
5208<Geographiccoordinates>78 00 N, 20 00 E</Geographiccoordinates>
5209<Area>62049</Area>
5210<Climate>arctic, tempered by warm North Atlantic Current; cool summers, cold winters; North Atlantic Current flows along west and north coasts of Spitsbergen, keeping water open and navigable most of the year</Climate>
5211<Naturalresources>coal, copper, iron ore, phosphate, zinc, wildlife, fish</Naturalresources>
5212<Population>2416</Population>
5213<Populationgrowthrate>-3.55% (2000 est.)</Populationgrowthrate>
5214<Countryname>Svalbard (sometimes referred to as Spitzbergen) </Countryname>
5215<Capital>Longyearbyen</Capital>
5216<Flagdescription>the flag of Norway is used</Flagdescription>
5217<GDP>$NA</GDP>
5218<Exports>$NA</Exports>
5219<Imports>$NA</Imports>
5220<Currency>1 Norwegian krone (NKr) = 100 oere</Currency>
5221<Airports>4 (1999 est.)</Airports>
5222</record>
5223<record>
5224<Location>Northern Europe, bordering the Baltic Sea, Gulf of Bothnia, Kattegat, and Skagerrak, between Finland and Norway</Location>
5225<Geographiccoordinates>62 00 N, 15 00 E</Geographiccoordinates>
5226<Area>449964</Area>
5227<Climate>temperate in south with cold, cloudy winters and cool, partly cloudy summers; subarctic in north</Climate>
5228<Naturalresources>zinc, iron ore, lead, copper, silver, timber, uranium, hydropower</Naturalresources>
5229<Population>8873052</Population>
5230<Populationgrowthrate>0.02% (2000 est.)</Populationgrowthrate>
5231<Sexratio>
5232at birth: 1.05 male(s)/female
5233under 15 years: 1.05 male(s)/female
523415-64 years: 1.03 male(s)/female
523565 years and over: 0.73 male(s)/female
5236total population: 0.98 male(s)/female (2000 est.)</Sexratio>
5237<Religions>Lutheran 87%, Roman Catholic, Orthodox, Baptist, Muslim, Jewish, Buddhist</Religions>
5238<Countryname>Sweden </Countryname>
5239<Capital>Stockholm</Capital>
5240<Flagdescription>blue with a yellow cross that extends to the edges of the flag; the vertical part of the cross is shifted to the hoist side in the style of the Dannebrog (Danish flag)</Flagdescription>
5241<GDP>purchasing power parity - $184 billion (1999 est.)</GDP>
5242<Industries>iron and steel, precision equipment (bearings, radio and telephone parts, armaments), wood pulp and paper products, processed foods, motor vehicles</Industries>
5243<Exports>$85.7 billion (f.o.b., 1999)</Exports>
5244<Imports>$67.9 billion (f.o.b., 1999)</Imports>
5245<Currency>1 Swedish krona (SKr) = 100 oere</Currency>
5246<Airports>256 (1999 est.)</Airports>
5247</record>
5248<record>
5249<Location>Southern South America, islands in the South Atlantic Ocean, east of the tip of South America</Location>
5250<Geographiccoordinates>54 30 S, 37 00 W</Geographiccoordinates>
5251<Area>4066</Area>
5252<Climate>variable, with mostly westerly winds throughout the year interspersed with periods of calm; nearly all precipitation falls as snow</Climate>
5253<Naturalresources>fish</Naturalresources>
5254<Population></Population>
5255<Countryname>South Georgia and the South Sandwich Islands </Countryname>
5256<Capital>none; Grytviken on South Georgia is the garrison town</Capital>
5257<Flagdescription>the flag of the UK is used</Flagdescription>
5258<Airports>none</Airports>
5259</record>
5260<record>
5261<Location>Middle East, bordering the Mediterranean Sea, between Lebanon and Turkey</Location>
5262<Geographiccoordinates>35 00 N, 38 00 E</Geographiccoordinates>
5263<Area>185180</Area>
5264<Climate>mostly desert; hot, dry, sunny summers (June to August) and mild, rainy winters (December to February) along coast; cold weather with snow or sleet periodically hitting Damascus</Climate>
5265<Naturalresources>petroleum, phosphates, chrome and manganese ores, asphalt, iron ore, rock salt, marble, gypsum, hydropower</Naturalresources>
5266<Population>16305659</Population>
5267<Populationgrowthrate>2.58% (2000 est.)</Populationgrowthrate>
5268<Sexratio>
5269at birth: 1.05 male(s)/female
5270under 15 years: 1.06 male(s)/female
527115-64 years: 1.05 male(s)/female
527265 years and over: 0.96 male(s)/female
5273total population: 1.05 male(s)/female (2000 est.)</Sexratio>
5274<Religions>Sunni Muslim 74%, Alawite, Druze, and other Muslim sects 16%, Christian (various sects) 10%, Jewish (tiny communities in Damascus, Al Qamishli, and Aleppo)</Religions>
5275<Countryname>Syria </Countryname>
5276<Capital>Damascus</Capital>
5277<Flagdescription>three equal horizontal bands of red (top), white, and black, with two small green five-pointed stars in a horizontal line centered in the white band; similar to the flag of Yemen, which has a plain white band, and of Iraq, which has three green stars (plus an Arabic inscription) in a horizontal line centered in the white band; also similar to the flag of Egypt, which has a heraldic eagle centered in the white band</Flagdescription>
5278<GDP>purchasing power parity - $42.2 billion (1999 est.)</GDP>
5279<Industries>petroleum, textiles, food processing, beverages, tobacco, phosphate rock mining</Industries>
5280<Exports>$3.3 billion (f.o.b., 1999 est.)</Exports>
5281<Imports>$3.2 billion (f.o.b., 1999 est.)</Imports>
5282<Currency>1 Syrian pound = 100 piastres</Currency>
5283<Airports>104 (1999 est.)</Airports>
5284<Illicitdrugs>a transit point for opiates and hashish bound for regional and Western markets</Illicitdrugs>
5285</record>
5286<record>
5287<Location>Central Europe, east of France, north of Italy</Location>
5288<Geographiccoordinates>47 00 N, 8 00 E</Geographiccoordinates>
5289<Area>41290</Area>
5290<Climate>temperate, but varies with altitude; cold, cloudy, rainy/snowy winters; cool to warm, cloudy, humid summers with occasional showers</Climate>
5291<Naturalresources>hydropower potential, timber, salt</Naturalresources>
5292<Population>7262372</Population>
5293<Populationgrowthrate>0.3% (2000 est.)</Populationgrowthrate>
5294<Sexratio>
5295at birth: 1.05 male(s)/female
5296under 15 years: 1.05 male(s)/female
529715-64 years: 1.03 male(s)/female
529865 years and over: 0.68 male(s)/female
5299total population: 0.97 male(s)/female (2000 est.)</Sexratio>
5300<Religions>Roman Catholic 46.1%, Protestant 40%, other 5%, none 8.9% (1990)</Religions>
5301<Countryname>Switzerland </Countryname>
5302<Capital>Bern</Capital>
5303<Flagdescription>red square with a bold, equilateral white cross in the center that does not extend to the edges of the flag</Flagdescription>
5304<GDP>purchasing power parity - $197 billion (1999 est.)</GDP>
5305<Industries>machinery, chemicals, watches, textiles, precision instruments</Industries>
5306<Exports>$98.5 billion (f.o.b., 1999)</Exports>
5307<Imports>$99 billion (f.o.b., 1999)</Imports>
5308<Currency>1 Swiss franc, franken, or franco (SFR) = 100 centimes, rappen, or centesimi</Currency>
5309<Airports>67 (1999 est.)</Airports>
5310<Illicitdrugs>because of more stringent government regulations, used significantly less as a money-laundering center; transit country for and consumer of South American cocaine and Southwest Asian heroin</Illicitdrugs>
5311</record>
5312<record>
5313<Location>Middle East, bordering the Gulf of Oman and the Persian Gulf, between Oman and Saudi Arabia</Location>
5314<Geographiccoordinates>24 00 N, 54 00 E</Geographiccoordinates>
5315<Area>82880</Area>
5316<Climate>desert; cooler in eastern mountains</Climate>
5317<Naturalresources>petroleum, natural gas</Naturalresources>
5318<Population>2369153</Population>
5319<Populationgrowthrate>1.61% (2000 est.)</Populationgrowthrate>
5320<Sexratio>
5321at birth: 1.05 male(s)/female
5322under 15 years: 1.04 male(s)/female
532315-64 years: 1.77 male(s)/female
532465 years and over: 2.26 male(s)/female
5325total population: 1.51 male(s)/female (2000 est.)</Sexratio>
5326<Religions>Muslim 96% (Shi'a 16%), Christian, Hindu, and other 4%</Religions>
5327<Countryname>United Arab Emirates </Countryname>
5328<Capital>Abu Dhabi</Capital>
5329<Flagdescription>three equal horizontal bands of green (top), white, and black with a thicker vertical red band on the hoist side</Flagdescription>
5330<GDP>purchasing power parity - $41.5 billion (1999 est.)</GDP>
5331<Industries>petroleum, fishing, petrochemicals, construction materials, some boat building, handicrafts, pearling</Industries>
5332<Exports>$34 billion (f.o.b., 1999 est.)</Exports>
5333<Imports>$27.5 billion (f.o.b., 1999 est.)</Imports>
5334<Currency>1 Emirian dirham (Dh) = 100 fils</Currency>
5335<Airports>40 (1999 est.)</Airports>
5336<Illicitdrugs>growing role as heroin transshipment and money-laundering center due to its proximity to southwest Asian producing countries and the bustling free trade zone in Dubai</Illicitdrugs>
5337</record>
5338<record>
5339<Location>Caribbean, islands between the Caribbean Sea and the North Atlantic Ocean, northeast of Venezuela</Location>
5340<Geographiccoordinates>11 00 N, 61 00 W</Geographiccoordinates>
5341<Area>5128</Area>
5342<Climate>tropical; rainy season (June to December)</Climate>
5343<Naturalresources>petroleum, natural gas, asphalt</Naturalresources>
5344<Population>1175523</Population>
5345<Populationgrowthrate>-0.49% (2000 est.)</Populationgrowthrate>
5346<Sexratio>
5347at birth: 1.03 male(s)/female
5348under 15 years: 1.04 male(s)/female
534915-64 years: 1.05 male(s)/female
535065 years and over: 0.8 male(s)/female
5351total population: 1.03 male(s)/female (2000 est.)</Sexratio>
5352<Religions>Roman Catholic 29.4%, Hindu 23.8%, Anglican 10.9%, Muslim 5.8%, Presbyterian 3.4%, other 26.7%</Religions>
5353<Countryname>Trinidad and Tobago </Countryname>
5354<Capital>Port-of-Spain</Capital>
5355<Flagdescription>red with a white-edged black diagonal band from the upper hoist side</Flagdescription>
5356<GDP>purchasing power parity - $9.41 billion (1999 est.)</GDP>
5357<Industries>petroleum, chemicals, tourism, food processing, cement, beverage, cotton textiles</Industries>
5358<Exports>$2.4 billion (f.o.b., 1998)</Exports>
5359<Imports>$3 billion (c.i.f., 1998)</Imports>
5360<Currency>1 Trinidad and Tobago dollar (TT$) = 100 cents</Currency>
5361<Airports>6 (1999 est.)</Airports>
5362<Illicitdrugs>transshipment point for South American drugs destined for the US and Europe; producer of cannabis</Illicitdrugs>
5363</record>
5364<record>
5365<Location>Southern Africa, island in the Indian Ocean, east of Madagascar</Location>
5366<Geographiccoordinates>15 52 S, 54 25 E</Geographiccoordinates>
5367<Area>1</Area>
5368<Climate>tropical</Climate>
5369<Naturalresources>fish</Naturalresources>
5370<Population></Population>
5371<Countryname>Tromelin Island </Countryname>
5372<Flagdescription>the flag of France is used</Flagdescription>
5373<Airports>1 (1999 est.)</Airports>
5374</record>
5375<record>
5376<Location>Southeastern Asia, bordering the Andaman Sea and the Gulf of Thailand, southeast of Burma</Location>
5377<Geographiccoordinates>15 00 N, 100 00 E</Geographiccoordinates>
5378<Area>514000</Area>
5379<Climate>tropical; rainy, warm, cloudy southwest monsoon (mid-May to September); dry, cool northeast monsoon (November to mid-March); southern isthmus always hot and humid</Climate>
5380<Naturalresources>tin, rubber, natural gas, tungsten, tantalum, timber, lead, fish, gypsum, lignite, fluorite, arable land</Naturalresources>
5381<Population>61230874</Population>
5382<Populationgrowthrate>0.93% (2000 est.)</Populationgrowthrate>
5383<Sexratio>
5384at birth: 1.05 male(s)/female
5385under 15 years: 1.04 male(s)/female
538615-64 years: 0.97 male(s)/female
538765 years and over: 0.79 male(s)/female
5388total population: 0.97 male(s)/female (2000 est.)</Sexratio>
5389<Religions>Buddhism 95%, Muslim 3.8%, Christianity 0.5%, Hinduism 0.1%, other 0.6% (1991)</Religions>
5390<Countryname>Thailand </Countryname>
5391<Capital>Bangkok</Capital>
5392<Flagdescription>five horizontal bands of red (top), white, blue (double width), white, and red</Flagdescription>
5393<GDP>purchasing power parity - $388.7 billion (1999 est.)</GDP>
5394<Industries>tourism; textiles and garments, agricultural processing, beverages, tobacco, cement, light manufacturing, such as jewelry; electric appliances and components, computers and parts, integrated circuits, furniture, plastics; world's second-largest tungsten producer and third-largest tin producer</Industries>
5395<Exports>$58.5 billion (f.o.b., 1999 est.)</Exports>
5396<Imports>$45 billion (f.o.b., 1999 est.)</Imports>
5397<Currency>1 baht (B) = 100 satang</Currency>
5398<Airports>106 (1999 est.)</Airports>
5399<Illicitdrugs>a minor producer of opium, heroin, and marijuana; major illicit transit point for heroin en route to the international drug market from Burma and Laos; eradication efforts have reduced the area of cannabis cultivation and shifted some production to neighboring countries; opium poppy cultivation has been reduced by eradication efforts; also a drug money-laundering center; minor role in amphetamine production for regional consumption; increasing indigenous abuse of methamphetamines and heroin</Illicitdrugs>
5400</record>
5401<record>
5402<Location>Central Asia, west of China</Location>
5403<Geographiccoordinates>39 00 N, 71 00 E</Geographiccoordinates>
5404<Area>143100</Area>
5405<Climate>midlatitude continental, hot summers, mild winters; semiarid to polar in Pamir Mountains</Climate>
5406<Naturalresources>hydropower, some petroleum, uranium, mercury, brown coal, lead, zinc, antimony, tungsten</Naturalresources>
5407<Population>6440732</Population>
5408<Populationgrowthrate>2.12% (2000 est.)</Populationgrowthrate>
5409<Sexratio>
5410at birth: 1.05 male(s)/female
5411under 15 years: 1.02 male(s)/female
541215-64 years: 0.99 male(s)/female
541365 years and over: 0.76 male(s)/female
5414total population: 0.99 male(s)/female (2000 est.)</Sexratio>
5415<Religions>Sunni Muslim 80%, Shi'a Muslim 5%</Religions>
5416<Countryname>Tajikistan </Countryname>
5417<Capital>Dushanbe</Capital>
5418<Flagdescription>three horizontal stripes of red (top), a wider stripe of white, and green; a gold crown surmounted by seven gold, five-pointed stars is located in the center of the white stripe</Flagdescription>
5419<GDP>purchasing power parity - $6.2 billion (1999 est.)</GDP>
5420<Industries>aluminum, zinc, lead, chemicals and fertilizers, cement, vegetable oil, metal-cutting machine tools, refrigerators and freezers</Industries>
5421<Exports>$634 million (1999 est.)</Exports>
5422<Imports>$770 million (1999 est.)</Imports>
5423<Currency>Tajikistani ruble (TJR) = 100 tanga</Currency>
5424<Airports>59 (1994 est.)</Airports>
5425<Illicitdrugs>limited illicit cultivation of cannabis, mostly for domestic consumption; opium poppy cultivation negligible in 1998 because of government eradication program; major transshipment point for illicit drugs from Southwest Asia to Russia and Western Europe</Illicitdrugs>
5426</record>
5427<record>
5428<Location>Caribbean, two island groups in the North Atlantic Ocean, southeast of The Bahamas</Location>
5429<Geographiccoordinates>21 45 N, 71 35 W</Geographiccoordinates>
5430<Area>430</Area>
5431<Climate>tropical; marine; moderated by trade winds; sunny and relatively dry</Climate>
5432<Naturalresources>spiny lobster, conch</Naturalresources>
5433<Population>17502</Population>
5434<Populationgrowthrate>3.55% (2000 est.)</Populationgrowthrate>
5435<Sexratio>
5436at birth: 1.05 male(s)/female
5437under 15 years: 1.03 male(s)/female
543815-64 years: 1.11 male(s)/female
543965 years and over: 0.81 male(s)/female
5440total population: 1.07 male(s)/female (2000 est.)</Sexratio>
5441<Religions>Baptist 41.2%, Methodist 18.9%, Anglican 18.3%, Seventh-Day Adventist 1.7%, other 19.9% (1980)</Religions>
5442<Countryname>Turks and Caicos Islands </Countryname>
5443<Capital>Cockburn Town (on Grand Turk)</Capital>
5444<Flagdescription>blue, with the flag of the UK in the upper hoist-side quadrant and the colonial shield centered on the outer half of the flag; the shield is yellow and contains a conch shell, lobster, and cactus</Flagdescription>
5445<GDP>purchasing power parity - $117 million (1997 est.)</GDP>
5446<Industries>tourism, offshore financial services</Industries>
5447<Exports>$4.7 million (1993)</Exports>
5448<Imports>$46.6 million (1993)</Imports>
5449<Currency>1 United States dollar (US$) = 100 cents</Currency>
5450<Airports>7 (1999 est.)</Airports>
5451<Illicitdrugs>transshipment point for South American narcotics destined for the US</Illicitdrugs>
5452</record>
5453<record>
5454<Location>Oceania, group of three islands in the South Pacific Ocean, about one-half of the way from Hawaii to New Zealand</Location>
5455<Geographiccoordinates>9 00 S, 172 00 W</Geographiccoordinates>
5456<Area>10</Area>
5457<Climate>tropical; moderated by trade winds (April to November)</Climate>
5458<Naturalresources>NEGL</Naturalresources>
5459<Population>1458</Population>
5460<Populationgrowthrate>-0.89% (2000 est.)</Populationgrowthrate>
5461<Religions>Congregational Christian Church 70%, Roman Catholic 28%, other 2%
5462note: on Atafu, all Congregational Christian Church of Samoa; on Nukunonu, all Roman Catholic; on Fakaofo, both denominations, with the Congregational Christian Church predominant</Religions>
5463<Countryname>Tokelau </Countryname>
5464<Capital>none; each atoll has its own administrative center</Capital>
5465<Flagdescription>the flag of New Zealand is used</Flagdescription>
5466<GDP>purchasing power parity - $1.5 million (1993 est.)</GDP>
5467<Industries>small-scale enterprises for copra production, wood work, plaited craft goods; stamps, coins; fishing</Industries>
5468<Exports>$98,000 (f.o.b., 1983)</Exports>
5469<Imports>$323,400 (c.i.f., 1983)</Imports>
5470<Currency>1 New Zealand dollar (NZ$) = 100 cents</Currency>
5471<Airports>none; lagoon landings by amphibious aircraft from Samoa</Airports>
5472</record>
5473<record>
5474<Location>Oceania, archipelago in the South Pacific Ocean, about two-thirds of the way from Hawaii to New Zealand</Location>
5475<Geographiccoordinates>20 00 S, 175 00 W</Geographiccoordinates>
5476<Area>748</Area>
5477<Climate>tropical; modified by trade winds; warm season (December to May), cool season (May to December)</Climate>
5478<Naturalresources>fish, fertile soil</Naturalresources>
5479<Population>102321</Population>
5480<Populationgrowthrate>1.91% (2000 est.)</Populationgrowthrate>
5481<Sexratio>
5482at birth: 1.05 male(s)/female
5483under 15 years: 1.04 male(s)/female
548415-64 years: 0.97 male(s)/female
548565 years and over: 0.83 male(s)/female
5486total population: 0.99 male(s)/female (2000 est.)</Sexratio>
5487<Religions>Christian (Free Wesleyan Church claims over 30,000 adherents)</Religions>
5488<Countryname>Tonga </Countryname>
5489<Capital>Nuku'alofa</Capital>
5490<Flagdescription>red with a bold red cross on a white rectangle in the upper hoist-side corner</Flagdescription>
5491<GDP>purchasing power parity - $238 million (1998 est.)</GDP>
5492<Industries>tourism, fishing</Industries>
5493<Exports>$8 million (f.o.b., 1998)</Exports>
5494<Imports>$69 million (f.o.b., 1998)</Imports>
5495<Currency>1 pa'anga (T$) = 100 seniti</Currency>
5496<Airports>6 (1999 est.)</Airports>
5497</record>
5498<record>
5499<Location>Western Africa, bordering the Bight of Benin, between Benin and Ghana</Location>
5500<Geographiccoordinates>8 00 N, 1 10 E</Geographiccoordinates>
5501<Area>56785</Area>
5502<Climate>tropical; hot, humid in south; semiarid in north</Climate>
5503<Naturalresources>phosphates, limestone, marble, arable land</Naturalresources>
5504<Population>5018502</Population>
5505<Populationgrowthrate>2.7% (2000 est.)</Populationgrowthrate>
5506<Sexratio>
5507at birth: 1.03 male(s)/female
5508under 15 years: 1.01 male(s)/female
550915-64 years: 0.95 male(s)/female
551065 years and over: 0.78 male(s)/female
5511total population: 0.97 male(s)/female (2000 est.)</Sexratio>
5512<Religions>indigenous beliefs 70%, Christian 20%, Muslim 10%</Religions>
5513<Countryname>Togo </Countryname>
5514<Capital>Lome</Capital>
5515<Flagdescription>five equal horizontal bands of green (top and bottom) alternating with yellow; there is a white five-pointed star on a red square in the upper hoist-side corner; uses the popular pan-African colors of Ethiopia</Flagdescription>
5516<GDP>purchasing power parity - $8.6 billion (1999 est.)</GDP>
5517<Industries>phosphate mining, agricultural processing, cement; handicrafts, textiles, beverages</Industries>
5518<Exports>$400 million (f.o.b., 1999)</Exports>
5519<Imports>$450 million (f.o.b., 1999)</Imports>
5520<Currency>1 Communaute Financiere Africaine franc (CFAF) = 100 centimes</Currency>
5521<Airports>9 (1999 est.)</Airports>
5522<Illicitdrugs>transit hub for Nigerian heroin and cocaine traffickers</Illicitdrugs>
5523</record>
5524<record>
5525<Location>Western Africa, islands in the Gulf of Guinea, straddling the Equator, west of Gabon</Location>
5526<Geographiccoordinates>1 00 N, 7 00 E</Geographiccoordinates>
5527<Area>1001</Area>
5528<Climate>tropical; hot, humid; one rainy season (October to May)</Climate>
5529<Naturalresources>fish, hydropower</Naturalresources>
5530<Population>159883</Population>
5531<Populationgrowthrate>3.16% (2000 est.)</Populationgrowthrate>
5532<Sexratio>
5533at birth: 1.03 male(s)/female
5534under 15 years: 1.03 male(s)/female
553515-64 years: 0.93 male(s)/female
553665 years and over: 0.84 male(s)/female
5537total population: 0.97 male(s)/female (2000 est.)</Sexratio>
5538<Religions>Christian 80% (Roman Catholic, Evangelical Protestant, Seventh-Day Adventist)</Religions>
5539<Countryname>Sao Tome and Principe </Countryname>
5540<Capital>Sao Tome</Capital>
5541<Flagdescription>three horizontal bands of green (top), yellow (double width), and green with two black five-pointed stars placed side by side in the center of the yellow band and a red isosceles triangle based on the hoist side; uses the popular pan-African colors of Ethiopia</Flagdescription>
5542<GDP>purchasing power parity - $169 million (1999 est.)</GDP>
5543<Industries>light construction, textiles, soap, beer; fish processing; timber</Industries>
5544<Exports>$4.9 million (f.o.b., 1999 est.)</Exports>
5545<Imports>$19.5 million (f.o.b., 1999 est.)</Imports>
5546<Currency>1 dobra (Db) = 100 centimos</Currency>
5547<Airports>2 (1999 est.)</Airports>
5548</record>
5549<record>
5550<Location>Northern Africa, bordering the Mediterranean Sea, between Algeria and Libya</Location>
5551<Geographiccoordinates>34 00 N, 9 00 E</Geographiccoordinates>
5552<Area>163610</Area>
5553<Climate>temperate in north with mild, rainy winters and hot, dry summers; desert in south</Climate>
5554<Naturalresources>petroleum, phosphates, iron ore, lead, zinc, salt, arable land</Naturalresources>
5555<Population>9593402</Population>
5556<Populationgrowthrate>1.17% (2000 est.)</Populationgrowthrate>
5557<Sexratio>
5558at birth: 1.08 male(s)/female
5559under 15 years: 1.07 male(s)/female
556015-64 years: 1 male(s)/female
556165 years and over: 1.01 male(s)/female
5562total population: 1.02 male(s)/female (2000 est.)</Sexratio>
5563<Religions>Muslim 98%, Christian 1%, Jewish and other 1%</Religions>
5564<Countryname>Tunisia </Countryname>
5565<Capital>Tunis</Capital>
5566<Flagdescription>red with a white disk in the center bearing a red crescent nearly encircling a red five-pointed star; the crescent and star are traditional symbols of Islam</Flagdescription>
5567<GDP>purchasing power parity - $52.6 billion (1999 est.)</GDP>
5568<Industries>petroleum, mining (particularly phosphate and iron ore), tourism, textiles, footwear, food, beverages</Industries>
5569<Exports>$5.8 billion (f.o.b., 1999 est.)</Exports>
5570<Imports>$8.3 billion (c.i.f., 1999 est.)</Imports>
5571<Currency>1 Tunisian dinar (TD) = 1,000 millimes</Currency>
5572<Airports>32 (1999 est.)</Airports>
5573</record>
5574<record>
5575<Geographiccoordinates>39 00 N, 35 00 E</Geographiccoordinates>
5576<Area>780580</Area>
5577<Climate>temperate; hot, dry summers with mild, wet winters; harsher in interior</Climate>
5578<Naturalresources>antimony, coal, chromium, mercury, copper, borate, sulfur, iron ore, arable land, hydropower</Naturalresources>
5579<Population>65666677</Population>
5580<Populationgrowthrate>1.27% (2000 est.)</Populationgrowthrate>
5581<Sexratio>
5582at birth: 1.05 male(s)/female
5583under 15 years: 1.04 male(s)/female
558415-64 years: 1.03 male(s)/female
558565 years and over: 0.85 male(s)/female
5586total population: 1.02 male(s)/female (2000 est.)</Sexratio>
5587<Religions>Muslim 99.8% (mostly Sunni), other 0.2% (Christian and Jews)</Religions>
5588<Countryname>Turkey </Countryname>
5589<Capital>Ankara</Capital>
5590<Flagdescription>red with a vertical white crescent (the closed portion is toward the hoist side) and white five-pointed star centered just outside the crescent opening</Flagdescription>
5591<GDP>purchasing power parity - $409.4 billion (1999 est.)</GDP>
5592<Industries>textiles, food processing, autos, mining (coal, chromite, copper, boron), steel, petroleum, construction, lumber, paper</Industries>
5593<Exports>$26 billion (f.o.b., 1999 est.)</Exports>
5594<Imports>$40 billion (c.i.f., 1999 est.)</Imports>
5595<Currency>Turkish lira (TL) = 100 kurus (theoretical)</Currency>
5596<Airports>118 (1999 est.)</Airports>
5597<Illicitdrugs>key transit route for Southwest Asian heroin to Western Europe and - to a far lesser extent the US - via air, land, and sea routes; major Turkish, Iranian, and other international trafficking organizations operate out of Istanbul; laboratories to convert imported morphine base into heroin are in remote regions of Turkey as well as near Istanbul; government maintains strict controls over areas of legal opium poppy cultivation and output of poppy straw concentrate</Illicitdrugs>
5598</record>
5599<record>
5600<Location>Oceania, island group consisting of nine coral atolls in the South Pacific Ocean, about one-half of the way from Hawaii to Australia</Location>
5601<Geographiccoordinates>8 00 S, 178 00 E</Geographiccoordinates>
5602<Area>26</Area>
5603<Climate>tropical; moderated by easterly trade winds (March to November); westerly gales and heavy rain (November to March)</Climate>
5604<Naturalresources>fish</Naturalresources>
5605<Population>10838</Population>
5606<Populationgrowthrate>1.41% (2000 est.)</Populationgrowthrate>
5607<Sexratio>
5608at birth: 1.05 male(s)/female
5609under 15 years: 1.04 male(s)/female
561015-64 years: 0.91 male(s)/female
561165 years and over: 0.75 male(s)/female
5612total population: 0.94 male(s)/female (2000 est.)</Sexratio>
5613<Religions>Church of Tuvalu (Congregationalist) 97%, Seventh-Day Adventist 1.4%, Baha'i 1%, other 0.6%</Religions>
5614<Countryname>Tuvalu </Countryname>
5615<Capital>Funafuti</Capital>
5616<Flagdescription>light blue with the flag of the UK in the upper hoist-side quadrant; the outer half of the flag represents a map of the country with nine yellow five-pointed stars symbolizing the nine islands</Flagdescription>
5617<GDP>purchasing power parity - $7.8 million (1995 est.)</GDP>
5618<Industries>fishing, tourism, copra</Industries>
5619<Exports>$165,000 (f.o.b., 1989)</Exports>
5620<Imports>$4.4 million (c.i.f., 1989)</Imports>
5621<Currency>1 Tuvaluan dollar ($T) or 1 Australian dollar ($A) = 100 cents</Currency>
5622<Airports>1 (1999 est.)</Airports>
5623</record>
5624<record>
5625<Location>Eastern Asia, islands bordering the East China Sea, Philippine Sea, South China Sea, and Taiwan Strait, north of the Philippines, off the southeastern coast of China</Location>
5626<Geographiccoordinates>23 30 N, 121 00 E</Geographiccoordinates>
5627<Area>35980</Area>
5628<Climate>tropical; marine; rainy season during southwest monsoon (June to August); cloudiness is persistent and extensive all year</Climate>
5629<Naturalresources>small deposits of coal, natural gas, limestone, marble, and asbestos</Naturalresources>
5630<Population>22191087</Population>
5631<Populationgrowthrate>0.81% (2000 est.)</Populationgrowthrate>
5632<Sexratio>
5633at birth: 1.08 male(s)/female
5634under 15 years: 1.08 male(s)/female
563515-64 years: 1.03 male(s)/female
563665 years and over: 1.12 male(s)/female
5637total population: 1.05 male(s)/female (2000 est.)</Sexratio>
5638<Religions>mixture of Buddhist, Confucian, and Taoist 93%, Christian 4.5%, other 2.5%</Religions>
5639<Countryname>Taiwan </Countryname>
5640<Capital>Taipei</Capital>
5641<Flagdescription>red with a dark blue rectangle in the upper hoist-side corner bearing a white sun with 12 triangular rays</Flagdescription>
5642<GDP>purchasing power parity - $357 billion (1999 est.)</GDP>
5643<Industries>electronics, petroleum refining, chemicals, textiles, iron and steel, machinery, cement, food processing</Industries>
5644<Exports>$121.6 billion (f.o.b., 1999)</Exports>
5645<Imports>$101.7 billion (c.i.f., 1999)</Imports>
5646<Currency>1 New Taiwan dollar (NT$) = 100 cents</Currency>
5647<Airports>38 (1999 est.)</Airports>
5648<Illicitdrugs>considered an important heroin transit point; major problem with domestic consumption of methamphetamines and heroin</Illicitdrugs>
5649</record>
5650<record>
5651<Location>Central Asia, bordering the Caspian Sea, between Iran and Kazakhstan</Location>
5652<Geographiccoordinates>40 00 N, 60 00 E</Geographiccoordinates>
5653<Area>488100</Area>
5654<Climate>subtropical desert</Climate>
5655<Naturalresources>petroleum, natural gas, coal, sulfur, salt</Naturalresources>
5656<Population>4518268</Population>
5657<Populationgrowthrate>1.87% (2000 est.)</Populationgrowthrate>
5658<Sexratio>
5659at birth: 1.05 male(s)/female
5660under 15 years: 1.04 male(s)/female
566115-64 years: 0.97 male(s)/female
566265 years and over: 0.62 male(s)/female
5663total population: 0.98 male(s)/female (2000 est.)</Sexratio>
5664<Religions>Muslim 89%, Eastern Orthodox 9%, unknown 2%</Religions>
5665<Countryname>Turkmenistan </Countryname>
5666<Capital>Ashgabat</Capital>
5667<Flagdescription>green field with a vertical red stripe near the hoist side, containing five carpet guls (designs used in producing rugs) stacked above two crossed olive branches similar to the olive branches on the UN flag; a white crescent moon and five white stars appear in the upper corner of the field just to the fly side of the red stripe</Flagdescription>
5668<GDP>purchasing power parity - $7.7 billion (1999 est.)</GDP>
5669<Industries>natural gas, oil, petroleum products, textiles, food processing</Industries>
5670<Exports>$1.1 billion (1999 est.)</Exports>
5671<Imports>$1.25 billion (1999 est.)</Imports>
5672<Currency>1 Turkmen manat (TMM) = 100 tenesi</Currency>
5673<Airports>64 (1994 est.)</Airports>
5674<Illicitdrugs>limited illicit cultivator of opium poppy, mostly for domestic consumption; limited government eradication program; increasingly used as transshipment point for illicit drugs from Southwest Asia to Russia and Western Europe; also a transshipment point for acetic anhydride destined for Afghanistan</Illicitdrugs>
5675</record>
5676<record>
5677<Location>Eastern Africa, bordering the Indian Ocean, between Kenya and Mozambique</Location>
5678<Geographiccoordinates>6 00 S, 35 00 E</Geographiccoordinates>
5679<Area>945087</Area>
5680<Climate>varies from tropical along coast to temperate in highlands</Climate>
5681<Naturalresources>hydropower, tin, phosphates, iron ore, coal, diamonds, gemstones, gold, natural gas, nickel</Naturalresources>
5682<Population>35306126</Population>
5683<Populationgrowthrate>2.57% (2000 est.)</Populationgrowthrate>
5684<Sexratio>
5685at birth: 1.03 male(s)/female
5686under 15 years: 1.01 male(s)/female
568715-64 years: 0.98 male(s)/female
568865 years and over: 0.84 male(s)/female
5689total population: 0.99 male(s)/female (2000 est.)</Sexratio>
5690<Religions>mainland - Christian 45%, Muslim 35%, indigenous beliefs 20%; Zanzibar - more than 99% Muslim</Religions>
5691<Countryname>Tanzania </Countryname>
5692<Capital>Dar es Salaam
5693note: some government offices have been transferred to Dodoma, which is planned as the new national capital; the National Assembly now meets there on regular basis</Capital>
5694<Flagdescription>divided diagonally by a yellow-edged black band from the lower hoist-side corner; the upper triangle (hoist side) is green and the lower triangle is blue</Flagdescription>
5695<GDP>purchasing power parity - $23.3 billion (1999 est.)</GDP>
5696<Industries>primarily agricultural processing (sugar, beer, cigarettes, sisal twine), diamond and gold mining, oil refining, shoes, cement, textiles, wood products, fertilizer, salt</Industries>
5697<Exports>$828 million (f.o.b., 1999 est.)</Exports>
5698<Imports>$1.44 billion (f.o.b., 1999 est.)</Imports>
5699<Currency>1 Tanzanian shilling (TSh) = 100 cents</Currency>
5700<Airports>129 (1999 est.)</Airports>
5701<Illicitdrugs>growing role in transshipment of Southwest and Southeast Asian heroin and South American cocaine destined for European and US markets and of South Asian methaqualone bound for Southern Africa</Illicitdrugs>
5702</record>
5703<record>
5704<Location>Eastern Africa, west of Kenya</Location>
5705<Geographiccoordinates>1 00 N, 32 00 E</Geographiccoordinates>
5706<Area>236040</Area>
5707<Climate>tropical; generally rainy with two dry seasons (December to February, June to August); semiarid in northeast</Climate>
5708<Naturalresources>copper, cobalt, hydropower, limestone, salt, arable land</Naturalresources>
5709<Population>23317560</Population>
5710<Populationgrowthrate>2.72% (2000 est.)</Populationgrowthrate>
5711<Sexratio>
5712at birth: 1.03 male(s)/female
5713under 15 years: 1.01 male(s)/female
571415-64 years: 1 male(s)/female
571565 years and over: 0.92 male(s)/female
5716total population: 1 male(s)/female (2000 est.)</Sexratio>
5717<Religions>Roman Catholic 33%, Protestant 33%, Muslim 16%, indigenous beliefs 18%</Religions>
5718<Countryname>Uganda </Countryname>
5719<Capital>Kampala</Capital>
5720<Flagdescription>six equal horizontal bands of black (top), yellow, red, black, yellow, and red; a white disk is superimposed at the center and depicts a red-crested crane (the national symbol) facing the hoist side</Flagdescription>
5721<GDP>purchasing power parity - $24.2 billion (1999 est.)</GDP>
5722<Industries>sugar, brewing, tobacco, cotton textiles, cement</Industries>
5723<Exports>$471 million (f.o.b., 1999)</Exports>
5724<Imports>$1.1 billion (f.o.b., 1999)</Imports>
5725<Currency>1 Ugandan shilling (USh) = 100 cents</Currency>
5726<Airports>26 (1999 est.)</Airports>
5727</record>
5728<record>
5729<Location>Western Europe, islands including the northern one-sixth of the island of Ireland between the North Atlantic Ocean and the North Sea, northwest of France</Location>
5730<Geographiccoordinates>54 00 N, 2 00 W</Geographiccoordinates>
5731<Area>244820</Area>
5732<Climate>temperate; moderated by prevailing southwest winds over the North Atlantic Current; more than one-half of the days are overcast</Climate>
5733<Naturalresources>coal, petroleum, natural gas, tin, limestone, iron ore, salt, clay, chalk, gypsum, lead, silica, arable land</Naturalresources>
5734<Population>59511464</Population>
5735<Populationgrowthrate>0.25% (2000 est.)</Populationgrowthrate>
5736<Sexratio>
5737at birth: 1.05 male(s)/female
5738under 15 years: 1.05 male(s)/female
573915-64 years: 1.02 male(s)/female
574065 years and over: 0.71 male(s)/female
5741total population: 0.97 male(s)/female (2000 est.)</Sexratio>
5742<Religions>Anglican 27 million, Roman Catholic 9 million, Muslim 1 million, Presbyterian 800,000, Methodist 760,000, Sikh 400,000, Hindu 350,000, Jewish 300,000 (1991 est.)</Religions>
5743<Countryname>United Kingdom </Countryname>
5744<Capital>London</Capital>
5745<Flagdescription>blue with the red cross of Saint George (patron saint of England) edged in white superimposed on the diagonal red cross of Saint Patrick (patron saint of Ireland) and which is superimposed on the diagonal white cross of Saint Andrew (patron saint of Scotland); known as the Union Flag or Union Jack; the design and colors (especially the Blue Ensign) have been the basis for a number of other flags including other Commonwealth countries and their constituent states or provinces, as well as British overseas territories</Flagdescription>
5746<GDP>purchasing power parity - $1.29 trillion (1999 est.)</GDP>
5747<Industries>production machinery including machine tools, electric power equipment, automation equipment, railroad equipment, shipbuilding, aircraft, motor vehicles and parts, electronics and communications equipment, metals, chemicals, coal, petroleum, paper and paper products, food processing, textiles, clothing, and other consumer goods</Industries>
5748<Exports>$271 billion (f.o.b., 1998)</Exports>
5749<Imports>$305.9 billion (f.o.b., 1998)</Imports>
5750<Currency>1 British pound = 100 pence</Currency>
5751<Airports>498 (1999 est.)</Airports>
5752<Illicitdrugs>gateway country for Latin American cocaine entering the European market; producer and major consumer of synthetic drugs, synthetic precursor chemicals; major consumer of Southwest Asian heroin; money-laundering center</Illicitdrugs>
5753</record>
5754<record>
5755<Location>Eastern Europe, bordering the Black Sea, between Poland and Russia</Location>
5756<Geographiccoordinates>49 00 N, 32 00 E</Geographiccoordinates>
5757<Area>603700</Area>
5758<Climate>temperate continental; Mediterranean only on the southern Crimean coast; precipitation disproportionately distributed, highest in west and north, lesser in east and southeast; winters vary from cool along the Black Sea to cold farther inland; summers are warm across the greater part of the country, hot in the south</Climate>
5759<Naturalresources>iron ore, coal, manganese, natural gas, oil, salt, sulfur, graphite, titanium, magnesium, kaolin, nickel, mercury, timber, arable land</Naturalresources>
5760<Population>49153027</Population>
5761<Populationgrowthrate>-0.83% (2000 est.)</Populationgrowthrate>
5762<Sexratio>
5763at birth: 1.05 male(s)/female
5764under 15 years: 1.04 male(s)/female
576515-64 years: 0.91 male(s)/female
576665 years and over: 0.49 male(s)/female
5767total population: 0.86 male(s)/female (2000 est.)</Sexratio>
5768<Religions>Ukrainian Orthodox - Moscow Patriarchate, Ukrainian Orthodox - Kiev Patriarchate, Ukrainian Autocephalous Orthodox, Ukrainian Catholic (Uniate), Protestant, Jewish</Religions>
5769<Countryname>Ukraine </Countryname>
5770<Capital>Kiev (Kyyiv)</Capital>
5771<Flagdescription>two equal horizontal bands of azure (top) and golden yellow represent grainfields under a blue sky</Flagdescription>
5772<GDP>purchasing power parity - $109.5 billion (1999 est.)</GDP>
5773<Industries>coal, electric power, ferrous and nonferrous metals, machinery and transport equipment, chemicals, food-processing (especially sugar)</Industries>
5774<Exports>$11.6 billion (1999 est.)</Exports>
5775<Imports>$11.8 billion (1999 est.)</Imports>
5776<Currency>1 hryvna = 100 kopiykas</Currency>
5777<Airports>706 (1994 est.)</Airports>
5778<Illicitdrugs>limited cultivation of cannabis and opium poppy, mostly for CIS consumption; some synthetic drug production for export to West; limited government eradication program; used as transshipment point for opiates and other illicit drugs from Africa, Latin America, and Turkey, and to Europe and Russia; drug-related money laundering a minor, but growing, problem</Illicitdrugs>
5779</record>
5780<record>
5781<Location>North America, bordering both the North Atlantic Ocean and the North Pacific Ocean, between Canada and Mexico</Location>
5782<Geographiccoordinates>38 00 N, 97 00 W</Geographiccoordinates>
5783<Area>9629091</Area>
5784<Climate>mostly temperate, but tropical in Hawaii and Florida, arctic in Alaska, semiarid in the great plains west of the Mississippi River, and arid in the Great Basin of the southwest; low winter temperatures in the northwest are ameliorated occasionally in January and February by warm chinook winds from the eastern slopes of the Rocky Mountains</Climate>
5785<Naturalresources>coal, copper, lead, molybdenum, phosphates, uranium, bauxite, gold, iron, mercury, nickel, potash, silver, tungsten, zinc, petroleum, natural gas, timber</Naturalresources>
5786<Population>275562673</Population>
5787<Populationgrowthrate>0.91% (2000 est.)</Populationgrowthrate>
5788<Sexratio>
5789at birth: 1.05 male(s)/female
5790under 15 years: 1.05 male(s)/female
579115-64 years: 0.98 male(s)/female
579265 years and over: 0.71 male(s)/female
5793total population: 0.96 male(s)/female (2000 est.)</Sexratio>
5794<Religions>Protestant 56%, Roman Catholic 28%, Jewish 2%, other 4%, none 10% (1989)</Religions>
5795<Countryname>United States </Countryname>
5796<Capital>Washington, DC</Capital>
5797<Flagdescription>thirteen equal horizontal stripes of red (top and bottom) alternating with white; there is a blue rectangle in the upper hoist-side corner bearing 50 small, white, five-pointed stars arranged in nine offset horizontal rows of six stars (top and bottom) alternating with rows of five stars; the 50 stars represent the 50 states, the 13 stripes represent the 13 original colonies; known as Old Glory; the design and colors have been the basis for a number of other flags, including Chile, Liberia, Malaysia, and Puerto Rico</Flagdescription>
5798<GDP>purchasing power parity - $9.255 trillion (1999 est.)</GDP>
5799<Industries>leading industrial power in the world, highly diversified and technologically advanced; petroleum, steel, motor vehicles, aerospace, telecommunications, chemicals, electronics, food processing, consumer goods, lumber, mining</Industries>
5800<Exports>$663 billion (f.o.b., 1998 est.)</Exports>
5801<Imports>$912 billion (c.i.f., 1998 est.)</Imports>
5802<Currency>1 United States dollar (US$) = 100 cents</Currency>
5803<Airports>14,572 (1999 est.)</Airports>
5804<Illicitdrugs>consumer of cocaine shipped from Colombia through Mexico and the Caribbean; consumer of heroin, marijuana, and increasingly methamphetamines from Mexico; consumer of high-quality Southeast Asian heroin; illicit producer of cannabis, marijuana, depressants, stimulants, hallucinogens, and methamphetamines; drug-money-laundering center</Illicitdrugs>
5805</record>
5806<record>
5807<Location>Western Africa, north of Ghana</Location>
5808<Geographiccoordinates>13 00 N, 2 00 W</Geographiccoordinates>
5809<Area>274200</Area>
5810<Climate>tropical; warm, dry winters; hot, wet summers</Climate>
5811<Naturalresources>manganese, limestone, marble; small deposits of gold, antimony, copper, nickel, bauxite, lead, phosphates, zinc, silver</Naturalresources>
5812<Population>11946065</Population>
5813<Populationgrowthrate>2.71% (2000 est.)</Populationgrowthrate>
5814<Sexratio>
5815at birth: 1.03 male(s)/female
5816under 15 years: 1.02 male(s)/female
581715-64 years: 0.91 male(s)/female
581865 years and over: 0.74 male(s)/female
5819total population: 0.95 male(s)/female (2000 est.)</Sexratio>
5820<Religions>indigenous beliefs 40%, Muslim 50%, Christian (mainly Roman Catholic) 10%</Religions>
5821<Countryname>Burkina Faso </Countryname>
5822<Capital>Ouagadougou</Capital>
5823<Flagdescription>two equal horizontal bands of red (top) and green with a yellow five-pointed star in the center; uses the popular pan-African colors of Ethiopia</Flagdescription>
5824<GDP>purchasing power parity - $12.4 billion (1999 est.)</GDP>
5825<Industries>cotton lint, beverages, agricultural processing, soap, cigarettes, textiles, gold</Industries>
5826<Exports>$311 million (f.o.b., 1998 est.)</Exports>
5827<Imports>$572 million (f.o.b., 1998 est.)</Imports>
5828<Currency>1 Communaute Financiere Africaine franc (CFAF) = 100 centimes</Currency>
5829<Airports>33 (1999 est.)</Airports>
5830</record>
5831<record>
5832<Location>Southern South America, bordering the South Atlantic Ocean, between Argentina and Brazil</Location>
5833<Geographiccoordinates>33 00 S, 56 00 W</Geographiccoordinates>
5834<Area>176220</Area>
5835<Climate>warm temperate; freezing temperatures almost unknown</Climate>
5836<Naturalresources>arable land, hydropower, minor minerals, fisheries</Naturalresources>
5837<Population>3334074</Population>
5838<Populationgrowthrate>0.77% (2000 est.)</Populationgrowthrate>
5839<Sexratio>
5840at birth: 1.06 male(s)/female
5841under 15 years: 1.05 male(s)/female
584215-64 years: 0.97 male(s)/female
584365 years and over: 0.7 male(s)/female
5844total population: 0.95 male(s)/female (2000 est.)</Sexratio>
5845<Religions>Roman Catholic 66% (less than one-half of the adult population attends church regularly), Protestant 2%, Jewish 2%, nonprofessing or other 30%</Religions>
5846<Countryname>Uruguay </Countryname>
5847<Capital>Montevideo</Capital>
5848<Flagdescription>nine equal horizontal stripes of white (top and bottom) alternating with blue; there is a white square in the upper hoist-side corner with a yellow sun bearing a human face known as the Sun of May and 16 rays alternately triangular and wavy</Flagdescription>
5849<GDP>purchasing power parity - $28 billion (1999 est.)</GDP>
5850<Industries>food processing, electrical machinery, transportation equipment, petroleum products, textiles, chemicals, beverages</Industries>
5851<Exports>$2.1 billion (f.o.b., 1999 est.)</Exports>
5852<Imports>$3.4 billion (f.o.b., 1999 est.)</Imports>
5853<Currency>1 Uruguayan peso ($Ur) = 100 centesimos</Currency>
5854<Airports>65 (1999 est.)</Airports>
5855</record>
5856<record>
5857<Location>Central Asia, north of Afghanistan</Location>
5858<Geographiccoordinates>41 00 N, 64 00 E</Geographiccoordinates>
5859<Area>447400</Area>
5860<Climate>mostly midlatitude desert, long, hot summers, mild winters; semiarid grassland in east</Climate>
5861<Naturalresources>natural gas, petroleum, coal, gold, uranium, silver, copper, lead and zinc, tungsten, molybdenum</Naturalresources>
5862<Population>24755519</Population>
5863<Populationgrowthrate>1.6% (2000 est.)</Populationgrowthrate>
5864<Sexratio>
5865at birth: 1.05 male(s)/female
5866under 15 years: 1.03 male(s)/female
586715-64 years: 0.98 male(s)/female
586865 years and over: 0.66 male(s)/female
5869total population: 0.98 male(s)/female (2000 est.)</Sexratio>
5870<Religions>Muslim 88% (mostly Sunnis), Eastern Orthodox 9%, other 3%</Religions>
5871<Countryname>Uzbekistan </Countryname>
5872<Capital>Tashkent (Toshkent)</Capital>
5873<Flagdescription>three equal horizontal bands of blue (top), white, and green separated by red fimbriations with a white crescent moon and 12 white stars in the upper hoist-side quadrant</Flagdescription>
5874<GDP>purchasing power parity - $59.3 billion (1999 est.)</GDP>
5875<Industries>textiles, food processing, machine building, metallurgy, natural gas</Industries>
5876<Exports>$2.9 billion (1999 est.)</Exports>
5877<Imports>$3.1 billion (1999 est.)</Imports>
5878<Currency>Uzbekistani som (UKS)</Currency>
5879<Airports>3 (1997 est.)</Airports>
5880<Illicitdrugs>limited illicit cultivation of cannabis and very small amounts of opium poppy, mostly for domestic consumption, almost entirely eradicated by an effective government eradication program; increasingly used as transshipment point for illicit drugs from Afghanistan to Russia and Western Europe and for acetic anhydride destined for Afghanistan</Illicitdrugs>
5881</record>
5882<record>
5883<Location>Caribbean, islands in the Caribbean Sea, north of Trinidad and Tobago</Location>
5884<Geographiccoordinates>13 15 N, 61 12 W</Geographiccoordinates>
5885<Area>389</Area>
5886<Climate>tropical; little seasonal temperature variation; rainy season (May to November)</Climate>
5887<Naturalresources>hydropower, cropland</Naturalresources>
5888<Population>115461</Population>
5889<Populationgrowthrate>0.43% (2000 est.)</Populationgrowthrate>
5890<Sexratio>
5891at birth: 1.03 male(s)/female
5892under 15 years: 1.04 male(s)/female
589315-64 years: 1.05 male(s)/female
589465 years and over: 0.75 male(s)/female
5895total population: 1.02 male(s)/female (2000 est.)</Sexratio>
5896<Religions>Anglican 47%, Methodist 28%, Roman Catholic 13%, Seventh-Day Adventist, Hindu, other Protestant</Religions>
5897<Countryname>Saint Vincent and the Grenadines </Countryname>
5898<Capital>Kingstown</Capital>
5899<Flagdescription>three vertical bands of blue (hoist side), gold (double width), and green; the gold band bears three green diamonds arranged in a V pattern</Flagdescription>
5900<GDP>purchasing power parity - $309 million (1999 est.)</GDP>
5901<Industries>food processing, cement, furniture, clothing, starch</Industries>
5902<Exports>$47.8 million (1998 est.)</Exports>
5903<Imports>$180 million (1998 est.)</Imports>
5904<Currency>1 East Caribbean dollar (EC$) = 100 cents</Currency>
5905<Airports>6 (1999 est.)</Airports>
5906<Illicitdrugs>transshipment point for South American drugs destined for the US and Europe</Illicitdrugs>
5907</record>
5908<record>
5909<Location>Northern South America, bordering the Caribbean Sea and the North Atlantic Ocean, between Colombia and Guyana</Location>
5910<Geographiccoordinates>8 00 N, 66 00 W</Geographiccoordinates>
5911<Area>912050</Area>
5912<Climate>tropical; hot, humid; more moderate in highlands</Climate>
5913<Naturalresources>petroleum, natural gas, iron ore, gold, bauxite, other minerals, hydropower, diamonds</Naturalresources>
5914<Population>23542649</Population>
5915<Populationgrowthrate>1.6% (2000 est.)</Populationgrowthrate>
5916<Sexratio>
5917at birth: 1.08 male(s)/female
5918under 15 years: 1.07 male(s)/female
591915-64 years: 1.01 male(s)/female
592065 years and over: 0.84 male(s)/female
5921total population: 1.02 male(s)/female (2000 est.)</Sexratio>
5922<Religions>nominally Roman Catholic 96%, Protestant 2%</Religions>
5923<Countryname>Venezuela </Countryname>
5924<Capital>Caracas</Capital>
5925<Flagdescription>three equal horizontal bands of yellow (top), blue, and red with the coat of arms on the hoist side of the yellow band and an arc of seven white five-pointed stars centered in the blue band</Flagdescription>
5926<GDP>purchasing power parity - $182.8 billion (1999 est.)</GDP>
5927<Industries>petroleum, iron ore mining, construction materials, food processing, textiles, steel, aluminum, motor vehicle assembly</Industries>
5928<Exports>$20.9 billion (f.o.b., 1999)</Exports>
5929<Imports>$11.8 billion (f.o.b., 1999)</Imports>
5930<Currency>1 bolivar (Bs) = 100 centimos</Currency>
5931<Airports>366 (1999 est.)</Airports>
5932<Illicitdrugs>illicit producer of opium for the international drug trade on a small scale; however, large quantities of cocaine and heroin transit the country from Colombia bound for US and Europe; important money-laundering hub; active eradication program primarily targeting opium; increasing signs of drug-related activities by Colombian insurgents on border</Illicitdrugs>
5933</record>
5934<record>
5935<Location>Caribbean, between the Caribbean Sea and the North Atlantic Ocean, east of Puerto Rico</Location>
5936<Geographiccoordinates>18 30 N, 64 30 W</Geographiccoordinates>
5937<Area>150</Area>
5938<Climate>subtropical; humid; temperatures moderated by trade winds</Climate>
5939<Naturalresources>NEGL</Naturalresources>
5940<Population>19615</Population>
5941<Populationgrowthrate>2.34% (2000 est.)</Populationgrowthrate>
5942<Sexratio>
5943at birth: 1.05 male(s)/female
5944under 15 years: 1.02 male(s)/female
594515-64 years: 1.06 male(s)/female
594665 years and over: 1.2 male(s)/female
5947total population: 1.06 male(s)/female (2000 est.)</Sexratio>
5948<Religions>Protestant 86% (Methodist 45%, Anglican 21%, Church of God 7%, Seventh-Day Adventist 5%, Baptist 4%, Jehovah's Witnesses 2%, other 2%), Roman Catholic 6%, none 2%, other 6% (1981)</Religions>
5949<Countryname>British Virgin Islands </Countryname>
5950<Capital>Road Town</Capital>
5951<Flagdescription>blue, with the flag of the UK in the upper hoist-side quadrant and the Virgin Islander coat of arms centered in the outer half of the flag; the coat of arms depicts a woman flanked on either side by a vertical column of six oil lamps above a scroll bearing the Latin word VIGILATE (Be Watchful)</Flagdescription>
5952<GDP>purchasing power parity - $287 million (1999 est.)</GDP>
5953<Industries>tourism, light industry, construction, rum, concrete block, offshore financial center</Industries>
5954<Exports>$6 million (1998)</Exports>
5955<Imports>$175 million (1998)</Imports>
5956<Currency>1 United States dollar (US$) = 100 cents</Currency>
5957<Airports>3 (1999 est.)</Airports>
5958</record>
5959<record>
5960<Location>Southeastern Asia, bordering the Gulf of Thailand, Gulf of Tonkin, and South China Sea, alongside China, Laos, and Cambodia</Location>
5961<Geographiccoordinates>16 00 N, 106 00 E</Geographiccoordinates>
5962<Area>329560</Area>
5963<Climate>tropical in south; monsoonal in north with hot, rainy season (mid-May to mid-September) and warm, dry season (mid-October to mid-March)</Climate>
5964<Naturalresources>phosphates, coal, manganese, bauxite, chromate, offshore oil and gas deposits, forests, hydropower</Naturalresources>
5965<Population>78773873</Population>
5966<Populationgrowthrate>1.49% (2000 est.)</Populationgrowthrate>
5967<Sexratio>
5968at birth: 1.06 male(s)/female
5969under 15 years: 1.07 male(s)/female
597015-64 years: 0.95 male(s)/female
597165 years and over: 0.66 male(s)/female
5972total population: 0.97 male(s)/female (2000 est.)</Sexratio>
5973<Religions>Buddhist, Taoist, Roman Catholic, indigenous beliefs, Muslim, Protestant, Cao Dai, Hoa Hao</Religions>
5974<Countryname>Vietnam </Countryname>
5975<Capital>Hanoi</Capital>
5976<Flagdescription>red with a large yellow five-pointed star in the center</Flagdescription>
5977<GDP>purchasing power parity - $143.1 billion (1999 est.)</GDP>
5978<Industries>food processing, garments, shoes, machine building, mining, cement, chemical fertilizer, glass, tires, oil, coal, steel, paper</Industries>
5979<Exports>$11.5 billion (f.o.b., 1999 est.)</Exports>
5980<Imports>$11.6 billion (f.o.b., 1999 est.)</Imports>
5981<Currency>1 new dong (D) = 100 xu</Currency>
5982<Airports>48 (1999 est.)</Airports>
5983<Illicitdrugs>minor producer of opium poppy with 2,100 hectares cultivated in 1999, capable of producing 11 metric tons of opium; probably minor transit point for Southeast Asian heroin destined for the US and Europe; growing opium/heroin addiction; possible small-scale heroin production</Illicitdrugs>
5984</record>
5985<record>
5986<Location>Caribbean, islands between the Caribbean Sea and the North Atlantic Ocean, east of Puerto Rico</Location>
5987<Geographiccoordinates>18 20 N, 64 50 W</Geographiccoordinates>
5988<Area>352</Area>
5989<Climate>subtropical, tempered by easterly trade winds, relatively low humidity, little seasonal temperature variation; rainy season May to November</Climate>
5990<Naturalresources>sun, sand, sea, surf</Naturalresources>
5991<Population>120917</Population>
5992<Populationgrowthrate>1.07% (2000 est.)</Populationgrowthrate>
5993<Sexratio>
5994at birth: 1.06 male(s)/female
5995under 15 years: 1.06 male(s)/female
599615-64 years: 0.83 male(s)/female
599765 years and over: 0.76 male(s)/female
5998total population: 0.88 male(s)/female (2000 est.)</Sexratio>
5999<Religions>Baptist 42%, Roman Catholic 34%, Episcopalian 17%, other 7%</Religions>
6000<Countryname>Virgin Islands </Countryname>
6001<Capital>Charlotte Amalie</Capital>
6002<Flagdescription>white, with a modified US coat of arms in the center between the large blue initials V and I; the coat of arms shows a yellow eagle holding an olive branch in one talon and three arrows in the other with a superimposed shield of vertical red and white stripes below a blue panel</Flagdescription>
6003<GDP>purchasing power parity - $1.8 billion (1999 est.)</GDP>
6004<Industries>tourism, petroleum refining, watch assembly, rum distilling, construction, pharmaceuticals, textiles, electronics</Industries>
6005<Exports>$NA</Exports>
6006<Imports>$NA</Imports>
6007<Currency>1 United States dollar (US$) = 100 cents</Currency>
6008<Airports>2
6009note: international airports on Saint Thomas and Saint Croix (1999 est.)</Airports>
6010</record>
6011<record>
6012<Location>Southern Europe, an enclave of Rome (Italy)</Location>
6013<Geographiccoordinates>41 54 N, 12 27 E</Geographiccoordinates>
6014<Area>0</Area>
6015<Climate>temperate; mild, rainy winters (September to mid-May) with hot, dry summers (May to September)</Climate>
6016<Naturalresources>none</Naturalresources>
6017<Population>880</Population>
6018<Populationgrowthrate>1.15% (2000 est.)</Populationgrowthrate>
6019<Religions>Roman Catholic</Religions>
6020<Countryname>Holy See (Vatican City) </Countryname>
6021<Capital>Vatican City</Capital>
6022<Flagdescription>two vertical bands of yellow (hoist side) and white with the crossed keys of Saint Peter and the papal miter centered in the white band</Flagdescription>
6023<Industries>printing and production of a small amount of mosaics and staff uniforms; worldwide banking and financial activities</Industries>
6024<Currency>1 Vatican lira (VLit) = 100 centesimi</Currency>
6025<Airports>none</Airports>
6026</record>
6027<record>
6028<Location>Southern Africa, bordering the South Atlantic Ocean, between Angola and South Africa</Location>
6029<Geographiccoordinates>22 00 S, 17 00 E</Geographiccoordinates>
6030<Area>825418</Area>
6031<Climate>desert; hot, dry; rainfall sparse and erratic</Climate>
6032<Naturalresources>diamonds, copper, uranium, gold, lead, tin, lithium, cadmium, zinc, salt, vanadium, natural gas, hydropower, fish
6033note: suspected deposits of oil, coal, and iron ore</Naturalresources>
6034<Population>1771327</Population>
6035<Populationgrowthrate>1.57% (2000 est.)</Populationgrowthrate>
6036<Sexratio>
6037at birth: 1.03 male(s)/female
6038under 15 years: 1.03 male(s)/female
603915-64 years: 0.99 male(s)/female
604065 years and over: 0.76 male(s)/female
6041total population: 0.99 male(s)/female (2000 est.)</Sexratio>
6042<Religions>Christian 80% to 90% (Lutheran 50% at least), indigenous beliefs 10% to 20%</Religions>
6043<Countryname>Namibia </Countryname>
6044<Capital>Windhoek</Capital>
6045<Flagdescription>a large blue triangle with a yellow sunburst fills the upper left section and an equal green triangle (solid) fills the lower right section; the triangles are separated by a red stripe that is contrasted by two narrow white-edge borders</Flagdescription>
6046<GDP>purchasing power parity - $7.1 billion (1999 est.)</GDP>
6047<Industries>meat packing, fish processing, dairy products; mining (diamond, lead, zinc, tin, silver, tungsten, uranium, copper)</Industries>
6048<Exports>$1.4 billion (f.o.b., 1999 est.)</Exports>
6049<Imports>$1.5 billion (f.o.b., 1999 est.)</Imports>
6050<Currency>1 Namibian dollar (N$) = 100 cents</Currency>
6051<Airports>135 (1999 est.)</Airports>
6052</record>
6053<record>
6054<Location>Middle East, west of Jordan</Location>
6055<Geographiccoordinates>32 00 N, 35 15 E</Geographiccoordinates>
6056<Area>5860</Area>
6057<Climate>temperate, temperature and precipitation vary with altitude, warm to hot summers, cool to mild winters</Climate>
6058<Naturalresources>arable land</Naturalresources>
6059<Population>2020298</Population>
6060<Populationgrowthrate>3.38% (2000 est.)</Populationgrowthrate>
6061<Sexratio>
6062at birth: 1.05 male(s)/female
6063under 15 years: 1.05 male(s)/female
606415-64 years: 1.04 male(s)/female
606565 years and over: 0.78 male(s)/female
6066total population: 1.03 male(s)/female (2000 est.)</Sexratio>
6067<Religions>Muslim 75% (predominantly Sunni), Jewish 17%, Christian and other 8%</Religions>
6068<Countryname>West Bank </Countryname>
6069<GDP>purchasing power parity - $3.3 billion (1999 est.)</GDP>
6070<Industries>generally small family businesses that produce cement, textiles, soap, olive-wood carvings, and mother-of-pearl souvenirs; the Israelis have established some small-scale, modern industries in the settlements and industrial centers</Industries>
6071<Exports>$682 million (includes Gaza Strip) (f.o.b., 1998 est.)</Exports>
6072<Imports>$2.5 billion (includes Gaza Strip) (c.i.f., 1998 est.)</Imports>
6073<Currency>1 new Israeli shekel (NIS) = 100 new agorot; 1 Jordanian dinar (JD) = 1,000 fils</Currency>
6074<Airports>2 (1999 est.)</Airports>
6075</record>
6076<record>
6077<Location>Oceania, islands in the South Pacific Ocean, about two-thirds of the way from Hawaii to New Zealand</Location>
6078<Geographiccoordinates>13 18 S, 176 12 W</Geographiccoordinates>
6079<Area>274</Area>
6080<Climate>tropical; hot, rainy season (November to April); cool, dry season (May to October); rains 2,500-3,000 mm per year (80% humidity); average temperature 26.6 degrees C</Climate>
6081<Naturalresources>NEGL</Naturalresources>
6082<Population>15283</Population>
6083<Populationgrowthrate>NA%</Populationgrowthrate>
6084<Religions>Roman Catholic 100%</Religions>
6085<Countryname>Wallis and Futuna </Countryname>
6086<Capital>Mata-Utu (on Ile Uvea)</Capital>
6087<Flagdescription>a large white modified Maltese cross centered on a red background; the flag of France outlined in white on two sides is in the upper hoist quadrant; the flag of France is used for official occasions</Flagdescription>
6088<GDP>purchasing power parity - $28.7 million (1995 est.)</GDP>
6089<Industries>copra, handicrafts, fishing, lumber</Industries>
6090<Exports>$370,000 (f.o.b., 1995 est.)</Exports>
6091<Imports>$13.5 million (c.i.f., 1995 est.)</Imports>
6092<Currency>1 Comptoirs Francais du Pacifique franc (CFPF) = 100 centimes</Currency>
6093<Airports>2 (1999 est.)</Airports>
6094</record>
6095<record>
6096<Location>Northern Africa, bordering the North Atlantic Ocean, between Mauritania and Morocco</Location>
6097<Geographiccoordinates>24 30 N, 13 00 W</Geographiccoordinates>
6098<Area>266000</Area>
6099<Climate>hot, dry desert; rain is rare; cold offshore air currents produce fog and heavy dew</Climate>
6100<Naturalresources>phosphates, iron ore</Naturalresources>
6101<Population>244943</Population>
6102<Populationgrowthrate>2.29% (2000 est.)</Populationgrowthrate>
6103<Religions>Muslim</Religions>
6104<Countryname>Western Sahara </Countryname>
6105<Capital>none</Capital>
6106<GDP>purchasing power parity - $NA</GDP>
6107<Industries>phosphate mining, handicrafts</Industries>
6108<Exports>$NA</Exports>
6109<Imports>$NA</Imports>
6110<Currency>1 Moroccan dirham (DH) = 100 centimes</Currency>
6111<Airports>12 (1999 est.)</Airports>
6112</record>
6113<record>
6114<Location>Oceania, atoll in the North Pacific Ocean, about two-thirds of the way from Hawaii to the Northern Mariana Islands</Location>
6115<Geographiccoordinates>19 17 N, 166 36 E</Geographiccoordinates>
6116<Area>6</Area>
6117<Climate>tropical</Climate>
6118<Naturalresources>none</Naturalresources>
6119<Population></Population>
6120<Countryname>Wake Island </Countryname>
6121<Flagdescription>the flag of the US is used</Flagdescription>
6122<Airports>1 (1999 est.)</Airports>
6123</record>
6124<record>
6125<Location>Oceania, group of islands in the South Pacific Ocean, about one-half of the way from Hawaii to New Zealand</Location>
6126<Geographiccoordinates>13 35 S, 172 20 W</Geographiccoordinates>
6127<Area>2860</Area>
6128<Climate>tropical; rainy season (October to March), dry season (May to October)</Climate>
6129<Naturalresources>hardwood forests, fish, hydropower</Naturalresources>
6130<Population>179466</Population>
6131<Populationgrowthrate>-0.22% (2000 est.)</Populationgrowthrate>
6132<Sexratio>
6133at birth: 1.05 male(s)/female
6134under 15 years: 1.03 male(s)/female
613515-64 years: 1.72 male(s)/female
613665 years and over: 0.88 male(s)/female
6137total population: 1.39 male(s)/female (2000 est.)</Sexratio>
6138<Religions>Christian 99.7% (about one-half of population associated with the London Missionary Society; includes Congregational, Roman Catholic, Methodist, Latter-Day Saints, Seventh-Day Adventist)</Religions>
6139<Countryname>Samoa </Countryname>
6140<Capital>Apia</Capital>
6141<Flagdescription>red with a blue rectangle in the upper hoist-side quadrant bearing five white five-pointed stars representing the Southern Cross constellation</Flagdescription>
6142<GDP>purchasing power parity - $485 million (1998 est.)</GDP>
6143<Industries>timber, tourism, food processing, fishing</Industries>
6144<Exports>$20.3 million (f.o.b., 1998)</Exports>
6145<Imports>$96.6 million (f.o.b., 1998)</Imports>
6146<Currency>1 tala (WS$) = 100 sene</Currency>
6147<Airports>3 (1999 est.)</Airports>
6148</record>
6149<record>
6150<Location>Southern Africa, between Mozambique and South Africa</Location>
6151<Geographiccoordinates>26 30 S, 31 30 E</Geographiccoordinates>
6152<Area>17363</Area>
6153<Climate>varies from tropical to near temperate</Climate>
6154<Naturalresources>asbestos, coal, clay, cassiterite, hydropower, forests, small gold and diamond deposits, quarry stone, and talc</Naturalresources>
6155<Population>1083289</Population>
6156<Populationgrowthrate>2.02% (2000 est.)</Populationgrowthrate>
6157<Sexratio>
6158at birth: 1.03 male(s)/female
6159under 15 years: 0.99 male(s)/female
616015-64 years: 0.93 male(s)/female
616165 years and over: 0.7 male(s)/female
6162total population: 0.95 male(s)/female (2000 est.)</Sexratio>
6163<Religions>Christian 60%, indigenous beliefs 40%</Religions>
6164<Countryname>Swaziland </Countryname>
6165<Capital>Mbabane; note - Lobamba is the royal and legislative capital</Capital>
6166<Flagdescription>three horizontal bands of blue (top), red (triple width), and blue; the red band is edged in yellow; centered in the red band is a large black and white shield covering two spears and a staff decorated with feather tassels, all placed horizontally</Flagdescription>
6167<GDP>purchasing power parity - $4.2 billion (1999 est.)</GDP>
6168<Industries>mining (coal and asbestos), wood pulp, sugar, soft drink concentrates</Industries>
6169<Exports>$825 million (f.o.b., 1999)</Exports>
6170<Imports>$1.05 billion (f.o.b., 1999)</Imports>
6171<Currency>1 lilangeni (E) = 100 cents</Currency>
6172<Airports>18 (1999 est.)</Airports>
6173</record>
6174<record>
6175<Location>body of water between Africa, the Southern Ocean, Asia, and Australia</Location>
6176<Geographiccoordinates>20 00 S, 80 00 E</Geographiccoordinates>
6177<Area>68000000</Area>
6178<Climate>northeast monsoon (December to April), southwest monsoon (June to October); tropical cyclones occur during May/June and October/November in the northern Indian Ocean and January/February in the southern Indian Ocean</Climate>
6179<Naturalresources>oil and gas fields, fish, shrimp, sand and gravel aggregates, placer deposits, polymetallic nodules</Naturalresources>
6180</record>
6181<record>
6182<Location>body of water mostly north of the Arctic Circle</Location>
6183<Geographiccoordinates>90 00 N, 0 00 E</Geographiccoordinates>
6184<Area>14000000</Area>
6185<Climate>polar climate characterized by persistent cold and relatively narrow annual temperature ranges; winters characterized by continuous darkness, cold and stable weather conditions, and clear skies; summers characterized by continuous daylight, damp and foggy weather, and weak cyclones with rain or snow</Climate>
6186<Naturalresources>sand and gravel aggregates, placer deposits, polymetallic nodules, oil and gas fields, fish, marine mammals (seals and whales)</Naturalresources>
6187</record>
6188<record>
6189<Location>Middle East, bordering the Arabian Sea, Gulf of Aden, and Red Sea, between Oman and Saudi Arabia</Location>
6190<Geographiccoordinates>15 00 N, 48 00 E</Geographiccoordinates>
6191<Area>527970</Area>
6192<Climate>mostly desert; hot and humid along west coast; temperate in western mountains affected by seasonal monsoon; extraordinarily hot, dry, harsh desert in east</Climate>
6193<Naturalresources>petroleum, fish, rock salt, marble, small deposits of coal, gold, lead, nickel, and copper, fertile soil in west</Naturalresources>
6194<Population>17479206</Population>
6195<Populationgrowthrate>3.36% (2000 est.)</Populationgrowthrate>
6196<Sexratio>
6197at birth: 1.05 male(s)/female
6198under 15 years: 1.04 male(s)/female
619915-64 years: 1.05 male(s)/female
620065 years and over: 1.04 male(s)/female
6201total population: 1.04 male(s)/female (2000 est.)</Sexratio>
6202<Religions>Muslim including Shaf'i (Sunni) and Zaydi (Shi'a), small numbers of Jewish, Christian, and Hindu</Religions>
6203<Countryname>Yemen </Countryname>
6204<Capital>Sanaa</Capital>
6205<Flagdescription>three equal horizontal bands of red (top), white, and black; similar to the flag of Syria which has two green stars and of Iraq which has three green stars (plus an Arabic inscription) in a horizontal line centered in the white band; also similar to the flag of Egypt which has a heraldic eagle centered in the white band</Flagdescription>
6206<GDP>purchasing power parity - $12.7 billion (1999 est.)</GDP>
6207<Industries>crude oil production and petroleum refining; small-scale production of cotton textiles and leather goods; food processing; handicrafts; small aluminum products factory; cement</Industries>
6208<Exports>$2 billion (f.o.b., 1999 est.)</Exports>
6209<Imports>$2.3 billion (f.o.b., 1999 est.)</Imports>
6210<Currency>Yemeni rial (YER) = 100 fils</Currency>
6211<Airports>50 (1999 est.)</Airports>
6212</record>
6213<record>
6214<Location>Southern Africa, east of Angola</Location>
6215<Geographiccoordinates>15 00 S, 30 00 E</Geographiccoordinates>
6216<Area>752614</Area>
6217<Climate>tropical; modified by altitude; rainy season (October to April)</Climate>
6218<Naturalresources>copper, cobalt, zinc, lead, coal, emeralds, gold, silver, uranium, hydropower</Naturalresources>
6219<Population>9582418</Population>
6220<Populationgrowthrate>1.95% (2000 est.)</Populationgrowthrate>
6221<Sexratio>
6222at birth: 1.03 male(s)/female
6223under 15 years: 1.01 male(s)/female
622415-64 years: 0.98 male(s)/female
622565 years and over: 0.79 male(s)/female
6226total population: 0.99 male(s)/female (2000 est.)</Sexratio>
6227<Religions>Christian 50%-75%, Muslim and Hindu 24%-49%, indigenous beliefs 1%</Religions>
6228<Countryname>Zambia </Countryname>
6229<Capital>Lusaka</Capital>
6230<Flagdescription>green with a panel of three vertical bands of red (hoist side), black, and orange below a soaring orange eagle, on the outer edge of the flag</Flagdescription>
6231<GDP>purchasing power parity - $8.5 billion (1999 est.)</GDP>
6232<Industries>copper mining and processing, construction, foodstuffs, beverages, chemicals, textiles, fertilizer</Industries>
6233<Exports>$900 million (f.o.b., 1999 est.)</Exports>
6234<Imports>$1.15 billion (f.o.b., 1999 est.)</Imports>
6235<Currency>1 Zambian kwacha (ZK) = 100 ngwee</Currency>
6236<Airports>112 (1999 est.)</Airports>
6237<Illicitdrugs>transshipment point for methaqualone, heroin, and cocaine bound for Southern Africa and Europe; regional money-laundering center</Illicitdrugs>
6238</record>
6239<record>
6240<Location>body of water between Africa, Europe, the Southern Ocean, and the Western Hemisphere</Location>
6241<Geographiccoordinates>0 00 N, 25 00 W</Geographiccoordinates>
6242<Area>76000000</Area>
6243<Climate>tropical cyclones (hurricanes) develop off the coast of Africa near Cape Verde and move westward into the Caribbean Sea; hurricanes can occur from May to December, but are most frequent from August to November</Climate>
6244<Naturalresources>oil and gas fields, fish, marine mammals (seals and whales), sand and gravel aggregates, placer deposits, polymetallic nodules, precious stones</Naturalresources>
6245</record>
6246<record>
6247<Location>Southern Africa, between South Africa and Zambia</Location>
6248<Geographiccoordinates>20 00 S, 30 00 E</Geographiccoordinates>
6249<Area>390580</Area>
6250<Climate>tropical; moderated by altitude; rainy season (November to March)</Climate>
6251<Naturalresources>coal, chromium ore, asbestos, gold, nickel, copper, iron ore, vanadium, lithium, tin, platinum group metals</Naturalresources>
6252<Population>11342521</Population>
6253<Populationgrowthrate>0.26% (2000 est.)</Populationgrowthrate>
6254<Sexratio>
6255at birth: 1.03 male(s)/female
6256under 15 years: 1.02 male(s)/female
625715-64 years: 1.02 male(s)/female
625865 years and over: 1.03 male(s)/female
6259total population: 1.02 male(s)/female (2000 est.)</Sexratio>
6260<Religions>syncretic (part Christian, part indigenous beliefs) 50%, Christian 25%, indigenous beliefs 24%, Muslim and other 1%</Religions>
6261<Countryname>Zimbabwe </Countryname>
6262<Capital>Harare</Capital>
6263<Flagdescription>seven equal horizontal bands of green, yellow, red, black, red, yellow, and green with a white isosceles triangle edged in black with its base on the hoist side; a yellow Zimbabwe bird is superimposed on a red five-pointed star in the center of the triangle</Flagdescription>
6264<GDP>purchasing power parity - $26.5 billion (1999 est.)</GDP>
6265<Industries>mining (coal, gold, copper, nickel, tin, clay, numerous metallic and nonmetallic ores), steel, wood products, cement, chemicals, fertilizer, clothing and footwear, foodstuffs, beverages</Industries>
6266<Exports>$2 billion (f.o.b., 1999 est.)</Exports>
6267<Imports>$2 billion (f.o.b., 1998 est.)</Imports>
6268<Currency>1 Zimbabwean dollar (Z$) = 100 cents</Currency>
6269<Airports>459 (1999 est.)</Airports>
6270<Illicitdrugs>significant transit point for African cannabis and South Asian heroin, mandrax, and methamphetamines destined for the South African and European markets</Illicitdrugs>
6271</record>
6272<record>
6273<Location>body of water between the Southern Ocean, Asia, Australia, and the Western Hemisphere</Location>
6274<Geographiccoordinates>0 00 N, 160 00 W</Geographiccoordinates>
6275<Area>155000000</Area>
6276<Climate>planetary air pressure systems and resultant wind patterns exhibit remarkable uniformity in the south and east; trade winds and westerly winds are well-developed patterns, modified by seasonal fluctuations; tropical cyclones (hurricanes) may form south of Mexico from June to October and affect Mexico and Central America; continental influences cause climatic uniformity to be much less pronounced in the eastern and western regions at the same latitude in the North Pacific Ocean; the western Pacific is monsoonal - a rainy season occurs during the summer months, when moisture-laden winds blow from the ocean over the land, and a dry season during the winter months, when dry winds blow from the Asian landmass back to the ocean; tropical cyclones (typhoons) may strike southeast and east Asia from May to December</Climate>
6277<Naturalresources>oil and gas fields, polymetallic nodules, sand and gravel aggregates, placer deposits, fish</Naturalresources>
6278</record>
6279</database>
diff --git a/noncore/apps/tableviewer/db/.cvsignore b/noncore/apps/tableviewer/db/.cvsignore
new file mode 100644
index 0000000..a433295
--- a/dev/null
+++ b/noncore/apps/tableviewer/db/.cvsignore
@@ -0,0 +1,3 @@
1moc_*
2Makefile
3
diff --git a/noncore/apps/tableviewer/db/common.cpp b/noncore/apps/tableviewer/db/common.cpp
new file mode 100644
index 0000000..4c70e54
--- a/dev/null
+++ b/noncore/apps/tableviewer/db/common.cpp
@@ -0,0 +1,1470 @@
1/**********************************************************************
2** Copyright (C) 2000 Trolltech AS. All rights reserved.
3**
4** This file is part of Qtopia Environment.
5**
6** This file may be distributed and/or modified under the terms of the
7** GNU General Public License version 2 as published by the Free Software
8** Foundation and appearing in the file LICENSE.GPL included in the
9** packaging of this file.
10**
11** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
12** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
13**
14** See http://www.trolltech.com/gpl/ for GPL licensing information.
15**
16** Contact info@trolltech.com if any conditions of this licensing are
17** not clear to you.
18**
19**********************************************************************/
20#include <stdlib.h>
21#include <qstring.h>
22#include <qheader.h>
23#include <qvector.h>
24#include <qdatetime.h>
25#include <timestring.h>
26#include "common.h"
27#include "datacache.h"
28#include <assert.h>
29
30static const int del_flag = 0x1;
31static const int new_flag = 0x2;
32
33/* Helper function */
34
35int parseNextNumber(QString *q) {
36 QChar c;
37 uint i;
38 int result = 0;
39
40 bool found_digits = FALSE;
41 for(i = 0; i < q->length(); i++) {
42 c = q->at(i);
43 if (c.isDigit()) {
44 if (found_digits)
45 result *= 10;
46 found_digits = TRUE;
47 result += c.digitValue();
48 } else {
49 if (found_digits)
50 break;
51 /* just skip this char */
52 }
53 }
54 /* now truncate q */
55 if (found_digits)
56 q->remove(0, i);
57 return result;
58}
59
60/*!
61 \class QStringVector
62 \brief A Vector of QStrings that can be sorted and searched
63
64 Implmented in order to allow reverse lookup on the string name
65
66*/
67
68/*!
69 This function implements the compare function in order to allow the
70 searching and sorting of the QStringVector to occur
71
72 \returns an int which is either
73 <UL>
74 <LI> < 0 if the first string is smaller than the second,</LI>
75 <LI> > 0 if the first string is bigger then the second,</LI>
76 <LI> == 0 if the first string is equal to the second.</LI>
77 </UL>
78*/
79int QStringVector::compareItems(Item a, Item b)
80{
81 QString *qa = (QString *)a;
82 QString *qb = (QString *)b;
83
84 return QString::compare(*qa, *qb);
85}
86
87/*!
88 \class TVVariant
89 A way of abstracting void * and keeping information on
90 the keytypes and behaviours in one place
91*/
92
93TVVariantPrivate::TVVariantPrivate()
94{
95 typ = TVVariant::Invalid;
96}
97
98TVVariantPrivate::TVVariantPrivate( TVVariantPrivate *d)
99{
100 switch(d->typ)
101 {
102 case TVVariant::Invalid:
103 break;
104 case TVVariant::String:
105 value.ptr = new QString(*((QString *)d->value.ptr));
106 break;
107 case TVVariant::Date:
108 value.ptr = new QDate(*((QDate *)d->value.ptr));
109 break;
110 case TVVariant::Time:
111 value.ptr = new QTime(*((QTime *)d->value.ptr));
112 break;
113 case TVVariant::Int:
114 value.i = d->value.i;
115 break;
116 default:
117 ASSERT( 0 );
118 }
119
120 typ = d->typ;
121}
122
123TVVariantPrivate::~TVVariantPrivate()
124{
125 clear();
126}
127
128void TVVariantPrivate::clear()
129{
130 switch( typ )
131 {
132 case TVVariant::String:
133 delete (QString *)value.ptr;
134 break;
135 case TVVariant::Date:
136 delete (QDate *)value.ptr;
137 break;
138 case TVVariant::Time:
139 delete (QTime *)value.ptr;
140 break;
141 case TVVariant::Invalid:
142 case TVVariant::Int:
143 break;
144 }
145
146 typ = TVVariant::Invalid;
147}
148
149/*!
150 \class TVVariant
151 blah
152*/
153
154TVVariant::TVVariant()
155{
156 d = new TVVariantPrivate;
157}
158
159TVVariant::~TVVariant()
160{
161 if (d->deref())
162 delete d;
163}
164
165TVVariant::TVVariant(const TVVariant& p)
166{
167 d = new TVVariantPrivate;
168 *this = p;
169}
170
171TVVariant::TVVariant(QDataStream& s)
172{
173 d = new TVVariantPrivate;
174 s >> *this;
175}
176
177TVVariant::TVVariant(const QString &val)
178{
179 d = new TVVariantPrivate;
180 d->typ = String;
181 d->value.ptr = new QString(val);
182}
183
184TVVariant::TVVariant(const QDate &val)
185{
186 d = new TVVariantPrivate;
187 d->typ = Date;
188 d->value.ptr = new QDate(val);
189}
190
191TVVariant::TVVariant(const QTime &val)
192{
193 d = new TVVariantPrivate;
194 d->typ = Time;
195 d->value.ptr = new QTime(val);
196}
197
198TVVariant::TVVariant( int val )
199{
200 d = new TVVariantPrivate;
201 d->typ = Int;
202 d->value.i = val;
203}
204
205TVVariant& TVVariant::operator=(const TVVariant& variant )
206{
207 TVVariant& other = (TVVariant&) variant;
208
209 other.d->ref();
210 if ( d->deref() )
211 delete d;
212
213 d = other.d;
214
215 return *this;
216}
217
218void TVVariant::detach()
219{
220 if (d->count == 1)
221 return;
222
223 d->deref();
224 d = new TVVariantPrivate(d);
225}
226
227const QString TVVariant::typeName() const
228{
229 return typeToName(d->typ);
230}
231
232void TVVariant::clear()
233{
234 if (d->count > 1)
235 {
236 d->deref();
237 d = new TVVariantPrivate;
238 return;
239 }
240
241 d->clear();
242}
243
244const QString TVVariant::typeToName(KeyType typ)
245{
246 switch(typ) {
247 case String:
248 return QString("String");
249 case Date:
250 return QString("Date");
251 case Time:
252 return QString("Time");
253 case Int:
254 return QString("Int");
255 case Invalid:
256 default:
257 return QString("Invalid");
258 }
259 return QString("Invalid");
260}
261
262TVVariant::KeyType TVVariant::nameToType(const QString &name)
263{
264 if(!qstrcmp("String", name))
265 return String;
266 if(!qstrcmp("Date", name))
267 return Date;
268 if(!qstrcmp("Time", name))
269 return Time;
270 if(!qstrcmp("Int", name))
271 return Int;
272
273 return Invalid;
274}
275
276void TVVariant::load(QDataStream &s )
277{
278 KeyType t;
279 s >> t;
280
281 d->typ = t;
282 switch(t) {
283 case Invalid:
284 d->typ = t;
285 break;
286 case String:
287 {
288 QString *x = new QString;
289 s >> *x;
290 d->value.ptr = x;
291 }
292 break;
293 case Time:
294 {
295 QTime *x = new QTime;
296 s >> *x;
297 d->value.ptr = x;
298 }
299 break;
300 case Date:
301 {
302 QDate *x = new QDate;
303 s >> *x;
304 d->value.ptr = x;
305 }
306 break;
307 case Int:
308 {
309 int x;
310 s >> x;
311 d->value.i = x;
312 }
313 break;
314 default:
315 qFatal("Unrecognized data type");
316 }
317}
318
319void TVVariant::save( QDataStream &s ) const
320{
321 s << type();
322
323 switch( d->typ ) {
324 case String:
325 s << *((QString *)d->value.ptr);
326 break;
327 case Date:
328 s << *((QDate *)d->value.ptr);
329 break;
330 case Time:
331 s << *((QTime *)d->value.ptr);
332 break;
333 case Int:
334 s << d->value.i;
335 break;
336 case Invalid:
337 break;
338 }
339}
340
341QDataStream& operator>>(QDataStream& s, TVVariant& p)
342{
343 p.load( s );
344 return s;
345}
346
347QDataStream& operator<<(QDataStream &s, const TVVariant& p)
348{
349 p.save( s );
350 return s;
351}
352
353QDataStream& operator>> (QDataStream &s, TVVariant::KeyType& p)
354{
355 Q_UINT8 u = 0;
356 s >> u;
357 p = (TVVariant::KeyType) u;
358
359 return s;
360}
361
362QDataStream& operator<< (QDataStream& s, const TVVariant::KeyType& p)
363{
364 s << (Q_UINT8)p;
365 return s;
366}
367
368const QString TVVariant::toString() const
369{
370 switch(d->typ) {
371 case String:
372 return *((QString*)d->value.ptr);
373 case Date:
374 return ((QDate*)d->value.ptr)->toString();
375 case Time:
376 return ((QTime*)d->value.ptr)->toString();
377 case Int:
378 return QString::number(d->value.i);
379 case Invalid:
380 default:
381 return QString::null;
382 }
383 return QString::null;
384}
385
386// TODO DO, this properly, */
387int TVVariant::toInt() const
388{
389 if(d->typ == Int)
390 return d->value.i;
391
392 if(d->typ == String) {
393 QString tmpq(*(QString *)d->value.ptr);
394 return parseNextNumber(&tmpq);
395 }
396
397 return 0;
398}
399
400const QDate TVVariant::toDate() const
401{
402 if(d->typ == Date)
403 return *((QDate *)d->value.ptr);
404
405 if(d->typ == String) {
406 QString q = toString();
407
408 /* date format is day mon d yyyy */
409 /* ignore the first three letters, read the next
410 three for month.. etc */
411
412 int day = parseNextNumber(&q);
413 int month = parseNextNumber(&q);
414 int year = parseNextNumber(&q);
415 if (!QDate::isValid(year, month, day))
416 return QDate();
417 return QDate(year, month, day);
418 }
419
420
421 return QDate();
422}
423
424const QTime TVVariant::toTime() const
425{
426 if(d->typ == Time)
427 return *((QTime *)d->value.ptr);
428
429 if(d->typ == String) {
430 QString q = toString();
431 int hour = parseNextNumber(&q);
432 int minute = parseNextNumber(&q);
433 int second = parseNextNumber(&q);
434 int msecond = parseNextNumber(&q);
435 if (!QTime::isValid(hour, minute, second, msecond))
436 return QTime();
437 return QTime(hour, minute, second, msecond);
438 }
439
440 return QTime();
441}
442
443#define TV_VARIANT_AS( f ) Q##f& TVVariant::as##f() { \
444 if ( d->typ != f ) \
445 *this = TVVariant( to##f() ); \
446 else \
447 detach(); \
448 return *((Q##f*)d->value.ptr); }
449
450TV_VARIANT_AS(String)
451TV_VARIANT_AS(Date)
452TV_VARIANT_AS(Time)
453
454#undef TV_VARIANT_AS
455
456int& TVVariant::asInt()
457{
458 detach();
459 if (d->typ != Int) {
460 d->value.i = toInt();
461 d->typ = Int;
462 }
463 return d->value.i;
464}
465
466/*!
467 valid cast is
468 anything to String
469 same to same
470*/
471bool TVVariant::canCast(KeyType t) const
472{
473 if(d->typ == t)
474 return TRUE;
475
476 if(t == String)
477 return TRUE;
478
479 if(t == Int) {
480 if (d->typ == Date)
481 return TRUE;
482 if (d->typ == Time)
483 return TRUE;
484 if (d->typ == String)
485 return TRUE;
486 }
487
488 return FALSE;
489}
490
491bool TVVariant::operator==( const TVVariant &v ) const
492{
493 switch(d->typ) {
494 case String:
495 return v.toString() == toString();
496 case Date:
497 return v.toDate() == toDate();
498 case Time:
499 return v.toTime() == toTime();
500 case Int:
501 return v.toInt() == toInt();
502 case Invalid:
503 break;
504 }
505
506 return FALSE;
507}
508
509bool TVVariant::operator!=( const TVVariant &v ) const
510{
511 return !( v == *this);
512}
513
514bool TVVariant::operator<( const TVVariant &v ) const
515{
516 switch(d->typ) {
517 case String:
518 return toString().lower() < v.toString().lower();
519 case Date:
520 return toDate() < v.toDate();
521 case Time:
522 return toTime() < v.toTime();
523 case Int:
524 return toInt() < v.toInt();
525 case Invalid:
526 default:
527 break;
528 }
529 return FALSE;
530}
531
532bool TVVariant::operator>( const TVVariant &v ) const
533{
534 switch(d->typ) {
535 case String:
536 return toString().lower() > v.toString().lower();
537 case Date:
538 return toDate() > v.toDate();
539 case Time:
540 return toTime() > v.toTime();
541 case Int:
542 return toInt() > v.toInt();
543 case Invalid:
544 default:
545 break;
546 }
547 return FALSE;
548}
549
550/*! True if n is closer to this than o */
551bool TVVariant::closer(TVVariant n, TVVariant o)
552{
553 /* Nothing is close to an invalid, so nothing can be closer */
554 if(d->typ == Invalid)
555 return FALSE;
556
557 /* can't be closer if of different type */
558 if(n.type() != type())
559 return FALSE;
560
561 /* if new shares type, and old doesn't, then new is closer */
562 if(o.type() != type())
563 return TRUE;
564
565 switch(type()){
566 case String: {
567 /* case for strings is close is a substring.. closer is
568 * earlier alphabetically */
569 QString qs1 = n.toString().lower();
570 QString qs2 = o.toString().lower();
571 QString qsv = toString().lower();
572
573 if (!qs1.startsWith(qsv))
574 return FALSE;
575
576 /* contains sub-str, if later than is not closer */
577 if(QString::compare(qs1, qs2) > 0)
578 return FALSE;
579 return TRUE;
580 }
581 case Int: {
582 /* case for int is smallest absolute difference */
583 int i1 = n.toInt();
584 int i2 = o.toInt();
585 int iv = toInt();
586
587 int diff1 = (i1 - iv);
588 if (diff1 < 0)
589 diff1 = -diff1;
590 int diff2 = (i2 - iv);
591 if (diff2 < 0)
592 diff2 = -diff2;
593
594 if (diff1 < diff2)
595 return TRUE;
596 return FALSE;
597 }
598 case Date: {
599 QDate i1 = n.toDate();
600 QDate i2 = o.toDate();
601 QDate iv = toDate();
602
603 /* definition of closer is the least difference in days */
604 int diff1 = i1.daysTo(iv);
605 if (diff1 < 0)
606 diff1 = -diff1;
607 int diff2 = i2.daysTo(iv);
608 if (diff2 < 0)
609 diff2 = -diff2;
610
611 if (diff1 < diff2)
612 return TRUE;
613 return FALSE;
614 }
615 case Time: {
616 QTime i1 = n.toTime();
617 QTime i2 = o.toTime();
618 QTime iv = toTime();
619
620 /* definition of closer is the least difference in days */
621 int diff1 = i1.msecsTo(iv);
622 if (diff1 < 0)
623 diff1 = -diff1;
624 int diff2 = i2.msecsTo(iv);
625 if (diff2 < 0)
626 diff2 = -diff2;
627 if (diff1 < diff2)
628 return TRUE;
629 return FALSE;
630 }
631 default:
632 /* don't know how to do 'closer' on this type, hence never closer
633 * or even close */
634 break;
635 }
636 return FALSE;
637}
638
639/*! True if n is close to this */
640bool TVVariant::close(TVVariant n)
641{
642 /* Nothing is close to an invalid, so nothing can be closer */
643 if(type() == Invalid)
644 return FALSE;
645
646 /* can't be close if of different type */
647 if(n.type() != type())
648 return FALSE;
649
650 switch(type()){
651 case String: {
652 /* case for strings is close is a substring.. closer is
653 * earlier alphabetically */
654 QString qs1 = n.toString().lower();
655 QString qsv = toString().lower();
656
657 if (!qs1.startsWith(qsv))
658 return FALSE;
659 return TRUE;
660 }
661 case Int:
662 case Date:
663 case Time:
664 return TRUE;
665 default:
666 /* don't know how to do 'closer' on this type, hence never closer
667 * or even close */
668 break;
669 }
670 return FALSE;
671}
672
673/*!
674 \class Key
675 \brief document me!
676
677 document me!
678*/
679
680Key::Key() : kname(), kexample(), kflags(0) { }
681
682Key::Key(QString name, TVVariant example, int flags = 0) :
683 kname(name), kexample(example), kflags(flags) { }
684
685Key::Key(const Key &other)
686{
687 kname = other.kname;
688 kexample = other.kexample;
689 kflags = other.kflags;
690}
691
692Key& Key::operator=(const Key& key)
693{
694 kname = key.kname;
695 kexample = key.kexample;
696 kflags = key.kflags;
697 return *this;
698}
699
700QString Key::name() const
701{
702 return QString(kname);
703}
704
705TVVariant Key::example() const
706{
707 return TVVariant(kexample);
708}
709
710TVVariant::KeyType Key::type() const
711{
712 return kexample.type();
713}
714
715void Key::setName(const QString &name)
716{
717 kname = QString(name);
718}
719
720void Key::setExample(const TVVariant &e)
721{
722 kexample = TVVariant(e);
723}
724
725int Key::flags() const
726{
727 return kflags;
728}
729
730void Key::setFlags(int fl)
731{
732 kflags = fl;
733}
734
735bool Key::delFlag() const
736{
737 if(kflags & del_flag)
738 return TRUE;
739 return FALSE;
740}
741
742bool Key::newFlag() const
743{
744 if(kflags & new_flag)
745 return TRUE;
746 return FALSE;
747}
748
749void Key::setDelFlag(bool v)
750{
751 if(delFlag() != v)
752 kflags = kflags ^ del_flag;
753}
754
755void Key::setNewFlag(bool v)
756{
757 if(newFlag() != v)
758 kflags = kflags ^ new_flag;
759}
760
761/*!
762 \class KeyList
763 \brief A represntation of keys used for a table.
764
765 The KeyList class is used to store the representation of keys used in table
766 headings by DBStore. It stores the names and types of the keys
767*/
768
769/*!
770 Constructs a KeyList
771*/
772KeyList::KeyList() : QIntDict<Key>(20)
773{
774 setAutoDelete(TRUE);
775}
776
777/* Should be deep copy, but isn't */
778KeyList::KeyList(const KeyList &k) : QIntDict<Key>(k)
779{
780 KeyListIterator it(k);
781 while(it.current()) {
782 replace(it.currentKey(), new Key(*it.current()));
783 ++it;
784 }
785
786 setAutoDelete(TRUE);
787}
788
789/*!
790 Destroys a KeyList
791*/
792KeyList::~KeyList() {
793}
794
795/* Do a comparision base on Keys */
796bool KeyList::operator!=(const KeyList &other)
797{
798 KeyListIterator it(*this);
799
800 if (other.getNumFields() != getNumFields())
801 return TRUE;
802
803 while(it.current()) {
804 //it.currentKey(), it.current();
805 if (other.getKeyName(it.currentKey()) != getKeyName(it.currentKey()))
806 return TRUE;
807 if (other.getKeyType(it.currentKey()) != getKeyType(it.currentKey()))
808 return TRUE;
809 ++it;
810 }
811 return FALSE;
812}
813
814/*!
815 Returns the number of keys stored in the KeyList
816*/
817int KeyList::getNumFields() const
818{
819 return count();
820}
821
822/*!
823 Adds a new key to the KeyList
824
825 \param name the name of the new key
826 \param type the type of the new key
827*/
828int KeyList::addKey(QString name, TVVariant example)
829{
830 int i = count();
831 while(find(i) && (i > -1))
832 i--;
833 replace(i, new Key(name, example, 0));
834 return i;
835}
836
837int KeyList::addKey(QString name, TVVariant::KeyType type)
838{
839 /* generate a valid type for the example? */
840 TVVariant e = TVVariant("0");
841 switch(type) {
842 case TVVariant::String:
843 return addKey(name, TVVariant("<undefined>").asString());
844 break;
845 case TVVariant::Date:
846 return addKey(name, TVVariant(QDate::currentDate()).asDate());
847 break;
848 case TVVariant::Time:
849 return addKey(name, TVVariant(QTime(0,0,0)).toTime());
850 break;
851 case TVVariant::Int:
852 return addKey(name, TVVariant(0).toInt());
853 break;
854 default:
855 qWarning(QObject::tr("KeyList::addKey() Cannot make default "
856 "value for type %1, Key not added.").arg(type));
857 break;
858 }
859 return -1;
860}
861
862void KeyList::setKeyFlags(int i, int flag)
863{
864 if(find(i))
865 find(i)->setFlags(flag);
866}
867
868int KeyList::getKeyFlags(int i) const
869{
870 if(find(i))
871 return find(i)->flags();
872 return 0;
873}
874
875bool KeyList::checkNewFlag(int i) const
876{
877 if (find(i))
878 return find(i)->newFlag();
879 return false;
880}
881
882void KeyList::setNewFlag(int i, bool f)
883{
884 if(!find(i))
885 return;
886 find(i)->setNewFlag(f);
887}
888
889bool KeyList::checkDeleteFlag(int i) const
890{
891 if (find(i))
892 return find(i)->delFlag();
893 return false;
894}
895
896void KeyList::setDeleteFlag(int i, bool f)
897{
898 if(!find(i))
899 return;
900 find(i)->setDelFlag(f);
901}
902
903/*!
904 Returns the name of the key at index i
905*/
906QString KeyList::getKeyName(int i) const
907{
908 if (find (i))
909 return find(i)->name();
910 return QString();
911}
912
913void KeyList::setKeyName(int i, const QString &n)
914{
915 if(find(i))
916 find(i)->setName(n);
917}
918
919/*!
920 Returns the type of the key at index i
921*/
922TVVariant::KeyType KeyList::getKeyType(int i) const
923{
924 if(find(i))
925 return find(i)->type();
926 return TVVariant::Invalid;
927}
928
929void KeyList::setKeyType(int i, TVVariant::KeyType t)
930{
931 if(!find(i))
932 return;
933 switch(t) {
934 case TVVariant::String:
935 find(i)->setExample(TVVariant(QString("default")));
936 return;
937 case TVVariant::Int:
938 find(i)->setExample(TVVariant(int(0)));
939 return;
940 case TVVariant::Date:
941 find(i)->setExample(TVVariant(QDate::currentDate()));
942 return;
943 case TVVariant::Time:
944 find(i)->setExample(TVVariant(QTime(0,0,0,0)));
945 return;
946 default:
947 break;
948 }
949 return;
950}
951
952TVVariant KeyList::getKeyExample(int i) const
953{
954 if(find(i))
955 return find(i)->example();
956 return TVVariant();
957}
958
959void KeyList::setKeyExample(int i, TVVariant example)
960{
961 if(find(i))
962 find(i)->setExample(example);
963}
964
965/*!
966 Returns the index of the key with name q
967*/
968int KeyList::getKeyIndex(QString q) const
969{
970 KeyListIterator it(*this);
971
972 while(it.current()) {
973 if(it.current()->name() == q)
974 return it.currentKey();
975 ++it;
976 }
977 return -1;
978}
979
980bool KeyList::validIndex(int i) const
981{
982 if(!find(i))
983 return FALSE;
984 if(find(i)->delFlag())
985 return FALSE;
986 return TRUE;
987}
988
989QDataStream &operator<<( QDataStream &s, const KeyList &k)
990{
991 s << k.getNumFields();
992
993 KeyListIterator it(k);
994
995 while(it.current()) {
996 s << (Q_UINT16)it.currentKey();
997 s << it.current()->name();
998 s << it.current()->example();
999 s << (Q_UINT16)it.current()->flags();
1000 ++it;
1001 }
1002 return s;
1003}
1004
1005QDataStream &operator>>( QDataStream &s, KeyList &k)
1006{
1007 int i;
1008 int size;
1009 int index = 0;
1010 int flags = 0;
1011 TVVariant type = TVVariant();
1012 QString name;
1013
1014 s >> size;
1015
1016 for (i=0; i < size; i++) {
1017 s >> (Q_UINT16 &)index;
1018 s >> name;
1019 s >> type;
1020 s >> (Q_UINT16 &)flags;
1021 k.replace(index, new Key(name, type, flags));
1022 }
1023 return s;
1024}
1025
1026/*!
1027 \class DataElem
1028 \brief A class representing a single row or element of a table in a DBStore
1029
1030 This class holds the data of a row in a table.
1031*/
1032
1033
1034/*!
1035 Constructs a DataElem. This function needs a container because the
1036 size, types of keys and primary key are all defined by the containing
1037 database
1038*/
1039DataElem::DataElem(DBStore *c) : values(20)
1040{
1041 int size;
1042 contained = c;
1043 size = c->getNumFields();
1044 values.setAutoDelete(TRUE);
1045}
1046
1047/*!
1048 Destroys a DataElem and frees memory used by the DataElem
1049*/
1050DataElem::~DataElem() {
1051}
1052
1053
1054
1055QDataStream &operator<<( QDataStream &s, const DataElem &d)
1056{
1057 int size = d.getNumFields();
1058
1059 s << size; /* redundent data but makes streaming easier */
1060 KeyList k = d.getKeys();
1061
1062 KeyListIterator it(k);
1063
1064 while(it.current()) {
1065 s << (Q_UINT16)it.currentKey();
1066 s << d.getField(it.currentKey());
1067 ++it;
1068 }
1069 return s;
1070}
1071
1072QDataStream &operator>>( QDataStream &s, DataElem &d)
1073{
1074 int i;
1075 int size;
1076 TVVariant t;
1077 int index = 0;
1078
1079 s >> size; /* redundent data but makes streaming easier */
1080 if (size != d.getNumFields()) {
1081 qWarning("DataSize mis-match");
1082 return s; /* sanity check failed.. don't load */
1083 }
1084
1085 for(i = 0; i < size; i++) {
1086 s >> (Q_UINT16)index;
1087 s >> t;
1088 d.setField(index, t);
1089 }
1090 return s;
1091}
1092
1093/*! Returns the number of possible (not valid) fields in the data element */
1094int DataElem::getNumFields() const
1095{
1096 return contained->getNumFields();
1097}
1098
1099KeyList DataElem::getKeys() const
1100{
1101 return *(contained->getKeys());
1102}
1103
1104/*!
1105 This function determines whether field index i of the element has been
1106 set yet.
1107
1108 \return A boolean value that is TRUE if the specfied field of this
1109 element has been set and FALSE if the field has not yet been set
1110*/
1111bool DataElem::hasValidValue(int i) const
1112{
1113 if(!values.find(i))
1114 return FALSE;
1115 if(!contained->getKeys()->validIndex(i))
1116 return FALSE;
1117 return values.find(i)->isValid();
1118}
1119
1120/*!
1121 This function determines whether field name qs of the element has been
1122 set yet.
1123
1124 \return A boolean value that is TRUE if the specfied field of this
1125 element has been set and FALSE if the field has not yet been set
1126*/
1127bool DataElem::hasValidValue(QString qs) const
1128{
1129 int i = contained->getKeyIndex(qs);
1130 return hasValidValue(i);
1131}
1132
1133/*! returns the type of the field specified by index i */
1134TVVariant::KeyType DataElem::getFieldType(int i) const
1135{
1136 return contained->getKeyType(i);
1137}
1138
1139/*! returns the type of the field specified by name qs */
1140TVVariant::KeyType DataElem::getFieldType(QString qs) const
1141{
1142 int i = contained->getKeyIndex(qs);
1143 return contained->getKeyType(i);
1144}
1145
1146/*!
1147 returns a pointer to the data stored in field index i for this
1148 data element, (value may not be valid)
1149*/
1150TVVariant DataElem::getField(int i) const
1151{
1152 if(hasValidValue(i))
1153 return TVVariant(*values.find(i));
1154 return TVVariant();
1155}
1156
1157/*!
1158 returns a pointer to the data stored in field name qs for this
1159 data element, (value may not be valid)
1160*/
1161TVVariant DataElem::getField(QString qs) const
1162{
1163 int i = contained->getKeyIndex(qs);
1164 return getField(i);
1165}
1166
1167/*!
1168 Sets the value of the elements field index i to the value represented in
1169 the QString q.
1170
1171 \param i index of the field to set
1172 \param q a string that can be parsed to get the value to be set
1173*/
1174void DataElem::setField(int i, QString q)
1175{
1176 /* from the type of the field, parse q and store */
1177 TVVariant::KeyType kt = contained->getKeyType(i);
1178
1179 TVVariant t = TVVariant(q);
1180
1181 switch(kt) {
1182 case TVVariant::Int: {
1183 t.asInt();
1184 setField(i, t);
1185 return;
1186 }
1187 case TVVariant::String: {
1188 t.asString();
1189 setField(i, t);
1190 return;
1191 }
1192 case TVVariant::Date: {
1193 t.asDate();
1194 setField(i, t);
1195 return;
1196 }
1197 case TVVariant::Time: {
1198 t.asTime();
1199 setField(i, t);
1200 return;
1201 }
1202 default:
1203 qWarning(
1204 QObject::tr("DataElem::setField(%1, %2) No valid type found").arg(i).arg(q)
1205 );
1206 }
1207}
1208
1209/*!
1210 Sets the value of the elements field index i to the value at the pointer
1211 value.
1212
1213 \param i index of the field to set
1214 \param value a pointer to the (already allocated) value to set
1215*/
1216void DataElem::setField(int i, TVVariant value)
1217{
1218 if (value.isValid()) {
1219 values.remove(i);
1220 values.replace(i, new TVVariant(value));
1221 }
1222}
1223
1224/*!
1225 Sets the value of the elements field name qs to the value represented in
1226 the QString q.
1227
1228 \param qs name of the field to set
1229 \param q a string that can be parsed to get the value to be set
1230*/
1231void DataElem::setField(QString qs, QString q)
1232{
1233 /* from the type of the field, parse q and store */
1234 int i = contained->getKeyIndex(qs);
1235 setField(i, qs);
1236}
1237
1238/*!
1239 Sets the value of the elements field name qs to the value at the pointer
1240 value.
1241
1242 \param qs name of the field to set
1243 \param value a pointer to the (already allocated) value to set
1244*/
1245void DataElem::setField(QString qs, TVVariant value)
1246{
1247 int i = contained->getKeyIndex(qs);
1248 setField(i, value);
1249}
1250
1251void DataElem::unsetField(int i) {
1252 values.remove(i);
1253}
1254
1255void DataElem::unsetField(QString qs)
1256{
1257 int i = contained->getKeyIndex(qs);
1258 unsetField(i);
1259}
1260
1261/*!
1262 Converts the data element to a Rich Text QString
1263*/
1264QString DataElem::toQString() const
1265{
1266 /* lets make an attempt at this function */
1267 int i;
1268 QString scratch = "";
1269
1270 QIntDictIterator<TVVariant> it(values);
1271
1272 while (it.current()) {
1273 i = it.currentKey();
1274 if(hasValidValue(i)) {
1275 scratch += "<B>" + contained->getKeyName(i) + ":</B> ";
1276 scratch += getField(i).toString();
1277 scratch += "<br>";
1278 }
1279 ++it;
1280 }
1281 return scratch;
1282}
1283
1284/*! formats individual fields to strings so can be displayed */
1285QString DataElem::toQString(int i) const
1286{
1287 if(hasValidValue(i)) {
1288 return getField(i).toString();
1289 }
1290 return "";
1291}
1292/*! formats individual fields to strings so can be sorted by QListView */
1293QString DataElem::toSortableQString(int i) const
1294{
1295 QString scratch = "";
1296 if(hasValidValue(i)) {
1297 switch (contained->getKeyType(i)) {
1298 case TVVariant::String: {
1299 scratch += getField(i).toString();
1300 break;
1301 }
1302 case TVVariant::Int: {
1303 scratch.sprintf("%08d", getField(i).toInt());
1304 break;
1305 }
1306 case TVVariant::Date: {
1307 static QDate epochD(1800, 1, 1);
1308 scratch.sprintf("%08d",
1309 epochD.daysTo(getField(i).toDate()));
1310 break;
1311 }
1312 case TVVariant::Time: {
1313 static QTime epochT(0, 0, 0);
1314 scratch.sprintf("%08d",
1315 epochT.msecsTo(getField(i).toTime()));
1316 break;
1317 }
1318 default:
1319 scratch += "Unknown type";
1320 break;
1321 }
1322 }
1323 return scratch;
1324}
1325
1326/* compare functions */
1327
1328bool DataElem::lessThan(int i, TVVariant v) const
1329{
1330 if (!hasValidValue(i)) return FALSE;
1331
1332 if (getField(i).type() != v.type())
1333 return FALSE;
1334
1335 return (getField(i) < v);
1336}
1337
1338bool DataElem::moreThan(int i, TVVariant v) const
1339{
1340 if (!hasValidValue(i)) return FALSE;
1341
1342 if (getField(i).type() != v.type())
1343 return FALSE;
1344
1345 return (getField(i) > v);
1346}
1347
1348bool DataElem::equalTo(int i, TVVariant v) const
1349{
1350 if (!hasValidValue(i)) return FALSE;
1351
1352 if (getField(i).type() != v.type())
1353 return FALSE;
1354
1355 return (getField(i) == v);
1356}
1357
1358bool DataElem::contains(int i, TVVariant v) const
1359{
1360 if (!hasValidValue(i)) return FALSE;
1361
1362 if (getField(i).type() != v.type())
1363 return FALSE;
1364
1365 switch(getField(i).type()) {
1366 case TVVariant::String: {
1367 QString qs1 = getField(i).toString().lower();
1368 QString qs2 = v.toString().lower();
1369 if (qs1.contains(qs2) > 0) return TRUE;
1370 break;
1371 }
1372 /* meaningless for ints */
1373 /* meaningless for time */
1374 /* meaningless for dates */
1375 case TVVariant::Int:
1376 case TVVariant::Time:
1377 case TVVariant::Date:
1378 break;
1379 default:
1380 qWarning("Tried to compare unknown data type");
1381 }
1382 return FALSE;
1383}
1384
1385bool DataElem::startsWith(int i, TVVariant v) const
1386{
1387 if (!hasValidValue(i)) return FALSE;
1388
1389 if (getField(i).type() != v.type())
1390 return FALSE;
1391
1392 switch(getField(i).type()) {
1393 case TVVariant::String: {
1394 QString qs1 = getField(i).toString().lower();
1395 QString qs2 = v.toString().lower();
1396 return qs1.startsWith(qs2);
1397 }
1398 /* meaningless for ints */
1399 /* meaningless for time */
1400 /* meaningless for dates */
1401 case TVVariant::Int:
1402 case TVVariant::Time:
1403 case TVVariant::Date:
1404 return FALSE;
1405 default:
1406 qWarning("Tried to compare unknown data type");
1407 }
1408 return FALSE;
1409}
1410
1411bool DataElem::endsWith(int i, TVVariant v) const
1412{
1413 if (!hasValidValue(i)) return FALSE;
1414
1415 if (getField(i).type() != v.type())
1416 return FALSE;
1417
1418 switch(getField(i).type()) {
1419 case TVVariant::String: {
1420 QString qs1 = getField(i).toString().lower();
1421 QString qs2 = v.toString().lower();
1422 return qs1.startsWith(qs2);
1423 }
1424 /* meaningless for ints */
1425 /* meaningless for time */
1426 /* meaningless for dates */
1427 case TVVariant::Int:
1428 case TVVariant::Time:
1429 case TVVariant::Date:
1430 return FALSE;
1431 default:
1432 qWarning("Tried to compare unknown data type");
1433 }
1434 return FALSE;
1435}
1436
1437/*!
1438 Determins which of the first to parameters are closer to the third, target
1439 parameter.
1440
1441 \return
1442 <UL>
1443 <LI>TRUE if the first element is a closer match to the target than the
1444 second element</LI>
1445 <LI>FALSE if the first element is not a closer match to the target than
1446 the second element</LI>
1447 </UL>
1448*/
1449bool DataElem::closer(DataElem*d1, DataElem *d2, TVVariant target, int column)
1450{
1451 int type;
1452
1453 if(!d1) return FALSE;
1454
1455 if (!d1->hasValidValue(column)) return FALSE;
1456
1457 if(!target.isValid()) return FALSE;
1458
1459 type = d1->getField(column).type();
1460
1461 if(d2) {
1462 if (type != d2->getField(column).type()) {
1463 /* can't do compare */
1464 qWarning("Tried to compare two incompatable types");
1465 return FALSE;
1466 }
1467 return target.closer(d1->getField(column), d2->getField(column));
1468 }
1469 return target.close(d1->getField(column));
1470}
diff --git a/noncore/apps/tableviewer/db/common.h b/noncore/apps/tableviewer/db/common.h
new file mode 100644
index 0000000..bb0a953
--- a/dev/null
+++ b/noncore/apps/tableviewer/db/common.h
@@ -0,0 +1,285 @@
1/**********************************************************************
2** Copyright (C) 2000 Trolltech AS. All rights reserved.
3**
4** This file is part of Qtopia Environment.
5**
6** This file may be distributed and/or modified under the terms of the
7** GNU General Public License version 2 as published by the Free Software
8** Foundation and appearing in the file LICENSE.GPL included in the
9** packaging of this file.
10**
11** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
12** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
13**
14** See http://www.trolltech.com/gpl/ for GPL licensing information.
15**
16** Contact info@trolltech.com if any conditions of this licensing are
17** not clear to you.
18**
19**********************************************************************/
20
21
22/* This file represents shared data structures that will be passed
23 * around often.
24 */
25#ifndef __SHAREDDATA_H__
26#define __SHAREDDATA_H__
27
28// TODO rename this to a sensable class name
29
30#include <qvector.h>
31#include <qstring.h>
32#include <qdatetime.h>
33#include <qcstring.h>
34#include <qdatastream.h>
35#include <qintdict.h>
36
37class DBStore;
38
39/* helper classes to common classes */
40class QStringVector : public QVector<QString>
41{
42public:
43 int compareItems(Item a, Item b);
44};
45
46/* in QT 2.3, dates and times not supported int QVariant. So.....
47 * for now use my special Variant type which is basically identical
48 * except that does it for my types. TODO replace with QVariant when
49 * qvariant supports all the types we require */
50
51class TVVariantPrivate;
52
53class TVVariant
54{
55public:
56 enum KeyType {
57 Invalid = 0,
58 Int,
59 String,
60 Date,
61 Time,
62 };
63
64 TVVariant();
65 ~TVVariant();
66
67 TVVariant(const TVVariant&);
68 TVVariant(QDataStream&);
69
70 TVVariant(const QString &);
71 TVVariant(const int);
72 TVVariant(const QDate &);
73 TVVariant(const QTime &);
74
75 TVVariant& operator=(const TVVariant& );
76 bool operator==(const TVVariant&) const;
77 bool operator!=(const TVVariant&) const;
78 bool operator<(const TVVariant&) const;
79 bool operator>(const TVVariant&) const;
80
81 bool closer(TVVariant, TVVariant);
82 bool close(TVVariant);
83
84 KeyType type() const;
85 const QString typeName() const;
86 int numTypes() const;
87
88 const QString typeName(KeyType) const;
89 bool canCast(KeyType) const;
90 bool isValid() const;
91 void clear();
92
93 const QString toString() const;
94 const QDate toDate() const;
95 const QTime toTime() const;
96 int toInt() const;
97
98 QString& asString();
99 QDate& asDate();
100 QTime& asTime();
101 int& asInt();
102
103 void load(QDataStream&);
104 void save(QDataStream&) const;
105
106 static const QString typeToName(KeyType typ);
107 static KeyType nameToType(const QString &);
108private:
109 void detach();
110
111 TVVariantPrivate *d;
112};
113
114class TVVariantPrivate : public QShared
115{
116 public:
117 TVVariantPrivate();
118 TVVariantPrivate(TVVariantPrivate *);
119
120 ~TVVariantPrivate();
121
122 void clear();
123
124 TVVariant::KeyType typ;
125
126 union {
127 int i;
128 void *ptr;
129 } value;
130};
131
132inline TVVariant::KeyType TVVariant::type() const
133{
134 return d->typ;
135}
136
137inline bool TVVariant::isValid() const
138{
139 return (d->typ != Invalid);
140}
141
142inline int TVVariant::numTypes() const
143{
144 return 4;
145}
146
147class Key {
148public:
149 Key();
150 Key(QString name, TVVariant example, int flags = 0);
151 Key(const Key &);
152 Key& operator=(const Key& );
153
154 QString name() const;
155 TVVariant example() const;
156 TVVariant::KeyType type() const;
157 int flags() const;
158
159 void setName(const QString &);
160 void setExample(const TVVariant &);
161 void setFlags(int);
162
163 bool delFlag() const;
164 bool newFlag() const;
165
166 void setDelFlag(bool);
167 void setNewFlag(bool);
168
169private:
170 QString kname;
171 TVVariant kexample;
172 int kflags;
173};
174
175class KeyList : public QIntDict<Key> {
176public:
177 KeyList();
178 KeyList(const KeyList&);
179
180 ~KeyList();
181
182 bool operator!=(const KeyList &);
183
184 int getNumFields() const;
185
186 int addKey(QString KeyName, TVVariant example);
187 int addKey(QString KeyName, TVVariant::KeyType type);
188
189 TVVariant getKeyExample(int ) const;
190 void setKeyExample(int, TVVariant e);
191
192 QString getKeyName(int i) const;
193 void setKeyName(int i, const QString &n);
194
195 TVVariant::KeyType getKeyType(int i) const;
196 void setKeyType(int i, TVVariant::KeyType);
197
198 int getKeyIndex(QString q) const;
199
200 int getKeyFlags(int i) const;
201 void setKeyFlags(int i, int flag);
202
203 /* Below should be abstracted a bit more */
204 bool checkNewFlag(int i) const;
205 void setNewFlag(int i, bool f);
206 bool checkDeleteFlag(int i) const;
207 void setDeleteFlag(int i, bool f);
208
209 bool validIndex(int) const;
210};
211
212class KeyListIterator : public QIntDictIterator<Key>
213{
214public:
215 KeyListIterator(const KeyList &k) : QIntDictIterator<Key>(k) {};
216};
217
218/* TODO start using this */
219class DataElem {
220public:
221 DataElem(DBStore *container);
222 ~DataElem();
223
224 int getNumFields() const;
225 KeyList getKeys() const;
226
227 bool hasValidValue(int) const;
228 bool hasValidValue(QString) const;
229 TVVariant::KeyType getFieldType(int) const;
230 TVVariant::KeyType getFieldType(QString) const;
231 TVVariant getField(int) const;
232 TVVariant getField(QString) const;
233
234 void setField(int, QString);
235 void setField(int, TVVariant);
236 void setField(QString, QString);
237 void setField(QString, TVVariant);
238 void unsetField(int);
239 void unsetField(QString);
240
241 QString toQString() const;
242 QString toQString(int i) const;
243 QString toSortableQString(int i) const;
244
245 /* compare functions */
246 bool lessThan(int i, TVVariant) const;
247 bool moreThan(int i, TVVariant) const;
248 bool equalTo(int i, TVVariant) const;
249 bool contains(int i, TVVariant) const;
250 bool startsWith(int i, TVVariant) const;
251 bool endsWith(int i, TVVariant) const;
252
253 /* class functions... Compare is based of the primary key, which
254 is determined by the containing DBStores of each element. */
255 static int compare(const TVVariant, const TVVariant, int i);
256
257 /* False, second element's primary key is closer to target.
258 * True, first element's primary key is a closer match to target */
259 static bool closer(DataElem*, DataElem *, TVVariant, int column);
260private:
261 QIntDict<TVVariant> values;
262 DBStore *contained;
263};
264
265typedef struct _TableState {
266 int current_column;
267 KeyList *kRep;
268 DataElem *current_elem;
269} TableState;
270
271/* Stream functions */
272#ifndef QT_NO_DATASTREAM
273Q_EXPORT QDataStream &operator<<( QDataStream &, const KeyList & );
274Q_EXPORT QDataStream &operator<<( QDataStream &, const DataElem & );
275Q_EXPORT QDataStream &operator>>( QDataStream &, KeyList & );
276Q_EXPORT QDataStream &operator>>( QDataStream &, DataElem & );
277
278
279Q_EXPORT QDataStream &operator>>( QDataStream &, TVVariant & );
280Q_EXPORT QDataStream &operator<<( QDataStream &, const TVVariant & );
281Q_EXPORT QDataStream &operator>>( QDataStream &, TVVariant::KeyType& );
282Q_EXPORT QDataStream &operator<<( QDataStream &, const TVVariant::KeyType& );
283#endif
284
285#endif
diff --git a/noncore/apps/tableviewer/db/csvsource.cpp b/noncore/apps/tableviewer/db/csvsource.cpp
new file mode 100644
index 0000000..2561b4b
--- a/dev/null
+++ b/noncore/apps/tableviewer/db/csvsource.cpp
@@ -0,0 +1,207 @@
1/**********************************************************************
2** Copyright (C) 2000 Trolltech AS. All rights reserved.
3**
4** This file is part of Qtopia Environment.
5**
6** This file may be distributed and/or modified under the terms of the
7** GNU General Public License version 2 as published by the Free Software
8** Foundation and appearing in the file LICENSE.GPL included in the
9** packaging of this file.
10**
11** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
12** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
13**
14** See http://www.trolltech.com/gpl/ for GPL licensing information.
15**
16** Contact info@trolltech.com if any conditions of this licensing are
17** not clear to you.
18**
19**********************************************************************/
20#include "csvsource.h"
21#include "common.h"
22#include "datacache.h"
23#include <qtextstream.h>
24#include <qstringlist.h>
25#include <qmap.h>
26#include <qregexp.h>
27
28DBCsv::DBCsv(DBStore *d)
29{
30 dstore = d;
31}
32
33DBCsv::~DBCsv()
34{
35}
36
37QString DBCsv::type()
38{
39 return "csv";
40}
41
42QStringList readElem(QString in)
43{
44 QStringList out;
45
46 if (in.isEmpty())
47 return out;
48
49 bool firstChar = TRUE;
50 bool quotedElem = FALSE;
51 uint index = 0;
52 while(index < in.length()) {
53 if(firstChar) {
54 /* skip whitespace */
55 while(index < in.length() && in[index] == ' ')
56 index++;
57 if(in[index] == '"') {
58 quotedElem = TRUE;
59 index++;
60 }
61 }
62 /* real first char */
63 QString elem;
64 if(quotedElem) {
65 while(index < in.length() && in[index] != '"') {
66 /* check for escape character */
67 if (in[index] == '\\') {
68 if (index++ < in.length()) {
69 elem.append(in[index]);
70 index++;
71 }
72 } else {
73 elem.append(in[index]);
74 index++;
75 }
76 }
77 } else {
78 while(index < in.length() && in[index] != ',') {
79 if (in[index] == '\\') {
80 if (index++ < in.length()) {
81 elem.append(in[index]);
82 index++;
83 }
84 } else {
85 elem.append(in[index]);
86 index++;
87 }
88 }
89 }
90 /* we have our current elem */
91 out << elem.stripWhiteSpace();
92 firstChar = TRUE;
93 quotedElem = FALSE;
94 /* skip till a , or end of line */
95 while (index < in.length() && in[index] != ',') index++;
96 if(index == in.length())
97 return out;
98 else
99 index++;
100 }
101}
102
103bool DBCsv::openSource(QIODevice *inDev)
104{
105 QTextStream tsIn(inDev);
106 QString in = tsIn.readLine().stripWhiteSpace();
107 QStringList keys;
108
109 keys = readElem(in);
110
111 QMap<int,int> keyIndexes;
112
113 KeyList *keyR = new KeyList();
114 QStringList::Iterator i = keys.begin();
115
116 uint fileIndex = 0;
117 while(i != keys.end()) {
118 if ((*i).isEmpty())
119 keyIndexes.insert(fileIndex, keyR->addKey("Unamed", TVVariant::String));
120 else
121 keyIndexes.insert(fileIndex, keyR->addKey(*i, TVVariant::String));
122 i++;
123 fileIndex++;
124 }
125 dstore->setKeys(keyR);
126
127 in = tsIn.readLine().stripWhiteSpace();
128 while(!in.isNull()) {
129 QStringList elems = readElem(in);
130
131 i = elems.begin();
132 fileIndex = 0;
133 DataElem *current_data = new DataElem(dstore);
134 while(i != elems.end()) {
135 if(!(*i).isEmpty()) {
136 current_data->setField(keyIndexes[fileIndex], *i);
137 }
138 fileIndex++;
139 i++;
140 }
141 dstore->addItem(current_data);
142 in = tsIn.readLine().stripWhiteSpace();
143 }
144
145 return TRUE;
146}
147
148bool DBCsv::saveSource(QIODevice *outDev)
149{
150 /* try not to use the escape character when possible. */
151 int i;
152 DataElem *elem;
153 KeyList *k;
154 QTextStream outstream(outDev);
155
156 k = dstore->getKeys();
157 KeyListIterator it(*k);
158 while(it.current()) {
159 if(!it.current()->delFlag()) {
160 QString name = it.current()->name();
161
162 name.replace(QRegExp("\\"), "\\\\");
163 name.replace(QRegExp("\""), "\\\"");
164 if(name.find(',') != -1) {
165 name.prepend('\"');
166 name.append('\"');
167 }
168
169 outstream << name;
170 }
171 ++it;
172 if(it.current())
173 outstream << ", ";
174 }
175 outstream << "\n";
176
177 dstore->first();
178
179 do {
180 elem = dstore->getCurrentData();
181 if(!elem)
182 break;
183 it.toFirst();
184 while(it.current()) {
185 i = it.currentKey();
186 if (elem->hasValidValue(i)) {
187 QString name = elem->toQString(i);
188
189 name.replace(QRegExp("\\"), "\\\\");
190 name.replace(QRegExp("\""), "\\\"");
191 if(name.find(',') != -1) {
192 name.prepend('\"');
193 name.append('\"');
194 }
195
196 outstream << name;
197 }
198 ++it;
199 if(it.current())
200 outstream << ", ";
201 }
202 outstream << "\n";
203 } while (dstore->next());
204
205 return TRUE;
206}
207
diff --git a/noncore/apps/tableviewer/db/csvsource.h b/noncore/apps/tableviewer/db/csvsource.h
new file mode 100644
index 0000000..691234c
--- a/dev/null
+++ b/noncore/apps/tableviewer/db/csvsource.h
@@ -0,0 +1,53 @@
1/**********************************************************************
2** Copyright (C) 2000 Trolltech AS. All rights reserved.
3**
4** This file is part of Qtopia Environment.
5**
6** This file may be distributed and/or modified under the terms of the
7** GNU General Public License version 2 as published by the Free Software
8** Foundation and appearing in the file LICENSE.GPL included in the
9** packaging of this file.
10**
11** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
12** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
13**
14** See http://www.trolltech.com/gpl/ for GPL licensing information.
15**
16** Contact info@trolltech.com if any conditions of this licensing are
17** not clear to you.
18**
19**********************************************************************/
20
21/* A Class to parse an comma seperated values docment of the form
22
23"Displayed Name", key2name, key 3 name, key name 4
24value1, , value 3, "value 4"
25value1, , value 3, "value 4"
26
27 * '\' is the escape character. Basically \", \' and \\ escape the ", ' or \
28 * into the actual value of the field.
29 * Before any other character will have the effect of dropping the '\'.
30 *
31 * Currently there is no support for comments. */
32
33#ifndef __CSVSOURCE_H__
34#define __CSVSOURCE_H__
35
36#include <qstring.h>
37#include "datacache.h"
38#include "common.h"
39
40
41class DBCsv : public DBAccess
42{
43public:
44 /* create connection and either open or initialize */
45 DBCsv(DBStore *d);
46 QString type();
47 bool openSource(QIODevice *);
48 bool saveSource(QIODevice *);
49 /* does a db write */
50 ~DBCsv();
51};
52
53#endif
diff --git a/noncore/apps/tableviewer/db/datacache.cpp b/noncore/apps/tableviewer/db/datacache.cpp
new file mode 100644
index 0000000..7c14eef
--- a/dev/null
+++ b/noncore/apps/tableviewer/db/datacache.cpp
@@ -0,0 +1,293 @@
1/**********************************************************************
2** Copyright (C) 2000 Trolltech AS. All rights reserved.
3**
4** This file is part of Qtopia Environment.
5**
6** This file may be distributed and/or modified under the terms of the
7** GNU General Public License version 2 as published by the Free Software
8** Foundation and appearing in the file LICENSE.GPL included in the
9** packaging of this file.
10**
11** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
12** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
13**
14** See http://www.trolltech.com/gpl/ for GPL licensing information.
15**
16** Contact info@trolltech.com if any conditions of this licensing are
17** not clear to you.
18**
19**********************************************************************/
20/*
21 * This file is used to load the xml files that represent the database.
22 * The main requirment for said file is each data entry must contain a key,
23 * otherwise any other data headings are allowed.
24 */
25
26#include "datacache.h"
27#include "xmlsource.h"
28#include "csvsource.h"
29#include <stdlib.h>
30#include <qheader.h>
31
32#define INIT_TABLE_SIZE 128
33
34/*!
35 \class DBStore datastore.h
36
37 \brief The DBStore class is the class responsible for storing, sorting and
38 searching the data loaded by the application
39
40*/
41
42/*!
43 Constructs a DBStore item
44*/
45DBStore::DBStore()
46{
47 name = "";
48 number_elems = 0;
49 full = false;
50 kRep = new KeyList();
51 master_table.resize(INIT_TABLE_SIZE);
52 table_size = INIT_TABLE_SIZE;
53
54 current_elem = 0;
55 archive = 0;
56}
57
58//TODO
59/*!
60 Reinitializes the table to empty (include a resize of the master table,
61 which should free some memory)
62*/
63void DBStore::freeTable()
64{
65 name = "";
66 if(archive) {
67 delete archive;
68 archive = 0;
69 }
70 kRep->clear(); /* clear the current key list */
71
72 number_elems = 0;
73 table_size = INIT_TABLE_SIZE;
74 master_table.resize(table_size);
75 full = false;
76 current_elem = 0;
77}
78
79/*!
80 Removes all items from the DBStore and destroys the DBStore
81*/
82DBStore::~DBStore()
83{
84 freeTable();
85}
86
87/*!
88 This function opens the given xml file, loads it and sets up the
89 appropriate data structures.
90
91 \param file_name A string representing the name of the file to be opened
92 \return true if successful, false otherwise.
93*/
94bool DBStore::openSource(QIODevice *inDev, const QString &source) {
95
96 /* first check if db is already open, if contains data.. then clear */
97 if(number_elems > 0) {
98 freeTable();
99 }
100
101 if (source == "text/x-xml-tableviewer") {
102 archive = new DBXml(this);
103 } else if (source == "text/csv") {
104 archive = new DBCsv(this);
105 } else
106 return false;
107
108 return (archive->openSource(inDev));
109}
110
111bool DBStore::saveSource(QIODevice *outDev, const QString &source)
112{
113 /* saving a new file */
114 if(!archive) {
115 if (source == "text/x-xml-tableviewer") {
116 archive = new DBXml(this);
117 } else if (source == "text/x-xml-tableviewer") {
118 archive = new DBCsv(this);
119 } else
120 return false;
121 }
122
123 /* changing file type */
124 if(archive->type() != source) {
125 delete archive;
126 if (source == "text/x-xml-tableviewer") {
127 archive = new DBXml(this);
128 } else if (source == "text/x-xml-tableviewer") {
129 archive = new DBCsv(this);
130 } else
131 return false;
132 }
133
134 return (archive->saveSource(outDev));
135}
136
137/*!
138 This function is used to add new elements to the database. If the database
139 has already reached the maximum allowable size this function does not alter
140 the database.
141
142 \param delm An already allocated and initialized data element to be added
143*/
144void DBStore::addItem(DataElem *delem)
145{
146 addItemInternal(delem);
147}
148
149void DBStore::addItemInternal(DataElem *delem)
150{
151 /* if already full, don't over fill, do a qWarning though */
152 if (full) {
153 qWarning("Attempted to add items to already full table");
154 return;
155 }
156
157 master_table.insert(number_elems, delem);
158
159 current_elem = number_elems;
160 number_elems++;
161
162 if(number_elems >= table_size) {
163 /* filled current table, double if we can */
164 table_size = table_size << 1;
165
166 /* check that the new table size is still valid, i.e. that we didn't
167 just shift the 1 bit of the end of the int. */
168 if (!table_size) {
169 full = true;
170 /* no point in doing antying else. */
171 return;
172 }
173 master_table.resize(table_size);
174 }
175}
176
177void DBStore::removeItem(DataElem *r)
178{
179 int position = master_table.findRef(r);
180 if(position != -1) {
181 /* there is at least one item, this is it */
182 /* replace this with the last element, decrease the element count */
183 master_table.insert(position, master_table.at(--number_elems));
184 master_table.remove(number_elems);
185 delete r;
186 }
187}
188
189/*!
190 Sets the name of the database
191
192 \param n A string representing the new name of the database.
193*/
194void DBStore::setName(const QString &n)
195{
196 name = n;
197}
198
199/*!
200 Gets the name of the database
201
202 \return A string representing the name of the database.
203*/
204QString DBStore::getName()
205{
206 return name;
207}
208
209/*!
210 Retrieves a pointer to the key representation of the database for
211 other classes to use as reference.
212
213 \return a pointer to the databases key representaion
214*/
215KeyList *DBStore::getKeys()
216{
217 return kRep;
218}
219
220/*!
221 sets the database's key representation the passed pointer
222 \param a pointer to a key representaton
223*/
224void DBStore::setKeys(KeyList *k)
225{
226 kRep = k;
227}
228
229/*!
230 Sets the current element to the first element of the database
231*/
232void DBStore::first()
233{
234 current_elem = 0;
235}
236
237/*!
238 Sets the current element to the last element of the database
239*/
240void DBStore::last()
241{
242 current_elem = number_elems - 1;
243}
244
245/*!
246 Sets the current element to the next element of the database if
247 there exists an element after the current one.
248*/
249bool DBStore::next()
250{
251 unsigned int new_current_elem = current_elem + 1;
252 if (current_elem < number_elems)
253 /* was valid before inc (it is possible but unlikely that inc current
254 elem will change it from invalid to valid) */
255 if (new_current_elem < number_elems) {
256 /* is valid after inc */
257 current_elem = new_current_elem;
258 return true;
259 }
260 return false;
261}
262
263/*!
264 Sets the current element to the previous element of the database if
265 there exists an element before the current one.
266*/
267bool DBStore::previous()
268{
269 unsigned int new_current_elem = current_elem -1;
270 if (current_elem < number_elems)
271 /* was valid */
272 if (new_current_elem < number_elems) {
273 /* still is (if was 0, then now -1, but as is unsigned will wrap
274 and hence be invalid */
275 current_elem = new_current_elem;
276 return true;
277 }
278 return false;
279}
280
281/*!
282 Returns the current data element in the database. Which element is current
283 is affected by newly added items, findItem, next, previous, first and
284 last functions
285
286 \return a pointer to the current data element
287*/
288DataElem *DBStore::getCurrentData()
289{
290 if (current_elem >= number_elems)
291 return NULL;
292 return master_table[current_elem];
293}
diff --git a/noncore/apps/tableviewer/db/datacache.h b/noncore/apps/tableviewer/db/datacache.h
new file mode 100644
index 0000000..c5dc637
--- a/dev/null
+++ b/noncore/apps/tableviewer/db/datacache.h
@@ -0,0 +1,130 @@
1/**********************************************************************
2** Copyright (C) 2000 Trolltech AS. All rights reserved.
3**
4** This file is part of Qtopia Environment.
5**
6** This file may be distributed and/or modified under the terms of the
7** GNU General Public License version 2 as published by the Free Software
8** Foundation and appearing in the file LICENSE.GPL included in the
9** packaging of this file.
10**
11** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
12** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
13**
14** See http://www.trolltech.com/gpl/ for GPL licensing information.
15**
16** Contact info@trolltech.com if any conditions of this licensing are
17** not clear to you.
18**
19**********************************************************************/
20
21/*
22 * This file is used to load the xml files that represent the database.
23 * The main requirment for said file is each data entry must contain a key,
24 * otherwise any other data headings are allowed.
25 */
26
27#ifndef __DATACACHE_H__
28#define __DATACACHE_H__
29
30#include <qstring.h>
31#include <qvector.h>
32#include "common.h"
33
34class DBStore;
35
36/*! Abstract class that defines how database stuff can be accessed */
37class DBAccess {
38public:
39
40// DBAccess(DBStore *d) { dstore = d; }
41 virtual ~DBAccess() {}
42
43 virtual QString type() {
44 return QString();
45 }
46
47 virtual bool openSource(QIODevice *) {
48 qWarning("DBAccess::openSource not yet implemented");
49 return false;
50 }
51
52 virtual bool saveSource(QIODevice *) {
53 qWarning("DBAccess::saveSource(QString) not yet implemented");
54 return false;
55 }
56
57protected:
58 DBStore *dstore;
59 QString source_name;
60};
61
62class DBStore {
63public:
64 DBStore();
65 ~DBStore();
66
67 bool openSource(QIODevice *, const QString &source);
68 bool saveSource(QIODevice *, const QString &source);
69
70 // Add an item
71 void addItem(DataElem *);
72 void addItemInternal(DataElem *);
73 void removeItem(DataElem *);
74
75 // Set the name of the database
76 void setName(const QString &name);
77
78 // Get the name of the database
79 QString getName();
80
81 KeyList *getKeys();
82 void setKeys(KeyList *);
83
84 /*! gets the number of fields defined in the database */
85 inline int getNumFields() {
86 return kRep->getNumFields();
87 }
88
89 /*! gets the index of a key given its name */
90 inline int getKeyIndex(QString qs) {
91 return kRep->getKeyIndex(qs);
92 }
93
94 /*! gets the type of a key given its index */
95 inline TVVariant::KeyType getKeyType(int i) {
96 return kRep->getKeyType(i);
97 }
98
99 /*! gets the name of a key given its index */
100 inline QString getKeyName(int i) {
101 return kRep->getKeyName(i);
102 }
103
104// Access functions.. iterator type stuff
105
106 void first();
107 void last();
108
109 bool next();
110 bool previous();
111
112 DataElem* getCurrentData();
113
114private:
115 /* does the work of freeing used memory */
116 void freeTable();
117 QString name;
118
119 QVector<DataElem> master_table;
120 DBAccess *archive;
121
122 KeyList *kRep;
123
124 unsigned int number_elems;
125 unsigned int table_size; /* should always be a power of 2 */
126 bool full; /* since because we are using an int for indexing there is
127 an upper limit on the number of items we can store. */
128 unsigned int current_elem;
129};
130#endif
diff --git a/noncore/apps/tableviewer/db/xmlsource.cpp b/noncore/apps/tableviewer/db/xmlsource.cpp
new file mode 100644
index 0000000..7418a85
--- a/dev/null
+++ b/noncore/apps/tableviewer/db/xmlsource.cpp
@@ -0,0 +1,295 @@
1/**********************************************************************
2** Copyright (C) 2000 Trolltech AS. All rights reserved.
3**
4** This file is part of Qtopia Environment.
5**
6** This file may be distributed and/or modified under the terms of the
7** GNU General Public License version 2 as published by the Free Software
8** Foundation and appearing in the file LICENSE.GPL included in the
9** packaging of this file.
10**
11** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
12** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
13**
14** See http://www.trolltech.com/gpl/ for GPL licensing information.
15**
16** Contact info@trolltech.com if any conditions of this licensing are
17** not clear to you.
18**
19**********************************************************************/
20#include "xmlsource.h"
21#include <qdict.h>
22#include <stdlib.h>
23#include <qtextstream.h>
24
25
26DBXml::DBXml(DBStore *d)
27{
28 dstore = d;
29}
30
31QString DBXml::type()
32{
33 return "xml";
34}
35
36bool DBXml::openSource(QIODevice *inDev)
37{
38 bool ok;
39
40 DBXmlHandler h(dstore);
41
42 QTextStream tsIn(inDev);
43 QXmlInputSource source(tsIn);
44 QXmlSimpleReader reader;
45 reader.setContentHandler(&h);
46 reader.setErrorHandler(&h);
47 ok = reader.parse(source);
48
49 return ok;
50}
51
52bool DBXml::saveSource(QIODevice *outDev)
53{
54 int i;
55 DataElem *elem;
56 KeyList *k;
57
58 QTextStream outstream(outDev);
59
60 outstream << "<database name=\"" << dstore->getName() << "\">" << endl;
61 outstream << "<header>" << endl;
62
63 k = dstore->getKeys();
64 KeyListIterator it(*k);
65 while(it.current()) {
66 if (!it.current()->delFlag()) {
67 outstream << "<key name=\"KEYID" << it.currentKey() << "\" ";
68 outstream << "type=\""
69 << TVVariant::typeToName(it.current()->type())
70 << "\">";
71 outstream << it.current()->name() << "</key>" << endl;
72 }
73 ++it;
74 }
75
76 outstream << "</header>" << endl;
77
78 dstore->first();
79
80 do {
81 elem = dstore->getCurrentData();
82 if (!elem)
83 break;
84 outstream << "<record>" << endl;
85 it.toFirst();
86 while (it.current()) {
87 i = it.currentKey();
88 if (elem->hasValidValue(i)) {
89 outstream << "<KEYID" << i << ">";
90 if (dstore->getKeyType(i) == TVVariant::Date) {
91 // dates in files are different from displayed dates
92 QDate date = elem->getField(i).toDate();
93 outstream << date.day() << "/"
94 << date.month() << "/"
95 << date.year();
96 } else {
97 outstream << elem->toQString(i);
98 }
99 outstream << "</KEYID" << i << ">" << endl;
100 }
101 ++it;
102 }
103 outstream << "</record>" << endl;
104 } while(dstore->next());
105
106 outstream << "</database>" << endl;
107 return TRUE;
108}
109
110DBXml::~DBXml() {}
111
112/*!
113 \class DBXmlHandler
114 \brief An Xml parser for flat tables.
115
116 An xml parser for parsing the files used by the table viewer application.
117
118 The format of the xml files can be found at the front of the file
119 dataparser.h
120*/
121
122/*!
123 Constructs a new DBXmlHandler, and sets that the table should be
124 constructed in the DBStore pointed to by ds.
125*/
126DBXmlHandler::DBXmlHandler(DBStore *ds)
127{
128 data_store = ds;
129 current_keyrep = 0;
130}
131
132/*!
133 Destroys the DBXmlHandler
134*/
135DBXmlHandler::~DBXmlHandler()
136{
137}
138
139QString DBXmlHandler::errorProtocol()
140{
141 qWarning("Error reading file");
142 return errorProt;
143}
144
145bool DBXmlHandler::startDocument()
146{
147 errorProt = "";
148 state = StateInit;
149 return TRUE;
150}
151
152bool DBXmlHandler::startElement(const QString&, const QString&,
153 const QString& qName, const QXmlAttributes& atts)
154{
155 if (state == StateInit && qName == "database") {
156 // First thing it expects is a <document name="..."> tag
157 state = StateDocument;
158 data_store->setName(atts.value("name"));
159 return TRUE;
160 }
161 if (state == StateDocument && qName == "header") {
162 state = StateHeader;
163 if (current_keyrep) delete current_keyrep;
164 current_keyrep = new KeyList();
165 return TRUE;
166 }
167 if (state == StateHeader && qName == "key") {
168 /* Ok, adding a new key to our KeyList TODO */
169 state = StateKey;
170 last_key_type = TVVariant::String;
171 key = atts.value("name");
172 if (key.isEmpty()) {
173 qWarning("empty key name");
174 return FALSE;
175 }
176 if(!atts.value("type").isEmpty())
177 last_key_type = TVVariant::nameToType(atts.value("type"));
178 return TRUE;
179 }
180 if (state == StateDocument && qName == "record") {
181 state = StateRecord;
182 current_data = new DataElem(data_store);
183 // Now expecting a <record> tag
184 return TRUE;
185 }
186 if (state == StateRecord) {
187 state = StateField;
188 /* the qName is the name of a key */
189 if (!keyIndexList[qName]) {
190 /* invalid key, we failed */
191 qWarning("Invalid key in record");
192 return FALSE;
193 }
194 keyIndex = *keyIndexList[qName];
195 return TRUE;
196 }
197 qWarning("Unable to determine tag type");
198 return FALSE;
199}
200
201bool DBXmlHandler::endElement(const QString&, const QString&,
202 const QString& qName)
203{
204 switch(state) {
205 case StateField:
206 // TODO checks 'could' be done of the popped value
207 state = StateRecord;
208 break;
209 case StateKey:
210 // TODO checks 'could' be done of the popped value
211 state = StateHeader;
212 break;
213 case StateHeader:
214 data_store->setKeys(current_keyrep);
215 state = StateDocument;
216 break;
217 case StateRecord:
218 data_store->addItem(current_data);
219 state = StateDocument;
220 break;
221 case StateDocument:
222 // we are done...
223 break;
224 default:
225 // should only get a 'endElement' from one of the above states.
226 qWarning("Invalid end tag");
227 return FALSE;
228 break;
229 }
230 return TRUE;
231}
232
233bool DBXmlHandler::characters(const QString& ch)
234{
235 // this is where the 'between tag' stuff happens.
236 // e.g. the stuff between tags.
237 QString ch_simplified = ch.simplifyWhiteSpace();
238
239 if (ch_simplified.isEmpty())
240 return TRUE;
241
242 if (state == StateKey) {
243 int *tmp_val = new int;
244 /* We just grabbed the display name of a key */
245 *tmp_val = current_keyrep->addKey(ch_simplified, last_key_type);
246 keyIndexList.insert(key, tmp_val);
247 return TRUE;
248 }
249 if (state == StateField) {
250 /* Ok, need to add data here */
251 current_data->setField(keyIndex, ch_simplified);
252 return TRUE;
253 }
254
255 qWarning("Junk characters found... ignored");
256 return TRUE;
257}
258
259QString DBXmlHandler::errorString()
260{
261 return "the document is not in the expected file format";
262}
263
264bool DBXmlHandler::warning(const QXmlParseException& exception)
265{
266 errorProt += QString("warning parsing error: %1 in line %2, column %3\n" )
267 .arg(exception.message())
268 .arg(exception.lineNumber())
269 .arg(exception.columnNumber());
270
271 qWarning(errorProt);
272 return QXmlDefaultHandler::fatalError(exception);
273}
274
275bool DBXmlHandler::error(const QXmlParseException& exception)
276{
277 errorProt += QString("error parsing error: %1 in line %2, column %3\n" )
278 .arg(exception.message())
279 .arg(exception.lineNumber())
280 .arg(exception.columnNumber());
281
282 qWarning(errorProt);
283 return QXmlDefaultHandler::fatalError(exception);
284}
285
286bool DBXmlHandler::fatalError(const QXmlParseException& exception)
287{
288 errorProt += QString("fatal parsing error: %1 in line %2, column %3\n" )
289 .arg(exception.message())
290 .arg(exception.lineNumber())
291 .arg(exception.columnNumber());
292
293 qWarning(errorProt);
294 return QXmlDefaultHandler::fatalError(exception);
295}
diff --git a/noncore/apps/tableviewer/db/xmlsource.h b/noncore/apps/tableviewer/db/xmlsource.h
new file mode 100644
index 0000000..ec267a6
--- a/dev/null
+++ b/noncore/apps/tableviewer/db/xmlsource.h
@@ -0,0 +1,119 @@
1/**********************************************************************
2** Copyright (C) 2000 Trolltech AS. All rights reserved.
3**
4** This file is part of Qtopia Environment.
5**
6** This file may be distributed and/or modified under the terms of the
7** GNU General Public License version 2 as published by the Free Software
8** Foundation and appearing in the file LICENSE.GPL included in the
9** packaging of this file.
10**
11** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
12** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
13**
14** See http://www.trolltech.com/gpl/ for GPL licensing information.
15**
16** Contact info@trolltech.com if any conditions of this licensing are
17** not clear to you.
18**
19**********************************************************************/
20
21/* A Class to parse an xml docment of the form
22 * <database name="...">
23 * <header>
24 * <key name=key_name type=String>Displayed Name</key>
25 * <key name=key2name>key2name</key>
26 * <key name=key3name type=Date>Key 3</key>
27 * <key name=key4name type=Int>key 4</key>
28 * </header>
29 * <record>
30 * <key_name>string</key_name>
31 * <key4name>int</key4name>
32 * <key2name>string</key2name>
33 * </record>
34 * <record>
35 * ....
36 * </record>
37 * ....
38 * </database>
39 *
40 * There is some room for improvment mostly around using better checking
41 * and the use of more advanced xml features.
42 */
43
44#ifndef __XMLSOURCE_H__
45#define __XMLSOURCE_H__
46
47#include <qxml.h>
48#include <qstring.h>
49#include <qstringlist.h>
50#include <qstack.h>
51#include <qdict.h>
52#include "datacache.h"
53#include "common.h"
54
55
56class DBXml : public DBAccess
57{
58public:
59 /* create connection and either open or initialize */
60 DBXml(DBStore *d);
61 QString type();
62 bool openSource(QIODevice *);
63 bool saveSource(QIODevice *);
64 /* does a db write */
65 ~DBXml();
66};
67
68
69class DBXmlHandler : public QXmlDefaultHandler
70{
71
72public:
73 DBXmlHandler(DBStore *ds);
74 virtual ~DBXmlHandler();
75
76 // return the error protocol if parsing failed
77 QString errorProtocol();
78
79 // overloaded handler functions
80 bool startDocument();
81 bool startElement(const QString& namespaceURI, const QString& localName,
82 const QString& qName, const QXmlAttributes& atts);
83 bool endElement(const QString& namespaceURI, const QString& localName,
84 const QString& qName);
85 bool characters(const QString& ch);
86
87 QString errorString();
88
89 bool warning(const QXmlParseException& exception);
90 bool error(const QXmlParseException& exception);
91 bool fatalError(const QXmlParseException& exception);
92
93private:
94
95 QStack<QString> stack;
96 KeyList *current_keyrep;
97 DataElem *current_data;
98 TVVariant::KeyType last_key_type;
99
100 QString errorProt;
101 DBStore *data_store;
102
103 enum State {
104 StateInit,
105 StateHeader,
106 StateKey,
107 StateDocument,
108 StateRecord,
109 StateField
110 };
111
112 State state;
113
114 QDict<int> keyIndexList;
115 int keyIndex;
116 QString key;
117};
118
119#endif
diff --git a/noncore/apps/tableviewer/keyentry.cw b/noncore/apps/tableviewer/keyentry.cw
new file mode 100644
index 0000000..e46da90
--- a/dev/null
+++ b/noncore/apps/tableviewer/keyentry.cw
@@ -0,0 +1,55 @@
1<!DOCTYPE CW><CW>
2<customwidgets>
3 <customwidget>
4 <class>TVBrowseKeyEntry</class>
5 <header location="local">browsekeyentry.h</header>
6 <sizehint>
7 <width>6</width>
8 <height>4</height>
9 </sizehint>
10 <container>1</container>
11 <sizepolicy>
12 <hordata>5</hordata>
13 <verdata>5</verdata>
14 </sizepolicy>
15 <pixmap>
16 <data format="XPM.GZ" length="646">789c6dd2c10ac2300c00d07bbf2234b7229d1be245fc04c5a3201e4615f430059d0711ff5ddb2e6bb236ec90eed134cb5a19d8ef36602af5ecdbfeeac05dda0798d3abebde87e3faa374d3807fa0d633a52d38d8de6f679fe33fc776e196f53cd010188256a3600a292882096246517815ca99884606e18044a3a40d91824820924265a7923a2e8bcd05f33db1173e002913175f2a6be6d3294871a2d95fa00e8a94ee017b69d339d90df1e77c57ea072ede6758</data>
17 </pixmap>
18 </customwidget>
19 <customwidget>
20 <class>TVListViewPrivate</class>
21 <header location="local">tvlistview.h</header>
22 <sizehint>
23 <width>10</width>
24 <height>10</height>
25 </sizehint>
26 <container>0</container>
27 <sizepolicy>
28 <hordata>5</hordata>
29 <verdata>5</verdata>
30 </sizepolicy>
31 <pixmap>
32 <data format="XPM.GZ" length="646">789c6dd2c10ac2300c00d07bbf2234b7229d1ddec44f503c0ae2a154410f53d0ed20e2bf6bdb656dd6861dd23d9a66591b0587fd1654235ebded6f0edcd53e419d87ae7b1f4f9b8f906d0bfe012317426a70b07bdc2f3ec77f8ed6b89559061a0343d06a124cc105596482585094bc0ae599b04646c9018926491b2205e140c485cace25755c175d0a967b622ff900b8cc9c7d29af594ea722d589167f813aa852ba07d94b9dce296e883fe7bb163f23896753</data>
33 </pixmap>
34 <signal>sortChanged(int)</signal>
35 <signal>currentChanged(QListViewItem *)</signal>
36 </customwidget>
37 <customwidget>
38 <class>TVFilterKeyEntry</class>
39 <header location="local">filterkeyentry.h</header>
40 <sizehint>
41 <width>10</width>
42 <height>10</height>
43 </sizehint>
44 <container>1</container>
45 <sizepolicy>
46 <hordata>5</hordata>
47 <verdata>5</verdata>
48 </sizepolicy>
49 <pixmap>
50 <data format="XPM.GZ" length="646">789c6dd2c10ac2300c00d07bbf2234b7229d1ddec44f503c0ae2a154410f53d0ed20e2bf6bdb656dd6861dd23d9a66591b0587fd1654235ebded6f0edcd53e419d87ae7b1f4f9b8f906d0bfe012317426a70b07bdc2f3ec77f8ed6b89559061a0343d06a124cc105596482585094bc0ae599b04646c9018926491b2205e140c485cace25755c175d0a967b622ff900b8cc9c7d29af594ea722d589167f813aa852ba07d94b9dce296e883fe7bb163f23896753</data>
51 </pixmap>
52 <signal>valueChanged()</signal>
53 </customwidget>
54</customwidgets>
55</CW>
diff --git a/noncore/apps/tableviewer/main.cpp b/noncore/apps/tableviewer/main.cpp
new file mode 100644
index 0000000..736e1cf
--- a/dev/null
+++ b/noncore/apps/tableviewer/main.cpp
@@ -0,0 +1,32 @@
1/**********************************************************************
2** Copyright (C) 2000 Trolltech AS. All rights reserved.
3**
4** This file is part of Qtopia Environment.
5**
6** This file may be distributed and/or modified under the terms of the
7** GNU General Public License version 2 as published by the Free Software
8** Foundation and appearing in the file LICENSE.GPL included in the
9** packaging of this file.
10**
11** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
12** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
13**
14** See http://www.trolltech.com/gpl/ for GPL licensing information.
15**
16** Contact info@trolltech.com if any conditions of this licensing are
17** not clear to you.
18**
19**********************************************************************/
20#include "tableviewer.h"
21#include <qpeapplication.h>
22
23int main( int argc, char ** argv )
24{
25 QPEApplication a( argc, argv );
26
27 TableViewerWindow * mw = new TableViewerWindow;
28 mw->setCaption( TableViewerWindow::tr("Table Viewer") );
29 a.showMainWidget(mw);
30
31 return a.exec();
32}
diff --git a/noncore/apps/tableviewer/qpe-tableviewer.control b/noncore/apps/tableviewer/qpe-tableviewer.control
new file mode 100644
index 0000000..86d0342
--- a/dev/null
+++ b/noncore/apps/tableviewer/qpe-tableviewer.control
@@ -0,0 +1,10 @@
1Files: EXCLUDED bin/tableviewer apps/Applications/tableviewer.desktop
2Priority: optional
3Section: qpe/applications
4Maintainer: Warwick Allison <warwick@trolltech.com>
5Architecture: arm
6Arch: iPAQ
7Version: $QPE_VERSION-3
8Depends: qpe-base ($QPE_VERSION)
9Description: XML database browsers
10 A table/database viewer for the Qtopia environment.
diff --git a/noncore/apps/tableviewer/tableviewer.cpp b/noncore/apps/tableviewer/tableviewer.cpp
new file mode 100644
index 0000000..0d4a412
--- a/dev/null
+++ b/noncore/apps/tableviewer/tableviewer.cpp
@@ -0,0 +1,455 @@
1/**********************************************************************
2** Copyright (C) 2000 Trolltech AS. All rights reserved.
3**
4** This file is part of Qtopia Environment.
5**
6** This file may be distributed and/or modified under the terms of the
7** GNU General Public License version 2 as published by the Free Software
8** Foundation and appearing in the file LICENSE.GPL included in the
9** packaging of this file.
10**
11** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
12** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
13**
14** See http://www.trolltech.com/gpl/ for GPL licensing information.
15**
16** Contact info@trolltech.com if any conditions of this licensing are
17** not clear to you.
18**
19**********************************************************************/
20
21/* local includes */
22#include "tableviewer.h"
23#include "ui/tvbrowseview.h"
24#include "ui/tvfilterview.h"
25#include "ui/tvlistview.h"
26#include "ui/tveditview.h"
27#include "ui/tvkeyedit.h"
28#include "db/datacache.h"
29
30/* QPE includes */
31#include "fileselector.h"
32#include "resource.h"
33
34/* QTE includes */
35#include <qpe/qpemenubar.h>
36#include <qpopupmenu.h>
37#include <qapplication.h>
38#include <qwidgetstack.h>
39#include <qlayout.h>
40#include <qbuffer.h>
41
42/*!
43 \class TableViewerWindow
44 \brief The main window widget of the application
45
46 This is the main widget of the table viewer application.
47 It is the co-ordination point.
48*/
49
50/*!
51 Constructs a new TableViewerWindow
52*/
53TableViewerWindow::TableViewerWindow(QWidget *parent, const char *name, WFlags f)
54 : QMainWindow(parent, name, f)
55{
56 setCaption(tr("Table Viewer"));
57
58/* Build data */
59 ds = new DBStore();
60 doc.setType("text/x-xml-tableviewer");
61 doc.setName("table");
62
63 dirty = FALSE;
64 ts.current_column = 0;
65 ts.kRep = ds->getKeys();
66
67/* build menus */
68 menu = new QPEMenuBar(this, 0);
69
70 QPopupMenu *file_menu = new QPopupMenu;
71 file_menu->insertItem("New", this, SLOT(newDocument()));
72
73 file_menu->insertItem("Open", this, SLOT(selectDocument()));
74 file_menu->insertSeparator();
75 file_menu->insertItem("Properties");
76
77 /* later will want to set this up to clean up first via this, SLOT(quit) */
78 menu->insertItem("Document", file_menu);
79
80 QPopupMenu *edit_menu = new QPopupMenu;
81 edit_menu->insertItem("Edit Item", this, SLOT(editItemSlot()));
82 edit_menu->insertItem("Edit Keys", this, SLOT(editKeysSlot()));
83 edit_menu->insertItem("Edit filters", this, SLOT(filterViewSlot()));
84 menu->insertItem("Edit", edit_menu);
85
86 QPopupMenu *view_menu = new QPopupMenu;
87 view_menu->insertItem("Browse View", this, SLOT(browseViewSlot()));
88 view_menu->insertItem("List View", this, SLOT(listViewSlot()));
89 menu->insertItem("View", view_menu);
90
91 QVBoxLayout *main_layout = new QVBoxLayout;
92
93 /* Build tool bar */
94 navigation = new QPEToolBar(this, "navigation");
95 QToolButton *newItemButton = new QToolButton(
96 QIconSet(Resource::loadImage("new")), "New Item", QString::null,
97 this, SLOT(newItemSlot()), navigation, "New Item");
98 QToolButton *editItemButton = new QToolButton(
99 QIconSet(Resource::loadImage("edit")), "Edit Item", QString::null,
100 this, SLOT(editItemSlot()), navigation, "Edit Item");
101 QToolButton *deleteItemButton = new QToolButton(
102 QIconSet(Resource::loadImage("trash")), "Delete Item",
103 QString::null, this,
104 SLOT(deleteItemSlot()), navigation, "Delete Item");
105
106 navigation->addSeparator();
107
108 QToolButton *firstItemButton = new QToolButton(
109 QIconSet(Resource::loadImage("fastback")), "First Item",
110 QString::null, this,
111 SLOT(firstItem()), navigation, "First Item");
112 QToolButton *previousItemButton = new QToolButton(
113 QIconSet(Resource::loadImage("back")), "Previous Item",
114 QString::null, this,
115 SLOT(previousItem()), navigation, "Previous Item");
116 QToolButton *nextItemButton = new QToolButton(
117 QIconSet(Resource::loadImage("forward")), "Next Item",
118 QString::null, this,
119 SLOT(nextItem()), navigation, "Next Item");
120 QToolButton *lastItemButton = new QToolButton(
121 QIconSet(Resource::loadImage("fastforward")), "Last Item",
122 QString::null, this,
123 SLOT(lastItem()), navigation, "Last Item");
124
125 navigation->addSeparator();
126 QToolButton *browseButton = new QToolButton(
127 QIconSet(Resource::loadImage("day")), "View Single Item",
128 QString::null, this,
129 SLOT(browseViewSlot()), navigation, "View Single Item");
130 QToolButton *listButton = new QToolButton(
131 QIconSet(Resource::loadImage("month")), "View Multiple Items",
132 QString::null, this,
133 SLOT(listViewSlot()), navigation, "View Multiple Items");
134
135 setToolBarsMovable(FALSE);
136 setToolBarsMovable(FALSE);
137 setToolBarsMovable(FALSE);
138
139/* Build widgets */
140 browseView = new TVBrowseView(&ts, this, 0);
141 listView = new TVListView(&ts, this, 0);
142 filterView = new TVFilterView(&ts, this, 0);
143 fileSelector = new FileSelector("text/csv;text/x-xml-tableviewer",
144 this, "fileselector");
145 fileSelector->setNewVisible(FALSE);
146 fileSelector->setCloseVisible(FALSE);
147
148 cw = new QWidgetStack(this, 0);
149 cw->addWidget(listView, ListState);
150 cw->addWidget(browseView, BrowseState);
151 cw->addWidget(filterView, FilterState);
152 cw->addWidget(fileSelector, FileState);
153
154 current_view = FileState;
155 cw->raiseWidget(current_view);
156 fileSelector->reread();
157
158 connect(browseView, SIGNAL(searchOnKey(int, TVVariant)),
159 this, SLOT(searchOnKey(int, TVVariant)));
160 connect(browseView, SIGNAL(sortChanged(int)),
161 this, SLOT(setPrimaryKey(int)));
162
163 connect(fileSelector, SIGNAL(closeMe()), this, SLOT(browseViewSlot()));
164 connect(fileSelector, SIGNAL(fileSelected(const DocLnk &)),
165 this, SLOT(openDocument(const DocLnk &)));
166
167 main_layout->addWidget(menu);
168 main_layout->addWidget(cw);
169
170 setCentralWidget(cw);
171
172}
173
174/*!
175 Destroys the TableViewerWindow
176*/
177TableViewerWindow::~TableViewerWindow()
178{
179 if(dirty)
180 saveDocument();
181}
182
183/*!
184 Opens a file dialog and loads the file specified by the dialog
185*/
186void TableViewerWindow::selectDocument()
187{
188 if(dirty)
189 saveDocument();
190 current_view = FileState;
191 cw->raiseWidget(current_view);
192 fileSelector->reread();
193}
194
195void TableViewerWindow::saveDocument()
196{
197 if(!dirty)
198 return;
199
200 FileManager fm;
201 QIODevice *dev = fm.saveFile(doc);
202
203 if(!ds->saveSource(dev, doc.type())){
204 qWarning("Save unsuccessful");
205 return;
206 }
207 dev->close();
208 dirty = FALSE;
209}
210
211void TableViewerWindow::newDocument()
212{
213 DocLnk nf;
214 nf.setType("text/x-xml-tableviewer");
215 nf.setName("table");
216
217 delete ds;
218 ds = new DBStore();
219
220 ts.current_column = 0;
221 ts.kRep = ds->getKeys();
222 browseView->reset();
223 listView->reset();
224 filterView->reset();
225
226 doc = nf;
227 dirty = FALSE;
228
229 current_view = BrowseState;
230 cw->raiseWidget(current_view);
231
232 /* now set up for editing the keys */
233 ts.kRep->addKey("key", TVVariant::String);
234 editKeysSlot();
235}
236
237void TableViewerWindow::openDocument(const DocLnk &f)
238{
239
240 if (!f.isValid())
241 return;
242
243 FileManager fm;
244 QIODevice *dev = fm.openFile(f);
245 doc = f;
246
247 if(ds->openSource(dev, doc.type())) {
248 DataElem *d;
249
250 browseView->reset();
251 listView->reset();
252 filterView->reset();
253
254 current_view = BrowseState;
255 cw->raiseWidget(current_view);
256
257 /* set up new table state and ensure sub widgets have a reference */
258 ts.current_column = 0;
259 ts.kRep = ds->getKeys();
260 browseView->rebuildKeys();
261 listView->rebuildKeys();
262 filterView->rebuildKeys();
263
264 ds->first();
265 /* set up the list view */
266 listView->clearItems();
267 do {
268 d = ds->getCurrentData();
269 if(d)
270 listView->addItem(d);
271 } while(ds->next());
272
273 /* Set up browse view, Will be based of structure of listView */
274 listView->first();
275 ts.current_elem = listView->getCurrentData();
276 browseView->rebuildData();
277 listView->rebuildData();
278
279 QString scratch = "Table Viewer";/* later take from constant */
280 scratch += " - ";
281 scratch += ds->getName();
282 setCaption(tr(scratch));
283
284 dirty = FALSE;
285 } else {
286 qWarning(tr("could not load Document"));
287 }
288 dev->close();
289}
290
291/*!
292 Moves to the next item of the current table
293*/
294void TableViewerWindow::nextItem()
295{
296 listView->next();
297 ts.current_elem = listView->getCurrentData();
298 browseView->rebuildData();
299}
300
301/*!
302 Moves to the previous item of the current table
303*/
304void TableViewerWindow::previousItem()
305{
306 listView->previous();
307 ts.current_elem = listView->getCurrentData();
308 browseView->rebuildData();
309}
310
311/*!
312 Raises the List View. This is a mode change for the application.
313*/
314void TableViewerWindow::listViewSlot()
315{
316 if(current_view == FilterState)
317 applyFilter();
318 current_view = ListState;
319 cw->raiseWidget(current_view);
320}
321
322void TableViewerWindow::applyFilter()
323{
324 DataElem *d;
325
326 listView->clearItems();
327 ds->first();
328 do {
329 d = ds->getCurrentData();
330 if(d)
331 if(filterView->passesFilter(d))
332 listView->addItem(d);
333 } while(ds->next());
334 listView->first();
335 listView->rebuildData();
336}
337
338/*!
339 Raises the Browse View. This is a mode change for the application.
340*/
341void TableViewerWindow::browseViewSlot()
342{
343 if(current_view == FilterState)
344 applyFilter();
345
346 ts.current_elem = listView->getCurrentData();
347 browseView->rebuildData();
348
349 current_view = BrowseState;
350 cw->raiseWidget(current_view);
351}
352
353/*!
354 Raises the List View. This is a mode change for the application.
355*/
356void TableViewerWindow::filterViewSlot()
357{
358 current_view = FilterState;
359 cw->raiseWidget(current_view);
360}
361
362
363
364
365void TableViewerWindow::editItemSlot()
366{
367 if(TVEditView::openEditItemDialog(&ts, ts.current_elem, this)) {
368 listView->rebuildData();
369 browseView->rebuildData();
370 dirty = TRUE;
371 }
372}
373
374void TableViewerWindow::newItemSlot()
375{
376 DataElem *d = new DataElem(ds);
377 if (TVEditView::openEditItemDialog(&ts, d, this)) {
378
379 ds->addItem(d);
380 ts.current_elem = d;
381 applyFilter();
382 listView->rebuildData();
383 browseView->rebuildData();
384 dirty = TRUE;
385 }
386}
387
388void TableViewerWindow::deleteItemSlot()
389{
390 /* delete the actual item, then do a 'filter' */
391 DataElem *to_remove = ts.current_elem;
392
393 if(!to_remove)
394 return;
395
396 listView->removeItem();
397 ds->removeItem(to_remove);
398
399 applyFilter();
400 listView->rebuildData();
401 browseView->rebuildData();
402 dirty = TRUE;
403}
404
405void TableViewerWindow::editKeysSlot()
406{
407 DataElem *d;
408 KeyList *k = TVKeyEdit::openEditKeysDialog(&ts, this);
409
410 if(k) {
411 /* set as new keys */
412 ds->setKeys(k);
413
414 ts.current_column = 0;
415 ts.kRep = k;
416
417 browseView->reset();
418 listView->reset();
419 filterView->reset();
420
421 browseView->rebuildKeys();
422 listView->rebuildKeys();
423 filterView->rebuildKeys();
424
425 ds->first();
426 /* set up the list view */
427 listView->clearItems();
428 do {
429 d = ds->getCurrentData();
430 if(d)
431 listView->addItem(d);
432 } while(ds->next());
433
434 /* Set up browse view, Will be based of structure of listView */
435 dirty = TRUE;
436 }
437}
438
439/*!
440 A Slot that allows for widgets above to indicate a search should be
441 done on a specified key index for a specified value
442*/
443void TableViewerWindow::searchOnKey(int i, TVVariant v)
444{
445 listView->findItem(i, v);
446 ts.current_elem = listView->getCurrentData();
447 browseView->rebuildData();
448}
449
450void TableViewerWindow::setPrimaryKey(int i)
451{
452 ts.current_column = i;
453 listView->rebuildData();
454 browseView->rebuildData();
455}
diff --git a/noncore/apps/tableviewer/tableviewer.h b/noncore/apps/tableviewer/tableviewer.h
new file mode 100644
index 0000000..2d4686a
--- a/dev/null
+++ b/noncore/apps/tableviewer/tableviewer.h
@@ -0,0 +1,109 @@
1/**********************************************************************
2** Copyright (C) 2000 Trolltech AS. All rights reserved.
3**
4** This file is part of Qtopia Environment.
5**
6** This file may be distributed and/or modified under the terms of the
7** GNU General Public License version 2 as published by the Free Software
8** Foundation and appearing in the file LICENSE.GPL included in the
9** packaging of this file.
10**
11** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
12** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
13**
14** See http://www.trolltech.com/gpl/ for GPL licensing information.
15**
16** Contact info@trolltech.com if any conditions of this licensing are
17** not clear to you.
18**
19**********************************************************************/
20#ifndef Tableviewer_H
21#define Tableviewer_H
22
23#include <qmainwindow.h>
24#include "db/common.h"
25#include "fileselector.h"
26
27/* Forward class declarations */
28class QWidgetStack;
29class QDialog;
30class QMenuBar;
31
32class TVListView;
33class TVBrowseView;
34class TVFilterView;
35class TVEditView;
36
37class DBStore;
38
39class TableViewerWindow: public QMainWindow
40{
41 Q_OBJECT
42public:
43 TableViewerWindow( QWidget *parent = 0,
44 const char *name = 0, WFlags f = 0 );
45 ~TableViewerWindow();
46
47public slots:
48 void selectDocument();
49
50 void newDocument();
51 void saveDocument();
52 void openDocument(const DocLnk &);
53
54 void nextItem();
55 void previousItem();
56
57 void listViewSlot();
58 void browseViewSlot();
59 void filterViewSlot();
60
61 void editItemSlot();
62 void newItemSlot();
63 void deleteItemSlot();
64
65 void editKeysSlot();
66
67 /* reveiw the sig. for this function TODO */
68 void searchOnKey(int, TVVariant);
69 void setPrimaryKey(int);
70
71/* TODO add new event */
72protected:
73
74/* TODO add new slots */
75private slots:
76
77/* TODO add other widgets used here */
78private:
79 bool dirty;
80
81 QMenuBar *menu;
82 QToolBar *navigation;
83
84 TVListView *listView;
85 TVBrowseView *browseView;
86 TVFilterView *filterView;
87 TVEditView *editView;
88 FileSelector *fileSelector;
89
90 DocLnk doc;
91
92 QWidgetStack *cw;
93 DBStore *ds;
94 TableState ts; /* not a pointer.. this class keeps the state */
95
96 enum UserState {
97 BrowseState = 0,
98 ListState,
99 FilterState,
100 EditState,
101 FileState,
102 };
103
104 UserState current_view;
105
106 void applyFilter();
107};
108
109#endif
diff --git a/noncore/apps/tableviewer/tableviewer.pro b/noncore/apps/tableviewer/tableviewer.pro
new file mode 100644
index 0000000..edd41c5
--- a/dev/null
+++ b/noncore/apps/tableviewer/tableviewer.pro
@@ -0,0 +1,36 @@
1 TEMPLATE= app
2 CONFIG = qt warn_on debug
3 DESTDIR = ../bin
4 SUBDIRS = db ui
5 HEADERS = tableviewer.h \
6 ui/commonwidgets.h \
7 ui/tvbrowseview.h \
8 ui/tvlistview.h \
9 ui/tvfilterview.h \
10 ui/tveditview.h \
11 ui/browsekeyentry.h \
12 ui/filterkeyentry.h \
13 ui/tvkeyedit.h \
14 db/datacache.h \
15 db/common.h \
16 db/xmlsource.h \
17 db/csvsource.h
18 SOURCES = main.cpp \
19 tableviewer.cpp \
20 ui/commonwidgets.cpp \
21 ui/tvbrowseview.cpp \
22 ui/tvfilterview.cpp \
23 ui/browsekeyentry.cpp \
24 ui/filterkeyentry.cpp \
25 ui/tvlistview.cpp \
26 ui/tveditview.cpp \
27 ui/tvkeyedit.cpp \
28 db/datacache.cpp \
29 db/xmlsource.cpp \
30 db/csvsource.cpp \
31 db/common.cpp
32 INTERFACES= ui/tvkeyedit_gen.ui
33 TARGET = tableviewer
34INCLUDEPATH += $(QPEDIR)/include
35DEPENDPATH += $(QPEDIR)/include
36 LIBS += -lqpe
diff --git a/noncore/apps/tableviewer/ui/.cvsignore b/noncore/apps/tableviewer/ui/.cvsignore
new file mode 100644
index 0000000..183c939
--- a/dev/null
+++ b/noncore/apps/tableviewer/ui/.cvsignore
@@ -0,0 +1,8 @@
1moc_*
2Makefile
3tvbrowseview_gen.h
4tvfilterview_gen.h
5tvkeyedit_gen.h
6tvbrowseview_gen.cpp
7tvfilterview_gen.cpp
8tvkeyedit_gen.cpp
diff --git a/noncore/apps/tableviewer/ui/browsekeyentry.cpp b/noncore/apps/tableviewer/ui/browsekeyentry.cpp
new file mode 100644
index 0000000..42e24dd
--- a/dev/null
+++ b/noncore/apps/tableviewer/ui/browsekeyentry.cpp
@@ -0,0 +1,206 @@
1/**********************************************************************
2** Copyright (C) 2000 Trolltech AS. All rights reserved.
3**
4** This file is part of Qtopia Environment.
5**
6** This file may be distributed and/or modified under the terms of the
7** GNU General Public License version 2 as published by the Free Software
8** Foundation and appearing in the file LICENSE.GPL included in the
9** packaging of this file.
10**
11** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
12** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
13**
14** See http://www.trolltech.com/gpl/ for GPL licensing information.
15**
16** Contact info@trolltech.com if any conditions of this licensing are
17** not clear to you.
18**
19**********************************************************************/
20#include "browsekeyentry.h"
21#include "commonwidgets.h"
22
23#include <qtoolbutton.h>
24#include <qwidgetstack.h>
25#include <qlayout.h>
26#include <qlineedit.h>
27#include <qpushbutton.h>
28#include <qpopupmenu.h>
29#include <qhbox.h>
30#include <qdatetime.h>
31
32#include <qheader.h>
33// For qWarning(const char *)
34
35/*!
36 \class TVBrowseKeyEntry
37 \brief a Widget used enter keys into the TVBrowseViewWidget
38
39 The TVBrowseKeyEntry Widget provides the facility to enter
40 various key types to be search on in the table. The key can be changed
41 and the entry field will update to the correct sort of widget appropriately
42*/
43
44/*!
45 Constructs the widget
46*/
47TVBrowseKeyEntry::TVBrowseKeyEntry(QWidget *parent, const char *name, WFlags f)
48 : QWidget(parent, name, f)
49{
50 QHBoxLayout *h_layout = new QHBoxLayout(this);
51
52 textKey = new QLineEdit(this, 0);
53 intKey = new IntEdit(this, 0);
54 dateKey = new DateEdit(this, 0);
55 timeKey = new TimeEdit(this, 0);
56
57 resetButton = new QPushButton(this, "reset");
58 resetButton->setMinimumSize(QSize(50, 0));
59 resetButton->setText(tr("Reset"));
60
61 changeKeyButton = new QToolButton(this, "changekey");
62 // TODO The icon stuff.
63 changeKeyButton->setText(tr("key"));
64
65 totalKeys = 0;
66 ts = 0;
67 keyMenu = new QPopupMenu(this, "keymenu");
68
69 ws = new QWidgetStack(this, 0);
70 ws->addWidget(textKey, TVVariant::String);
71 ws->addWidget(intKey, TVVariant::Int);
72 ws->addWidget(timeKey, TVVariant::Time);
73 ws->addWidget(dateKey, TVVariant::Date);
74
75 ws->raiseWidget(TVVariant::String);
76
77 // TODO connect slots and signals....
78 connect(changeKeyButton, SIGNAL(clicked()),
79 this, SLOT(changeKeyMenuSlot()));
80
81 connect(resetButton, SIGNAL(clicked()),
82 textKey, SLOT(clear()));
83 connect(resetButton, SIGNAL(clicked()),
84 intKey, SLOT(clear()));
85 connect(resetButton, SIGNAL(clicked()),
86 dateKey, SLOT(clear()));
87 connect(resetButton, SIGNAL(clicked()),
88 timeKey, SLOT(clear()));
89
90 h_layout->addWidget(ws);
91 h_layout->addWidget(resetButton);
92 h_layout->addWidget(changeKeyButton);
93
94 connect(textKey, SIGNAL(textChanged(const QString&)),
95 this, SLOT(searchOnText()));
96 connect(intKey, SIGNAL(valueChanged(int)),
97 this, SLOT(searchOnText()));
98 connect(dateKey, SIGNAL(valueChanged(const QDate&)),
99 this, SLOT(searchOnText()));
100 connect(timeKey, SIGNAL(valueChanged(const QTime&)),
101 this, SLOT(searchOnText()));
102}
103
104/*!
105 Destructs the widget
106*/
107TVBrowseKeyEntry::~TVBrowseKeyEntry()
108{
109}
110
111/*!
112 Changes which key the user intends to search on
113
114 \param id_param the index of the key future searches should be base on
115*/
116void TVBrowseKeyEntry::changeKeySlot(int id_param)
117{
118 if(ts) {
119 emit sortChanged(id_param);
120 ws->raiseWidget(ts->kRep->getKeyType(ts->current_column));
121 }
122}
123
124/*!
125 Opens the change key menu
126*/
127void TVBrowseKeyEntry::changeKeyMenuSlot()
128{
129 if(ts)
130 keyMenu->exec(changeKeyButton->mapToGlobal(QPoint(0,0)));
131}
132
133
134void TVBrowseKeyEntry::setTableState(TableState *t) {
135 ts = t;
136}
137
138void TVBrowseKeyEntry::rebuildKeys() {
139 int i;
140 if (!ts) return;
141 if (!ts->kRep) return;
142
143 /* clear the old */
144 keyMenu->clear();
145
146 KeyListIterator it(*ts->kRep);
147
148 for (i = 0; i < ts->kRep->getNumFields(); i++) {
149 keyMenu->insertItem(it.current()->name(), this,
150 SLOT(changeKeySlot(int)), 0, i);
151 keyMenu->setItemParameter(i, it.currentKey());
152 ++it;
153 }
154}
155
156void TVBrowseKeyEntry::reset()
157{
158 textKey->clear();
159 intKey->clear();
160 dateKey->clear();
161 timeKey->clear();
162
163 keyMenu->clear();
164}
165/*!
166 Searches on the current value of the key entry provided that the
167 current key is of type text WARNING, TODO fix memory leaks
168*/
169void TVBrowseKeyEntry::searchOnText()
170{
171 TVVariant sendkey;
172
173 if (!ts)
174 return;
175
176 switch(ts->kRep->getKeyType(ts->current_column)) {
177 case TVVariant::String:
178 sendkey = TVVariant(QString(textKey->text()));
179 break;
180 case TVVariant::Int: {
181 sendkey = TVVariant(intKey->value());
182 break;
183 }
184 case TVVariant::Time: {
185 sendkey = TVVariant(QTime(timeKey->time()));
186 break;
187 }
188 case TVVariant::Date: {
189 sendkey = TVVariant(QDate(dateKey->date()));
190 break;
191 }
192 case TVVariant::Invalid:
193 break;
194 default:
195 qWarning("TVBrowseKeyEntry::searchOnText() "
196 "cannot work out data type");
197 return;
198 }
199 emit searchOnKey(ts->current_column, sendkey);
200}
201
202/*! \fn void TVBrowseKeyEntry::searchOnKey(int currentKeyId, TVVariant)
203
204 This signal indicates that a search on key index currentKeyId should be
205 done searching for the value v.
206*/
diff --git a/noncore/apps/tableviewer/ui/browsekeyentry.h b/noncore/apps/tableviewer/ui/browsekeyentry.h
new file mode 100644
index 0000000..220bf6a
--- a/dev/null
+++ b/noncore/apps/tableviewer/ui/browsekeyentry.h
@@ -0,0 +1,75 @@
1/**********************************************************************
2** Copyright (C) 2000 Trolltech AS. All rights reserved.
3**
4** This file is part of Qtopia Environment.
5**
6** This file may be distributed and/or modified under the terms of the
7** GNU General Public License version 2 as published by the Free Software
8** Foundation and appearing in the file LICENSE.GPL included in the
9** packaging of this file.
10**
11** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
12** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
13**
14** See http://www.trolltech.com/gpl/ for GPL licensing information.
15**
16** Contact info@trolltech.com if any conditions of this licensing are
17** not clear to you.
18**
19**********************************************************************/
20#ifndef BrowseKeyEntry_H
21#define BrowseKeyEntry_H
22
23#include <qwidget.h>
24#include "../db/common.h"
25
26/* Forward class declarations */
27class QWidgetStack;
28class QToolButton;
29class QPushButton;
30class QLineEdit;
31class DateEdit;
32class TimeEdit;
33class IntEdit;
34class QPopupMenu;
35class QHBox;
36
37class TVBrowseKeyEntry: public QWidget
38{
39 Q_OBJECT
40public:
41 TVBrowseKeyEntry( QWidget *parent = 0,
42 const char *name = 0, WFlags f = 0 );
43 ~TVBrowseKeyEntry();
44
45 void setTableState(TableState *t);
46 void rebuildKeys();
47 void reset();
48
49signals:
50 void searchOnKey(int keyIndex, TVVariant keyData);
51 void sortChanged(int i);
52
53private slots:
54 void changeKeySlot(int);
55 void changeKeyMenuSlot();
56 void searchOnText();
57
58private:
59 QPushButton *resetButton;
60 QToolButton *changeKeyButton;
61 QPopupMenu *keyMenu;
62 int totalKeys;
63 TableState *ts;
64
65 /* each type of possible data entry will be put on the stack */
66 QWidgetStack *ws;
67
68 /* include widgets for each type of data entry you need here. */
69 QLineEdit *textKey;
70 IntEdit *intKey;
71 DateEdit *dateKey;
72 TimeEdit *timeKey;
73};
74
75#endif
diff --git a/noncore/apps/tableviewer/ui/commonwidgets.cpp b/noncore/apps/tableviewer/ui/commonwidgets.cpp
new file mode 100644
index 0000000..0b4f3c2
--- a/dev/null
+++ b/noncore/apps/tableviewer/ui/commonwidgets.cpp
@@ -0,0 +1,209 @@
1/**********************************************************************
2** Copyright (C) 2000 Trolltech AS. All rights reserved.
3**
4** This file is part of Qtopia Environment.
5**
6** This file may be distributed and/or modified under the terms of the
7** GNU General Public License version 2 as published by the Free Software
8** Foundation and appearing in the file LICENSE.GPL included in the
9** packaging of this file.
10**
11** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
12** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
13**
14** See http://www.trolltech.com/gpl/ for GPL licensing information.
15**
16** Contact info@trolltech.com if any conditions of this licensing are
17** not clear to you.
18**
19**********************************************************************/
20
21#include <qlineedit.h>
22#include <qlayout.h>
23#include <qlabel.h>
24#include <qcombobox.h>
25#include <datebookmonth.h>
26#include <qpopupmenu.h>
27#include <qspinbox.h>
28#include "commonwidgets.h"
29
30DateEdit::DateEdit( QWidget *parent = 0, const char *name = 0, WFlags f = 0 )
31 : QToolButton(parent, name)
32{
33 QPopupMenu *m1 = new QPopupMenu(this);
34 dateSelector = new DateBookMonth(m1, 0, TRUE);
35 m1->insertItem(dateSelector);
36 setPopup(m1);
37 setPopupDelay(0);
38
39 connect(dateSelector, SIGNAL(dateClicked(int, int, int)),
40 this, SLOT(subValueChanged()));
41
42 setText(dateSelector->selectedDate().toString());
43}
44
45
46DateEdit::~DateEdit() {}
47
48QDate DateEdit::date() const
49{
50 return dateSelector->selectedDate();
51}
52
53void DateEdit::setDate(QDate d)
54{
55 dateSelector->setDate(d.year(), d.month(), d.day());
56 setText(d.toString());
57}
58
59QSizePolicy DateEdit::sizePolicy() const
60{
61 QSizePolicy sp;
62 sp.setHorData(QToolButton::sizePolicy().horData());
63 sp.setVerData(QSizePolicy::Fixed);
64
65 return sp;
66}
67
68void DateEdit::clear()
69{
70 QDate today = QDate::currentDate();
71
72 dateSelector->setDate(today.year(), today.month(), today.day());
73 setText(today.toString());
74}
75
76void DateEdit::subValueChanged()
77{
78 QDate current = dateSelector->selectedDate();
79
80 setText(current.toString());
81 emit valueChanged(current);
82}
83
84TimeEdit::TimeEdit( QWidget *parent = 0, const char *name = 0, WFlags f = 0 )
85 : QWidget(parent, name, f)
86{
87 QHBoxLayout *layout = new QHBoxLayout(this, 0);
88
89 layout->addWidget(hourKey = new QSpinBox(1, 12, 1, this));
90 hourKey->setWrapping(true);
91 hourKey->setMinimumWidth(30);
92 hourKey->setMaximumWidth(35);
93
94 layout->addWidget(new QLabel(" : ", this));
95 layout->addWidget(minuteKey = new QSpinBox(0, 59, 1, this));
96 minuteKey->setWrapping(true);
97 minuteKey->setMinimumWidth(30);
98 minuteKey->setMaximumWidth(35);
99
100 layout->addWidget(new QLabel(" : ", this));
101 layout->addWidget(secondKey = new QSpinBox(0, 59, 1, this, 0));
102 secondKey->setWrapping(true);
103 secondKey->setMinimumWidth(30);
104 secondKey->setMaximumWidth(35);
105
106 layout->addWidget(ampm = new QComboBox(this));
107 ampm->insertItem("AM");
108 ampm->insertItem("PM");
109
110 layout->addStretch(-1);
111
112 clear();
113
114 connect(secondKey, SIGNAL(valueChanged(const QString&)),
115 this, SLOT(subValueChanged()));
116 connect(minuteKey, SIGNAL(valueChanged(const QString&)),
117 this, SLOT(subValueChanged()));
118 connect(hourKey, SIGNAL(valueChanged(const QString&)),
119 this, SLOT(subValueChanged()));
120 connect(ampm, SIGNAL(activated(int)),
121 this, SLOT(subValueChanged()));
122}
123
124
125TimeEdit::~TimeEdit() {}
126
127QTime TimeEdit::time() const
128{
129 int s,m,h;
130
131 s = secondKey->text().toInt();
132 m = minuteKey->text().toInt();
133 h = hourKey->text().toInt();
134
135 if(ampm->currentItem() == 1) {
136 /* pm */
137 h = h + 12;
138 }
139 /* hour now ranges 1->24 */
140
141 if (h == 12)
142 h = 0;
143 if (h == 24)
144 h = 12;
145
146 if(QTime::isValid(h, m, s))
147 return QTime(h, m, s);
148 return QTime(0, 0, 0);
149}
150
151void TimeEdit::setTime(QTime t)
152{
153 int h = t.hour();
154 secondKey->setValue(t.second());
155 minuteKey->setValue(t.minute());
156
157 /* h 0..23 */
158 if (h > 11) {
159 h -= 12;
160 ampm->setCurrentItem(1);
161 } else {
162 ampm->setCurrentItem(0);
163 }
164
165 if (h == 0) h = 12;
166 hourKey->setValue(h);
167}
168
169QSizePolicy TimeEdit::sizePolicy() const
170{
171 QSizePolicy sp;
172 sp.setHorData(QSizePolicy::Preferred);
173 sp.setVerData(QSizePolicy::Fixed);
174
175 return sp;
176}
177
178void TimeEdit::clear()
179{
180 secondKey->setValue(0);
181 minuteKey->setValue(0);
182 hourKey->setValue(12);
183
184 ampm->setCurrentItem(0);
185}
186
187void TimeEdit::subValueChanged()
188{
189 emit valueChanged(time());
190}
191
192IntEdit::IntEdit( QWidget *parent = 0, const char *name = 0, WFlags f = 0 )
193 : QSpinBox(INT_MIN, INT_MAX, 1, parent, name)
194{
195 setValue(0);
196}
197
198
199IntEdit::~IntEdit() {}
200
201int IntEdit::value()
202{
203 return cleanText().toInt();
204}
205
206void IntEdit::clear()
207{
208 setValue(0);
209}
diff --git a/noncore/apps/tableviewer/ui/commonwidgets.h b/noncore/apps/tableviewer/ui/commonwidgets.h
new file mode 100644
index 0000000..2a9691f
--- a/dev/null
+++ b/noncore/apps/tableviewer/ui/commonwidgets.h
@@ -0,0 +1,98 @@
1/**********************************************************************
2** Copyright (C) 2000 Trolltech AS. All rights reserved.
3**
4** This file is part of Qtopia Environment.
5**
6** This file may be distributed and/or modified under the terms of the
7** GNU General Public License version 2 as published by the Free Software
8** Foundation and appearing in the file LICENSE.GPL included in the
9** packaging of this file.
10**
11** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
12** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
13**
14** See http://www.trolltech.com/gpl/ for GPL licensing information.
15**
16** Contact info@trolltech.com if any conditions of this licensing are
17** not clear to you.
18**
19**********************************************************************/
20#ifndef Dateedit_H
21#define Dateedit_H
22
23#include <qwidget.h>
24#include <qdatetime.h>
25
26/* inherited classes */
27#include <qtoolbutton.h>
28#include <qspinbox.h>
29
30class DateBookMonth;
31class QComboBox;
32
33class DateEdit : public QToolButton
34{
35 Q_OBJECT
36
37public:
38 DateEdit( QWidget *parent = 0, const char *name = 0, WFlags f = 0 );
39 ~DateEdit();
40
41 QDate date() const;
42 void setDate(QDate);
43
44 QSizePolicy sizePolicy() const;
45signals:
46 void valueChanged(const QDate &);
47
48public slots:
49 void clear();
50private slots:
51 void subValueChanged();
52
53private:
54 DateBookMonth *dateSelector;
55};
56
57class TimeEdit : public QWidget
58{
59 Q_OBJECT
60
61public:
62 TimeEdit( QWidget *parent = 0, const char *name = 0, WFlags f = 0 );
63 ~TimeEdit();
64
65 QTime time() const;
66 void setTime(QTime);
67
68 QSizePolicy sizePolicy() const;
69signals:
70 void valueChanged(const QTime &);
71
72public slots:
73 void clear();
74private slots:
75 void subValueChanged();
76
77private:
78 QSpinBox *secondKey;
79 QSpinBox *minuteKey;
80 QSpinBox *hourKey;
81 QComboBox *ampm;
82};
83
84/* more for consistency than need */
85class IntEdit : public QSpinBox
86{
87 Q_OBJECT
88
89public:
90 IntEdit( QWidget *parent = 0, const char *name = 0, WFlags f = 0 );
91 ~IntEdit();
92
93 int value();
94
95public slots:
96 void clear();
97};
98#endif
diff --git a/noncore/apps/tableviewer/ui/filterkeyentry.cpp b/noncore/apps/tableviewer/ui/filterkeyentry.cpp
new file mode 100644
index 0000000..d108fbd
--- a/dev/null
+++ b/noncore/apps/tableviewer/ui/filterkeyentry.cpp
@@ -0,0 +1,208 @@
1/**********************************************************************
2** Copyright (C) 2000 Trolltech AS. All rights reserved.
3**
4** This file is part of Qtopia Environment.
5**
6** This file may be distributed and/or modified under the terms of the
7** GNU General Public License version 2 as published by the Free Software
8** Foundation and appearing in the file LICENSE.GPL included in the
9** packaging of this file.
10**
11** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
12** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
13**
14** See http://www.trolltech.com/gpl/ for GPL licensing information.
15**
16** Contact info@trolltech.com if any conditions of this licensing are
17** not clear to you.
18**
19**********************************************************************/
20#include "filterkeyentry.h"
21#include "commonwidgets.h"
22
23#include <qwidgetstack.h>
24#include <qcombobox.h>
25#include <qlayout.h>
26#include <qlineedit.h>
27#include <qsizepolicy.h>
28#include <qdatetime.h>
29#include <qhbox.h>
30
31TVFilterKeyEntry::TVFilterKeyEntry(QWidget *parent, const char *name, WFlags f)
32 : QWidget(parent, name, f)
33{
34 int stack_elem = 0;
35
36 layout = new QHBoxLayout(this, 0);
37 layout->setSpacing(0);
38 layout->setMargin(0);
39
40 textEntry = new QHBox(this, 0);
41 textEntry->setSpacing(0);
42 textEntry->setMargin(0);
43
44 intEntry = new QHBox(this, 0);
45 intEntry->setSpacing(0);
46 intEntry->setMargin(0);
47
48 timeEntry = new QHBox(this, 0);
49 timeEntry->setSpacing(0);
50 timeEntry->setMargin(0);
51
52 dateEntry = new QHBox(this, 0);
53 dateEntry->setSpacing(0);
54 dateEntry->setMargin(0);
55
56 textCombo = new QComboBox(textEntry, 0);
57 textKey = new QLineEdit(textEntry, 0);
58
59 /* Build the text combo list */
60 textCombo->insertItem("less than");
61 textCombo->insertItem("more than");
62 textCombo->insertItem("equal to");
63 textCombo->insertItem("containing");
64 textCombo->insertItem("starting with");
65 textCombo->insertItem("ending with");
66
67 intCombo = new QComboBox(intEntry, 0);
68 intKey = new IntEdit(intEntry, 0);
69
70 /* Build the int combo list */
71 intCombo->insertItem("less than");
72 intCombo->insertItem("more than");
73 intCombo->insertItem("equal to");
74
75 timeCombo = new QComboBox(timeEntry, 0);
76 timeKey = new TimeEdit(timeEntry, 0);
77
78 /* Build the time combo list */
79 timeCombo->insertItem("less than");
80 timeCombo->insertItem("more than");
81 timeCombo->insertItem("equal to");
82
83 dateCombo = new QComboBox(dateEntry, 0);
84 dateKey = new DateEdit(dateEntry, 0);
85
86 /* Build the date combo list */
87 dateCombo->insertItem("less than");
88 dateCombo->insertItem("more than");
89 dateCombo->insertItem("equal to");
90
91 ts = 0;
92
93 ws = new QWidgetStack(this, 0);
94 ws->setMargin(0);
95 ws->addWidget(textEntry, TVVariant::String);
96 ws->addWidget(intEntry, TVVariant::Int);
97 ws->addWidget(timeEntry, TVVariant::Time);
98 ws->addWidget(dateEntry, TVVariant::Date);
99
100 /* connect the signals down */
101 connect(textKey, SIGNAL(textChanged(const QString&)),
102 this, SIGNAL(valueChanged()));
103 connect(intKey, SIGNAL(valueChanged(int)),
104 this, SIGNAL(valueChanged()));
105 connect(dateKey, SIGNAL(valueChanged(const QDate&)),
106 this, SIGNAL(valueChanged()));
107 connect(timeKey, SIGNAL(valueChanged(const QTime&)),
108 this, SIGNAL(valueChanged()));
109
110 connect(intCombo, SIGNAL(activated(int)), this, SIGNAL(valueChanged()));
111 connect(textCombo, SIGNAL(activated(int)), this, SIGNAL(valueChanged()));
112 connect(timeCombo, SIGNAL(activated(int)), this, SIGNAL(valueChanged()));
113 connect(dateCombo, SIGNAL(activated(int)), this, SIGNAL(valueChanged()));
114
115 ws->raiseWidget(TVVariant::String);
116 layout->addWidget(ws);
117
118 current_type = TVVariant::String;
119}
120
121/*!
122 Destructs the widget
123*/
124TVFilterKeyEntry::~TVFilterKeyEntry()
125{
126}
127
128void TVFilterKeyEntry::setKey(int i)
129{
130
131 if (!ts) return;
132 if (!ts->kRep) return;
133
134 /* set up to raise appropriate widget set */
135 if (current_type != ts->kRep->getKeyType(i)) {
136 current_type = ts->kRep->getKeyType(i);
137 ws->raiseWidget(current_type);
138 }
139}
140
141void TVFilterKeyEntry::setTableState(TableState *t) {
142 int i;
143 ts = t;
144 if(!t) return;
145 if (!t->kRep)
146 return;
147 if (t->kRep->getNumFields() < 1)
148 return;
149 setKey(0);
150 /* set up the the menu stuff.. */
151}
152
153CmpType TVFilterKeyEntry::getCompareType()
154{
155
156 switch(current_type) {
157 case TVVariant::String: {
158 CmpType k = (CmpType) textCombo->currentItem();
159 return k;
160 }
161 case TVVariant::Int: {
162 CmpType k = (CmpType) intCombo->currentItem();
163 return k;
164 }
165 case TVVariant::Time: {
166 CmpType k = (CmpType) timeCombo->currentItem();
167 return k;
168 }
169 case TVVariant::Date: {
170 CmpType k = (CmpType) dateCombo->currentItem();
171 return k;
172 }
173 default:
174 break;
175 }
176 return ct_equal;
177}
178
179/* MUST return a valid pointer */
180TVVariant TVFilterKeyEntry::getCompareValue()
181{
182 TVVariant sendkey;
183 int tmp;
184
185 switch(current_type) {
186 case TVVariant::String:
187 sendkey = TVVariant(QString(textKey->text()));
188 break;
189 case TVVariant::Int: {
190 sendkey = TVVariant(intKey->value());
191 break;
192 }
193 case TVVariant::Time: {
194 sendkey = TVVariant(QTime(timeKey->time()));
195 break;
196 }
197 case TVVariant::Date: {
198 sendkey = TVVariant(QDate(dateKey->date()));
199 break;
200 }
201 default: {
202 sendkey = TVVariant(0);
203 qWarning("TVFilterKeyEntry::getCompareValue() "
204 "cannot work out data type");
205 }
206 }
207 return sendkey;
208}
diff --git a/noncore/apps/tableviewer/ui/filterkeyentry.h b/noncore/apps/tableviewer/ui/filterkeyentry.h
new file mode 100644
index 0000000..260e250
--- a/dev/null
+++ b/noncore/apps/tableviewer/ui/filterkeyentry.h
@@ -0,0 +1,96 @@
1/**********************************************************************
2** Copyright (C) 2000 Trolltech AS. All rights reserved.
3**
4** This file is part of Qtopia Environment.
5**
6** This file may be distributed and/or modified under the terms of the
7** GNU General Public License version 2 as published by the Free Software
8** Foundation and appearing in the file LICENSE.GPL included in the
9** packaging of this file.
10**
11** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
12** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
13**
14** See http://www.trolltech.com/gpl/ for GPL licensing information.
15**
16** Contact info@trolltech.com if any conditions of this licensing are
17** not clear to you.
18**
19**********************************************************************/
20#ifndef FilterKeyEntry_H
21#define FilterKeyEntry_H
22
23#include <qwidget.h>
24#include <qhbox.h>
25#include <qlayout.h>
26#include "../db/common.h"
27
28/* Forward class declarations */
29class QWidgetStack;
30class QToolButton;
31class QLineEdit;
32class DateEdit;
33class TimeEdit;
34class IntEdit;
35class QPopupMenu;
36class QComboBox;
37
38typedef enum _CmpType {
39 ct_less = 0,
40 ct_more,
41 ct_equal,
42 ct_contains,
43 ct_startswith,
44 ct_endswith
45} CmpType;
46
47
48class TVFilterKeyEntry: public QWidget
49{
50 Q_OBJECT
51public:
52 TVFilterKeyEntry( QWidget *parent = 0,
53 const char *name = 0, WFlags f = 0 );
54 ~TVFilterKeyEntry();
55
56 void setTableState(TableState *t);
57 void setKey(int i);
58
59 CmpType getCompareType();
60 TVVariant getCompareValue();
61
62signals:
63 void valueChanged();
64
65private:
66 /* include widgets for each type of data entry you need here. */
67 QLineEdit *textKey;
68 QComboBox *textCombo;
69 QHBox *textEntry;
70
71 IntEdit *intKey;
72 QComboBox *intCombo;
73 QHBox *intEntry;
74
75 TimeEdit *timeKey;
76 QComboBox *timeCombo;
77 QHBox *timeEntry;
78
79 DateEdit *dateKey;
80 QComboBox *dateCombo;
81 QHBox *dateEntry;
82
83 TableState *ts;
84
85 /* each type of possible data entry will be put on the stack */
86 QWidgetStack *ws;
87
88 /* This allows for the inherited functions dealing with prefered size
89 * etc to simply get the information from the layout.
90 */
91 QHBoxLayout *layout;
92
93 TVVariant::KeyType current_type;
94};
95
96#endif
diff --git a/noncore/apps/tableviewer/ui/tvbrowseview.cpp b/noncore/apps/tableviewer/ui/tvbrowseview.cpp
new file mode 100644
index 0000000..f6da7b1
--- a/dev/null
+++ b/noncore/apps/tableviewer/ui/tvbrowseview.cpp
@@ -0,0 +1,122 @@
1/**********************************************************************
2** Copyright (C) 2000 Trolltech AS. All rights reserved.
3**
4** This file is part of Qtopia Environment.
5**
6** This file may be distributed and/or modified under the terms of the
7** GNU General Public License version 2 as published by the Free Software
8** Foundation and appearing in the file LICENSE.GPL included in the
9** packaging of this file.
10**
11** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
12** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
13**
14** See http://www.trolltech.com/gpl/ for GPL licensing information.
15**
16** Contact info@trolltech.com if any conditions of this licensing are
17** not clear to you.
18**
19**********************************************************************/
20#include "tvbrowseview.h"
21#include "browsekeyentry.h"
22#include <qtoolbutton.h>
23#include <qtextview.h>
24#include <qtextbrowser.h>
25#include <qlayout.h>
26
27/*!
28 \class TVBrowseView
29 \brief The widget describing how to draw the browse view user interface
30
31 This widget allows for the user to browse through the table, one element
32 at a time, or search on a single key. Its main goal is to show a
33 single element in a readable format and make it easy for the user to
34 rapidly find specific elements in the table.
35*/
36
37/*!
38 Constructs a new TVBrowseView widget
39*/
40TVBrowseView::TVBrowseView(TableState *t, QWidget* parent = 0, const char *name = 0,
41 WFlags fl =0)
42{
43 if (!name)
44 setName("BrowseView");
45
46 setSizePolicy(QSizePolicy( QSizePolicy::MinimumExpanding, QSizePolicy::MinimumExpanding, 0, 0, sizePolicy().hasHeightForWidth() ) );
47 QVBoxLayout *vlayout = new QVBoxLayout(this);
48 textViewDisplay = new QTextBrowser(this, "textViewDisplay");
49 vlayout->addWidget( textViewDisplay );
50
51 keyEntry = new TVBrowseKeyEntry(this, "keyEntry");
52 vlayout->addWidget( keyEntry );
53
54 /* connect the signals down */
55
56 connect(keyEntry, SIGNAL(searchOnKey(int, TVVariant)),
57 this, SIGNAL(searchOnKey(int, TVVariant)));
58 connect(keyEntry, SIGNAL(sortChanged(int)),
59 this, SIGNAL(sortChanged(int)));
60
61 ts = t;
62 keyEntry->setTableState(t);
63}
64
65/*!
66 Destroys the TVBrowseView widget
67*/
68TVBrowseView::~TVBrowseView()
69{
70}
71
72void TVBrowseView::rebuildData()
73{
74 if(!ts)
75 return;
76 if(!ts->current_elem) {
77 /* also disable buttons */
78 textViewDisplay->setText("");
79 return;
80 }
81
82 setDisplayText(ts->current_elem);
83}
84
85/* Reset to initial state */
86void TVBrowseView::reset()
87{
88 textViewDisplay->setText("");
89 keyEntry->reset();
90}
91
92/*!
93 sets the data element to be displayed to element
94*/
95void TVBrowseView::setDisplayText(const DataElem *element)
96{
97 QString rep = "";
98
99 KeyListIterator it(*ts->kRep);
100
101 while (it.current()) {
102 if (element->hasValidValue(it.currentKey())) {
103 if(it.currentKey() == ts->current_column) {
104 rep += "<A name=\"ckey\"></A><B><FONT COLOR=#FF0000>"
105 + it.current()->name()
106 + ":</FONT></B> ";
107 } else {
108 rep += "<B>" + it.current()->name() + ":</B> ";
109 }
110 rep += element->toQString(it.currentKey()) + "<BR>";
111 }
112 ++it;
113 }
114
115 textViewDisplay->setText(rep);
116 textViewDisplay->scrollToAnchor("ckey");
117}
118
119void TVBrowseView::rebuildKeys()
120{
121 keyEntry->rebuildKeys();
122}
diff --git a/noncore/apps/tableviewer/ui/tvbrowseview.h b/noncore/apps/tableviewer/ui/tvbrowseview.h
new file mode 100644
index 0000000..1daff1c
--- a/dev/null
+++ b/noncore/apps/tableviewer/ui/tvbrowseview.h
@@ -0,0 +1,55 @@
1/**********************************************************************
2** Copyright (C) 2000 Trolltech AS. All rights reserved.
3**
4** This file is part of Qtopia Environment.
5**
6** This file may be distributed and/or modified under the terms of the
7** GNU General Public License version 2 as published by the Free Software
8** Foundation and appearing in the file LICENSE.GPL included in the
9** packaging of this file.
10**
11** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
12** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
13**
14** See http://www.trolltech.com/gpl/ for GPL licensing information.
15**
16** Contact info@trolltech.com if any conditions of this licensing are
17** not clear to you.
18**
19**********************************************************************/
20#ifndef Tvbrowseview_H
21#define Tvbrowseview_H
22
23#include "../db/common.h"
24#include <qwidget.h>
25
26class QTextBrowser;
27class TVBrowseKeyEntry;
28
29class TVBrowseView : public QWidget
30{
31 Q_OBJECT
32
33signals:
34 void searchOnKey(int keyIndex, TVVariant keyValue);
35 void sortChanged(int);
36
37public:
38 TVBrowseView(TableState *t, QWidget* parent = 0,
39 const char* name = 0, WFlags fl = 0);
40 ~TVBrowseView();
41
42 /* Access Methods */
43 void setDisplayText(const DataElem *);
44 void rebuildKeys();
45 void rebuildData();
46 void reset();
47
48private:
49 TableState *ts;
50
51 QTextBrowser* textViewDisplay;
52 TVBrowseKeyEntry *keyEntry;
53};
54
55#endif
diff --git a/noncore/apps/tableviewer/ui/tveditview.cpp b/noncore/apps/tableviewer/ui/tveditview.cpp
new file mode 100644
index 0000000..ba2bd06
--- a/dev/null
+++ b/noncore/apps/tableviewer/ui/tveditview.cpp
@@ -0,0 +1,235 @@
1/**********************************************************************
2** Copyright (C) 2000 Trolltech AS. All rights reserved.
3**
4** This file is part of Qtopia Environment.
5**
6** This file may be distributed and/or modified under the terms of the
7** GNU General Public License version 2 as published by the Free Software
8** Foundation and appearing in the file LICENSE.GPL included in the
9** packaging of this file.
10**
11** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
12** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
13**
14** See http://www.trolltech.com/gpl/ for GPL licensing information.
15**
16** Contact info@trolltech.com if any conditions of this licensing are
17** not clear to you.
18**
19**********************************************************************/
20
21
22/* The edit view widget. For each key in the DB display an
23 * appropriate edit box, and a 'key' button to change that particular
24 * key information (delete or edit).
25 *
26 * Bottem line should be a 'new key' button. Should be able to scroll
27 * in both directions.
28 */
29
30#include "tveditview.h"
31#include "commonwidgets.h"
32
33#include <qlayout.h>
34#include <qgrid.h>
35#include <qvbox.h>
36#include <qlineedit.h>
37#include <qcheckbox.h>
38#include <qlist.h>
39#include <qlabel.h>
40#include <qscrollview.h>
41#include <qsignalmapper.h>
42
43TVEditView::TVEditView(TableState *s, DataElem *d, QWidget* parent = 0,
44 const char *name = 0, WFlags fl =0) : QDialog(parent, name, true, fl)
45{
46 if (!name)
47 setName("TVEditView");
48
49 QVBoxLayout *layout = new QVBoxLayout(this, 0); /* only so that will resize
50 correctly in other
51 widgets */
52
53 toggles = new QSignalMapper(this);
54 QScrollView *sv = new QScrollView(this, 0);
55 sv->setResizePolicy(QScrollView::AutoOneFit);
56
57 layout->addWidget(sv);
58
59 editDisplay = new QGrid(3, sv, 0);
60 editDisplay->setSpacing(3);
61 sv->addChild(editDisplay);
62
63 connect(toggles, SIGNAL(mapped(int)), this, SLOT(toggleEnabled(int)));
64
65 setData(s, d);
66#ifdef Q_WS_QWS
67 showMaximized();
68#endif
69}
70
71TVEditView::~TVEditView()
72{
73}
74
75/*! set up the widgets in the grid, Set up initial values */
76void TVEditView::setData(TableState *t, DataElem *d)
77{
78
79 /* TODO need to somehow clear old children... a delete of each
80 * child? */
81 keyIds.clear();
82
83 KeyListIterator it(*t->kRep);
84
85 int i = 0;
86 while(it.current()) {
87 if (t->kRep->validIndex(it.currentKey())) {
88 new QLabel(it.current()->name(), editDisplay);
89 keyIds.insert(i, it.currentKey());
90 if (d->hasValidValue(it.currentKey())) {
91 switch(it.current()->type()) {
92 case TVVariant::String: {
93 QLineEdit *edit = new QLineEdit(editDisplay, 0);
94 edit->setText(d->getField(it.currentKey()).toString());
95 edits.append(edit);
96 break;
97 }
98 case TVVariant::Int: {
99 IntEdit *edit = new IntEdit(editDisplay, 0);
100 edit->setValue(d->getField(it.currentKey()).toInt());
101 edits.append(edit);
102 break;
103 }
104 case TVVariant::Time: {
105 TimeEdit *edit = new TimeEdit(editDisplay, 0);
106 edit->setTime(d->getField(it.currentKey()).toTime());
107 edits.append(edit);
108 break;
109 }
110 case TVVariant::Date: {
111 DateEdit *edit = new DateEdit(editDisplay, 0);
112 edit->setDate(d->getField(it.currentKey()).toDate());
113 edits.append(edit);
114 break;
115 }
116 default:
117 edits.append(new QLabel("<B><I>Uknown key type</I></B>", editDisplay));
118 }
119 QCheckBox *tb = new QCheckBox(editDisplay);
120 tb->setChecked(TRUE);
121 toggles->setMapping(tb, i);
122 connect(tb, SIGNAL(clicked()), toggles, SLOT(map()));
123 buttons.append(tb);
124 } else {
125 /* No valid value.. set to null */
126 switch(it.current()->type()) {
127 case TVVariant::String: {
128 QLineEdit *edit = new QLineEdit(editDisplay, 0);
129 edit->setEnabled(false);
130 edits.append(edit);
131 break;
132 }
133 case TVVariant::Int: {
134 IntEdit *edit = new IntEdit(editDisplay, 0);
135 edit->setEnabled(false);
136 edits.append(edit);
137 break;
138 }
139 case TVVariant::Time: {
140 TimeEdit *edit = new TimeEdit(editDisplay, 0);
141 edit->setEnabled(false);
142 edits.append(edit);
143 break;
144 }
145 case TVVariant::Date: {
146 DateEdit *edit = new DateEdit(editDisplay, 0);
147 edit->setEnabled(false);
148 edits.append(edit);
149 break;
150 }
151 default:
152 edits.append(new QLabel("<B><I>Uknown key type</I></B>", editDisplay));
153 }
154 QCheckBox *tb = new QCheckBox(editDisplay);
155 tb->setChecked(FALSE);
156 toggles->setMapping(tb, i);
157 connect(tb, SIGNAL(clicked()), toggles, SLOT(map()));
158 buttons.append(tb);
159 }
160 i++;
161 }
162 ++it;
163 }
164 num_edits = i;
165}
166
167void TVEditView::toggleEnabled(int i) {
168
169 if(edits.at(i)->isEnabled()) {
170 edits.at(i)->setEnabled(false);
171 buttons.at(i)->setChecked(FALSE);
172 } else {
173 edits.at(i)->setEnabled(true);
174 buttons.at(i)->setChecked(TRUE);
175 }
176}
177
178bool TVEditView::openEditItemDialog(TableState *ts, DataElem *d,
179 QWidget *parent)
180{
181 int i;
182 int keyId;
183
184 if(!ts) return 0;
185 if(!d) return 0;
186 if(!ts->kRep) return 0;
187
188 TVEditView *dlg = new TVEditView(ts, d, parent);
189
190 if (dlg->exec() == QDialog::Accepted ) {
191 /* update the element, basically for each
192 edits, if isEnabled, set Value, else unsetField */
193
194 for(i = 0; i < dlg->num_edits; i++) {
195 keyId = dlg->keyIds[i];
196 if(dlg->edits.at(i)->isEnabled()) {
197 switch(d->getFieldType(keyId)) {
198 case TVVariant::String: {
199 TVVariant value = TVVariant(
200 ((QLineEdit *)dlg->edits.at(i))->text());
201 d->setField(keyId, value);
202 break;
203 }
204 case TVVariant::Int: {
205 TVVariant value = TVVariant(
206 ((IntEdit *)dlg->edits.at(i))->value());
207 d->setField(keyId, value);
208 break;
209 }
210 case TVVariant::Time: {
211 TVVariant value = TVVariant(
212 ((TimeEdit *)dlg->edits.at(i))->time());
213 d->setField(keyId, value);
214 break;
215 }
216 case TVVariant::Date: {
217 TVVariant value = TVVariant(
218 ((DateEdit *)dlg->edits.at(i))->date());
219 d->setField(keyId, value);
220 break;
221 }
222 default:
223 break;
224 }
225 } else {
226 /* unset the field */
227 d->unsetField(keyId);
228 }
229 }
230 delete dlg;
231 return TRUE;
232 }
233
234 return FALSE;
235}
diff --git a/noncore/apps/tableviewer/ui/tveditview.h b/noncore/apps/tableviewer/ui/tveditview.h
new file mode 100644
index 0000000..94c51d9
--- a/dev/null
+++ b/noncore/apps/tableviewer/ui/tveditview.h
@@ -0,0 +1,62 @@
1/**********************************************************************
2** Copyright (C) 2000 Trolltech AS. All rights reserved.
3**
4** This file is part of Qtopia Environment.
5**
6** This file may be distributed and/or modified under the terms of the
7** GNU General Public License version 2 as published by the Free Software
8** Foundation and appearing in the file LICENSE.GPL included in the
9** packaging of this file.
10**
11** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
12** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
13**
14** See http://www.trolltech.com/gpl/ for GPL licensing information.
15**
16** Contact info@trolltech.com if any conditions of this licensing are
17** not clear to you.
18**
19**********************************************************************/
20
21#ifndef Tveditview_H
22#define Tveditview_H
23
24#include <qwidget.h>
25#include <qlist.h>
26#include <qdialog.h>
27#include <qmap.h>
28#include "../db/common.h"
29
30class QGrid;
31class QSignalMapper;
32class QCheckBox;
33
34class TVEditView : public QDialog
35{
36 Q_OBJECT
37
38public:
39 TVEditView(TableState *s, DataElem *d, QWidget* parent = 0,
40 const char* name = 0, WFlags fl = 0);
41 ~TVEditView();
42
43 static bool openEditItemDialog(TableState *s, DataElem *d, QWidget *parent);
44
45protected slots:
46 void toggleEnabled(int);
47
48protected:
49
50 void setData(TableState *s, DataElem *d);
51
52 QGrid *editDisplay;
53 QList<QWidget> edits;
54 QList<QCheckBox> buttons;
55 QSignalMapper *toggles;
56
57 QMap<int,int> keyIds;
58
59 int num_edits;
60};
61
62#endif
diff --git a/noncore/apps/tableviewer/ui/tvfilterview.cpp b/noncore/apps/tableviewer/ui/tvfilterview.cpp
new file mode 100644
index 0000000..72d39d6
--- a/dev/null
+++ b/noncore/apps/tableviewer/ui/tvfilterview.cpp
@@ -0,0 +1,304 @@
1/**********************************************************************
2** Copyright (C) 2000 Trolltech AS. All rights reserved.
3**
4** This file is part of Qtopia Environment.
5**
6** This file may be distributed and/or modified under the terms of the
7** GNU General Public License version 2 as published by the Free Software
8** Foundation and appearing in the file LICENSE.GPL included in the
9** packaging of this file.
10**
11** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
12** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
13**
14** See http://www.trolltech.com/gpl/ for GPL licensing information.
15**
16** Contact info@trolltech.com if any conditions of this licensing are
17** not clear to you.
18**
19**********************************************************************/
20#include "tvfilterview.h"
21#include <qtoolbutton.h>
22#include <qcombobox.h>
23#include <qlistview.h>
24#include <qlayout.h>
25#include <qheader.h>
26#include <qpushbutton.h>
27#include <qlabel.h>
28
29TVFilterView::TVFilterView(TableState *t, QWidget* parent = 0,
30 const char *name = 0, WFlags fl =0) : QDialog(parent, name, TRUE, fl)
31{
32 if ( !name )
33 setName( "Filter View" );
34
35 QVBoxLayout *vlayout = new QVBoxLayout(this);
36
37 display = new QListView(this, "display");
38 display->addColumn("Key");
39 display->addColumn("Constraint");
40 display->addColumn("Value");
41 display->header()->setClickEnabled(FALSE);
42 display->header()->setResizeEnabled(FALSE);
43
44 vlayout->addWidget(display);
45
46 QHBoxLayout *hlayout = new QHBoxLayout;
47 hlayout->addItem(new QSpacerItem(20, 20, QSizePolicy::Expanding, QSizePolicy::Minimum));
48
49 newFilterButton = new QPushButton(this, "new Filter");
50 newFilterButton->setMaximumSize(QSize(50, 32767));
51 newFilterButton->setText("New");
52 hlayout->addWidget(newFilterButton);
53
54 deleteFilterButton = new QPushButton(this, "delete Filter");
55 deleteFilterButton->setMaximumSize(QSize(50, 32767));
56 deleteFilterButton->setText("Delete");
57 hlayout->addWidget(deleteFilterButton);
58
59 clearFilterButton = new QPushButton(this, "delete Filter");
60 clearFilterButton->setMaximumSize(QSize(60, 32767));
61 clearFilterButton->setText("Clear All");
62 hlayout->addWidget(clearFilterButton);
63
64 vlayout->addLayout(hlayout);
65
66 QHBoxLayout *hlayout2 = new QHBoxLayout;
67
68 keyNameCombo = new QComboBox(FALSE, this, "key name");
69 keyNameCombo->setEnabled(FALSE);
70 hlayout2->addWidget(keyNameCombo);
71
72 QLabel *label = new QLabel(this);
73 label->setText("has value");
74 hlayout2->addWidget(label);
75
76 keyEntry = new TVFilterKeyEntry(this, "key entry");
77 keyEntry->setEnabled(FALSE);
78
79 vlayout->addLayout(hlayout2);
80 vlayout->addWidget(keyEntry);
81
82 connect(newFilterButton, SIGNAL( clicked() ), this, SLOT( newTerm() ));
83 connect(deleteFilterButton, SIGNAL( clicked() ), this, SLOT( deleteTerm()));
84 connect(clearFilterButton, SIGNAL( clicked() ), this, SLOT( clearTerms()));
85
86 connect(keyEntry, SIGNAL(valueChanged()), this, SLOT( updateTerm() ));
87 connect(keyNameCombo, SIGNAL(activated(int)), this, SLOT( updateTerm() ));
88
89 connect(display, SIGNAL(selectionChanged(QListViewItem*)), this,
90 SLOT(setTerm(QListViewItem *)));
91
92 ts = t;
93 current = 0;
94 terms.setAutoDelete(true);
95 do_filter = false;
96
97#ifdef Q_WS_QWS
98 showMaximized();
99#endif
100}
101
102/*!
103 Destroys the TVFilterView widget
104*/
105TVFilterView::~TVFilterView()
106{
107}
108
109void TVFilterView::rebuildData()
110{
111}
112
113void TVFilterView::reset()
114{
115 keyNameCombo->clear();
116 keyIds.clear();
117}
118
119void TVFilterView::rebuildKeys()
120{
121 int i;
122
123 if (!ts) return;
124 if(!ts->kRep) return;
125 keyEntry->setTableState(ts);
126
127 /* set up the list of keys that can be compared on */
128 keyNameCombo->clear();
129 KeyListIterator it(*ts->kRep);
130
131 i = 0;
132 while(it.current()) {
133 if(ts->kRep->validIndex(it.currentKey())) {
134 keyNameCombo->insertItem(it.current()->name());
135 keyIds.insert(i, it.currentKey());
136 ++i;
137 }
138 ++it;
139 }
140}
141
142bool TVFilterView::passesFilter(DataElem *d) {
143 if (!filterActive()) return true;
144
145
146 FilterTerm *t;
147
148 for (t = terms.first(); t != 0; t = terms.next() ) {
149 /* check against filter */
150 switch(t->ct) {
151 case ct_less:
152 if (!d->lessThan(t->keyIndex, t->value))
153 return false;
154 break;
155 case ct_more:
156 if (!d->moreThan(t->keyIndex, t->value))
157 return false;
158 break;
159 case ct_equal:
160 if (!d->equalTo(t->keyIndex, t->value))
161 return false;
162 break;
163 case ct_contains:
164 if (!d->contains(t->keyIndex, t->value))
165 return false;
166 break;
167 case ct_startswith:
168 if (!d->startsWith(t->keyIndex, t->value))
169 return false;
170 break;
171 case ct_endswith:
172 if (!d->endsWith(t->keyIndex, t->value))
173 return false;
174 break;
175 default:
176 qWarning("TVFilterView::passesFilter() "
177 "unrecognized filter type");
178 return false;
179 }
180 }
181 return true;
182}
183
184bool TVFilterView::filterActive() const
185{
186 /* when button operated, also check the do_filter value
187 return do_filter;
188 */
189 if (terms.isEmpty())
190 return false;
191 return true;
192}
193
194/* SLOTS */
195void TVFilterView::newTerm()
196{
197 if (!ts) return;
198
199 FilterTerm *term = new FilterTerm;
200 current = term;
201
202 term->view = 0;
203
204 updateTerm();
205
206 display->setSelected(term->view, true);
207 terms.append(term);
208
209 keyEntry->setEnabled(true);
210 keyNameCombo->setEnabled(true);
211}
212
213void TVFilterView::updateTerm()
214{
215 FilterTerm *term;
216 /* Read the widget values (keyname, compare type, value)
217 * and build the lists */
218 if (!ts) return;
219 if (!current) return;
220
221 QString keyString;
222 QString cmpString;
223 QString vString;
224
225 term = current;
226
227 /* create new list item, set initial values, enable widgets */
228 term->keyIndex = keyIds[keyNameCombo->currentItem()];
229 keyEntry->setKey(term->keyIndex); /* so the next two items make sense */
230 term->ct = keyEntry->getCompareType(),
231 term->value = keyEntry->getCompareValue();
232
233 keyString = keyNameCombo->currentText();
234
235 switch(term->ct) {
236 case ct_less:
237 cmpString = " less than ";
238 break;
239 case ct_more:
240 cmpString = " more than ";
241 break;
242 case ct_equal:
243 cmpString = " equal to ";
244 break;
245 case ct_contains:
246 cmpString = " containing ";
247 break;
248 case ct_startswith:
249 cmpString = " starting with ";
250 break;
251 case ct_endswith:
252 cmpString = " ending with ";
253 break;
254 default:
255 cmpString = " ERROR ";
256 }
257
258 vString = term->value.toString();
259
260 /* remove old view */
261 if (term->view)
262 delete(term->view);
263 term->view = new QListViewItem(display, 0, keyString, cmpString, vString);
264 display->setSelected(term->view, true);
265}
266
267/* deletes current term */
268void TVFilterView::deleteTerm()
269{
270 if(!current) return;
271 if (current->view)
272 delete(current->view);
273
274 terms.removeRef(current);
275
276 current = terms.first();
277
278 if(terms.isEmpty()) {
279 keyEntry->setEnabled(false);
280 keyNameCombo->setEnabled(false);
281 }
282}
283
284/* clears all terminations */
285void TVFilterView::clearTerms()
286{
287 while(current)
288 deleteTerm();
289}
290
291void TVFilterView::setTerm(QListViewItem *target)
292{
293 /* Iterate through the list to find item with view=target..
294 * set as current, delete */
295 FilterTerm *term = current;
296
297 for (current = terms.first(); current != 0; current = terms.next() )
298 if (current->view == target)
299 break;
300
301 if (!current) {
302 current = term;
303 }
304}
diff --git a/noncore/apps/tableviewer/ui/tvfilterview.h b/noncore/apps/tableviewer/ui/tvfilterview.h
new file mode 100644
index 0000000..5de87b9
--- a/dev/null
+++ b/noncore/apps/tableviewer/ui/tvfilterview.h
@@ -0,0 +1,88 @@
1/**********************************************************************
2** Copyright (C) 2000 Trolltech AS. All rights reserved.
3**
4** This file is part of Qtopia Environment.
5**
6** This file may be distributed and/or modified under the terms of the
7** GNU General Public License version 2 as published by the Free Software
8** Foundation and appearing in the file LICENSE.GPL included in the
9** packaging of this file.
10**
11** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
12** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
13**
14** See http://www.trolltech.com/gpl/ for GPL licensing information.
15**
16** Contact info@trolltech.com if any conditions of this licensing are
17** not clear to you.
18**
19**********************************************************************/
20#ifndef Tvfilterview_H
21#define Tvfilterview_H
22
23#include "filterkeyentry.h"
24#include "../db/common.h"
25#include <qlist.h>
26#include <qmap.h>
27#include <qdialog.h>
28
29class QListViewItem;
30class QPushButton;
31class QListView;
32class TVFilterKeyEntry;
33
34class TVFilterView : public QDialog
35{
36 Q_OBJECT
37
38signals:
39 void editView();
40 void listView();
41 void browseView();
42 void loadFile();
43
44protected slots:
45 void newTerm();
46 void deleteTerm();
47 void clearTerms();
48 void updateTerm();
49 void setTerm(QListViewItem *);
50
51public:
52 TVFilterView(TableState *t, QWidget* parent = 0, const char* name = 0, WFlags fl = 0);
53 ~TVFilterView();
54
55 /* Access Methods */
56 void rebuildKeys();
57 void rebuildData();
58 void reset();
59
60 bool passesFilter(DataElem *d);
61 bool filterActive() const; /* return true if and only if filtering is on */
62
63 QListView* display;
64 QPushButton* newFilterButton;
65 QPushButton* deleteFilterButton;
66 QPushButton* clearFilterButton;
67 QComboBox* keyNameCombo;
68
69 TVFilterKeyEntry* keyEntry;
70private:
71
72 typedef struct _FilterTerm {
73 int keyIndex;
74 CmpType ct;
75 TVVariant value;
76 QListViewItem *view;
77 } FilterTerm;
78
79 QList<FilterTerm> terms;
80 FilterTerm *current;
81 bool do_filter;
82
83 TableState *ts;
84
85 QMap<int, int> keyIds;
86};
87
88#endif
diff --git a/noncore/apps/tableviewer/ui/tvkeyedit.cpp b/noncore/apps/tableviewer/ui/tvkeyedit.cpp
new file mode 100644
index 0000000..fb7b7fe
--- a/dev/null
+++ b/noncore/apps/tableviewer/ui/tvkeyedit.cpp
@@ -0,0 +1,254 @@
1/**********************************************************************
2** Copyright (C) 2000 Trolltech AS. All rights reserved.
3**
4** This file is part of Qtopia Environment.
5**
6** This file may be distributed and/or modified under the terms of the
7** GNU General Public License version 2 as published by the Free Software
8** Foundation and appearing in the file LICENSE.GPL included in the
9** packaging of this file.
10**
11** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
12** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
13**
14** See http://www.trolltech.com/gpl/ for GPL licensing information.
15**
16** Contact info@trolltech.com if any conditions of this licensing are
17** not clear to you.
18**
19**********************************************************************/
20#include "tvkeyedit.h"
21#include <qtoolbutton.h>
22#include <qlineedit.h>
23#include <qcombobox.h>
24#include <qlistview.h>
25#include <qmessagebox.h>
26#include <stdlib.h>
27#include <qpushbutton.h>
28
29/* QList view item... ?? that can store and update the values that I will
30 * be changing */
31
32class TVKEListViewItem : public QListViewItem
33{
34public:
35 TVKEListViewItem(QString n, TVVariant::KeyType kt, int p, QListView *parent) :
36 QListViewItem(parent)
37 {
38 name = n;
39 keyType = kt;
40 position = p;
41 }
42
43 QString text(int i) const
44 {
45 if(i) {
46 return TVVariant::typeToName(keyType);
47 }
48 return name;
49 }
50
51 /* always sort by key index, ignore i */
52 QString key(int, bool) const
53 {
54 return QString().sprintf("%08d", position);
55 }
56
57 void setText(int i, const QString &)
58 {
59 ;
60 }
61
62 QString getName() const
63 {
64 return name;
65 }
66
67 void setName(QString n)
68 {
69 name = n;
70 repaint();
71 }
72
73 TVVariant::KeyType getKeyType() const
74 {
75 return keyType;
76 }
77
78 void setKeyType(TVVariant::KeyType k)
79 {
80 keyType = k;
81 repaint();
82 }
83
84 inline int getPos() const
85 {
86 return position;
87 }
88
89private:
90 QString name;
91 TVVariant::KeyType keyType;
92 int position;
93};
94
95TVKeyEdit::TVKeyEdit(TableState *t, QWidget* parent = 0, const char *name = 0,
96 WFlags fl = 0) : TVKeyEdit_gen(parent, name, true, fl)
97{
98 int i;
99 ts = t;
100
101 if(!ts) return;
102 if(!ts->kRep) return;
103
104 working_state = *ts->kRep;
105
106 i = 1;
107 keyTypeEdit->insertItem(TVVariant::typeToName((TVVariant::KeyType)i));
108 i++;
109 keyTypeEdit->insertItem(TVVariant::typeToName((TVVariant::KeyType)i));
110 i++;
111 keyTypeEdit->insertItem(TVVariant::typeToName((TVVariant::KeyType)i));
112 i++;
113 keyTypeEdit->insertItem(TVVariant::typeToName((TVVariant::KeyType)i));
114
115 KeyListIterator it(*ts->kRep);
116 while(it.current()) {
117 if(t->kRep->validIndex(it.currentKey())) {
118 new TVKEListViewItem(it.current()->name(),
119 it.current()->type(),
120 it.currentKey(),
121 display);
122 }
123 ++it;
124 }
125 num_keys = ts->kRep->getNumFields();
126 if(display->childCount() > 0) {
127 display->setCurrentItem(display->firstChild());
128 setTerm(display->currentItem());
129 } else {
130 deleteKeyButton->setEnabled(FALSE);
131 clearKeysButton->setEnabled(FALSE);
132 keyNameEdit->setEnabled(FALSE);
133 keyTypeEdit->setEnabled(FALSE);
134 }
135
136 display->setSorting(0);
137#ifdef Q_WS_QWS
138 showMaximized();
139#endif
140}
141
142/*!
143 Destroys the TVKeyEdit widget
144*/
145TVKeyEdit::~TVKeyEdit()
146{
147}
148
149/* SLOTS */
150void TVKeyEdit::newTerm()
151{
152 /* new item, make current Item */
153 int i;
154
155 i = working_state.addKey("<New Key>", TVVariant::String);
156 //working_state.setNewFlag(i, TRUE);
157 TVKEListViewItem *nItem = new TVKEListViewItem("<New Key>",
158 TVVariant::String,
159 i,
160 display);
161 display->setCurrentItem(nItem);
162 setTerm(nItem);
163
164 num_keys++;
165 if(display->childCount() == 1) {
166 deleteKeyButton->setEnabled(TRUE);
167 clearKeysButton->setEnabled(TRUE);
168 keyNameEdit->setEnabled(TRUE);
169 keyTypeEdit->setEnabled(TRUE);
170 }
171}
172
173void TVKeyEdit::updateTerm(const QString &newName)
174{
175 /* TODO if name matches a deleted term, prompt for
176 renewing old data instead */
177 TVKEListViewItem *i = (TVKEListViewItem *)display->currentItem();
178 if(i) {
179 i->setName(newName);
180 working_state.setKeyName(i->getPos(), newName);
181 }
182}
183
184void TVKeyEdit::updateTerm(int t)
185{
186 /* t is an index to a combo in a menu, NOT a type */
187 t++; /* menu counts from 0, types count from 1 */
188 TVKEListViewItem *i = (TVKEListViewItem *)display->currentItem();
189 if (i) {
190 i->setKeyType((TVVariant::KeyType)t);
191 working_state.setKeyType(i->getPos(), (TVVariant::KeyType)t);
192 }
193}
194
195/* deletes current term
196 * really just marks key as deleted so is now invalid.
197 * the actual delete will happen when data is 'cleaned'
198 * or when file is saved.
199 */
200
201void TVKeyEdit::deleteTerm()
202{
203 TVKEListViewItem *i = (TVKEListViewItem *)display->currentItem();
204 if (i) {
205 working_state.setDeleteFlag(i->getPos(), TRUE);
206 delete i;
207 }
208 if(!display->childCount()) {
209 /* disable the delete and clear buttons, etc */
210 deleteKeyButton->setEnabled(FALSE);
211 clearKeysButton->setEnabled(FALSE);
212 keyNameEdit->setEnabled(FALSE);
213 keyTypeEdit->setEnabled(FALSE);
214 }
215}
216
217/* clears all terminations */
218void TVKeyEdit::clearTerms()
219{
220 /* should pop up a warning */
221 if (QMessageBox::warning(this, "Delete all keys",
222 "Are you sure you want to\ndelete all the keys?",
223 "Yes", "No") == 0)
224 {
225 while(display->currentItem())
226 deleteTerm();
227 }
228}
229
230void TVKeyEdit::setTerm(QListViewItem *target)
231{
232 /* need to update the widgets to show keys values */
233 keyNameEdit->setText(((TVKEListViewItem *)target)->getName());
234 int t = (int)(((TVKEListViewItem *)target)->getKeyType());
235 t--;
236 keyTypeEdit->setCurrentItem(t);
237}
238
239KeyList* TVKeyEdit::openEditKeysDialog(TableState *t, QWidget *parent = 0)
240{
241 if(!t)
242 return 0;
243 if(!t->kRep)
244 return 0;
245
246 TVKeyEdit *dlg = new TVKeyEdit(t, parent);
247
248 if ((dlg->exec() == QDialog::Accepted) &&
249 (dlg->working_state != *t->kRep))
250 {
251 return (new KeyList(dlg->working_state));
252 }
253 return 0;
254}
diff --git a/noncore/apps/tableviewer/ui/tvkeyedit.h b/noncore/apps/tableviewer/ui/tvkeyedit.h
new file mode 100644
index 0000000..5e80b66
--- a/dev/null
+++ b/noncore/apps/tableviewer/ui/tvkeyedit.h
@@ -0,0 +1,56 @@
1/**********************************************************************
2** Copyright (C) 2000 Trolltech AS. All rights reserved.
3**
4** This file is part of Qtopia Environment.
5**
6** This file may be distributed and/or modified under the terms of the
7** GNU General Public License version 2 as published by the Free Software
8** Foundation and appearing in the file LICENSE.GPL included in the
9** packaging of this file.
10**
11** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
12** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
13**
14** See http://www.trolltech.com/gpl/ for GPL licensing information.
15**
16** Contact info@trolltech.com if any conditions of this licensing are
17** not clear to you.
18**
19**********************************************************************/
20#ifndef Tvkeyedit_H
21#define Tvkeyedit_H
22
23#include "tvkeyedit_gen.h"
24#include "../db/common.h"
25
26class TVKeyEdit : public TVKeyEdit_gen
27{
28 Q_OBJECT
29
30signals:
31 void listView();
32 void browseView();
33
34protected slots:
35 void newTerm();
36 void deleteTerm();
37 void clearTerms();
38 void updateTerm(int);
39 void updateTerm(const QString &);
40 void setTerm(QListViewItem *);
41
42public:
43 TVKeyEdit(TableState *ts, QWidget* parent = 0, const char* name = 0, WFlags fl = 0);
44 ~TVKeyEdit();
45
46
47 static KeyList *openEditKeysDialog(TableState *ts, QWidget *parent);
48
49private:
50
51 TableState *ts;
52 int num_keys;
53 KeyList working_state;
54};
55
56#endif
diff --git a/noncore/apps/tableviewer/ui/tvkeyedit_gen.ui b/noncore/apps/tableviewer/ui/tvkeyedit_gen.ui
new file mode 100644
index 0000000..5c19d06
--- a/dev/null
+++ b/noncore/apps/tableviewer/ui/tvkeyedit_gen.ui
@@ -0,0 +1,239 @@
1<!DOCTYPE UI><UI>
2<class>TVKeyEdit_gen</class>
3<comment>Dialog for editing the keys and key types</comment>
4<author>Ian Walters</author>
5<forward>class QListViewItem;</forward>
6<widget>
7 <class>QDialog</class>
8 <property stdset="1">
9 <name>name</name>
10 <cstring>TVKeyEdit_gen</cstring>
11 </property>
12 <property stdset="1">
13 <name>geometry</name>
14 <rect>
15 <x>0</x>
16 <y>0</y>
17 <width>194</width>
18 <height>418</height>
19 </rect>
20 </property>
21 <property stdset="1">
22 <name>caption</name>
23 <string>TableViewer - Edit Keys</string>
24 </property>
25 <vbox>
26 <property stdset="1">
27 <name>margin</name>
28 <number>0</number>
29 </property>
30 <property stdset="1">
31 <name>spacing</name>
32 <number>0</number>
33 </property>
34 <widget>
35 <class>QListView</class>
36 <column>
37 <property>
38 <name>text</name>
39 <string>Key Name</string>
40 </property>
41 <property>
42 <name>clickable</name>
43 <bool>false</bool>
44 </property>
45 <property>
46 <name>resizeable</name>
47 <bool>false</bool>
48 </property>
49 </column>
50 <column>
51 <property>
52 <name>text</name>
53 <string>Key Type</string>
54 </property>
55 <property>
56 <name>clickable</name>
57 <bool>false</bool>
58 </property>
59 <property>
60 <name>resizeable</name>
61 <bool>false</bool>
62 </property>
63 </column>
64 <property stdset="1">
65 <name>name</name>
66 <cstring>display</cstring>
67 </property>
68 </widget>
69 <widget>
70 <class>QLayoutWidget</class>
71 <property stdset="1">
72 <name>name</name>
73 <cstring>Layout4</cstring>
74 </property>
75 <hbox>
76 <property stdset="1">
77 <name>margin</name>
78 <number>0</number>
79 </property>
80 <property stdset="1">
81 <name>spacing</name>
82 <number>6</number>
83 </property>
84 <spacer>
85 <property>
86 <name>name</name>
87 <cstring>Spacer2</cstring>
88 </property>
89 <property stdset="1">
90 <name>orientation</name>
91 <enum>Horizontal</enum>
92 </property>
93 <property stdset="1">
94 <name>sizeType</name>
95 <enum>Expanding</enum>
96 </property>
97 <property>
98 <name>sizeHint</name>
99 <size>
100 <width>20</width>
101 <height>20</height>
102 </size>
103 </property>
104 </spacer>
105 <widget>
106 <class>QPushButton</class>
107 <property stdset="1">
108 <name>name</name>
109 <cstring>newKeyButton</cstring>
110 </property>
111 <property stdset="1">
112 <name>maximumSize</name>
113 <size>
114 <width>50</width>
115 <height>32767</height>
116 </size>
117 </property>
118 <property stdset="1">
119 <name>text</name>
120 <string>New</string>
121 </property>
122 </widget>
123 <widget>
124 <class>QPushButton</class>
125 <property stdset="1">
126 <name>name</name>
127 <cstring>deleteKeyButton</cstring>
128 </property>
129 <property stdset="1">
130 <name>maximumSize</name>
131 <size>
132 <width>50</width>
133 <height>32767</height>
134 </size>
135 </property>
136 <property stdset="1">
137 <name>text</name>
138 <string>Delete</string>
139 </property>
140 </widget>
141 <widget>
142 <class>QPushButton</class>
143 <property stdset="1">
144 <name>name</name>
145 <cstring>clearKeysButton</cstring>
146 </property>
147 <property stdset="1">
148 <name>maximumSize</name>
149 <size>
150 <width>60</width>
151 <height>32767</height>
152 </size>
153 </property>
154 <property stdset="1">
155 <name>text</name>
156 <string>Clear All</string>
157 </property>
158 </widget>
159 </hbox>
160 </widget>
161 <widget>
162 <class>QLayoutWidget</class>
163 <property stdset="1">
164 <name>name</name>
165 <cstring>Layout3</cstring>
166 </property>
167 <hbox>
168 <property stdset="1">
169 <name>margin</name>
170 <number>0</number>
171 </property>
172 <property stdset="1">
173 <name>spacing</name>
174 <number>6</number>
175 </property>
176 <widget>
177 <class>QLineEdit</class>
178 <property stdset="1">
179 <name>name</name>
180 <cstring>keyNameEdit</cstring>
181 </property>
182 </widget>
183 <widget>
184 <class>QComboBox</class>
185 <property stdset="1">
186 <name>name</name>
187 <cstring>keyTypeEdit</cstring>
188 </property>
189 </widget>
190 </hbox>
191 </widget>
192 </vbox>
193</widget>
194<connections>
195 <connection>
196 <sender>newKeyButton</sender>
197 <signal>clicked()</signal>
198 <receiver>TVKeyEdit_gen</receiver>
199 <slot>newTerm()</slot>
200 </connection>
201 <connection>
202 <sender>deleteKeyButton</sender>
203 <signal>clicked()</signal>
204 <receiver>TVKeyEdit_gen</receiver>
205 <slot>deleteTerm()</slot>
206 </connection>
207 <connection>
208 <sender>clearKeysButton</sender>
209 <signal>clicked()</signal>
210 <receiver>TVKeyEdit_gen</receiver>
211 <slot>clearTerms()</slot>
212 </connection>
213 <connection>
214 <sender>display</sender>
215 <signal>selectionChanged(QListViewItem*)</signal>
216 <receiver>TVKeyEdit_gen</receiver>
217 <slot>setTerm(QListViewItem *)</slot>
218 </connection>
219 <connection>
220 <sender>keyNameEdit</sender>
221 <signal>textChanged(const QString&amp;)</signal>
222 <receiver>TVKeyEdit_gen</receiver>
223 <slot>updateTerm(const QString &amp;)</slot>
224 </connection>
225 <connection>
226 <sender>keyTypeEdit</sender>
227 <signal>activated(int)</signal>
228 <receiver>TVKeyEdit_gen</receiver>
229 <slot>updateTerm(int)</slot>
230 </connection>
231 <slot access="protected">clearTerms()</slot>
232 <slot access="protected">deleteTerm()</slot>
233 <slot access="protected">newTerm()</slot>
234 <slot access="public">new_slot()</slot>
235 <slot access="protected">setTerm(QListViewItem *)</slot>
236 <slot access="protected">updateTerm(int)</slot>
237 <slot access="protected">updateTerm(const QString &amp;)</slot>
238</connections>
239</UI>
diff --git a/noncore/apps/tableviewer/ui/tvlistview.cpp b/noncore/apps/tableviewer/ui/tvlistview.cpp
new file mode 100644
index 0000000..82d67c6
--- a/dev/null
+++ b/noncore/apps/tableviewer/ui/tvlistview.cpp
@@ -0,0 +1,315 @@
1/**********************************************************************
2** Copyright (C) 2000 Trolltech AS. All rights reserved.
3**
4** This file is part of Qtopia Environment.
5**
6** This file may be distributed and/or modified under the terms of the
7** GNU General Public License version 2 as published by the Free Software
8** Foundation and appearing in the file LICENSE.GPL included in the
9** packaging of this file.
10**
11** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
12** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
13**
14** See http://www.trolltech.com/gpl/ for GPL licensing information.
15**
16** Contact info@trolltech.com if any conditions of this licensing are
17** not clear to you.
18**
19**********************************************************************/
20#include "tvlistview.h"
21#include "../db/common.h"
22#include <qtoolbutton.h>
23#include <qlistview.h>
24#include <qlayout.h>
25
26void TVListViewPrivate::setColumnWidth(int column, int width)
27{
28 if(width > 70) width = 70;
29 QListView::setColumnWidth(column, width);
30}
31
32void TVListViewPrivate::setSorting(int column, bool increasing)
33{
34 emit sortChanged(column);
35 QListView::setSorting(column, increasing);
36}
37
38TVListViewPrivate::TVListViewPrivate(QWidget *parent, const char* name,
39 WFlags fl) : QListView(parent, name, fl) {
40 ;
41}
42
43class TVListViewItem : public QListViewItem
44{
45public:
46
47 TVListViewItem(QListView *parent, DataElem *d);
48 ~TVListViewItem();
49
50 QString text(int i) const
51 {
52 return data_reference->toQString(i);
53 }
54
55 /* Do nothing... all data for this item should be generated */
56 void setText(int i, const QString &)
57 {
58 ;
59 }
60 QString key(int i, bool a) const
61 {
62 return data_reference->toSortableQString(i);
63 }
64
65 void setDataElem(DataElem *d)
66 {
67 data_reference = d;
68 }
69
70 DataElem *getDataElem() {
71 return data_reference;
72 }
73private:
74 DataElem *data_reference;
75};
76
77TVListViewItem::TVListViewItem(QListView *parent, DataElem *d)
78 : QListViewItem(parent)
79{
80 data_reference = d;
81}
82
83TVListViewItem::~TVListViewItem()
84{
85 data_reference = 0;
86}
87
88TVListView::TVListView(TableState *t, QWidget* parent = 0,
89 const char *name = 0, WFlags fl =0) : QWidget(parent, name, fl)
90{
91 if (!name)
92 setName("TVListView");
93
94 // the next two lines need to be rationalized.
95 resize(318,457);
96 setSizePolicy(QSizePolicy((QSizePolicy::SizeType)7,
97 (QSizePolicy::SizeType)7, sizePolicy().hasHeightForWidth()));
98 setCaption(tr("List View"));
99
100 QVBoxLayout *layout = new QVBoxLayout(this);
101 layout->setSpacing(0);
102 layout->setMargin(0);
103
104 listViewDisplay = new TVListViewPrivate(this, "listViewDisplay");
105 layout->addWidget(listViewDisplay);
106
107 connect(listViewDisplay, SIGNAL(currentChanged(QListViewItem *)), this,
108 SLOT(setCurrent(QListViewItem *)));
109 connect(listViewDisplay, SIGNAL(sortChanged(int)), this,
110 SLOT(setSorting(int)));
111
112 listViewDisplay->setShowSortIndicator(true);
113
114 it = new QListViewItemIterator(listViewDisplay);
115 ts = t;
116}
117
118TVListView::~TVListView()
119{
120}
121
122void TVListView::addItem(DataElem *d)
123{
124 TVListViewItem *i = new TVListViewItem(listViewDisplay, d);
125
126 delete it;
127 it = new QListViewItemIterator(i);
128}
129
130/* remove current (it) item */
131void TVListView::removeItem()
132{
133 QListViewItemIterator other(*it);
134
135 QListViewItemIterator tmp = *it;
136 (*it)++;
137 if (!it->current()) {
138 *it = tmp;
139 (*it)--;
140 if (!it->current()) {
141 delete it;
142 it = 0;
143 }
144 }
145
146 delete other.current();
147}
148
149void TVListView::clearItems()
150{
151 /* This is ok since the destructor for TVListItem does not know about
152 the data_reference pointer.. and hence will leave it alone */
153 listViewDisplay->clear();
154 delete it;
155 it = new QListViewItemIterator(listViewDisplay);
156}
157
158void TVListView::first()
159{
160 delete it;
161 it = new QListViewItemIterator(listViewDisplay);
162}
163
164void TVListView::last()
165{
166 qWarning("TVListView::last not yet implemented");
167}
168
169void TVListView::next()
170{
171 QListViewItemIterator tmp = *it;
172 (*it)++;
173 if (!it->current()) {
174 *it = tmp;
175 }
176}
177
178void TVListView::previous()
179{
180 QListViewItemIterator tmp = *it;
181 (*it)--;
182 if (!it->current()) {
183 *it = tmp;
184 }
185}
186
187DataElem *TVListView::getCurrentData() {
188 if (it->current()) {
189 return ((TVListViewItem *)it->current())->getDataElem();
190 }
191 return NULL;
192}
193
194/*! Now to implement the closest match function */
195void TVListView::findItem(int keyId, TVVariant value)
196{
197 QListViewItem *i;
198 TVListViewItem *best_so_far = NULL;
199 /* start at the beginning... go through till find the closest elem */
200 i = listViewDisplay->firstChild();
201 while (i) {
202 /* search stuff */
203 if(best_so_far) {
204 if (DataElem::closer(
205 ((TVListViewItem *)i)->getDataElem(),
206 best_so_far->getDataElem(), value, keyId))
207 best_so_far = (TVListViewItem *)i;
208 } else {
209 if (DataElem::closer(
210 ((TVListViewItem *)i)->getDataElem(),
211 NULL, value, keyId))
212 best_so_far = (TVListViewItem *)i;
213 }
214
215 i = i->itemBelow();
216 }
217 if (best_so_far) {
218 /* set best_so_far to current element */
219 delete it;
220 it = new QListViewItemIterator(best_so_far);
221 }
222}
223
224void TVListView::rebuildKeys()
225{
226 int i;
227 if(!ts) return;
228 if(!ts->kRep) return;
229
230 i = listViewDisplay->columns();
231
232 while(i > 0)
233 listViewDisplay->removeColumn(--i);
234
235 KeyListIterator kit(*ts->kRep);
236 i = 0;
237 while(kit.current()) {
238 if(!kit.current()->delFlag()) {
239 listViewDisplay->addColumn(kit.current()->name());
240 keyIds.insert(i, kit.currentKey());
241 ++i;
242 }
243 ++kit;
244 }
245}
246
247
248void TVListView::setSorting(int column)
249{
250 /* Without table state can't do anything */
251 if (ts == 0)
252 return;
253 if (keyIds[column] != ts->current_column) {
254 ts->current_column = keyIds[column];
255 }
256}
257
258void TVListView::rebuildData() {
259 int i;
260 QMap<int, int>::Iterator kit;
261 /* Need to set sort order */
262 if(!ts)
263 return;
264
265 /* revers lookup the column */
266 i = -1;
267 for(kit = keyIds.begin(); kit != keyIds.end(); ++kit) {
268 if (kit.data() == ts->current_column) {
269 i = kit.key();
270 break;
271 }
272 }
273 if (i == -1)
274 return;
275
276 listViewDisplay->setSorting(i);
277 listViewDisplay->sort();
278
279 /* reset current element */
280 listViewDisplay->setCurrentItem(it->current());
281 listViewDisplay->setSelected(it->current(), true);
282 listViewDisplay->ensureItemVisible(it->current());
283}
284
285void TVListView::reset()
286{
287 int i;
288 listViewDisplay->clear();
289
290 i = listViewDisplay->columns();
291 while (i > 0)
292 listViewDisplay->removeColumn(--i);
293
294 keyIds.clear();
295}
296
297void TVListView::setCurrent(QListViewItem *i)
298{
299 /* cast */
300 TVListViewItem *t = (TVListViewItem *)i;
301
302 if(!t) {
303 /* set current to null */
304 ts->current_elem = 0;
305 return;
306 }
307
308 ts->current_elem = t->getDataElem();
309 /* now also set up the iterator */
310
311 delete it;
312 it = new QListViewItemIterator(i);
313
314 //emit browseView();
315}
diff --git a/noncore/apps/tableviewer/ui/tvlistview.h b/noncore/apps/tableviewer/ui/tvlistview.h
new file mode 100644
index 0000000..26bc299
--- a/dev/null
+++ b/noncore/apps/tableviewer/ui/tvlistview.h
@@ -0,0 +1,92 @@
1/**********************************************************************
2** Copyright (C) 2000 Trolltech AS. All rights reserved.
3**
4** This file is part of Qtopia Environment.
5**
6** This file may be distributed and/or modified under the terms of the
7** GNU General Public License version 2 as published by the Free Software
8** Foundation and appearing in the file LICENSE.GPL included in the
9** packaging of this file.
10**
11** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
12** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
13**
14** See http://www.trolltech.com/gpl/ for GPL licensing information.
15**
16** Contact info@trolltech.com if any conditions of this licensing are
17** not clear to you.
18**
19**********************************************************************/
20
21#ifndef Tvlistview_H
22#define Tvlistview_H
23
24#include "../db/common.h"
25#include <qlistview.h>
26#include <qmap.h>
27
28class QListViewItemIterator;
29
30class TVListViewPrivate : public QListView
31{
32 Q_OBJECT
33
34signals:
35 void sortChanged(int i);
36
37public:
38 TVListViewPrivate( QWidget *parent = 0, const char *name = 0, WFlags fl = 0);
39
40 void setColumnWidth(int c, int w);
41 void setSorting(int i, bool increasing=true);
42};
43
44class TVListView : public QWidget
45{
46 Q_OBJECT
47
48signals:
49 void loadFile();
50 void browseView();
51 void filterView();
52 void editView();
53
54protected slots:
55 void setSorting(int);
56 void setCurrent(QListViewItem *);
57
58public:
59 TVListView(TableState *t, QWidget* parent = 0,
60 const char* name = 0, WFlags fl = 0);
61 ~TVListView();
62
63 /* to be used for setting up the list */
64 void addItem(DataElem *);
65 void removeItem(); // remove from list, not from program
66 void clearItems();
67
68 /* DBStore clone functions */
69 void first();
70 void last();
71 void next();
72 void previous();
73
74 void rebuildKeys();
75 void rebuildData();
76 void reset();
77
78 DataElem *getCurrentData();
79
80 void findItem(int i, TVVariant v);
81
82protected:
83 QListViewItemIterator *it;
84 TableState *ts;
85
86 TVListViewPrivate *listViewDisplay;
87
88 QMap<int, int> keyIds;
89
90};
91
92#endif