URF

Elegant, simple, flexible data representation framework.
URF
Uniform Resource Framework
https://urf.io/

Resources

Everything describable is a resource.
URF resource.
  • Every resource may be an instance of some type.
  • Every resource may be identified by a tag.

Example Resources

  • The web page at https://www.example.com/trees.html.
  • The book A Tale of Trees.
  • Gene ENSG00000223972.5.
  • Tree #456.
  • The date September 17, 2017.
  • The integer 5.

Statements

Any resource can be described by property/value pairs.
URF resource, property, and value.
  • Each property/value pair is a statement.
    • Some subject resource …
    • … has some property
    • … that has some value.
  • A statement asserts that some proposition is true.

Example Statements

  • The web page at https://www.example.com/trees.html was written by Jane Doe.
  • The book A Tale of Trees was published by Arbor Publishing.
  • Gene ENSG00000223972.5. has a name of DDX11L1.
  • Tree #456 is of species Quercus macrocarpa.
Tree #456 is of species Quercus macrocarpa.
Tree #456 species Quercus macrocarpa.

Property Values

Every property value is itself a resource.
URF Resource
Property values can themselves be described.
  • Tree #456 is of species Quercus macrocarpa.
  • The species Quercus macrocarpa is deciduous.
  • Tree #456 sprouted in the year 1950.
Tree #456 species Quercus macrocarpa is deciduous.

Properties

Each property is also a resource.
Properties themselves be described.

Property names should start with a lowercase letter to distinguish them from class names.

  • The resource bio-deciduous is a property.
  • The bio-deciduous property can only be used to describe a species.
  • The bio-deciduous property can only be assigned a Boolean value.
decidious properties.

Tags

Every resource may be identified by a unique tag.
Every tag is an IRI.

Example Tags

https://www.example.com/trees.html
A web page about trees.
urn:uuid:a2f9981a-fc28-4f49-895f-3a1a8b12fc2c
A book about trees.
https://urf/name/Tree#456
A particular tree.
https://urf/name/urf/Boolean#true
The Boolean value true.

Namespaces

Tag are groups into namespaces.
Each namespace is identified by an IRI.
Resources from different namespaces can be mixed and matched.

Ad-Hoc Namespace

Simple names are placed in the ad-hoc namespace https://urf.name/.
Tree
https://urf.name/Tree
sproutYear
https://urf.name/sproutYear

Informal Namespaces

Dashed names produce informal namespaces under https://urf.name/.
urf-Boolean
https://urf.name/urf/Boolean
bio-Species
https://urf.name/bio/Species
bio-species
https://urf.name/bio/species

Formal Namespaces

Any IRI ending in the slash / character can be used to identify a formal namespace.

Formal namespaces are normally defined by third parties to create official vocabularies, such as the Dublin Core namespace http://purl.org/dc/elements/1.1/.

  • http://purl.org/dc/elements/1.1/identifier

Persistence

Simple URF (SURF)
Simple JSON-like text format; ideal for marshalling objects using REST.
Text URF (TURF)
Superset of SURF with advanced features; ideal for data storage.
Comma URF (CURF)
Efficient tabular format; ideal for storing large, similar data sets such as gene annotations.
Conceptually all URF graphs serializations represent a series of statements using tags.
subject property value
https://urf.name/Tree#456 * https://urf.name/Tree
https://urf.name/Tree#456 https://urf.name/sproutYear https://urf.name/urf/Year#1950
https://urf.name/Tree#456 https://urf.name/bio/species https://urf.name/bio/Species#quercusMacrocarpa
https://urf.name/bio/Species#quercusMacrocarpa * https://urf.name/bio/Species
https://urf.name/bio/Species#quercusMacrocarpa https://urf.name/bio/deciduous https://urf.name/urf/Boolean#true
https://urf.name/bio/Species * https://urf.name/urf/Class
https://urf.name/bio/deciduous * https://urf.name/urf/Property
https://urf.name/bio/deciduous https://urf.name/urf/domain https://urf.name/bio/Species
https://urf.name/bio/deciduous https://urf.name/urf/range https://urf.name/urf/Boolean
Serializations such as SURF and TURF provide compact, human-readable, equivalent representations of the exact same URF graph.

Tree Data in SURF

|"456"|*Tree:
  sproutYear = @1950
  bio-Species = |"quercusMacrocarpa"|*bio-Species:
    bio-deciduous: true;
  ;
;

Tree Data in TURF

Tree#456:
  sproutYear = @1950
  bio-Species = bio-Species#quercusMacrocarpa:
    bio-deciduous: true;
  ;
;
TURF allows a short form for resources with IDs.
All SURF documents are also valid TURF documents.

Biology Ontology in TURF

bio-Species*urf-Class

bio-deciduous*urf-Property:
  urf-domain = bio-Species
  urf-range = urf-Boolean
;

Species Data in TURF

Data subsets may be stored separately and merged as needed to form a combined URF graph representing all knowledge about subject.
bio-Species#quercusMacrocarpa:
  bio-deciduous: true;
;