Version 2

    Collection manipulation API


    Proposal to add set of global operations for ease working with map & list attribute types. Operations mimic java collections. All indexes are 0 based!


    put entry to map

    :map-put(name=name-of-attribute, key=some-key, value="newvalue") 

    Remove entry from map:

    :map-remove(name=name-of-attribute, key=some-key) 

    Get entry from map:

    :map-get(name=name-of-attribute, key=some-key) 

    Empty map, note that is not the same as :undefine(name=name-of-attribute)



    Add element to list, with optional index where to put it

    :list-add(name=list-attribute, value="some value", [index=5]) 

    remove element from list, where you can provide value to remove or from which index to remove it.

    :list-remove(name=list-attribute, [value="element-to-remove"], [index=3]) 

    Get entry from list:

    :list-get(name=name-of-attribute, index=5) 

    Empty list:


    Expand standard read/write operations

    :write-attribute enhancements for complex attributes

    Map write enhancements

    :write-attribute(name=map-attribute.myKey value="newValue") 

    List write enhancements

    :write-attribute(name=list-attribute[1] value="new-element-value") 
    :write-attribute(name=list-attribute.element-value value="new-element-value")

    Map read enhancements

    # return value of map-attribute with key "myKey" 

    List read enhancements

    # return element under index 5 of list-attribute

    Generic complex attributes enhancements

    # return property.subproperty from complex attribute
    # return subproperty of 5th property from complex attribute
    # set subproperty of 5th property of complex attribute
    :write-attribute(name=complex-attribute[5].subproperty, value="new-value")
    # set property.subproperty.subsubproperty of attribute "complext-attribute to "new-value"
    :write-attribute(, value="new-value")
    # return value of complex attribute with key "myKey"
    # return "property" of complex-attribute element on index 5
    # return object of complex-attribute element on index 5