private void processMoreDimensionedVariantsDeref( Element fieldEl, String valueExpr, DerefValue deref, String derefPart) throws IndexerConfException { // The variant dimension is specified in a syntax like "+var1=boo,+var2" boolean validConfig = true; Map<String, String> dimensions = new HashMap<String, String>(); for (String op : COMMA_SPLITTER.split(derefPart)) { if (op.length() > 1 && op.startsWith("+")) { final Iterator<String> keyAndValue = EQUAL_SIGN_SPLITTER.split(op).iterator(); if (keyAndValue.hasNext()) { final String key = keyAndValue.next().substring(1); // ignore leading '+' if (keyAndValue.hasNext()) { // there is an equal sign -> key and value final String value = keyAndValue.next(); dimensions.put(key, value); } else { // no equal sign -> only key without value dimensions.put(key, null); } } else { // nothing at all? validConfig = false; break; } } else { validConfig = false; break; } } if (dimensions.size() == 0) validConfig = false; if (!validConfig) { throw new IndexerConfException( "Invalid specification of variants to follow: '" + derefPart + "', deref expression: '" + valueExpr + "' " + "at " + LocationAttributes.getLocation(fieldEl)); } deref.addForwardVariantFollow(dimensions); }