RDF Graph for Oracle NoSQL Database

Legal Notice

Copyright © 2011, 2012, 2013, Oracle and/or its affiliates. All rights reserved.

This software and related documentation are provided under a license agreement containing restrictions on use and disclosure and are protected by intellectual property laws. Except as expressly permitted in your license agreement or allowed by law, you may not use, copy, reproduce, translate, broadcast, modify, license, transmit, distribute, exhibit, perform, publish, or display any part, in any form, or by any means. Reverse engineering, disassembly, or decompilation of this software, unless required by law for interoperability, is prohibited.

The information contained herein is subject to change without notice and is not warranted to be error-free. If you find any errors, please report them to us in writing.

RDF Graph for Oracle NoSQL Database is licensed under the same terms as and only for use with Oracle NoSQL Database Enterprise Edition.

If this is software or related documentation that is delivered to the U.S. Government or anyone licensing it on behalf of the U.S. Government, the following notice is applicable:

U.S. GOVERNMENT END USERS: Oracle programs, including any operating system, integrated software, any programs installed on the hardware, and/or documentation, delivered to U.S. Government end users are "commercial computer software" pursuant to the applicable Federal Acquisition Regulation and agency-specific supplemental regulations. As such, use, duplication, disclosure, modification, and adaptation of the programs, including any operating system, integrated software, any programs installed on the hardware, and/or documentation, shall be subject to license terms and license restrictions applicable to the programs. No other rights are granted to the U.S. Government.

This software or hardware is developed for general use in a variety of information management applications. It is not developed or intended for use in any inherently dangerous applications, including applications that may create a risk of personal injury. If you use this software or hardware in dangerous applications, then you shall be responsible to take all appropriate fail-safe, backup, redundancy, and other measures to ensure its safe use. Oracle Corporation and its affiliates disclaim any liability for any damages caused by use of this software or hardware in dangerous applications.

Oracle and Java are registered trademarks of Oracle and/or its affiliates. Other names may be trademarks of their respective owners.

Intel and Intel Xeon are trademarks or registered trademarks of Intel Corporation. All SPARC trademarks are used under license and are trademarks or registered trademarks of SPARC International, Inc. AMD, Opteron, the AMD logo, and the AMD Opteron logo are trademarks or registered trademarks of Advanced Micro Devices. UNIX is a registered trademark of The Open Group.

This software or hardware and documentation may provide access to or information on content, products, and services from third parties. Oracle Corporation and its affiliates are not responsible for and expressly disclaim all warranties of any kind with respect to third-party content, products, and services. Oracle Corporation and its affiliates will not be responsible for any loss, costs, or damages incurred due to your access to or use of third-party content, products, or services.

4/23/2013


Table of Contents

Preface
Conventions Used in This Book
1. RDF Graph for NoSQL Database Overview
Introduction to the RDF Graph Feature
Semantic Data Modeling
Named Graphs
Semantic Data in the Database
Loading
Inferencing
Inferencing with the RDF Graph Feature
2. Setup RDF Graph
Setup the System Environment
Setup the SPARQL Service
Deploy joseki.war
Use Apache Tomcat
Use Oracle WebLogic Server
Configuring an Oracle NoSQL Database connection in the SPARQL service
Configuring the SPARQL Service: Oracle NoSQL Database
3. Connect to NoSQL Database
Making a single connection to an Oracle NoSQL Database
Connection Pooling
4. Load an RDF Graph
Parallel Loading Using the RDF Graph feature
5. Query RDF Graphs
Functions Supported in SPARQL Queries
Syntax Involving Bnodes (Blank Nodes)
JavaScript Object Notation (JSON) Format Support
Best Practices
Additional Query Options
JOIN_METHOD option
SPARQL 1.1 federated query SERVICE Clause
Data sampling
Query hints
6. Update an RDF Graph
7. Inference on an RDF Graph
Use Jena OntModel APIs
Use SPARQL Construct
Use External Reasoner together with Jena APIs
8. Quick Start for the RDF Graph Feature
Example1.java: Create a default graph and add/delete triples
Example1b.java: Create a named graph and add/delete triples
Example1c.java: Create an inferred graph and add/delete triples
Example1d.java: Create an inferred graph and add/delete triples
Example2.java: Load an RDF file
Concurrent RDF data loading
Example4.java: Query family relationships on a named graph
Example5.java: SPARQL query with JOIN_METHOD
Example5b.java: SPARQL query with ORDERED query option
Example5c.java: SPARQL query with TIMEOUT and GRACEFUL TIMEOUT
Example5d.java: SPARQL query with DOP
Example5e.java: SPARQL query with INFERENCE/ASSERTED ONLY hints
Example5g.java: SPARQL query with PLAN query hint
Example6.java: SPARQL ASK query
Example7.java: SPARQL Describe query
Example8.java: SPARQL Construct query
Example9.java: SPARQL OPTIONAL query
Example10.java: SPARQL query with LIMIT and OFFSET
Example11.java: SPARQL query with SELECT Cast
Example12.java: SPARQL Involving Named Graphs
Example13.java: SPARQL Query with ARQ Built-in Functions
Example14: SPARQL Update
Example15.java: Oracle NOSQL Database Connection Pooling
Generate Data sampling for a graph in the Oracle NoSQL Database
Example16b. Generate Data sampling for the dataset in the Oracle NoSQL Database
Build an Ontology Model using Jena OntModel APIs
9. SPARQL Gateway for XML-based Tools
SPARQL Gateway Features and Benefits Overview
Installing and Configuring SPARQL Gateway
Download the RDF Graph .zip File
Deploy SPARQL Gateway in WebLogic Server
Modify Proxy Settings
Add and Configure the SparqlGatewayAdminGroup Group
Using SPARQL Gateway with RDF Data
Storing SPARQL Queries and XSL Transformations
Specifying a Timeout Value
Specifying Best Effort Query Execution
Specifying a Content Type Other Than text/xml
Customizing the Default XSLT File
Using the SPARQL Gateway Graphical Web Interface
Main Page (index.html)
Navigation and Browsing Page (browse.jsp)
XSLT Management Page (xslt.jsp)
SPARQL Management Page (sparql.jsp)
Using SPARQL Gateway as an XML Data Source to OBIEE
A. Prerequisite Software
B. Generating a New SPARQL Service WAR file
C. Third Party Licenses
Apache Jena Apache License
ICU License
Licensing terms for SLF4J
Protégé-OWL
Mozilla Public License