Remarks

Scenes are conveniently retrieved from a Manifest by iterating through Sequence in the Manifest, inner loop the Scenes in each sequence

See

Sequence

Example

var manifest: Manifest;
function doSomethingWithScene(scene:Scene)...
...
foreach(var seq:Sequence of manifest.getSequences()
foreach(var scene : Scene of seq.getScenes()
doSomethingWithScene(scene);

Hierarchy (view full)

Constructors

Properties

__jsonld: any
_allRanges: null | Range[] = null
_annotationIdMap: any
_topRanges: Range[] = []
context: string
defaultTree: TreeNode
externalResource: IExternalResource
id: string
index: number = 0
isLoaded: boolean = false
items: Sequence[] = []
parentCollection: Collection
parentLabel: string

Accessors

  • get annotationIdMap(): Object
  • Developer Note: The concept of the "id map" appear in the JSON-LD specification https://www.w3.org/TR/json-ld11/#dfn-id-map This functionality may be available as well in the 'nodeMap' code of the digitalbazaar/jsonld library

    this very simplified version just returns a mao of id -> Annotation nodes in manifest

    THe annotationIdMap is a Javascript object whose property names are IRI (id values) and property values are instances of the Annotation class

    Returns Object

Methods

  • Parameters

    • r: any
    • path: string
    • Optional parentRange: Range

    Returns void

  • returns the PropertyValue which in turn allows a language-specific string encoded in the json as the "label" property

    Returns PropertyValue

    Example

    var label = manifest.getLabel().getValue(); // returns the string for default locale
    

    Example

    var label = manifest.getLabel().getValue(locale); // locale a string , examples
    // would be "fr", "en-US",
  • A function that wraps the getProperty function, which client code can use if it is needed to identify when the json value of a property is an IRI -- Internationalized Resource Identifier

    If the value of the json value is a bare string, then it will be wrapped in a json object with the string in the property 'id', additionally that property will have a property 'isIRI' which will be true for the literal string case, otherwise false meaning the returned getProperty should be parsed as before.

    Parameters

    • name: string

    Returns any

  • Returns null | ViewingDirection