code: public static RDFConnection buildRDFConnection(final String location) {
          if (location != null) {
              if (location.startsWith("http://") || location.startsWith("https://")) {
                  // Remote
                  LOGGER.info("Using remote Triplestore for persistence at {}", location);
                  return connect(location);
              }
              // TDB2
              LOGGER.info("Using local TDB2 database at {}", location);
              return connect(wrap(connectDatasetGraph(location)));
          }
          // in-memory
          LOGGER.info("Using an in-memory dataset for resources");
          return connect(createTxnMem());
      }
docs: Build an RDF connection from a location value.
  
  @implNote A null value will create an in-memory RDF store, a file path will create
  a TDB2 RDF store, and a URL will use a remote triplestore.
  @param location the location of the RDF
  @return a connection to the RDF store