Package uk.ac.starlink.ttools.taplint
Class TableMetadataStage
- java.lang.Object
-
- uk.ac.starlink.ttools.taplint.TableMetadataStage
-
- All Implemented Interfaces:
MetadataHolder
,Stage
- Direct Known Subclasses:
TablesEndpointStage
,TapSchemaStage
public abstract class TableMetadataStage extends java.lang.Object implements Stage, MetadataHolder
Validation stage for checking the content of parsed Table metadata. Concrete subclasses must provide a method to acquire the metadata as an array of TableMeta objects.- Since:
- 3 Jun 2011
- Author:
- Mark Taylor
-
-
Constructor Summary
Constructors Constructor Description TableMetadataStage(java.lang.String srcDescription, java.lang.String[] knownColFlags, boolean reportOtherFlags)
Constructor.
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description java.lang.String
getDescription()
Returns a short one-line description of this stage.java.lang.String
getSourceDescription()
Returns a short text description of table metadata source.uk.ac.starlink.vo.SchemaMeta[]
getTableMetadata()
Returns the table metadata obtained by the last run of this stage.boolean
hasDetail()
Indicates whether column/key metadata was obtained by the last run of this stage.protected abstract MetadataHolder
readTableMetadata(Reporter reporter, uk.ac.starlink.vo.TapService tapService)
Reads an object providing table metadata to check.void
run(Reporter reporter, uk.ac.starlink.vo.TapService tapService)
Performs the validation checks for this stage.
-
-
-
Constructor Detail
-
TableMetadataStage
public TableMetadataStage(java.lang.String srcDescription, java.lang.String[] knownColFlags, boolean reportOtherFlags)
Constructor.- Parameters:
srcDescription
- short text description of table metadata sourceknownColFlags
- standard column flag values to report counts forreportOtherFlags
- whether to report counts for non-standard column flag values
-
-
Method Detail
-
getDescription
public java.lang.String getDescription()
Description copied from interface:Stage
Returns a short one-line description of this stage.- Specified by:
getDescription
in interfaceStage
- Returns:
- description in imperative mood
-
getSourceDescription
public java.lang.String getSourceDescription()
Returns a short text description of table metadata source.- Returns:
- metadata source description
-
getTableMetadata
public uk.ac.starlink.vo.SchemaMeta[] getTableMetadata()
Returns the table metadata obtained by the last run of this stage.- Specified by:
getTableMetadata
in interfaceMetadataHolder
- Returns:
- table metadata array
-
hasDetail
public boolean hasDetail()
Indicates whether column/key metadata was obtained by the last run of this stage.- Specified by:
hasDetail
in interfaceMetadataHolder
- Returns:
- true iff getTableMetadata result has applicable column detail
-
readTableMetadata
protected abstract MetadataHolder readTableMetadata(Reporter reporter, uk.ac.starlink.vo.TapService tapService)
Reads an object providing table metadata to check.- Parameters:
reporter
- destination for validation messagestapService
- TAP service description- Returns:
- fully populated metadata object
-
-