Namespace jQuery.rdfwidgets
Library functions for the widget library.
Defined in: jquery.rdf.widgets.js.
Constructor Attributes | Constructor Name and Description |
---|---|
Method Attributes | Method Name and Description |
---|---|
<static> |
jQuery.rdfwidgets.addLoadFilter(f)
Add a function that has a chance to override a source loading.
|
<static> |
jQuery.rdfwidgets.any(s, p, o, w, opts)
Given two of s, p, o, return any match for the missing term.
|
<static> |
jQuery.rdfwidgets.anyStatementMatching(s, p, o, w, opts)
Get a single statement matching a given triple pattern.
|
<static> |
jQuery.rdfwidgets.each(s, p, o, w, opts)
Given two of s, p, o, return all matches for the missing term.
|
<static> |
jQuery.rdfwidgets.getDefaultEndpoint()
Get the default SPARUL endpoint to be used for user-generated content.
|
<static> |
jQuery.rdfwidgets.getDefaultUser()
Get the current default user used when generating ACL for new data.
|
<static> |
jQuery.rdfwidgets.getNodeSubject(node)
Ascend up the DOM looking for an RDFa "about" tag.
|
<static> |
jQuery.rdfwidgets.getStore()
Get the Tabulator RDF Store backing the library.
|
<static> |
jQuery.rdfwidgets.load(uri, o)
Load all of the RDF data from a given URI into the local store.
|
<static> |
jQuery.rdfwidgets.matcher(element, options, norefresh)
Get a Matcher instance that draws into a given element.
|
<static> |
jQuery.rdfwidgets.processHTML(element)
Process the DOM starting from a given element in search of HTML-encoded widgets.
|
<static> |
jQuery.rdfwidgets.remove(uri)
Remove all data associated with a given URI from the local store.
|
<static> |
jQuery.rdfwidgets.removeLoadFilter(f)
Remove a given load filter.
|
<static> |
jQuery.rdfwidgets.setDefaultEndpoint(uri)
Set the default SPARUL endpoint to be used for user-generated content.
|
<static> |
jQuery.rdfwidgets.sourcePending(uri)
See if a specific URI is in the process of loading.
|
<static> |
jQuery.rdfwidgets.sourcesPending()
Get the set of data sources pending.
|
<static> |
jQuery.rdfwidgets.statementsMatching(s, p, o, w, justOne, opts)
Get all statements matching a given triple pattern.
|
<static> |
jQuery.rdfwidgets.whether(s, p, o, w, opts)
Given any of s, p, o, and w, see if any valid match exists.
|
Method Detail
<static>
jQuery.rdfwidgets.addLoadFilter(f)
Add a function that has a chance to override a source loading. If the function returns false, the provided URI will not be loaded.
- Parameters:
- {Function} f
- The filter function. If the function returns false, the data source will not be loaded. The function should have the signature f(uri).
<static>
{Object}
jQuery.rdfwidgets.any(s, p, o, w, opts)
Given two of s, p, o, return any match for the missing term.
- Parameters:
- {String | Object} s Optional
- Subject. A URI, prefixed name, or Symbol.
- {String | Object} p Optional
- Predicate. A URI, prefixed name, or Symbol.
- {String | Object} o Optional
- Object. A URI, prefixed name, Symbol, or Literal.
- {String | Object} w Optional
- Data Source. A URI, prefixed name, or Symbol.
- {Object} opts Optional
- @see CommonOptions
- Returns:
- {Object} A Symbol, Literal, or BlankNode representing a match for the missing term, or undefined if none was found.
<static>
{Array}
jQuery.rdfwidgets.anyStatementMatching(s, p, o, w, opts)
Get a single statement matching a given triple pattern.
- Parameters:
- {String | Object} s Optional
- Subject. A URI, prefixed name, or Symbol.
- {String | Object} p Optional
- Predicate. A URI, prefixed name, or Symbol.
- {String | Object} o Optional
- Object. A URI, prefixed name, Symbol, or Literal.
- {String | Object} w Optional
- Data Source. A URI, prefixed name, or Symbol.
- {Object} opts Optional
- @see CommonOptions
- Returns:
- {Array} An Array of $rdf.Statement objects that match the provided pattern.
<static>
{Array}
jQuery.rdfwidgets.each(s, p, o, w, opts)
Given two of s, p, o, return all matches for the missing term.
- Parameters:
- {String | Object} s Optional
- Subject. A URI, prefixed name, or Symbol.
- {String | Object} p Optional
- Predicate. A URI, prefixed name, or Symbol.
- {String | Object} o Optional
- Object. A URI, prefixed name, Symbol, or Literal.
- {String | Object} w Optional
- Data Source. A URI, prefixed name, or Symbol.
- {Object} opts Optional
- @see CommonOptions
- Returns:
- {Array} An Array of Symbols, Literals, and/or BlankNodes representing matches for the missing term.
<static>
{String}
jQuery.rdfwidgets.getDefaultEndpoint()
Get the default SPARUL endpoint to be used for user-generated content.
- Returns:
- {String} The current endpoint URI.
<static>
{String}
jQuery.rdfwidgets.getDefaultUser()
Get the current default user used when generating ACL for new data.
- Returns:
- {String} The current default user URI.
<static>
{String}
jQuery.rdfwidgets.getNodeSubject(node)
Ascend up the DOM looking for an RDFa "about" tag.
- Parameters:
- {String | Object} node
- The element to search in. Any valid jQuery constructor argument--only the first result of a selector will be searched. Currently does not support safe CURIEs.
- Returns:
- {String} the URI of the first "about" tag found, or the "href" of the first anchor tag found.
<static>
{$rdf.IndexedFormula}
jQuery.rdfwidgets.getStore()
Get the Tabulator RDF Store backing the library.
- Returns:
- {$rdf.IndexedFormula} The data store.
<static>
jQuery.rdfwidgets.load(uri, o)
Load all of the RDF data from a given URI into the local store.
- Parameters:
- {String} uri
- The URI of the new default endpoint.
- {Object} o Optional
- {String} o.endpoint Optional
- The endpoint to be used when data from this source is edited.
- {String} o.name Optional
- The shorthand name of this data source.
- {Function} o.callback Optional
- A function to be called after the data source has loaded, of the form f(uri, success).
<static>
{Matcher}
jQuery.rdfwidgets.matcher(element, options, norefresh)
Get a Matcher instance that draws into a given element.
- Parameters:
- {String | Object} element
- The element to be drawn into. Can be any valid jQuery constructor argument--a selector, a DOM element, or even another jQuery object.
- {Object} options Optional
- @see CommonOptions
- {Boolean} options.filterduplicates Optional
- Ignore identical matches that originate from different data sources.
- {Boolean} norefresh Optional
- If true, this matcher will not refresh itself automatically when new data is loaded.
- Returns:
- {Matcher} The new matcher instance
<static>
jQuery.rdfwidgets.processHTML(element)
Process the DOM starting from a given element in search of HTML-encoded widgets.
- Parameters:
- {String | Object} element Optional, Default: "document.body"
- The element to search in. Any valid jQuery constructor argument--only the first result of a selector will be searched.
<static>
jQuery.rdfwidgets.remove(uri)
Remove all data associated with a given URI from the local store.
- Parameters:
- {String} uri
- The data source for which to remove all data.
<static>
jQuery.rdfwidgets.removeLoadFilter(f)
Remove a given load filter.
- Parameters:
- {Function} f
- a reference to the filter to be removed.
<static>
jQuery.rdfwidgets.setDefaultEndpoint(uri)
Set the default SPARUL endpoint to be used for user-generated content.
- Parameters:
- {String | $rdf.Symbol} uri
- The URI of the new default endpoint.
<static>
{Boolean}
jQuery.rdfwidgets.sourcePending(uri)
See if a specific URI is in the process of loading.
- Parameters:
- {String} uri
- The URI to check.
- Returns:
- {Boolean} true if the data source is pending, false otherwise.
<static>
{Array}
jQuery.rdfwidgets.sourcesPending()
Get the set of data sources pending.
- Returns:
- {Array} The list of URIs which are still loading.
<static>
{Array}
jQuery.rdfwidgets.statementsMatching(s, p, o, w, justOne, opts)
Get all statements matching a given triple pattern.
- Parameters:
- {String | Object} s Optional
- Subject. A URI, prefixed name, or Symbol.
- {String | Object} p Optional
- Predicate. A URI, prefixed name, or Symbol.
- {String | Object} o Optional
- Object. A URI, prefixed name, Symbol, or Literal.
- {String | Object} w Optional
- Data Source. A URI, prefixed name, or Symbol.
- {Boolean} justOne Optional
- If true, only return the first result (still in an Array).
- {Object} opts Optional
- @see CommonOptions
- Returns:
- {Array} An Array of $rdf.Statement objects that match the provided pattern.
<static>
{Boolean}
jQuery.rdfwidgets.whether(s, p, o, w, opts)
Given any of s, p, o, and w, see if any valid match exists.
- Parameters:
- {String | Object} s Optional
- Subject. A URI, prefixed name, or Symbol.
- {String | Object} p Optional
- Predicate. A URI, prefixed name, or Symbol.
- {String | Object} o Optional
- Object. A URI, prefixed name, Symbol, or Literal.
- {String | Object} w Optional
- Data Source. A URI, prefixed name, or Symbol.
- {Object} opts Optional
- @see CommonOptions
- Returns:
- {Boolean} True if a match exists, false otherwise.