public class GbinMetadataReader
extends java.lang.Object
Modifier and Type | Method and Description |
---|---|
static GbinMeta |
attemptReadMetadata(java.lang.Object gbinReaderObj)
Attempts to read a metadata object from a GbinReader object.
|
static java.lang.String |
convertNameToArchiveFormat(java.lang.String gbinName)
Converts a java-type name to an archive-type (SQL-friendly) name.
|
static java.lang.String |
getGaiaTableName(java.lang.Class<?> objClazz)
Returns the "official" table name for a GBIN file containing
objects of a given class.
|
static GaiaTableMetadata |
getTableMetadata(java.lang.String gaiaTableName)
Returns a metadata object containing information about an
"official" known Gaia table.
|
static void |
main(java.lang.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(java.lang.Object gbinReaderObj) throws java.lang.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
java.lang.Throwable
public static java.lang.String getGaiaTableName(java.lang.Class<?> objClazz)
objClazz
- class of the objects that form the records of
a GBIN filegetTableMetadata(java.lang.String)
public static java.lang.String convertNameToArchiveFormat(java.lang.String gbinName)
gbinName
- java-type namepublic static GaiaTableMetadata getTableMetadata(java.lang.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 namepublic static void main(java.lang.String[] args) throws java.lang.Throwable
java.lang.Throwable