Source Code Cross Referenced for InferencerConnectionWrapper.java in  » RSS-RDF » sesame » org » openrdf » sail » inferencer » 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 » RSS RDF » sesame » org.openrdf.sail.inferencer 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        /*
002:         * Copyright Aduna (http://www.aduna-software.com/) (c) 1997-2007.
003:         *
004:         * Licensed under the Aduna BSD-style license.
005:         */
006:        package org.openrdf.sail.inferencer;
007:
008:        import info.aduna.iteration.CloseableIteration;
009:
010:        import org.openrdf.model.Resource;
011:        import org.openrdf.model.Statement;
012:        import org.openrdf.model.URI;
013:        import org.openrdf.model.Value;
014:        import org.openrdf.query.BindingSet;
015:        import org.openrdf.query.Dataset;
016:        import org.openrdf.query.QueryEvaluationException;
017:        import org.openrdf.query.algebra.TupleExpr;
018:        import org.openrdf.sail.SailException;
019:        import org.openrdf.sail.helpers.SailConnectionWrapper;
020:
021:        /**
022:         * An extension of ConnectionWrapper that implements the
023:         * {@link InferencerConnection} interface.
024:         * 
025:         * @author Arjohn Kampman
026:         */
027:        public class InferencerConnectionWrapper extends SailConnectionWrapper
028:                implements  InferencerConnection {
029:
030:            /*--------------*
031:             * Constructors *
032:             *--------------*/
033:
034:            /**
035:             * Creates a new InferencerConnectionWrapper object that wraps the supplied
036:             * transaction.
037:             */
038:            public InferencerConnectionWrapper(InferencerConnection con) {
039:                super (con);
040:            }
041:
042:            /*---------*
043:             * Methods *
044:             *---------*/
045:
046:            /**
047:             * Gets the connection that is wrapped by this object.
048:             * 
049:             * @return The connection that was supplied to the constructor of this class.
050:             */
051:            @Override
052:            protected InferencerConnection getWrappedConnection() {
053:                return (InferencerConnection) super .getWrappedConnection();
054:            }
055:
056:            public boolean addInferredStatement(Resource subj, URI pred,
057:                    Value obj, Resource... contexts) throws SailException {
058:                return getWrappedConnection().addInferredStatement(subj, pred,
059:                        obj, contexts);
060:            }
061:
062:            public boolean removeInferredStatement(Resource subj, URI pred,
063:                    Value obj, Resource... contexts) throws SailException {
064:                return getWrappedConnection().removeInferredStatement(subj,
065:                        pred, obj, contexts);
066:            }
067:
068:            public void clearInferred(Resource... contexts)
069:                    throws SailException {
070:                getWrappedConnection().clearInferred(contexts);
071:            }
072:
073:            public void flushUpdates() throws SailException {
074:                getWrappedConnection().flushUpdates();
075:            }
076:
077:            /**
078:             * Calls {@link #flushUpdates()} before forwarding the call to the wrapped
079:             * connection.
080:             */
081:            @Override
082:            public void commit() throws SailException {
083:                flushUpdates();
084:                super .commit();
085:            }
086:
087:            /**
088:             * Calls {@link #flushUpdates()} before forwarding the call to the wrapped
089:             * connection.
090:             */
091:            @Override
092:            public CloseableIteration<? extends BindingSet, QueryEvaluationException> evaluate(
093:                    TupleExpr tupleExpr, Dataset dataset, BindingSet bindings,
094:                    boolean includeInferred) throws SailException {
095:                flushUpdates();
096:                return super .evaluate(tupleExpr, dataset, bindings,
097:                        includeInferred);
098:            }
099:
100:            /**
101:             * Calls {@link #flushUpdates()} before forwarding the call to the wrapped
102:             * connection.
103:             */
104:            @Override
105:            public CloseableIteration<? extends Resource, SailException> getContextIDs()
106:                    throws SailException {
107:                flushUpdates();
108:                return super .getContextIDs();
109:            }
110:
111:            /**
112:             * Calls {@link #flushUpdates()} before forwarding the call to the wrapped
113:             * connection.
114:             */
115:            @Override
116:            public CloseableIteration<? extends Statement, SailException> getStatements(
117:                    Resource subj, URI pred, Value obj,
118:                    boolean includeInferred, Resource... contexts)
119:                    throws SailException {
120:                flushUpdates();
121:                return super .getStatements(subj, pred, obj, includeInferred,
122:                        contexts);
123:            }
124:
125:            /**
126:             * Calls {@link #flushUpdates()} before forwarding the call to the wrapped
127:             * connection.
128:             */
129:            @Override
130:            public long size(Resource... contexts) throws SailException {
131:                flushUpdates();
132:                return super.size(contexts);
133:            }
134:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.