/** * Initialise the field -> variable name mappings including the root variable name by adding * <code>null</code> as key * * @param query * the query * @return the mappings */ private static Map<String,String> initSelectedFieldsMap(SparqlFieldQuery query) { // We need a copy to delete all fields that are already covered by some // added // graph pattern. final Map<String,String> selectedFields = new HashMap<String,String>(); selectedFields.putAll(query.getFieldVariableMappings()); // also add the root variable selectedFields.put(null, query.getRootVariableName()); return selectedFields; }
/** * Initialise the field -> variable name mappings including the root variable name by adding * <code>null</code> as key * * @param query * the query * @return the mappings */ private static Map<String,String> initSelectedFieldsMap(SparqlFieldQuery query) { // We need a copy to delete all fields that are already covered by some // added // graph pattern. final Map<String,String> selectedFields = new HashMap<String,String>(); selectedFields.putAll(query.getFieldVariableMappings()); // also add the root variable selectedFields.put(null, query.getRootVariableName()); return selectedFields; }
List<Representation> representations = limit > 0 ? new ArrayList<Representation>(limit) : new ArrayList<Representation>(); Map<String,URI> bindings = new HashMap<String,URI>(query.getFieldVariableMappings().size()); for(Entry<String,String> mapping : query.getFieldVariableMappings().entrySet()){ bindings.put(mapping.getValue(), sesameFactory.createURI(mapping.getKey()));