eu.etaxonomy.cdm.model.common
Class LSIDAuthority

java.lang.Object
  extended by eu.etaxonomy.cdm.model.common.CdmBase
      extended by eu.etaxonomy.cdm.model.common.LSIDAuthority
All Implemented Interfaces:
ICdmBase, Serializable, Cloneable

public class LSIDAuthority
extends CdmBase

See Also:
Serialized Form

Field Summary
static String AUTHORITY_ID_PREFIX
           
 
Fields inherited from class eu.etaxonomy.cdm.model.common.CdmBase
uuid
 
Constructor Summary
LSIDAuthority(LSID lsid)
          Convenience constructor, construct an LSID authority object
LSIDAuthority(String authstr)
          Construct an LSID authority object.
 
Method Summary
 void addNamespace(String namespace, Class<? extends IIdentifiableEntity> identifiableClass)
           
 boolean equals(Object o)
          Tests equality on the authority string
 String getAuthority()
          Returns the authority String
 String getAuthorityEnpointURL(String server, int port)
          get the url of an authority with the given server and port
 String getAuthorityID()
          Returns the authority ID representation of this authority, lsidauth:authstr
 Map<String,Class<? extends IIdentifiableEntity>> getNamespaces()
           
 int getPort()
          Returns the port of the resolved Authority, invalid until resolved.
 String getServer()
          Returns the server of the resolved Authority, invalid until resolved.
 String getUrl()
          Returns the url of the resolved Authority, invalid until resolved.
 javax.wsdl.Definition getWSDL()
          get the wsdl describing the ports available
 boolean isResolved()
           
 void removeNamespace(String namespace)
           
 void setPort(int port)
          Sets the port.
 void setServer(String server)
          Sets the server.
 void setUrl(String url)
          Sets the URL to use.
 void setWSDL(javax.wsdl.Definition wsdl)
          Set the wsdl describing the ports available
 String toString()
          Returns the authority String
 
Methods inherited from class eu.etaxonomy.cdm.model.common.CdmBase
addPropertyChangeListener, addPropertyChangeListener, clone, clone, deproxy, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getCreated, getCreatedBy, getId, getUuid, hashCode, hasListeners, invokeSetMethod, invokeSetMethodWithNull, isInstanceOf, removePropertyChangeListener, removePropertyChangeListener, setCreated, setCreatedBy, setId, setUuid
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

AUTHORITY_ID_PREFIX

public static final String AUTHORITY_ID_PREFIX
See Also:
Constant Field Values
Constructor Detail

LSIDAuthority

public LSIDAuthority(String authstr)
              throws com.ibm.lsid.MalformedLSIDException
Construct an LSID authority object.

Parameters:
String - LSID Authority must be valid authority string, or an ID of the form: lsidauth:"
Throws:
com.ibm.lsid.MalformedLSIDException

LSIDAuthority

public LSIDAuthority(LSID lsid)
              throws com.ibm.lsid.MalformedLSIDException
Convenience constructor, construct an LSID authority object

Parameters:
LSID - use this LSID's authority to construct this object
Throws:
com.ibm.lsid.MalformedLSIDException
Method Detail

getAuthority

public String getAuthority()
Returns the authority String

Returns:
String the authority String

getAuthorityID

public String getAuthorityID()
Returns the authority ID representation of this authority, lsidauth:authstr

Returns:
String the ID representation

toString

public String toString()
Returns the authority String

Overrides:
toString in class CdmBase
Returns:
String the authority String
See Also:
Object.toString()

equals

public boolean equals(Object o)
Tests equality on the authority string

Overrides:
equals in class CdmBase
Returns:
See Also:
See {@link http://www.hibernate.org/109.html hibernate109}, {@link http://www.geocities.com/technofundo/tech/java/equalhash.html geocities} or {@link http://www.ibm.com/developerworks/java/library/j-jtp05273.html ibm} for more information about equals and hashcode.

getPort

public int getPort()
Returns the port of the resolved Authority, invalid until resolved.

Returns:
int the port.

getServer

public String getServer()
Returns the server of the resolved Authority, invalid until resolved.

Returns:
String the hostname of the server

getUrl

public String getUrl()
Returns the url of the resolved Authority, invalid until resolved. This overrides the server and port properties, and might contain a full path or even a different protocol.

Returns:
String

setPort

public void setPort(int port)
Sets the port.

Parameters:
port - The port to set

setServer

public void setServer(String server)
Sets the server.

Parameters:
server - The server to set

setUrl

public void setUrl(String url)
Sets the URL to use. This overrides the server and port properties, and might contain a full path or even a different protocol.

Parameters:
server - The server to set

setWSDL

public void setWSDL(javax.wsdl.Definition wsdl)
Set the wsdl describing the ports available

Parameters:
LSIDWSDLWrapper - the wsdl to set

getWSDL

public javax.wsdl.Definition getWSDL()
get the wsdl describing the ports available

Returns:
LSIDWSDLWRapper the wsdl

isResolved

public boolean isResolved()
Returns:
boolean, whether or not the authority has been resolved.

getAuthorityEnpointURL

public String getAuthorityEnpointURL(String server,
                                     int port)
get the url of an authority with the given server and port


getNamespaces

public Map<String,Class<? extends IIdentifiableEntity>> getNamespaces()

addNamespace

public void addNamespace(String namespace,
                         Class<? extends IIdentifiableEntity> identifiableClass)

removeNamespace

public void removeNamespace(String namespace)


Copyright © 2007-2012 EDIT. All Rights Reserved.