LiteralFactory lf = repository.getLiteralFactory();
String foafName = "http://xmlns.com/foaf/0.1/name";
String exEmpId = "http://example.org/ns#empId";
RepositoryConnection conn = repository.getConnection();
conn.add(uf.createURI("http://example.org/ns#" + id), uf.createURI(foafName), lf.createLiteral(name));
conn.add(uf.createURI("http://example.org/ns#" + id), uf.createURI(exEmpId), lf.createLiteral(empId));
conn.close();
}
private void assertResult(String queryStr, List<String> names)
throws StoreException, MalformedQueryException, EvaluationException