Source Code Cross Referenced for ModelSet.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:        /*
002:         * LICENSE INFORMATION
003:         * Copyright 2005-2007 by FZI (http://www.fzi.de).
004:         * Licensed under a BSD license (http://www.opensource.org/licenses/bsd-license.php)
005:         * <OWNER> = Max Völkel
006:         * <ORGANIZATION> = FZI Forschungszentrum Informatik Karlsruhe, Karlsruhe, Germany
007:         * <YEAR> = 2007
008:         * 
009:         * Project information at http://semweb4j.org/rdf2go
010:         */
011:        package org.ontoware.rdf2go.model;
012:
013:        import org.ontoware.aifbcommons.collection.ClosableIterator;
014:        import org.ontoware.rdf2go.exception.ModelRuntimeException;
015:        import org.ontoware.rdf2go.model.node.Node;
016:        import org.ontoware.rdf2go.model.node.Resource;
017:        import org.ontoware.rdf2go.model.node.URI;
018:
019:        /**
020:         * A ModelSet is like a Graph Data Set in SPARQL. It contains a number of named
021:         * graphs (Models), which might be empty. Additionally, one special unnamed
022:         * model, the 'Default Model' belongs to a ModelSet.
023:         * 
024:         * ModelSet offers a number of methods that make it behave like a quad store,
025:         * however, when e.g. removing all statements with a certain context, the model
026:         * named with that context still remains in the ModelSet.
027:         * 
028:         * <p>
029:         * <code>ModelSet</code> can be read from a named graph aware serialization
030:         * such as TRIG or TRIX using the read/write methods. If you read a
031:         * serialization that supports only one graph (like RDF/XML), a default model
032:         * will be created.
033:         * </p>
034:         * 
035:         * The context URI of the default modell is 'null'.
036:         * 
037:         * @author max
038:         * @author sauermann
039:         */
040:        public interface ModelSet extends Sparqlable, ModelSetIO,
041:                FindableModelSet, ModelSetAddRemove, ModelValueFactory,
042:                Commitable, ReificationSupport {
043:
044:            /**
045:             * Open connection to defined, unterlying implementation
046:             */
047:            void open();
048:
049:            /**
050:             * @return true if ModelSet is open
051:             */
052:            boolean isOpen();
053:
054:            /**
055:             * Close connection to defined, unterlying implementation
056:             */
057:            void close();
058:
059:            /**
060:             * The number of explicit statements. Statements that are inferred e.g.
061:             * using backward-chaining are per definition not in this number, and also
062:             * some inferred stateemtns may or may be not part of ths size, depending on
063:             * the implementation of the model. If a new triple is added to the model,
064:             * the size must increase.
065:             * 
066:             * @return the number of statements in the modelset.
067:             * @throws ModelRuntimeException
068:             */
069:            long size() throws ModelRuntimeException;
070:
071:            /**
072:             * @return true if all models in this ModelSet contain zero statements. This
073:             *         method might be faster than calling size() == 0 on each model.
074:             *         Note: This method can return isEmpty == true, even if the
075:             *         ModelSet contains a number of models.
076:             */
077:            boolean isEmpty();
078:
079:            /**
080:             * Creates an RDF2Go URI. This allows a user to create a model via
081:             * 'getModel( URI )'.
082:             * 
083:             * @param uriString
084:             * @return an RDF2Go URI
085:             * @throws ModelRuntimeException
086:             *             if URI has not a valid URI fomat - according to the adapter
087:             */
088:            URI createURI(String uriString) throws ModelRuntimeException;
089:
090:            /**
091:             * Creates a statement with a context URI.
092:             * 
093:             * @param context
094:             * @param subject
095:             * @param predicate
096:             * @param object
097:             * @return
098:             */
099:            Statement createStatement(URI context, Resource subject,
100:                    URI predicate, Node object);
101:
102:            /**
103:             * Get the Model with the passed URI. If the model does not exist yet, an
104:             * empty model will be created and returned.
105:             * 
106:             * Note that the returned model is tied to this modelset, and any changes in
107:             * the model will be reflected here.
108:             * 
109:             * @param contextURI
110:             *            the URI of the context. This is the same as the name of the
111:             *            named graph.
112:             * @return the model identified by this context. May have a size of 0, if no
113:             *         data was added to it yet. Never returns null.  It has to be isOpen() == true.
114:             */
115:            Model getModel(URI contextURI);
116:
117:            /**
118:             * Removes the Model (NamedGraph) denoted by contextURI from this modelset.
119:             * If the model contains statements, they are deleted.
120:             * 
121:             * @param contextURI
122:             * @return true if successful
123:             */
124:            boolean removeModel(URI contextURI);
125:
126:            /**
127:             * Adds a model to this ModelSet. Creating the named-graph if needed, adding
128:             * the triples to it if not.
129:             * 
130:             * This method might be much quicker than addAll(model.iterator()) depending
131:             * on the implementation.
132:             * 
133:             * @param model
134:             * @return true if successful
135:             */
136:            boolean addModel(Model model);
137:
138:            /**
139:             * @param contextURI
140:             * @return true if a Model (NamedGraph) named 'contextURI' is known. The
141:             *         model might be empty. Some implementations don't manage models
142:             *         explicitly, here empty models cna never exist.
143:             */
144:            boolean containsModel(URI contextURI);
145:
146:            /**
147:             * Removes all models, which is
148:             * <em>not</emp> the same as removing all statements from all
149:             * models in this ModelSet.
150:             * 
151:             * @throws ModelRuntimeException
152:             */
153:            void removeAll() throws ModelRuntimeException;
154:
155:            /**
156:             * The default model is used when the modelset is loaded from a
157:             * serialization that has no context. The default model has a context of
158:             * 'null'
159:             * 
160:             * @return the default model. It has to be isOpen() == true.
161:             */
162:            Model getDefaultModel();
163:
164:            /**
165:             * @return an Interator over <em>all</em> models within this ModelSet.
166:             *         Some models might be empty.
167:             * 
168:             * Since 4.4.10: Each model has to be isOpen() == true.
169:             * 
170:             * For some implementations: While you read the iterator you may not WRITE
171:             * to the models.
172:             * 
173:             */
174:            ClosableIterator<Model> getModels();
175:
176:            /**
177:             * @return an iterator over all URIs used as model URIs.
178:             * 
179:             * For some implementations: While you read the iterator you may not WRITE
180:             * to the models.
181:             */
182:            ClosableIterator<URI> getModelURIs();
183:
184:            /**
185:             * @return the native implementation (e.g. a Jena Model). Using this method
186:             *         breaks strict triple store independence, but exposes the full
187:             *         power and <b>reduces</b> API dependence. This method is part of
188:             *         the main API.
189:             */
190:            Object getUnderlyingModelSetImplementation();
191:
192:            /**
193:             * Print the whole content of this ModelSet to System.out.
194:             */
195:            void dump();
196:
197:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.