protected function buildStr()
    {
        $uri = ($this->scheme != null) ? ($this->scheme . ':') : '';
        if ($this->isOpaque()) {
            $uri .= $this->schemeSpecificPart;
        } else {

            $uri .= $this->buildAuthorityStr();

            if ($this->path !== null) {
                $uri .= $this->path;
            }
            if (!empty($this->query)) {
                $uri .= '?' . $this->query;
            }
        }
        if (!empty($this->fragment)) {
            $uri .= '#' . $this->fragment;
        }
        return $uri;
    }