Source Code Cross Referenced for ModelSetIO.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 java.io.IOException;
014:        import java.io.InputStream;
015:        import java.io.OutputStream;
016:        import java.io.Reader;
017:        import java.io.Writer;
018:        import java.net.URL;
019:
020:        import org.ontoware.rdf2go.exception.ModelRuntimeException;
021:        import org.ontoware.rdf2go.exception.SyntaxNotSupportedException;
022:
023:        /**
024:         * Defines reading and writing to and from readers/writers and streams.
025:         * 
026:         * The default syntax for ModelSets is TRiX.
027:         * 
028:         * @author voelkel
029:         * 
030:         */
031:        public interface ModelSetIO {
032:
033:            // ///////////////////////////////
034:            // read/write
035:
036:            /**
037:             * Read from Reader assuming to read a TRiX stream in UTF8 encoding.
038:             * 
039:             * All Models are created with the corresponding names as defined in the
040:             * TRiX stream as needed.
041:             * 
042:             * For more info on TRiX read:
043:             * http://www.hpl.hp.com/techreports/2003/HPL-2003-268.html
044:             * 
045:             * @param in
046:             *            the input to read
047:             * @throws IOException
048:             *             on IOErrors
049:             * @throws ModelRuntimeException
050:             *             on RDF serialization errors or model errors
051:             */
052:            void readFrom(Reader in) throws IOException, ModelRuntimeException;
053:
054:            /**
055:             * Reads assuming the given syntax. Encoding defaults to UTF8.
056:             * 
057:             * All Models are created with the corresponding names as defined in the
058:             * TRiX stream as needed.
059:             * 
060:             * @param in
061:             *            the input to read
062:             * @param syntax
063:             *            syntax to use
064:             * @throws IOException
065:             *             on IOErrors
066:             * @throws ModelRuntimeException
067:             *             on RDF serialisation errors or model errors
068:             * @throws SyntaxNotSupportedException
069:             *             if adapter can't handle the given syntax
070:             */
071:            void readFrom(Reader in, Syntax syntax) throws IOException,
072:                    ModelRuntimeException, SyntaxNotSupportedException;
073:
074:            /**
075:             * Reads assuming the given syntax. Encoding defaults to UTF8.
076:             * 
077:             * All Models are created with the corresponding names as defined in the
078:             * TRiX stream as needed.
079:             * 
080:             * @param in
081:             *            the input to read
082:             * @param syntax
083:             *            syntax to use
084:             * @param baseURI
085:             *            baseURI to use
086:             * @throws IOException
087:             *             on IOErrors
088:             * @throws ModelRuntimeException
089:             *             on RDF serialisation errors or model errors
090:             * @throws SyntaxNotSupportedException
091:             *             if adapter can't handle the given syntax
092:             */
093:            void readFrom(Reader in, Syntax syntax, URL baseURI)
094:                    throws IOException, ModelRuntimeException,
095:                    SyntaxNotSupportedException;
096:
097:            /**
098:             * Read from InputStream assuming to read an RDF/XML stream.
099:             * 
100:             * All Models are created with the corresponding names as defined in the
101:             * TRiX stream as needed.
102:             * 
103:             * For more info on TRiX read:
104:             * http://www.hpl.hp.com/techreports/2003/HPL-2003-268.html
105:             * 
106:             * @param in
107:             *            the input to read
108:             * @throws IOException
109:             *             on IOErrors
110:             * @throws ModelRuntimeException
111:             *             on RDF serialisation errors or model errors
112:             */
113:            void readFrom(InputStream in) throws IOException,
114:                    ModelRuntimeException;
115:
116:            /**
117:             * Reads assuming the given syntax. Encoding defaults to UTF8.
118:             * 
119:             * All Models are created with the corresponding names as defined in the
120:             * TRiX stream as needed.
121:             * 
122:             * @param in
123:             *            the input to read
124:             * @param syntax
125:             *            syntax to use
126:             * @throws IOException
127:             *             on IOErrors
128:             * @throws ModelRuntimeException
129:             *             on RDF serialisation errors or model errors
130:             * @throws SyntaxNotSupportedException
131:             *             if adapter can't handle the given syntax
132:             */
133:            void readFrom(InputStream reader, Syntax syntax)
134:                    throws IOException, ModelRuntimeException,
135:                    SyntaxNotSupportedException;
136:
137:            /**
138:             * Reads assuming the given syntax. Encoding defaults to UTF8.
139:             * 
140:             * All Models are created with the corresponding names as defined in the
141:             * TRiX stream as needed.
142:             * 
143:             * @param in
144:             *            the input to read
145:             * @param syntax
146:             *            syntax to use
147:             * @param baseURI
148:             *            base URI to use
149:             * @throws IOException
150:             *             on IOErrors
151:             * @throws ModelRuntimeException
152:             *             on RDF serialisation errors or model errors
153:             * @throws SyntaxNotSupportedException
154:             *             if adapter can't handle the given syntax
155:             */
156:            void readFrom(InputStream reader, Syntax syntax, URL baseURI)
157:                    throws IOException, ModelRuntimeException,
158:                    SyntaxNotSupportedException;
159:
160:            /**
161:             * Write to writer in UTF8 and TRiX. For more info on TRiX read:
162:             * http://www.hpl.hp.com/techreports/2003/HPL-2003-268.html
163:             * 
164:             * @param out
165:             *            the output to write to
166:             * @throws IOException
167:             *             on IOErrors
168:             * @throws ModelRuntimeException
169:             *             on RDF serialization errors or model errors
170:             */
171:            void writeTo(Writer out) throws IOException, ModelRuntimeException;
172:
173:            /**
174:             * Write the model to the passed writer, using the passed syntax.
175:             * 
176:             * @param out
177:             *            the output to write to
178:             * @param syntax
179:             *            syntax to use
180:             * @throws IOException
181:             *             on IOErrors
182:             * @throws ModelRuntimeException
183:             *             on RDF serialization errors or model errors
184:             * @throws SyntaxNotSupportedException
185:             *             if adapter can't handle the given syntax
186:             */
187:            void writeTo(Writer out, Syntax syntax) throws IOException,
188:                    ModelRuntimeException, SyntaxNotSupportedException;
189:
190:            /**
191:             * Writing a TRiX stream in UTF8 encoding For more info on TRiX read:
192:             * http://www.hpl.hp.com/techreports/2003/HPL-2003-268.html
193:             * 
194:             * @param out
195:             *            the output to write to
196:             * @throws IOException
197:             *             on IOErrors
198:             * @throws ModelRuntimeException
199:             *             on RDF serialization errors or model errors
200:             */
201:            void writeTo(OutputStream out) throws IOException,
202:                    ModelRuntimeException;
203:
204:            /**
205:             * Write the model to the passed writer, using the passed syntax.
206:             * 
207:             * @param out
208:             *            the output to write to
209:             * @param syntax
210:             *            syntax to use
211:             * @throws IOException
212:             *             on IOErrors
213:             * @throws ModelRuntimeException
214:             *             on RDF serialization errors or model errors
215:             * @throws SyntaxNotSupportedException
216:             *             if adapter can't handle the given syntax
217:             */
218:            void writeTo(OutputStream out, Syntax syntax) throws IOException,
219:                    ModelRuntimeException, SyntaxNotSupportedException;
220:
221:            /**
222:             * Convenience method to export a ModelSet to a String in a given syntax.
223:             * @param syntax
224:             * @return a String, containing the ModelSet content in the given syntax.
225:             * @throws SyntaxNotSupportedException if the syntax is not supported
226:             */
227:            String serialize(Syntax syntax) throws SyntaxNotSupportedException;
228:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.