Source Code Cross Referenced for SchemaGetter.java in  » Portal » Open-Portal » soif » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » Portal » Open Portal » soif 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        /*
002:         *	CONFIDENTIAL AND PROPRIETARY SOURCE CODE OF
003:         *	NETSCAPE COMMUNICATIONS CORPORATION
004:         *
005:         *	Copyright (c) 1996 Netscape Communications Corporation.
006:         *	All Rights Reserved.
007:         *	Use of this Source Code is subject to the terms of the applicable
008:         *	license agreement from Netscape Communications Corporation.
009:         */
010:
011:        package soif;
012:
013:        import util.ReportError;
014:
015:        /**
016:         * Get schema.
017:         * <p>
018:         * The expected return is SOIF instances, first of an RDM
019:         * header then of a schema.  The RDM header is checked for
020:         * status and, if it exists, the remaining SOIF is converted
021:         * into a schema data structure.  Once all this is completed,
022:         * the thread terminates and the schema can be requested by
023:         * calling getSchema().
024:         * <p>
025:         * An additional bit of prep that can be done by the SchemaGetter
026:         * is the "disappear" business.  This calls a method that goes
027:         * through the schema and sets a flag on each attribute depending
028:         * on whether that attribute is <b>searchable</b> or not.
029:         * Currently, only indexed attributes are searchable.
030:         * <p>
031:         * <b><font color="#FF0050">Note:</font></b>
032:         * The RDMHeader class is not currently used to formulate requests.
033:         * <b>This may change.</b>
034:         * Both <i>SchemaGetter</i> and <i>TaxonomyGetter</i> initialize
035:         * their RDM header strings with a correct RDM request.
036:         * Because there are other schema and taxonomy requests that can be
037:         * made which are currently not well (or not at all) documented
038:         * the standard request can be changed using <i>setRDMHeader()</i>
039:         * which allows you to put in anything but prevents you from changing
040:         * the request during processing (the scope of the processing
041:         * phase far exceeds the requirement for safe operation).
042:         * The <i>setRDMHeader()</i> method should be used with the
043:         * understanding that the interface will very likely change.
044:         * It is also possible that the constructors will change,
045:         * but the most likely scenario is that RDMHeader savvy
046:         * constructors will be added.
047:         */
048:        public class SchemaGetter extends SOIFGetter {
049:            /**
050:             * Structured version of the schema.
051:             */
052:            private Schema schema;
053:
054:            /**
055:             * Constructor.
056:             */
057:            public SchemaGetter() {
058:                super ();
059:            }
060:
061:            /**
062:             * Constructor.
063:             * @param CGILocation cgi path
064:             * @param exe cgi executable
065:             * @param csid compass server id
066:             */
067:            public SchemaGetter(String CGILocation, String exe, CSID csid) {
068:                super (CGILocation, exe, csid);
069:                schema = null;
070:                setRDMHead("type=schema-description-request&csid="
071:                        + csid.toString());
072:            }
073:
074:            /**
075:             * Return schema.
076:             */
077:            public Schema getSchema() {
078:                if (schema == null)
079:                    ReportError
080:                            .reportError(ReportError.INTERNAL, "SchemaGetter",
081:                                    "getSchema", Messages.NOSCHEMAFOUND);
082:                return schema;
083:            }
084:
085:            /**
086:             * Run the thread, obtain the schema.
087:             */
088:            public void run() {
089:                if (getStatus() != PREPARED) {
090:                    ReportError.reportError(ReportError.INTERNAL,
091:                            "SchemaGetter", "run", Messages.UNINITIALIZED);
092:                    System.out.println(Messages.COMPLETESCHEMATHREAD);
093:                    return;
094:                }
095:
096:                boolean errors = false;
097:
098:                try {
099:                    getSOIF();
100:                    if (getStatus() == ABEND) {
101:                        errors = true;
102:                        return;
103:                    }
104:
105:                    if (sl == null) {
106:                        ReportError
107:                                .reportError(ReportError.INTERNAL,
108:                                        "SchemaGetter", "run",
109:                                        Messages.GETSOIFNEXTNULL);
110:                        System.out.println(slp.toRawSOIFString());
111:                        errors = true;
112:                        return;
113:                    }
114:
115:                    schema = new Schema(sl);
116:                    if (!schema.isValid()) {
117:                        ReportError.reportError(ReportError.INTERNAL,
118:                                "SchemaGetter", "run", Messages.BADSCHEMA);
119:                        errors = true;
120:                        return;
121:                    }
122:                } finally {
123:                    if (errors)
124:                        setStatus(ABEND);
125:                    else
126:                        setStatus(COMPLETE);
127:
128:                    System.out.println(Messages.COMPLETESCHEMATHREAD);
129:                }
130:            }
131:
132:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.