001: /*
002: * Copyright (c) 2000 Sun Microsystems. All Rights Reserved.
003: */
004:
005: package demo;
006:
007: import soif.CSID;
008: import soif.Schema;
009: import soif.SchemaColNode;
010: import soif.SchemaTblNode;
011: import soif.SOIF;
012: import soif.SOIFParser;
013: import soif.Taxonomy;
014: import soif.TaxonomyNode;
015: import soif.SchemaGetter;
016: import soif.TaxonomyGetter;
017:
018: import java.applet.Applet;
019: import java.awt.Button;
020: import java.awt.Checkbox;
021: import java.awt.Event;
022: import java.awt.AWTEvent;
023: import java.awt.FlowLayout;
024: import java.awt.Frame;
025: import java.awt.Cursor;
026:
027: /**
028: * Applet that obtains metadata. Demonstrates obtaining and using
029: * a schema and a taxonomy. If set to be "serverless", uses hard
030: * coded strings, useful for serverless testing.
031: */
032: public class MetaData extends Applet {
033: Button taxBtn;
034: Button schemaBtn;
035: Checkbox server;
036: Frame parentFrame;
037: String CGILocation;
038: String CGITarget;
039: String TaxRead;
040: String SchemaRead;
041: CSID csid;
042:
043: /**
044: * Initialize the applet.
045: */
046: public void init() {
047: System.out.println("MetaData demonstration");
048:
049: parentFrame = null;
050: Object o = getParent();
051: if (o instanceof Frame) {
052: parentFrame = (Frame) o;
053: parentFrame.setCursor(new Cursor(Cursor.WAIT_CURSOR));
054: }
055:
056: taxBtn = new Button("Taxonomy");
057: schemaBtn = new Button("Schema");
058: server = new Checkbox("Server");
059: server.setState(false);
060:
061: setLayout(new FlowLayout(FlowLayout.CENTER));
062: add(taxBtn);
063: add(schemaBtn);
064: add(server);
065:
066: if (parentFrame != null)
067: parentFrame.setCursor(new Cursor(Cursor.DEFAULT_CURSOR));
068: }
069:
070: /**
071: * Set the CSID. Since it is always called when a server
072: * schema or taxonomy request is made, and since it always
073: * reobtains the parameters, it is possible to alter the
074: * page's target on the fly.
075: */
076: private boolean setCSID() {
077: boolean valid = true;
078:
079: /* supply the path for the location of the
080: ** CGI directory of the hosting server,
081: ** needed to access sendrdm.cgi.
082: */
083: CGILocation = getParameter("CGILocation");
084: if (CGILocation == null) {
085: System.out.println("CGILocation parameter not specified");
086: valid = false;
087: }
088:
089: CGITarget = getParameter("CGITarget");
090: if (CGITarget == null) {
091: System.out.println("CGITarget parameter not specified");
092: valid = false;
093: }
094:
095: SchemaRead = getParameter("SchemaRead");
096: if (SchemaRead == null) {
097: System.out.println("SchemaRead parameter not specified");
098: valid = false;
099: }
100:
101: TaxRead = getParameter("TaxRead");
102: if (TaxRead == null) {
103: System.out.println("TaxRead parameter not specified");
104: valid = false;
105: }
106:
107: /* The Compass Server ID (CSID) needs to know:
108: * 1) this page's codeBase
109: * 2) CS host
110: * 3) CS port
111: * 4) CS name
112: */
113:
114: /* this method reads directly off the applet parameters
115: * and does the error checking itself.
116: */
117: csid = new CSID(getCodeBase().toString(), getParameter("host"),
118: getParameter("port"), getParameter("name"));
119:
120: if (csid.isValid() == false) {
121: valid = false;
122: }
123:
124: return valid;
125: }
126:
127: /**
128: * Process event.
129: * @param e AWTEvent
130: */
131: public synchronized void processEvent(AWTEvent e) {
132: if (e.getID() == Event.ACTION_EVENT) {
133:
134: if (parentFrame != null)
135: parentFrame.setCursor(new Cursor(Cursor.WAIT_CURSOR));
136: server.setEnabled(false);
137: taxBtn.setEnabled(false);
138: schemaBtn.setEnabled(false);
139:
140: if (e.getSource() == taxBtn) {
141:
142: Taxonomy t = null;
143:
144: if (server.getState()) {
145:
146: if (setCSID()) {
147: String cgi = CGILocation + CGITarget;
148: TaxonomyGetter tg = new TaxonomyGetter(cgi,
149: TaxRead + "&", csid);
150: tg.start();
151: tg.waitFor();
152: t = tg.getTaxonomy();
153: }
154: } else {
155:
156: SOIFParser slp = new SOIFParser(taxString());
157: SOIF sl = slp.getSOIF();
158: t = new Taxonomy(sl);
159: }
160:
161: if (t != null) {
162: System.out.println("taxonomyId: "
163: + t.getTaxonomyId());
164:
165: t.binaryTree.resetEnumeration();
166:
167: while (t.binaryTree.hasMoreElements(true)) {
168: t.binaryTree.nextElement(true);
169: TaxonomyNode tn = (TaxonomyNode) t.binaryTree
170: .getValue();
171: StringBuffer indent = new StringBuffer();
172: for (int i = 0; i <= t.binaryTree
173: .getUnaryDepth(); i++)
174: indent.append(" ");
175: System.out.println(indent.toString()
176: + tn.getId());
177: }
178: }
179: }
180:
181: if (e.getSource() == schemaBtn) {
182:
183: Schema s = null;
184:
185: if (server.getState()) {
186: if (setCSID()) {
187: String cgi = CGILocation + CGITarget;
188: System.out.println(cgi + SchemaRead);
189: SchemaGetter sg = new SchemaGetter(cgi,
190: SchemaRead + "&", csid);
191: sg.start();
192: sg.waitFor();
193: s = sg.getSchema();
194: }
195: } else {
196: SOIFParser slp = new SOIFParser(schString());
197: SOIF sl = slp.getSOIF();
198: s = new Schema(sl);
199: }
200:
201: if (s != null) {
202:
203: System.out.println("schemaName: " + s.schemaName);
204: System.out.println("url: " + s.url);
205:
206: s.binaryTree.resetEnumeration();
207:
208: while (s.binaryTree.hasMoreElements(true)) {
209:
210: s.binaryTree.nextElement(true);
211: Object o = s.binaryTree.getValue();
212: StringBuffer indent = new StringBuffer();
213: for (int i = 0; i <= s.binaryTree
214: .getUnaryDepth(); i++)
215: indent.append(" ");
216: if (o instanceof SchemaTblNode) {
217: System.out.println(indent.toString() + "<"
218: + ((SchemaTblNode) o).getLabel()
219: + ">");
220: } else {
221: /* Note: some of the attributes are on
222: * the SchemaColNode, but many aren't.
223: * Additional attributes may be accessed by using the
224: * AVPairs/SOIF style getValue() method.
225: */
226: System.out.println(indent.toString()
227: + ((SchemaColNode) o).getLabel()
228: + ": "
229: + ((SchemaColNode) o)
230: .getValue("data-type"));
231: }
232: }
233: }
234: }
235:
236: taxBtn.setEnabled(true);
237: schemaBtn.setEnabled(true);
238: server.setEnabled(true);
239: if (parentFrame != null)
240: parentFrame
241: .setCursor(new Cursor(Cursor.DEFAULT_CURSOR));
242:
243: }
244:
245: super .processEvent(e);
246: }
247:
248: private String schString() {
249: return "@SCHEMA { -\n"
250: + "table-name-9{9}: Documents\n"
251: + "column-name-6{14}: Content Length\n"
252: + "in-root-table-12{1}: 1\n"
253: + "foreign-key-system-table-name-26{9}: authortbl\n"
254: + "system-table-name-22{9}: authortbl\n"
255: + "foreign-key-system-table-name-34{7}: addrtbl\n"
256: + "system-table-name-30{7}: addrtbl\n"
257: + "content-type-23{18}: application/rfc822\n"
258: + "in-root-table-5{1}: 1\n"
259: + "table-name-16{9}: Documents\n"
260: + "system-table-name-53{8}: classtbl\n"
261: + "table-name-48{10}: Taxonomies\n"
262: + "soif-attribute-2{8}: Abstract\n"
263: + "data-type-12{4}: blob\n"
264: + "soif-attribute-23{12}: Author-EMail\n"
265: + "soif-attribute-31{11}: Address-ZIP\n"
266: + "system-column-name-19{5}: title\n"
267: + "column-name-12{9}: Full Text\n"
268: + "system-column-name-23{5}: email\n"
269: + "soif-attribute-40{20}: fkey-phone-author-id\n"
270: + "system-column-name-35{8}: authorid\n"
271: + "system-column-name-9{5}: depth\n"
272: + "column-name-40{8}: AuthorId\n"
273: + "table-name-8{9}: Documents\n"
274: + "column-name-7{12}: Content Type\n"
275: + "data-type-6{3}: int\n"
276: + "column-name-64{5}: Month\n"
277: + "system-table-name-23{9}: authortbl\n"
278: + "foreign-key-system-table-name-35{9}: authortbl\n"
279: + "in-root-table-2{1}: 1\n"
280: + "foreign-key-system-table-name-45{6}: doctbl\n"
281: + "table-name-17{9}: Documents\n"
282: + "system-table-name-40{8}: phonetbl\n"
283: + "system-table-name-52{8}: classtbl\n"
284: + "soif-attribute-3{15}: Content-Charset\n"
285: + "data-type-13{6}: string\n"
286: + "table-name-63{10}: Statistics\n"
287: + "soif-attribute-30{13}: Address-State\n"
288: + "system-column-name-18{3}: toc\n"
289: + "default-view-order-19{1}: 1\n"
290: + "system-column-name-20{3}: url\n"
291: + "soif-attribute-41{24}: fkey-phone-author-doc-id\n"
292: + "foreign-key-system-column-name-62{2}: id\n"
293: + "system-column-name-34{6}: addrid\n"
294: + "soif-attribute-53{17}: fkey-class-tax-id\n"
295: + "system-column-name-8{7}: created\n"
296: + "column-name-39{2}: Id\n"
297: + "number-of-entries{2}: 66\n"
298: + "column-name-41{11}: AuthorDocID\n"
299: + "is-internal-48{1}: 1\n"
300: + "column-name-65{10}: Cumulative\n"
301: + "is-internal-64{1}: 1\n"
302: + "system-table-name-20{6}: doctbl\n"
303: + "foreign-key-system-table-name-36{6}: doctbl\n"
304: + "in-root-table-3{1}: 1\n"
305: + "table-name-10{9}: Documents\n"
306: + "system-table-name-41{8}: phonetbl\n"
307: + "foreign-key-system-table-name-56{6}: doctbl\n"
308: + "system-table-name-55{5}: rdtbl\n"
309: + "table-name-58{21}: Resource Descriptions\n"
310: + "data-type-14{6}: string\n"
311: + "table-name-62{10}: Statistics\n"
312: + "index-attribute-57{2}: 10\n"
313: + "data-type-22{3}: int\n"
314: + "foreign-key-system-column-name-45{2}: id\n"
315: + "soif-attribute-33{12}: phoneaddr-id\n"
316: + "system-column-name-21{2}: id\n"
317: + "soif-attribute-46{14}: References-URL\n"
318: + "system-column-name-33{2}: id\n"
319: + "soif-attribute-52{17}: fkey-class-doc-id\n"
320: + "column-name-38{4}: Type\n"
321: + "column-name-42{6}: Number\n"
322: + "is-internal-49{1}: 1\n"
323: + "column-name-1{2}: Id\n"
324: + "is-internal-65{1}: 1\n"
325: + "system-table-name-21{9}: authortbl\n"
326: + "table-name-11{9}: Documents\n"
327: + "system-table-name-42{8}: phonetbl\n"
328: + "system-table-name-54{8}: classtbl\n"
329: + "soif-attribute-1{6}: doc-id\n"
330: + "table-name-59{21}: Resource Descriptions\n"
331: + "data-type-15{4}: date\n"
332: + "table-name-61{10}: Statistics\n"
333: + "index-attribute-54{1}: 9\n"
334: + "data-type-21{6}: serial\n"
335: + "soif-attribute-32{15}: Address-Country\n"
336: + "foreign-key-system-column-name-56{2}: id\n"
337: + "data-type-49{3}: int\n"
338: + "soif-attribute-47{16}: References-Title\n"
339: + "system-column-name-32{7}: country\n"
340: + "soif-attribute-51{17}: classification-id\n"
341: + "soif-attribute-60{15}: RD-Generated-By\n"
342: + "system-column-name-48{2}: id\n"
343: + "column-name-43{4}: Type\n"
344: + "column-name-51{2}: Id\n"
345: + "column-name-2{8}: Abstract\n"
346: + "is-internal-62{1}: 1\n"
347: + "enforce-uniqueness-16{1}: 1\n"
348: + "in-root-table-1{1}: 1\n"
349: + "table-name-12{9}: Documents\n"
350: + "system-table-name-43{8}: phonetbl\n"
351: + "system-table-name-57{5}: rdtbl\n"
352: + "soif-attribute-6{14}: Content-Length\n"
353: + "table-name-60{20}: Resource Description\n"
354: + "system-column-name-15{3}: lmt\n"
355: + "data-type-48{6}: serial\n"
356: + "soif-attribute-44{13}: references-id\n"
357: + "system-column-name-31{3}: zip\n"
358: + "soif-attribute-50{8}: Taxonomy\n"
359: + "soif-attribute-61{7}: stat-id\n"
360: + "system-column-name-49{5}: docid\n"
361: + "column-name-44{2}: Id\n"
362: + "column-name-50{4}: Name\n"
363: + "column-name-3{15}: Content Charset\n"
364: + "is-internal-59{1}: 1\n"
365: + "in-root-table-19{1}: 1\n"
366: + "is-internal-63{1}: 1\n"
367: + "foreign-key-system-table-name-41{6}: doctbl\n"
368: + "table-name-13{9}: Documents\n"
369: + "system-table-name-44{6}: reftbl\n"
370: + "system-table-name-56{5}: rdtbl\n"
371: + "content-type-46{15}: application/url\n"
372: + "soif-attribute-7{12}: Content-Type\n"
373: + "data-type-17{4}: blob\n"
374: + "data-type-27{3}: int\n"
375: + "data-type-33{6}: serial\n"
376: + "system-column-name-14{8}: keywords\n"
377: + "column-name-19{5}: Title\n"
378: + "soif-attribute-45{16}: fkey-refs-doc-id\n"
379: + "system-column-name-30{5}: state\n"
380: + "soif-attribute-57{10}: RD-Expires\n"
381: + "soif-attribute-62{16}: fkey-stat-doc-id\n"
382: + "column-name-45{5}: DocID\n"
383: + "is-internal-44{1}: 1\n"
384: + "column-name-53{5}: TaxID\n"
385: + "is-internal-58{1}: 1\n"
386: + "system-column-name-62{5}: docid\n"
387: + "in-root-table-18{1}: 1\n"
388: + "is-internal-60{1}: 1\n"
389: + "system-table-name-19{6}: doctbl\n"
390: + "foreign-key-system-table-name-40{9}: authortbl\n"
391: + "system-table-name-45{6}: reftbl\n"
392: + "foreign-key-system-table-name-52{6}: doctbl\n"
393: + "index-attribute-24{1}: 7\n"
394: + "soif-attribute-4{16}: Content-Encoding\n"
395: + "default-view-attribute-10{1}: 2\n"
396: + "data-type-26{3}: int\n"
397: + "foreign-key-system-column-name-41{2}: id\n"
398: + "system-column-name-17{11}: partialtext\n"
399: + "column-name-18{17}: Table of Contents\n"
400: + "index-attribute-8{1}: 1\n"
401: + "data-type-58{4}: date\n"
402: + "soif-attribute-56{14}: fkey-rd-doc-id\n"
403: + "soif-attribute-63{20}: Popularity-This-Week\n"
404: + "column-name-46{3}: URL\n"
405: + "is-internal-45{1}: 1\n"
406: + "system-column-name-59{6}: origin\n"
407: + "column-name-52{5}: DocID\n"
408: + "system-column-name-63{4}: week\n"
409: + "is-internal-61{1}: 1\n"
410: + "system-table-name-18{6}: doctbl\n"
411: + "system-table-name-46{6}: reftbl\n"
412: + "foreign-key-system-table-name-53{6}: taxtbl\n"
413: + "index-attribute-19{1}: 5\n"
414: + "system-table-name-62{7}: stattbl\n"
415: + "table-name-41{6}: Phones\n"
416: + "soif-attribute-5{16}: Content-Language\n"
417: + "table-name-65{10}: Statistics\n"
418: + "data-type-25{6}: serial\n"
419: + "foreign-key-system-column-name-40{2}: id\n"
420: + "system-column-name-16{3}: md5\n"
421: + "foreign-key-system-column-name-52{2}: id\n"
422: + "data-type-45{3}: int\n"
423: + "column-name-26{2}: Id\n"
424: + "soif-attribute-55{5}: rd-id\n"
425: + "soif-attribute-64{21}: Popularity-This-Month\n"
426: + "column-name-47{5}: Title\n"
427: + "system-column-name-58{3}: lmt\n"
428: + "column-name-55{2}: Id\n"
429: + "system-column-name-60{5}: genby\n"
430: + "system-table-name-47{6}: reftbl\n"
431: + "system-table-name-63{7}: stattbl\n"
432: + "table-name-40{6}: Phones\n"
433: + "foreign-key-system-column-name-22{2}: id\n"
434: + "table-name-64{10}: Statistics\n"
435: + "system-column-name-11{7}: expires\n"
436: + "data-type-36{3}: int\n"
437: + "foreign-key-system-column-name-53{2}: id\n"
438: + "data-type-44{6}: serial\n"
439: + "column-name-27{5}: DocID\n"
440: + "soif-attribute-54{14}: Classification\n"
441: + "soif-attribute-65{21}: Popularity-Cumulative\n"
442: + "column-name-48{2}: Id\n"
443: + "column-name-54{4}: Name\n"
444: + "is-internal-55{1}: 1\n"
445: + "system-column-name-61{2}: id\n"
446: + "system-table-name-60{5}: rdtbl\n"
447: + "table-name-43{6}: Phones\n"
448: + "system-table-name-9{6}: doctbl\n"
449: + "system-column-name-10{11}: description\n"
450: + "column-name-24{4}: Name\n"
451: + "is-internal-39{1}: 1\n"
452: + "column-name-49{5}: DocID\n"
453: + "is-internal-40{1}: 1\n"
454: + "column-name-57{7}: Expires\n"
455: + "column-name-8{7}: Created\n"
456: + "system-table-name-15{6}: doctbl\n"
457: + "index-attribute-14{1}: 3\n"
458: + "table-name-29{9}: Addresses\n"
459: + "index-attribute-20{1}: 6\n"
460: + "system-table-name-61{7}: stattbl\n"
461: + "table-name-42{6}: Phones\n"
462: + "soif-attribute-8{7}: Created\n"
463: + "table-name-50{10}: Taxonomies\n"
464: + "system-table-name-8{6}: doctbl\n"
465: + "data-type-34{3}: int\n"
466: + "system-column-name-13{5}: genby\n"
467: + "column-name-25{2}: Id\n"
468: + "column-name-37{6}: Number\n"
469: + "is-internal-41{1}: 1\n"
470: + "column-name-56{5}: DocID\n"
471: + "is-internal-57{1}: 1\n"
472: + "column-name-9{5}: Depth\n"
473: + "system-table-name-14{6}: doctbl\n"
474: + "index-attribute-15{1}: 4\n"
475: + "table-name-28{9}: Addresses\n"
476: + "table-name-45{10}: References\n"
477: + "soif-attribute-9{5}: Depth\n"
478: + "table-name-51{15}: Classifications\n"
479: + "foreign-key-system-column-name-27{2}: id\n"
480: + "soif-attribute-19{5}: Title\n"
481: + "system-column-name-12{8}: fulltext\n"
482: + "data-type-35{3}: int\n"
483: + "data-type-41{3}: int\n"
484: + "column-name-22{5}: DocID\n"
485: + "data-type-55{6}: serial\n"
486: + "system-column-name-5{9}: clanguage\n"
487: + "column-name-36{11}: AuthorDocID\n"
488: + "column-name-59{6}: Origin\n"
489: + "is-internal-56{1}: 1\n"
490: + "system-column-name-64{5}: month\n"
491: + "system-table-name-17{6}: doctbl\n"
492: + "table-name-27{7}: Authors\n"
493: + "is-internal-1{1}: 1\n"
494: + "foreign-key-system-table-name-62{6}: doctbl\n"
495: + "table-name-44{10}: References\n"
496: + "table-name-52{15}: Classifications\n"
497: + "foreign-key-system-column-name-26{2}: id\n"
498: + "soif-attribute-18{17}: Table-of-Contents\n"
499: + "foreign-key-system-column-name-34{2}: id\n"
500: + "soif-attribute-28{14}: Address-Street\n"
501: + "data-type-40{3}: int\n"
502: + "column-name-23{5}: Email\n"
503: + "is-internal-22{1}: 1\n"
504: + "data-type-56{3}: int\n"
505: + "system-column-name-4{9}: cencoding\n"
506: + "column-name-35{8}: AuthorId\n"
507: + "system-column-name-40{8}: authorid\n"
508: + "system-column-name-41{9}: authdocid\n"
509: + "table-name-3{9}: Documents\n"
510: + "column-name-58{13}: Last Modified\n"
511: + "is-internal-51{1}: 1\n"
512: + "last-modified{29}: Thu, 16 May 1996 00:00:00 GMT\n"
513: + "system-column-name-65{10}: cumulative\n"
514: + "data-type-9{3}: int\n"
515: + "in-root-table-20{1}: 1\n"
516: + "system-table-name-16{6}: doctbl\n"
517: + "table-name-26{9}: Addresses\n"
518: + "system-table-name-59{5}: rdtbl\n"
519: + "table-name-38{20}: Phones for Addresses\n"
520: + "system-table-name-64{7}: stattbl\n"
521: + "table-name-47{10}: References\n"
522: + "default-view-attribute-19{1}: 1\n"
523: + "table-name-53{15}: Classifications\n"
524: + "data-type-18{4}: blob\n"
525: + "soif-attribute-17{12}: Partial-Text\n"
526: + "foreign-key-system-column-name-35{2}: id\n"
527: + "system-table-name-5{6}: doctbl\n"
528: + "soif-attribute-29{12}: Address-City\n"
529: + "column-name-20{3}: URL\n"
530: + "data-type-57{4}: date\n"
531: + "column-name-34{6}: AddrId\n"
532: + "system-column-name-7{5}: ctype\n"
533: + "system-column-name-42{6}: number\n"
534: + "table-name-2{9}: Documents\n"
535: + "is-internal-50{1}: 1\n"
536: + "data-type-8{4}: date\n"
537: + "system-table-name-11{6}: doctbl\n"
538: + "content-type-16{15}: application/md5\n"
539: + "system-table-name-39{8}: phonetbl\n"
540: + "table-name-25{9}: Addresses\n"
541: + "system-table-name-58{5}: rdtbl\n"
542: + "table-name-39{6}: Phones\n"
543: + "system-table-name-65{7}: stattbl\n"
544: + "table-name-46{10}: References\n"
545: + "table-name-54{15}: Classifications\n"
546: + "default-view-attribute-24{1}: 4\n"
547: + "soif-attribute-16{3}: MD5\n"
548: + "foreign-key-system-column-name-36{2}: id\n"
549: + "index-attribute-58{2}: 11\n"
550: + "system-table-name-4{6}: doctbl\n"
551: + "foreign-key-system-column-name-49{2}: id\n"
552: + "column-name-21{2}: Id\n"
553: + "column-name-33{2}: Id\n"
554: + "system-column-name-6{7}: clength\n"
555: + "data-type-65{3}: int\n"
556: + "system-column-name-43{4}: Type\n"
557: + "table-name-1{9}: Documents\n"
558: + "system-column-name-51{2}: id\n"
559: + "is-internal-53{1}: 1\n"
560: + "system-table-name-10{6}: doctbl\n"
561: + "maintainer{35}: compass-server-support@netscape.com\n"
562: + "system-table-name-38{12}: phoneaddrtbl\n"
563: + "index-attribute-11{1}: 2\n"
564: + "table-name-24{7}: Authors\n"
565: + "table-name-36{20}: Phones for Addresses\n"
566: + "table-name-55{21}: Resource Descriptions\n"
567: + "soif-attribute-15{13}: Last-Modified\n"
568: + "system-table-name-7{6}: doctbl\n"
569: + "soif-attribute-39{8}: phone-id\n"
570: + "soif-attribute-48{11}: taxonomy-id\n"
571: + "is-internal-21{1}: 1\n"
572: + "data-type-51{6}: serial\n"
573: + "system-column-name-1{2}: id\n"
574: + "column-name-32{7}: Country\n"
575: + "is-internal-33{1}: 1\n"
576: + "data-type-64{3}: int\n"
577: + "system-column-name-44{2}: id\n"
578: + "system-column-name-50{4}: name\n"
579: + "is-internal-52{1}: 1\n"
580: + "in-root-table-15{1}: 1\n"
581: + "system-table-name-13{6}: doctbl\n"
582: + "system-table-name-37{12}: phoneaddrtbl\n"
583: + "system-table-name-48{6}: taxtbl\n"
584: + "table-name-23{7}: Authors\n"
585: + "table-name-37{20}: Phones for Addresses\n"
586: + "table-name-56{21}: Resource Descriptions\n"
587: + "soif-attribute-14{8}: Keywords\n"
588: + "soif-attribute-24{6}: Author\n"
589: + "system-table-name-6{6}: doctbl\n"
590: + "soif-attribute-38{14}: Phoneaddr-Type\n"
591: + "column-name-15{13}: Last Modified\n"
592: + "system-column-name-28{6}: street\n"
593: + "soif-attribute-49{15}: fkey-tax-doc-id\n"
594: + "is-internal-26{1}: 1\n"
595: + "data-type-52{3}: int\n"
596: + "column-name-31{8}: ZIP Code\n"
597: + "system-column-name-45{5}: docid\n"
598: + "table-name-7{9}: Documents\n"
599: + "system-column-name-53{5}: taxid\n"
600: + "in-root-table-14{1}: 1\n"
601: + "system-table-name-12{6}: doctbl\n"
602: + "system-table-name-28{7}: addrtbl\n"
603: + "system-table-name-36{12}: phoneaddrtbl\n"
604: + "table-name-18{9}: Documents\n"
605: + "system-table-name-49{6}: taxtbl\n"
606: + "table-name-22{7}: Authors\n"
607: + "table-name-34{20}: Phones for Addresses\n"
608: + "table-name-57{21}: Resource Descriptions\n"
609: + "soif-attribute-13{12}: Generated-By\n"
610: + "schema-name{8}: DOCUMENT\n"
611: + "system-table-name-1{6}: doctbl\n"
612: + "soif-attribute-25{10}: address-id\n"
613: + "column-name-14{8}: Keywords\n"
614: + "system-column-name-29{4}: city\n"
615: + "is-internal-27{1}: 1\n"
616: + "data-type-53{3}: int\n"
617: + "column-name-30{5}: State\n"
618: + "system-column-name-3{8}: ccharset\n"
619: + "data-type-63{3}: int\n"
620: + "system-column-name-46{3}: url\n"
621: + "table-name-6{9}: Documents\n"
622: + "system-column-name-52{5}: docid\n"
623: + "column-name-62{5}: DocID\n"
624: + "in-root-table-17{1}: 1\n"
625: + "system-table-name-29{7}: addrtbl\n"
626: + "system-table-name-35{12}: phoneaddrtbl\n"
627: + "in-root-table-8{1}: 1\n"
628: + "table-name-19{9}: Documents\n"
629: + "table-name-21{7}: Authors\n"
630: + "table-name-35{20}: Phones for Addresses\n"
631: + "soif-attribute-12{9}: Full-Text\n"
632: + "soif-attribute-26{19}: fkey-addr-author-id\n"
633: + "default-view-attribute-2{1}: 3\n"
634: + "column-name-17{12}: Partial Text\n"
635: + "system-column-name-26{8}: authorid\n"
636: + "default-view-attribute-54{1}: 5\n"
637: + "soif-attribute-59{9}: RD-Origin\n"
638: + "system-column-name-2{8}: abstract\n"
639: + "data-type-62{3}: int\n"
640: + "system-column-name-47{5}: title\n"
641: + "table-name-5{9}: Documents\n"
642: + "system-column-name-55{2}: id\n"
643: + "in-root-table-16{1}: 1\n"
644: + "column-name-63{4}: Week\n"
645: + "foreign-key-system-table-name-22{6}: doctbl\n"
646: + "enforce-uniqueness-20{1}: 1\n"
647: + "system-table-name-26{7}: addrtbl\n"
648: + "system-table-name-34{12}: phoneaddrtbl\n"
649: + "in-root-table-9{1}: 1\n"
650: + "table-name-20{9}: Documents\n"
651: + "table-name-32{9}: Addresses\n"
652: + "soif-attribute-11{7}: Expires\n"
653: + "system-table-name-3{6}: doctbl\n"
654: + "soif-attribute-27{23}: fkey-addr-author-doc-id\n"
655: + "index-attribute-63{2}: 12\n"
656: + "soif-attribute-35{24}: fkey-phoneaddr-author-id\n"
657: + "column-name-16{3}: MD5\n"
658: + "system-column-name-27{5}: docid\n"
659: + "is-internal-25{1}: 1\n"
660: + "system-column-name-39{2}: id\n"
661: + "soif-attribute-58{16}: RD-Last-Modified\n"
662: + "data-type-61{6}: serial\n"
663: + "table-name-4{9}: Documents\n"
664: + "system-column-name-54{4}: name\n"
665: + "data-type-2{4}: blob\n"
666: + "in-root-table-11{1}: 1\n"
667: + "column-name-60{12}: Generated By\n"
668: + "system-table-name-27{7}: addrtbl\n"
669: + "system-table-name-33{12}: phoneaddrtbl\n"
670: + "in-root-table-6{1}: 1\n"
671: + "foreign-key-system-table-name-49{6}: doctbl\n"
672: + "table-name-33{20}: Phones for Addresses\n"
673: + "soif-attribute-10{11}: Description\n"
674: + "soif-attribute-20{3}: URL\n"
675: + "system-table-name-2{6}: doctbl\n"
676: + "soif-attribute-34{22}: fkey-phoneaddr-addr-id\n"
677: + "column-name-11{7}: Expires\n"
678: + "system-column-name-24{4}: name\n"
679: + "system-column-name-38{4}: Type\n"
680: + "data-type-60{6}: string\n"
681: + "is-internal-36{1}: 1\n"
682: + "system-column-name-57{7}: expires\n"
683: + "column-name-4{16}: Content Encoding\n"
684: + "data-type-1{6}: serial\n"
685: + "in-root-table-10{1}: 1\n"
686: + "column-name-61{2}: Id\n"
687: + "system-table-name-24{9}: authortbl\n"
688: + "system-table-name-32{7}: addrtbl\n"
689: + "in-root-table-7{1}: 1\n"
690: + "table-name-14{9}: Documents\n"
691: + "system-table-name-51{8}: classtbl\n"
692: + "table-name-30{9}: Addresses\n"
693: + "soif-attribute-21{9}: author-id\n"
694: + "index-attribute-65{2}: 14\n"
695: + "soif-attribute-37{16}: Phoneaddr-Number\n"
696: + "column-name-10{11}: Description\n"
697: + "system-column-name-25{2}: id\n"
698: + "soif-attribute-42{12}: Phone-Number\n"
699: + "column-name-28{14}: Street Address\n"
700: + "system-column-name-37{6}: number\n"
701: + "is-internal-35{1}: 1\n"
702: + "system-column-name-56{5}: docid\n"
703: + "column-name-5{16}: Content Language\n"
704: + "in-root-table-13{1}: 1\n"
705: + "foreign-key-system-table-name-27{6}: doctbl\n"
706: + "system-table-name-25{7}: addrtbl\n"
707: + "system-table-name-31{7}: addrtbl\n"
708: + "in-root-table-4{1}: 1\n"
709: + "table-name-15{9}: Documents\n"
710: + "system-table-name-50{6}: taxtbl\n"
711: + "table-name-31{9}: Addresses\n"
712: + "table-name-49{10}: Taxonomies\n"
713: + "data-type-11{4}: date\n"
714: + "index-attribute-50{1}: 8\n"
715: + "soif-attribute-22{18}: fkey-author-doc-id\n"
716: + "index-attribute-64{2}: 13\n"
717: + "data-type-39{6}: serial\n"
718: + "soif-attribute-36{28}: fkey-phoneaddr-author-doc-id\n"
719: + "column-name-13{12}: Generated By\n"
720: + "system-column-name-22{5}: docid\n"
721: + "soif-attribute-43{10}: Phone-Type\n"
722: + "column-name-29{4}: City\n"
723: + "system-column-name-36{9}: authdocid\n"
724: + "is-internal-34{1}: 1\n" + "}\n";
725: }
726:
727: private String taxString() {
728: return "@TAXONOMY { -\n"
729: + "Id{17}: Netscape Sample 1\n"
730: + "}\n"
731: + "@CLASSIFICATION { -\n"
732: + "Parent-Id{4}: ROOT\n"
733: + "Taxonomy-Id{17}: Netscape Sample 1\n"
734: + "Id{18}: Education/Training\n"
735: + "}\n"
736: + "@CLASSIFICATION { -\n"
737: + "Parent-Id{18}: Education/Training\n"
738: + "Taxonomy-Id{17}: Netscape Sample 1\n"
739: + "Id{44}: Education/Training:Internal Training Classes\n"
740: + "}\n"
741: + "@CLASSIFICATION { -\n"
742: + "Parent-Id{44}: Education/Training:Internal Training Classes\n"
743: + "Taxonomy-Id{17}: Netscape Sample 1\n"
744: + "Id{64}: Education/Training:Internal Training Classes:Course Descriptions\n"
745: + "}\n"
746: + "@CLASSIFICATION { -\n"
747: + "Parent-Id{44}: Education/Training:Internal Training Classes\n"
748: + "Taxonomy-Id{17}: Netscape Sample 1\n"
749: + "Id{53}: Education/Training:Internal Training Classes:Schedule\n"
750: + "}\n"
751: + "@CLASSIFICATION { -\n"
752: + "Parent-Id{18}: Education/Training\n"
753: + "Taxonomy-Id{17}: Netscape Sample 1\n"
754: + "Id{36}: Education/Training:Customer Training\n"
755: + "}\n"
756: + "@CLASSIFICATION { -\n"
757: + "Parent-Id{36}: Education/Training:Customer Training\n"
758: + "Taxonomy-Id{17}: Netscape Sample 1\n"
759: + "Id{56}: Education/Training:Customer Training:Course Descriptions\n"
760: + "}\n"
761: + "@CLASSIFICATION { -\n"
762: + "Parent-Id{36}: Education/Training:Customer Training\n"
763: + "Taxonomy-Id{17}: Netscape Sample 1\n"
764: + "Id{45}: Education/Training:Customer Training:Schedule\n"
765: + "}\n"
766: //
767: + "@CLASSIFICATION { -\n"
768: + "Parent-Id{4}: ROOT\n"
769: + "Taxonomy-Id{17}: Netscape Sample 1\n"
770: + "Id{7}: Finance\n"
771: + "}\n"
772: + "@CLASSIFICATION { -\n"
773: + "Parent-Id{7}: Finance\n"
774: + "Taxonomy-Id{17}: Netscape Sample 1\n"
775: + "Id{24}: Finance:Accounts Payable\n"
776: + "}\n"
777: + "@CLASSIFICATION { -\n"
778: + "Parent-Id{7}: Finance\n"
779: + "Taxonomy-Id{17}: Netscape Sample 1\n"
780: + "Id{23}: Finance:Cash Management\n"
781: + "}\n"
782: + "@CLASSIFICATION { -\n"
783: + "Parent-Id{7}: Finance\n"
784: + "Taxonomy-Id{17}: Netscape Sample 1\n"
785: + "Id{19}: Finance:Collections\n"
786: + "}\n"
787: + "@CLASSIFICATION { -\n"
788: + "Parent-Id{7}: Finance\n"
789: + "Taxonomy-Id{17}: Netscape Sample 1\n"
790: + "Id{15}: Finance:Payroll\n"
791: + "}\n"
792: + "@CLASSIFICATION { -\n"
793: + "Parent-Id{4}: ROOT\n"
794: + "Taxonomy-Id{17}: Netscape Sample 1\n"
795: + "Id{15}: Human Resources\n"
796: + "}\n"
797: + "@CLASSIFICATION { -\n"
798: + "Parent-Id{15}: Human Resources\n"
799: + "Taxonomy-Id{17}: Netscape Sample 1\n"
800: + "Id{41}: Human Resources:Compensation and Benefits\n"
801: + "}\n"
802: + "@CLASSIFICATION { -\n"
803: + "Parent-Id{15}: Human Resources\n"
804: + "Taxonomy-Id{17}: Netscape Sample 1\n"
805: + "Id{25}: Human Resources:Personnel\n"
806: + "}\n"
807: + "@CLASSIFICATION { -\n"
808: + "Parent-Id{15}: Human Resources\n"
809: + "Taxonomy-Id{17}: Netscape Sample 1\n"
810: + "Id{24}: Human Resources:Staffing\n"
811: + "}\n"
812: + "@CLASSIFICATION { -\n"
813: + "Parent-Id{4}: ROOT\n"
814: + "Taxonomy-Id{17}: Netscape Sample 1\n"
815: + "Id{19}: Information Systems\n"
816: + "}\n"
817: + "@CLASSIFICATION { -\n"
818: + "Parent-Id{19}: Information Systems\n"
819: + "Taxonomy-Id{17}: Netscape Sample 1\n"
820: + "Id{35}: Information Systems:Network Support\n"
821: + "}\n"
822: + "@CLASSIFICATION { -\n"
823: + "Parent-Id{19}: Information Systems\n"
824: + "Taxonomy-Id{17}: Netscape Sample 1\n"
825: + "Id{34}: Information Systems:System Support\n"
826: + "}\n"
827: + "@CLASSIFICATION { -\n"
828: + "Parent-Id{19}: Information Systems\n"
829: + "Taxonomy-Id{17}: Netscape Sample 1\n"
830: + "Id{36}: Information Systems:Software Support\n"
831: + "}\n"
832: + "@CLASSIFICATION { -\n"
833: + "Parent-Id{19}: Information Systems\n"
834: + "Taxonomy-Id{17}: Netscape Sample 1\n"
835: + "Id{38}: Information Systems:Telecommunications\n"
836: + "}\n"
837: + "@CLASSIFICATION { -\n"
838: + "Parent-Id{4}: ROOT\n"
839: + "Taxonomy-Id{17}: Netscape Sample 1\n"
840: + "Id{5}: Legal\n"
841: + "}\n"
842: + "@CLASSIFICATION { -\n"
843: + "Parent-Id{5}: Legal\n"
844: + "Taxonomy-Id{17}: Netscape Sample 1\n"
845: + "Id{15}: Legal:Contracts\n"
846: + "}\n"
847: + "@CLASSIFICATION { -\n"
848: + "Parent-Id{5}: Legal\n"
849: + "Taxonomy-Id{17}: Netscape Sample 1\n"
850: + "Id{26}: Legal:Stock Administration\n"
851: + "}\n"
852: + "@CLASSIFICATION { -\n"
853: + "Parent-Id{4}: ROOT\n"
854: + "Taxonomy-Id{17}: Netscape Sample 1\n"
855: + "Id{9}: Marketing\n"
856: + "}\n"
857: + "@CLASSIFICATION { -\n"
858: + "Parent-Id{9}: Marketing\n"
859: + "Taxonomy-Id{17}: Netscape Sample 1\n"
860: + "Id{26}: Marketing:Corporate/Direct\n"
861: + "}\n"
862: + "@CLASSIFICATION { -\n"
863: + "Parent-Id{9}: Marketing\n"
864: + "Taxonomy-Id{17}: Netscape Sample 1\n"
865: + "Id{23}: Marketing:International\n"
866: + "}\n"
867: + "@CLASSIFICATION { -\n"
868: + "Parent-Id{9}: Marketing\n"
869: + "Taxonomy-Id{17}: Netscape Sample 1\n"
870: + "Id{18}: Marketing:Partners\n"
871: + "}\n"
872: + "@CLASSIFICATION { -\n"
873: + "Parent-Id{9}: Marketing\n"
874: + "Taxonomy-Id{17}: Netscape Sample 1\n"
875: + "Id{23}: Marketing:Telemarketing\n"
876: + "}\n"
877: + "@CLASSIFICATION { -\n"
878: + "Parent-Id{9}: Marketing\n"
879: + "Taxonomy-Id{17}: Netscape Sample 1\n"
880: + "Id{27}: Marketing:Product Marketing\n"
881: + "}\n"
882: + "@CLASSIFICATION { -\n"
883: + "Parent-Id{4}: ROOT\n"
884: + "Taxonomy-Id{17}: Netscape Sample 1\n"
885: + "Id{22}: Research & Development\n"
886: + "}\n"
887: + "@CLASSIFICATION { -\n"
888: + "Parent-Id{22}: Research & Development\n"
889: + "Taxonomy-Id{17}: Netscape Sample 1\n"
890: + "Id{41}: Research & Development:Product Division I\n"
891: + "}\n"
892: + "@CLASSIFICATION { -\n"
893: + "Parent-Id{41}: Research & Development:Product Division I\n"
894: + "Taxonomy-Id{17}: Netscape Sample 1\n"
895: + "Id{67}: Research & Development:Product Division I:Charters/Current Projects\n"
896: + "}\n"
897: + "@CLASSIFICATION { -\n"
898: + "Parent-Id{41}: Research & Development:Product Division I\n"
899: + "Taxonomy-Id{17}: Netscape Sample 1\n"
900: + "Id{64}: Research & Development:Product Division I:Product Specifications\n"
901: + "}\n"
902: + "@CLASSIFICATION { -\n"
903: + "Parent-Id{41}: Research & Development:Product Division I\n"
904: + "Taxonomy-Id{17}: Netscape Sample 1\n"
905: + "Id{63}: Research & Development:Product Division I:Design Specifications\n"
906: + "}\n"
907: + "@CLASSIFICATION { -\n"
908: + "Parent-Id{41}: Research & Development:Product Division I\n"
909: + "Taxonomy-Id{17}: Netscape Sample 1\n"
910: + "Id{78}: Research & Development:Product Division I:Policies and Procedure and standards\n"
911: + "}\n"
912: + "@CLASSIFICATION { -\n"
913: + "Parent-Id{41}: Research & Development:Product Division I\n"
914: + "Taxonomy-Id{17}: Netscape Sample 1\n"
915: + "Id{59}: Research & Development:Product Division I:QA specifications\n"
916: + "}\n"
917: + "@CLASSIFICATION { -\n"
918: + "Parent-Id{41}: Research & Development:Product Division I\n"
919: + "Taxonomy-Id{17}: Netscape Sample 1\n"
920: + "Id{54}: Research & Development:Product Division I:Publications\n"
921: + "}\n"
922: + "@CLASSIFICATION { -\n"
923: + "Parent-Id{41}: Research & Development:Product Division I\n"
924: + "Taxonomy-Id{17}: Netscape Sample 1\n"
925: + "Id{62}: Research & Development:Product Division I:Online Documentation\n"
926: + "}\n"
927: + "@CLASSIFICATION { -\n"
928: + "Parent-Id{22}: Research & Development\n"
929: + "Taxonomy-Id{17}: Netscape Sample 1\n"
930: + "Id{42}: Research & Development:Product Division II\n"
931: + "}\n"
932: + "@CLASSIFICATION { -\n"
933: + "Parent-Id{22}: Research & Development\n"
934: + "Taxonomy-Id{17}: Netscape Sample 1\n"
935: + "Id{43}: Research & Development:Product Division III\n"
936: + "}\n" + "@CLASSIFICATION { -\n"
937: + "Parent-Id{4}: ROOT\n"
938: + "Taxonomy-Id{17}: Netscape Sample 1\n"
939: + "Id{5}: Sales\n" + "}\n" + "@CLASSIFICATION { -\n"
940: + "Parent-Id{5}: Sales\n"
941: + "Taxonomy-Id{17}: Netscape Sample 1\n"
942: + "Id{23}: Sales:Sales Collaterals\n" + "}\n"
943: + "@CLASSIFICATION { -\n" + "Parent-Id{5}: Sales\n"
944: + "Taxonomy-Id{17}: Netscape Sample 1\n"
945: + "Id{21}: Sales:Corporate Sales\n" + "}\n"
946: + "@CLASSIFICATION { -\n" + "Parent-Id{5}: Sales\n"
947: + "Taxonomy-Id{17}: Netscape Sample 1\n"
948: + "Id{15}: Sales:OEM Sales\n" + "}\n"
949: + "@CLASSIFICATION { -\n" + "Parent-Id{5}: Sales\n"
950: + "Taxonomy-Id{17}: Netscape Sample 1\n"
951: + "Id{25}: Sales:International Sales\n" + "}\n"
952: + "@CLASSIFICATION { -\n" + "Parent-Id{5}: Sales\n"
953: + "Taxonomy-Id{17}: Netscape Sample 1\n"
954: + "Id{15}: Sales:Telesales\n" + "}\n"
955: + "@CLASSIFICATION { -\n" + "Parent-Id{5}: Sales\n"
956: + "Taxonomy-Id{17}: Netscape Sample 1\n"
957: + "Id{20}: Sales:Regional Sales\n" + "}\n"
958: + "@CLASSIFICATION { -\n"
959: + "Parent-Id{20}: Sales:Regional Sales\n"
960: + "Taxonomy-Id{17}: Netscape Sample 1\n"
961: + "Id{28}: Sales:Regional Sales:Western\n" + "}\n"
962: + "@CLASSIFICATION { -\n"
963: + "Parent-Id{20}: Sales:Regional Sales\n"
964: + "Taxonomy-Id{17}: Netscape Sample 1\n"
965: + "Id{33}: Sales:Regional Sales:Southwestern\n" + "}\n"
966: + "@CLASSIFICATION { -\n"
967: + "Parent-Id{20}: Sales:Regional Sales\n"
968: + "Taxonomy-Id{17}: Netscape Sample 1\n"
969: + "Id{31}: Sales:Regional Sales:Midwestern\n" + "}\n"
970: + "@CLASSIFICATION { -\n"
971: + "Parent-Id{20}: Sales:Regional Sales\n"
972: + "Taxonomy-Id{17}: Netscape Sample 1\n"
973: + "Id{28}: Sales:Regional Sales:Eastern\n" + "}\n"
974: + "@CLASSIFICATION { -\n" + "Parent-Id{5}: Sales\n"
975: + "Taxonomy-Id{17}: Netscape Sample 1\n"
976: + "Id{32}: Sales:Sales Order Administration\n" + "}\n"
977: + "@CLASSIFICATION { -\n" + "Parent-Id{4}: ROOT\n"
978: + "Taxonomy-Id{17}: Netscape Sample 1\n"
979: + "Id{17}: Technical Support\n" + "}\n"
980: + "@CLASSIFICATION { -\n"
981: + "Parent-Id{17}: Technical Support\n"
982: + "Taxonomy-Id{17}: Netscape Sample 1\n"
983: + "Id{35}: Technical Support:Telephone support\n"
984: + "}\n" + "@CLASSIFICATION { -\n"
985: + "Parent-Id{17}: Technical Support\n"
986: + "Taxonomy-Id{17}: Netscape Sample 1\n"
987: + "Id{33}: Technical Support:Premium Support\n" + "}\n"
988: + "@CLASSIFICATION { -\n"
989: + "Parent-Id{17}: Technical Support\n"
990: + "Taxonomy-Id{17}: Netscape Sample 1\n"
991: + "Id{32}: Technical Support:Online Support\n" + "}\n";
992: }
993: }
|