Index | OAT homepage | OpenLink Software

# OATDOCfresnel

- OATDOCfresnel
- _ _ fresnel.js
- _ _ _ _ Objects
- _ _ _ _ _ _ OAT.Fresnel()
- _ _ _ _ Methods
- _ _ _ _ _ _ OAT.Fresnel::addURL(url, callback)
- _ _ _ _ _ _ OAT.Fresnel::format(dataObject)
- _ _ _ _ Example

## fresnel.js

Fresnel Lens RDF Processor.

### Objects

#### OAT.Fresnel()

Creates the Fresnel Processor object.

### Methods

#### OAT.Fresnel::addURL(url, callback)

Loads a Fresnel RDF template, located at `url` . After loading and parsing is complete, `callback` (without arguments) is executed.

#### OAT.Fresnel::format(dataObject)

Formats an RDF data set using loaded template. The `dataObject` is an OAT RDF structure, usually a `store.data.all` property. This function returns an array with two values:

- [0] - an XML document, containing the transformed document,
- [1] - array of CSS stylesheets, referenced in Fresnel template.

### Example

    var fresnel = new OAT.Fresnel();
    var rdf = new OAT.RDFStore(); /* don't forget to load some RDF into the store... */

    var loadedCallback = function() {
            var results = fresnel.format(rdf.data.all);
    }
    fresnel.addURL("myFresnelTemplate.n3");

Copyright (C) 2005-2008 OpenLink Software