org.biomage.Description
Class DatabaseEntry

java.lang.Object
  extended by org.biomage.Common.Extendable
      extended by org.biomage.Description.DatabaseEntry
All Implemented Interfaces:
SecuredElementItf, java.io.Serializable, HasDatabase, HasPropertySets, HasType
Direct Known Subclasses:
MGEDOntologyEntry.OntologyDatabaseEntry

public class DatabaseEntry
extends Extendable
implements java.io.Serializable, HasDatabase, HasType

A reference to a record in a database.

See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from interface org.biomage.Interface.HasPropertySets
HasPropertySets.PropertySets_list
 
Field Summary
protected  Database database
          Reference to the database where the DataEntry instance can be found.
protected  OntologyEntry type
          The type of record (e.g.
 
Fields inherited from class org.biomage.Common.Extendable
editable, id, securedElementId
 
Constructor Summary
DatabaseEntry()
          Default constructor.
DatabaseEntry(org.xml.sax.Attributes atts)
          Attribute constructor.
 
Method Summary
 boolean emptyMAGEobject()
           
 java.lang.String getAccession()
          Get method for accession
 java.lang.String getAccessionVersion()
          Get method for accessionVersion
 Database getDatabase()
          Get method for database
 java.lang.String getModelClassName()
           
 OntologyEntry getType()
          Get method for type
 java.lang.String getURI()
          Get method for URI
 void setAccession(java.lang.String accession)
          Set method for accession
 void setAccessionVersion(java.lang.String accessionVersion)
          Set method for accessionVersion
 void setDatabase(Database database)
          Set method for database
 void setType(OntologyEntry type)
          Set method for type
 void setURI(java.lang.String URI)
          Set method for URI
 void writeAssociations(java.io.Writer out)
          writeAssociations This method is responsible for assembling the association data into XML.
 void writeAttributes(java.io.Writer out)
          writeAttributes This method is responsible for assembling the attribute data into XML.
 void writeMAGEML(java.io.Writer out)
          writeMAGEML This method is responsible for assembling the attribute and association data into XML.
 
Methods inherited from class org.biomage.Common.Extendable
addToPropertySets, addToPropertySets, equals, getFromPropertySets, getId, getIsEditable, getPropertySets, getSecuredElementId, isEditable, removeElementAtFromPropertySets, removeFromPropertySets, setAttributes, setId, setIsEditable, setPropertySets, setSecuredElementId, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

type

protected OntologyEntry type
The type of record (e.g. a protein in SwissProt, or a yeast strain in SGD).


database

protected Database database
Reference to the database where the DataEntry instance can be found.

Constructor Detail

DatabaseEntry

public DatabaseEntry()
Default constructor.


DatabaseEntry

public DatabaseEntry(org.xml.sax.Attributes atts)
Attribute constructor. Looks up the attributes in the parameter and casts them from strings appropriately

Parameters:
atts: - the attribute list.
Method Detail

writeMAGEML

public void writeMAGEML(java.io.Writer out)
                 throws java.io.IOException
writeMAGEML This method is responsible for assembling the attribute and association data into XML. It creates the object tag and then calls the writeAttributes and writeAssociation methods.

Overrides:
writeMAGEML in class Extendable
Throws:
java.io.IOException

emptyMAGEobject

public boolean emptyMAGEobject()

writeAttributes

public void writeAttributes(java.io.Writer out)
                     throws java.io.IOException
writeAttributes This method is responsible for assembling the attribute data into XML. It calls the super method to write out all attributes of this class and it's ancestors.

Overrides:
writeAttributes in class Extendable
Throws:
java.io.IOException

writeAssociations

public void writeAssociations(java.io.Writer out)
                       throws java.io.IOException
writeAssociations This method is responsible for assembling the association data into XML. It calls the super method to write out all associations of this class's ancestors.

Overrides:
writeAssociations in class Extendable
Throws:
java.io.IOException

setAccession

public void setAccession(java.lang.String accession)
Set method for accession

Parameters:
value - to set

getAccession

public java.lang.String getAccession()
Get method for accession

Returns:
value of the attribute

setAccessionVersion

public void setAccessionVersion(java.lang.String accessionVersion)
Set method for accessionVersion

Parameters:
value - to set

getAccessionVersion

public java.lang.String getAccessionVersion()
Get method for accessionVersion

Returns:
value of the attribute

setURI

public void setURI(java.lang.String URI)
Set method for URI

Parameters:
value - to set

getURI

public java.lang.String getURI()
Get method for URI

Returns:
value of the attribute

getModelClassName

public java.lang.String getModelClassName()
Overrides:
getModelClassName in class Extendable

setType

public void setType(OntologyEntry type)
Set method for type

Specified by:
setType in interface HasType
Parameters:
value - to set

getType

public OntologyEntry getType()
Get method for type

Specified by:
getType in interface HasType
Returns:
value of the attribute

setDatabase

public void setDatabase(Database database)
Set method for database

Specified by:
setDatabase in interface HasDatabase
Parameters:
value - to set

getDatabase

public Database getDatabase()
Get method for database

Specified by:
getDatabase in interface HasDatabase
Returns:
value of the attribute