Network Working Group P. Thierry
Internet-Draft Thierry Technologies
Intended status: Experimental August 06, 2013
Expires: February 07, 2014

BULK RDF namespace
draft-thierry-bulk-rdf-00

Abstract

This specification describes a BULK serialization of RDF ontologies and graphs.

Status of This Memo

This Internet-Draft is submitted in full conformance with the provisions of BCP 78 and BCP 79.

Internet-Drafts are working documents of the Internet Engineering Task Force (IETF). Note that other groups may also distribute working documents as Internet-Drafts. The list of current Internet-Drafts is at http://datatracker.ietf.org/drafts/current/.

Internet-Drafts are draft documents valid for a maximum of six months and may be updated, replaced, or obsoleted by other documents at any time. It is inappropriate to use Internet-Drafts as reference material or to cite them other than as "work in progress."

This Internet-Draft will expire on February 07, 2014.

Copyright Notice

Copyright (c) 2013 IETF Trust and the persons identified as the document authors. All rights reserved.

This document is subject to BCP 78 and the IETF Trust's Legal Provisions Relating to IETF Documents (http://trustee.ietf.org/license-info) in effect on the date of publication of this document. Please review these documents carefully, as they describe your rights and restrictions with respect to this document. Code Components extracted from this document must include Simplified BSD License text as described in Section 4.e of the Trust Legal Provisions and are provided without warranty as described in the Simplified BSD License.


Table of Contents

1. Introduction

1.1. Conventions and Terminology

The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in RFC 2119 [RFC2119].

Literal numerical values are provided in decimal or hexadecimal as appropriate. Hexadecimal literals are prefixed with 0x to distinguish them from decimal literals.

BULK bytes sequences and expressions are described with the same conventions than used in the BULK 1.0 specification [BULK1]

2. BULK RDF namespace

The RDF namespace is an official namespace identified by the UUID urn:uuid:ed460331-a89b-5742-a8de-907dff727779 (BULK, "http://www.w3.org/1999/02/22-rdf-syntax-ns#"). Its first purpose is to serialize both RDF ontologies and graphs, but as RDF is deeply rooted in the World Wide Web and the REST architecture, some of the names and forms defined in this specification are intended to be used in applications related to those.

This specification defines the type URIString, which is an array whose content is a string conforming to the "URI-reference" production in [RFC3986] (section 4.1).

2.1. URI reference

name
0x1 (mnemonic: uriref )
shape
( uriref URIString )

This form makes it possible to differentiate a string containing a URI from a URI reference itself.

Type: URIRef

2.2. Base URI

name
0x2 (mnemonic: base )
shape
( base URIString )

This form changes the current base URI for URI resolution. If the given URI is relative, it must be resolved with the current base URI.

2.3. URI prefix

name
0x3 (mnemonic: prefix )
shape
( prefix {uri} )

Name's type
EagerFunction
Form's type
EagerFunction
Form's value
a function that returns a URIRef whose content is the concatenation of {uri} and its only argument (or returns {uri} if called without arguments)

{uri} can be of type URIString or URIRef. If it is of type URIRef, the above description should be taken as if the form is of shape ( prefix ( uriref {uri} ) ).

2.4. blank

name
0x4 (mnemonic: blank )
shape
( blank )

Name's type
EagerFunction
Form's type
Expr
Form's value
a new blank node. If a same blank node must be used in several forms, it should be made the value of a name.

2.5. RDF literals

Literals are arbitrary data that can be an object in an RDF triple. It is important to note that their BULK serialization doesn't need to denote the string of their lexical form.

Any array used as object in an RDF triple has the semantics of a plain literal without language tag.

2.5.1. Plain literal

name
0x5 (mnemonic: plain )
shape
( plain {lang}:Array {literal}:Array )

This is a plain RDF literal. {lang} is the language tag.

2.5.2. Typed literal

name
0x6 (mnemonic: type )
shape
( type {id}:URIRef {literal} )

This is a typed RDF literal. {id} is the datatype URI. Each type defines what is legal as {literal}.

2.5.3. XMLLiteral

name
0x7 (mnemonic: xmlliteral )
value
( uriref "http://www.w3.org/1999/02/22-rdf-syntax-ns#XMLLiteral" )

A literal with this type SHOULD contain a BULK serialization of XML (cf. [BULK-XML]). An application MUST NOT use an array for this literal for anyhting else than a string that belongs to the lexical space defined for http://www.w3.org/1999/02/22-rdf-syntax-ns#XMLLiteral.

2.6. Triples

name
0x8 (mnemonic: triples )
shape
( triples {triples} )

{triples} must be a sequence of ( {subj}:URIRef {pred}:URIRef {obj} ).

