Source Code Cross Referenced for rdfparse.java in  » RSS-RDF » Jena-2.5.5 » jena » 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 » Jena 2.5.5 » jena 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        /*
002:          (c) Copyright 2002, 2003, 2004, 2005, 2006, 2007, 2008 Hewlett-Packard Development Company, LP
003:          [See end of file]
004:          $Id: rdfparse.java,v 1.10 2008/01/02 12:08:16 andy_seaborne Exp $
005:         */
006:
007:        package jena;
008:
009:        import java.lang.reflect.Constructor;
010:
011:        import com.hp.hpl.jena.rdf.arp.NTriple;
012:        import com.hp.hpl.jena.shared.Command;
013:
014:        /** A command line interface into ARP.
015:         * Creates NTriple's or just error messages.
016:         * <pre>
017:         * java &lt;class-path&gt; jena.rdfparse ( [ -[xstfu]][ -b xmlBase -[eiw] NNN[,NNN...] ] [ file ] [ url ] )...
018:         * 
019:         * java &lt;class-path&gt; jena.rdfparse --test
020:         * 
021:         * java &lt;class-path&gt; jena.rdfparse --internal-test
022:         * </pre>
023:         * 
024:         * <p>
025:         * The last two forms are for testing. <code>--test</code> runs ARP
026:         * against the RDF Core Working Group tests found at w3.org.
027:         * <code>--internal-test</code> uses a cached copy from within the jena.jar.
028:         * </p>
029:         * All options, files and URLs can be intemingled in any order.
030:         * They are processed from left-to-right.
031:         * <dl>
032:         * file    </dt><dd>  Converts (embedded) RDF in XML file into N-triples
033:         * </dd><dt>
034:         * url  </dt><dd>     Converts (embedded) RDF from URL into N-triples
035:         * </dd><dt>
036:         * -b uri </dt><dd>   Sets XML Base to the absolute URI.
037:         * </dd><dt>
038:         * -r    </dt><dd>    Content is RDF (no embedding, rdf:RDF tag may be omitted).
039:         * </dd><dt>
040:         * -t  </dt><dd>      No n-triple output, error checking only.
041:         * </dd><dt>
042:         * -x   </dt><dd>     Lax mode - warnings are suppressed.
043:         * </dd><dt>
044:         * -s    </dt><dd>    Strict mode - most warnings are errors.
045:         * </dd><dt>
046:         * -u     </dt><dd>   Allow unqualified attributes (defaults to warning).
047:         * </dd><dt>
048:         * -f    </dt><dd>    All errors are fatal - report first one only.
049:         * </dd><dt>
050:         * -b url </dt><dd>   Sets XML Base to the absolute url.
051:         * </dd><dt>
052:         * -e NNN[,NNN...]</dt><dd>
053:         * Treats numbered warning conditions as errrors.
054:         * </dd><dt>
055:         * -w NNN[,NNN...]</dt><dd>
056:         * Treats numbered error conditions as warnings.
057:         * </dd><dt>
058:         * -i NNN[,NNN...]
059:         * </dt><dd>
060:         * Ignores numbered error/warning conditions.
061:         * </dl>
062:         * @author jjc
063:         */
064:
065:        public class rdfparse {
066:
067:            /** Either start an RDF/XML to NTriple converter, or run test suite.
068:             * @param args The command-line arguments.
069:             */
070:            public static void main(String[] args) throws Exception {
071:                if (args.length == 1
072:                        && (args[0].equals("--test") || args[0]
073:                                .equals("--internal-test")))
074:                    runTests(args[0].equals("--test"));
075:                else
076:                    NTriple.main(args);
077:            }
078:
079:            /**
080:                 wrapped this way so JUnit not a compile-time requirement.
081:             */
082:            protected static void runTests(boolean internetTest)
083:                    throws Exception {
084:                Class rdfparse = Class.forName("jena.test.rdfparse");
085:                Constructor constructor = rdfparse
086:                        .getConstructor(new Class[] { boolean.class });
087:                Command c = (Command) constructor
088:                        .newInstance(new Object[] { new Boolean(internetTest) });
089:                c.execute();
090:                //        ARPTests.internet = internetTest;
091:                //        TestRunner.main( new String[] { "-noloading", ARPTests.class.getName()});
092:            }
093:        }
094:
095:        /*
096:         (c) Copyright 2002, 2003, 2004, 2005, 2006, 2007, 2008 Hewlett-Packard Development Company, LP
097:         All rights reserved.
098:
099:         Redistribution and use in source and binary forms, with or without
100:         modification, are permitted provided that the following conditions
101:         are met:
102:
103:         1. Redistributions of source code must retain the above copyright
104:         notice, this list of conditions and the following disclaimer.
105:
106:         2. Redistributions in binary form must reproduce the above copyright
107:         notice, this list of conditions and the following disclaimer in the
108:         documentation and/or other materials provided with the distribution.
109:
110:         3. The name of the author may not be used to endorse or promote products
111:         derived from this software without specific prior written permission.
112:
113:         THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
114:         IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
115:         OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
116:         IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
117:         INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
118:         NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
119:         DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
120:         THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
121:         (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
122:         THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
123:         */
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.