Package org.ivoa.dm.tapschema
Class TAPSchemaUtils
java.lang.Object
org.ivoa.dm.tapschema.TAPSchemaUtils
Utilities concerned with model column and table name normalization.
Note that this is here to allow package access to the DM.
-
Method Summary
Modifier and TypeMethodDescriptionstatic SchemaadjustforTAPStd(Schema schema) Used to prepare a schema for use in the TAP service.static TapschemaModelcopy(TapschemaModel model) Copy a TAPSchema model.static voidNormalize the model keys.static voidprepare a model that has been read from a database for XML serialization.static TapschemaModelreadModelFromXML(Source xml) Read a tapschema model from an XML source.
-
Method Details
-
normalizeFromSerialization
Normalize the model keys. Make sure that the correct keys are generated for a model that as been translated from an XML instance. This needs to be done to make the model ready for saving to a database.- Parameters:
model- the model instance to be normalized.
-
adjustforTAPStd
Used to prepare a schema for use in the TAP service.- Parameters:
schema-- Returns:
- a copy of the original schema with the table names denormalised to have the schema included as required by the TAP standard.
-
prepareForSerialization
prepare a model that has been read from a database for XML serialization. Note that the serialization is not performed.- Parameters:
model- the model to be serialized
-
readModelFromXML
Read a tapschema model from an XML source. This is used to read the TAP schema from the standard XML representation.- Parameters:
xml- The xml source.- Returns:
- the TAPSchemaModel.
- Throws:
jakarta.xml.bind.JAXBException
-
copy
Copy a TAPSchema model.- Parameters:
model- The model to copy.- Returns:
- The copied model.
- Throws:
jakarta.xml.bind.JAXBException
-