@Test public void repoLoader_givenQuery_shouldLoadStamentsCorrespondingToQuery() { String sparqlQuery = "" + "CONSTRUCT {" + " ?s <http: + " ?s <http: + "} " + "FROM NAMED <http: + "WHERE { " + " GRAPH ?g { " + " ?s <http: + " ?s <http: + " } " + "}"; Set<Person> people = RdfObjectLoader.load(selectAllResources, Person.class, repo, sparqlQuery); assertThat("1 person resource should be created", people, hasSize(1)); Person person = Iterables.getOnlyElement(people); assertThat("", person.getName(), is("Manu Sporny")); assertThat("", person.getGender(), is("male")); assertThat("", person.getJobTitle(), nullValue()); assertThat("", person.getTelephone(), nullValue()); assertThat("", person.getEmail(), nullValue()); assertThat("", person.getColleagues(), empty()); }
public static <T> Set<T> load( Function<Model, Set<Resource>> resourceSelector, Class<T> clazz, Model model ) { return load(resourceSelector, clazz, model, m -> m, c -> {}, m -> {}); }
RdfObjectLoader { public static <T> Set<T> load( Function<Model, Set<Resource>> resourceSelector, Class<T> clazz, Model model ) { return load(resourceSelector, clazz, model, m -> m, c -> {}, m -> {}); } }
RdfObjectLoader { public static <T> Set<T> load( Function<Model, Set<Resource>> resourceSelector, Class<T> clazz, Model model ) { return load(resourceSelector, clazz, model, m -> m, c -> {}, m -> {}); } private  RdfObjectLoader(); }
RdfObjectLoader { public static <T> Set<T> load( Function<Model, Set<Resource>> resourceSelector, Class<T> clazz, Model model ) { return load(resourceSelector, clazz, model, m -> m, c -> {}, m -> {}); } private  RdfObjectLoader(); static Set<T> load(
			Function<Model, Set<Resource>> resourceSelector, 
			Class<T> clazz,
			Model model
		); static Set<T> load(
		Function<Model, Set<Resource>> resourceSelector, 
		Class<T> clazz,
		Model model,
		UnaryOperator<Model> modelAdapter
	); static Set<T> load(
		Function<Model, Set<Resource>> resourceSelector, 
		Class<T> clazz,
		Model model,
		UnaryOperator<Model> modelAdapter,
		Consumer<MappingCache> populateCache,
		Consumer<Mapper> configureMapper
	); static Set<T> load(
			Function<Model, Set<Resource>> resourceSelector,
			Class<T> clazz,
			Model model,
			UnaryOperator<Model> modelAdapter,
			Consumer<MappingCache> populateCache,
			Consumer<Mapper> configureMapper,
			Set<Namespace> namespaces
	); static Set<T> load(
			Function<Model, Set<Resource>> resourceSelector, 
			Class<T> clazz,	
			Repository repository, 
			String sparqlQuery
		); static Set<T> load(
			Function<Model, Set<Resource>> resourceSelector, 
			Class<T> clazz,	
			Repository repository, 
			String sparqlQuery,
			UnaryOperator<Model> modelAdapter
		); static Set<T> load(
			Function<Model, Set<Resource>> resourceSelector, 
			Class<T> clazz,
			Repository repository, 
			Resource... contexts
		); static Set<T> load(
			Function<Model, Set<Resource>> resourceSelector, 
			Class<T> clazz,
			Repository repository,
			UnaryOperator<Model> modelAdapter, 
			Resource... contexts
		); }
RdfObjectLoader { public static <T> Set<T> load( Function<Model, Set<Resource>> resourceSelector, Class<T> clazz, Model model ) { return load(resourceSelector, clazz, model, m -> m, c -> {}, m -> {}); } private  RdfObjectLoader(); static Set<T> load(
			Function<Model, Set<Resource>> resourceSelector, 
			Class<T> clazz,
			Model model
		); static Set<T> load(
		Function<Model, Set<Resource>> resourceSelector, 
		Class<T> clazz,
		Model model,
		UnaryOperator<Model> modelAdapter
	); static Set<T> load(
		Function<Model, Set<Resource>> resourceSelector, 
		Class<T> clazz,
		Model model,
		UnaryOperator<Model> modelAdapter,
		Consumer<MappingCache> populateCache,
		Consumer<Mapper> configureMapper
	); static Set<T> load(
			Function<Model, Set<Resource>> resourceSelector,
			Class<T> clazz,
			Model model,
			UnaryOperator<Model> modelAdapter,
			Consumer<MappingCache> populateCache,
			Consumer<Mapper> configureMapper,
			Set<Namespace> namespaces
	); static Set<T> load(
			Function<Model, Set<Resource>> resourceSelector, 
			Class<T> clazz,	
			Repository repository, 
			String sparqlQuery
		); static Set<T> load(
			Function<Model, Set<Resource>> resourceSelector, 
			Class<T> clazz,	
			Repository repository, 
			String sparqlQuery,
			UnaryOperator<Model> modelAdapter
		); static Set<T> load(
			Function<Model, Set<Resource>> resourceSelector, 
			Class<T> clazz,
			Repository repository, 
			Resource... contexts
		); static Set<T> load(
			Function<Model, Set<Resource>> resourceSelector, 
			Class<T> clazz,
			Repository repository,
			UnaryOperator<Model> modelAdapter, 
			Resource... contexts
		);  }