code: public HttpPatch createPatchMethod(final String path, final String sparqlUpdate) throws FedoraException {
          if ( isBlank(sparqlUpdate) ) {
              throw new FedoraException("SPARQL Update command must not be blank");
          }
  
          final HttpPatch patch = new HttpPatch(repositoryURL + path);
          patch.setEntity( new ByteArrayEntity(sparqlUpdate.getBytes()) );
          patch.setHeader("Content-Type", contentTypeSPARQLUpdate);
          return patch;
      }
docs: Create a request to update triples with SPARQL Update.
  @param path The datastream path.
  @param sparqlUpdate SPARQL Update command.
  @return created patch based on parameters
  @throws FedoraException