Work on this document has been put on hold indefinitely due to lack of interest. While a significant amount of design work went into this document, at present, there are no known implementations of the specification. There are numerous design issues with this specification and it is not advised that developers implement this API unless they are fully familiar with the drawbacks present in the current design.
RDF enables providers to publish various types of data on the Web in a unified format. This data intends to be machine-interpretable so that web developers can access it by programming languages in order to create applications for i.e., crawling, aggregating, summarizing, or highlighting contained information. While publishing RDF data on the web is vital to the growth of the Semantic Web, using the information to improve the collective utility of the Web is the true goal of the Semantic Web. To accomplish this goal, the RDF Application Programming Interface (RDF API) defines a set of standardized interfaces for working with RDF data in a web-based programming environment.
Conformance requirements phrased as algorithms or specific steps may be implemented in any manner, so long as the end result is equivalent. In particular, the algorithms defined in this specification are intended to be easy to follow, and not intended to be performant.
User agents may impose implementation-specific limits on otherwise unconstrained inputs, e.g. to prevent denial of service attacks, to guard against running out of memory, or to work around platform-specific limitations.
Implementations that use ECMAScript or Java to implement the Interfaces defined in this specification must implement them in a manner consistent with the respective ECMAScript or Java Bindings defined in the Web IDL specification, as this specification uses that specification's terminology. [[!WEBIDL]]
Implementations that use any other language to implement the Interfaces defined in this specification that do not have bindings defined in the Web IDL specification should attempt to map the Interfaces as closely as possible to the implementation language's native mechanisms and datatypes. Developers are encouraged to work with other developers who are providing the RDF Interfaces in the same langauge to ensure that implementations are modular and easily exchangable.
Work on this document has been put on hold indefinitely due to lack of interest. While a significant amount of design work went into this document, at present, there are no known implementations of the specification. There are numerous design issues with this specification and it is not advised that developers implement this API unless they are fully familiar with the drawbacks present in the current design.
RDF provides a means to publish and exchange machine-readable data about resources on the Web. A Web document can be attached with metadata in RDF in order to add a machine-interpretable layer underneath the document's content which is intended to be read by humans. By publishing RDF conform to the principles of Linking Open Data metadata about resources can be interlinked across different Web servers. This enables web developers to process published metadata about for example a News article and combine it with additional information from other sources.
This specification defines the RDF API, which may be used by developers and Web Applications to access and work with RDF data on the Web, while programing in a Web environment. The RDF API is designed to define a standardized programming interface for processing RDF within a Browser environment. The primary target language for the RDF API is ECMAScript, although other languages may also be considered.
This document is a detailed specification for the RDF API. The document is primarily intended for web developers who want to process RDF data in a browser environment.
If you are not familiar with RDF, you should read about the Resource Description Framework (RDF) [[RDF-CONCEPTS]] before reading this document.
This document uses the Web Interface Definition Language [[WEBIDL]] to specify all language bindings. If you intend to implement any part of the RDF API you should be familiar with the Web IDL language [[WEBIDL]].
Examples may contain references to existing vocabularies and use abbreviations in CURIEs and source code. The following is a list of all vocabularies and their abbreviations, as used in this document:
rdf
, e.g., rdf:type
)xsd
, e.g., xsd:integer
)rdfs
, e.g., rdfs:label
)foaf
, e.g., foaf:name
)More and more information providers put RDF data to published Web content. Although a variety of Web browsers have been extended to enable RDF support for viewing, browsing, collecting, and aggregating existing RDF data, a common programming interface for processing RDF data similarly across different programming languages, like it is possible for XML, is still missing.
This specification defines all necessary means for processing RDF within a Browser environment. The RDF API comprises the following functionalities:
The following section contains all of the interfaces that RDFa API implementers are expected to provide as well as guidance to ensure that implementations are conformant.
A
var people = data.getProjections("http://www.w3.org/1999/02/22-rdf-syntax-ns#type", "http://xmlns.com/foaf/0.1/Person");A developer can also specify short-cuts to use when specifying the URI:
data.setMapping("rdf", "http://www.w3.org/1999/02/22-rdf-syntax-ns#type"); data.setMapping("foaf", "http://xmlns.com/foaf/0.1/"); var people = data.getProjections("rdf:type", "foaf:Person");
You can also get a
var albert = data.getProjection("http://example.org/people#albert");
You can get a list of
var peopleNamedAlbert = data.getProjections("foaf:name", "Albert Einstein");
You can retrieve property values from
var albert = data.getProjection("http://example.org/people#albert"); var name = albert.get("foaf:name");
You can specify values that you would like to map to a
var albert = data.getProjection("http://example.org/people#albert", {"name": "foaf:name"}); var name = albert.name;
In order to retrieve a list of all
For example, assume our source document contains the following event, marked up using the Data Vocabulary Event format:
To query for all Event
var events = data.getProjections("rdf:type", "http://rdf.data-vocabulary.org/#Event");
However, to build a special
var events = data.query( { "rdf:type": "http://rdf.data-vocabulary.org/#Event" }, { "type": "rdf:type", "summary": "v:summary", "start": "v:startDate", "end": "v:endDate" } );
The
The
Parses the triples serialized within an input RDF document in to a
Sequence of
If a
A boolean response is given indicating if the parse was successful or not.
Document
, whilst a
Turtle
parser may require a
String
.
The
parse
method of the
The
null
is returned.
null
.
null
, the match is always positive.
null
, the match is always positive.
null
, the match is always positive.
null
, the match is always positive.
null
, the match is always positive.
null
, the match is always positive.
null
, the match is always positive.
A boolean response is given indicating if the parse was successful or not.
Document
, whilst a
Turtle
parser may require a
String
.
At the time of publication, the members of the RDF Web Application Working Group were: