How to use the rdf-ext.namedNode function in rdf-ext

To help you get started, we’ve selected a few rdf-ext examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github inrupt / wac-ldp / src / lib / storage / membersListAsResourceData.ts View on Github external
export function membersListAsQuadStream (containerUrl: URL, membersList: Array): ReadableStream {
  const dataset = rdf.dataset()
  membersList.map(member => {
    dataset.add(rdf.quad(
      rdf.namedNode(''),
      rdf.namedNode(LDP.contains.toString()),
      rdf.namedNode(containerUrl.toString() + member.name)))
  })
  debug('setting container type', LDP, RDF)
  dataset.add(rdf.quad(
    rdf.namedNode(''),
    rdf.namedNode(RDF.type.toString()),
    rdf.namedNode(LDP.BasicContainer.toString())
  ))
  dataset.add(rdf.quad(
    rdf.namedNode(''),
    rdf.namedNode(RDF.type.toString()),
    rdf.namedNode(LDP.Container.toString())
  ))
  dataset.add(rdf.quad(
    rdf.namedNode(''),
    rdf.namedNode(RDF.type.toString()),
    rdf.namedNode(LDP.RDFSource.toString())
  ))
  debug(dataset)
  return dataset.toStream()
}
github inrupt / wac-ldp / src / lib / storage / membersListAsResourceData.ts View on Github external
membersList.map(member => {
    dataset.add(rdf.quad(
      rdf.namedNode(''),
      rdf.namedNode(LDP.contains.toString()),
      rdf.namedNode(containerUrl.toString() + member.name)))
  })
  debug('setting container type', LDP, RDF)
github inrupt / wac-ldp / src / lib / storage / membersListAsResourceData.ts View on Github external
membersList.map(member => {
    dataset.add(rdf.quad(
      rdf.namedNode(''),
      rdf.namedNode(LDP.contains.toString()),
      rdf.namedNode(containerUrl.toString() + member.name)))
  })
  debug('setting container type', LDP, RDF)
github inrupt / wac-ldp / src / lib / storage / membersListAsResourceData.ts View on Github external
export function membersListAsQuadStream (containerUrl: URL, membersList: Array): ReadableStream {
  const dataset = rdf.dataset()
  membersList.map(member => {
    dataset.add(rdf.quad(
      rdf.namedNode(''),
      rdf.namedNode(LDP.contains.toString()),
      rdf.namedNode(containerUrl.toString() + member.name)))
  })
  debug('setting container type', LDP, RDF)
  dataset.add(rdf.quad(
    rdf.namedNode(''),
    rdf.namedNode(RDF.type.toString()),
    rdf.namedNode(LDP.BasicContainer.toString())
  ))
  dataset.add(rdf.quad(
    rdf.namedNode(''),
    rdf.namedNode(RDF.type.toString()),
    rdf.namedNode(LDP.Container.toString())
  ))
  dataset.add(rdf.quad(
    rdf.namedNode(''),
    rdf.namedNode(RDF.type.toString()),
    rdf.namedNode(LDP.RDFSource.toString())
  ))
  debug(dataset)
  return dataset.toStream()
}
github inrupt / wac-ldp / src / lib / storage / membersListAsResourceData.ts View on Github external
export function membersListAsQuadStream (containerUrl: URL, membersList: Array): ReadableStream {
  const dataset = rdf.dataset()
  membersList.map(member => {
    dataset.add(rdf.quad(
      rdf.namedNode(''),
      rdf.namedNode(LDP.contains.toString()),
      rdf.namedNode(containerUrl.toString() + member.name)))
  })
  debug('setting container type', LDP, RDF)
  dataset.add(rdf.quad(
    rdf.namedNode(''),
    rdf.namedNode(RDF.type.toString()),
    rdf.namedNode(LDP.BasicContainer.toString())
  ))
  dataset.add(rdf.quad(
    rdf.namedNode(''),
    rdf.namedNode(RDF.type.toString()),
    rdf.namedNode(LDP.Container.toString())
  ))
  dataset.add(rdf.quad(
    rdf.namedNode(''),
    rdf.namedNode(RDF.type.toString()),
    rdf.namedNode(LDP.RDFSource.toString())
  ))
  debug(dataset)
  return dataset.toStream()
}
github inrupt / wac-ldp / src / lib / storage / membersListAsResourceData.ts View on Github external
membersList.map(member => {
    dataset.add(rdf.quad(
      rdf.namedNode(''),
      rdf.namedNode(LDP.contains.toString()),
      rdf.namedNode(containerUrl.toString() + member.name)))
  })
  debug('setting container type', LDP, RDF)
github inrupt / wac-ldp / src / lib / storage / membersListAsResourceData.ts View on Github external
rdf.namedNode(containerUrl.toString() + member.name)))
  })
  debug('setting container type', LDP, RDF)
  dataset.add(rdf.quad(
    rdf.namedNode(''),
    rdf.namedNode(RDF.type.toString()),
    rdf.namedNode(LDP.BasicContainer.toString())
  ))
  dataset.add(rdf.quad(
    rdf.namedNode(''),
    rdf.namedNode(RDF.type.toString()),
    rdf.namedNode(LDP.Container.toString())
  ))
  dataset.add(rdf.quad(
    rdf.namedNode(''),
    rdf.namedNode(RDF.type.toString()),
    rdf.namedNode(LDP.RDFSource.toString())
  ))
  debug(dataset)
  return dataset.toStream()
}