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.
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.
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.
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 has a container vocabulary consisting of three predefined types .
- Acontainer is a resource that contains things.
- The contained things are called members.
- The members of a container are resources or literals.
- rdf:Bag:- BAG is an unordered collection
- rdf:Seq:-a SEQ is an ordered collection
- rdf:Alt:-It represent alternatives that is unordered collection.