org.edg.data.reptor.info
Class StorageElementInfo

java.lang.Object
  |
  +--org.edg.data.reptor.info.StorageElementInfo

public class StorageElementInfo
extends java.lang.Object

The StorageElement class represents an EDG SE as stored in the Information Service. This class is constructed by the InfoService interface. It contains information about its local replica catalog, the virtual organizations that may write into it and the storage directories.

Version:
$Id: StorageElementInfo.java,v 1.19 2003/08/14 16:49:23 jamesc Exp $
Author:
Peter Kunszt, Erwin Laure, Heinz Stockinger
See Also:
InfoService

Field Summary
static int DISK
           
static int EDG_SE
           
static int NPROT
           
static int PROT_FILE
           
static int PROT_FTP
           
static int PROT_GRIDFTP
           
static int PROT_HTTP
           
static int PROT_HTTPS
           
static int PROT_RFIO
           
static int SRM1
           
 
Method Summary
 java.lang.String getAccessPoint()
          Get the access point if any
static java.lang.String getAllTypes()
           
 java.lang.String getDN()
          Get the DN of the SE.
 java.lang.String getHost()
          Get the host of the SE.
 java.lang.String getName()
          Get the string identifyer (name) of the SE.
 java.lang.String[] getProtocols()
          Return all protocols known to this Storage Element.
 java.lang.String getProtocolSchema(int prot)
           
 java.net.URL getServiceEndpoint()
           
 int getType()
           
static int getType(java.lang.String type)
           
 java.lang.String getTypeAsString()
           
 java.lang.String getVODirectory(java.lang.String vo)
          Return the VO directory for the given VO
 java.lang.String[] getVOs()
          Retrieve the Virtual Organizations known by this Storage Element.
 boolean hasVO(java.lang.String vo)
          Return true or false depending whether a given VO is recognized by the Storage Element.
static java.lang.String protocolAsString(int i)
           
 void setAccessPoint(java.lang.String accesspoint)
          Set the SE Accesspoint.
 void setDN(java.lang.String dn)
          Set the SE DN (Distinguished Name).
 void setHost(java.lang.String se)
          Set the SE host.
 void setName(java.lang.String name)
          Set the SE Name.
 void setProtocols(java.lang.String[] protocols)
          Set the SE protocols.
 void setServiceEndpoint(java.net.URL serviceEndpoint)
           
 void setType(int type)
           
 void setType(java.lang.String type)
           
 void setVO(java.lang.String vo)
          Set a VO and its storage directory.
 void setVODirectory(java.lang.String vo, java.lang.String voDir)
           
 boolean talksProtocol(int protocol)
          Returns true if the Storage Element understands the given protocol.
 boolean talksProtocol(java.lang.String protocol)
          Returns true if the Storage Element understands the given protocol.
 java.lang.String toString()
          Print contents into a string.
static int translateProtocol(java.lang.String protocol)
           
static java.lang.String typeAsString(int i)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

EDG_SE

public static int EDG_SE

DISK

public static int DISK

SRM1

public static int SRM1

PROT_GRIDFTP

public static int PROT_GRIDFTP

PROT_FILE

public static int PROT_FILE

PROT_RFIO

public static int PROT_RFIO

PROT_HTTP

public static int PROT_HTTP

PROT_HTTPS

public static int PROT_HTTPS

PROT_FTP

public static int PROT_FTP

NPROT

public static int NPROT
Method Detail

getName

public java.lang.String getName()
Get the string identifyer (name) of the SE.

Returns:
the name or null if the StorageElement has not been initialized

getAccessPoint

public java.lang.String getAccessPoint()
Get the access point if any

Returns:
the mount path or null if the StorageElement has not been initialized or there is no mount path

getDN

public java.lang.String getDN()
Get the DN of the SE.

Returns:
the DN (Distinguished Name) of the SE or null if the StorageElement has not been initialized

getHost

public java.lang.String getHost()
Get the host of the SE.

Returns:
the host string or null if the StorageElement has not been initialized (i.e. was not constructed by the Info Services.)

getVOs

public java.lang.String[] getVOs()
Retrieve the Virtual Organizations known by this Storage Element.

Returns:
the array of VOs

hasVO

public boolean hasVO(java.lang.String vo)
Return true or false depending whether a given VO is recognized by the Storage Element.

Parameters:
vo - The string representation of the VO.
Returns:
true or false

getProtocols

public java.lang.String[] getProtocols()
Return all protocols known to this Storage Element.

Returns:
an array with all protocols.

getProtocolSchema

public java.lang.String getProtocolSchema(int prot)

getVODirectory

public java.lang.String getVODirectory(java.lang.String vo)
Return the VO directory for the given VO

Parameters:
vo -
Returns:
the VO directory

setName

public void setName(java.lang.String name)
Set the SE Name.

Parameters:
name - The Name of the SE.

setAccessPoint

public void setAccessPoint(java.lang.String accesspoint)
Set the SE Accesspoint.

Parameters:
accesspoint - The path of the mount point.

setDN

public void setDN(java.lang.String dn)
Set the SE DN (Distinguished Name).

Parameters:
dn - The DN of the SE.

setHost

public void setHost(java.lang.String se)
Set the SE host. This method is used by the Information Services that construct a Storage Element.

Parameters:
se - The host of the SE.

setVO

public void setVO(java.lang.String vo)
Set a VO and its storage directory.

Parameters:
vo - the name of the VO

talksProtocol

public boolean talksProtocol(java.lang.String protocol)
Returns true if the Storage Element understands the given protocol.

Parameters:
protocol - the protocol identifier string
Returns:
true or false

translateProtocol

public static int translateProtocol(java.lang.String protocol)
                             throws UnknownProtocolException
UnknownProtocolException

talksProtocol

public boolean talksProtocol(int protocol)
Returns true if the Storage Element understands the given protocol.

Parameters:
protocol - the protocol identifier string
Returns:
true or false

setProtocols

public void setProtocols(java.lang.String[] protocols)
                  throws UnknownProtocolException
Set the SE protocols. This method is used by the Information Services that construct a Storage Element.

Parameters:
protocols - The protocols for this SE
UnknownProtocolException

setVODirectory

public void setVODirectory(java.lang.String vo,
                           java.lang.String voDir)

toString

public java.lang.String toString()
Print contents into a string.

Overrides:
toString in class java.lang.Object

getServiceEndpoint

public java.net.URL getServiceEndpoint()

setServiceEndpoint

public void setServiceEndpoint(java.net.URL serviceEndpoint)

getType

public int getType()

getTypeAsString

public java.lang.String getTypeAsString()

setType

public void setType(int type)

setType

public void setType(java.lang.String type)

typeAsString

public static java.lang.String typeAsString(int i)

protocolAsString

public static java.lang.String protocolAsString(int i)

getType

public static int getType(java.lang.String type)

getAllTypes

public static java.lang.String getAllTypes()