/**
  * Literal factory
  *
  * @param s the literal value
  * @param typeuri uri representing the type (generally xsd)
  * @return Literal type
  */
 public org.openrdf.model.Literal Literal(String s, URI typeuri) {
   try {
     RepositoryConnection con = therepository.getConnection();
     try {
       ValueFactory vf = con.getValueFactory();
       if (typeuri == null) {
         return vf.createLiteral(s);
       } else {
         return vf.createLiteral(s, typeuri);
       }
     } finally {
       con.close();
     }
   } catch (Exception e) {
     e.printStackTrace();
     return null;
   }
 }