Package gov.nist.core

Examples of gov.nist.core.NameValue


        // attribute "curr" not found
        if (i == preconditionAttributes.size())
        {
            // create attribute for the status-type supplied
            NameValue nv = new NameValue("curr", "qos " + status + " " + directionTag);

            AttributeField newAF = new AttributeField();
            newAF.setAttribute(nv);
            preconditionAttributes.add(newAF);
        }
View Full Code Here


        // attribute "des" not found
        if (i == preconditionAttributes.size())
        {
            // create attribute for the status-type supplied
            // with the values strength-tag and direction-tag
            NameValue nv =
                new NameValue("des", "qos " + strength + " " + status + " " + direction);

            AttributeField newAF = new AttributeField();
            newAF.setAttribute(nv);
            preconditionAttributes.add(newAF);
        }
View Full Code Here

        // attribute "conf" not found
        if (i == preconditionAttributes.size())
        {
            // create attribute for the status-type supplied
            // with the values strength-tag and direction-tag
            NameValue nv =
                new NameValue("conf", "qos " + status + " " + direction);

            AttributeField newAF = new AttributeField();
            newAF.setAttribute(nv);
            preconditionAttributes.add(newAF);
View Full Code Here

     *
     * unexpectedly while parsing the parameter name or value.
     *
     */
    public void setParameter(String name, String value) throws ParseException {
        NameValue nv = parameters.getNameValue(name);
        if (nv != null) {
            nv.setValueAsObject(value);
        } else {
            nv = new NameValue(name, value);
            this.parameters.set(nv);
        }
    }
View Full Code Here

     * unexpectedly while parsing the parameter name or value.
     *
     */
    public void setQuotedParameter(String name, String value)
        throws ParseException {
        NameValue nv = parameters.getNameValue(name);
        if (nv != null) {
            nv.setValueAsObject(value);
            nv.setQuotedValue();
        } else {
            nv = new NameValue(name, value);
            nv.setQuotedValue();
            this.parameters.set(nv);
        }
    }
View Full Code Here

     * unexpectedly while parsing the parameter name or value.
     *
     */
    protected void setParameter(String name, float value) {
        Float val = Float.valueOf(value);
        NameValue nv = parameters.getNameValue(name);
        if (nv != null) {
            nv.setValueAsObject(val);
        } else {
            nv = new NameValue(name, val);
            this.parameters.set(nv);
        }
    }
View Full Code Here

     * @param name of the parameter
     * @param value of the parameter
     */
    public void setMultiParameter(String name, String value)
    {
      NameValue nv = new NameValue();
      nv.setName(name);
      nv.setValue(value);
      duplicates.set(nv);
    }
View Full Code Here

            }
            if (pname.length() == 0 &&
                ( pvalue == null ||
                pvalue.length() == 0))
                return null;
            else return new NameValue(pname, pvalue, isFlagParam);
        } finally {
            if (debug)
                dbg_leave("uriParam");
        }
    }
View Full Code Here

    private NameValueList tel_parameters() throws ParseException {
        NameValueList nvList = new NameValueList();

        // JvB: Need to handle 'phone-context' specially
        // 'isub' (or 'ext') MUST appear first, but we accept any order here
        NameValue nv;
        while ( true ) {
            String pname = paramNameOrValue();

            // Handle 'phone-context' specially, it may start with '+'
            if ( pname.equalsIgnoreCase("phone-context")) {
                nv = phone_context();
            } else {
                if (lexer.lookAhead(0) == '=') {
                    lexer.consume(1);
                    String value = paramNameOrValue();
                    nv = new NameValue( pname, value, false );
                } else {
                    nv = new NameValue( pname, "", true );// flag param
                }
            }
            nvList.set( nv );

            if ( lexer.lookAhead(0) == ';' ) {
View Full Code Here

            Token t = lexer.match( Lexer.ID );// more broad than allowed
            value = t.getTokenValue();
        } else {
            throw new ParseException( "Invalid phone-context:" + la , -1 );
        }
        return new NameValue( "phone-context", value, false );
    }
View Full Code Here

TOP

Related Classes of gov.nist.core.NameValue

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.