BioLegato 0.7.0 Core API

org.biolegato.core.data.sequence
Class Sequence

java.lang.Object
  extended by java.util.Dictionary<K,V>
      extended by java.util.Hashtable<java.lang.String,java.lang.Object>
          extended by org.biolegato.core.data.sequence.Sequence
All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable, java.util.Map<java.lang.String,java.lang.Object>

public class Sequence
extends java.util.Hashtable<java.lang.String,java.lang.Object>
implements java.lang.Cloneable

This class is used to contain all sequence related functions and data.

This class uses hashtables to pass and store parameters of the sequence. The hashtable has many intrinsic parameters; however accepts any number of additional parameters. The current values used by all known BioLegato plugins and classes are:

Key Intrinsic Default setting Description
accession No N/A> The accession of the sequence
comments No N/A> Comments about the sequence
creation-date No N/A> The date the sequence was first synthesized
creator No N/A> The creator of the sequence
direction Yes From 5' to 3' The direction of the sequence (from 3' to 5' or from 5' to 3')
description No N/A> A description of the sequence
GI No N/A> The GI number of the sequence
modified Yes N/A> Used to indicate the sequence was modified
name Yes New sequence The sequence's name
sequence Yes blank The raw sequence
strandedness Yes Single The strandedness of a sequence
topology Yes Linear The sequence topology
type Yes DNA> The type of data the sequence is

Author:
Graham Alvare, Brian Fristensky
See Also:
Serialized Form

Nested Class Summary
static class Sequence.CharacterClass
          Used for typing characters within a sequence.
static class Sequence.Direction
          Used for typing/storing sequence direction.
static class Sequence.Strandedness
          Used for typing/storing sequence strandedness.
static class Sequence.Topology
          Used for typing/storing sequence topology.
static class Sequence.Type
          This enum is used for typing/storing sequence types.
 
Field Summary
static java.awt.datatransfer.DataFlavor sequenceFlavour
          A data flavour representing the raw Sequence data type.
 
Constructor Summary
Sequence()
          Constructs new instances of Sequence objects.
Sequence(java.util.Map<java.lang.String,java.lang.Object> data)
          Constructs new instances of sequence.
Sequence(java.lang.String string)
          Constructs new instances of Sequence objects.
 
Method Summary
 void addListener(SequenceListener listener)
          Adds a sequence listener to keep track of sequence modifications.
 Sequence.CharacterClass charType(char test)
           
 java.lang.Object clone()
          Clones the current sequence object.
protected  void finalize()
           
 java.lang.Object get(java.lang.Object key)
          Obtains a value for a field of the sequence.
static java.lang.Object getDefault(java.lang.String key)
          This function obtains the default value of a field for a Sequence.
static java.util.LinkedList<Sequence> getgroup(java.lang.Integer groupNumber)
           
static void group(Sequence[] sequences)
           
 boolean insertField(java.lang.String field, int column, java.lang.String string)
          Inserts a string into field within the sequence.
 java.lang.Object put(java.lang.String key, java.lang.Object value)
          Changes a value of a field in the sequence.
 void removeListener(SequenceListener listener)
          Removes a sequence listener from keeping track of sequence modifications.
 java.lang.String toString()
          Creates a string representation of the Sequence and its fields
static void ungroup(Sequence[] sequences)
           
 
Methods inherited from class java.util.Hashtable
clear, contains, containsKey, containsValue, elements, entrySet, equals, hashCode, isEmpty, keys, keySet, putAll, rehash, remove, size, values
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

sequenceFlavour

public static final java.awt.datatransfer.DataFlavor sequenceFlavour
A data flavour representing the raw Sequence data type.

Constructor Detail

Sequence

public Sequence()
Constructs new instances of Sequence objects.


Sequence

public Sequence(java.lang.String string)
Constructs new instances of Sequence objects.

Parameters:
string - the string to use for the "sequence" field in the sequence data.

Sequence

public Sequence(java.util.Map<java.lang.String,java.lang.Object> data)
Constructs new instances of sequence.

Parameters:
data - the map of values to use for the sequence.
Method Detail

addListener

public void addListener(SequenceListener listener)
Adds a sequence listener to keep track of sequence modifications.

Parameters:
listener - the sequence listener to add.

removeListener

public void removeListener(SequenceListener listener)
Removes a sequence listener from keeping track of sequence modifications.

Parameters:
listener - the listener to remove.

get

public java.lang.Object get(java.lang.Object key)
Obtains a value for a field of the sequence. This is the same as calling the get function on the Sequence's superclass (hashtable)

Specified by:
get in interface java.util.Map<java.lang.String,java.lang.Object>
Overrides:
get in class java.util.Hashtable<java.lang.String,java.lang.Object>
Parameters:
key - the field name for the sequence data
Returns:
the value of the field

put

public java.lang.Object put(java.lang.String key,
                            java.lang.Object value)
Changes a value of a field in the sequence. This is the same as calling the "put" function on the Sequence's superclass.

Specified by:
put in interface java.util.Map<java.lang.String,java.lang.Object>
Overrides:
put in class java.util.Hashtable<java.lang.String,java.lang.Object>
Parameters:
key - the name of the field in the sequence.
value - the new value of the field.

insertField

public boolean insertField(java.lang.String field,
                           int column,
                           java.lang.String string)
Inserts a string into field within the sequence.

Parameters:
field - the field to alter.
column - the column number to do the insertion at.
string - the text to insert.
Returns:
true if the operation was successful, otherwise false.

getDefault

public static java.lang.Object getDefault(java.lang.String key)
This function obtains the default value of a field for a Sequence. This is done by accessing the defaults hashtable.

Parameters:
key - the name of the field.
Returns:
the value of the field.

toString

public java.lang.String toString()
Creates a string representation of the Sequence and its fields

Overrides:
toString in class java.util.Hashtable<java.lang.String,java.lang.Object>
Returns:
the corresponding sequence

clone

public java.lang.Object clone()
Clones the current sequence object.

Overrides:
clone in class java.util.Hashtable<java.lang.String,java.lang.Object>
Returns:
a cloned copy of the sequence.

charType

public Sequence.CharacterClass charType(char test)

group

public static void group(Sequence[] sequences)

ungroup

public static void ungroup(Sequence[] sequences)

getgroup

public static java.util.LinkedList<Sequence> getgroup(java.lang.Integer groupNumber)

finalize

protected void finalize()
Overrides:
finalize in class java.lang.Object

BioLegato 0.7.0 Core API

Copyright © 2008-2010 University of Manitoba.