Package gov.nist.core

Examples of gov.nist.core.NameValueList


        this.duplicates = new DuplicateNameValueList();
    }

    protected ParametersHeader(String hdrName, boolean sync) {
        super(hdrName);
        this.parameters = new NameValueList(sync);
        this.duplicates = new DuplicateNameValueList();
    }
View Full Code Here


    /**
     *Remove all parameters.
     */
    public void removeParameters() {
        this.parameters = new NameValueList();
    }
View Full Code Here

        if (debug)
            dbg_enter("global_phone_number");
        try {
            TelephoneNumber tn = new TelephoneNumber();
            tn.setGlobal(true);
            NameValueList nv = null;
            this.lexer.match(PLUS);
            String b = base_phone_number();
            tn.setPhoneNumber(b);
            if (lexer.hasMoreChars()) {
                char tok = lexer.lookAhead(0);
View Full Code Here

    private TelephoneNumber local_phone_number( boolean inBrackets ) throws ParseException {
        if (debug)
            dbg_enter("local_phone_number");
        TelephoneNumber tn = new TelephoneNumber();
        tn.setGlobal(false);
        NameValueList nv = null;
        String b = null;
        try {
            b = local_number();
            tn.setPhoneNumber(b);
            if (lexer.hasMoreChars()) {
View Full Code Here

        }
        return tn;
    }

    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) == ';' ) {
                lexer.consume(1);
            } else {
                return nvList;
View Full Code Here

                logger.logDebug("lastResponseTopMostVia " + lastResponseTopMostVia);
            }
            via.removeParameters();
            if (originalRequest != null
                    && originalRequest.getTopmostVia() != null) {
                NameValueList originalRequestParameters = originalRequest
                        .getTopmostVia().getParameters();
                if (originalRequestParameters != null
                        && originalRequestParameters.size() > 0) {
                    via.setParameters((NameValueList) originalRequestParameters
                            .clone());
                }
            }
            via.setBranch(Utils.getInstance().generateBranchId()); // new branch
            vias.add(via);
View Full Code Here

    if (debug)
      dbg_enter("global_phone_number");
    try {
      TelephoneNumber tn = new TelephoneNumber();
      tn.setGlobal(true);
      NameValueList nv = null;
      this.lexer.match(PLUS);
      String b = base_phone_number();
      tn.setPhoneNumber(b);
      if (lexer.hasMoreChars()) {
        char tok = lexer.lookAhead(0);
View Full Code Here

  private TelephoneNumber local_phone_number() throws ParseException {
    if (debug)
      dbg_enter("local_phone_number");
    TelephoneNumber tn = new TelephoneNumber();
    tn.setGlobal(false);
    NameValueList nv = null;
    String b = null;
    try {
      b = local_number();
      tn.setPhoneNumber(b);
      if (lexer.hasMoreChars()) {
View Full Code Here

    }
    return tn;
  }

  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) == ';' ) {
        lexer.consume(1);
      } else {
        return nvList;
View Full Code Here

            // original request
            Via via = this.lastResponseTopMostVia;
            via.removeParameters();
            if (originalRequest != null
                    && originalRequest.getTopmostVia() != null) {
                NameValueList originalRequestParameters = originalRequest
                        .getTopmostVia().getParameters();
                if (originalRequestParameters != null
                        && originalRequestParameters.size() > 0) {
                    via.setParameters((NameValueList) originalRequestParameters
                            .clone());
                }
            }
            via.setBranch(Utils.getInstance().generateBranchId()); // new branch
            vias.add(via);
View Full Code Here

TOP

Related Classes of gov.nist.core.NameValueList

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.