2.7. Turtle-like statements

name
0x9 (mnemonic: turtle )
shape
( turtle {statements} )

{statements} MUST be a sequnce of ( {subj}:URIRef {preds} ), where {preds} MUST be a sequence of ( {pred}:URIRef {objs} ), where {objs} is a sequence.

2.8. RDF vocabulary

The following names are associated with uriref forms, with a base URI of http://www.w3.org/1999/02/22-rdf-syntax-ns#. Their mnemonic is the lowercased URI reference.

2.9. RDF embedding

name
0x20 (mnemonic: this-resource )
shape
this-resource

This expression is intended to help embedding RDF metadata alongside or within a resource. It has the semantics of a blank node that designates this resource. What makes a resource the current described resource is application-dependent.

3. Security Considerations

4. References

4.1. Normative References

[RFC2119] Bradner, S., "Key words for use in RFCs to Indicate Requirement Levels ", BCP 14, RFC 2119, March 1997.
[RFC3986] Berners-Lee, T., Fielding, R. and L. Masinter, "Uniform Resource Identifiers (URI): Generic Syntax ", RFC 3986, STD 66, January 2005.
[BULK1] Thierry, P., "Binary Uniform Language Kit 1.0", Internet-Draft draft-thierry-bulk-02, August 2013.

4.2. Informative references

[RDF-CONCEPTS] Klyne, G. and J.J. Carroll, "Resource Description Framework (RDF): Concepts and Abstract Syntax", February 2004.
[BULK-XML] Thierry, P., "BULK Simple XML namespace", Internet-Draft draft-thierry-bulk-xml-00, August 2013.

Appendix A. Example: RDF Schema vocabulary

Here is the text notation of a BULK stream defining references for each element in the RDF Schema vocabulary. The whole stream is 444 bytes in length.

( bulk:version 1 0 )
( bulk:ns 32 rdf )
( bulk:ns* 33 rdfs )
( define rdfs:schema ( prefix "http://www.w3.org/2000/01/rdf-schema#" ) )
( define rdfs:resource ( rdfs:schema "Resource" ) )
( define rdfs:class ( rdfs:schema "Class" ) )
( define rdfs:subclassof ( rdfs:schema "subClassOf" ) )
( define rdfs:subpropertyof ( rdfs:schema "subPropertyOf" ) )
( define rdfs:comment ( rdfs:schema "comment" ) )
( define rdfs:label ( rdfs:schema "label" ) )
( define rdfs:domain ( rdfs:schema "domain" ) )
( define rdfs:range ( rdfs:schema "range" ) )
( define rdfs:seealso ( rdfs:schema "seeAlso" ) )
( define rdfs:isdefinedby ( rdfs:schema "isDefinedBy" ) )
( define rdfs:literal ( rdfs:schema "Literal" ) )
( define rdfs:container ( rdfs:schema "Container" ) )
( define rdfs:containermembershipproperty ( rdfs:schema "ContainerMembershipProperty" ) )
( define rdfs:member ( rdfs:schema "member" ) )
( define rdfs:datatype ( rdfs:schema "Datatype" ) )
( define rdfs:schema* ( rdfs:schema ) )
	

Here is the text notation of a BULK stream containg a small part of the RDF Schema ontology. The whole stream is 375 bytes in length (the corresponding RDF/XML document would be 1525 bytes in length).

( bulk:version 1 0 )
( bulk:ns 32 rdf )
( bulk:ns 33 rdfs )
( turtle
  ( rdfs:resource
    ( rdf:type rdfs:class )
    ( rdfs:isdefinedby rdfs:schema* )
    ( rdfs:label "Resource" )
    ( rdfs:comment "The class resource, everything." ) )
  ( rdfs:class
    ( rdf:type rdfs:class )
    ( rdfs:isdefinedby rdfs:schema* )
    ( rdfs:label "Class" )
    ( rdfs:comment "The class of classes." )
    ( rdfs:subclassof rdfs:resource ) )
  ( rdfs:subclassof
    ( rdf:type rdf:property )
    ( rdfs:isdefinedby rdfs:schema* )
    ( rdfs:label "subClassOf" )
    ( rdfs:comment "The subject is a subclass of a class." )
    ( rdfs:range rdfs:class )
    ( rdfs:domain rdfs:class ) )
  ( rdfs:subpropertyof
    ( rdf:type rdf:property )
    ( rdfs:isdefinedby rdfs:schema* )
    ( rdfs:label "subPropertyOf" )
    ( rdfs:comment "The subject is a subproperty of a property." )
    ( rdfs:range rdf:property )
    ( rdfs:domain rdf:property ) ) )
	

Author's Address

Pierre Thierry Thierry Technologies EMail: pierre@nothos.net