Options
All
  • Public
  • Public/Protected
  • All
Menu

rdflib

Index

References

IndexedFormula

Renames and re-exports Store

Namespace

Renames and re-exports __type

namedNode

Renames and re-exports sym

Properties

jsonParser

jsonParser: { parseJSON: (data: any, source: any, store: any) => void }

Type declaration

  • parseJSON: (data: any, source: any, store: any) => void
      • (data: any, source: any, store: any): void
      • Parameters

        • data: any
        • source: any
        • store: any

        Returns void

Variables

DataFactory

DataFactory: IRDFlibDataFactory = ...

Full RDFLib.js Data Factory

NextId

NextId: number = BlankNode.nextId

log

log: { debug: any; error: any; info: any; msg: any; success: any; warn: any } = ...

Type declaration

  • debug:function
    • debug(x: any): void
  • error:function
    • error(x: any): void
  • info:function
    • info(x: any): void
  • msg:function
    • msg(x: any): void
  • success:function
    • success(x: any): void
  • warn:function
    • warn(x: any): void

Functions

N3Parser

  • N3Parser(store: any, openFormula: any, thisDoc: any, baseURI: any, genPrefix: any, metaURI: any, flags: any, why: any): SinkParser
  • Parameters

    • store: any
    • openFormula: any
    • thisDoc: any
    • baseURI: any
    • genPrefix: any
    • metaURI: any
    • flags: any
    • why: any

    Returns SinkParser

SPARQLToQuery

  • SPARQLToQuery(SPARQL: any, testMode: any, kb: any): false | Query
  • sparql:

    SPARQL text that is converted to a query object which is returned.

    testmode:

    testing flag. Prevents loading of sources.

    Parameters

    • SPARQL: any
    • testMode: any
    • kb: any

    Returns false | Query

Serializer

  • Serializer(store: any): Serializer

blankNode

defaultGraph

  • defaultGraph(): default

fetcher

Const fromNT

  • fromNT(str: any): any

graph

  • graph(features?: any, opts?: any): Store

isBlankNode

  • isBlankNode(obj: any): obj is BlankNode
  • TypeGuard for RDF/JS spec BlankNodes

    Parameters

    • obj: any

    Returns obj is BlankNode

isCollection

isGraph

  • isGraph(obj: any): obj is Quad_Graph
  • TypeGuard for valid RDF/JS Graph types

    Parameters

    • obj: any

    Returns obj is Quad_Graph

isLiteral

  • isLiteral(value: any): value is Literal
  • TypeGuard for RDF/JS spec Literals

    Parameters

    • value: any

    Returns value is Literal

isNamedNode

  • isNamedNode(obj: any): obj is NamedNode
  • TypeGuard for RDF/JS spec NamedNodes

    Parameters

    • obj: any

    Returns obj is NamedNode

isPredicate

  • isPredicate(obj: any): obj is Quad_Predicate
  • TypeGuard for valid RDF/JS spec Predicate types

    Parameters

    • obj: any

    Returns obj is Quad_Predicate

isQuad

  • isQuad(obj: any): obj is Quad<any, any, any, any>
  • TypeGuard for RDF/JS spec Quads

    Parameters

    • obj: any

    Returns obj is Quad<any, any, any, any>

isRDFObject

  • isRDFObject(obj: any): obj is Quad_Object
  • TypeGuard for valid RDF/JS spec Object types

    Parameters

    • obj: any

    Returns obj is Quad_Object

isRDFlibObject

  • isRDFlibObject(obj: any): obj is ObjectType
  • TypeGuard for valid RDFlib Object types, also allows Collections

    Parameters

    • obj: any

    Returns obj is ObjectType

isStatement

  • isStatement(obj: any): obj is Statement<SubjectType, PredicateType, ObjectType, GraphType>
  • TypeGuard for RDFLib Statements

    Parameters

    • obj: any

    Returns obj is Statement<SubjectType, PredicateType, ObjectType, GraphType>

isStore

  • isStore(obj: any): obj is Store

isSubject

  • isSubject(obj: any): obj is Quad_Subject
  • TypeGuard for valid RDF/JS spec Subject types

    Parameters

    • obj: any

    Returns obj is Quad_Subject

isTerm

  • isTerm(obj: any): obj is Term

isVariable

  • isVariable(obj: any): obj is Variable
  • TypeGuard for RDFLib Variables

    Parameters

    • obj: any

    Returns obj is Variable

lit

  • lit(val: string, lang?: string, dt?: NamedNode): Literal

literal

  • literal(value: string, languageOrDatatype?: string | NamedNode): Literal

parse

  • parse(str: string, kb: Formula, base: string, contentType?: string, callback?: CallbackFunc): void
  • Parse a string and put the result into the graph kb. Normal method is sync. Unfortunately jsdonld is currently written to need to be called async. Hence the mess below with executeCallback.

    Parameters

    • str: string

      The input string to parse

    • kb: Formula

      The store to use

    • base: string

      The base URI to use

    • contentType: string = 'text/turtle'

      The MIME content type string for the input - defaults to text/turtle

    • Optional callback: CallbackFunc

    Returns void

quad

  • quad(subject: Term, predicate: Term, object: Term, graph?: Term): Statement<SubjectType, PredicateType, ObjectType, GraphType>

queryToSPARQL

  • queryToSPARQL(query: any): string

serialize

  • serialize(target: Formula | NamedNode | BlankNode, kb?: Store, base?: unknown, contentType?: string, callback?: (err: undefined | null | Error, result?: string) => any, options?: { flags: string }): string | undefined
  • Serialize to the appropriate format

    Parameters

    • target: Formula | NamedNode | BlankNode
    • Optional kb: Store
    • Optional base: unknown
    • Optional contentType: string
    • Optional callback: (err: undefined | null | Error, result?: string) => any
        • (err: undefined | null | Error, result?: string): any
        • Parameters

          • err: undefined | null | Error
          • Optional result: string

          Returns any

    • Optional options: { flags: string }
      • flags: string

        A string of letters, each of which set an options e.g. deinprstux

    Returns string | undefined

sparqlUpdateParser

  • sparqlUpdateParser(str: any, kb: any, base: any): { query: any }

st

  • st(subject: Quad_Subject, predicate: Quad_Predicate, object: Quad_Object, graph?: Quad_Graph): Statement<SubjectType, PredicateType, ObjectType, GraphType>
  • Parameters

    • subject: Quad_Subject
    • predicate: Quad_Predicate
    • object: Quad_Object
    • Optional graph: Quad_Graph

    Returns Statement<SubjectType, PredicateType, ObjectType, GraphType>

sym

Const term

  • term<T>(value: ValueType): T
  • Type parameters

    • T: FromValueReturns<any>

    Parameters

    • value: ValueType

    Returns T

termValue

  • termValue(node: string | Term): string
  • Retrieve the value of a term, or self if already a string.

    Parameters

    • node: string | Term

    Returns string

triple

  • triple(subject: Term, predicate: Term, object: Term, graph?: Term): Quad<any, any, any, any>
  • Returns a new instance of Quad. If graph is undefined or null it MUST set graph to a DefaultGraph.

    Parameters

    • subject: Term
    • predicate: Term
    • object: Term
    • Optional graph: Term

    Returns Quad<any, any, any, any>

variable

Generated using TypeDoc