Package com.volantis.shared.metadata.value.mutable

Examples of com.volantis.shared.metadata.value.mutable.MutableSetValue


        super(memberType, valueString);
    }

    // Javadoc inherited
    public ImmutableMetaDataValue createMetaDataValue() {
        MutableSetValue setValue = VALUE_FACTORY.createSetValue();
        Set contents = setValue.getContentsAsMutableSet();

        for (Iterator i = values.iterator(); i.hasNext();) {
            InternalPolicyValue policyValue = (InternalPolicyValue) i.next();
            contents.add(policyValue.createMetaDataValue());
        }

        return (ImmutableMetaDataValue) setValue.createImmutable();
    }
View Full Code Here


        // create the
        // key3/set[0]/keyX/b-string
        //            /keyY/c-string
        //     /set[1]/true
        //     /set[2]/x-string
        MutableSetValue metaSet = META_DATA_VALUE_FACTORY.createSetValue();
        Set set = metaSet.getContentsAsMutableSet();

        MutableStructureValue setsStruct =
                META_DATA_VALUE_FACTORY.createStructureValue();

        Map setsStructMap = setsStruct.getFieldValuesAsMutableMap();
        MutableStringValue bString = mdvFactory.createStringValue();
        bString.setValue("b-string");
        setsStructMap.put("keyX", bString);

        MutableStringValue cString = mdvFactory.createStringValue();
        cString.setValue("c-string");
        setsStructMap.put("keyY", cString);

        set.add(setsStruct.createImmutable());


        MutableBooleanValue tBool =
                META_DATA_VALUE_FACTORY.createBooleanValue();
        tBool.setValue(Boolean.TRUE);
        set.add(tBool);

        MutableStringValue xString = mdvFactory.createStringValue();
        xString.setValue("x-string");
        set.add(xString);

        topMap.put("key3", metaSet.createImmutable());
        // create the
        //
        // key4/z-string
        //
        // part
View Full Code Here

     * @throws Exception if an error occurs
     */
    public void testWhenCharacteristicIsSet() throws Exception {
        // add a policy/policy value pair to the request
        String charateristic = "set";
        MutableSetValue value = META_DATA_VALUE_FACTORY.createSetValue();
        Set set = value.getContentsAsMutableSet();
        MutableStringValue strVal = META_DATA_VALUE_FACTORY.createStringValue();
        strVal.setValue("str");
        set.add(strVal.createImmutable());
        ImmutableMetaDataValue setVal = (ImmutableMetaDataValue)
                                              value.createImmutable();

        serviceDefMock.expects.getCharacteristic(charateristic).returns(setVal);

        // invoke the function
        Expression expression = parser.parse(getFunctionQName() +
View Full Code Here

TOP

Related Classes of com.volantis.shared.metadata.value.mutable.MutableSetValue

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.