Class horb.orb.HorbURL
All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class horb.orb.HorbURL

java.lang.Object
   |
   +----horb.orb.HorbURL

public class HorbURL
extends Object
URL (Universal Resource Locator) for HORB. HorbURL is used to represent a HORB object.

Variable Index

 o host
 o objectID
 o port
 o protocol
 o ref

Constructor Index

 o HorbURL()
This constructor creates default URL.
 o HorbURL(HorbURL)
create a new URL from existing URL.
 o HorbURL(HorbURL, String)
create a new URL from existing URL and an objectID.
 o HorbURL(String)
Create an URL for an existing or an unexisting HORB object.
 o HorbURL(String, int, String)
Create an URL for an existing or an unexisting HORB object.
 o HorbURL(String, String)
Create an URL for an existing or an unexisting HORB object.

Method Index

 o equals(HorbURL)
Returns true if two URLs are equal.
 o getHost()
Returns HostName.
 o getObjectID()
Return objectID.
 o getPort()
Returns PortNo.
 o getProtocol()
Returns Protcol.
 o getProtocol(String)
Set Protcol name.
 o getRef()
Return ref.
 o getURL()
Returns string representation of this URL.
 o setHost(String)
Set HostName.
 o setObjectID(String)
Set objectID.
 o setPort(int)
set PortNo.
 o setRef(String)
Set ref.
 o setURL(String)
parse and set URL.

Note that url should include "protocol://" in it, for example "file:///dir/file".

 o toString()
Returns string representation of this URL.

Variables

 o protocol
  protected String protocol
 o host
  protected String host
 o objectID
  protected String objectID
 o ref
  protected String ref
 o port
  protected int port

Constructors

 o HorbURL
  public HorbURL()
This constructor creates default URL. That is "horb://localhost/".
 o HorbURL
  public HorbURL(String host,
                 int port,
                 String objectID)
Create an URL for an existing or an unexisting HORB object.
Parameters:
host - host name of the remote object. If null or "" or "-", localhost is assumed.
port - TCP/IP port number at the remote host.
objectID - objectID of the remote object. This can be null when creates a new remote object. ref can be appended, for example object#ref1.
 o HorbURL
  public HorbURL(String host,
                 String objectID)
Create an URL for an existing or an unexisting HORB object. Default port number is used.
Parameters:
host - host name of the remote object. If null or "" or "-", localhost is assumed.
objectID - objectID of the remote object. This can be null when creates a new remote object. ref can be appended, for example object#ref1.
 o HorbURL
  public HorbURL(String url) throws HORBException
Create an URL for an existing or an unexisting HORB object. Note that url should include "protocol://" in it, for example "file:///dir/file". "file:/dir/file" is not allowed.
  URL syntax:
     ://[[:]] [/] [ [#]]
If is '-' or omitted, localhost is assumed. If is omitted, default port number is assumed. If is omitted, HORB assumes the user wants to create a new instance. getObjectID() returns null.
  Examples:
     horb://www.etl.go.jp:8887/directory
     horb://www.etl.go.jp/directory
     horb://www.etl.go.jp/
     horb://-/directory
	  horb://-/
default values are;

     protocol = "horb"
     host = "localhost"
     port = 0
     objectID = null
     ref = null
Parameters:
url - URL of the object.
 o HorbURL
  public HorbURL(HorbURL url)
create a new URL from existing URL.
Parameters:
url - a HORB url. hostname and portNo are used.
 o HorbURL
  public HorbURL(HorbURL url,
                 String objectID)
create a new URL from existing URL and an objectID.
Parameters:
url - a HORB url. hostname and portNo are used.
objectID - objectID for this URL. ref can be appended, for example object#ref1.

Methods

 o equals
  public boolean equals(HorbURL url)
Returns true if two URLs are equal.
Parameters:
url - a HORB url.
 o getProtocol
  public final String getProtocol()
Returns Protcol.
 o getProtocol
  public final void getProtocol(String protocol)
Set Protcol name.
Parameters:
protocol - protocol name to set.
 o getHost
  public final String getHost()
Returns HostName.
 o setHost
  public final void setHost(String host)
Set HostName.
Parameters:
host - hostname
 o getObjectID
  public final String getObjectID()
Return objectID.
 o setObjectID
  public final void setObjectID(String objectID)
Set objectID.
Parameters:
objectID - objectID to set.
 o getRef
  public final String getRef()
Return ref.
 o setRef
  public final void setRef(String ref)
Set ref.
Parameters:
ref - ref to set.
 o getPort
  public final int getPort()
Returns PortNo.
 o setPort
  public final void setPort(int port)
set PortNo.
 o getURL
  public final String getURL()
Returns string representation of this URL. This is equivalent to toString().
 o toString
  public String toString()
Returns string representation of this URL.
Overrides:
toString in class Object
 o setURL
  public void setURL(String url) throws HORBException
parse and set URL.

Note that url should include "protocol://" in it, for example "file:///dir/file". "file:/dir/file" is not allowed. default values are;

   protocol = "horb"
   host = "localhost"
   port = 0
   objectID = null
	ref = null
Parameters:
url - URL to set.

All Packages  Class Hierarchy  This Package  Previous  Next  Index