ConstructScheme

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 ConstructScheme

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

public class ConstructScheme
extends java.lang.Object

The ConstructScheme class

Author:
  Michael Boyd (mboyd@doc.ic.ac.uk)
, Nerissa Tong (nnyt98@doc.ic.ac.uk)
See Also:
  `Construct`, `Model`

Constructor Summary
`protected` | `ConstructScheme(int cid, int pos, int schemeType, Construct con, boolean key, int HDMType, int lowerBound, int upperBound)` Instantiates a new ConstructScheme object.

Method Summary
`Construct` | `getArgConstruct()` Returns the `Construct` type of the `ConstructScheme`.
`int` | `getHDMType()` Returns the HDM type of the `ConstructScheme`.
`static java.lang.String` | `getHDMTypeString(int HDMType)`
`static java.lang.String` | `getHDMTypeString(int HDMType, boolean brief)`
`int` | `getLower()` Returns the lower bound indicating the minimum occurence of the `ConstructScheme`.
`int` | `getSchemeType()` Returns the scheme type of the `ConstructScheme`.
`static java.lang.String` | `getSchemeTypeString(int schemeType)`
`static java.lang.String` | `getSchemeTypeString(int schemeType, boolean brief)`
`int` | `getUpper()` Returns the upper bound indicating the maximum occurence of the `ConstructScheme`.
`boolean` | `isKey()` Returns whether of not the `ConstructScheme` is part the key of the whole scheme.
`void` | `setArgConstruct(Construct con)` Sets the `Construct` in the `ConstructScheme`.
`void` | `setHDMType(int HDMType)` Sets the HDM type of the `ConstructScheme`.
`void` | `setKey(boolean key)` Sets whether or not the current scheme position is part the key of the whole scheme.
`void` | `setLower(int lowerBound)` Sets the lower bound indicating the minimum occurence of the `ConstructScheme`.
`void` | `setSchemeType(int schemeType)` Sets the scheme type of the `ConstructScheme`.
`void` | `setUpper(int upperBound)` Sets the upper bound indicating the maximum occurence of the `ConstructScheme`.
`void` | `write(java.io.OutputStream os)`
`void` | `write(java.io.PrintWriter pw)`

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

Constructor Detail

### ConstructScheme

    protected ConstructScheme(int cid,
                              int pos,
                              int schemeType,
                              Construct con,
                              boolean key,
                              int HDMType,
                              int lowerBound,
                              int upperBound)

  Instantiates a new ConstructScheme object. Each `Construct` has in its scheme one or more ConstructScheme objects.

Parameters:
  `con` - reference to the construct if the scheme position being created contains a `Construct`. Set to `null` otherwise.
  `key` - set to `true` if the sheme position being created forms the key or part of the key of the position's underlying construct; `false` otherwise.
  `HDMType` - the corresponding HDM type of the construct scheme at the current scheme position.
  `lowerBound` - minimum occurrence of the scheme argument.
  `upperBound` - maximum occurrence of the scheme argument. If upperBound is less than lowerBound then their is no upper bound.
See Also:
  `Construct`

Method Detail

### getSchemeType

    public int getSchemeType()

  Returns the scheme type of the `ConstructScheme`.

  Returns:
    the scheme type of the `ConstructScheme`.

### getArgConstruct

    public Construct getArgConstruct()

  Returns the `Construct` type of the `ConstructScheme`. If the scheme type of the `ConstructScheme is `Scheme.TYPE_NAME`, this field should be set to `null`

  `
  Returns:
    the type of `Construct` of the `ConstructScheme`. Returns `null` if the `ConstructScheme` is of scheme type `Scheme.TYPE_NAME`.

### isKey

    public boolean isKey()

  Returns whether of not the `ConstructScheme` is part the key of the whole scheme.

  Returns:
    `true` if the current scheme position is part the key of the whole scheme; `false` otherwise.

### getHDMType

    public int getHDMType()

  Returns the HDM type of the `ConstructScheme`.

  Returns:
    the HDM type of the `ConstructScheme`.

