Class TableMetadataStage
java.lang.Object
uk.ac.starlink.ttools.taplint.TableMetadataStage
- All Implemented Interfaces:
MetadataHolder, Stage
- Direct Known Subclasses:
TablesEndpointStage, TapSchemaStage
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
ConstructorsConstructorDescriptionTableMetadataStage(String srcDescription, String[] knownColFlags, boolean reportOtherFlags) Constructor. -
Method Summary
Modifier and TypeMethodDescriptionReturns a short one-line description of this stage.Returns a short text description of table metadata source.uk.ac.starlink.vo.SchemaMeta[]Returns the table metadata obtained by the last run of this stage.booleanIndicates whether column/key metadata was obtained by the last run of this stage.protected abstract MetadataHolderreadTableMetadata(Reporter reporter, uk.ac.starlink.vo.TapService tapService) Reads an object providing table metadata to check.voidPerforms the validation checks for this stage.voidsetTableFilter(Predicate<uk.ac.starlink.vo.TableMeta> tableFilter) Installs a filter that restricts reported metadata to only selected tables.
-
Constructor Details
-
TableMetadataStage
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 Details
-
getDescription
Description copied from interface:StageReturns a short one-line description of this stage.- Specified by:
getDescriptionin interfaceStage- Returns:
- description in imperative mood
-
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:
getTableMetadatain 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:
hasDetailin interfaceMetadataHolder- Returns:
- true iff getTableMetadata result has applicable column detail
-
setTableFilter
Installs a filter that restricts reported metadata to only selected tables. If a non-null filter has been set atrun(Reporter, TapService)time, subsequent calls togetTableMetadata()will return metadata referencing only those tables passed by the filter.- Parameters:
tableFilter- table selection, or null for unrestricted
-
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 messagestapService- TAP service description- Returns:
- fully populated metadata object
-
run
-