Package uk.ac.starlink.ecsv
Class EcsvTableBuilder
- java.lang.Object
-
- uk.ac.starlink.table.formats.DocumentedTableBuilder
-
- uk.ac.starlink.ecsv.EcsvTableBuilder
-
- All Implemented Interfaces:
uk.ac.starlink.table.Documented,uk.ac.starlink.table.formats.DocumentedIOHandler,uk.ac.starlink.table.TableBuilder
public class EcsvTableBuilder extends uk.ac.starlink.table.formats.DocumentedTableBuilderTableBuilder implementation for ECSV tables. The format currently supported is ECSV 1.0, as documented at Astropy APE6 (V1.0 DOI:10.5281/zenodo.4792325).- Since:
- 29 Apr 2020
- Author:
- Mark Taylor
-
-
Constructor Summary
Constructors Constructor Description EcsvTableBuilder()Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleancanImport(java.awt.datatransfer.DataFlavor flavor)booleancanStream()booleandocIncludesExample()java.lang.StringgetFormatName()java.lang.StringgetXmlDescription()uk.ac.starlink.table.StarTablemakeStarTable(uk.ac.starlink.util.DataSource datsrc, boolean wantRandom, uk.ac.starlink.table.StoragePolicy storagePolicy)voidsetColcheck(MessagePolicy colCheck)voidsetHeader(java.lang.String headerLoc)Sets the location of a header file which will be prepended to any file read by this handler.voidstreamStarTable(java.io.InputStream in, uk.ac.starlink.table.TableSink sink, java.lang.String pos)-
Methods inherited from class uk.ac.starlink.table.formats.DocumentedTableBuilder
getExtensions, looksLikeFile
-
-
-
-
Method Detail
-
getFormatName
public java.lang.String getFormatName()
-
canImport
public boolean canImport(java.awt.datatransfer.DataFlavor flavor)
-
setHeader
@ConfigMethod(property="header", doc="<p>Location of a file containing a header to be applied\nto the start of the input file.\nBy using this you can apply your own ECSV-format metadata\nto plain CSV files.\n</p>", usage="<filename-or-url>", example="http://cdn.gea.esac.esa.int/Gaia/gedr3/ECSV_headers/gaia_source.header", sequence=1) public void setHeader(java.lang.String headerLoc)Sets the location of a header file which will be prepended to any file read by this handler. It can be ste to a file containing an ECSV header, so that this handler can read plain CSV files but include prepared YAML metadata.- Parameters:
headerLoc- filename or URL pointing to a header file
-
setColcheck
@ConfigMethod(property="colcheck", doc="<p>Determines the action taken if the columns named\nin the YAML header differ from the columns named in the\nfirst line of the CSV part of the file.\n</p>", example="FAIL", sequence=2) public void setColcheck(MessagePolicy colCheck)
-
streamStarTable
public void streamStarTable(java.io.InputStream in, uk.ac.starlink.table.TableSink sink, java.lang.String pos) throws java.io.IOException- Throws:
java.io.IOException
-
makeStarTable
public uk.ac.starlink.table.StarTable makeStarTable(uk.ac.starlink.util.DataSource datsrc, boolean wantRandom, uk.ac.starlink.table.StoragePolicy storagePolicy) throws java.io.IOException- Throws:
java.io.IOException
-
getXmlDescription
public java.lang.String getXmlDescription()
-
canStream
public boolean canStream()
- Specified by:
canStreamin classuk.ac.starlink.table.formats.DocumentedTableBuilder
-
docIncludesExample
public boolean docIncludesExample()
-
-