com.aspose.html

Class Url

    • Constructor Summary

      Constructors 
      Constructor and Description
      Url(java.lang.String url)
      Initializes a new instance of the Url with the specified URL.
      Url(java.lang.String url, java.lang.String baseUrl)
      Initializes a new instance of the Url with the specified URL and base URL.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method and Description
      boolean equals(java.lang.Object obj)
      Determines whether the specified Object, is equal to this instance.
      boolean equals(Url url)
      Determines whether the specified Url, is equal to this instance.
      boolean equals(Url url, boolean excludeFragments)
      Determines whether the specified Url, is equal to this instance.
      java.lang.String getHash()
      Gets or sets a string representation for the specified URL hash segment.
      java.lang.String getHost()
      Gets or sets a string representation for the specified URL host.
      java.lang.String getHostname()
      Gets or sets a string representation for the specified URL hostname.
      java.lang.String getHref()
      Gets or sets a serialized representation for the specified URL instance.
      java.lang.String getOrigin()
      Gets a string representation for the specified URL origin.
      java.lang.String getPassword()
      Gets or sets a string representation for the specified URL password.
      java.lang.String getPathname()
      Gets or sets a string representation for the specified URL path.
      java.lang.String getPort()
      Gets or sets a string representation for the specified URL port.
      java.lang.String getProtocol()
      Gets or sets a string representation for the specified URL schema.
      java.lang.String getSearch()
      Gets or sets a string representation for the specified URL search segment.
      IUrlSearchParams getSearchParams()
      Gets an associated IUrlSearchParams object.
      java.lang.String getUsername()
      Gets or sets a string representation for the specified URL username.
      int hashCode()
      Returns a hash code for this instance.
      void setHash(java.lang.String value)
      Gets or sets a string representation for the specified URL hash segment.
      void setHost(java.lang.String value)
      Gets or sets a string representation for the specified URL host.
      void setHostname(java.lang.String value)
      Gets or sets a string representation for the specified URL hostname.
      void setHref(java.lang.String value)
      Gets or sets a serialized representation for the specified URL instance.
      void setPassword(java.lang.String value)
      Gets or sets a string representation for the specified URL password.
      void setPathname(java.lang.String value)
      Gets or sets a string representation for the specified URL path.
      void setPort(java.lang.String value)
      Gets or sets a string representation for the specified URL port.
      void setProtocol(java.lang.String value)
      Gets or sets a string representation for the specified URL schema.
      void setSearch(java.lang.String value)
      Gets or sets a string representation for the specified URL search segment.
      void setUsername(java.lang.String value)
      Gets or sets a string representation for the specified URL username.
      java.lang.String toJson()
      Returns a String that represents this instance.
      java.lang.String toString()
      Returns a String that represents this instance.
      • Methods inherited from class java.lang.Object

        clone, finalize, getClass, notify, notifyAll, wait, wait, wait
    • Field Detail

      • UrlRecord

        public com.aspose.html.url.UrlRecord UrlRecord
    • Constructor Detail

      • Url

        public Url(java.lang.String url)

        Initializes a new instance of the Url with the specified URL.

        Parameters:
        url - The URL to process.
        Throws:
        Error - TypeError: raised if url cannot be parsed as valid URL.
      • Url

        public Url(java.lang.String url,
                   java.lang.String baseUrl)

        Initializes a new instance of the Url with the specified URL and base URL.

        Parameters:
        url - The URL to process.
        baseUrl - The base URL.
        Throws:
        Error - TypeError: raised if url or baseUrl cannot be parsed as valid URL.
    • Method Detail

      • getOrigin

        @DOMNameAttribute(name="origin")
        public java.lang.String getOrigin()

        Gets a string representation for the specified URL origin.

        Value: The origin.
      • getUsername

        @DOMNameAttribute(name="username")
        public java.lang.String getUsername()

        Gets or sets a string representation for the specified URL username.

        Value: The username.
      • setUsername

        @DOMNameAttribute(name="username")
        public void setUsername(java.lang.String value)

        Gets or sets a string representation for the specified URL username.

        Value: The username.
      • getPassword

        @DOMNameAttribute(name="password")
        public java.lang.String getPassword()

        Gets or sets a string representation for the specified URL password.

        Value: The password.
      • setPassword

        @DOMNameAttribute(name="password")
        public void setPassword(java.lang.String value)

        Gets or sets a string representation for the specified URL password.

        Value: The password.
      • getProtocol

        @DOMNameAttribute(name="protocol")
        public java.lang.String getProtocol()

        Gets or sets a string representation for the specified URL schema.

        Value: The protocol.
      • setProtocol

        @DOMNameAttribute(name="protocol")
        public void setProtocol(java.lang.String value)

        Gets or sets a string representation for the specified URL schema.

        Value: The protocol.
      • getHost

        @DOMNameAttribute(name="host")
        public java.lang.String getHost()

        Gets or sets a string representation for the specified URL host.

        Value: The host.
      • setHost

        @DOMNameAttribute(name="host")
        public void setHost(java.lang.String value)

        Gets or sets a string representation for the specified URL host.

        Value: The host.
      • getHostname

        @DOMNameAttribute(name="hostname")
        public java.lang.String getHostname()

        Gets or sets a string representation for the specified URL hostname.

        Value: The name of the host.
      • setHostname

        @DOMNameAttribute(name="hostname")
        public void setHostname(java.lang.String value)

        Gets or sets a string representation for the specified URL hostname.

        Value: The name of the host.
      • getPort

        @DOMNameAttribute(name="port")
        public java.lang.String getPort()

        Gets or sets a string representation for the specified URL port.

        Value: The port.
      • setPort

        @DOMNameAttribute(name="port")
        public void setPort(java.lang.String value)

        Gets or sets a string representation for the specified URL port.

        Value: The port.
      • getPathname

        @DOMNameAttribute(name="pathname")
        public java.lang.String getPathname()

        Gets or sets a string representation for the specified URL path.

        Value: The name of the path.
      • setPathname

        @DOMNameAttribute(name="pathname")
        public void setPathname(java.lang.String value)

        Gets or sets a string representation for the specified URL path.

        Value: The name of the path.
      • getSearch

        @DOMNameAttribute(name="search")
        public java.lang.String getSearch()

        Gets or sets a string representation for the specified URL search segment.

        Value: The search.
      • setSearch

        @DOMNameAttribute(name="search")
        public void setSearch(java.lang.String value)

        Gets or sets a string representation for the specified URL search segment.

        Value: The search.
      • toJson

        @DOMNameAttribute(name="toJSON")
        public java.lang.String toJson()

        Returns a String that represents this instance.

        Returns:
        A String that represents this instance.
      • getHash

        @DOMNameAttribute(name="hash")
        public java.lang.String getHash()

        Gets or sets a string representation for the specified URL hash segment.

        Value: The hash.
      • setHash

        @DOMNameAttribute(name="hash")
        public void setHash(java.lang.String value)

        Gets or sets a string representation for the specified URL hash segment.

        Value: The hash.
      • getHref

        @DOMNameAttribute(name="href")
        public java.lang.String getHref()

        Gets or sets a serialized representation for the specified URL instance.

        Throws:
        Error - TypeError: raised if value cannot be parsed as valid URL. Value: The href.
      • setHref

        @DOMNameAttribute(name="href")
        public void setHref(java.lang.String value)

        Gets or sets a serialized representation for the specified URL instance.

        Throws:
        Error - TypeError: raised if value cannot be parsed as valid URL. Value: The href.
      • toString

        public java.lang.String toString()

        Returns a String that represents this instance.

        Overrides:
        toString in class java.lang.Object
        Returns:
        A String that represents this instance.
      • equals

        public boolean equals(java.lang.Object obj)

        Determines whether the specified Object, is equal to this instance.

        Overrides:
        equals in class java.lang.Object
        Parameters:
        obj - The Object to compare with this instance.
        Returns:
        true if the specified Object is equal to this instance; otherwise, false.
      • equals

        public boolean equals(Url url)

        Determines whether the specified Url, is equal to this instance.

        Parameters:
        url - The Url to compare with this instance.
        Returns:
        true if the specified Url is equal to this instance; otherwise, false.
      • equals

        public boolean equals(Url url,
                              boolean excludeFragments)

        Determines whether the specified Url, is equal to this instance.

        Parameters:
        url - The Url to compare with this instance.
        excludeFragments - Flag which indicates whether or not fragment segment is excluded from comparison. true if excluded, false otherwise. Default value is false.
        Returns:
        true if the specified Url is equal to this instance; otherwise, false.
      • hashCode

        public int hashCode()

        Returns a hash code for this instance.

        Overrides:
        hashCode in class java.lang.Object
        Returns:
        A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table.