RDF

RDF

R4R provide basic RDF Tutorials concept withRDF Examples .Through R4R you can develop RDF programming concept. R4R provideRDF Interview Questions with answers.R4R provide RDF Languages study materials in easy way.

Introduction of RDF

RDF stands for Resource Description Framework.The Resource Description Framework (RDF) is infrastructure that provide facility to enables the encoding, exchange and reuse of structured metadata.

The Resource Description Framework (RDF) works as a language for representing information about resources in the World Wide Web.. RDF is used to designed to be read and understood by computers.RDF is not designed for being displayed to people..RDF is a framework for describing resources on the web.RDF is an application of XML.

The RDF Model

RDF provides a model for describing resources. Resources have properties . RDF defines a resource as any object that is uniquely identifiable by an Uniform Resource Identifier

RDF Model Browser is a software platform for interactive visualization of RDF models.The properties associated with resources are identified by property-types, and property-types have corresponding values.It is intended to give comprehensive experience with the model using multiple interactive views. Several views are implemented with this release.

In RDF, values may be atomic in nature. In both cases model can either replace the one that is already visualized or be added to it.A collection of these properties that refers to the same resource is called a description.

Creating an RDF model with two statements, serialized to RDF/XML

 


import com.hp.hpl.mesa.rdf.jena.mem.ModelMem;
import com.hp.hpl.mesa.rdf.jena.model.*;
import com.hp.hpl.mesa.rdf.jena.common.PropertyImpl;
import java.io.FileOutputStream;
import java.io.PrintWriter;


public class Rdfexample extends Object {
    
    public static void main (String str[]) {
        String urlstring = "someurl";
        String positionstring = "anotherurl";
        String relatedstring = "related";
      try {
          // Create an empty graph
          Model mdl = new ModelMem(  );

          // Create the resource
          Resource postcon = mdl.createResource(urlstring);

          // Create the predicate (property)
          Property related = mdl.createProperty(positionstring, relatedstring);
           
          // Add the properties with associated values (objects)
          postcon.addProperty(related, 
                              "some url");
          postcon.addProperty(related, 
                              "someurl");

          // Print RDF/XML of model to system output
          mdl.write(new PrintWriter(System.out));

        } catch (Exception e) {
            System.out.println("Failed: " + e);
        }
      }

RDF Containers

RDF has a container vocabulary consisting of three predefined types .

  1. Acontainer is a resource that contains things.
  2. The contained things are called members.
  3. The members of a container are resources or literals.
RDF defines three types of containers
  1. rdf:Bag:- BAG is an unordered collection
  2. rdf:Seq:-a SEQ is an ordered collection
  3. rdf:Alt:-It represent alternatives that is unordered collection.
Advantages of RDF
  • Independence in anyone can create properties
  • Interchange in any RDF file can be converted to XML
  • The RDF model is canonicalization of a graph, and has all the advantages of structuring information using graphs Scalability in RDF's are simple three-part records
  • Disadvantages of RDF
  • RDF edge case all node URIs are transient, reification
  • RDF is too complex
  • RDF is useful for large datasets only
  • RDF need an extra data structure for the graph
  • RDF Tutorials
    RDF Examples
    RDF Interview Materials

    Tolal:0 Click:

    Show All Comments

    Did not find what you were looking for leave your name and message. We will revert within 24 hours
    Name:
    eMail:
    Comment / Feedback: