public class MapHandler extends DefaultHandler implements com.affymetrix.genoviz.parser.ContentParser
Modifier and Type | Field and Description |
---|---|
protected com.affymetrix.genoviz.widget.NeoMap |
map |
protected XMLReader |
xmlParser |
Constructor and Description |
---|
MapHandler() |
Modifier and Type | Method and Description |
---|---|
void |
addMap(String theName,
com.affymetrix.genoviz.widget.NeoMap theMap)
Adds an alias for the "map" tag.
|
void |
characters(char[] ch,
int start,
int length) |
void |
defineGlyphStyle(com.affymetrix.genoviz.widget.NeoMap theMap,
String name,
String config,
Integer labelPlacement)
defines a glyph style.
|
void |
endDocument()
Handle the end of the document.
|
void |
endElement(String uri,
String localName,
String name)
Handle the end of an element.
|
void |
exportContent(OutputStream theOutput,
Object o)
exportContent needed to implement ContentParser Here the signature is
empty because we are only interested in providing the importContent
functionality associated with ContentParser.
|
String |
getHRef(com.affymetrix.genoviz.bioviews.GlyphI theGlyph) |
String |
getTarget(com.affymetrix.genoviz.bioviews.GlyphI theGlyph) |
void |
ignorableWhitespace(char[] ch,
int start,
int length)
Handle ignorable whitespace.
|
Object |
importContent(InputStream theInput)
converts an
InputStream to a Reader and then
parses. |
Object |
importContent(Reader theInput)
importContent parses an xml formated stream and creates and returns a
NeoMap object that contains the objects specified by the stream.
|
void |
processingInstruction(String target,
String data)
Handle a processing instruction.
|
void |
setWidget(com.affymetrix.genoviz.widget.NeoAbstractWidget theWidget)
sets the widget (in our case a NeoMap).
|
void |
startDocument()
Handle the start of the document.
|
void |
startElement(String uri,
String localName,
String name,
Attributes attributes)
Handle the start of an element.
|
endPrefixMapping, error, fatalError, notationDecl, resolveEntity, setDocumentLocator, skippedEntity, startPrefixMapping, unparsedEntityDecl, warning
protected com.affymetrix.genoviz.widget.NeoMap map
protected XMLReader xmlParser
public Object importContent(Reader theInput) throws IOException
IOException
public Object importContent(InputStream theInput) throws IOException
InputStream
to a Reader
and then
parses.importContent
in interface com.affymetrix.genoviz.parser.ContentParser
IOException
public void exportContent(OutputStream theOutput, Object o) throws IOException
exportContent
in interface com.affymetrix.genoviz.parser.ContentParser
IOException
public void setWidget(com.affymetrix.genoviz.widget.NeoAbstractWidget theWidget)
theWidget
- public void addMap(String theName, com.affymetrix.genoviz.widget.NeoMap theMap)
theName
- a unique name.theMap
- on which glyphs are to be placed.public void startDocument()
startDocument
in interface ContentHandler
startDocument
in class DefaultHandler
DocumentHandler.startDocument()
public void endDocument()
endDocument
in interface ContentHandler
endDocument
in class DefaultHandler
DocumentHandler.endDocument()
public void startElement(String uri, String localName, String name, Attributes attributes)
startElement
in interface ContentHandler
startElement
in class DefaultHandler
uri
- localName
- name
- attributes
- DocumentHandler.startElement(java.lang.String, org.xml.sax.AttributeList)
public String getHRef(com.affymetrix.genoviz.bioviews.GlyphI theGlyph)
theGlyph
- public String getTarget(com.affymetrix.genoviz.bioviews.GlyphI theGlyph)
theGlyph
- public void defineGlyphStyle(com.affymetrix.genoviz.widget.NeoMap theMap, String name, String config, Integer labelPlacement)
theMap
- name
- of the styleconfig
- string to pass to the glyph factorylabelPlacement
- LEFT, RIGHT, ABOVE, BELOW, or CENTERpublic void endElement(String uri, String localName, String name)
endElement
in interface ContentHandler
endElement
in class DefaultHandler
uri
- localName
- name
- DocumentHandler.endElement(java.lang.String)
public void characters(char[] ch, int start, int length)
characters
in interface ContentHandler
characters
in class DefaultHandler
ch
- start
- length
- public void ignorableWhitespace(char[] ch, int start, int length)
ignorableWhitespace
in interface ContentHandler
ignorableWhitespace
in class DefaultHandler
ch
- start
- length
- DocumentHandler.ignorableWhitespace(char[], int, int)
public void processingInstruction(String target, String data)
processingInstruction
in interface ContentHandler
processingInstruction
in class DefaultHandler
target
- data
- DocumentHandler.processingInstruction(java.lang.String, java.lang.String)
Copyright © 2021. All rights reserved.