private void assignNestedValuesPrivate(XAttributable element,
			List<String> keys, Type value) {
		if (keys.isEmpty()) {
			/*
			 * Key list is empty. Assign amount here if attribute. Else skip.
			 */
			if (element instanceof XAttribute) {
				assignValue((XAttribute) element, value);
			}
		} else {
			/*
			 * Key list not empty yet. Step down to the next attribute.
			 */
			String key = keys.get(0);
			List<String> keysTail = keys.subList(1, keys.size());
			XAttribute attr;
			if (element.getAttributes().containsKey(key)) {
				/*
				 * Attribute with given key already exists. Use it.
				 */
				attr = element.getAttributes().get(key);
			} else {
				/*
				 * Attribute with given key does not exist yet.
				 */
				attr = XFactoryRegistry.instance().currentDefault()
						.createAttributeLiteral(key, "", null);
				element.getAttributes().put(key, attr);
				/*
				 * Now it does.
				 */
			}
			/*
			 * Step down.
			 */
			assignNestedValuesPrivate(attr, keysTail, value);
		}
	}
private void assignNestedValuesPrivate ( XAttributable element , List < String > keys , Type value ) { if ( keys . isEmpty ( ) ) { if ( element instanceof XAttribute ) { assignValue ( ( XAttribute ) element , value ) ; } } else { String key = keys . get ( 0 ) ; List < String > keysTail = keys . subList ( 1 , keys . size ( ) ) ; XAttribute attr ; if ( element . getAttributes ( ) . containsKey ( key ) ) { attr = element . getAttributes ( ) . get ( key ) ; } else { attr = XFactoryRegistry . instance ( ) . currentDefault ( ) . createAttributeLiteral ( key , "" , null ) ; element . getAttributes ( ) . put ( key , attr ) ; } assignNestedValuesPrivate ( attr , keysTail , value ) ; } }
/*
Assigns the given value to the attribute that can be found through the
given key list. The first key corresponds to the highest-level attribute,
whereas the latest key corresponds to the lowest-level attribute.