01: /*
02: * Copyright Aduna (http://www.aduna-software.com/) (c) 1997-2006.
03: *
04: * Licensed under the Aduna BSD-style license.
05: */
06: package org.openrdf.http.webclient.repository.query;
07:
08: import java.util.ArrayList;
09: import java.util.List;
10:
11: import org.openrdf.query.Binding;
12: import org.openrdf.query.BindingSet;
13:
14: /**
15: * @author Herko ter Horst
16: */
17: public class QueryResultFunctions {
18:
19: public static final List<Binding> bindingsInOrder(
20: List<String> bindingNames, BindingSet bindingSet) {
21: List<Binding> result = new ArrayList<Binding>(bindingNames
22: .size());
23:
24: for (String bindingName : bindingNames) {
25: result.add(bindingSet.getBinding(bindingName));
26: }
27:
28: return result;
29: }
30: }
|