Protocol
Keywords: uk.ac.ic.doc.automed.reps.Protocol,Protocol class

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## uk.ac.ic.doc.automed.reps
Class Protocol

    java.lang.Object
      |
      +--uk.ac.ic.doc.automed.reps.Protocol

public class Protocol
extends java.lang.Object

The Protocol class describes a generic method of accessing data sources, such as JDBC or ODBC. Each extensional AutoMed `Schema` can have one or more `AccessMethod`s, each of which holds the parameters required by the protocol in order to access the data source.

Author:
  Michael Boyd (mboyd@doc.ic.ac.uk), Nerissa Tong (nnyt98@doc.ic.ac.uk), Peter McBrien (pjm@doc.ic.ac.uk)

Method Summary
`static Protocol` | `assertProtocol(java.lang.String name)` Returns the `Protocol` with a certain name, creating it if it does not already exist..
`static Protocol` | `createProtocol(java.lang.String protocolName)` Creates a new protocol.
`static boolean` | `exists(java.lang.String protocolName)` Determine if a given named protocol exists in the repository
`java.lang.String` | `getName()` Returns the name of the protocol.
`protected int` | `getPID()` Returns the protocol identifier (PID).
`static Protocol` | `getProtocol(int pid)` Returns the `Protocol` with the given PID.
`static Protocol` | `getProtocol(java.lang.String protocolName)` Returns the `Protocol` with the given protocolName.
`void` | `remove()`
`static void` | `remove(int pid)` Removes the protocol with the given protocol PID.
`static void` | `remove(java.lang.String protocolName)` Removes the protocol with the given protocolName.
`void` | `setName(java.lang.String protocolName)` Sets the name of the protocol to the given string.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Method Detail

### createProtocol

    public static Protocol createProtocol(java.lang.String protocolName)
                                   throws IntegrityException

  Creates a new protocol.

  Parameters:
    `protocolName` - the name of the protocol.
  Throws:
    `IntegrityException` - if the protocol already exists in the repository

### remove

    public static void remove(java.lang.String protocolName)
                       throws NotFoundException,
                              java.sql.SQLException,
                              DSRException,
                              java.io.IOException

  Removes the protocol with the given protocolName.

  Parameters:
    `protocolName` - the name of the protocol to be removed.
  Throws:
    `NotFoundException`
    `java.sql.SQLException`
    `DSRException`
    `java.io.IOException`

### remove

    public static void remove(int pid)
                       throws NotFoundException,
                              java.sql.SQLException,
                              DSRException,
                              java.io.IOException

  Removes the protocol with the given protocol PID.

  Parameters:
    `pid` - the identifier of the protocol to be removed.
  Throws:
    `NotFoundException`
    `java.sql.SQLException`
    `DSRException`
    `java.io.IOException`

### remove

    public void remove()
                throws NotFoundException,
                       java.sql.SQLException,
                       DSRException,
                       java.io.IOException

    `NotFoundException`
    `java.sql.SQLException`
    `DSRException`
    `java.io.IOException`

### getName

    public java.lang.String getName()

  Returns the name of the protocol.

  Returns:
    the name of the protocol.

### setName

    public void setName(java.lang.String protocolName)
                 throws NotFoundException,
                        java.sql.SQLException,
                        DSRException,
                        java.io.IOException

  Sets the name of the protocol to the given string.

  Parameters:
    `protocolName` - the string that is to be the protocol's name.
  Throws:
    `NotFoundException`
    `java.sql.SQLException`
    `DSRException`
    `java.io.IOException`

### getProtocol

    public static Protocol getProtocol(java.lang.String protocolName)
                                throws NotFoundException

  Returns the `Protocol` with the given protocolName.

  Parameters:
    `protocolName` - the name of the protocol.
  Returns:
    the `Protocol` with the given protocolName.
  Throws:
    `NotFoundException`
    `java.sql.SQLException`
    `DSRException`
    `java.io.IOException`

### assertProtocol

    public static Protocol assertProtocol(java.lang.String name)

  Returns the `Protocol` with a certain name, creating it if it does not already exist..

### exists

    public static boolean exists(java.lang.String protocolName)

  Determine if a given named protocol exists in the repository

  Parameters:
    `protocolName` - String name of protocol

### getProtocol

    public static Protocol getProtocol(int pid)
                                throws NotFoundException,
                                       java.sql.SQLException,
                                       DSRException,
                                       java.io.IOException

  Returns the `Protocol` with the given PID.

  Parameters:
    `pid` - the identifier of the protocol in the STR.
  Returns:
    the `Protocol` with the given pid.
  Throws:
    `NotFoundException`
    `java.sql.SQLException`
    `DSRException`
    `java.io.IOException`

### getPID

    protected int getPID()

  Returns the protocol identifier (PID).

  Returns:
    the protocol identifier (PID).

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD