Semantic Web Programming by Hebeler John Fisher Matthew Blace Ryan

Semantic Web Programming by Hebeler John Fisher Matthew Blace Ryan

Author:Hebeler, John, Fisher, Matthew, Blace, Ryan
Language: eng
Format: epub
Publisher: John Wiley & Sons, Inc.
Published: 2011-02-20T16:00:00+00:00


The removeAll() method clears all statements in the given model. The removeAll() method can also take parameters to remove specified subsets of the model. The subsets include matches on a specified subject, predicate, object, or reified statement combinations. Removing reified statements uses the removeReification() and removeAllReifications() methods. It is not necessary to remove statements prior to close. It is demonstrated here in case you wish to reuse the model or part of it.

The close() method returns all resources associated with the model and manages any connections to storage devices, such as closing database connections or writing out file contents.

Managing Semantic Web Data

We have demonstrated a complete life cycle of using the Jena Semantic Web Framework classes and methods in dealing with Semantic Web data. This covered creation to deallocation of Semantic Web data; however, there are other areas to consider when managing and programming Semantic Web data. These include getting information regarding your Semantic Web data, event notification of changes in your Semantic Web data, dealing with concurrent operations on your Semantic Web data, and customizing the Jena Framework. These operations reflect the realities of programming in a multiuser, event-driven environment.

Getting Information Regarding Your Semantic Web Data

Information regarding your Semantic Web data or model offers useful insights into its operations. This code demonstrates a few basic areas:

private void getDataStatus(Model m){

// Test of empty

System.out.println(“Model is ” + (m.isEmpty()?“”:“not” )+ “ empty!”);

// Size of model

System.out.println(“Model Size: ” + m.size());

// Supports Transactions?

System.out.println(“Model does ” +

(m.supportsTransactions()?“”:“not” )+ “support transactions.”);



Download



Copyright Disclaimer:
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.