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.TableBuilder

public class CdfTableBuilder extends uk.ac.starlink.table.formats.DocumentedTableBuilder
Table input handler for NASA CDF (Common Data Format) files.
Since:
24 Jun 2013
Author:
Mark Taylor
  • Field Details

    • DEFAULT_PROFILE

      public static final CdfTableProfile DEFAULT_PROFILE
      Default CDF-StarTable translation profile.
  • Constructor Details

    • CdfTableBuilder

      public CdfTableBuilder()
      Constructs a default Cdf table builder.
    • CdfTableBuilder

      public CdfTableBuilder(CdfTableProfile profile)
      Constructs a Cdf table builder with a custom translation profile.
      Parameters:
      profile - CDF-Startable translation profile
  • Method Details

    • getFormatName

      public String getFormatName()
      Returns "CDF".
    • makeStarTable

      public uk.ac.starlink.table.StarTable makeStarTable(uk.ac.starlink.util.DataSource datsrc, boolean wantRandom, uk.ac.starlink.table.StoragePolicy storagePolicy) throws IOException
      Throws:
      IOException
    • canImport

      public boolean canImport(DataFlavor flavor)
      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.
    • 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.
      Throws:
      IOException
    • getXmlDescription

      public String getXmlDescription()
    • docIncludesExample

      public boolean docIncludesExample()
    • canStream

      public boolean canStream()
      Specified by:
      canStream in class uk.ac.starlink.table.formats.DocumentedTableBuilder
    • createProfile

      public static CdfTableProfile createProfile(boolean invarParams, String[] descripAttNames, String[] unitAttNames, String[] blankvalAttNames)
      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 variables
      descripAttNames - ordered list of names of attributes that might supply description metadata
      unitAttNames - ordered list of names of attributes that might supply units metadata
      blankvalAttNames - ordered list of names of attributes that might supply magic blank values
      Returns:
      new profile instance