Options
All
  • Public
  • Public/Protected
  • All
Menu

Class Dataset

An abstraction over an RDF datasets, i.e., a collection of RDF graphs.

abstract
author

Thomas Minier

Hierarchy

Index

Constructors

constructor

Properties

Private _graphFactory

_graphFactory: function

Type declaration

    • (iri: string): Graph | null
    • Parameters

      • iri: string

      Returns Graph | null

Accessors

iris

  • get iris(): string[]

Methods

Abstract addNamedGraph

  • addNamedGraph(iri: string, g: Graph): void
  • Add a Named Graph to the Dataset

    Parameters

    • iri: string

      IRI of the Named Graph

    • g: Graph

      RDF Graph

    Returns 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

Abstract deleteNamedGraph

  • deleteNamedGraph(iri: string): void
  • Delete a Named Graph using its IRI

    Parameters

    • iri: string

      IRI of the Named Graph to delete

    Returns 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

Abstract getDefaultGraph

  • getDefaultGraph(): Graph

Abstract getNamedGraph

  • getNamedGraph(iri: string): Graph
  • Get a Named Graph using its IRI

    Parameters

    • iri: string

      IRI of the Named Graph to retrieve

    Returns Graph

    The corresponding Named 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

Abstract hasNamedGraph

  • hasNamedGraph(iri: string): boolean
  • Return True if the Dataset contains a Named graph with the provided IRI

    Parameters

    • iri: string

      IRI of the Named Graph

    Returns boolean

    True if the Dataset contains a Named graph with the provided IRI

Abstract setDefaultGraph

  • setDefaultGraph(g: Graph): void

setGraphFactory

  • setGraphFactory(factory: function): void
  • Set the Graph Factory used by te dataset to create new RDF graphs on-demand

    Parameters

    • factory: function

      Graph Factory

        • Parameters

          • iri: string

          Returns Graph

    Returns void

Generated using TypeDoc