jpl.mipl.mdms.FileService.komodo.api
Class Domain

java.lang.Object
  extended byjpl.mipl.mdms.FileService.komodo.api.Domain
Direct Known Subclasses:
SaxDomain

public abstract class Domain
extends Object

Abstract superclass of all Domain parsing classes. Methods are provided for returning file type and server information.

Version:
$Id: Domain.java,v 1.27 2004/09/30 22:03:09 rap Exp $
Author:
R. Pavlovsky {rich.pavlovsky@jpl.nasa.gov}

Constructor Summary
Domain()
          Constructor
 
Method Summary
abstract  String getDefaultGroup()
          Get the default server group specified in domain file.
abstract  FileTypeInfo getFileType(String typeName)
          Deprecated. please use the getFileType(String groupName, String typeName) method
abstract  FileTypeInfo getFileType(String groupName, String typeName)
          Returns the file type infomation object for input file type name parameter.
abstract  LinkedList getFileTypeNames()
          Deprecated. doesn't respect server group namespace, use getFileTypeNames(String groupName) instead
abstract  LinkedList getFileTypeNames(String groupName)
          Get a list of sorted file type names for a specified server group
abstract  LinkedList getGroupNames()
          Get a list of sorted server group names
abstract  jpl.mipl.mdms.FileService.komodo.api.ServerInfo getServerInfo(String serverName)
          Returns the server infomation object for input servername parameter.
abstract  jpl.mipl.mdms.FileService.komodo.api.ServerInfo getServerInfo(String groupName, String serverName)
          Returns the server infomation object for input server name and group name parameters.
abstract  jpl.mipl.mdms.FileService.komodo.api.ServerInfo getServerInfoByIndex(int index)
          Returns the server at the specified index, or null if index is out of bounds.
abstract  LinkedList getServerInfoFromFileType(String groupName, String typeName)
          Method to return a LinkedList of ServerInfo objects for a given file type name and server group
abstract  String toString()
          Utility method to output the Domain data
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Domain

public Domain()
Constructor

Method Detail

toString

public abstract String toString()
Utility method to output the Domain data

Returns:
String contents of domain data

getDefaultGroup

public abstract String getDefaultGroup()
Get the default server group specified in domain file. Returns an empty string if default server group not specified in domain file.

Returns:
default server group name

getGroupNames

public abstract LinkedList getGroupNames()
Get a list of sorted server group names

Returns:
list of server group names

getFileTypeNames

public abstract LinkedList getFileTypeNames()
                                     throws SessionException
Deprecated. doesn't respect server group namespace, use getFileTypeNames(String groupName) instead

Get a list of sorted file type names, does not respect server group namespace.

Returns:
list of file type names
Throws:
SessionException - when lookup fails

getFileTypeNames

public abstract LinkedList getFileTypeNames(String groupName)
                                     throws SessionException
Get a list of sorted file type names for a specified server group

Parameters:
groupName - the server group name
Returns:
list of file type names
Throws:
SessionException - when lookup fails

getServerInfo

public abstract jpl.mipl.mdms.FileService.komodo.api.ServerInfo getServerInfo(String serverName)
                                                                       throws SessionException
Returns the server infomation object for input servername parameter. Returns the first serverName match found (regardless of server groups)! Please note that the same server name can be defined in multiple server groups. Returns the first server defined in domain structure if serverName is null. Throws session exception if a match is not found in domain hash.

Parameters:
serverName - the server name
Returns:
the server info object reference
Throws:
SessionException - when lookup fails

getServerInfo

public abstract jpl.mipl.mdms.FileService.komodo.api.ServerInfo getServerInfo(String groupName,
                                                                              String serverName)
                                                                       throws SessionException
Returns the server infomation object for input server name and group name parameters. If servername is null, returns the first server name match found (regardless of server groups)! Please note that the same server name can be defined in multiple server groups. Returns the first servername match (regardless of server groups) if group name is null. Throws session exception if a match is not found in domain hash.

Parameters:
serverName - the server name
groupName - the server group name
Returns:
the server info object reference
Throws:
SessionException - when lookup fails

getServerInfoByIndex

public abstract jpl.mipl.mdms.FileService.komodo.api.ServerInfo getServerInfoByIndex(int index)
Returns the server at the specified index, or null if index is out of bounds.

Parameters:
index - the index entry to the server list
Returns:
the server info object reference

getServerInfoFromFileType

public abstract LinkedList getServerInfoFromFileType(String groupName,
                                                     String typeName)
                                              throws SessionException
Method to return a LinkedList of ServerInfo objects for a given file type name and server group

Parameters:
groupName - the server group name
typeName - the file type name
Returns:
linked list of server info objects
Throws:
SessionException - when operation fails

getFileType

public abstract FileTypeInfo getFileType(String typeName)
                                  throws SessionException
Deprecated. please use the getFileType(String groupName, String typeName) method

Returns the file type infomation object for input file type name parameter. If type name is null, returns the first type name found (regardless of server groups)! Please note that the same file type name can be defined in multiple server groups. Returns the first type name match (regardless of server groups) if group name is null. Throws session exception if a match is not found in domain hash.

Parameters:
typeName - the file type name
Returns:
the file type info object reference
Throws:
SessionException - if match is not found

getFileType

public abstract FileTypeInfo getFileType(String groupName,
                                         String typeName)
                                  throws SessionException
Returns the file type infomation object for input file type name parameter. If type name is null, returns the first type name found (regardless of server groups)! Please note that the same file type name can be defined in multiple server groups. Returns the first type name match (regardless of server groups) if group name is null. Throws session exception if a match is not found in domain hash.

Parameters:
groupName - the server group name
typeName - the file type name
Returns:
the file type object
Throws:
SessionException - if match is not found