DOC PREVIEW
UTD CS 6375 - Reification

This preview shows page 1-2-14-15-29-30 out of 30 pages.

Save
View full document
Premium Document
Do you want full access? Go Premium and unlock all 30 pages.
Access to all documents
Download any document
Ad free experience

Unformatted text preview:

Reification JENA REIFICATION API Reification In these slides we take a look at Reification and how Reification is done in the Jena API Reification in Jena is the ability to treat a Statement as a Resource Reify to regard something abstract as a material or concrete thing As in to make it real Reification Then additional assertions can be made about this Statement A Statement can be reified multiple times which allows different manifestations of that statement to be treated differently if required rdf label Stripes Stripes rdf subject rdf predicate rdf type Zebra rdf object R1 rdf type rdf Statement Reification RDF represents a reified statement as four statements with particular RDF properties and objects Statement S P O reified by resource R is R R R R rdf type rdf subject rdf predicate rdf object rdf Statement S P O Reification The purpose of a reified statement is to provide additional detail about the statement of interest User selected properties are necessary like Dublin Core R R R R R R rdf type rdf subject rdf predicate rdf object dc creator dc date rdf Statement S P O steven 09 30 2009 Apparently Steven made the statement S P O on 9 30 2009 Multiple Reifications Multiple reification nodes may refer to the same statement This can show multiple provenance paths or be part of mechanisms involved in accumulating confidence regarding the statement R1 R1 R1 R1 R1 R1 rdf type rdf subject rdf predicate rdf object dc creator sc creatorReliability rdf Statement S P O politician low R2 R2 R2 R2 R2 R2 rdf type rdf subject rdf predicate rdf object dc creator sc creatorReliability rdf Statement S P O street vendor medium Apparently the statement S P O was reported by both a politician and street vendor It appears someone has varying opinions about the reliability of the two independent sources of the statement RDF XML Example xml version 1 0 DOCTYPE rdf RDF ENTITY dc http purl org dc elements 1 1 rdf RDF xmlns rdf http www w3 org 1999 02 22 rdf syntax ns xmlns dc dc xmlns exterms http www example org terms xmlns other http myuri org other rdf Description rdf about http www example org index html exterms creation date August 16 1999 exterms creation date dc language en dc language dc creator rdf resource http www example org staffid 85740 rdf Description rdf Statement rdf about A1 rdf subject rdf resource http www example org index html rdf predicate rdf resource dc creator rdf object rdf resource http www example org staffid 85740 dc creator Marty dc creator other creatorConfidenceInFact 95 other creatorConfidenceInFact rdf Statement rdf RDF Jena Reification Jena represents a reified statement as a reification quad and each component is a quadlet Users can directly manipulate the quads in Jena or use the additional support that Jena provides Jena optimizes the storage for the reification quads avoiding having to store the extra four statements for a single reified statement Backup JENA REIFICATION API DETAILS Reification Jena uses the ReifiedStatement interface to represent a reified statement as a Jena resource Jena provides a function to find the statement that is being reified using the function ReifiedStatement getStatement Reification Creating Reified Statements from a Resource in Jena Consider a resource R associated with a reified statement but is itself not a ReifiedStatement object a case in which the resource can itself be directly converted to a reified statement ReifiedStatement R as ReifiedStatement class Knowing a resource name allows a ReifiedStatement object to be constructed without actually knowing the statement Reification Creating Reified Statements from a Resource in Jena continued If no associated reified statements actually exist the CannotReifyException is thrown To find out if a reification is possible we can use the predicate RDFNode canAs ReifiedStatement class Reification Testing Statements for Reification in Jena Users may wish to test if a certain statement is reified Methods such as Statement isReified or Model isReified Statement return true if and only if the statement is reified in the model The first method tests that the statement is reified in its own model while the second method tests that the statement is reified in the given model it doesn t test it in any other model Reification Listing Reified Statements in Jena These functions works the same way as listStatements Each returns a RSIterator object where each element is a ReifiedStatement and nextRS delivers the reified statement and they are Reification Listing Reified Statements in Jena continued Statement listReifiedStatements lists all reifications of the statement in the current model Model listReifiedStatements lists all reified statements in this model Model listReifiedStatements Statement s lists all reified statements reifying s in this model Reification Creating Reified Statements from Statements in Jena Reified statements do not necessarily have to be created by asserting their quads into a model they can be directly created from their statements Statement createReifiedStatement Statement createReifiedStatement URIString continued Reification Creating Reified Statements from Statements in Jena continued Model createReifiedStatement Statement Model createReifiedStatement URIString Statement Each of the above functions returns a ReifiedStatement object who s getStatement method delivers the original statement Reification Creating Reified Statements from Statements in Jena continued If the methods use the form in which the String is non null the ReifiedStatement created is a named resource and the String is its URI Otherwise it is a bnode The previous Statement methods create a ReifiedStatement in that Statement s model The previous Model methods create a ReifiedStatement in that model Reification Creating Reified Statements from Statements in Jena continued It is not permitted for two different non equal statements to be reified onto the same reification resource an attempt causes the AlreadyReifiedException The method Model getAnyReifiedStatement Statement returns a reified statement for the given statement if it exists or creates a new one via a bnode Reification Reification when models are copied When a model is added to another model the ordinary statements as well as the reified statements are copied To avoid this we can use the function Model add Model m boolean bSuppress If bSuppress is true then the reified statements are not copied Reification Removing Reified Statements in


View Full Document

UTD CS 6375 - Reification

Download Reification
Our administrator received your request to download this document. We will send you the file to your email shortly.
Loading Unlocking...
Login

Join to view Reification and access 3M+ class-specific study document.

or
We will never post anything without your permission.
Don't have an account?
Sign Up

Join to view Reification and access 3M+ class-specific study document.

or

By creating an account you agree to our Privacy Policy and Terms Of Use

Already a member?