|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectuk.ac.starlink.ttools.copy.VotCopyHandler
public class VotCopyHandler
SAX content handler which takes SAX events and converts them to an output stream in a VOTable-sensitive way. As far as is possible given the SAX model, each input SAX event is sent to the output unchanged apart from events within a DATA element, which are written in one of the VOTable encodings as selected by the user.
One exception to the rule is that, for implementation-specific reasons, FIELD elements with datatype="unsignedByte" are changed to have datatype="short" instead.
Constructor Summary | |
---|---|
VotCopyHandler(boolean strict,
uk.ac.starlink.votable.DataFormat format,
boolean inline,
String base,
boolean cache,
uk.ac.starlink.table.StoragePolicy policy)
Constructor. |
Method Summary | |
---|---|
void |
characters(char[] ch,
int start,
int length)
|
void |
comment(char[] ch,
int start,
int length)
|
void |
endCDATA()
|
void |
endDocument()
|
void |
endDTD()
|
void |
endElement(String namespaceURI,
String localName,
String qName)
|
void |
endEntity(String name)
|
void |
endPrefixMapping(String prefix)
|
void |
endTable()
|
void |
ignorableWhitespace(char[] ch,
int start,
int length)
|
void |
processingInstruction(String target,
String data)
|
void |
rowData(Object[] row)
|
void |
setDocumentLocator(Locator locator)
|
void |
setOutput(Writer out)
Sets the output stream for output. |
void |
skippedEntity(String name)
|
void |
startCDATA()
|
void |
startDocument()
|
void |
startDTD(String name,
String publicId,
String systemId)
|
void |
startElement(String namespaceURI,
String localName,
String qName,
Attributes atts)
|
void |
startEntity(String name)
|
void |
startPrefixMapping(String prefix,
String uri)
|
void |
startTable(uk.ac.starlink.table.StarTable meta)
|
void |
writeDataElement(uk.ac.starlink.table.StarTable table)
Outputs a DATA element representing a table to the destination stream according to the current settings. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public VotCopyHandler(boolean strict, uk.ac.starlink.votable.DataFormat format, boolean inline, String base, boolean cache, uk.ac.starlink.table.StoragePolicy policy)
UnrepeatableSequenceException
(wrapped in a SAXException).
strict
- whether to effect strict interpretation of the
VOTable standardformat
- encoding type for output DATA elements; may be null
for DATA-less outputinline
- true for tables written inline, false for tables written
to an href-referenced streambase
- base table location; used to construct URIs for
out-of-line table streams (only used if inline=false)cache
- whether tables will be cached prior to writingpolicy
- storage policy for cached tablesMethod Detail |
---|
public void setOutput(Writer out)
out
- output writerpublic void startTable(uk.ac.starlink.table.StarTable meta) throws SAXException
startTable
in interface uk.ac.starlink.votable.TableHandler
SAXException
public void rowData(Object[] row) throws SAXException
rowData
in interface uk.ac.starlink.votable.TableHandler
SAXException
public void endTable() throws SAXException
endTable
in interface uk.ac.starlink.votable.TableHandler
SAXException
public void setDocumentLocator(Locator locator)
setDocumentLocator
in interface ContentHandler
public void startDocument() throws SAXException
startDocument
in interface ContentHandler
SAXException
public void endDocument() throws SAXException
endDocument
in interface ContentHandler
SAXException
public void startElement(String namespaceURI, String localName, String qName, Attributes atts) throws SAXException
startElement
in interface ContentHandler
SAXException
public void endElement(String namespaceURI, String localName, String qName) throws SAXException
endElement
in interface ContentHandler
SAXException
public void characters(char[] ch, int start, int length) throws SAXException
characters
in interface ContentHandler
SAXException
public void ignorableWhitespace(char[] ch, int start, int length) throws SAXException
ignorableWhitespace
in interface ContentHandler
SAXException
public void startPrefixMapping(String prefix, String uri) throws SAXException
startPrefixMapping
in interface ContentHandler
SAXException
public void endPrefixMapping(String prefix) throws SAXException
endPrefixMapping
in interface ContentHandler
SAXException
public void skippedEntity(String name) throws SAXException
skippedEntity
in interface ContentHandler
SAXException
public void processingInstruction(String target, String data) throws SAXException
processingInstruction
in interface ContentHandler
SAXException
public void comment(char[] ch, int start, int length) throws SAXException
comment
in interface LexicalHandler
SAXException
public void startCDATA() throws SAXException
startCDATA
in interface LexicalHandler
SAXException
public void endCDATA() throws SAXException
endCDATA
in interface LexicalHandler
SAXException
public void startDTD(String name, String publicId, String systemId) throws SAXException
startDTD
in interface LexicalHandler
SAXException
public void endDTD() throws SAXException
endDTD
in interface LexicalHandler
SAXException
public void startEntity(String name) throws SAXException
startEntity
in interface LexicalHandler
SAXException
public void endEntity(String name) throws SAXException
endEntity
in interface LexicalHandler
SAXException
public void writeDataElement(uk.ac.starlink.table.StarTable table) throws IOException
table
- table to write
IOException
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |