Package cds.savot.writer
Class SavotWriter
java.lang.Object
cds.savot.writer.SavotWriter
VOTable document generation from memory
- Author:
- Andre Schaaff 6 June 2005 : the user can now write a VOTable document flow step by step, the previous method is available too (writing of a whole document) (kickoff 31 May 02)
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
enableAttributeEntities
(boolean entities) Enable or disable Attribute entities mappingvoid
enableElementEntities
(boolean entities) Enable or disable Element entities mappingvoid
enableEntities
(boolean entities) Enable or disable Attribute and Element entities mappingencodeAttribute
(String src) Encode special characters to entitiesencodeElement
(String src) Encode special characters to entitiesvoid
generateDocument
(SavotVOTable votable) Generates a VOTable XML document corresponding to the internal model The result is sent to the standard outputvoid
generateDocument
(SavotVOTable votable, OutputStream stream) Generates a VOTable XML document corresponding to the internal modelvoid
generateDocument
(SavotVOTable votable, String file) Generates a VOTable XML document corresponding to the internal modelvoid
generateDocument
(SavotVOTable votable, String file, OutputStream stream) Generates a VOTable XML document corresponding to the internal modelvoid
initStream
(OutputStream stream) Init the Stream for the outputvoid
initStream
(Writer writer) Init the Stream for the output using the given Writervoid
initStream
(String file) Init the Stream for the outputvoid
setStyleSheet
(String href) Set a stylesheet Also possible with setTop1void
Change the default XML document head Default value <?xml version="1.0 encoding="UTF-8"?>void
writeBinary
(SavotBinary binary) Write a BINARY elementvoid
writeComment
(String comment) Write a commentvoid
writeCoosys
(CoosysSet coosysSet) Write a COOSYS setvoid
Write a DATA beginvoid
Write a DATA endvoid
writeDescription
(String description) Write a descriptionvoid
Write a VOTable XML endvoid
writeDocumentHead
(SavotVOTable votable) Write a VOTable XML headvoid
writeField
(FieldSet fieldSet) Write a FIELD setvoid
writeFieldRef
(FieldRefSet fieldRefSet) Write a FIELD setvoid
Write a FITS elementvoid
writeGroup
(GroupSet groupSet) Write a GROUP setvoid
Write an INFO setvoid
Write a LINK setvoid
Write a MAX elementvoid
Write a MIN elementvoid
writeOption
(OptionSet optionSet) Write an OPTION setvoid
writeParam
(ParamSet params) Write a PARAM setvoid
writeParamRef
(ParamRefSet refparams) Write a PARAMref setvoid
writeResource
(ResourceSet resourceset) Write a RESOURCE setvoid
writeResourceBegin
(SavotResource resource) Write a RESOURCE beginvoid
Write a RESOURCE endvoid
writeStream
(SavotStream stream) Write a STREAM elementvoid
writeTableBegin
(SavotTable table) Write a TABLE beginvoid
Write a TABLEDATA beginvoid
Write a TABLEDATA endvoid
Write a TABLE endvoid
Write a TRvoid
writeValues
(SavotValues values) Write a VALUES element
-
Constructor Details
-
SavotWriter
public SavotWriter()Public constructor
-
-
Method Details
-
setTop1
Change the default XML document head Default value <?xml version="1.0 encoding="UTF-8"?>- Parameters:
top1
-- Since:
- VOTable 1.2
-
setStyleSheet
Set a stylesheet Also possible with setTop1- Parameters:
href
-- Since:
- VOTable 1.2
-
enableAttributeEntities
public void enableAttributeEntities(boolean entities) Enable or disable Attribute entities mapping- Parameters:
entities
- true if Attribute entities are taken into account
-
enableElementEntities
public void enableElementEntities(boolean entities) Enable or disable Element entities mapping- Parameters:
entities
- true if Element entities are taken into account
-
enableEntities
public void enableEntities(boolean entities) Enable or disable Attribute and Element entities mapping- Parameters:
entities
- true if all entities are taken into account
-
encodeAttribute
Encode special characters to entities- Parameters:
src
-- Returns:
- src
-
encodeElement
Encode special characters to entities- Parameters:
src
-- Returns:
- src
-
generateDocument
Generates a VOTable XML document corresponding to the internal model The result is sent to the standard output- Parameters:
votable
- object corresponding to the savot internal model- Throws:
IOException
-
generateDocument
Generates a VOTable XML document corresponding to the internal model- Parameters:
votable
- object corresponding to the savot internal modelstream
- the result is sent to this stream- Throws:
IOException
-
generateDocument
Generates a VOTable XML document corresponding to the internal model- Parameters:
votable
- object corresponding to the savot internal modelfile
- is sent to this file- Throws:
IOException
-
generateDocument
public void generateDocument(SavotVOTable votable, String file, OutputStream stream) throws IOException Generates a VOTable XML document corresponding to the internal model- Parameters:
votable
- SavotVOTablefile
- Stringstream
- OutputStream- Throws:
IOException
-
initStream
Init the Stream for the output- Parameters:
file
- String- Throws:
IOException
-
initStream
Init the Stream for the output- Parameters:
stream
- OutputStream- Throws:
IOException
-
initStream
Init the Stream for the output using the given Writer- Parameters:
writer
- writer implementation to write into
-
writeComment
Write a comment- Parameters:
comment
- String- Throws:
IOException
-
writeDescription
Write a description- Parameters:
description
-- Throws:
IOException
-
writeDocumentHead
Write a VOTable XML head- Parameters:
votable
-- Throws:
IOException
-
writeDocumentEnd
Write a VOTable XML end- Throws:
IOException
-
writeCoosys
Write a COOSYS set- Parameters:
coosysSet
-- Throws:
IOException
-
writeParam
Write a PARAM set- Parameters:
params
-- Throws:
IOException
-
writeParamRef
Write a PARAMref set- Parameters:
refparams
-- Throws:
IOException
-
writeLink
Write a LINK set- Parameters:
linkSet
-- Throws:
IOException
-
writeInfo
Write an INFO set- Parameters:
infoSet
-- Throws:
IOException
-
writeField
Write a FIELD set- Parameters:
fieldSet
-- Throws:
IOException
-
writeFieldRef
Write a FIELD set- Parameters:
fieldRefSet
-- Throws:
IOException
-
writeStream
Write a STREAM element- Parameters:
stream
-- Throws:
IOException
-
writeBinary
Write a BINARY element- Parameters:
binary
-- Throws:
IOException
-
writeValues
Write a VALUES element- Parameters:
values
-- Throws:
IOException
-
writeFits
Write a FITS element- Parameters:
fits
-- Throws:
IOException
-
writeMin
Write a MIN element- Parameters:
min
-- Throws:
IOException
-
writeMax
Write a MAX element- Parameters:
max
-- Throws:
IOException
-
writeOption
Write an OPTION set- Parameters:
optionSet
-- Throws:
IOException
-
writeGroup
Write a GROUP set- Parameters:
groupSet
-- Throws:
IOException
-
writeTableBegin
Write a TABLE begin- Parameters:
table
- SavotTable- Throws:
IOException
-
writeTableEnd
Write a TABLE end- Throws:
IOException
-
writeResourceBegin
Write a RESOURCE begin- Parameters:
resource
- SavotResource- Throws:
IOException
-
writeResourceEnd
Write a RESOURCE end- Throws:
IOException
-
writeTableDataBegin
Write a TABLEDATA begin- Throws:
IOException
-
writeTableDataEnd
Write a TABLEDATA end- Throws:
IOException
-
writeDataBegin
Write a DATA begin- Throws:
IOException
-
writeDataEnd
Write a DATA end- Throws:
IOException
-
writeTR
Write a TR- Parameters:
tr
-- Throws:
IOException
-
writeResource
Write a RESOURCE set- Parameters:
resourceset
- ResourceSet- Throws:
IOException
-