Options
All
  • Public
  • Public/Protected
  • All
Menu

Class HashMapDataset

A simple Dataset backed by a HashMap.

extends

Dataset

author

Thomas Minier

Hierarchy

Index

Constructors

constructor

Properties

Private _defaultGraph

_defaultGraph: Graph

Private _namedGraphs

_namedGraphs: Map<string, Graph>

Accessors

iris

  • get iris(): string[]

Methods

addNamedGraph

  • addNamedGraph(iri: string, g: Graph): void

createGraph

  • createGraph(iri: string): Graph
  • Create a new RDF Graph, using the current Graph Factory. This Graph factory can be set using the "setGraphFactory" method.

    Parameters

    • iri: string

      IRI of the graph to create

    Returns Graph

    A new RDF Graph

deleteNamedGraph

  • deleteNamedGraph(iri: string): void

getAllGraphs

  • getAllGraphs(includeDefault?: boolean): Graph[]
  • Returns all Graphs in the Dataset, including the Default one

    Parameters

    • Default value includeDefault: boolean = true

      True if the default graph should be included

    Returns Graph[]

    The list of all graphs in the Dataset

getDefaultGraph

  • getDefaultGraph(): Graph

getNamedGraph

  • getNamedGraph(iri: string): Graph

getUnionGraph

  • getUnionGraph(iris: string[], includeDefault?: boolean): UnionGraph
  • Get an UnionGraph, i.e., the dynamic union of several graphs, from the RDF Graphs in the Dataset.

    Parameters

    • iris: string[]

      Iris of the named graphs to include in the union

    • Default value includeDefault: boolean = false

      True if the default graph should be included

    Returns UnionGraph

    The dynamic union of several graphs in the Dataset

hasNamedGraph

  • hasNamedGraph(iri: string): boolean

setDefaultGraph

  • setDefaultGraph(g: Graph): void

setGraphFactory

  • setGraphFactory(factory: function): void

Generated using TypeDoc