API Docs for: 0.8.2
Show:

XooMLDriver Class

An XooML utility interacts with an storage and is responsible for reading and writing XooML fragments. This is an implementation of XooML utility using Dropbox as the storage.

For ItemMirror core developers only. Enable protected to see.

Constructor

XooMLDriver

(
  • options
)
protected

Parameters:

  • options Object

    Data to construct a new XooMLU with

    • fragmentURI String

      The URI of fragment contains the XooML

    • utilityURI String

      URI of the utility

    • dropboxClient Object

      Authenticated dropbox client

Methods

checkExists

(
  • callback
)
protected

Check if the XooML fragment exists

Parameters:

  • callback Function

    Function to be called when self function is finished with it's operation.

    • error String

      Dropbox error if there is one

    • result Boolean

      True if the fragment exists and false otherwis

getXooMLFragment

(
  • callback(content)
)
protected

Reads and returns a XooML fragment

Parameters:

  • callback(content) Function

    Function to be called when self function is finished with it's operation. content is the content of the XooML fragment.

setXooMLFragment

(
  • uri
  • fragment
  • callback(content)
)
protected

Writes a XooML fragment

Parameters:

  • uri String

    the location of the XooML fragment

  • fragment String

    the content of the XooML fragment

  • callback(content) Function

    Function to be called when self function is finished with it's operation. content is the content of the XooML fragment.