com.orientechnologies.jdo
Class oOrientURL

java.lang.Object
  extended bycom.orientechnologies.jdo.oOrientURL
All Implemented Interfaces:
java.io.Serializable

public class oOrientURL
extends java.lang.Object
implements java.io.Serializable

Define an Orient URL. Orient URL is composed by following properties:

Examples:

See Also:
Serialized Form

Field Summary
static java.lang.String DEFAULT_PORT
           
 
Constructor Summary
oOrientURL(java.lang.String iURL)
          Build a new instance starting from the String representation
 
Method Summary
 java.lang.String getDatabase()
          Return database name
 java.lang.String getHost()
          Return the host name or ip address
 java.lang.String getPort()
          Return the port number, default is 8000
 java.lang.String getProtocol()
          Return the protocol
static oOrientURL newEnterpriseUrl(java.lang.String iHost, java.lang.String iDatabaseName)
          Create a new oOrientURL object for Enterprise Edition datastore.
static oOrientURL newJustUrl(java.lang.String iDatabaseName)
          Create a new oOrientURL object for Just Edition datastore.
 java.lang.String toString()
          Convert the URL to String
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

DEFAULT_PORT

public static final java.lang.String DEFAULT_PORT
See Also:
Constant Field Values
Constructor Detail

oOrientURL

public oOrientURL(java.lang.String iURL)
           throws java.net.MalformedURLException
Build a new instance starting from the String representation

Method Detail

getProtocol

public java.lang.String getProtocol()
Return the protocol

Returns:
Protocol name

getHost

public java.lang.String getHost()
Return the host name or ip address

Returns:
Host name or ip address

getPort

public java.lang.String getPort()
Return the port number, default is 8000

Returns:
Port number

toString

public java.lang.String toString()
Convert the URL to String

Returns:
String with representation of Orient URL

getDatabase

public java.lang.String getDatabase()
Return database name

Returns:
Database name

newJustUrl

public static oOrientURL newJustUrl(java.lang.String iDatabaseName)
                             throws java.net.MalformedURLException
Create a new oOrientURL object for Just Edition datastore.

Parameters:
iDatabaseName - Name of database to insert in the URL
Returns:
oOrientURL object that point to the datastore using Just Edition
Throws:
java.net.MalformedURLException

newEnterpriseUrl

public static oOrientURL newEnterpriseUrl(java.lang.String iHost,
                                          java.lang.String iDatabaseName)
                                   throws java.net.MalformedURLException
Create a new oOrientURL object for Enterprise Edition datastore.

Parameters:
iHost - Remote host to connect. Can be also localhost.
iDatabaseName - Name of database to insert in the URL
Returns:
oOrientURL object that point to the datastore using Enterprise Edition
Throws:
java.net.MalformedURLException