Package uk.ac.starlink.cdf
Class CdfTableBuilder
java.lang.Object
uk.ac.starlink.table.formats.DocumentedTableBuilder
uk.ac.starlink.cdf.CdfTableBuilder
- All Implemented Interfaces:
uk.ac.starlink.table.Documented
,uk.ac.starlink.table.formats.DocumentedIOHandler
,uk.ac.starlink.table.MultiTableBuilder
,uk.ac.starlink.table.TableBuilder
public class CdfTableBuilder
extends uk.ac.starlink.table.formats.DocumentedTableBuilder
implements uk.ac.starlink.table.MultiTableBuilder
Table input handler for NASA CDF (Common Data Format) files.
- Since:
- 24 Jun 2013
- Author:
- Mark Taylor
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final CdfTableProfile
Default CDF-StarTable translation profile. -
Constructor Summary
ConstructorsConstructorDescriptionConstructs a default Cdf table builder.CdfTableBuilder
(CdfTableProfile profile) Constructs a Cdf table builder with a custom translation profile. -
Method Summary
Modifier and TypeMethodDescriptionboolean
canImport
(DataFlavor flavor) Returns false.boolean
static CdfTableProfile
createProfile
(boolean invarParams, String[] descripAttNames, String[] unitAttNames, String[] blankvalAttNames, String[] depend0AttNames) Constructs an instance of CdfTableProfile with some suggestions for attribute names with known semantics.boolean
Returns "CDF".uk.ac.starlink.table.StarTable
makeStarTable
(uk.ac.starlink.util.DataSource datsrc, boolean wantRandom, uk.ac.starlink.table.StoragePolicy storagePolicy) uk.ac.starlink.table.TableSequence
makeStarTables
(uk.ac.starlink.util.DataSource datsrc, uk.ac.starlink.table.StoragePolicy storagePolicy) void
streamStarTable
(InputStream in, uk.ac.starlink.table.TableSink sink, String pos) Throws a TableFormatException.Methods inherited from class uk.ac.starlink.table.formats.DocumentedTableBuilder
getExtensions, looksLikeFile
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface uk.ac.starlink.table.formats.DocumentedIOHandler
readText
Methods inherited from interface uk.ac.starlink.table.TableBuilder
looksLikeFile
-
Field Details
-
DEFAULT_PROFILE
Default CDF-StarTable translation profile. This is based on the ISTP Metadata Guidelines at https://spdf.gsfc.nasa.gov/sp_use_of_cdf.html
-
-
Constructor Details
-
CdfTableBuilder
public CdfTableBuilder()Constructs a default Cdf table builder. -
CdfTableBuilder
Constructs a Cdf table builder with a custom translation profile.- Parameters:
profile
- CDF-Startable translation profile
-
-
Method Details
-
getFormatName
Returns "CDF".- Specified by:
getFormatName
in interfaceuk.ac.starlink.table.TableBuilder
-
makeStarTable
public uk.ac.starlink.table.StarTable makeStarTable(uk.ac.starlink.util.DataSource datsrc, boolean wantRandom, uk.ac.starlink.table.StoragePolicy storagePolicy) throws IOException - Specified by:
makeStarTable
in interfaceuk.ac.starlink.table.TableBuilder
- Throws:
IOException
-
makeStarTables
public uk.ac.starlink.table.TableSequence makeStarTables(uk.ac.starlink.util.DataSource datsrc, uk.ac.starlink.table.StoragePolicy storagePolicy) throws IOException - Specified by:
makeStarTables
in interfaceuk.ac.starlink.table.MultiTableBuilder
- Throws:
IOException
-
canImport
Returns false. I don't think there is a MIME type associated with the CDF format. References to application/x-cdf and application/cdf appear on the web, but neither is IANA registered, and I think they refer to some other format.- Specified by:
canImport
in interfaceuk.ac.starlink.table.TableBuilder
-
streamStarTable
public void streamStarTable(InputStream in, uk.ac.starlink.table.TableSink sink, String pos) throws IOException Throws a TableFormatException. CDF is not suitable for streaming.- Specified by:
streamStarTable
in interfaceuk.ac.starlink.table.TableBuilder
- Throws:
IOException
-
getXmlDescription
- Specified by:
getXmlDescription
in interfaceuk.ac.starlink.table.Documented
-
docIncludesExample
public boolean docIncludesExample()- Specified by:
docIncludesExample
in interfaceuk.ac.starlink.table.formats.DocumentedIOHandler
-
canStream
public boolean canStream()- Specified by:
canStream
in classuk.ac.starlink.table.formats.DocumentedTableBuilder
-
createProfile
public static CdfTableProfile createProfile(boolean invarParams, String[] descripAttNames, String[] unitAttNames, String[] blankvalAttNames, String[] depend0AttNames) Constructs an instance of CdfTableProfile with some suggestions for attribute names with known semantics.- Parameters:
invarParams
- true for turning non-row-varying variables into table parameters, false for turning them into variablesdescripAttNames
- ordered list of names of attributes that might supply description metadataunitAttNames
- ordered list of names of attributes that might supply units metadatablankvalAttNames
- ordered list of names of attributes that might supply magic blank valuesdepend0AttNames
- ordered list of names of attributes that might supply a dependent variable name- Returns:
- new profile instance
-