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 TypeMethodDescriptionvoidenableAttributeEntities(boolean entities) Enable or disable Attribute entities mappingvoidenableElementEntities(boolean entities) Enable or disable Element entities mappingvoidenableEntities(boolean entities) Enable or disable Attribute and Element entities mappingencodeAttribute(String src) Encode special characters to entitiesencodeElement(String src) Encode special characters to entitiesvoidgenerateDocument(SavotVOTable votable) Generates a VOTable XML document corresponding to the internal model The result is sent to the standard outputvoidgenerateDocument(SavotVOTable votable, OutputStream stream) Generates a VOTable XML document corresponding to the internal modelvoidgenerateDocument(SavotVOTable votable, String file) Generates a VOTable XML document corresponding to the internal modelvoidgenerateDocument(SavotVOTable votable, String file, OutputStream stream) Generates a VOTable XML document corresponding to the internal modelvoidinitStream(OutputStream stream) Init the Stream for the outputvoidinitStream(Writer writer) Init the Stream for the output using the given WritervoidinitStream(String file) Init the Stream for the outputvoidsetStyleSheet(String href) Set a stylesheet Also possible with setTop1voidChange the default XML document head Default value invalid input: '<'?xml version="1.0 encoding="UTF-8"?>voidwriteBinary(SavotBinary binary) Write a BINARY elementvoidwriteComment(String comment) Write a commentvoidwriteCoosys(CoosysSet coosysSet) Write a COOSYS setvoidWrite a DATA beginvoidWrite a DATA endvoidwriteDescription(String description) Write a descriptionvoidWrite a VOTable XML endvoidwriteDocumentHead(SavotVOTable votable) Write a VOTable XML headvoidwriteField(FieldSet fieldSet) Write a FIELD setvoidwriteFieldRef(FieldRefSet fieldRefSet) Write a FIELD setvoidWrite a FITS elementvoidwriteGroup(GroupSet groupSet) Write a GROUP setvoidWrite an INFO setvoidWrite a LINK setvoidWrite a MAX elementvoidWrite a MIN elementvoidwriteOption(OptionSet optionSet) Write an OPTION setvoidwriteParam(ParamSet params) Write a PARAM setvoidwriteParamRef(ParamRefSet refparams) Write a PARAMref setvoidwriteResource(ResourceSet resourceset) Write a RESOURCE setvoidwriteResourceBegin(SavotResource resource) Write a RESOURCE beginvoidWrite a RESOURCE endvoidwriteStream(SavotStream stream) Write a STREAM elementvoidwriteTableBegin(SavotTable table) Write a TABLE beginvoidWrite a TABLEDATA beginvoidWrite a TABLEDATA endvoidWrite a TABLE endvoidWrite a TRvoidwriteValues(SavotValues values) Write a VALUES element
-
Constructor Details
-
SavotWriter
public SavotWriter()Public constructor
-
-
Method Details
-
setTop1
Change the default XML document head Default value invalid input: '<'?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
-