FileDocCategorySizeDatePackage
TelURL.javaAPI DocphoneME MR2 API (J2ME)6286Wed May 02 18:00:42 BST 2007gov.nist.siplite.address

TelURL

public class TelURL extends URI
Implementation of the TelURL interface.
version
JAIN-SIP-1.1 This code is in the public domain.

Fields Summary
protected TelephoneNumber
telephoneNumber
Currrent telephone portion of URI.
Constructors Summary
public TelURL()
Creates a new instance of TelURLImpl

        this.scheme = "tel";
    
Methods Summary
public java.lang.Objectclone()
Deep copy clone operation.

return
-- a cloned version of this telephone number.

        TelURL retval = new TelURL();
        retval.scheme = this.scheme;
        if (this.telephoneNumber != null) {
            retval.telephoneNumber =
                    (TelephoneNumber)this.telephoneNumber.clone();
        }
        return retval;
    
public java.lang.Stringencode()
Encodes contents in a string.

return
encoded string of object contents

        return this.scheme + ":" + telephoneNumber.encode();
    
public java.lang.StringgetIsdnSubAddress()
Returns the value of the isdnSubAddress parameter, or null if it is not set.

return
the value of the isdnSubAddress parameter

        return telephoneNumber.getIsdnSubaddress();
    
public java.util.VectorgetParameterNames()
Returns an Iterator over the names (Strings) of all parameters present in this ParametersHeader.

return
an Iterator over all the parameter names

        if (null != telephoneNumber) {
            return telephoneNumber.parms.getNames();
        }
        return null;
    
public java.lang.StringgetPhoneNumber()
Get the telephone number.

return
-- the telephone number.

        return this.telephoneNumber.getPhoneNumber();
    
public java.lang.StringgetPlainURI()
Returns the URI part of the address (without parameters) i.e. scheme:user@host:port.

return
URI part of the address

        StringBuffer retval = new StringBuffer();
        retval.append(scheme).append(":");
        if (telephoneNumber.isGlobal()) {
            retval.append("+");
        }
        retval.append(telephoneNumber.getPhoneNumber());
        return retval.toString();
    
public java.lang.StringgetPostDial()
Returns the value of the postDial parameter, or null if it is not set.

return
the value of the postDial parameter

        return telephoneNumber.getPostDial();
    
public booleanisGlobal()
Returns true if this TelURL is global i.e. if the TelURI has a global phone user.

return
true if this TelURL represents a global phone user, and false otherwise.

        return telephoneNumber.isGlobal();
    
public booleanisSipURI()
This method determines if this is a URI with a scheme of "sip" or "sips".

return
true if the scheme is "sip" or "sips", false otherwise.

        return false;
    
public booleanisTelURL()
This method determines if this is a URI with a scheme of "tel"

return
true if the scheme is "tel", false otherwise.

        return true;
    
public voidsetGlobal(boolean global)
Sets phone user of this TelURL to be either global or local. The default value is false, hence the TelURL is defaulted to local.

param
global - the boolean value indicating if the TelURL has a global phone user.

        this.telephoneNumber.setGlobal(true);
    
public voidsetIsdnSubAddress(java.lang.String isdnSubAddress)
Sets ISDN subaddress of this TelURL. If a subaddress is present, it is appended to the phone number after ";isub=".

param
isdnSubAddress - new value of the isdnSubAddress parameter

        this.telephoneNumber.setIsdnSubaddress(isdnSubAddress);
    
public voidsetPhoneNumber(java.lang.String telephoneNumber)
Set the telephone number.

param
telephoneNumber -- long phone number to set.

        this.telephoneNumber.setPhoneNumber(telephoneNumber);
    
public voidsetPostDial(java.lang.String postDial)
Sets post dial of this TelURL. The post-dial sequence describes what and when the local entity should send to the phone line.

param
postDial - new value of the postDial parameter

        this.telephoneNumber.setPostDial(postDial);
    
public voidsetTelephoneNumber(TelephoneNumber telephoneNumber)
Sets the telephone number.

param
telephoneNumber telephone number to set.

        this.telephoneNumber = telephoneNumber;
    
public java.lang.StringtoString()
Return the string encoding.

return
-- the string encoding.

        return this.scheme + ":" + telephoneNumber.encode();