|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object
|
+--org.xml.sax.HandlerBase
|
+--org.concord.biologica.engine.EngineObject
|
+--org.concord.biologica.engine.OrganismChromosomePair
This class represents a pair of organism chromosomes, either a pair of autosomes or a pair of sex chromosomes. This type of object should only exist for organisms of a diploid species.
In general this object is created when the organism is created and never changes from that time on. It's essentially a convenience object.
An instance of this class is contained by one organism.
An object of this class will generate the following property change events:
EngineProp.DELETED,
EngineProp.ID,
EngineProp.LOCKED_STATE,
PropertyChangeListener, Serialized Form| Fields inherited from class org.concord.biologica.engine.EngineObject |
AUTOMATIC_LOCKED, AUTOMATIC_LOCKED_STRING, changes, deleted, FALSE, id, lockedState, MANUAL_AND_AUTOMATIC_LOCKED, MANUAL_AND_AUTOMATIC_LOCKED_STRING, MANUAL_LOCKED, MANUAL_LOCKED_STRING, NULL_ID, TRUE, UNLOCKED, UNLOCKED_STRING, xmlElementContext |
| Constructor Summary | |
OrganismChromosomePair(Organism anOrganism,
OrganismChromosome aFirstOrganismChromosome,
OrganismChromosome aSecondOrganismChromosome)
Create a new organism chromosome pair from the two given organism chromosomes. |
|
OrganismChromosomePair(Organism anOrganism,
java.lang.String anElementName,
int anElementID,
com.sun.xml.parser.Parser anXMLParser,
ImportContext importContext)
Create a new organism chromosome pair and start handling XML parsing events to set the properties of this object. |
|
| Method Summary | |
void |
characters(char[] ch,
int start,
int length)
Receive notification of character data. |
void |
delete()
Delete this object, notifying parent objects and deleting any child objects. |
void |
delete(boolean notifyChange)
|
void |
endElement(java.lang.String anElementName)
Handle notification that the parsing of the given element has ended. |
int |
getChromosomePairNumberType()
Get the chromosome pair number number type. |
OrganismChromosome |
getFirstOrganismChromosome()
Get the first organism chromosome of this pair. |
int |
getNumberOfOrganismAllelePairs()
Get the number of organism allele pairs |
Organism |
getOrganism()
Returns the organism chromosome pair's organism. |
java.util.Enumeration |
getOrganismAllelePairs()
Returns an enumeration over the vector of all organism allele pairs in this organism chromosome pair. |
OrganismChromosome |
getSecondOrganismChromosome()
Get the second organism chromosome of this pair. |
Species |
getSpecies()
Returns the organism chromosome pair's species. |
World |
getWorld()
Get the world containing this object. |
void |
ignorableWhitespace(char[] ch,
int start,
int length)
Receive notification of ignorable white space character data. |
void |
propertyChange(java.beans.PropertyChangeEvent event)
Handle property change events |
void |
startElement(java.lang.String anElementName,
org.xml.sax.AttributeList amap)
Handle notification that the parser has hit the start of a new element with the given name and attributes. |
java.lang.String |
toString()
Return a string representation of this object, usually the object's name. |
void |
writeToStream(java.io.PrintWriter stream)
Writes this object to the given stream in XML format. |
| Methods inherited from class org.concord.biologica.engine.EngineObject |
addPropertyChangeListener, getID, getLockedState, getLockedStateAsString, isAutomaticLocked, isDeleted, isLocked, isManualLocked, notifySelected, release, removePropertyChangeListener, setAutomaticLocked, setID, setLockedState, setLockedStateAsString, setManualLocked |
| Methods inherited from class org.xml.sax.HandlerBase |
endDocument, error, fatalError, notationDecl, processingInstruction, resolveEntity, setDocumentLocator, startDocument, unparsedEntityDecl, warning |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
public OrganismChromosomePair(Organism anOrganism,
OrganismChromosome aFirstOrganismChromosome,
OrganismChromosome aSecondOrganismChromosome)
anOrganism - Organism - containing organism, may not be nullaFirstOrganismChromosome - OrganismChromosome - a first organism chromosomeaSecondOrganismChromosome - OrganismChromosome - a second organism chromosomejava.lang.IllegalArgumentException - - input argument(s) illegal
public OrganismChromosomePair(Organism anOrganism,
java.lang.String anElementName,
int anElementID,
com.sun.xml.parser.Parser anXMLParser,
ImportContext importContext)
anOrganism - Organism - the enclosing organism for this new organism chromosome pairanElementName - String - the element nameanElementID - int - the element idanXMLParser - com.sun.xml.parser.Parser - the element parserimportContext - ImportContext - import context for mapping ids from file to this worldjava.lang.IllegalArgumentException - - input arguments illegal| Method Detail |
public void startElement(java.lang.String anElementName,
org.xml.sax.AttributeList amap)
throws org.xml.sax.SAXException
For internal elements (elements that are non-EngineObject instance variables of this object), call xmlElementContext.startElement() and xmlElementContext will receive the remaining element notifications. For external elements (elements that are EngineObject instance variables of this object), create an object of the appropriate class and that object will receive the remaining element notifications.
startElement in class org.xml.sax.HandlerBaseanElementName - String - name of elementamap - AttributeList - an attribute list
public void characters(char[] ch,
int start,
int length)
throws org.xml.sax.SAXException
characters in class org.xml.sax.HandlerBasech - char[] - charactersstart - int - start of stringlength - int - length of string
public void ignorableWhitespace(char[] ch,
int start,
int length)
throws org.xml.sax.SAXException
ignorableWhitespace in class org.xml.sax.HandlerBasech - char[] - charactersstart - int - start of stringlength - int - length of string
public void endElement(java.lang.String anElementName)
throws org.xml.sax.SAXException
endElement in class org.xml.sax.HandlerBaseanElementName - String - the element namepublic void delete()
When this method is called, a property change event is generated for the property named EngineProp.DELETED.
delete in class EngineObjectpublic void delete(boolean notifyChange)
public int getChromosomePairNumberType()
public java.lang.String toString()
toString in class EngineObjectpublic Organism getOrganism()
public Species getSpecies()
public World getWorld()
getWorld in class EngineObjectpublic OrganismChromosome getFirstOrganismChromosome()
public OrganismChromosome getSecondOrganismChromosome()
public int getNumberOfOrganismAllelePairs()
public java.util.Enumeration getOrganismAllelePairs()
public void propertyChange(java.beans.PropertyChangeEvent event)
propertyChange in interface java.beans.PropertyChangeListenerevent - PropertyChangeEvent - the property change event
public void writeToStream(java.io.PrintWriter stream)
throws java.io.IOException
We could supply a default implementation that knows how to write the id value. But that convenience is not chosen because it's never correct to use just this implementation of these methods, so I'd rather have a compilation fail if a derived class fails to implement this method.
The inverse of this method is a constructor that takes a org.xml.sax.Parser argument and other arguments.
writeToStream in class EngineObjectstream - PrintWriter - print streamjava.lang.IllegalArgumentException - - input arguments illegaljava.io.IOException - - an IO error occurred in java libraries
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||