How to use the solid-ui.ns.dc function in solid-ui

To help you get started, we’ve selected a few solid-ui 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 solid / solid-panes / src / pad / padPane.ts View on Github external
agenda.push(function createNewPadDataFile () {
        store.add(newInstance, ns.rdf('type'), PAD('Notepad'), newPadDoc)

        // TODO @@ Remove casting of add
        ;(store.add as any)(
          newInstance,
          ns.dc('created'),
          new Date(),
          newPadDoc
        )
        if (me) {
          store.add(newInstance, ns.dc('author'), me, newPadDoc)
        }
        store.add(newInstance, PAD('next'), newInstance, newPadDoc) // linked list empty

        // Keep a paper trail   @@ Revisit when we have non-public ones @@ Privacy
        store.add(newInstance, ns.space('inspiration'), thisInstance, padDoc)
        store.add(newInstance, ns.space('inspiration'), thisInstance, newPadDoc)

        updater.put(
          newPadDoc,
          store.statementsMatching(undefined, undefined, undefined, newPadDoc),
          'text/turtle',
github solid / solid-panes / src / pad / padPane.source.ts View on Github external
const store = context.session.store
    const updater = store.updater as UpdateManager
    if (newPaneOptions.me && !newPaneOptions.me.uri) {
      throw new Error('notepad mintNew:  Invalid userid')
    }

    var newInstance = (newPaneOptions.newInstance =
      newPaneOptions.newInstance ||
      store.sym(newPaneOptions.newBase + 'index.ttl#this'))
    // var newInstance = kb.sym(newBase + 'pad.ttl#thisPad');
    var newPadDoc = newInstance.doc()

    store.add(newInstance, ns.rdf('type'), ns.pad('Notepad'), newPadDoc)
    // @@ TODO Remove casting
    ;(store.add as any)(newInstance, ns.dc('title'), 'Shared Notes', newPadDoc)
    ;(store.add as any)(newInstance, ns.dc('created'), new Date(), newPadDoc)
    if (newPaneOptions.me) {
      store.add(newInstance, ns.dc('author'), newPaneOptions.me, newPadDoc)
    }
    // kb.add(newInstance, ns.pad('next'), newInstance, newPadDoc);
    // linked list empty @@
    var chunk = store.sym(newInstance.uri + '_line0')
    store.add(newInstance, ns.pad('next'), chunk, newPadDoc) // Linked list has one entry
    store.add(chunk, ns.pad('next'), newInstance, newPadDoc)
    store.add(chunk, ns.dc('author'), newPaneOptions.me, newPadDoc)
    // @@ TODO Remove casting
    ;(store.add as any)(chunk, ns.sioc('content'), '', newPadDoc)

    return new Promise(function (resolve, reject) {
      updater.put(
        newPadDoc,
        store.statementsMatching(undefined, undefined, undefined, newPadDoc),
github solid / solid-panes / src / pad / padPane.source.ts View on Github external
agenda.push(function createNewPadDataFile () {
        store.add(newInstance, ns.rdf('type'), PAD('Notepad'), newPadDoc)

        // TODO @@ Remove casting of add
        ;(store.add as any)(
          newInstance,
          ns.dc('created'),
          new Date(),
          newPadDoc
        )
        if (me) {
          store.add(newInstance, ns.dc('author'), me, newPadDoc)
        }
        store.add(newInstance, PAD('next'), newInstance, newPadDoc) // linked list empty

        // Keep a paper trail   @@ Revisit when we have non-public ones @@ Privacy
        store.add(newInstance, ns.space('inspiration'), thisInstance, padDoc)
        store.add(newInstance, ns.space('inspiration'), thisInstance, newPadDoc)

        updater.put(
          newPadDoc,
          store.statementsMatching(undefined, undefined, undefined, newPadDoc),
          'text/turtle',
          function (_uri2: string, ok: boolean, message: string) {
            if (ok) {
              agenda.shift()!()
            } else {
              complainIfBad(
github solid / solid-panes / src / pad / padPane.source.ts View on Github external
mintNew: function (context, newPaneOptions: any) {
    const store = context.session.store
    const updater = store.updater as UpdateManager
    if (newPaneOptions.me && !newPaneOptions.me.uri) {
      throw new Error('notepad mintNew:  Invalid userid')
    }

    var newInstance = (newPaneOptions.newInstance =
      newPaneOptions.newInstance ||
      store.sym(newPaneOptions.newBase + 'index.ttl#this'))
    // var newInstance = kb.sym(newBase + 'pad.ttl#thisPad');
    var newPadDoc = newInstance.doc()

    store.add(newInstance, ns.rdf('type'), ns.pad('Notepad'), newPadDoc)
    // @@ TODO Remove casting
    ;(store.add as any)(newInstance, ns.dc('title'), 'Shared Notes', newPadDoc)
    ;(store.add as any)(newInstance, ns.dc('created'), new Date(), newPadDoc)
    if (newPaneOptions.me) {
      store.add(newInstance, ns.dc('author'), newPaneOptions.me, newPadDoc)
    }
    // kb.add(newInstance, ns.pad('next'), newInstance, newPadDoc);
    // linked list empty @@
    var chunk = store.sym(newInstance.uri + '_line0')
    store.add(newInstance, ns.pad('next'), chunk, newPadDoc) // Linked list has one entry
    store.add(chunk, ns.pad('next'), newInstance, newPadDoc)
    store.add(chunk, ns.dc('author'), newPaneOptions.me, newPadDoc)
    // @@ TODO Remove casting
    ;(store.add as any)(chunk, ns.sioc('content'), '', newPadDoc)

    return new Promise(function (resolve, reject) {
      updater.put(
        newPadDoc,
github solid / solid-panes / src / pad / padPane.ts View on Github external
const store = context.session.store
    const updater = store.updater as UpdateManager
    if (newPaneOptions.me && !newPaneOptions.me.uri) {
      throw new Error('notepad mintNew:  Invalid userid')
    }

    var newInstance = (newPaneOptions.newInstance =
      newPaneOptions.newInstance ||
      store.sym(newPaneOptions.newBase + 'index.ttl#this'))
    // var newInstance = kb.sym(newBase + 'pad.ttl#thisPad');
    var newPadDoc = newInstance.doc()

    store.add(newInstance, ns.rdf('type'), ns.pad('Notepad'), newPadDoc)
    // @@ TODO Remove casting
    ;(store.add as any)(newInstance, ns.dc('title'), 'Shared Notes', newPadDoc)
    ;(store.add as any)(newInstance, ns.dc('created'), new Date(), newPadDoc)
    if (newPaneOptions.me) {
      store.add(newInstance, ns.dc('author'), newPaneOptions.me, newPadDoc)
    }
    // kb.add(newInstance, ns.pad('next'), newInstance, newPadDoc);
    // linked list empty @@
    var chunk = store.sym(newInstance.uri + '_line0')
    store.add(newInstance, ns.pad('next'), chunk, newPadDoc) // Linked list has one entry
    store.add(chunk, ns.pad('next'), newInstance, newPadDoc)
    store.add(chunk, ns.dc('author'), newPaneOptions.me, newPadDoc)
    // @@ TODO Remove casting
    ;(store.add as any)(chunk, ns.sioc('content'), '', newPadDoc)

    return new Promise(function (resolve, reject) {
      updater.put(
        newPadDoc,
        store.statementsMatching(undefined, undefined, undefined, newPadDoc),
github solid / solid-panes / src / pad / padPane.ts View on Github external
agenda.push(function createNewPadDataFile () {
        store.add(newInstance, ns.rdf('type'), PAD('Notepad'), newPadDoc)

        // TODO @@ Remove casting of add
        ;(store.add as any)(
          newInstance,
          ns.dc('created'),
          new Date(),
          newPadDoc
        )
        if (me) {
          store.add(newInstance, ns.dc('author'), me, newPadDoc)
        }
        store.add(newInstance, PAD('next'), newInstance, newPadDoc) // linked list empty

        // Keep a paper trail   @@ Revisit when we have non-public ones @@ Privacy
        store.add(newInstance, ns.space('inspiration'), thisInstance, padDoc)
        store.add(newInstance, ns.space('inspiration'), thisInstance, newPadDoc)

        updater.put(
          newPadDoc,
          store.statementsMatching(undefined, undefined, undefined, newPadDoc),
          'text/turtle',
          function (_uri2: string, ok: boolean, message: string) {
            if (ok) {
              agenda.shift()!()
            } else {
              complainIfBad(
github solid / solid-panes / src / pad / padPane.ts View on Github external
if (newPaneOptions.me && !newPaneOptions.me.uri) {
      throw new Error('notepad mintNew:  Invalid userid')
    }

    var newInstance = (newPaneOptions.newInstance =
      newPaneOptions.newInstance ||
      store.sym(newPaneOptions.newBase + 'index.ttl#this'))
    // var newInstance = kb.sym(newBase + 'pad.ttl#thisPad');
    var newPadDoc = newInstance.doc()

    store.add(newInstance, ns.rdf('type'), ns.pad('Notepad'), newPadDoc)
    // @@ TODO Remove casting
    ;(store.add as any)(newInstance, ns.dc('title'), 'Shared Notes', newPadDoc)
    ;(store.add as any)(newInstance, ns.dc('created'), new Date(), newPadDoc)
    if (newPaneOptions.me) {
      store.add(newInstance, ns.dc('author'), newPaneOptions.me, newPadDoc)
    }
    // kb.add(newInstance, ns.pad('next'), newInstance, newPadDoc);
    // linked list empty @@
    var chunk = store.sym(newInstance.uri + '_line0')
    store.add(newInstance, ns.pad('next'), chunk, newPadDoc) // Linked list has one entry
    store.add(chunk, ns.pad('next'), newInstance, newPadDoc)
    store.add(chunk, ns.dc('author'), newPaneOptions.me, newPadDoc)
    // @@ TODO Remove casting
    ;(store.add as any)(chunk, ns.sioc('content'), '', newPadDoc)

    return new Promise(function (resolve, reject) {
      updater.put(
        newPadDoc,
        store.statementsMatching(undefined, undefined, undefined, newPadDoc),
        'text/turtle',
        function (uri2: string, ok: boolean, message: string) {
github solid / solid-panes / src / pad / padPane.source.ts View on Github external
agenda.push(function createNewPadDataFile () {
        store.add(newInstance, ns.rdf('type'), PAD('Notepad'), newPadDoc)

        // TODO @@ Remove casting of add
        ;(store.add as any)(
          newInstance,
          ns.dc('created'),
          new Date(),
          newPadDoc
        )
        if (me) {
          store.add(newInstance, ns.dc('author'), me, newPadDoc)
        }
        store.add(newInstance, PAD('next'), newInstance, newPadDoc) // linked list empty

        // Keep a paper trail   @@ Revisit when we have non-public ones @@ Privacy
        store.add(newInstance, ns.space('inspiration'), thisInstance, padDoc)
        store.add(newInstance, ns.space('inspiration'), thisInstance, newPadDoc)

        updater.put(
          newPadDoc,
          store.statementsMatching(undefined, undefined, undefined, newPadDoc),
          'text/turtle',