code: public static Triple mapSubject(final Triple t, final String resourceUri, final Node destinationNode) {
          final Node tripleSubj = t.getSubject();
          final String tripleSubjUri = tripleSubj.getURI();
          final Node subject;
          if (tripleSubjUri.equals(resourceUri)) {
              subject = destinationNode;
          } else if (tripleSubjUri.startsWith(resourceUri)) {
              // If the subject begins with the originating resource uri, such as a hash uri, then rebase
              // the portions of the subject after the resource uri to the destination uri.
              final String suffix = tripleSubjUri.substring(resourceUri.length());
              subject = createURI(destinationNode.getURI() + suffix);
          } else {
              subject = t.getSubject();
          }
          return new Triple(subject, t.getPredicate(), t.getObject());
      }
docs: Maps the subject of t from resourceUri to destinationNode to produce a new Triple.
  If the triple does not have the subject resourceUri, then the triple is unchanged.
  
  @param t triple to be remapped.
  @param resourceUri resource subject uri to be remapped.
  @param destinationNode subject node for the resultant triple.
  @return triple with subject remapped to destinationNode or the original subject.