Discovery

Executing query

methods

patterns getting results

    SWDiscovery(config)
        .something("some")
        ...
        .select( "some" )
           .commit()
           .raw()
             .then((response) => {
                  for (let i=0;i<response.results.bindings.length;i++) {
                    ....
                  }
               }); // end promise select
    SWDiscovery(config)
        .something("some")
        ...
        .selectByPage( "some" )
          .then( (args) => {
             let numberOfPages = Object.values(args)[0] ;
             let lazyPages = Object.values(args)[1] ;
            
             if ( numberOfPages>=1 )
                 lazyPages[0]
                   .commit()
                   .raw()
                     .then((response) => {
                          for (let i=0;i<response.results.bindings.length;i++) {
                            ....
                          }
                       }); // end promise lazy page 1
         }); // end promise selectByPage

unit block results

.select( "some" )
           .commit()
           .raw()
             .then((response) => {
                  for (let i=0;i<response.results.bindings.length;i++) {
                        console.log(response.results.bindings[i]["some"].value) ;
                  }
               }); // end promise select

datatype results

.datatype("datatypeSome")
.select( "some" )
           .commit()
           .raw()
             .then((response) => {
                  for (let i=0;i<response.results.bindings.length;i++) {
                        let uri = response.results.bindings[i]["some"].value ;
                        /* none or several results could be retrieve */
                        for (let i=0;i<esponse.results.datatypes["datatypeSome"][uri].length;i++) {
                            console.log(response.results.datatypes["datatypeSome"][uri][0].value);
                        }
                  }
               }); // end promise select

transport results