/** * Returns attribute values from the provided {@link AttributeValueSet} or * <code>null</code> if the provided {@link AttributeValueSet} is <code>null</code>. */ public static Map<String, Object> getAttributeValues( AttributeValueSet attributeValueSet) { return attributeValueSet != null ? attributeValueSet.getAttributeValues() : null; }
@Override public String toString() { final StringBuilder b = new StringBuilder(); b.append("AttributeValueSet ["); boolean first = true; for (Map.Entry<String, Object> e : getAttributeValues().entrySet()) { if (!first) b.append(", "); b.append(e.getKey() != null ? e.getKey() : "null"); b.append('='); b.append(e.getValue() != null ? e.getValue().toString() : "null"); first = false; } b.append("]"); return b.toString(); } }
/** * Returns attribute values defined by this {@link AttributeValueSet} and all other * {@link AttributeValueSet}s that this set is based on. The returned map is * independent of this {@link AttributeValueSet}, so any modifications to that map * will not be reflected in this {@link AttributeValueSet}. */ public Map<String, Object> getAttributeValues() { final Map<String, Object> result = Maps.newHashMap(); if (baseAttributeValueSet != null) { result.putAll(baseAttributeValueSet.getAttributeValues()); } result.putAll(overridenAttributeValues); return result; }
private Map<String, Object> getAttributes() { Map<String, Object> result = AttributeValueSet .getAttributeValues(getAttributeSets().getAttributeValueSet(attributeSetId, true)); if (result == null) { result = Maps.newHashMap(); } return result; }
if (defaultAttributeValueSet != null) initAttributes.putAll(defaultAttributeValueSet.getAttributeValues());
AttributeValueSets avs = AttributeValueSets.deserialize(attributeXmls[0].open()); AttributeValueSet defaultSet = avs.getDefaultAttributeValueSet(); initAttributes.putAll(defaultSet.getAttributeValues()); } catch (Exception e) { throw new SolrException(ErrorCode.SERVER_ERROR,