public class GbinMetadataReader extends Object
Modifier and Type | Method and Description |
---|---|
static GbinMeta |
attemptReadMetadata(Object gbinReaderObj)
Attempts to read a metadata object from a GbinReader object.
|
static String |
convertNameToArchiveFormat(String gbinName)
Converts a java-type name to an archive-type (SQL-friendly) name.
|
static String |
getGaiaTableName(Class<?> objClazz)
Returns the "official" table name for a GBIN file containing
objects of a given class.
|
static GaiaTableMetadata |
getTableMetadata(String gaiaTableName)
Returns a metadata object containing information about an
"official" known Gaia table.
|
static void |
main(String[] args)
Attempts to read metadata from the GBIN file named on the command line
and writes the description to stdout.
|
public static GbinMeta attemptReadMetadata(Object gbinReaderObj) throws Throwable
NOTE: this method is effectively destructive: if you read metadata from a GbinReader you cannot then go on to read data records from it.
A wide range of exceptions and errors may be thrown by this method, since it involves reflection all sorts of things can go wrong.
gbinReaderObj
- object implementing
gaia.cu1.tools.dal.gbin.GbinReader
Throwable
public static String getGaiaTableName(Class<?> objClazz)
objClazz
- class of the objects that form the records of
a GBIN filegetTableMetadata(java.lang.String)
public static String convertNameToArchiveFormat(String gbinName)
gbinName
- java-type namepublic static GaiaTableMetadata getTableMetadata(String gaiaTableName)
getGaiaTableName(java.lang.Class<?>)
.
The returned metadata is extracted from datamodel classes
on the classpath, by an instance of
gaia.cu9.tools.documentationexport.MetadataReader
.gaiaTableName
- "official" gaia table nameCopyright © 2024 Central Laboratory of the Research Councils. All Rights Reserved.