code: private ObjectNode getLocalizedObject(Node n)
              throws GraphElementFactoryException {
          if (n instanceof URIReference) {
              return getLocalizedResource(n);
          } else if (n instanceof Literal) {
              Literal l = (Literal) n;
              GraphElementFactory elementFactory = _connector.getElementFactory();
              if (l.getDatatypeURI() != null) {
                  return elementFactory.createLiteral(l.getLexicalForm(),
                                                      l.getDatatypeURI());
              } else if (l.getLanguage() != null) {
                  return elementFactory.createLiteral(l.getLexicalForm(),
                                                      l.getLanguage());
              } else {
                  return elementFactory.createLiteral(l.getLexicalForm());
              }
          } else {
              throw new RuntimeException("Error localizing triple; "
                      + n.getClass().getName() + " is not a URIReference "
                      + "or a Literal");
          }
      }
docs: Gets a localized URIReference or Literal based on the given Node.