Source Code Cross Referenced for RemoteRDMResultSet.java in  » Portal » Open-Portal » com » sun » portal » search » db » 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 » com.sun.portal.search.db 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        /*
002:         * Copyright 2005 Sun Microsystems, Inc.  All rights reserved.
003:         * PROPRIETARY/CONFIDENTIAL.  Use of this product is subject to license terms.
004:         */
005:
006:        package com.sun.portal.search.db;
007:
008:        import com.sun.portal.search.rdm.*;
009:        import com.sun.portal.search.soif.*;
010:        import com.sun.portal.search.util.*;
011:        import com.sun.portal.search.demo.Search;
012:
013:        import java.sql.*;
014:        import javax.naming.*;
015:        import javax.sql.*;
016:
017:        import java.util.*;
018:
019:        /**
020:         *
021:         * Remote RDM Server search result set implementation
022:         *
023:         */
024:        public class RemoteRDMResultSet extends RDMResultSet {
025:
026:            private List hits;
027:            private Search search;
028:
029:            /**
030:             * Creates a new instance of RemoteRDMResultSet
031:             */
032:            RemoteRDMResultSet(SToken st, RDMDb database, String query,
033:                    RDMTransaction t) {
034:                super (st, database, query, t);
035:            }
036:
037:            /**
038:             * Prepare Remote RDM Server search results
039:             */
040:            void setRemoteRDMSearchResult(Search sch) throws RDMException {
041:
042:                search = sch;
043:
044:                try {
045:
046:                    SOIFInputStream sis = search.getResultStream();
047:
048:                    hits = new ArrayList();
049:                    SOIF soif;
050:
051:                    for (soif = sis.readSOIF(); soif != null; soif = sis
052:                            .readSOIF()) {
053:                        hits.add(soif);
054:                    }
055:
056:                } catch (Exception e) {
057:                    throw new RDMException(e);
058:                }
059:
060:            }
061:
062:            /**
063:             * Retrieve Search Results
064:             * @param i Document index
065:             * @param view Attributes
066:             * @param hltags Highlight tags
067:             * @return a SOIF hit, highlighted and filtered by view
068:             */
069:            public SOIF getResult(int i, Set view, String[] hltags) {
070:
071:                if (i < hits.size())
072:                    return (SOIF) hits.get(i);
073:                else
074:                    return null;
075:
076:            }
077:
078:            /**
079:             * Get hit count
080:             * @return total number of hits for this search
081:             */
082:            public long getHitCount() {
083:                return search.getHitCount();
084:            }
085:
086:            /**
087:             * Get document count
088:             * @return number of docs searched
089:             */
090:            public long getDocCount() {
091:                return search.getDocumentCount();
092:            }
093:
094:            /**
095:             * Get search result count
096:             * @return current number of hits in this set
097:             */
098:            public int getResultCount() {
099:                return search.getResultCount();
100:            }
101:
102:            /**
103:             * Transform the result set to string
104:             * @return tring representation of this result set
105:             */
106:            public java.lang.String toString() {
107:                return super.toString();
108:            }
109:
110:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.