|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object O2Plib.db.DbPairSamples.SpfContentHandler
class DbPairSamples.SpfContentHandler
This class implements the SAX ContentHandler interface and defines callback behavior for the SAX callbacks associated with an XML document's content, stuffing data structures with correct data from xml files.
Field Summary | |
---|---|
private java.io.CharArrayWriter |
contents
|
private boolean |
countsFailedFlag
(3.1) when the begining of |
DbLM |
dbLM
Landmark database object |
DbSample |
dbRsample
Rsample instance |
DbSample |
dbSample
Sample instance |
private boolean |
DEBUG_CH
local debug flag |
private boolean |
DEBUG_TOP_LEVEL
local debug flag to printout top level start/end |
private boolean |
globalStatsFlag
(3) when the begining of |
private boolean |
initialPairingStatsFlag
(3.3) when the begining of |
private boolean |
landmarkSetSizeStatsFlag
(3.2) when the begining of the list of |
private org.xml.sax.Locator |
locator
Hold onto the locator for location information - for debugging |
private int |
masterPairSpotCtr
master paired spot counter reset to 0 when start XML reader |
private java.util.Map |
namespaceMappings
Store URI to prefix mappings |
private boolean |
pairingParamsFlag
(1) when the begining of the list of |
private java.lang.String |
previousTag
previous non-group state end-tag 'xxxx' by found. |
private int |
prevLMnbr
previous end-tag found |
private boolean |
rSampleParamsFlag
(1.1) when the begining of the list of |
private boolean |
sampleParamsFlag
(1.2) when the begining of the list of |
private boolean |
secondaryPairingStatsFlag
(3.3) when the begining of SecondarypairingStats> secondary pairing statistics is found. |
int |
shortSPFlmNbr
Landmark number used for restricting SPF data read to Pspots belonging to Landmark shortSPFlmNbr. |
DbPairSamples |
spf
where save the paired data |
private boolean |
spotPairFlag
(2) when begining of the |
private DbPspot |
ss
instance of current Sample DbPspot which is a DbSpot that is extended to encode both spots data in the spot-pair. |
Constructor Summary | |
---|---|
DbPairSamples.SpfContentHandler()
SpfContentHandler() - constructor for XML reader |
Method Summary | |
---|---|
void |
characters(char[] ch,
int start,
int length)
characters() - This reports character data (within an element). |
void |
endDocument()
endDocument() - This indicates the end of a Document parse-this occurs after all callbacks in all SAX Handlers.. |
void |
endElement(java.lang.String namespaceURI,
java.lang.String localName,
java.lang.String qName)
endElement() - Indicates the end of an element ( </[element name]> ) is reached. |
void |
endPrefixMapping(java.lang.String prefix)
endPrefixMapping() - This indicates the end of a prefix mapping, when the namespace reported in a
callback is no longer available. |
java.lang.String |
getLocatorPrevTag()
getLocatorPrevTag() - get locator and previous tag for debugging. |
boolean |
goParse(java.lang.String fileName,
DbPairSamples spf)
goParse() - parse XML file for prologue, spot, and epilogue data. |
void |
ignorableWhitespace(char[] c,
int start,
int len)
ignorableWhitespace() - |
void |
processingInstruction(java.lang.String target,
java.lang.String data)
processingInstruction() - This indicates that a processing instruction (other than the XML declaration) has been encountered. |
void |
setDocumentLocator(org.xml.sax.Locator locator)
setDocumentLocator() -Provide reference to Locator which provides information about where in a document callbacks occur. |
void |
setPairSampleNames(DbPairSamples spf)
setPairSampleNames() - set the paired sample names |
void |
skippedEntity(java.lang.String name)
skippedEntity() - This reports an entity that is skipped by the parser. |
void |
startDocument()
startDocument() - This indicates the start of a Document parse-this precedes all callbacks in all SAX Handlers with the sole exception of . |
void |
startElement(java.lang.String namespaceURI,
java.lang.String localName,
java.lang.String qName,
org.xml.sax.Attributes atts)
startElement() - This reports the occurrence of an actual element. |
void |
startPrefixMapping(java.lang.String prefix,
java.lang.String uri)
startPrefixMapping() - This indicates the beginning of an XML Namespace prefix mapping. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private final boolean DEBUG_CH
private final boolean DEBUG_TOP_LEVEL
private org.xml.sax.Locator locator
private java.util.Map namespaceMappings
private java.io.CharArrayWriter contents
private boolean pairingParamsFlag
private boolean rSampleParamsFlag
private boolean sampleParamsFlag
private boolean spotPairFlag
private boolean globalStatsFlag
private boolean countsFailedFlag
private boolean landmarkSetSizeStatsFlag
private boolean initialPairingStatsFlag
private boolean secondaryPairingStatsFlag
private java.lang.String previousTag
private int prevLMnbr
public DbPairSamples spf
public DbSample dbRsample
public DbSample dbSample
public DbLM dbLM
public int shortSPFlmNbr
private int masterPairSpotCtr
private DbPspot ss
Constructor Detail |
---|
public DbPairSamples.SpfContentHandler()
Method Detail |
---|
public void setPairSampleNames(DbPairSamples spf)
spf
- structure to save the datapublic boolean goParse(java.lang.String fileName, DbPairSamples spf) throws java.lang.Exception
fileName
- to readspf
- structure to save the data
java.lang.Exception
public java.lang.String getLocatorPrevTag()
public void setDocumentLocator(org.xml.sax.Locator locator)
setDocumentLocator
in interface org.xml.sax.ContentHandler
locator
- Locator object tied to callback processpublic void startDocument() throws org.xml.sax.SAXException
setDocumentLocator(org.xml.sax.Locator)
.
startDocument
in interface org.xml.sax.ContentHandler
SAXException
- when things go wrong
org.xml.sax.SAXException
public void endDocument() throws org.xml.sax.SAXException
endDocument
in interface org.xml.sax.ContentHandler
SAXException
- when things go wrong
org.xml.sax.SAXException
public void processingInstruction(java.lang.String target, java.lang.String data) throws org.xml.sax.SAXException
processingInstruction
in interface org.xml.sax.ContentHandler
target
- String
target of PIdata
- String
Throws:
SAXException
- when things go wrong
org.xml.sax.SAXException
public void startPrefixMapping(java.lang.String prefix, java.lang.String uri)
startElement(java.lang.String, java.lang.String, java.lang.String, org.xml.sax.Attributes)
) occurs.
startPrefixMapping
in interface org.xml.sax.ContentHandler
prefix
- String
prefix used for the namespace
being reporteduri
- String
URI for the namespace
being reported
SAXException
- when things go wrongpublic void endPrefixMapping(java.lang.String prefix)
startPrefixMapping(java.lang.String, java.lang.String)
callback is no longer available.
endPrefixMapping
in interface org.xml.sax.ContentHandler
prefix
- String
of namespace being reported
SAXException
- when things go wrongpublic void startElement(java.lang.String namespaceURI, java.lang.String localName, java.lang.String qName, org.xml.sax.Attributes atts) throws org.xml.sax.SAXException
xmlns:[namespace prefix]
and
xsi:schemaLocation
.
startElement
in interface org.xml.sax.ContentHandler
namespaceURI
- String
namespace URI this element
is associated with, or an empty String
localName
- String
name of element (with no
namespace prefix, if one is present)qName
- String
XML 1.0 version of element name:
[namespace prefix]:[localName]atts
- Attributes
list for this element
SAXException
- when things go wrong
org.xml.sax.SAXException
public void endElement(java.lang.String namespaceURI, java.lang.String localName, java.lang.String qName) throws org.xml.sax.SAXException
</[element name]>
) is reached. Note that
the parser does not distinguish between empty elements and
non-empty elements, so this occurs uniformly.
It builds the DbSpot instance and saves it in the current spot list listG which it updates if it passes the -ssfCW filter (if enabled). It also builds the DbSample preface and epilogue structures/
endElement
in interface org.xml.sax.ContentHandler
namespaceURI
- String
URI of namespace this
element is associated withlocalName
- String
name of element without prefixqName
- String
name of element in XML 1.0 form
SAXException
- when things go wrong
org.xml.sax.SAXException
public void characters(char[] ch, int start, int length) throws org.xml.sax.SAXException
characters
in interface org.xml.sax.ContentHandler
ch
- char[]
character array with character datastart
- int
index in array where data starts.length
- int
index in array where data ends.
SAXException
- when things go wrong
org.xml.sax.SAXException
public void ignorableWhitespace(char[] c, int start, int len)
ignorableWhitespace
in interface org.xml.sax.ContentHandler
public void skippedEntity(java.lang.String name) throws org.xml.sax.SAXException
skippedEntity
in interface org.xml.sax.ContentHandler
name
- String
name of entity being skipped
SAXException
- when things go wrong
org.xml.sax.SAXException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |