code: public static String serializeQuad(final Quad quad) {
          return quad.getSubject() + SEP + quad.getPredicate() + SEP + quad.getObject() + SEP
              + quad.getGraphName().map(g -> g + " .").orElse(".");
      }
docs: Serialize an RDF Quad.
  @param quad the quad
  @return a serialization of the quad