### getLower

    public int getLower()

  Returns the lower bound indicating the minimum occurence of the `ConstructScheme`.

  Returns:
    the lower bound indicating the minimum occurence of the `ConstructScheme`.

### getUpper

    public int getUpper()

  Returns the upper bound indicating the maximum occurence of the `ConstructScheme`.

  Returns:
    the upper bound indicating the maximum occurence of the `ConstructScheme`.

### setSchemeType

    public void setSchemeType(int schemeType)
                       throws ModelDefinitionsRepositoryException,
                              java.sql.SQLException,
                              DataSourceRepositoryException,
                              java.io.IOException

  Sets the scheme type of the `ConstructScheme`.

  Parameters:
    `schemeType` - the scheme type of the `ConstructScheme`.
  Throws:
    `ModelDefinitionsRepositoryException`
    `java.sql.SQLException`
    `DataSourceRepositoryException`
    `java.io.IOException`

### setArgConstruct

    public void setArgConstruct(Construct con)
                         throws ModelDefinitionsRepositoryException,
                                java.sql.SQLException,
                                DataSourceRepositoryException,
                                java.io.IOException

  Sets the `Construct` in the `ConstructScheme`. If the scheme type of `ConstructScheme` is `Scheme.TYPE_NAME`, this field should be set to `null`.

  Parameters:
    `con` - the `Construct` in the `ConstructScheme`.
  Throws:
    `ModelDefinitionsRepositoryException`
    `java.sql.SQLException`
    `DataSourceRepositoryException`
    `java.io.IOException`

### setKey

    public void setKey(boolean key)
                throws ModelDefinitionsRepositoryException,
                       java.sql.SQLException,
                       DataSourceRepositoryException,
                       java.io.IOException

  Sets whether or not the current scheme position is part the key of the whole scheme.

  Parameters:
    `key` - set to `true` if the current scheme position is part the key of the whole scheme; `false` otherwise.
  Throws:
    `ModelDefinitionsRepositoryException`
    `java.sql.SQLException`
    `DataSourceRepositoryException`
    `java.io.IOException`

### setHDMType

    public void setHDMType(int HDMType)
                    throws ModelDefinitionsRepositoryException,
                           java.sql.SQLException,
                           DataSourceRepositoryException,
                           java.io.IOException

  Sets the HDM type of the `ConstructScheme`.

  Parameters:
    `HDMType` - the HDM type of the `ConstructScheme`.
  Throws:
    `ModelDefinitionsRepositoryException`
    `java.sql.SQLException`
    `DataSourceRepositoryException`
    `java.io.IOException`

### setLower

    public void setLower(int lowerBound)
                  throws ModelDefinitionsRepositoryException,
                         java.sql.SQLException,
                         DataSourceRepositoryException,
                         java.io.IOException

  Sets the lower bound indicating the minimum occurence of the `ConstructScheme`.

  Parameters:
    `lowerBound` - the lower bound indicating the minimum occurence of the `ConstructScheme`.
  Throws:
    `ModelDefinitionsRepositoryException`
    `java.sql.SQLException`
    `DataSourceRepositoryException`
    `java.io.IOException`

### setUpper

    public void setUpper(int upperBound)
                  throws ModelDefinitionsRepositoryException,
                         java.sql.SQLException,
                         DataSourceRepositoryException,
                         java.io.IOException

  Sets the upper bound indicating the maximum occurence of the `ConstructScheme`.

  Parameters:
    `upperBound` - the upper bound indicating the maximum occurence of the `ConstructScheme`.
  Throws:
    `ModelDefinitionsRepositoryException`
    `java.sql.SQLException`
    `DataSourceRepositoryException`
    `java.io.IOException`

### getHDMTypeString

    public static java.lang.String getHDMTypeString(int HDMType)

### getHDMTypeString

    public static java.lang.String getHDMTypeString(int HDMType,
                                                    boolean brief)

### getSchemeTypeString

    public static java.lang.String getSchemeTypeString(int schemeType)

### getSchemeTypeString

    public static java.lang.String getSchemeTypeString(int schemeType,
                                                       boolean brief)

### write

    public void write(java.io.OutputStream os)

### write

    public void write(java.io.PrintWriter pw)

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