func (this *SipURIImpl) IsSipURI() bool {
	return true
}
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.
package address
import (
	"bytes"
	"container/list"
	"errors"
	"sip/core"
	"strconv"
	"strings"
)
type SipURIImpl struct {
	URIImpl
	authority *Authority
	uriParms *core.NameValueList
	qheaders *core.NameValueList
	telephoneSubscriber *TelephoneNumber
}
func NewSipURIImpl() *SipURIImpl {
	this := &SipURIImpl{}
	this.scheme = core.SIPTransportNames_SIP
	this.uriParms = core.NewNameValueList("uriparms")
	this.qheaders = core.NewNameValueList("qheaders")
	this.qheaders.SetSeparator("&")
	return this
}
func (this *SipURIImpl) SetScheme(scheme string) error {
	scheme = strings.ToLower(scheme)
	if scheme != core.SIPTransportNames_SIP && scheme != core.SIPTransportNames_SIPS {
		return errors.New("IllegalArgumentException: bad scheme " + scheme)
	}
	this.scheme = scheme
	return nil
}
func (this *SipURIImpl) GetScheme() string {
	return this.scheme
}
func (this *SipURIImpl) ClearUriParms() {
	this.uriParms = core.NewNameValueList("uriparms")
}
func (this *SipURIImpl) ClearPassword() {
	if this.authority != nil {
		userInfo := this.authority.GetUserInfo()
		if userInfo != nil {
			userInfo.ClearPassword()
		}
	}
}
func (this *SipURIImpl) GetAuthority() *Authority {
	return this.authority
}
func (this *SipURIImpl) ClearQheaders() {
	this.qheaders = core.NewNameValueList("qheaders")
}
func (this *SipURIImpl) String() string {
	var retval bytes.Buffer
	retval.WriteString(this.scheme)
	retval.WriteString(core.SIPSeparatorNames_COLON)
	if this.authority != nil {
		retval.WriteString(this.authority.String())
	}
	if this.uriParms.Len() != 0 {
		retval.WriteString(core.SIPSeparatorNames_SEMICOLON)
		retval.WriteString(this.uriParms.String())
	}
	if this.qheaders.Len() != 0 {
		retval.WriteString(core.SIPSeparatorNames_QUESTION)
		retval.WriteString(this.qheaders.String())
	}
	return retval.String()
}
func (this *SipURIImpl) GetUserAtHost() string {
	user := this.authority.GetUserInfo().GetUser()
	host := this.authority.GetHost().String()
	return user + core.SIPSeparatorNames_AT + host
}
func (this *SipURIImpl) GetUserAtHostPort() string {
	var user string
	if this.authority.GetUserInfo() != nil {
		user = this.authority.GetUserInfo().GetUser()
	}
	host := this.authority.GetHost().String()
	port := this.authority.GetPort()
	var s bytes.Buffer
	if user != "" {
		s.WriteString(user)
		s.WriteString(core.SIPSeparatorNames_AT)
	}
	s.WriteString(host)
	if port != -1 {
		s.WriteString(core.SIPSeparatorNames_COLON)
		s.WriteString(strconv.Itoa(port))
	}
	return s.String()
}
func (this *SipURIImpl) GetParm(parmname string) interface{} {
	return this.uriParms.GetValue(parmname)
}
func (this *SipURIImpl) GetMethod() string {
	return this.GetParm(core.SIPTransportNames_METHOD).(string)
}
func (this *SipURIImpl) GetUriParms() *core.NameValueList {
	return this.uriParms
}
func (this *SipURIImpl) RemoveUriParms() {
	this.uriParms = core.NewNameValueList("uriparms")
}
func (this *SipURIImpl) GetQheaders() *core.NameValueList {
	return this.qheaders
}
func (this *SipURIImpl) GetUserType() string {
	return this.uriParms.GetValue(core.SIPTransportNames_USER).(string)
}
func (this *SipURIImpl) GetUserPassword() string {
	if this.authority == nil {
		return ""
	}
	return this.authority.GetPassword()
}
func (this *SipURIImpl) SetUserPassword(password string) {
	if this.authority == nil {
		this.authority = NewAuthority()
	}
	this.authority.SetPassword(password)
}
func (this *SipURIImpl) GetTelephoneSubscriber() *TelephoneNumber {
	if this.telephoneSubscriber == nil {
		this.telephoneSubscriber = NewTelephoneNumber()
	}
	return this.telephoneSubscriber
}
func (this *SipURIImpl) GetHostPort() *core.HostPort {
	if this.authority == nil {
		return nil
	} else {
		return this.authority.GetHostPort()
	}
}
func (this *SipURIImpl) GetPort() int {
	hp := this.GetHostPort()
	if hp == nil {
		return -1
	}
	return hp.GetPort()
}
func (this *SipURIImpl) GetHost() string {
	return this.authority.GetHost().String()
}
func (this *SipURIImpl) IsUserTelephoneSubscriber() bool {
	usrtype := this.uriParms.GetValue(core.SIPTransportNames_USER).(string)
	if usrtype == "" {
		return false
	}
	return usrtype == (core.SIPTransportNames_PHONE)
}
func (this *SipURIImpl) RemoveTTL() {
	if this.uriParms != nil {
		this.uriParms.Delete(core.SIPTransportNames_TTL)
	}
}
func (this *SipURIImpl) RemoveMAddr() {
	if this.uriParms != nil {
		this.uriParms.Delete(core.SIPTransportNames_MADDR)
	}
}
func (this *SipURIImpl) RemoveTransport() {
	if this.uriParms != nil {
		this.uriParms.Delete(core.SIPTransportNames_TRANSPORT)
	}
}
func (this *SipURIImpl) RemoveHeader(name string) {
	if this.qheaders != nil {
		this.qheaders.Delete(name)
	}
}
func (this *SipURIImpl) RemoveHeaders() {
	this.qheaders = core.NewNameValueList("qheaders")
}
func (this *SipURIImpl) RemoveUserType() {
	if this.uriParms != nil {
		this.uriParms.Delete(core.SIPTransportNames_USER)
	}
}
func (this *SipURIImpl) RemovePort() {
	this.authority.RemovePort()
}
func (this *SipURIImpl) RemoveMethod() {
	if this.uriParms != nil {
		this.uriParms.Delete(core.SIPTransportNames_METHOD)
	}
}
func (this *SipURIImpl) SetUser(uname string) {
	if this.authority == nil {
		this.authority = NewAuthority()
	}
	this.authority.SetUser(uname)
}
func (this *SipURIImpl) RemoveUser() {
	this.authority.RemoveUserInfo()
}
func (this *SipURIImpl) SetDefaultParm(name string, value interface{}) {
	if this.uriParms.GetValue(name) == nil {
		nv := core.NewNameValue(name, value)
		this.uriParms.AddNameValue(nv)
	}
}
func (this *SipURIImpl) SetAuthority(authority *Authority) {
	this.authority = authority
}
func (this *SipURIImpl) SetHost(h *core.Host) {
	if this.authority == nil {
		this.authority = NewAuthority()
	}
	this.authority.SetHost(h)
}
func (this *SipURIImpl) SetUriParms(parms *core.NameValueList) {
	this.uriParms = parms
}
func (this *SipURIImpl) SetUriParm(name string, value interface{}) {
	nv := core.NewNameValue(name, value)
	this.uriParms.AddNameValue(nv)
}
func (this *SipURIImpl) SetQheaders(parms *core.NameValueList) {
	this.qheaders = parms
}
func (this *SipURIImpl) SetMAddr(mAddr string) {
	nameValue := this.uriParms.GetNameValue(core.SIPTransportNames_MADDR)
	host := &core.Host{}
	host.SetAddress(mAddr)
	if nameValue != nil {
		nameValue.SetValue(host)
	} else {
		nameValue = core.NewNameValue(core.SIPTransportNames_MADDR, host)
		this.uriParms.AddNameValue(nameValue)
	}
}
func (this *SipURIImpl) SetUserParam(usertype string) {
	this.uriParms.Delete(core.SIPTransportNames_USER)
	this.uriParms.AddNameAndValue(core.SIPTransportNames_USER, usertype)
}
func (this *SipURIImpl) SetMethod(method string) {
	this.uriParms.AddNameAndValue(core.SIPTransportNames_METHOD, method)
}
func (this *SipURIImpl) SetIsdnSubAddress(isdnSubAddress string) {
	if this.telephoneSubscriber == nil {
		this.telephoneSubscriber = NewTelephoneNumber()
	}
	this.telephoneSubscriber.SetIsdnSubaddress(isdnSubAddress)
}
func (this *SipURIImpl) SetTelephoneSubscriber(tel *TelephoneNumber) {
	this.telephoneSubscriber = tel
}
func (this *SipURIImpl) SetPort(p int) {
	if this.authority == nil {
		this.authority = NewAuthority()
	}
	this.authority.SetPort(p)
}
func (this *SipURIImpl) HasParameter(name string) bool {
	return this.uriParms.GetValue(name) != nil
}
func (this *SipURIImpl) SetQHeader(nameValue *core.NameValue) {
	this.qheaders.PushBack(nameValue)
}
func (this *SipURIImpl) SetUriParameter(nameValue *core.NameValue) {
	this.uriParms.PushBack(nameValue)
}
func (this *SipURIImpl) HasTransport() bool {
	return this.HasParameter(core.SIPTransportNames_TRANSPORT)
}
func (this *SipURIImpl) RemoveParameter(name string) {
	this.uriParms.Delete(name)
}
func (this *SipURIImpl) SetHostPort(hostPort *core.HostPort) {
	if this.authority == nil {
		this.authority = NewAuthority()
	}
	this.authority.SetHostPort(hostPort)
}
func (this *SipURIImpl) Clone() interface{} {
	retval := NewSipURIImpl()
	retval.uriString = this.uriString
	retval.scheme = this.scheme
	if this.authority != nil {
		retval.authority = this.authority.Clone().(*Authority)
	}
	if this.uriParms != nil {
		retval.uriParms = this.uriParms.Clone().(*core.NameValueList)
	}
	if this.qheaders != nil {
		retval.qheaders = this.qheaders.Clone().(*core.NameValueList)
	}
	if this.telephoneSubscriber != nil {
		retval.telephoneSubscriber = this.telephoneSubscriber.Clone().(*TelephoneNumber)
	}
	return retval
}
func (this *SipURIImpl) GetHeader(name string) string {
	if this.qheaders.GetValue(name) == nil {
		return ""
	}
	return this.qheaders.GetValue(name).(string)
}
func (this *SipURIImpl) GetHeaderNames() *core.NameValueList {
	return this.qheaders
}
func (this *SipURIImpl) GetLrParam() string {
	if this.HasParameter(core.SIPTransportNames_LR) {
		return "true"
	}
	return ""
}
func (this *SipURIImpl) GetMAddrParam() string {
	maddr := this.uriParms.GetNameValue(core.SIPTransportNames_MADDR)
	if maddr == nil {
		return ""
	}
	return maddr.GetValue().(string)
}
func (this *SipURIImpl) GetMethodParam() string {
	return this.GetParameter(core.SIPTransportNames_METHOD)
}
func (this *SipURIImpl) GetParameter(name string) string {
	val := this.uriParms.GetValue(name)
	if val == nil {
		return ""
	}
	return val.(string)
}
func (this *SipURIImpl) GetParameterNames() *list.List {
	return this.uriParms.GetNames()
}
func (this *SipURIImpl) GetTTLParam() int {
	ttl := this.uriParms.GetValue("ttl")
	if ttl != nil {
		return ttl.(int)
	}
	return -1
}
func (this *SipURIImpl) GetTransportParam() string {
	if this.uriParms != nil {
		return this.uriParms.GetValue(core.SIPTransportNames_TRANSPORT).(string)
	}
	return ""
}
func (this *SipURIImpl) GetUser() string {
	return this.authority.GetUser()
}
func (this *SipURIImpl) IsSecure() bool {
	return strings.ToLower(this.GetScheme()) == (core.SIPTransportNames_SIPS)
}