Java Code Examples for com.hp.hpl.jena.graph.Triple#ANY

The following examples show how to use com.hp.hpl.jena.graph.Triple#ANY . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: GeneralResourceCollection.java    From GeoTriples with Apache License 2.0 5 votes vote down vote up
public Model getInventoryModel(int limit) {
	log.info("Listing entity set: " + entityMaker);
	Model result = ModelFactory.createDefaultModel();
	result.setNsPrefixes(mapping.getPrefixes());
	GeneralFindQuery query = new GeneralFindQuery(Triple.ANY, inventory, limit, 
			new ExecutionContext(mapping.getContext(), null, null, null));
	Iterator<Triple> it = TripleQueryIter.create(query.iterator());
	while (it.hasNext()) {
		result.getGraph().add(it.next());
	}
	return result;
}
 
Example 2
Source File: ResourceCollection.java    From GeoTriples with Apache License 2.0 5 votes vote down vote up
public Model getInventoryModel(int limit) {
	log.info("Listing entity set: " + entityMaker);
	Model result = ModelFactory.createDefaultModel();
	result.setNsPrefixes(mapping.getPrefixes());
	FindQuery query = new FindQuery(Triple.ANY, inventory, limit, 
			new ExecutionContext(mapping.getContext(), null, null, null));
	Iterator<Triple> it = TripleQueryIter.create(query.iterator());
	while (it.hasNext()) {
		result.getGraph().add(it.next());
	}
	return result;
}