public class VOTableBuilder
extends java.lang.Object
implements uk.ac.starlink.table.TableBuilder, uk.ac.starlink.table.MultiTableBuilder
| Constructor and Description |
|---|
VOTableBuilder()
Default constructor.
|
VOTableBuilder(boolean strict)
Constructs a builder with explicit setting of whether VOTable
standard interpreation is strict or not.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
canImport(java.awt.datatransfer.DataFlavor flavor)
Returns true for flavors which have MIME types starting
text/xml
application/xml
application/x-votable+xml
|
java.lang.String |
getFormatName()
Returns the string "votable".
|
uk.ac.starlink.table.StarTable |
makeStarTable(uk.ac.starlink.util.DataSource datsrc,
boolean wantRandom,
uk.ac.starlink.table.StoragePolicy storagePolicy)
Makes a StarTable out of a DataSource which points to a VOTable.
|
uk.ac.starlink.table.TableSequence |
makeStarTables(uk.ac.starlink.util.DataSource datsrc,
uk.ac.starlink.table.StoragePolicy storagePolicy) |
void |
streamStarTable(java.io.InputStream istrm,
uk.ac.starlink.table.TableSink sink,
java.lang.String index)
Acquires the data from a single TABLE element in a VOTable document,
writing the result to a sink.
|
public VOTableBuilder()
VOElementFactory.isStrictByDefault().public VOTableBuilder(boolean strict)
strict - true iff you want strict enforcement of VOTable standardVOElementFactory.setStrict(boolean)public java.lang.String getFormatName()
getFormatName in interface uk.ac.starlink.table.TableBuilderpublic uk.ac.starlink.table.StarTable makeStarTable(uk.ac.starlink.util.DataSource datsrc,
boolean wantRandom,
uk.ac.starlink.table.StoragePolicy storagePolicy)
throws uk.ac.starlink.table.TableFormatException,
java.io.IOException
makeStarTable in interface uk.ac.starlink.table.TableBuilderdatsrc - the location of the VOTable document to usewantRandom - whether, preferentially, a random access table
should be returned (doesn't guarantee that it will be random)storagePolicy - a StoragePolicy object which may be used to
supply scratch storage if the builder needs ituk.ac.starlink.table.TableFormatExceptionjava.io.IOExceptionpublic uk.ac.starlink.table.TableSequence makeStarTables(uk.ac.starlink.util.DataSource datsrc,
uk.ac.starlink.table.StoragePolicy storagePolicy)
throws uk.ac.starlink.table.TableFormatException,
java.io.IOException
makeStarTables in interface uk.ac.starlink.table.MultiTableBuilderuk.ac.starlink.table.TableFormatExceptionjava.io.IOExceptionpublic boolean canImport(java.awt.datatransfer.DataFlavor flavor)
canImport in interface uk.ac.starlink.table.TableBuilderpublic void streamStarTable(java.io.InputStream istrm,
uk.ac.starlink.table.TableSink sink,
java.lang.String index)
throws java.io.IOException
For more flexible streamed access to VOTable data, use a
TableContentHandler.
streamStarTable in interface uk.ac.starlink.table.TableBuilderistrm - stream from which the VOTable document will be suppliedsink - callback interface into which the table metadata and
data will be dumpedindex - if present, a string representation of the index of
the table in the document to be read - "0" means the
first one encountered, "1" means the second, etc.
If it's null or not of numeric form the
first table will be usedjava.io.IOExceptionCopyright © 2017 Central Laboratory of the Research Councils. All Rights Reserved.