Class ObjectDefn

  • Direct Known Subclasses:
    TableDefn

    public class ObjectDefn
    extends Object
    Metadata definition of the metadata objects stored in the catalog. (Yes, that means that this is meta-meta-data.) Objects consist of a map of property values (and perhaps other items defined in subclasses.) Each property is defined by a column metadata object. Objects allow extended properties which have no definition: the meaning of such properties is defined elsewhere.
    • Method Detail

      • typeValue

        public String typeValue()
        The type value is the value of the "type" field written into the object's Java or JSON representation. It is akin to the type used by Jackson.
      • mergeProperties

        public Map<String,​Object> mergeProperties​(Map<String,​Object> source,
                                                        Map<String,​Object> update)
        Merge the properties for an object using a set of updates in a map. If the update value is null, then remove the property in the revised set. If the property is known, use the column definition to merge the values. Else, the update replaces any existing value.

        This method does not validate the properties, except as needed to do a merge. A separate validation step is done on the final, merged object.

      • validate

        public void validate​(Map<String,​Object> spec,
                             com.fasterxml.jackson.databind.ObjectMapper jsonMapper)
        Validate the property values using the property definitions defined in this class. The list may contain "custom" properties which are accepted as-is.