Source Code Cross Referenced for ModelSetAddRemove.java in  » Search-Engine » semweb4j » org » ontoware » rdf2go » model » 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 » Search Engine » semweb4j » org.ontoware.rdf2go.model 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        package org.ontoware.rdf2go.model;
002:
003:        import java.util.Iterator;
004:
005:        import org.ontoware.aifbcommons.collection.ClosableIterable;
006:        import org.ontoware.rdf2go.exception.ModelRuntimeException;
007:        import org.ontoware.rdf2go.model.node.Node;
008:        import org.ontoware.rdf2go.model.node.NodeOrVariable;
009:        import org.ontoware.rdf2go.model.node.Resource;
010:        import org.ontoware.rdf2go.model.node.ResourceOrVariable;
011:        import org.ontoware.rdf2go.model.node.URI;
012:        import org.ontoware.rdf2go.model.node.UriOrVariable;
013:
014:        /**
015:         * Allows to add and removes statements from a ModelSet. Statements without a
016:         * context are added/removed from the default model.
017:         * 
018:         * For plain triples models, this is modeled as a number of interfaces:
019:         * ClosableIterable<Statement>, ModelWriter, Lockable
020:         * 
021:         * @author voelkel
022:         * 
023:         */
024:        public interface ModelSetAddRemove extends ClosableIterable<Statement>,
025:                Lockable {
026:
027:            /**
028:             * This method creates a Model named 'contextURI' if needed. Then the
029:             * statement (s,p,o) is inserted into that model.
030:             * 
031:             * @param contextURI
032:             *            a URI
033:             * @param subject
034:             *            a Resource (URI or BlankNode)
035:             * @param predicate
036:             * @param object
037:             *            a Node
038:             * @throws ModelRuntimeException
039:             *             if any internal (I/O related) exception occurs
040:             */
041:            void addStatement(URI contextURI, Resource subject, URI predicate,
042:                    Node object) throws ModelRuntimeException;
043:
044:            /**
045:             * This method creates a Model named statement.getContextURI if needed. Then
046:             * the statement (s,p,o) is inserted into that model.
047:             * 
048:             * @param statement
049:             * @throws ModelRuntimeException
050:             *             if any internal (I/O related) exception occurs
051:             */
052:            void addStatement(Statement statement) throws ModelRuntimeException;
053:
054:            /**
055:             * For each statement in the iterator, this method creates a Model named
056:             * statement.getContextURI if needed. Then the statement (s,p,o) is inserted
057:             * into that model.
058:             * 
059:             * @param statement
060:             * @throws ModelRuntimeException
061:             *             if any internal (I/O related) exception occurs
062:             */
063:            void addAll(Iterator<? extends Statement> statement)
064:                    throws ModelRuntimeException;
065:
066:            /**
067:             * Removes the statement (s,p,o) from a model named contextURI. If the model
068:             * named 'contextURI' becomes empty, it remains in the ModelSet.
069:             * 
070:             * @param context
071:             *            a URI
072:             * @param subject
073:             *            a Resource (URI or BlankNode)
074:             * @param predicate
075:             * @param object
076:             *            a Node
077:             * @throws ModelRuntimeException
078:             *             if any internal (I/O related) exception occurs
079:             */
080:            void removeStatement(URI contextURI, Resource subject,
081:                    URI predicate, Node object) throws ModelRuntimeException;
082:
083:            /**
084:             * Removes the statement (s,p,o) from a model named statement.getContext().
085:             * If the model named statement.getContext() becomes empty, it remains in
086:             * the ModelSet.
087:             * 
088:             * @param statement
089:             *            a Statement
090:             * @throws ModelRuntimeException
091:             *             if any internal (I/O related) exception occurs
092:             */
093:            void removeStatement(Statement statement)
094:                    throws ModelRuntimeException;
095:
096:            /**
097:             * For each statement in the iterator, the statement is removed form the
098:             * model named statement.getContext(); If the model named
099:             * statement.getContext() becomes empty, it remains in the ModelSet.
100:             * 
101:             * @param statement
102:             * @throws ModelRuntimeException
103:             *             if any internal (I/O related) exception occurs
104:             */
105:            void removeAll(Iterator<? extends Statement> statement)
106:                    throws ModelRuntimeException;
107:
108:            /**
109:             * Find all models matching the context of the pattern and remove all
110:             * matching triple patterms from them
111:             * 
112:             * @param quadPattern
113:             * @throws ModelRuntimeException
114:             */
115:            void removeStatements(QuadPattern quadPattern)
116:                    throws ModelRuntimeException;
117:
118:            /**
119:             * Find all models matching the context, and remove all (subject, property
120:             * ,object)-statements from these model
121:             * 
122:             * @throws ModelRuntimeException
123:             */
124:            void removeStatements(UriOrVariable context,
125:                    ResourceOrVariable subject, UriOrVariable predicate,
126:                    NodeOrVariable object) throws ModelRuntimeException;
127:
128:            /**
129:             * Apply the changes given by this diff <emph>in one atomic operation</emph>
130:             * 
131:             * Implementations must check that all statements to be removed are still in
132:             * the Model. Otherwise an exception is thrown.
133:             * 
134:             * First all triples to be removed are removed, then triples to be added are
135:             * added.
136:             * 
137:             * In this modelset, this means (s,p,o) is removed from the graph named c,
138:             * for all statements (c,s,p,o). Note: Models becoming empty are not
139:             * removed.
140:             * 
141:             * @param diff
142:             * @throws ModelRuntimeException
143:             *             if a model or statement in a model to be removed does not
144:             *             exist.
145:             */
146:            void update(DiffReader diff) throws ModelRuntimeException;
147:
148:            //	/**
149:            //	 * Adds all statements contained in 'model' to this ModelSet. Set the
150:            //	 * context to all these statements to 'contextURI'.
151:            //	 * 
152:            //	 * If the model belongs to the same implementation family as the ModelSet,
153:            //	 * this add might be very fast.
154:            //	 * 
155:            //	 * @param context
156:            //	 * @param model
157:            //	 */
158:            //	void addModel(URI contextURI, Model model);
159:
160:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.